pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/shells/zsh shells/zsh: Improve completions of pkg_* on...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2253966a7ea4
branches:  trunk
changeset: 374294:2253966a7ea4
user:      pho <pho%pkgsrc.org@localhost>
date:      Fri Feb 18 09:48:44 2022 +0000

description:
shells/zsh: Improve completions of pkg_* on Darwin

diffstat:

 shells/zsh/Makefile                                        |   4 +-
 shells/zsh/distinfo                                        |   4 +-
 shells/zsh/patches/patch-Completion_BSD_Command___bsd__pkg |  54 +++++++++++--
 3 files changed, 47 insertions(+), 15 deletions(-)

diffs (97 lines):

diff -r 597a546521c8 -r 2253966a7ea4 shells/zsh/Makefile
--- a/shells/zsh/Makefile       Fri Feb 18 09:16:42 2022 +0000
+++ b/shells/zsh/Makefile       Fri Feb 18 09:48:44 2022 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.100 2021/11/23 19:42:43 pho Exp $
+# $NetBSD: Makefile,v 1.101 2022/02/18 09:48:44 pho Exp $
 
 DISTNAME=      zsh-5.8
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    shells
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=zsh/}
 EXTRACT_SUFX=  .tar.xz
diff -r 597a546521c8 -r 2253966a7ea4 shells/zsh/distinfo
--- a/shells/zsh/distinfo       Fri Feb 18 09:16:42 2022 +0000
+++ b/shells/zsh/distinfo       Fri Feb 18 09:48:44 2022 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.74 2021/11/23 19:42:43 pho Exp $
+$NetBSD: distinfo,v 1.75 2022/02/18 09:48:44 pho Exp $
 
 BLAKE2s (zsh-5.8.tar.xz) = 3f0edcbb7b47f43f04cd373e98257702a1cfdc4efddcec12172cc1a34ac3b3da
 SHA512 (zsh-5.8.tar.xz) = 96198ecef498b7d7945fecebbe6bf14065fa8c5d81a7662164579eba8206b79575812d292adea1864bc7487ac0818ba900e25f9ab3802449340de80417c2c533
 Size (zsh-5.8.tar.xz) = 3193284 bytes
-SHA1 (patch-Completion_BSD_Command___bsd__pkg) = 1f9e9e896d0424c13b7d01a3d9b7af0a5fcad363
+SHA1 (patch-Completion_BSD_Command___bsd__pkg) = c15924342b827b0ee490ac01a89fe06d439fef0f
 SHA1 (patch-Completion_Unix_Command___gpg) = 226b6025e646f8c74e7e648f33a1001310c9ce3e
 SHA1 (patch-Config_installfns.sh) = ef0b250a0121c0e4925022e02553aefa23e6cc8d
 SHA1 (patch-aczsh.m4) = 36c270d8d7cf727f48787ef889b2bd89cbf065e2
diff -r 597a546521c8 -r 2253966a7ea4 shells/zsh/patches/patch-Completion_BSD_Command___bsd__pkg
--- a/shells/zsh/patches/patch-Completion_BSD_Command___bsd__pkg        Fri Feb 18 09:16:42 2022 +0000
+++ b/shells/zsh/patches/patch-Completion_BSD_Command___bsd__pkg        Fri Feb 18 09:48:44 2022 +0000
@@ -1,22 +1,54 @@
-$NetBSD: patch-Completion_BSD_Command___bsd__pkg,v 1.2 2020/12/25 21:47:47 ryoon Exp $
+$NetBSD: patch-Completion_BSD_Command___bsd__pkg,v 1.3 2022/02/18 09:48:44 pho Exp $
 
-* Use new pkgsrc database directory for NetBSD.
+* Better Darwin support.
+* Use pkgsrc PKG_DBDIR as the default database directory.
 
 --- Completion/BSD/Command/_bsd_pkg.orig       2019-05-06 03:42:37.000000000 +0000
 +++ Completion/BSD/Command/_bsd_pkg
-@@ -31,7 +31,14 @@ _bsd_pkg_pkgfiles() {
+@@ -15,6 +15,10 @@ _bsd_pkg_pkgfiles() {
+     pkgsdir=${${(M)${(f)"$(</etc/mk.conf)"}:#PACKAGE_REPOSITORY*}#*=[[:blank:]]#}
+     pkgsdir=${${pkgsdir:-$PACKAGE_REPOSITORY}:-$portsdir/packages/}/$(make -V MACHINE_ARCH)/All
+     ;;
++  darwin*)
++    portsdir=/opt/pkgsrc
++    pkgsdir=${PACKAGES:-$portsdir/packages}/All
++    ;;
+   *)
+     portsdir=${PORTSDIR:-/usr/ports}
+     pkgsdir=${PACKAGES:-$portsdir/packages}/All
+@@ -31,7 +35,7 @@ _bsd_pkg_pkgfiles() {
  
  (( $+functions[_bsd_pkg_pkgs] )) ||
  _bsd_pkg_pkgs() {
 -  compadd "$@" - ${PKG_DBDIR:-/var/db/pkg}/*(/:t)
-+  case $OSTYPE in
-+  netbsd*)
-+    compadd "$@" - ${PKG_DBDIR:-@PKG_DBDIR@}/*(/:t)
-+    ;;
-+  *)
-+    compadd "$@" - ${PKG_DBDIR:-/var/db/pkg}/*(/:t)
-+    ;;
-+  esac
++  compadd "$@" - ${PKG_DBDIR:-@PKG_DBDIR@}/*(/:t)
  }
  
  (( $+functions[_bsd_pkg_pkgs_and_files] )) ||
+@@ -58,7 +62,7 @@ _bsd_pkg() {
+     )
+ 
+     case "$OSTYPE" in
+-    netbsd*)
++    netbsd*|darwin*)
+       flags+=(
+         '-A[do not record packages as installed manually]'
+         '-C[specify configuration file]:config file:_files'
+@@ -141,7 +145,7 @@ _bsd_pkg() {
+     )
+ 
+     case "$OSTYPE" in
+-    netbsd*)
++    netbsd*|darwin*)
+       flags+=(
+         '(:)-a[delete all installed packages]'
+         "-D[don't execute deinstallation scripts]"
+@@ -202,7 +206,7 @@ _bsd_pkg() {
+     )
+ 
+     case "$OSTYPE" in
+-    netbsd*)
++    netbsd*|darwin*)
+       flags+=(
+         '-B[show build information]'
+         '-b[show RCS Id strings]'



Home | Main Index | Thread Index | Old Index