Go ports: cleanup, make use of the new GO_TARGET tuple syntax

- Remove custom build/install targets left in place after r505321
- Switch to the new GO_TARGET tuple syntax introduced in r512001

Approved by:	araujo (mentor)
Differential Revision:	https://reviews.freebsd.org/D21721
This commit is contained in:
Dmitri Goutnik 2019-09-20 11:31:49 +00:00
parent 361c4cd353
commit 29d16a42da
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=512404
8 changed files with 29 additions and 53 deletions

View file

@ -22,12 +22,6 @@ OPTIONS_DEFINE= DOCS
PLIST_FILES= bin/awless
PORTDOCS= README.md CHANGELOG.md
do-build:
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC} go build -o ${PORTNAME} )
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

View file

@ -22,6 +22,8 @@ USE_GITHUB= yes
GH_ACCOUNT= gogs
GH_SUBDIR= src/github.com/${GH_ACCOUNT}/${PORTNAME}
GO_TARGET= :${PREFIX}/libexec/${PORTNAME}/${PORTNAME}
OPTIONS_DEFINE= DOCS
USERS= git
@ -57,9 +59,7 @@ post-patch:
-e 's|^DB_TYPE = mysql$$|DB_TYPE = sqlite3|' \
${WRKSRC}/conf/app.ini
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}
${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/${PORTNAME} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/
post-install:
${INSTALL_SCRIPT} ${WRKDIR}/gogs ${STAGEDIR}${PREFIX}/bin/
${INSTALL_SCRIPT} ${WRKDIR}/gogs-rm-data ${STAGEDIR}${PREFIX}/bin/
${INSTALL_SCRIPT} ${WRKDIR}/gogs-service ${STAGEDIR}${PREFIX}/etc/rc.d/gogs

View file

@ -18,21 +18,24 @@ USES= go ncurses pkgconfig readline:port
USE_GITHUB= yes
GH_ACCOUNT= rgburke
GH_SUBDIR= src/github.com/rgburke/grv
GH_TUPLE= bradfitz:slice:2b758aa:slice/src/github.com/bradfitz/slice \
camlistore:go4:94abd69:reflectutil/src/go4.org \
davecgh:go-spew:d8f796a:spew/src/github.com/davecgh/go-spew \
gobwas:glob:e7a84e9:glob/src/github.com/gobwas/glob \
golang:crypto:a1f597e:crypto/src/golang.org/x/crypto \
golang:sys:fead790:sys/src/golang.org/x/sys \
mattn:go-runewidth:703b5e6:runewidth/src/github.com/mattn/go-runewidth \
pmezard:go-difflib:5d4384e:difflib/src/github.com/pmezard/go-difflib \
rgburke:goncurses:74f667a:goncurses/src/github.com/rgburke/goncurses \
rjeczalik:notify:629144b:notify/src/github.com/rjeczalik/notify \
Sirupsen:logrus:v1.4.0:logrus/src/github.com/Sirupsen/logrus \
stretchr:objx:c61a9df:objx/src/github.com/stretchr/objx \
stretchr:testify:34c6fa2:testify/src/github.com/stretchr/testify \
tchap:go-patricia:v2.3.0:patricia/src/github.com/tchap/go-patricia \
libgit2:git2go:ecaeb7a:git2go/src/gopkg.in/libgit2/git2go.v27 # Keep git2go branch in sync with devel/libgit2 version
GH_TUPLE= bradfitz:slice:2b758aa:slice/vendor/github.com/bradfitz/slice \
camlistore:go4:94abd69:reflectutil/vendor/go4.org \
davecgh:go-spew:d8f796a:spew/vendor/github.com/davecgh/go-spew \
gobwas:glob:e7a84e9:glob/vendor/github.com/gobwas/glob \
golang:crypto:a1f597e:crypto/vendor/golang.org/x/crypto \
golang:sys:fead790:sys/vendor/golang.org/x/sys \
mattn:go-runewidth:703b5e6:runewidth/vendor/github.com/mattn/go-runewidth \
pmezard:go-difflib:5d4384e:difflib/vendor/github.com/pmezard/go-difflib \
rgburke:goncurses:74f667a:goncurses/vendor/github.com/rgburke/goncurses \
rjeczalik:notify:629144b:notify/vendor/github.com/rjeczalik/notify \
Sirupsen:logrus:v1.4.0:logrus/vendor/github.com/Sirupsen/logrus \
stretchr:objx:c61a9df:objx/vendor/github.com/stretchr/objx \
stretchr:testify:34c6fa2:testify/vendor/github.com/stretchr/testify \
tchap:go-patricia:v2.3.0:patricia/vendor/github.com/tchap/go-patricia \
libgit2:git2go:ecaeb7a:git2go/vendor/gopkg.in/libgit2/git2go.v27 # Keep this in sync with devel/libgit2 version
GO_TARGET= ./cmd/grv
GO_BUILDFLAGS= -ldflags "-X main.version=${PORTVERSION}"
PLIST_FILES= bin/grv
@ -40,14 +43,9 @@ OPTIONS_DEFINE= DOCS
PORTDOCS= *
do-build:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC} go build ./cmd/${PORTNAME}
do-test:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC} go test ./cmd/${PORTNAME}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
cd ${WRKSRC}; \
${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} test ${GO_BUILDLAGS} ${GO_TARGET}
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}

