Created attachment 234707 [details] neo-cowsay-2.0.4.diff games/neo-cowsay: Update to 2.0.4 Earlier versions work with: --- GO_TARGET=./cmd/cowsay:neo-cowsay ./cmd/cowthink:neo-cowthink --- But since 2.0.2, upstream separated Go Modules between Neo-Cowsay Library (root directory) and cowsay commands (cmd directory) to reduce download dependant modules when using as a library. --- Neo-cowsay/Makefile Line 6 in d57bda7 CGO_ENABLED=0 cd cmd && go build -o ../bin/cowsay -ldflags "-w -s" ./cowsay --- Issue 48: https://github.com/Code-Hex/Neo-cowsay/issues/48 I've tried everything I could with several GO_TARGET combinations without success. Help needed! :) Thanks in advance, Nuno Teixeira
Hi Nuno, GO_MODULE needs to be updated to point to the new package where binaries are located, and GO_TARGET is relative to the module root, so -GO_MODULE= github.com/Code-Hex/Neo-cowsay/v2 +GO_MODULE= github.com/Code-Hex/Neo-cowsay/cmd/v2 -GO_TARGET= ./cmd/cowsay:neo-cowsay ./cmd/cowthink:neo-cowthink +GO_TARGET= ./cowsay:neo-cowsay ./cowthink:neo-cowthink
Created attachment 234710 [details] neo-cowsay-2.0.4.diff v2 v2 - correct GO_MODULE URL - adjust GO_TARGET
(In reply to Dmitri Goutnik from comment #1) Hi! I did understand perfectly your explanation and I investigate project source and in fact I found what you describe to me. I found a glitch: ===> Tidying github.com/Code-Hex/Neo-cowsay/cmd/v2 dependencies cd: ###/games/neo-cowsay/work/github.com/Code-Hex/Neo-cowsay/cmd/v2@v2.0.4: No such file or directory ^^^ I checked up work directory and it extracts to: games/neo-cowsay/work/github.com/Code-Hex/Neo-cowsay/v2@v2.0.4 >Neo-cowsay/cmd/v2@v2.0.4 <Neo-cowsay/v2@v2.0.4 --- Never saw this happened, any clues?
Created attachment 234714 [details] neo-cowsay-2.0.4.diff v3 You probably need to do `make distclean makesum` to re-download the go.mod. The attached builds fine for me in poudriere.
(In reply to Dmitri Goutnik from comment #4) Hello Dmitri! I didn't know about the efect of 'distclean' in a command like 'make distclean makesum' in GO ports that use GO_MODULE method, but I will investigate it deep to undertand it better against a plain 'make makesum' and for what you told me, it seems that poudrire use it since it builded ok for you. Like I said to maintainer in a PR some days a go: the more I learn, the more newbie I feel :) I'd like to thank you very much for this excellent lesson that mekes me very happy and confidence for a next step: learn more. Yours, Nuno Eduardo Teixeira
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=ed2683b77e74d7305e7110033165eb97ba0b315d commit ed2683b77e74d7305e7110033165eb97ba0b315d Author: Nuno Teixeira <eduardo@FreeBSD.org> AuthorDate: 2022-06-16 09:51:08 +0000 Commit: Nuno Teixeira <eduardo@FreeBSD.org> CommitDate: 2022-06-16 10:02:52 +0000 games/neo-cowsay: Update to 2.0.4 ChangeLog: https://github.com/Code-Hex/Neo-cowsay/releases PR: 264695 Reviewed by: dmgk@ games/neo-cowsay/Makefile | 20 +++----------------- games/neo-cowsay/distinfo | 10 +++++----- 2 files changed, 8 insertions(+), 22 deletions(-)
(In reply to Nuno Teixeira from comment #5) You're welcome, glad to be of help.