head 1.4; access; symbols pkgsrc-2013Q2:1.4.0.54 pkgsrc-2013Q2-base:1.4 pkgsrc-2012Q4:1.4.0.52 pkgsrc-2012Q4-base:1.4 pkgsrc-2011Q4:1.4.0.50 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q2:1.4.0.48 pkgsrc-2011Q2-base:1.4 pkgsrc-2009Q4:1.4.0.46 pkgsrc-2009Q4-base:1.4 pkgsrc-2008Q4:1.4.0.44 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.42 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.40 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.38 pkgsrc-2008Q2-base:1.4 pkgsrc-2008Q1:1.4.0.36 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.34 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.32 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.30 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.28 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.26 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.4.0.24 pkgsrc-2006Q3-base:1.4 pkgsrc-2006Q2:1.4.0.22 pkgsrc-2006Q2-base:1.4 pkgsrc-2006Q1:1.4.0.20 pkgsrc-2006Q1-base:1.4 pkgsrc-2005Q4:1.4.0.18 pkgsrc-2005Q4-base:1.4 pkgsrc-2005Q3:1.4.0.16 pkgsrc-2005Q3-base:1.4 pkgsrc-2005Q2:1.4.0.14 pkgsrc-2005Q2-base:1.4 pkgsrc-2005Q1:1.4.0.12 pkgsrc-2005Q1-base:1.4 pkgsrc-2004Q4:1.4.0.10 pkgsrc-2004Q4-base:1.4 pkgsrc-2004Q3:1.4.0.8 pkgsrc-2004Q3-base:1.4 pkgsrc-2004Q2:1.4.0.6 pkgsrc-2004Q2-base:1.4 pkgsrc-2004Q1:1.4.0.4 pkgsrc-2004Q1-base:1.4 pkgsrc-2003Q4:1.4.0.2 pkgsrc-2003Q4-base:1.4 buildlink2-base:1.4 netbsd-1-3-PATCH002:1.2; locks; strict; comment @# @; 1.4 date 98.08.07.22.25.35; author tsarna; state dead; branches; next 1.3; 1.3 date 98.08.07.10.40.27; author agc; state Exp; branches; next 1.2; 1.2 date 98.04.25.13.42.34; author frueauf; state Exp; branches; next 1.1; 1.1 date 98.04.25.13.23.35; author frueauf; state Exp; branches; next ; desc @@ 1.4 log @Portlint is dead, long live pkglint @ text @$NetBSD: patch-ac,v 1.3 1998/08/07 10:40:27 agc Exp $ --- plist-clash.pl.orig Sat Apr 25 15:32:11 1998 +++ plist-clash.pl Sat Apr 25 15:33:16 1998 @@@@ -0,0 +1,96 @@@@ +#!@@PREFIX@@/bin/perl +# +# Scan all ports and look for filenames used by more than one port. +# + +if(`uname -s` eq "FreeBSD"){ + $OS="FreeBSD"; + $PORTSDIR="/usr/ports"; +}else{ + $OS="NetBSD"; + $PORTSDIR="@@PORTSDIR@@"; +} + +########################################################################### +sub read_plist +{ + local($pkg)=@@_; + local($base); + + $prefix="\$LOCALBASE"; + + if(! -d $pkg){ + print "$pkg: no such dir\n"; + return; + } + + open(M,"$pkg/Makefile") || die "Can't read $pkg/Makefile: $!\n"; + while(){ + $prefix="\$X11BASE" if /USE_X11/; + $prefix="\$X11BASE" if /USE_IMAKE/; + $prefix=$1 if /^PREFIX\??=\s*(\S+)/; + } + close(M); + + # printf "%-40s prefix=%s\n","$pkg:",$prefix; + + # NetBSD may have more than one PLIST file + opendir(D,"$pkg/pkg/.") || die "Can't readdir($pkg/pkg/.): $!\n"; + while($f=readdir(D)){ + if($f =~ /^PLIST/){ + next if $f=~/.orig$/; + + # printf("%-40s PLIST=$f\n","",$f); + + open(P,"$pkg/pkg/$f") or die "Can't read $pkg/pkg/$f: $!\n"; + while(

){ + next if /^@@/; + chomp; + + # strip .gz off manpages - handled via MANZ + s/.gz$// if /^man/; + + ($p) = $pkg =~ m@@$PORTSDIR/(.+)@@; + if(0 and $F{"$prefix/$_"}){ + print "$prefix/$_ already used by ",$F{"$prefix/$_"},"\n"; + } + $F{"$prefix/$_"} .= " $p"; + } + close(P); + } + } + closedir(D); +} + + +########################################################################### +# M A I N +########################################################################### + +if($#ARGV < 0){ + die "Usage: $0 portsdir1 ...\n"; +} + +# loop to parse all PLIST files +foreach $pkg (@@ARGV){ + print "===> $pkg\n"; + &read_plist($pkg); +} + +# Output diplicates +foreach $file (sort keys %F){ + $pkgs=$F{$file}; + $pkgs=~s/^\s+//g; + + # clean up duplicates (e.g. via PLIST-*) + undef %pF; + foreach $p (split(/ /,$pkgs)){ + $pF{$p}=1; + } + @@pkgs=sort keys %pF; + + $n=$#pkgs+1; + if($n>1){ + print "$n for $file: ",join(", ",@@pkgs),"\n"; + } +} @ 1.3 log @Add NetBSD RCS Ids. @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @whoops, patchfile got corrupted. This one works. @ text @d1 2 @ 1.1 log @Initial import of portlint-1.64 (+ NetBSD changes). @ text @d1 3 a3 3 --- plist-clash.pl-orig Sat Apr 25 13:37:01 1998 +++ plist-clash.pl Sat Apr 25 13:35:13 1998 @@@@ -0,0 +1,97 @@@@ @