Bug 272668 - devel/gum: Update to 0.11.0
Summary: devel/gum: Update to 0.11.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dries Michiels
URL: https://github.com/charmbracelet/gum/...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-23 02:39 UTC by Dave Turner
Modified: 2023-07-25 07:54 UTC (History)
2 users (show)

See Also:
dave: maintainer-feedback+


Attachments
devel/gum: Update to 0.11.0 (1.45 KB, patch)
2023-07-23 02:39 UTC, Dave Turner
no flags Details | Diff
improvements /add fish completion (1.82 KB, patch)
2023-07-23 15:39 UTC, Nuno Teixeira
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Turner 2023-07-23 02:39:12 UTC
Created attachment 243556 [details]
devel/gum: Update to 0.11.0
Comment 1 Dries Michiels freebsd_committer freebsd_triage 2023-07-23 15:22:48 UTC
Aaaah forgot to add the PR number to the commit.
Commited in https://cgit.freebsd.org/ports/commit/?id=2cd6b666d032a47d0f5acc5095f810670212b8b3

Thanks!
Comment 2 Nuno Teixeira freebsd_committer freebsd_triage 2023-07-23 15:39:13 UTC
Created attachment 243569 [details]
improvements /add fish completion

Some small sugestions:

- gum binary is installed by default, so no need to use INSTALL_PROGRAM (or wrongly INSTALL_SCRIPT)
- add fish completion
- do generation of man and completions in post-build
- install stuff on post-install
- use correct go variable

Cheers
Comment 3 Dries Michiels freebsd_committer freebsd_triage 2023-07-23 16:54:47 UTC
Waiting for maintainer feedback to commit improvements.
Comment 4 Dave Turner 2023-07-23 17:20:48 UTC
Comment on attachment 243569 [details]
improvements /add fish completion

Thanks for your suggestions!  I will incorporate these next time around.  Please proceed with the updated patch.
Comment 5 Dries Michiels freebsd_committer freebsd_triage 2023-07-24 07:43:32 UTC
Can you add the "maintainer feedback" flag to + to the attachment? Go to details, and then put "maintainer feedback" to +.

Ideally you also do this for all PR's you provide patches for and you are the maintainer of. Then you can even do it in the PR itself at the top right side, maintainer feedback "+".
Comment 6 Dave Turner 2023-07-24 15:49:53 UTC
Comment on attachment 243569 [details]
improvements /add fish completion

Hmmm.  I did that in my last comment, and this one, but it doesn't seem to be changing the flags on the attachment.
Comment 7 Dave Turner 2023-07-24 15:50:59 UTC
Comment on attachment 243569 [details]
improvements /add fish completion

>diff --git a/devel/gum/Makefile b/devel/gum/Makefile
>index 24df8c10d37d..a79ec711e177 100644
>--- a/devel/gum/Makefile
>+++ b/devel/gum/Makefile
>@@ -1,6 +1,7 @@
> PORTNAME=	gum
> DISTVERSIONPREFIX=	v
> DISTVERSION=	0.11.0
>+PORTREVISION=	1
> CATEGORIES=	devel
> 
> MAINTAINER=	dave@bitboss.ca
>@@ -14,20 +15,27 @@ USES=		go:modules
> GO_MODULE=	github.com/charmbracelet/gum
> 
> PLIST_FILES=	bin/gum \
>-		etc/bash_completion.d/gum \
>-		man/man1/gum.1.gz \
>+		etc/bash_completion.d/gum.bash \
>+		share/fish/completions/gum.fish \
>+		share/man/man1/gum.1.gz \
> 		share/zsh/site-functions/_gum
> 
> post-build:
>-	${MKDIR} ${WRKDIR}/manpages
>-	${WRKDIR}/bin/gum man > ${WRKDIR}/manpages/gum.1
>+	${GO_WRKDIR_BIN}/${PORTNAME} man > ${WRKSRC}/${PORTNAME}.1
>+.for SHELL in bash fish zsh
>+	${GO_WRKDIR_BIN}/${PORTNAME} completion ${SHELL} > ${WRKSRC}/${SHELL}
>+.endfor
> 
>-do-install:
>-	${INSTALL_SCRIPT} ${WRKDIR}/bin/gum ${STAGEDIR}${PREFIX}/bin/
>-	${INSTALL_MAN} ${WRKDIR}/manpages/gum.1 ${STAGEDIR}${PREFIX}/man/man1/
>-	${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d
>-	${WRKDIR}/bin/gum completion bash > ${STAGEDIR}${PREFIX}/etc/bash_completion.d/gum
>-	${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
>-	${WRKDIR}/bin/gum completion zsh > ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_gum
>+post-install:
>+	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d
>+	${INSTALL_DATA} ${WRKSRC}/bash \
>+		${STAGEDIR}${PREFIX}/etc/bash_completion.d/${PORTNAME}.bash
>+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/fish/completions
>+	${INSTALL_DATA} ${WRKSRC}/fish \
>+		${STAGEDIR}${PREFIX}/share/fish/completions/${PORTNAME}.fish
>+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
>+	${INSTALL_DATA} ${WRKSRC}/zsh \
>+		${STAGEDIR}${PREFIX}/share/zsh/site-functions/_${PORTNAME}
>+	${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${PREFIX}/share/man/man1
> 
> .include <bsd.port.mk>
Comment 8 Dries Michiels freebsd_committer freebsd_triage 2023-07-24 16:12:06 UTC
Based on your comments I assume you want to give it, so I'll commit it.
Very strange it doesnt work.
Comment 9 Dries Michiels freebsd_committer freebsd_triage 2023-07-24 20:06:42 UTC
Nuno, comming to think of it you rather commit this yourself? Patch LGTM :)
Comment 10 Nuno Teixeira freebsd_committer freebsd_triage 2023-07-25 06:52:04 UTC
(In reply to Dries Michiels from comment #9)

Ok, I'll do the commit.
Thanks
Comment 11 commit-hook freebsd_committer freebsd_triage 2023-07-25 07:12:48 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=22952612f3df2a7f1b2dd983b88544365a5e06fc

commit 22952612f3df2a7f1b2dd983b88544365a5e06fc
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2023-07-25 06:59:56 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2023-07-25 07:12:25 +0000

    devel/gum: Add fish completion and port improvements

    - gum binary is installed by default, so no need to use INSTALL_PROGRAM
      (or wrongly INSTALL_SCRIPT)
    - add fish completion
    - do generation of man and completions in post-build
    - use correct go variable to execute cmd on post-build
    - install stuff on post-install
    - move man page to a valid location (${PREFIX}/man being considered as
      deprecated.)

    PR:             272668

 devel/gum/Makefile | 30 +++++++++++++++++++-----------
 1 file changed, 19 insertions(+), 11 deletions(-)
Comment 12 Nuno Teixeira freebsd_committer freebsd_triage 2023-07-25 07:54:14 UTC
Committed, thanks!