diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2012-10-16 11:00:00 +0800 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2012-10-16 11:00:00 +0800 |
commit | ff87a0db2a59d547c0306af36be2037b6c0427c7 (patch) | |
tree | b524d0d9de5684e42c6f4a7308f689cf96067193 /ports-mgmt | |
parent | 97028e367c95803c8857a4fe7740510e345d681f (diff) | |
download | freebsd-ports-gnome-ff87a0db2a59d547c0306af36be2037b6c0427c7.tar.gz freebsd-ports-gnome-ff87a0db2a59d547c0306af36be2037b6c0427c7.tar.zst freebsd-ports-gnome-ff87a0db2a59d547c0306af36be2037b6c0427c7.zip |
- Update ZSH completions with pkgng support [1]
- Enable the PKGNG patch by default if WITH_PKGNG
is defined.
Submitted by: ume [1]
Feature safe: yes
Diffstat (limited to 'ports-mgmt')
-rw-r--r-- | ports-mgmt/portmaster/Makefile | 8 | ||||
-rw-r--r-- | ports-mgmt/portmaster/files/extra-patch-files::zsh-completions | 30 |
2 files changed, 37 insertions, 1 deletions
diff --git a/ports-mgmt/portmaster/Makefile b/ports-mgmt/portmaster/Makefile index 40beee04888d..67524fa89eb3 100644 --- a/ports-mgmt/portmaster/Makefile +++ b/ports-mgmt/portmaster/Makefile @@ -2,7 +2,7 @@ PORTNAME= portmaster PORTVERSION= 3.14 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= ports-mgmt MASTER_SITES= GH \ http://mirror.shatow.net/freebsd/portmaster/ @@ -19,6 +19,9 @@ GH_COMMIT= 31009f6 GH_TAGNAME= ${GH_COMMIT} OPTIONS_DEFINE= BASH ZSH PKGNGPATCH +.if defined(WITH_PKGNG) +OPTIONS_DEFAULT+= PKGNGPATCH +.endif BASH_DESC= Install programmable completions for Bash ZSH_DESC= Install programmable completions for zsh PKGNGPATCH_DESC=Enable PKGNG support @@ -33,6 +36,9 @@ MAN8= portmaster.8 RUN_DEPENDS+= pkg>0:${PORTSDIR}/ports-mgmt/pkg PATCH_SITES+= http://mirror.shatow.net/freebsd/portmaster/ PATCHFILES+= patch-portmaster-pkgng.gz +. if ${PORT_OPTIONS:MZSH} +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-files::zsh-completions +. endif .endif .if ${PORT_OPTIONS:MBASH} diff --git a/ports-mgmt/portmaster/files/extra-patch-files::zsh-completions b/ports-mgmt/portmaster/files/extra-patch-files::zsh-completions new file mode 100644 index 000000000000..49051fe3dcdb --- /dev/null +++ b/ports-mgmt/portmaster/files/extra-patch-files::zsh-completions @@ -0,0 +1,30 @@ +Index: files/zsh-completions +diff -u files/zsh-completions.orig files/zsh-completions +--- files/zsh-completions.orig 2012-10-10 21:46:28.000000000 +0900 ++++ files/zsh-completions 2012-10-16 01:37:31.000000000 +0900 +@@ -61,7 +61,11 @@ + + case "$state" in + pkgs) +- array=("${PKG_DBDIR:-/var/db/pkg}"/*(/:t)) ++ if [ -n "$(make -V WITH_PKGNG)" ]; then ++ array=($(pkg info -aq)) ++ else ++ array=("${PKG_DBDIR:-/var/db/pkg}"/*(/:t)) ++ fi + _describe -t packages "installed ports" array + ;; + ports) +@@ -71,7 +75,11 @@ + _tags packages ports + while _tags; do + if _requested packages; then +- array=("${PKG_DBDIR:-/var/db/pkg}"/*(/:t)) ++ if [ -n "$(make -V WITH_PKGNG)" ]; then ++ array=($(pkg info -aq)) ++ else ++ array=("${PKG_DBDIR:-/var/db/pkg}"/*(/:t)) ++ fi + _describe -t packages "installed ports" array && ret=0 + fi + if _requested ports; then |