View file

@ -1,5 +1,5 @@
--- src/gopkg.in/libgit2/git2go.v27/diff.go.orig 2018-07-05 13:56:38 UTC
+++ src/gopkg.in/libgit2/git2go.v27/diff.go
--- vendor/gopkg.in/libgit2/git2go.v27/diff.go.orig 2018-07-05 13:56:38 UTC
+++ vendor/gopkg.in/libgit2/git2go.v27/diff.go
@@ -14,7 +14,7 @@ import (
"unsafe"
)

View file

@ -1,7 +1,7 @@
Temporarily disable libgit2 version check in git2go until v0.28 tag is added.
Upstream issue: https://github.com/libgit2/git2go/issues/502
--- src/gopkg.in/libgit2/git2go.v27/git_dynamic.go.orig 2019-03-23 19:12:03 UTC
+++ src/gopkg.in/libgit2/git2go.v27/git_dynamic.go
--- vendor/gopkg.in/libgit2/git2go.v27/git_dynamic.go.orig 2019-03-23 19:12:03 UTC
+++ vendor/gopkg.in/libgit2/git2go.v27/git_dynamic.go
@@ -6,9 +6,5 @@ package git
#include <git2.h>
#cgo pkg-config: libgit2

View file

@ -26,13 +26,6 @@ PLIST_FILES= bin/slack-term
OPTIONS_DEFINE= DOCS
do-build:
cd ${WRKSRC}/${GH_SUBDIR} && \
${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC} go build -o ${PORTNAME}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

View file

@ -22,14 +22,8 @@ OPTIONS_DEFINE= DOCS
PLIST_FILES= bin/2fa
PORTDOCS= README.md
do-build:
@cd ${WRKSRC}/${GH_SUBDIR} && ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC} go build -o ${PORTNAME}
do-test:
@cd ${WRKSRC}/${GH_SUBDIR} && ${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC} go test
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
@cd ${GO_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GO_CMD} test ${GO_BUILDFLAGS}
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}

View file

@ -16,7 +16,7 @@ RUN_DEPENDS= ${LOCALBASE}/bin/pass:sysutils/password-store
USES= go
GO_PKGNAME= github.com/docker/docker-credential-helpers
GO_TARGET= ./pass/cmd
GO_TARGET= ./pass/cmd:${PORTNAME}
USE_GITHUB= yes
GH_ACCOUNT= docker
@ -28,7 +28,4 @@ pre-build:
${LN} -s ${GO_WRKSRC}/pass/cmd/main_linux.go ${GO_WRKSRC}/pass/cmd/main_freebsd.go
${LN} -s ${GO_WRKSRC}/pass/pass_linux.go ${GO_WRKSRC}/pass/pass_freebsd.go
do-install:
${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/cmd ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
.include <bsd.port.mk>