Update sysutils/fzf to version 0.20.0 and install shell support files.
With input from sthen@, abieber@, Matthew Martin and Paco Esteban. OK abieber@. Thanks all!
This commit is contained in:
parent
57cdf8ab06
commit
2dd974849b
@ -1,22 +1,20 @@
|
||||
# $OpenBSD: Makefile,v 1.3 2019/07/12 20:49:43 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.4 2020/01/18 11:51:13 edd Exp $
|
||||
|
||||
COMMENT = command-line fuzzy finder
|
||||
|
||||
DISTNAME = fzf-0.17.5
|
||||
DISTNAME = fzf-0.20.0
|
||||
|
||||
CATEGORIES = sysutils
|
||||
|
||||
HOMEPAGE = https://github.com/junegunn/fzf
|
||||
|
||||
MAINTAINER = Aaron Bieber <abieber@openbsd.org>
|
||||
|
||||
# BSD
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
# uses pledge()
|
||||
WANTLIB += c pthread
|
||||
|
||||
MASTER_SITES = https://deftly.net/
|
||||
MASTER_SITES = https://theunixzoo.co.uk/distfiles/
|
||||
|
||||
MODULES = lang/go
|
||||
MODGO_TYPE = bin
|
||||
@ -25,10 +23,33 @@ NO_TEST = Yes
|
||||
|
||||
ALL_TARGET = github.com/junegunn/fzf
|
||||
|
||||
|
||||
# Note that unlike zsh and fish, bash has no well-defined site functions
|
||||
# directory from which to autoload stuff.
|
||||
#
|
||||
# Note also that the completion files referenced here are not defining words to
|
||||
# complete, but rather overriding what happens when the user requests
|
||||
# completion via typing **<tab>.
|
||||
ZSH_SITE = ${PREFIX}/share/zsh/site-functions
|
||||
FISH_SITE = ${PREFIX}/share/fish/functions
|
||||
BASH_SITE = ${PREFIX}/share/fzf/bash
|
||||
SUBST_VARS += BASH_SITE FISH_SITE
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKDIR}/go/bin/* ${PREFIX}/bin
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/bin/* ${PREFIX}/bin
|
||||
${INSTALL_MAN_DIR} ${PREFIX}/man/man1
|
||||
${INSTALL_MAN} ${WRKSRC}/man/man1/*.1 ${PREFIX}/man/man1
|
||||
|
||||
${INSTALL_DATA_DIR} ${ZSH_SITE}
|
||||
${INSTALL_DATA} ${WRKSRC}/shell/key-bindings.zsh ${ZSH_SITE}/_fzf_key_bindings
|
||||
${INSTALL_DATA} ${WRKSRC}/shell/completion.zsh ${ZSH_SITE}/_fzf_completion
|
||||
|
||||
${INSTALL_DATA_DIR} ${FISH_SITE}
|
||||
${INSTALL_DATA} ${WRKSRC}/shell/key-bindings.fish ${FISH_SITE}/fzf-key-bindings.fish
|
||||
|
||||
${INSTALL_DATA_DIR} ${BASH_SITE}
|
||||
${INSTALL_DATA} ${WRKSRC}/shell/key-bindings.bash ${BASH_SITE}
|
||||
${INSTALL_DATA} ${WRKSRC}/shell/completion.bash ${BASH_SITE}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -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.20.0.tar.gz) = S8ymcqwjIMqpDpEg9Rkj/aHbmlMltgXQOXu+58A8s0o=
|
||||
SIZE (fzf-0.20.0.tar.gz) = 2319334
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-vendor_github_com_junegunn_fzf_src_protector_protector_openbsd_go,v 1.1.1.1 2018/06/12 00:10:00 abieber Exp $
|
||||
$OpenBSD: patch-vendor_github_com_junegunn_fzf_src_protector_protector_openbsd_go,v 1.2 2020/01/18 11:51:13 edd Exp $
|
||||
|
||||
Index: vendor/github.com/junegunn/fzf/src/protector/protector_openbsd.go
|
||||
--- vendor/github.com/junegunn/fzf/src/protector/protector_openbsd.go.orig
|
||||
@ -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)
|
||||
+}
|
||||
|
@ -1,5 +1,17 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2018/06/12 00:10:00 abieber Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.2 2020/01/18 11:51:13 edd Exp $
|
||||
@bin bin/fzf
|
||||
bin/fzf-tmux
|
||||
@man man/man1/fzf-tmux.1
|
||||
@man man/man1/fzf.1
|
||||
share/doc/pkg-readmes/${PKGSTEM}
|
||||
share/fish/
|
||||
share/fish/functions/
|
||||
share/fish/functions/fzf-key-bindings.fish
|
||||
share/fzf/
|
||||
share/fzf/bash/
|
||||
share/fzf/bash/completion.bash
|
||||
share/fzf/bash/key-bindings.bash
|
||||
share/zsh/
|
||||
share/zsh/site-functions/
|
||||
share/zsh/site-functions/_fzf_completion
|
||||
share/zsh/site-functions/_fzf_key_bindings
|
||||
|
46
sysutils/fzf/pkg/README
Normal file
46
sysutils/fzf/pkg/README
Normal file
@ -0,0 +1,46 @@
|
||||
+-------------------------------------------------------------------------------
|
||||
| Running ${PKGSTEM} on OpenBSD
|
||||
+-------------------------------------------------------------------------------
|
||||
|
||||
Shell Integration
|
||||
=================
|
||||
|
||||
shells/zsh
|
||||
----------
|
||||
|
||||
To enable all support, add this to your ~/.zshrc:
|
||||
|
||||
```
|
||||
autoload _fzf_key_bindings _fzf_completion
|
||||
_fzf_key_bindings
|
||||
_fzf_completion
|
||||
```
|
||||
|
||||
_fzf_key_bindings causes zsh to use fzf for things like CTRL+r and CTRL+t,
|
||||
whereas _fzf_completion makes zsh use fzf for **<tab> completion.
|
||||
|
||||
shells/bash
|
||||
-----------
|
||||
|
||||
To enable all support, add this to your ~/.bashrc:
|
||||
|
||||
```
|
||||
source ${BASH_SITE}/key_bindings.bash
|
||||
source ${BASH_SITE}/completion.bash
|
||||
```
|
||||
|
||||
These two files have the same roles as their zsh counterparts.
|
||||
|
||||
shells/fish
|
||||
-----------
|
||||
|
||||
Although the function used to set up fzf is auto-loaded, it can't be used in
|
||||
the shell config, so we have to source it anyway. Put the following in
|
||||
~/.config/fish/config.fish:
|
||||
|
||||
```
|
||||
source ${FISH_SITE}/functions/fzf-key-bindings.fish
|
||||
fzf_key_bindings
|
||||
```
|
||||
|
||||
There is no **<tab> completion support for fish.
|
Loading…
x
Reference in New Issue
Block a user