Bug 162754 - [patch] Remove some redundancy in OPTIONS handling
Summary: [patch] Remove some redundancy in OPTIONS handling
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Wesley Shields
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-22 15:40 UTC by Matthew Seaman
Modified: 2011-12-25 19:40 UTC (History)
1 user (show)

See Also:


Attachments
fpc-units.diff (785 bytes, patch)
2011-11-22 15:40 UTC, Matthew Seaman
no flags Details | Diff
nedi.diff (841 bytes, patch)
2011-11-22 15:40 UTC, Matthew Seaman
no flags Details | Diff
pear-Crypt_RSA.diff (850 bytes, patch)
2011-11-22 15:40 UTC, Matthew Seaman
no flags Details | Diff
php5-extensions.diff (704 bytes, patch)
2011-11-22 15:40 UTC, Matthew Seaman
no flags Details | Diff
squirrelmail-shared_calendars-plugin.diff (744 bytes, patch)
2011-11-22 15:40 UTC, Matthew Seaman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Seaman 2011-11-22 15:40:00 UTC
As discussed in the thread starting with this message:

http://lists.freebsd.org/pipermail/freebsd-ports/2011-November/071511.html

a number of ports are redefining PORT_DBDIR already defined with the
same value in bsd.port.mk

Affected ports are:

% grep -rl '/var/db/ports' .
./sysutils/thefish/Makefile
./lang/php52-extensions/Makefile
./lang/php5-extensions/Makefile
./lang/fpc-units/Makefile
./lang/php4-extensions/Makefile
./devel/mico/Makefile
./net-mgmt/netustad/Makefile
./net-mgmt/nedi/Makefile
./mail/squirrelmail-shared_calendars-plugin/Makefile
./security/pear-Crypt_RSA/Makefile
./Mk/bsd.port.mk    ---- where this should be defined
./UPDATING          ---- innocent bystander
./ports-mgmt/portmanager/files/patch-libMGPM__src__MGPMrUpdate.c ---- ditto

The attached patches fix the observed redundancy and bring those ports
into line with using OPTIONS in the standard ports way.

portlint has been petted only to the extent that any errors have been
suppressed.

After applying these patches, there are no more hits to the following
commands in any port Makefiles:

% grep -rl '${PORT_DBDIR}/${LATEST_LINK}/options' .
% grep -rl '\.include.*OPTIONSFILE' .

PR generated at request of wxs@...  Maintainers have been CC'd

Fix: Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/mico/Makefile,v
retrieving revision 1.104
diff -u -u -r1.104 Makefile
--- Makefile	23 Sep 2011 22:22:09 -0000	1.104
+++ Makefile	22 Nov 2011 14:34:32 -0000
@@ -32,17 +32,7 @@
 		GTK "Build with GTK support" off \
 		DEBUG "Build debug version" off
 
-# need for OPTIONS work
-PORT_DBDIR?=	/var/db/ports
-
-OPTIONSFILE?=	${PORT_DBDIR}/${PORTNAME}/options
-.if exists(${OPTIONSFILE}) && !make(rmconfig)
-.include "${OPTIONSFILE}"
-.endif
-.if exists(${OPTIONSFILE}.local)
-.include "${OPTIONSFILE}.local"
-.endif
-# ================
+.include <bsd.port.options.mk>
 
 NOT_FOR_ARCHS=		sparc64
 
--- mico.diff ends here ---

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/net-mgmt/netustad/Makefile,v
retrieving revision 1.12
diff -u -u -r1.12 Makefile
--- Makefile	31 May 2010 02:00:33 -0000	1.12
+++ Makefile	22 Nov 2011 14:36:17 -0000
@@ -22,13 +22,9 @@
 GNU_CONFIGURE=	yes
 OPTIONS=	SSL "Use netUstad with SSL support" on
 
-PORT_DBDIR?=	/var/db/ports
 LATEST_LINK=	${PORTNAME}${PKGNAMESUFFIX}
-OPTIONSFILE?=	${PORT_DBDIR}/${LATEST_LINK}/options
 
-.if exists(${OPTIONSFILE})
-.include "${OPTIONSFILE}"
-.endif
+.include <bsd.port.options.mk>
 
 .if !defined(WITHOUT_SSL)
 USE_OPENSSL=	yes
--- netustad.diff ends here ---

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/lang/php4-extensions/Makefile,v
retrieving revision 1.12
diff -u -u -r1.12 Makefile
--- Makefile	15 Jun 2009 09:21:34 -0000	1.12
+++ Makefile	22 Nov 2011 14:30:11 -0000
@@ -94,13 +94,9 @@
 		ZIP             "ZIP support" off \
 		ZLIB            "ZLIB support" on
 
-PORT_DBDIR?=	/var/db/ports
 LATEST_LINK=	${PORTNAME}${PKGNAMESUFFIX}
-OPTIONSFILE?=	${PORT_DBDIR}/${LATEST_LINK}/options
 
-.if exists(${OPTIONSFILE})
-.include "${OPTIONSFILE}"
-.endif
+.include <bsd.port.options.mk>
 
 ALL_OPTIONS=	BCMATH BZ2 CALENDAR CRACK CTYPE CURL DBA DBASE DBX DIO \
 		DOMXML EXIF FILEINFO FILEPRO FRIBIDI FTP GD GETTEXT \
--- php4-extensions.diff ends here ---

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/lang/php52-extensions/Makefile,v
retrieving revision 1.2
diff -u -u -r1.2 Makefile
--- Makefile	12 Sep 2010 03:44:43 -0000	1.2
+++ Makefile	22 Nov 2011 14:24:07 -0000
@@ -109,13 +109,9 @@
 		ZIP             "ZIP support" off \
 		ZLIB            "ZLIB support" off
 
-PORT_DBDIR?=	/var/db/ports
 LATEST_LINK=	${PORTNAME}${PKGNAMESUFFIX}
-OPTIONSFILE?=	${PORT_DBDIR}/${LATEST_LINK}/options
 
-.if exists(${OPTIONSFILE})
-.include "${OPTIONSFILE}"
-.endif
+.include <bsd.port.options.mk>
 
 ALL_OPTIONS=	BCMATH BZ2 CALENDAR CTYPE CURL DBA DBASE \
 		DOM EXIF FILEINFO FILTER FRIBIDI FTP GD GETTEXT \
--- php52-extensions.diff ends here ---
Comment 1 Wesley Shields freebsd_committer freebsd_triage 2011-11-22 15:48:14 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wxs

I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162754 

Date: Wed, 23 Nov 2011 10:22:39 +0100
Comment 2 dfilter service freebsd_committer freebsd_triage 2011-11-23 13:17:45 UTC
ale         2011-11-23 13:17:31 UTC

  FreeBSD ports repository

  Modified files:
    lang/php4-extensions Makefile 
    lang/php5-extensions Makefile 
  Log:
  Convert to use bsd.port.options.mk makefile.
  
  PR:             ports/162754
  Submitted by:   Matthew Seaman <m.seaman@infracaninophile.co.uk>
  Feature safe:   yes
  
  Revision  Changes    Path
  1.13      +6 -11     ports/lang/php4-extensions/Makefile
  1.23      +6 -11     ports/lang/php5-extensions/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 dfilter service freebsd_committer freebsd_triage 2011-12-25 19:23:13 UTC
wxs         2011-12-25 19:22:59 UTC

  FreeBSD ports repository

  Modified files:
    lang/fpc-units       Makefile 
  Log:
  Switch to using bsd.port.options.mk and cleanup unnecessary assignments.
  
  PR:             ports/162754
  Submitted by:   Matthew Seaman <m.seaman@infracaninophile.co.uk>
  Approved by:    acm@ (maintainer timeout)
  
  Revision  Changes    Path
  1.26      +1 -5      ports/lang/fpc-units/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 dfilter service freebsd_committer freebsd_triage 2011-12-25 19:25:25 UTC
wxs         2011-12-25 19:25:13 UTC

  FreeBSD ports repository

  Modified files:
    devel/mico           Makefile 
  Log:
  Switch to using bsd.port.options.mk and cleanup unnecessary assignments.
  
  PR:             ports/162754
  Submitted by:   Matthew Seaman <m.seaman@infracaninophile.co.uk>
  
  Revision  Changes    Path
  1.105     +1 -11     ports/devel/mico/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 dfilter service freebsd_committer freebsd_triage 2011-12-25 19:28:14 UTC
wxs         2011-12-25 19:28:06 UTC

  FreeBSD ports repository

  Modified files:
    net-mgmt/nedi        Makefile 
  Log:
  Switch to using bsd.port.options.mk and remove unnecessary assignments.
  
  While here, don't use 'find | xargs rm', when 'find -delete' will do.
  
  PR:             ports/162754
  Submitted by:   Matthew Seaman <m.seaman@infracaninophile.co.uk>
  
  Revision  Changes    Path
  1.7       +2 -10     ports/net-mgmt/nedi/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 dfilter service freebsd_committer freebsd_triage 2011-12-25 19:30:31 UTC
wxs         2011-12-25 19:30:17 UTC

  FreeBSD ports repository

  Modified files:
    net-mgmt/netustad    Makefile 
  Log:
  Switch to using bsd.port.options.mk and remove unnecessary assignments.
  
  PR:             ports/162754
  Submitted by:   Matthew Seaman <m.seaman@infracaninophile.co.uk>
  
  Revision  Changes    Path
  1.13      +1 -5      ports/net-mgmt/netustad/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 7 dfilter service freebsd_committer freebsd_triage 2011-12-25 19:34:52 UTC
wxs         2011-12-25 19:34:40 UTC

  FreeBSD ports repository

  Modified files:
    security/pear-Crypt_RSA Makefile 
  Log:
  Switch to using bsd.port.options.mk and remove unnecessary assignments.
  
  While here, be explicit with RUN_DEPENDS (pet pet portlint).
  
  PR:             ports/162754
  Submitted by:   Matthew Seaman <m.seaman@infracaninophile.co.uk>
  Approved by:    miwi@ (maintainer timeout)
  
  Revision  Changes    Path
  1.8       +2 -6      ports/security/pear-Crypt_RSA/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 8 dfilter service freebsd_committer freebsd_triage 2011-12-25 19:36:53 UTC
wxs         2011-12-25 19:36:46 UTC

  FreeBSD ports repository

  Modified files:
    mail/squirrelmail-shared_calendars-plugin Makefile 
  Log:
  Switch to using bsd.port.options.mk and remove unnecessary assignments.
  
  PR:             ports/162754
  Submitted by:   Matthew Seaman <m.seaman@infracaninophile.co.uk>
  
  Revision  Changes    Path
  1.4       +1 -5      ports/mail/squirrelmail-shared_calendars-plugin/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 9 Wesley Shields freebsd_committer freebsd_triage 2011-12-25 19:37:19 UTC
State Changed
From-To: open->closed

All of the patches have been committed. Thanks for your work and sorry 
for the delay! ;)