On Mon, Apr 06 2020, Paco Esteban <p...@e1e0.net> wrote:
> On Mon, 06 Apr 2020, Morten Gade Liebach wrote:
>
>> On Sunday, April 5, 2020 9:51 AM, Morten Gade Liebach <m...@lieba.ch> wrote:
>> 
>> > Update fzf from 0.20.0 to 0.21.1.
>> 
>> Updated patch attached with input from
>> Paco Esteban <p...@e1e0.net>.
>> 
>> The original patch got mangled somehow, and failed to remove the upstreamed 
>> patches.
>
> It builds and works ok for me on amd64.
> Diff included again for convenience with a couple of minor cosmetic
> changes.
>
> With those, ok paco.
>
> (I can commit it if some one else gives ok, or maybe you want to do it
> abieber ?)

portcheck spits a few warnings:

russell /usr/ports/sysutils/fzf$ portcheck
1 line(s) longer than 80 chars in Makefile
there are no patches, please remove the patches directory instead
hardcoded paths detected in pkg/README, consider using SUBST_VARS and 
TRUEPREFIX/LOCALBASE/LOCALSTATEDIR/VARBASE
pkg/README does not have $OpenBSD$ RCS tag at the top
sysutils/fzf


Please add an $OpenBSD$ line at the top of pkg/README, ok jca@

> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/sysutils/fzf/Makefile,v
> retrieving revision 1.4
> diff -u -p -r1.4 Makefile
> --- Makefile  18 Jan 2020 11:51:13 -0000      1.4
> +++ Makefile  6 Apr 2020 08:26:48 -0000
> @@ -2,7 +2,7 @@
>  
>  COMMENT =    command-line fuzzy finder
>  
> -DISTNAME =   fzf-0.20.0
> +DISTNAME =   fzf-0.21.1
>  
>  CATEGORIES = sysutils
>  
> @@ -12,16 +12,16 @@ HOMEPAGE =        https://github.com/junegunn/f
>  PERMIT_PACKAGE =     Yes
>  
>  # uses pledge()
> -WANTLIB += c pthread
> +WANTLIB +=   c pthread
>  
> -MASTER_SITES =       https://theunixzoo.co.uk/distfiles/
> +MASTER_SITES =       https://deftly.net/dist/
>  
>  MODULES =    lang/go
>  MODGO_TYPE = bin
>  
>  NO_TEST =    Yes
>  
> -ALL_TARGET = github.com/junegunn/fzf
> +ALL_TARGET = github.com/junegunn/fzf
>  
>  
>  # Note that unlike zsh and fish, bash has no well-defined site functions
> @@ -33,6 +33,9 @@ ALL_TARGET = github.com/junegunn/fzf
>  ZSH_SITE =   ${PREFIX}/share/zsh/site-functions
>  FISH_SITE =  ${PREFIX}/share/fish/functions
>  BASH_SITE =  ${PREFIX}/share/fzf/bash
> +VIMFILES =   ${PREFIX}/share/vim/vimfiles
> +VIM_PLUGIN = ${VIMFILES}/plugin
> +VIM_DOC =    ${VIMFILES}/doc
>  SUBST_VARS +=        BASH_SITE FISH_SITE
>  
>  do-install:
> @@ -51,5 +54,10 @@ do-install:
>       ${INSTALL_DATA_DIR} ${BASH_SITE}
>       ${INSTALL_DATA} ${WRKSRC}/shell/key-bindings.bash ${BASH_SITE}
>       ${INSTALL_DATA} ${WRKSRC}/shell/completion.bash ${BASH_SITE}
> +
> +     ${INSTALL_DATA_DIR} ${VIM_PLUGIN}
> +     ${INSTALL_DATA_DIR} ${VIM_DOC}
> +     ${INSTALL_DATA} ${WRKSRC}/plugin/fzf.vim ${VIM_PLUGIN}/fzf.vim
> +     ${INSTALL_DATA} ${WRKSRC}/doc/fzf.txt ${VIM_DOC}/fzf.txt
>  
>  .include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /home/cvs/ports/sysutils/fzf/distinfo,v
> retrieving revision 1.3
> diff -u -p -r1.3 distinfo
> --- distinfo  18 Jan 2020 11:51:13 -0000      1.3
> +++ distinfo  6 Apr 2020 08:25:23 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (fzf-0.20.0.tar.gz) = S8ymcqwjIMqpDpEg9Rkj/aHbmlMltgXQOXu+58A8s0o=
> -SIZE (fzf-0.20.0.tar.gz) = 2319334
> +SHA256 (fzf-0.21.1.tar.gz) = fiUVWVnr+d4pMs6YD8oCGExrujlnVTLkrPBBG2O7n9I=
> +SIZE (fzf-0.21.1.tar.gz) = 2512770
> Index: patches/patch-main_go
> ===================================================================
> RCS file: patches/patch-main_go
> diff -N patches/patch-main_go
> --- patches/patch-main_go     12 Jun 2018 00:10:00 -0000      1.1.1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,20 +0,0 @@
> -$OpenBSD: patch-main_go,v 1.1.1.1 2018/06/12 00:10:00 abieber Exp $
> -
> -Index: main.go
> ---- main.go.orig
> -+++ main.go
> -@@ -1,9 +1,13 @@
> - package main
> - 
> --import "github.com/junegunn/fzf/src"
> -+import (
> -+    "github.com/junegunn/fzf/src"
> -+    "github.com/junegunn/fzf/src/protector"
> -+)
> - 
> - var revision string
> - 
> - func main() {
> -+    protector.Protect("stdio rpath wpath cpath tty proc exec inet")
> -     fzf.Run(fzf.ParseOptions(), revision)
> - }
> Index: patches/patch-vendor_github_com_junegunn_fzf_src_protector_protector_go
> ===================================================================
> RCS file: 
> patches/patch-vendor_github_com_junegunn_fzf_src_protector_protector_go
> diff -N 
> patches/patch-vendor_github_com_junegunn_fzf_src_protector_protector_go
> --- patches/patch-vendor_github_com_junegunn_fzf_src_protector_protector_go   
> 12 Jun 2018 00:10:00 -0000      1.1.1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,14 +0,0 @@
> -$OpenBSD: patch-vendor_github_com_junegunn_fzf_src_protector_protector_go,v 
> 1.1.1.1 2018/06/12 00:10:00 abieber Exp $
> -
> -Index: vendor/github.com/junegunn/fzf/src/protector/protector.go
> ---- vendor/github.com/junegunn/fzf/src/protector/protector.go.orig
> -+++ vendor/github.com/junegunn/fzf/src/protector/protector.go
> -@@ -0,0 +1,8 @@
> -+// +build !openbsd
> -+
> -+package protector
> -+
> -+// Protect calls OS specific protections like pledge on OpenBSD
> -+func Protect(s string) {
> -+    return
> -+}
> Index: 
> patches/patch-vendor_github_com_junegunn_fzf_src_protector_protector_openbsd_go
> ===================================================================
> RCS file: 
> patches/patch-vendor_github_com_junegunn_fzf_src_protector_protector_openbsd_go
> diff -N 
> patches/patch-vendor_github_com_junegunn_fzf_src_protector_protector_openbsd_go
> --- 
> patches/patch-vendor_github_com_junegunn_fzf_src_protector_protector_openbsd_go
>    18 Jan 2020 11:51:13 -0000      1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,16 +0,0 @@
> -$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
> -+++ vendor/github.com/junegunn/fzf/src/protector/protector_openbsd.go
> -@@ -0,0 +1,10 @@
> -+// +build openbsd
> -+
> -+package protector
> -+
> -+import "golang.org/x/sys/unix"
> -+
> -+// Protect calls OS specific protections like pledge on OpenBSD
> -+func Protect(s string) {
> -+    unix.PledgePromises(s)
> -+}
> Index: pkg/PLIST
> ===================================================================
> RCS file: /home/cvs/ports/sysutils/fzf/pkg/PLIST,v
> retrieving revision 1.2
> diff -u -p -r1.2 PLIST
> --- pkg/PLIST 18 Jan 2020 11:51:13 -0000      1.2
> +++ pkg/PLIST 6 Apr 2020 08:25:23 -0000
> @@ -11,6 +11,12 @@ share/fzf/
>  share/fzf/bash/
>  share/fzf/bash/completion.bash
>  share/fzf/bash/key-bindings.bash
> +share/vim/
> +share/vim/vimfiles/
> +share/vim/vimfiles/doc/
> +share/vim/vimfiles/doc/fzf.txt
> +share/vim/vimfiles/plugin/
> +share/vim/vimfiles/plugin/fzf.vim
>  share/zsh/
>  share/zsh/site-functions/
>  share/zsh/site-functions/_fzf_completion
> Index: pkg/README
> ===================================================================
> RCS file: /home/cvs/ports/sysutils/fzf/pkg/README,v
> retrieving revision 1.1
> diff -u -p -r1.1 README
> --- pkg/README        18 Jan 2020 11:51:13 -0000      1.1
> +++ pkg/README        6 Apr 2020 08:25:23 -0000
> @@ -44,3 +44,13 @@ fzf_key_bindings
>  ```
>  
>  There is no **<tab> completion support for fish.
> +
> +VIM Integration
> +===============
> +
> +The fzf.vim plugin and documentation are installed at
> +/usr/local/share/vim/vimfiles.  That is part of `runtimepath` by default
> +and will be loaded automatically.
> +
> +It should be noted that https://github.com/junegunn/fzf.vim are not the
> +same files, but is built on top of the files installed by this port.

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to