diff options
author | jlaffaye <jlaffaye@FreeBSD.org> | 2013-06-02 23:40:29 +0800 |
---|---|---|
committer | jlaffaye <jlaffaye@FreeBSD.org> | 2013-06-02 23:40:29 +0800 |
commit | 858a914892d34b6d5ac480ce90158a74123e953d (patch) | |
tree | 33f7e54027809720a4e4df3e86b4cdaa3c34555c /lang | |
parent | 7aa6bdcb81b1166bcb47ff3a7408b629bdd3871d (diff) | |
download | freebsd-ports-graphics-858a914892d34b6d5ac480ce90158a74123e953d.tar.gz freebsd-ports-graphics-858a914892d34b6d5ac480ce90158a74123e953d.tar.zst freebsd-ports-graphics-858a914892d34b6d5ac480ce90158a74123e953d.zip |
- Do not hardcode GOOS, use OPSYS instead [1]
- Add -f flag to LN [1]
- Add a regression-test target
Submitted by: sbz (irc) [1]
Diffstat (limited to 'lang')
-rw-r--r-- | lang/go/Makefile | 12 | ||||
-rw-r--r-- | lang/go/files/bsd.go.mk | 4 | ||||
-rw-r--r-- | lang/go/files/pkg-message.in | 2 |
3 files changed, 11 insertions, 7 deletions
diff --git a/lang/go/Makefile b/lang/go/Makefile index 5b1b168909c..83e2f19eb22 100644 --- a/lang/go/Makefile +++ b/lang/go/Makefile @@ -9,7 +9,7 @@ MASTER_SITES= GOOGLE_CODE DISTNAME= go${PORTVERSION}.src MAINTAINER= jlaffaye@FreeBSD.org -COMMENT= A concurrent, garbage-collected language +COMMENT= Go programming language LICENSE= BSD @@ -20,7 +20,8 @@ WRKSRC= ${WRKDIR}/go ONLY_FOR_ARCHS= i386 amd64 SUB_FILES= pkg-message SUB_LIST+= GOOBJ=${GOOBJ} \ - ARCH=${GOARCH} + ARCH=${GOARCH} \ + GOOS=${OPSYS:L} .include <bsd.port.pre.mk> @@ -44,7 +45,7 @@ do-build: GOROOT_FINAL=${PREFIX}/go \ GOBIN= \ GOARCH=${GOARCH} \ - GOOS=freebsd \ + GOOS=${OPSYS:L} \ bash make.bash) post-install: @@ -53,7 +54,10 @@ post-install: do-install: @${CP} -a ${WRKSRC} ${PREFIX} .for f in go godoc gofmt - @${LN} -s ${PREFIX}/go/bin/${f} ${PREFIX}/bin/${f} + @${LN} -sf ${PREFIX}/go/bin/${f} ${PREFIX}/bin/${f} .endfor +regression-test: build + (cd ${WRKSRC}/src && GOROOT=${WRKSRC} ./run.bash --no-rebuild --banner) + .include <bsd.port.post.mk> diff --git a/lang/go/files/bsd.go.mk b/lang/go/files/bsd.go.mk index e524bfb9817..18b968f0421 100644 --- a/lang/go/files/bsd.go.mk +++ b/lang/go/files/bsd.go.mk @@ -47,7 +47,7 @@ BUILD_DEPENDS+= ${GO_CMD}:${PORTSDIR}/lang/go GO_ENV+= GOROOT=${GOROOT} \ GOPATH=${WRKDIR} \ GOARCH=${GOARCH} \ - GOOS=freebsd \ + GOOS=${OPSYS:L} \ CGO_CFLAGS="${CGO_CFLAGS}" \ CGO_LDFLAGS="${CGO_LDFLAGS}" PLIST_SUB+= GO_LIBDIR=${GO_LIBDIR} \ @@ -57,7 +57,7 @@ PLIST_SUB+= GO_LIBDIR=${GO_LIBDIR} \ .if !target(post-extract) post-extract: @${MKDIR} ${GO_WRKSRC:H} - @${LN} -s ${WRKSRC} ${GO_WRKSRC} + @${LN} -sf ${WRKSRC} ${GO_WRKSRC} .endif .if !target(do-build) diff --git a/lang/go/files/pkg-message.in b/lang/go/files/pkg-message.in index 4076bc43c58..d0c87b47a80 100644 --- a/lang/go/files/pkg-message.in +++ b/lang/go/files/pkg-message.in @@ -3,7 +3,7 @@ environment properly. The following environment variables should be set: - GOOS=freebsd + GOOS=%%GOOS%% GOARCH=%%ARCH%% GOROOT=%%PREFIX%%/go |