aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2006-09-06 20:50:31 +0800
committerale <ale@FreeBSD.org>2006-09-06 20:50:31 +0800
commit98ddcc57fb24323864cf02762780cc68f2d93f9e (patch)
tree51eb5644245c066e124b13f0fdd9855180353991 /sysutils
parent60832f68df5f8361d923a7f431df4e5ae804edcb (diff)
downloadfreebsd-ports-gnome-98ddcc57fb24323864cf02762780cc68f2d93f9e.tar.gz
freebsd-ports-gnome-98ddcc57fb24323864cf02762780cc68f2d93f9e.tar.zst
freebsd-ports-gnome-98ddcc57fb24323864cf02762780cc68f2d93f9e.zip
Add explicit support for comments and empty lines in ports.conf.
PR: ports/102914 Submitted by: Hans Lambermont <hans@lambermont.dyndns.org>
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/portconf/Makefile2
-rw-r--r--sysutils/portconf/files/pkg-message.in2
-rw-r--r--sysutils/portconf/files/portconf.sh.in5
3 files changed, 4 insertions, 5 deletions
diff --git a/sysutils/portconf/Makefile b/sysutils/portconf/Makefile
index 7fe720d2cff9..2ef7a2244422 100644
--- a/sysutils/portconf/Makefile
+++ b/sysutils/portconf/Makefile
@@ -8,7 +8,7 @@
#
PORTNAME= portconf
-PORTVERSION= 1.1
+PORTVERSION= 1.2
CATEGORIES= sysutils
MASTER_SITES= # none
DISTFILES= # none
diff --git a/sysutils/portconf/files/pkg-message.in b/sysutils/portconf/files/pkg-message.in
index 3858fba21893..859391f9f049 100644
--- a/sysutils/portconf/files/pkg-message.in
+++ b/sysutils/portconf/files/pkg-message.in
@@ -5,6 +5,7 @@ To set port-specific make variables, create the
with the following syntax:
---------------------------------------------------------
+# this is a comment
editors/openoffice*: WITH_CCACHE|LOCALIZED_LANG=it
www/firefox-i18n: WITHOUT_SWITCHER | FIREFOX_I18N=fr it
x11/fakeport: CONFIGURE_ARGS=--with-modules="aaa bbb ccc"
@@ -13,5 +14,6 @@ x11/fakeport: CONFIGURE_ARGS=--with-modules="aaa bbb ccc"
Global port directory patterns and blanks around the
pipe "|" symbol are allowed.
Values shouldn't be quoted even if they contain spaces.
+Lines beginning with a '#' are comments.
*********************************************************
diff --git a/sysutils/portconf/files/portconf.sh.in b/sysutils/portconf/files/portconf.sh.in
index 7f71512b76d2..7ac900d3c823 100644
--- a/sysutils/portconf/files/portconf.sh.in
+++ b/sysutils/portconf/files/portconf.sh.in
@@ -33,10 +33,7 @@ if [ ! -r "${_conf}" ]; then
exit
fi
_pwd=`pwd`
-cat "${_conf}" | while read _line; do
- if [ -z "${_line}" ]; then
- continue
- fi
+sed '/^#/d;/^[[:space:]]*$/d' "${_conf}" | while read _line; do
_port=${_line%%:*}
if [ "${_pwd%%${_port}}" != "${_pwd}" ]; then
echo ${_line#*:} | sed -E 's/([A-Z0-9_]+)(=([^|]+))?/\1=\3/g;s/ *\| */|/g;s/ /%/g'