ports/62330: [patch] bsd.port.mk: fix using both OPTIONS and USE_SSL etc.

Sergey Matveychuk sem at ciam.ru
Wed Feb 4 04:10:43 UTC 2004


>Number:         62330
>Category:       ports
>Synopsis:       [patch] bsd.port.mk: fix using both OPTIONS and USE_SSL etc.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 03 19:40:14 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Sergey Matveychuk
>Release:        FreeBSD 5.2-RELEASE i386
>Organization:
>Environment:
System: FreeBSD Current.sem-home.ciam.ru 5.2-RELEASE FreeBSD 5.2-RELEASE #6: Sat Jan 17 16:12:04 MSK 2004 root at Current.sem-home.ciam.ru:/usr/obj/usr/src/sys/CURRENT i386


	
>Description:
	
	The problem is: we can't to use USE_SSL, USE_PYTHON etc. _after_
	bsd.port.pre.mk as required for OPTIONS.

	The idea is to separate OPTIONS stuff from bsd.port.pre.mk in
	bsd.options.mk.

	So we can use:

	OPTIONS=...
	.include </usr/ports/Mk/bsd.options.mk>

	.if defined(WITH_SSL)
	USE_SSL=yes
	.endif

	.include <bsd.port.pre.mk>
	...

	We can't use ${PORTSDIR} in first .include :(

	Any comments?
>How-To-Repeat:
	
>Fix:

	

--- bsd.port.mk.patch begins here ---
--- bsd.port.mk.local	Wed Feb  4 04:34:38 2004
+++ bsd.port.mk	Wed Feb  4 06:14:17 2004
@@ -1021,16 +1021,8 @@
 USE_SUBMAKE=	yes
 .endif
 
-# where 'make config' records user configuration options
-PORT_DBDIR?=	/var/db/ports
-
-UNIQUENAME?=${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
-OPTIONSFILE?=${PORT_DBDIR}/${UNIQUENAME}/options
-.if exists(${OPTIONSFILE})
-.include "${OPTIONSFILE}"
-.endif
-.if exists(${OPTIONSFILE}.local)
-.include "${OPTIONSFILE}.local"
+.if defined(OPTIONS) && !defined(OPTIONS_Included)
+.include <${PORTSDIR}/Mk/bsd.options.mk>
 .endif
 
 # check for old, crufty, makefile types, part 1:
--- bsd.port.mk.patch ends here ---

--- bsd.options.mk begins here ---
# -*- mode: Makefile; tab-width: 4; -*-
# ex: ts=4
#
# $FreeBSD: $

.if !defined(OPTIONS_Included)

OPTIONS_Included=	bsd.options.mk

# where 'make config' records user configuration options
PORT_DBDIR?=	/var/db/ports

UNIQUENAME?=${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
OPTIONSFILE?=${PORT_DBDIR}/${UNIQUENAME}/options
.if exists(${OPTIONSFILE})
.include "${OPTIONSFILE}"
.endif
.if exists(${OPTIONSFILE}.local)
.include "${OPTIONSFILE}.local"
.endif

.endif
--- bsd.options.mk ends here ---


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



More information about the freebsd-ports-bugs mailing list