diff options
author | marcus <marcus@FreeBSD.org> | 2004-10-12 12:33:46 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2004-10-12 12:33:46 +0800 |
commit | daea57f4ee387cf3609e1736eeb17abda5d5544e (patch) | |
tree | 8fd09b8f9c47f4929e9a19fc7d4d0533ff42f8b3 /ports-mgmt | |
parent | 1d360686239e265aa953043703152d56abcadf5c (diff) | |
download | freebsd-ports-gnome-daea57f4ee387cf3609e1736eeb17abda5d5544e.tar.gz freebsd-ports-gnome-daea57f4ee387cf3609e1736eeb17abda5d5544e.tar.zst freebsd-ports-gnome-daea57f4ee387cf3609e1736eeb17abda5d5544e.zip |
* Update to 2.6.8
* Check PLIST_FILES for shared libraries, and make sure
INSTALLS_SHLIB is defined [1]
* Check DATADIR and MAN3PREFIX macros [2]
* Check OPTIONS [3]
PR: 71405 [2]
71468 [3]
Requested by: michael johnson <ahze@ahze.net> [1]
Submitted by: leeym [2] [3]
Diffstat (limited to 'ports-mgmt')
-rw-r--r-- | ports-mgmt/portlint/Makefile | 2 | ||||
-rw-r--r-- | ports-mgmt/portlint/src/portlint.pl | 50 |
2 files changed, 47 insertions, 5 deletions
diff --git a/ports-mgmt/portlint/Makefile b/ports-mgmt/portlint/Makefile index 4143eb148407..b02339f4fa6f 100644 --- a/ports-mgmt/portlint/Makefile +++ b/ports-mgmt/portlint/Makefile @@ -8,7 +8,7 @@ # PORTNAME= portlint -PORTVERSION= 2.6.7 +PORTVERSION= 2.6.8 CATEGORIES= devel MASTER_SITES= # none DISTFILES= # none diff --git a/ports-mgmt/portlint/src/portlint.pl b/ports-mgmt/portlint/src/portlint.pl index 376c454526d0..1e8a1206b937 100644 --- a/ports-mgmt/portlint/src/portlint.pl +++ b/ports-mgmt/portlint/src/portlint.pl @@ -17,7 +17,7 @@ # OpenBSD and NetBSD will be accepted. # # $FreeBSD$ -# $Id: portlint.pl,v 1.61 2004/09/01 04:08:34 marcus Exp $ +# $Id: portlint.pl,v 1.63 2004/10/12 04:12:46 marcus Exp $ # use vars qw/ $opt_a $opt_A $opt_b $opt_C $opt_c $opt_h $opt_t $opt_v $opt_M $opt_N $opt_B $opt_V /; @@ -40,7 +40,7 @@ $portdir = '.'; # version variables my $major = 2; my $minor = 6; -my $micro = 7; +my $micro = 8; sub l { '[{(]'; } sub r { '[)}]'; } @@ -174,7 +174,8 @@ my @varlist = qw( MASTER_SITES WRKDIR WRKSRC NO_WRKSUBDIR PATCHDIR SCRIPTDIR FILESDIR PKGDIR COMMENT DESCR PLIST PKGCATEGORY PKGINSTALL PKGDEINSTALL PKGREQ PKGMESSAGE MD5_FILE .CURDIR INSTALLS_SHLIB USE_LIBTOOL_VER - INDEXFILE PKGORIGIN CONFLICTS PKG_VERSION PKGINSTALLVER + INDEXFILE PKGORIGIN CONFLICTS PKG_VERSION PKGINSTALLVER PLIST_FILES + OPTIONS ); my $cmd = join(' -V ', "make $makeenv MASTER_SITE_BACKUP=''", @varlist); @@ -694,7 +695,7 @@ sub checkplist { "for the preferred way to handle gconf schemas."); } - if ($_ =~ m|^lib/pkgconfig/[^\.]+.pc$|) { + if ($_ =~ m|lib/pkgconfig/[^\.]+.pc$|) { &perror("FATAL: $file [$.]: installing pkg-config files into ". "lib/pkgconfig. All pkg-config files must be installed ". "into libdata/pkgconfig for them to be found by pkg-config."); @@ -755,6 +756,10 @@ sub checkplist { &perror("WARN: $file [$.]: consider using EXAMPLESDIR macro"); } + if ($_ =~ /^share\/$makevar{PORTNAME}\//) { + &perror("WARN: $file [$.]: consider using DATADIR macro"); + } + if ($_ =~ m#man/([^/]+/)?man([$manchapters])/([^\.]+\.[$manchapters])(\.gz)?$#) { if ($4 eq '') { $plistman{$2} .= ' ' . $3; @@ -1020,6 +1025,7 @@ sub checkmakefile { my $use_gnome_hack = 0; my($realwrksrc, $wrksrc, $nowrksubdir) = ('', '', ''); my(@mman, @pman); + my(@mopt, @oopt); my($pkg_version, $versiondir, $versionfile) = ('', '', ''); my $useindex = 0; my %deprecated = (); @@ -1117,6 +1123,16 @@ sub checkmakefile { &perror("WARN: $file [$lineno]: You may remove pkg-plist ". "if you use PLIST_FILES and/or PLIST_DIRS."); } + my @plist_files = split(/\s+/, $makevar{PLIST_FILES}); + foreach my $plist_file (@plist_files) { + if ($plist_file =~ m|^lib/lib[^\/]+\.so(\.\d+)?$| && + $makevar{INSTALLS_SHLIB} eq '') { + &perror("WARN: PLIST_FILES: installing shared libraries, ". + "please define INSTALLS_SHLIB as appropriate"); + last; + } + } + } # @@ -2196,6 +2212,12 @@ FETCH_DEPENDS DEPENDS DEPENDS_TARGET foreach my $i (keys %plistmanall) { print "OK: pkg-plist MAN$i=$plistmanall{$i}\n" if ($verbose); } + if ($tmp =~ /PERL_CONFIGURE=\s*/ + && $tmp =~ /MAN3PREFIX=\s*\${PREFIX}\/lib\/perl5\/\${PERL_VERSION}/) { + &perror("WARN: $file: MAN3PREFIX is ". + "\"\${PREFIX}/lib/perl5/\${PERL_VERSION}\" ". + "when PERL_CONFIGURE is set. You do not need to specify it."); + } foreach my $i (split(//, $manchapters)) { if ($tmp =~ /MAN\U$i\E=\s*([^\n]*)\n/) { print "OK: Makefile MAN\U$i\E=$1\n" if ($verbose); @@ -2306,6 +2328,26 @@ FETCH_DEPENDS DEPENDS DEPENDS_TARGET "use post-patch instead."); } + # check OPTIONS + print "OK: checking OPTIONS.\n" if ($verbose); + @oopt = ($makevar{OPTIONS} =~ /(\w+)\s+\".*?\"\s+\w+/sg); + @mopt = ($tmp =~ /^\s*\.\s*(?:ifdef\s+|if\s+defined\s*)\(?\s*WITH(?:OUT)?_(\w+)\s*\)?/mg); + foreach my $i (@oopt) { + if (!grep(/^$i$/, @mopt)) { + &perror("WARN: $file: $i is listed in OPTIONS, ". + "but neither WITH_$i nor WITHOUT_$i appears."); + } + } + foreach my $i (@mopt) { + next if ($i eq 'NLS'); # skip WITHOUT_NLS + if (!grep(/^$i$/, @oopt)) { + # XXX: disabled temporarily. + # OPTIONS is still "in flux" + #&perror("WARN: $file: WITH_$i or WITHOUT_$i appears, ". + # "consider using OPTIONS macro."); + } + } + 1; } |