[BACK]Return to check-PLIST-overwrap CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / ham / gnuradio-core / files

File: [cvs.NetBSD.org] / pkgsrc / ham / gnuradio-core / files / check-PLIST-overwrap (download)

Revision 1.1, Mon Oct 13 12:46:33 2014 UTC (7 years, 1 month ago) by mef
Branch: MAIN
CVS Tags: pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, HEAD

(pkgsrc) Update GNU Radio 3.3.0 (2010-09-15) to 3.7.5
  See the thread for modularity issues etc:
  http://mail-index.netbsd.org/pkgsrc-users/2014/09/07/msg020346.html

(upstream)
Release of 3.7.5  2014-09-05  http://gnuradio.org/redmine/news/43
  Changelog:
  http://gnuradio.org/redmine/projects/gnuradio/wiki/ChangeLogV3_7_5
Release of 3.7.4  2014-07-15  http://gnuradio.org/redmine/news/38
Release of 3.7.3  2014-03-16  http://gnuradio.org/redmine/news/35

Release of 3.7.2  2013-11-10  http://gnuradio.org/redmine/news/30
Release of 3.7.1  2013-08-29  http://gnuradio.org/redmine/news/26
Release of 3.7.0  2013-07-03  http://gnuradio.org/redmine/news/25

Release of 3.6.0  2012-04-21  http://gnuradio.org/redmine/news/13
Release of 3.5.0  2011-12-08  http://gnuradio.org/redmine/news/6
Release of 3.4.0  2011-10-09  http://gnuradio.org/redmine/news/2

Release of 3.3.0  2010-06-03  ftp://ftp.gnu.org/gnu/gnuradio/
Release of 3.3.0-rc0
                  2010-05-13  http://gnuradio.org/redmine/news/1

#!/usr/pkg/bin/perl
# Check the duplication on gnuradio-*/PLIST  (except gnuradio-default)
# Check if whole meta-pkgs/gnuradio PLIST convers the one of gnuradio-default (use -m)
# use -h for usage.

use strict;
use Getopt::Std;

# option related
our(%opts);
our(@ARGV);
my ($verbose) = 0;

my ($PKGSRC)	='/usr/pkgsrc';
my ($CATEGORY)	='ham';
my ($DEFAULT) = 'gnuradio-default';

my (@LIST);	# list of gnuradio-*/PLIST files

my (%WORDS);	# list of files in the PLIST (other than -default)
my (%count);	# number of appearance of files in the PLIST (other than -default)

my (%CHECKED);	# list of files found (in the -default) in the PLIST
my (%FULL); 	# full list from gnuradio-default

sub usage() {
    print <<HELP;
$0
Synopsys:
    check-PLIST-overwrap [-h] [-c CATEGORY] [-m] [-p PATH] [-v]
Where:
    -h	show this help
    -c	CATEGORY (ham)
    -m	print missing file instead of dupes
    -p	pkgsrc directory (/usr/pkgsrc)
    -v	verbose
    (parenthesis) shows default value
HELP
}

getopts("hc:mp:v", \%opts);
if ($opts{'h'}) { usage(); exit;}
if ($opts{'c'}) { $CATEGORY = $opts{'c'};}
if ($opts{'p'}) { $PKGSRC   = $opts{'p'};}
if ($opts{'v'}) { $verbose = 1;          }
my ($WORK)	= $PKGSRC.'/'.$CATEGORY;

print "(Category) $CATEGORY, (pkgsrc) $PKGSRC \n";
    
chdir $WORK;
print 'Changing to directory: ', $WORK,"\n";
opendir(DIR, $WORK) || die " *** Problem opening directory ($WORK), use [-p DIR] to change.\n";

my ($dir) = 1;
while ($dir) {
    $dir = readdir (DIR);
    chomp($dir);
    if ( $dir =~ /^$DEFAULT/ ) { next; } # skip -default at this time
    if ( $dir =~ /^gnuradio/ ) {
	my($PLIST) = $dir.'/PLIST';
	if ( -f $PLIST ) {
	    push(@LIST, $PLIST);
	}
    }
}
foreach my $d (0..$#LIST) {
    my $file = $LIST[$d];
    print "      Reading $file \n" if $verbose;
    open (FILE, $file) || print " *** Problem opening $file: $!\n";
    while(<FILE>) {
	chomp();
	if (/\@comment/) { next;}
	if (/\@pkgdir/)	{ next;}
	my ($word) = $_;
	my ($module) = $file;
	$file =~ s/gnuradio-//;
	$file =~ s,/PLIST,,;
	$WORDS{$word} .= ' '.$file;
	$count{$word}++;
    }
    close(FILE);
}
sub show_missing() {
    my ($file) = $DEFAULT.'/PLIST';
    print " (-m) Reading $file \n" if $verbose;
    open (FILE, $file) || print "problem opening $file: $!\n";
    while (<FILE>) {
	chomp();
	if (/\@comment/) { next;}
	if (/\@pkgdir/)	{ next;}
	my ($word) = $_;
	my ($module) = $file;
	$file =~ s/gnuradio-//;
	$file =~ s,/PLIST,,;
	$FULL{$word}++;
    }
    close(FILE);
    foreach my $key (sort keys %FULL){
	if ($WORDS{$key} ) {
	    $CHECKED{$key}++;
	    next;}
	else {
	    printf ("missing: %30s\t\n", $key);
	}	    
    }
    foreach my $file (keys %WORDS) {
	if ( $CHECKED{$file} ) { next;}
	else {
	    printf ("extra: %30s\n", $file);
	}
    }
}

sub show_dupe() {
    foreach my $key (sort keys %WORDS){
	if ($count{$key} > 1 ) {
	    printf ("%30s\t->%s\n", $key, $WORDS{$key});
	}
    }    
}

if ($opts{'m'}) { show_missing();}
else	        { show_dupe();}
exit;