Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jun 2009 06:46:53 GMT
From:      Sahil Tandon <sahil@tandon.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/135858: [PATCH] ports-mgmt/portlint: Tweak existing features + add GNU_CONFIGURE/HAS_CONFIGURE warning + refine Makefile
Message-ID:  <200906200646.n5K6krBo021231@www.freebsd.org>
Resent-Message-ID: <200906200650.n5K6o2jc007188@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         135858
>Category:       ports
>Synopsis:       [PATCH] ports-mgmt/portlint: Tweak existing features + add GNU_CONFIGURE/HAS_CONFIGURE warning + refine Makefile
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 20 06:50:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Sahil Tandon
>Release:        7.1-RELEASE
>Organization:
>Environment:
FreeBSD internal.hamla.org 7.1-RELEASE FreeBSD 7.1-RELEASE #0:
>Description:
- Throw warning if HAS_CONFIGURE and GNU_CONFIGURE are both set
- Check for redundant --prefix and --build in CONFIGURE_ARGS when GNU_CONFIGURE is set
- Remove pkg-plist; instead, define PLIST_FILES and PORTEXAMPLES in Makefile
- Modify Makefile to respect NOPORTEXAMPLES
- Bump PORTVERSION
>How-To-Repeat:

>Fix:
CVS diff attached.

Patch attached with submission follows:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/ports-mgmt/portlint/Makefile,v
retrieving revision 1.132
diff -u -r1.132 Makefile
--- Makefile	23 May 2009 19:07:32 -0000	1.132
+++ Makefile	20 Jun 2009 06:35:03 -0000
@@ -8,7 +8,7 @@
 #
 
 PORTNAME=	portlint
-PORTVERSION=	2.11.2
+PORTVERSION=	2.11.3
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	# none
 DISTFILES=	# none
@@ -24,6 +24,10 @@
 
 MAN1=		portlint.1
 
+PLIST_FILES=	bin/portlint
+
+PORTEXAMPLES=	portlintgrep
+
 do-fetch:
 	@${DO_NADA}
 
@@ -32,13 +36,14 @@
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|/usr/bin/perl|${PERL}|' ${WRKSRC}/portlint.pl
-	@${REINPLACE_CMD} -e 's|/usr/bin/perl|${PERL}|' \
-		${WRKSRC}/portlintgrep.pl
+	@${REINPLACE_CMD} -e 's|/usr/bin/perl|${PERL}|' ${WRKSRC}/portlintgrep.pl
 
 do-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/portlint.pl ${PREFIX}/bin/portlint
 	${INSTALL_MAN} ${WRKSRC}/portlint.1 ${MAN1PREFIX}/man/man1
-	${MKDIR} ${EXAMPLESDIR}
+.if !defined(NOPORTEXAMPLES)
+	${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m 555 -d ${EXAMPLESDIR}
 	${INSTALL_SCRIPT} ${WRKSRC}/portlintgrep.pl ${EXAMPLESDIR}/portlintgrep
+.endif
 
 .include <bsd.port.mk>
Index: pkg-plist
===================================================================
RCS file: pkg-plist
diff -N pkg-plist
--- pkg-plist	17 Nov 2003 21:19:02 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-bin/portlint
-%%EXAMPLESDIR%%/portlintgrep
-@dirrm %%EXAMPLESDIR%%
Index: src/portlint.pl
===================================================================
RCS file: /home/ncvs/ports/ports-mgmt/portlint/src/portlint.pl,v
retrieving revision 1.109
diff -u -r1.109 portlint.pl
--- src/portlint.pl	23 May 2009 19:07:32 -0000	1.109
+++ src/portlint.pl	20 Jun 2009 06:35:05 -0000
@@ -1936,13 +1936,13 @@
 	}
 
 	#
-	# whole file: check for --mandir and --infodir when GNU_CONFIGURE
+	# whole file: check for --build, --mandir, --infodir and --prefix when GNU_CONFIGURE
 	#
 	if (exists $makevar{GNU_CONFIGURE} &&
 		$makevar{GNU_CONFIGURE} ne '' &&
-		$makevar{CONFIGURE_ARGS} =~ /--(man|info)dir/) {
-		&perror("WARN", $file, -1, "--mandir and --infodir are not needed ".
-			"in CONFIGURE_ARGS as they are already set in bsd.port.mk");
+		$makevar{CONFIGURE_ARGS} =~ /--(prefix|build|(man|info)dir)/) {
+		&perror("WARN", $file, -1, "--build, --mandir, --infodir and --prefix ".
+			"are not needed in CONFIGURE_ARGS as they are already set in bsd.port.mk");
 	}
 
 	#
@@ -2823,12 +2823,20 @@
 			"INFO macro instead.");
 	}
 
+	# check if HAS_CONFIGURE and GNU_CONFIGURE
+	if ($tmp =~ /\nGNU_CONFIGURE[?+]?=/
+         && $tmp =~ /\n(HAS_CONFIGURE)[?+]?=/) {
+                &perror("WARN", $file, -1, "since you already have GNU_CONFIGURE, ".
+                        "you don't need $1.");
+        }
+
 	# check USE_X11 and USE_IMAKE
 	if ($tmp =~ /\nUSE_IMAKE[?+]?=/
 	 && $tmp =~ /\n(USE_X11)[?+]?=/) {
 		&perror("WARN", $file, -1, "since you already have USE_IMAKE, ".
 			"you don't need $1.");
 	}
+	
 	# check USE_X11 and USE_IMAKE
 	if ($newxdef && $tmp =~ /\nUSE_IMAKE[?+]?=/
 	 && $tmp =~ /\n(USE_X_PREFIX)[?+]?=/) {


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906200646.n5K6krBo021231>