From sem@ciam.ru  Tue Feb  3 19:31:50 2004
Return-Path: <sem@ciam.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D752016A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  3 Feb 2004 19:31:50 -0800 (PST)
Received: from hueymiccailhuitl.mtu.ru (hueytecuilhuitl.mtu.ru [195.34.32.123])
	by mx1.FreeBSD.org (Postfix) with ESMTP id BA66543D1F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  3 Feb 2004 19:31:47 -0800 (PST)
	(envelope-from sem@ciam.ru)
Received: from Current.sem-home.ciam.ru (ppp132-240.dialup.mtu-net.ru [62.118.132.240])
	by hueymiccailhuitl.mtu.ru (Postfix) with ESMTP id 10FD7F8159
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  4 Feb 2004 06:31:46 +0300 (MSK)
	(envelope-from sem@ciam.ru)
Received: from root by Current.sem-home.ciam.ru with local (Exim 4.30; FreeBSD)
	id 1AoDlV-0004ji-Ux
	for FreeBSD-gnats-submit@freebsd.org; Wed, 04 Feb 2004 06:31:49 +0300
Message-Id: <E1AoDlV-0004ji-Ux@Current.sem-home.ciam.ru>
Date: Wed, 04 Feb 2004 06:31:49 +0300
From: Sergey Matveychuk <sem@ciam.ru>
Reply-To: Sergey Matveychuk <sem@ciam.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] bsd.port.mk: fix using both OPTIONS and USE_SSL etc.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>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:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 03 19:40:14 PST 2004
>Closed-Date:    Sat Jun 26 01:55:01 GMT 2004
>Last-Modified:  Sat Jun 26 01:55:01 GMT 2004
>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@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:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: erwin 
Responsible-Changed-When: Wed Feb 4 00:59:24 PST 2004 
Responsible-Changed-Why:  
portmgr territory 

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

From: Sergey Matveychuk <sem@ciam.ru>
To: freebsd-gnats-submit@FreeBSD.org, sem@ciam.ru
Cc:  
Subject: Re: ports/62330: [patch] bsd.port.mk: fix using both OPTIONS and
 USE_SSL etc.
Date: Wed, 04 Feb 2004 22:01:30 +0300

 > .include </usr/ports/Mk/bsd.options.mk>
 
   
 .include <../../Mk/bsd.options.mk>
 
 -- 
 Sem.

From: Sergey Matveychuk <sem@ciam.ru>
To: Sergey Matveychuk <sem@ciam.ru>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/62330: [patch] bsd.port.mk: fix using both OPTIONS and
 USE_SSL etc.
Date: Wed, 04 Feb 2004 22:51:31 +0300

 Sergey Matveychuk wrote:
 >> .include </usr/ports/Mk/bsd.options.mk>
 > 
 > 
 >   
 > .include <../../Mk/bsd.options.mk>
 > 
 
 Oops. Sorry. I meant: "Better to use".
 I forgot what language I write :)
 
 -- 
 Sem.

From: Sergey Matveychuk <sem@ciam.ru>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/62330: [patch] bsd.port.mk: fix using both OPTIONS and
 USE_SSL etc.
Date: Mon, 07 Jun 2004 09:09:43 +0400

 The better decision should be found.
 So, close it please.
 
 ---
 Sem.
State-Changed-From-To: open->closed 
State-Changed-By: kris 
State-Changed-When: Sat Jun 26 01:30:42 GMT 2004 
State-Changed-Why:  
Superceded by 64233 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62330 
>Unformatted:
