Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD port: update failed from 2.0.1 -> 2.0.3 #48

Closed
nunotexbsd opened this issue Nov 29, 2021 · 3 comments
Closed

FreeBSD port: update failed from 2.0.1 -> 2.0.3 #48

nunotexbsd opened this issue Nov 29, 2021 · 3 comments

Comments

@nunotexbsd
Copy link

Hello,

I',m trying update FreeBSD port from 2.0.1 to 2.0.3 but I receive this error:

===> Building neo-cowsay from ./cmd/cowsay main module (github.com/Code-Hex/Neo-cowsay/v2) does not contain package github.com/Code-Hex/Neo-cowsay/v2/cmd/cowsay

Port Makefile uses:

GO_TARGET= ./cmd/cowsay:neo-cowsay ./cmd/cowthink:neo-cowthink so it gets to ./cmd/cowsay and builds it like cowthink (and changes is name to neo-*)

What should have changed from 2.0.1 that originates this error?

Full port Makefile:

PORTNAME=	neo-cowsay
DISTVERSIONPREFIX=	v
DISTVERSION=	2.0.3
CATEGORIES=	games

MAINTAINER=	eduardo@FreeBSD.org
COMMENT=	Neo Cowsay written in Go

LICENSE=	ART10 GPLv1+
LICENSE_COMB=	dual
LICENSE_FILE_GPLv1+ =	${WRKSRC}/LICENSE

USES=		go:modules
USE_GITHUB=	yes
GH_ACCOUNT=	Code-Hex
GH_PROJECT=	Neo-cowsay
GH_TUPLE=	\
		Code-Hex:go-wordwrap:v1.0.0:code_hex_go_wordwrap/vendor/github.com/Code-Hex/go-wordwrap \
		golang:xerrors:5ec99f83aff1:golang_xerrors/vendor/golang.org/x/xerrors \
		google:go-cmp:v0.5.6:google_go_cmp/vendor/github.com/google/go-cmp \
		mattn:go-runewidth:v0.0.13:mattn_go_runewidth/vendor/github.com/mattn/go-runewidth \
		rivo:uniseg:v0.2.0:rivo_uniseg/vendor/github.com/rivo/uniseg

GO_TARGET=	./cmd/cowsay:neo-cowsay ./cmd/cowthink:neo-cowthink

PLIST_FILES=	bin/neo-cowsay \
		bin/neo-cowthink

PORTDOCS=	README.md

OPTIONS_DEFINE=	DOCS

do-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_MAN} ${WRKSRC}/${PORTDOCS} ${STAGEDIR}${DOCSDIR}

post-install:
.for l in neo-cowsay neo-cowthink
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${l}
.endfor

.include <bsd.port.mk>

Thanks,

Nuno Teixeira

@Code-Hex
Copy link
Owner

@nunotexbsd Thanks for working to support FreeBSD!!

This is required to change the build directory once to compile them. This is an example.

CGO_ENABLED=0 cd cmd && go build -o ../bin/cowsay -ldflags "-w -s" ./cowsay

I separated Go Modules between Neo-Cowsay Library (root directory) and cowsay commands (cmd directory) to reduce download dependant modules when using as a library.

I think it is better to download from these distributions and use them when building port. How do you think?

@nunotexbsd
Copy link
Author

The only way to build it on Freebsd is to use auto-generated src tarball (https://github.com/Code-Hex/Neo-cowsay/archive/refs/tags/v2.0.3.tar.gz).

I think I will need to find a way to tell Makefile port how to build with this change.

Thanks

@Code-Hex
Copy link
Owner

@nunotexbsd Could you close this issue if you resolved it? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants