ports/89498: [PATCH] Fix FAM support in bsd.port.mk; make gamin default

Joe Marcus Clarke marcus at FreeBSD.org
Thu Nov 24 18:20:30 UTC 2005


>Number:         89498
>Category:       ports
>Synopsis:       [PATCH] Fix FAM support in bsd.port.mk; make gamin default
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 24 18:20:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Joe Marcus Clarke
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD shumai.marcuscom.com 6.0-STABLE FreeBSD 6.0-STABLE #19: Sun Nov 20 20:23:35 EST 2005 marcus at shumai.marcuscom.com:/usr/obj/usr/src/sys/SHUMAI i386


	
>Description:
I did a stupid thing with my initial pass at FAM support.  I exposed
WANT_FAM_SYSTEM to users when it is clearly only meant for porters.
This patch corrects that problem by using WITH_FAM_SYSTEM as a user
tunable.  It also (finally) makes gamin the default FAM system.
>How-To-Repeat:
	
>Fix:

	

--- bsd.port.mk.diff begins here ---
--- bsd.port.mk.orig	Thu Nov 24 13:12:26 2005
+++ bsd.port.mk	Thu Nov 24 13:11:48 2005
@@ -373,7 +373,7 @@ FreeBSD_MAINTAINER=	portmgr at FreeBSD.org
 # USE_FAM		- If set, this port uses the File Alteration Monitor.
 #
 # WANT_FAM_SYSTEM
-# 				- Legal values are: fam (default), gamin
+# 				- Legal values are: gamin (default),fam
 # 				  If set to an unknown value, the port is marked BROKEN.
 ##
 # USE_AUTOTOOLS	- If set, this port uses various GNU autotools
@@ -1377,8 +1377,6 @@ CD_MOUNTPTS?=	/cdrom ${CD_MOUNTPT}
 
 WANT_OPENLDAP_VER?=	22
 
-WANT_FAM_SYSTEM?=	fam
-
 # Owner and group of the WWW user
 WWWOWN?=	www
 WWWGRP?=	www
@@ -1495,14 +1493,28 @@ BROKEN=				"unknown OpenLDAP version: ${
 .endif
 
 .if defined(USE_FAM)
-.if ${WANT_FAM_SYSTEM} == fam
-LIB_DEPENDS+=	fam.0:${PORTSDIR}/devel/fam
-.elif ${WANT_FAM_SYSTEM} == gamin
-LIB_DEPENDS+=	fam.0:${PORTSDIR}/devel/gamin
-.else
-BROKEN=			"unknown FAM system: ${WANT_FAM_SYSTEM}"
+DEFAULT_FAM_SYSTEM=	gamin
+# Currently supported FAM systems
+FAM_SYSTEM_FAM=		fam.0:${PORTSDIR}/devel/fam
+FAM_SYSTEM_GAMIN=	fam.0:${PORTSDIR}/devel/gamin
+
+.if defined(WANT_FAM_SYSTEM)
+.if defined(WITH_FAM_SYSTEM) && ${WITH_FAM_SYSTEM}!=${WANT_FAM_SYSTEM}
+BROKEN=	"The port wants to use ${WANT_FAM_SYSTEM} as its FAM system and you wish to use ${WITH_FAM_SYSTEM}"
 .endif
+FAM_SYSTEM=	${WANT_FAM_SYSTEM}
+.elif defined(WITH_FAM_SYSTEM)
+FAM_SYSTEM=	${WITH_FAM_SYSTEM}
+.else
+FAM_SYSTEM=	${DEFAULT_FAM_SYSTEM}
+.endif # WANT_FAM_SYSTEM
+
+.if defined(FAM_SYSTEM_${FAM_SYSTEM:U})
+LIB_DEPENDS+=	${FAM_SYSTEM_${FAM_SYSTEM:U}}
+.else
+BROKEN=			"unknown FAM system: ${FAM_SYSTEM}"
 .endif
+.endif # USE_FAM
 
 .if defined(USE_GETOPT_LONG)
 .if ${OSVERSION} < 500041
--- bsd.port.mk.diff ends here ---


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



More information about the freebsd-ports-bugs mailing list