ports/57496: [PATCH] bsd.port.mk: check for USE_* used to late

Oliver Eikemeier eikemeier at fillmore-labs.com
Thu Oct 2 13:50:18 UTC 2003


>Number:         57496
>Category:       ports
>Synopsis:       [PATCH] bsd.port.mk: check for USE_* used to late
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 02 06:50:15 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Oliver Eikemeier
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
Fillmore Labs - http://www.fillmore-labs.com
>Environment:
System: FreeBSD nuuk.fillmore-labs.com 4.8-STABLE

>Description:

Multiple ports are having problems with defining USE_OPENLDAP or USE_OPENSSL
after they included bsd.port.pre.mk, which results in that that directive
being ignored. This patch checks if a USE_* variable is defined too late, and
if it is the port is marked as broken.

More bugs are fixed in PR 56600, and PR 56960 is an improvement, too...

>How-To-Repeat:

The latest one is PR 57491, there are a lot of others. This patch is expected
to break some ports ;-)

>Fix:

--- bsd.port.mk.patch begins here ---
--- bsd.port.mk.orig	3 Sep 2003 19:50:24 -0000
+++ bsd.port.mk	2 Oct 2003 13:41:10 -0000
@@ -988,6 +988,10 @@
 SCRIPTDIR?=		${MASTERDIR}/scripts
 PKGDIR?=		${MASTERDIR}
 
+_PRE_MAKE_DEFINES=	EMACS_PORT_NAME USE_GNUSTEP USE_IMAKE USE_JAVA USE_KDEBASE_VER USE_KDELIBS_VER \
+			USE_LIBRUBY USE_LINUX_PREFIX USE_OPENLDAP USE_OPENLDAP_VER USE_OPENSSL \
+			USE_PYTHON USE_QT USE_QT2 USE_QT_VER USE_RUBY USE_X_PREFIX
+
 .if defined(USE_IMAKE) && !defined(USE_X_PREFIX)
 USE_X_PREFIX=	yes
 .endif
@@ -1082,6 +1086,12 @@
 # Location of mounted CDROM(s) to search for files
 CD_MOUNTPTS?=	/cdrom ${CD_MOUNTPT}
 
+.for var in ${_PRE_MAKE_DEFINES}
+.ifndef ${var}
+_PRE_MAKE_UNDEFINED+=	${var}
+.endif
+.endfor
+
 .endif
 # End of pre-makefile section.
 
@@ -1095,6 +1105,12 @@
 .endif
 
 _POSTMKINCLUDED=	yes
+
+.for var in ${_PRE_MAKE_UNDEFINED}
+.ifdef ${var}
+BROKEN=			"${var} defined after including bsd.port.pre.mk"
+.endif
+.endfor
 
 WRKDIR?=		${WRKDIRPREFIX}${.CURDIR}/work
 .if defined(NO_WRKSUBDIR)
--- bsd.port.mk.patch ends here ---

bsd.gnome.mk (no patch provided) should include

_PRE_MAKE_DEFINES+=	USE_GNOME USE_GTK

they belong there because this is the place where they are tested.



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



More information about the freebsd-ports-bugs mailing list