On Thu, 16 Jan 2020 at 17:28:49 +0000, Stuart Henderson wrote:
> On 2020/01/16 18:05, Paco Esteban wrote:
> > Hi Edd,
> > 
> > On Thu, 16 Jan 2020, Edd Barrett wrote:
> > 
> > > Hi,
> > > 
> > > This diff packages the necessary support files for for integrating fzf
> > > with shells.
> > > 
> > > With this change, enabling support in (e.g.) zsh is as simple as:
> > > 
> > > ```
> > > export FZF_DEFAULT_OPTS="--ansi"
> > > . /usr/local/share/fzf/shell/key-bindings.zsh
> > > . /usr/local/share/fzf/shell/completion.zsh
> > > ```
> > > 
> > > OK?
> > 
> > On Nov 28, Aaron Bieber sent a patch to update fzf that included
> > something similar, but it was never imported:
> > 
> > https://marc.info/?l=openbsd-ports&m=157496223810600&w=2
> > 
> > I've been using it since with no issues.  You may want to take a look
> > (he did not put the files in the same place).
> > 
> > Cheers,
> > 
> > -- 
> > Paco Esteban.
> > 5818130B8A6DBC03
> > 
> 
> We have standard locations for bash/zsh completion files, not every
> port uses them but the majority do and it would probably make sense to
> do the same here:
> 
> /usr/local/share/bash-completion/completions
> /usr/local/share/zsh/vendor-completions
> 
> There's no equivalent for key-bindings though.
> 

Here is a diff that puts things in the ProperLocation™

I don't use fzf anymore, so it also removes me as the maintainer.

diff --git a/sysutils/fzf/Makefile b/sysutils/fzf/Makefile
index ab4142b5d6b..73e91aef156 100644
--- a/sysutils/fzf/Makefile
+++ b/sysutils/fzf/Makefile
@@ -2,21 +2,19 @@
 
 COMMENT =      command-line fuzzy finder
 
-DISTNAME =     fzf-0.17.5
+DISTNAME =     fzf-0.19.0
 
 CATEGORIES =   sysutils
 
 HOMEPAGE =     https://github.com/junegunn/fzf
 
-MAINTAINER =   Aaron Bieber <[email protected]>
-
 # BSD
 PERMIT_PACKAGE =       Yes
 
 # uses pledge()
 WANTLIB += c pthread
 
-MASTER_SITES = https://deftly.net/
+MASTER_SITES = https://deftly.net/dist/
 
 MODULES =      lang/go
 MODGO_TYPE =   bin
@@ -30,5 +28,12 @@ do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/bin/* ${PREFIX}/bin
        ${INSTALL_MAN_DIR} ${PREFIX}/man/man1
        ${INSTALL_MAN} ${WRKSRC}/man/man1/*.1 ${PREFIX}/man/man1
+       ${INSTALL_DATA_DIR} ${PREFIX}/share/zsh/vendor-completions
+       ${INSTALL_DATA_DIR} ${PREFIX}/share/bash-completion/completions
+       ${INSTALL_DATA} ${WRKSRC}/shell/completion.zsh \
+               ${PREFIX}/share/zsh/vendor-completions/_fzf
+       ${INSTALL_DATA} ${WRKSRC}/shell/completion.bash \
+               ${PREFIX}/share/bash-completion/completions/fzf
+
 
 .include <bsd.port.mk>
diff --git a/sysutils/fzf/distinfo b/sysutils/fzf/distinfo
index 5f0ecbdddce..4faae15bb64 100644
--- a/sysutils/fzf/distinfo
+++ b/sysutils/fzf/distinfo
@@ -1,2 +1,2 @@
-SHA256 (fzf-0.17.5.tar.gz) = HKKM5mvQ38zuoo71g5/dAS0riCu5/Rs7bQ1miui52EM=
-SIZE (fzf-0.17.5.tar.gz) = 6413887
+SHA256 (fzf-0.19.0.tar.gz) = i0J6FbKUN3Yfy0REV8o1Q4xeb3jA9nA+JhpGfReD9f0=
+SIZE (fzf-0.19.0.tar.gz) = 2316589
diff --git 
a/sysutils/fzf/patches/patch-vendor_github_com_junegunn_fzf_src_protector_protector_openbsd_go
 
b/sysutils/fzf/patches/patch-vendor_github_com_junegunn_fzf_src_protector_protector_openbsd_go
index 0dc61392f85..3c29980ae48 100644
--- 
a/sysutils/fzf/patches/patch-vendor_github_com_junegunn_fzf_src_protector_protector_openbsd_go
+++ 
b/sysutils/fzf/patches/patch-vendor_github_com_junegunn_fzf_src_protector_protector_openbsd_go
@@ -12,5 +12,5 @@ Index: 
vendor/github.com/junegunn/fzf/src/protector/protector_openbsd.go
 +
 +// Protect calls OS specific protections like pledge on OpenBSD
 +func Protect(s string) {
-+      unix.Pledge(s, nil)
++      unix.PledgePromises(s)
 +}
diff --git a/sysutils/fzf/pkg/PLIST b/sysutils/fzf/pkg/PLIST
index 931641a1d69..3352d9f66a6 100644
--- a/sysutils/fzf/pkg/PLIST
+++ b/sysutils/fzf/pkg/PLIST
@@ -3,3 +3,9 @@
 bin/fzf-tmux
 @man man/man1/fzf-tmux.1
 @man man/man1/fzf.1
+share/bash-completion/
+share/bash-completion/completions/
+share/bash-completion/completions/fzf
+share/zsh/
+share/zsh/vendor-completions/
+share/zsh/vendor-completions/_fzf

-- 
PGP: 0x1F81112D62A9ADCE / 3586 3350 BFEA C101 DB1A  4AF0 1F81 112D 62A9 ADCE

Reply via email to