Date: Sat, 5 Jul 2008 04:05:32 +0800 (CST) From: Yi-Jheng Lin <yzlin@cs.nctu.edu.tw> To: FreeBSD-gnats-submit@FreeBSD.org Cc: ale@FreeBSD.org Subject: ports/125273: [PATCH] ports-mgmt/portconf: new feature "Undefine variables" Message-ID: <200807042005.m64K5Wcq068184@stucgi.cs.nctu.edu.tw> Resent-Message-ID: <200807042020.m64KK4a0008079@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 125273 >Category: ports >Synopsis: [PATCH] ports-mgmt/portconf: new feature "Undefine variables" >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: Fri Jul 04 20:20:04 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Yi-Jheng Lin >Release: FreeBSD 7.0-RELEASE-p1 amd64 >Organization: NCTU CS >Environment: System: FreeBSD stucgi 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #0: Thu Apr 17 15:56:39 CST 2008 >Description: Add a new feature "Undefine variables", which could undefine a variable by adding a symbol '!' before variables. The following is an example. ports.conf: *: WITHOUT_X11=yes graphics/cairo: !WITHOUT_X11 In this setting, every port will install with WITHOUT_X11. But, when we install graphics/cairo, WITHOUT_X11 will be undefined. This could solve the problem when compiling x11-toolkits/gtk20 (via textproc/wv) with graphics/cairo installed with WITHOUT_X11. We'll get the error message: gdkdrawable-x11.c:32:24: cairo-xlib.h: No such file or directory This feature is useful when we want to define a variable for most ports but not every. Port maintainer (ale@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- portconf-1.4.patch begins here --- diff -ruN --exclude=CVS /usr/ports/ports-mgmt/portconf/Makefile /amd/account/gcs/96/9655630/dev/ports/ports-mgmt/portconf/Makefile --- /usr/ports/ports-mgmt/portconf/Makefile 2007-10-03 00:50:07.000000000 +0800 +++ /amd/account/gcs/96/9655630/dev/ports/ports-mgmt/portconf/Makefile 2008-07-05 03:04:02.000000000 +0800 @@ -8,7 +8,7 @@ # PORTNAME= portconf -PORTVERSION= 1.3 +PORTVERSION= 1.4 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none diff -ruN --exclude=CVS /usr/ports/ports-mgmt/portconf/files/portconf.sh.in /amd/account/gcs/96/9655630/dev/ports/ports-mgmt/portconf/files/portconf.sh.in --- /usr/ports/ports-mgmt/portconf/files/portconf.sh.in 2007-09-24 03:26:33.000000000 +0800 +++ /amd/account/gcs/96/9655630/dev/ports/ports-mgmt/portconf/files/portconf.sh.in 2008-07-05 02:43:31.000000000 +0800 @@ -36,7 +36,7 @@ sed '/^#/d;/^[[:space:]]*$/d' "${_conf}" | while read _line; do for _port in ${_line%%:*}; do if [ "${_pwd%%${_port}}" != "${_pwd}" ]; then - echo ${_line#*:} | sed -E 's/([A-Z0-9_]+)(=([^|]+))?/\1=\3/g;s/ *\| */|/g;s/ /%/g' + echo ${_line#*:} | sed -E 's/(!?[A-Z0-9_]+)(=([^|]+))?/\1=\3/g;s/ *\| */|/g;s/ /%/g' fi done done diff -ruN --exclude=CVS /usr/ports/ports-mgmt/portconf/pkg-install /amd/account/gcs/96/9655630/dev/ports/ports-mgmt/portconf/pkg-install --- /usr/ports/ports-mgmt/portconf/pkg-install 2007-06-23 03:11:03.000000000 +0800 +++ /amd/account/gcs/96/9655630/dev/ports/ports-mgmt/portconf/pkg-install 2008-07-05 02:45:36.000000000 +0800 @@ -11,6 +11,7 @@ .if !empty(.CURDIR:M${PORTS_DIR}*) && exists(${PKG_PREFIX}/libexec/portconf) _PORTCONF!=${PKG_PREFIX}/libexec/portconf .for i in \${_PORTCONF:S/|/ /g} +\${i:C/!([A-Z0-9_]+)(=([^ ]+)?)?/.undef \1/g} \${i:S/%/ /g} .endfor .endif --- portconf-1.4.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807042005.m64K5Wcq068184>