Friday, October 21, 2022

Re: [OpenBSD ports] Update for fzf 0.34.0

You can determine Go's auto-made version number with the go command:

To get it with just a commit:
go list -m github.com/junegunn/fzf@04d0b0223fd69984a07a641d0e228c0e9e534825

Or to get it with a tag:
go list -m github.com/junegunn/fzf@0.34.0

Both produce: "github.com/junegunn/fzf v0.0.0-20220928142231-04d0b0223fd6"

As for the port. It looks good to me (i haven't done a build test) but I would set PKGNAME to make it reflect
'fzf-0.34.0' (while leaving MODGO_VERSION with the auto-gen'd version)

On Fri, Oct 21, 2022, at 3:23 PM, Edd Barrett wrote:
> Hi,
>
> Thanks for resending the diff.
>
> On Fri, Oct 21, 2022 at 05:50:08PM +0200, Laurent Cheylus wrote:
>> - add patch for Bash completion for kill command (kill **)
>
> Did you author this patch, or did it come from somewhere? If we borrowed it, we
> should link to it at the top of the diff.
>
>> +MODGO_VERSION = v0.0.0-20220928142231-04d0b0223fd6
>
> I'm a total go noob. When updating this port in the future, where will I get
> that magic version string from? I think this all comes about because upstream
> are not using proper semantic versioning, right?
>
> This looks fine to me, but I will CC abieber@ for comments, as he is more
> experienced with go.
>
> OK abieber@?
>
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/sysutils/fzf/Makefile,v
> retrieving revision 1.13
> diff -u -p -u -r1.13 Makefile
> --- Makefile 11 Mar 2022 19:57:26 -0000 1.13
> +++ Makefile 8 Oct 2022 07:44:36 -0000
> @@ -1,9 +1,10 @@
> COMMENT = command-line fuzzy finder
>
> -# Note: we make our own vendored distfile as upstream doesn't do semantic
> -# versioning. Use 'go mod vendor'.
> -DISTNAME = fzf-0.24.1
> -REVISION = 2
> +MODGO_MODNAME = github.com/junegunn/fzf
> +MODGO_VERSION = v0.0.0-20220928142231-04d0b0223fd6
> +
> +V = 0.34.0
> +DISTNAME = fzf-${V}
>
> CATEGORIES = sysutils
>
> @@ -16,14 +17,16 @@ PERMIT_PACKAGE = Yes
> # uses pledge()
> WANTLIB += c pthread
>
> -MASTER_SITES = https://theunixzoo.co.uk/distfiles/
> -
> MODULES = lang/go
> MODGO_TYPE = bin
>
> +MODGO_LDFLAGS += -X main.version=${V}
> +MODGO_LDFLAGS += -X main.revision=""
> +
> RUN_DEPENDS = shells/bash
>
> -ALL_TARGET = github.com/junegunn/fzf
> +# for patch to apply
> +WRKDIST = ${WRKOBJDIR}/${DISTNAME}/${MODGO_MODNAME}@${MODGO_VERSION}
>
> # Note that unlike zsh and fish, bash has no well-defined site functions
> # directory from which to autoload stuff.
> @@ -63,5 +66,7 @@ do-install:
> ${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 "modules.inc"
>
> .include <bsd.port.mk>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/sysutils/fzf/distinfo,v
> retrieving revision 1.6
> diff -u -p -u -r1.6 distinfo
> --- distinfo 1 Nov 2020 10:59:45 -0000 1.6
> +++ distinfo 8 Oct 2022 07:44:36 -0000
> @@ -1,2 +1,68 @@
> -SHA256 (fzf-0.24.1.tar.gz) =
> CjWTiFpY0dJojwEJFy8n+jsfgutN1s1YmZAmbLas1ic=
> -SIZE (fzf-0.24.1.tar.gz) = 2036120
> +SHA256 (fzf-0.34.0.zip) = GLClhjtPUipAtoXp0xbqsTodjsChSx+J0MTUdD6yUCw=
> +SHA256 (go_modules/github.com/gdamore/encoding/@v/v1.0.0.mod) =
> pJgRJVFfDy3yU8LeOjrBlwx0Q+W2adlH6HTnezaBtuU=
> +SHA256 (go_modules/github.com/gdamore/encoding/@v/v1.0.0.zip) =
> Y4qYMuL2LRGNfFEdhr2uFiKlHzMd5IoB2Sn9JOvmoqY=
> +SHA256 (go_modules/github.com/gdamore/tcell/v2/@v/v2.5.3.mod) =
> JlVpbQ0HAS2x5kpMtli+W+9P8KLVR4V1QqKu/6qySn8=
> +SHA256 (go_modules/github.com/gdamore/tcell/v2/@v/v2.5.3.zip) =
> 62+TeJEgY6dd3D5gEYJ7WH/M2vIKR/sF6Exuuob8uqM=
> +SHA256 (go_modules/github.com/lucasb-eyer/go-colorful/@v/v1.2.0.mod) =
> hPnDjpiEqwE8g3yxau4TlQDT1cbMqwJDmIHbLs8o9mA=
> +SHA256 (go_modules/github.com/lucasb-eyer/go-colorful/@v/v1.2.0.zip) =
> eNXQ4HN/D1S77Xe236hH2MhxvtJmip3EQyjHw0Ea2hA=
> +SHA256 (go_modules/github.com/mattn/go-isatty/@v/v0.0.16.mod) =
> cUdm7ILWfbiVreiva4BUrUMMPOpeFbOoiPI+0vPhuGM=
> +SHA256 (go_modules/github.com/mattn/go-isatty/@v/v0.0.16.zip) =
> PV/xnEsqKhZP64T1zDivNJOAwMSgPQRD3OQLvW7D/Ss=
> +SHA256 (go_modules/github.com/mattn/go-runewidth/@v/v0.0.13.mod) =
> IWyT0ZMQYSyB1cdBAkmJ+DiX0jM8Op+We1ixMXWH9Rk=
> +SHA256 (go_modules/github.com/mattn/go-runewidth/@v/v0.0.14.mod) =
> IWyT0ZMQYSyB1cdBAkmJ+DiX0jM8Op+We1ixMXWH9Rk=
> +SHA256 (go_modules/github.com/mattn/go-runewidth/@v/v0.0.14.zip) =
> Nk717TH2Vx2tVnMDBbXCKIpT2gbZgyaAreXiHZenSOc=
> +SHA256 (go_modules/github.com/mattn/go-shellwords/@v/v1.0.12.mod) =
> Kb//Fv9Xt9raZOanSAbZMVSazOYctwxFijidCZwtDsI=
> +SHA256 (go_modules/github.com/mattn/go-shellwords/@v/v1.0.12.zip) =
> bTXD7ckuR6BpiHiNaDwa04lxm1XvGdWn8jmrRwi22hE=
> +SHA256 (go_modules/github.com/rivo/uniseg/@v/v0.2.0.mod) =
> bHMYonqNVHOo62YedfsAUoF24O/FkxDtJ3yhO9EqU/E=
> +SHA256 (go_modules/github.com/rivo/uniseg/@v/v0.4.2.mod) =
> oeF0iQ/J8lJFAhH63rU3VvnPWrexlpd2X5+yVfgeqJg=
> +SHA256 (go_modules/github.com/rivo/uniseg/@v/v0.4.2.zip) =
> SYh8XlSwRdfPiNRbj+kniIMM9MgAuM+rimqnB0b9S38=
> +SHA256 (go_modules/github.com/saracen/walker/@v/v0.1.3.mod) =
> 0kway39am7ME90XPLfJq9bVJOMxXYxgsir8ISkd4zUc=
> +SHA256 (go_modules/github.com/saracen/walker/@v/v0.1.3.zip) =
> lFe2CuCa3V2nRgsynUdvWFq/HUuLBO1ZukCSSQxhG10=
> +SHA256
> (go_modules/golang.org/x/sync/@v/v0.0.0-20220601150217-0de741cfad7f.mod)
> = Qh9hOWhtWJHz3FpWPQmVeA0yefZcrU0iXOpSaGeUFhw=
> +SHA256
> (go_modules/golang.org/x/sync/@v/v0.0.0-20220601150217-0de741cfad7f.zip)
> = LqnuShUOzuqUMOuxJYMP0esr/YNhEnAyg471kHrZPzM=
> +SHA256
> (go_modules/golang.org/x/sys/@v/v0.0.0-20201119102817-f84b799fce68.mod)
> = GBl56L1X0tngZBgtqGyaYRGqaXVeiI8IQx7OR0Kuw0M=
> +SHA256
> (go_modules/golang.org/x/sys/@v/v0.0.0-20210615035016-665e8c7367d1.mod)
> = 8DMzMJb+GY8xUd7tk/LeunTlC7/nc5E0BFvDt85KUCQ=
> +SHA256
> (go_modules/golang.org/x/sys/@v/v0.0.0-20220318055525-2edf467146b5.mod)
> = 8DMzMJb+GY8xUd7tk/LeunTlC7/nc5E0BFvDt85KUCQ=
> +SHA256
> (go_modules/golang.org/x/sys/@v/v0.0.0-20220811171246-fbc7d0a398ab.mod)
> = 8DMzMJb+GY8xUd7tk/LeunTlC7/nc5E0BFvDt85KUCQ=
> +SHA256
> (go_modules/golang.org/x/sys/@v/v0.0.0-20220811171246-fbc7d0a398ab.zip)
> = Xr00+vNM+3gk7W0S6V55PIVkzMmJr5+ceZhCLDbsmDg=
> +SHA256
> (go_modules/golang.org/x/term/@v/v0.0.0-20201210144234-2321bbc49cbf.mod)
> = TLqxT3cGdxsnHZlaGzzBMf5aJGqtx+5tG6bwvYlHgfo=
> +SHA256
> (go_modules/golang.org/x/term/@v/v0.0.0-20210927222741-03fcf44c2211.mod)
> = dAeU4pFPXMh+JWVsWEMiKyxlZlghIF9FYyoEd8jT95s=
> +SHA256
> (go_modules/golang.org/x/term/@v/v0.0.0-20210927222741-03fcf44c2211.zip)
> = Ot9xOvpJ/iZYD/5K2x9PsvSSHJRTAapan7bTQDH6MM0=
> +SHA256 (go_modules/golang.org/x/text/@v/v0.3.0.mod) =
> NoedWG/YAB6E2oeHGQoR5PeHSeKoHf6Lm2kxiZ//Mc8=
> +SHA256 (go_modules/golang.org/x/text/@v/v0.3.7.mod) =
> xF1mkIlCe8RjXQexhfm5aAMy0cSMdbPEnLcVuBoEpbA=
> +SHA256 (go_modules/golang.org/x/text/@v/v0.3.7.zip) =
> 4akRXmGjjai9yJPQuoO2X4nMERTxUqmOtXLF6mVR6NQ=
> +SHA256
> (go_modules/golang.org/x/tools/@v/v0.0.0-20180917221912-90fa682c2a6e.mod)
> = oOAvBnj+Ytw8S0vHf6kSybcN4Q+p988veq0DNzkrUq8=
> +SHA256
> (go_modules/golang.org/x/tools/@v/v0.0.0-20180917221912-90fa682c2a6e.zip)
> = ZnP+BmYvy+5fJG8Sr47YYDKL8I/QFv1JCYfNdqyxtP4=
> +SIZE (fzf-0.34.0.zip) = 257283
> +SIZE (go_modules/github.com/gdamore/encoding/@v/v1.0.0.mod) = 77
> +SIZE (go_modules/github.com/gdamore/encoding/@v/v1.0.0.zip) = 19867
> +SIZE (go_modules/github.com/gdamore/tcell/v2/@v/v2.5.3.mod) = 308
> +SIZE (go_modules/github.com/gdamore/tcell/v2/@v/v2.5.3.zip) = 239019
> +SIZE (go_modules/github.com/lucasb-eyer/go-colorful/@v/v1.2.0.mod) = 51
> +SIZE (go_modules/github.com/lucasb-eyer/go-colorful/@v/v1.2.0.zip) =
> 958042
> +SIZE (go_modules/github.com/mattn/go-isatty/@v/v0.0.16.mod) = 104
> +SIZE (go_modules/github.com/mattn/go-isatty/@v/v0.0.16.zip) = 8927
> +SIZE (go_modules/github.com/mattn/go-runewidth/@v/v0.0.13.mod) = 84
> +SIZE (go_modules/github.com/mattn/go-runewidth/@v/v0.0.14.mod) = 84
> +SIZE (go_modules/github.com/mattn/go-runewidth/@v/v0.0.14.zip) = 21752
> +SIZE (go_modules/github.com/mattn/go-shellwords/@v/v1.0.12.mod) = 47
> +SIZE (go_modules/github.com/mattn/go-shellwords/@v/v1.0.12.zip) = 9134
> +SIZE (go_modules/github.com/rivo/uniseg/@v/v0.2.0.mod) = 39
> +SIZE (go_modules/github.com/rivo/uniseg/@v/v0.4.2.mod) = 39
> +SIZE (go_modules/github.com/rivo/uniseg/@v/v0.4.2.zip) = 475618
> +SIZE (go_modules/github.com/saracen/walker/@v/v0.1.3.mod) = 104
> +SIZE (go_modules/github.com/saracen/walker/@v/v0.1.3.zip) = 17973
> +SIZE
> (go_modules/golang.org/x/sync/@v/v0.0.0-20220601150217-0de741cfad7f.mod)
> = 25
> +SIZE
> (go_modules/golang.org/x/sync/@v/v0.0.0-20220601150217-0de741cfad7f.zip)
> = 29696
> +SIZE
> (go_modules/golang.org/x/sys/@v/v0.0.0-20201119102817-f84b799fce68.mod)
> = 33
> +SIZE
> (go_modules/golang.org/x/sys/@v/v0.0.0-20210615035016-665e8c7367d1.mod)
> = 33
> +SIZE
> (go_modules/golang.org/x/sys/@v/v0.0.0-20220318055525-2edf467146b5.mod)
> = 33
> +SIZE
> (go_modules/golang.org/x/sys/@v/v0.0.0-20220811171246-fbc7d0a398ab.mod)
> = 33
> +SIZE
> (go_modules/golang.org/x/sys/@v/v0.0.0-20220811171246-fbc7d0a398ab.zip)
> = 1814667
> +SIZE
> (go_modules/golang.org/x/term/@v/v0.0.0-20201210144234-2321bbc49cbf.mod)
> = 95
> +SIZE
> (go_modules/golang.org/x/term/@v/v0.0.0-20210927222741-03fcf44c2211.mod)
> = 95
> +SIZE
> (go_modules/golang.org/x/term/@v/v0.0.0-20210927222741-03fcf44c2211.zip)
> = 21653
> +SIZE (go_modules/golang.org/x/text/@v/v0.3.0.mod) = 25
> +SIZE (go_modules/golang.org/x/text/@v/v0.3.7.mod) = 97
> +SIZE (go_modules/golang.org/x/text/@v/v0.3.7.zip) = 8610883
> +SIZE
> (go_modules/golang.org/x/tools/@v/v0.0.0-20180917221912-90fa682c2a6e.mod)
> = 26
> +SIZE
> (go_modules/golang.org/x/tools/@v/v0.0.0-20180917221912-90fa682c2a6e.zip)
> = 2687668
> Index: modules.inc
> ===================================================================
> RCS file: modules.inc
> diff -N modules.inc
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ modules.inc 8 Oct 2022 07:44:36 -0000
> @@ -0,0 +1,24 @@
> +MODGO_MODULES = \
> + github.com/gdamore/encoding v1.0.0 \
> + github.com/gdamore/tcell/v2 v2.5.3 \
> + github.com/lucasb-eyer/go-colorful v1.2.0 \
> + github.com/mattn/go-isatty v0.0.16 \
> + github.com/mattn/go-runewidth v0.0.14 \
> + github.com/mattn/go-shellwords v1.0.12 \
> + github.com/rivo/uniseg v0.4.2 \
> + github.com/saracen/walker v0.1.3 \
> + golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f \
> + golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab \
> + golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 \
> + golang.org/x/text v0.3.7 \
> + golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e
> +
> +MODGO_MODFILES = \
> + github.com/mattn/go-runewidth v0.0.13 \
> + github.com/rivo/uniseg v0.2.0 \
> + golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 \
> + golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 \
> + golang.org/x/sys v0.0.0-20220318055525-2edf467146b5 \
> + golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf \
> + golang.org/x/text v0.3.0
> +
> Index: patches/patch-shell_completion_bash
> ===================================================================
> RCS file: patches/patch-shell_completion_bash
> diff -N patches/patch-shell_completion_bash
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-shell_completion_bash 8 Oct 2022 07:44:36 -0000
> @@ -0,0 +1,12 @@
> +Index: shell/completion.bash
> +--- shell/completion.bash.orig
> ++++ shell/completion.bash
> +@@ -269,7 +269,7 @@ _fzf_complete_kill() {
> +
> + _fzf_proc_completion() {
> + _fzf_complete -m --preview 'echo {}' --preview-window down:3:wrap
> --min-height 15 -- "$@" < <(
> +- command ps -ef | sed 1d
> ++ command ps -auwx | sed 1d
> + )
> + }
> +
> Index: pkg/README
> ===================================================================
> RCS file: /cvs/ports/sysutils/fzf/pkg/README,v
> retrieving revision 1.5
> diff -u -p -u -r1.5 README
> --- pkg/README 11 Mar 2022 19:57:26 -0000 1.5
> +++ pkg/README 8 Oct 2022 07:44:36 -0000
> @@ -25,7 +25,7 @@ shells/bash
> To enable all support, add this to your ~/.bashrc:
>
> ```
> -source ${BASH_SITE}/key_bindings.bash
> +source ${BASH_SITE}/key-bindings.bash
> source ${BASH_SITE}/completion.bash
> ```
>
>
> --
> Best Regards
> Edd Barrett
>
> https://www.theunixzoo.co.uk

No comments:

Post a Comment