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
sysutils/tt: New port #232
base: main
Are you sure you want to change the base?
Conversation
Command-line utility to manage Tarantool applications.
@wahjava You're knowledgeable in Go, would mind looking at this? |
do-build: | ||
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GO_ENV} ${LOCALBASE}/bin/mage build | ||
|
||
GH_TUPLE= \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we can use GO_MODULE instead of GH_TUPLE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it'll also help with fetching modules which aren't on GitHub. Please refer to go USES for more details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, tt
does not work as a go module due to the complexity and structure of the project itself:
go: github.com/tarantool/tt@latest (in github.com/tarantool/tt@v1.3.1):
The go.mod file for the module providing named packages contains one or
more replace directives. It must not contain directives that would cause
it to be interpreted differently than if it were the main module.
The tt
source code uses external code from the submodule, this breaks the mechanism of Go modules.
The only way to make the tt
port work was with GH_TUPLE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to just remove USES= go:modules
, GH_TUPLE
and just do the mage build
in the Makefile?
This works fine:
PORTNAME= tt
PORTVERSION= 2.1.2
DISTVERSIONSUFFIX= -complete
MASTER_SITES= https://github.com/tarantool/tt/releases/download/v${PORTVERSION}/
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
CATEGORIES= sysutils databases
MAINTAINER= mail@void.so
COMMENT= Command-line utility to manage Tarantool applications
WWW= https://github.com/tarantool/tt
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
ONLY_FOR_ARCHS= amd64 aarch64
ONLY_FOR_ARCHS_REASON= the managed program only supports these architectures
BUILD_DEPENDS= ${LOCALBASE}/bin/mage:devel/mage
PLIST_FILES= bin/tt
do-build:
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GO_ENV} ${LOCALBASE}/bin/mage build
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/tt ${STAGEDIR}${PREFIX}/bin
.include <bsd.port.mk>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if port absolutely need to build without a network, I can try to use a cache of vendor libraries, the tt
repository has them for tt
gentoo ebuild.
do-build: | ||
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GO_ENV} ${LOCALBASE}/bin/mage build | ||
|
||
GH_TUPLE= \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, it'll also help with fetching modules which aren't on GitHub. Please refer to go USES for more details.
Command-line utility to manage Tarantool applications.