Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Dec 2007 20:26:02 GMT
From:      Phil Pennock <fbsd122007@phil.spodhuis.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/119048: per-port make.port.conf support [fix included]
Message-ID:  <200712262026.lBQKQ2eT036809@www.freebsd.org>
Resent-Message-ID: <200712262030.lBQKU5rr058388@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         119048
>Category:       ports
>Synopsis:       per-port make.port.conf support [fix included]
>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:   Wed Dec 26 20:30:05 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Phil Pennock
>Release:        6.2
>Organization:
n/a
>Environment:
>Description:
At present, the closest that vanilla FreeBSD comes to allowing per-port config is either options named with the port in them (WITH_MUTT_*) or use of the options settings.  There is no support for, eg, setting WITH_RUBY=t by default and then overriding it to undef for a particular port.

For a year now, I've been using a setup to allow use of /etc/make.port.conf which is able to tune make variables per-port; it's stable and solid and would be a useful addition to standard FreeBSD.

Example entries:

.if defined(PORTNAME) && ${PORTNAME} == "avahi"
# Python interface requires py-gtk
.undef WITH_PYTHON
.endif

.if defined(PORTNAME) && ${PORTNAME} == "curl"
CONFIGURE_ARGS+=--with-gssapi=/usr/local
.endif

.if defined(PORTNAME) && ${PORTNAME} == "mysql"
WITH_CHARSET=utf8
WITH_XCHARSET=all
.endif

>How-To-Repeat:
n/a (feature request)
>Fix:
Edit ${PORTSDIR}/Mk/bsd.local.mk and insert at bsd.port.pre.mk inclusion time:

.if exists(/etc/make.port.conf)
.include "/etc/make.port.conf"
.endif

That's all it takes to have an /etc/ config file which can tune variables per-port.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712262026.lBQKQ2eT036809>