diff options
author | Wen Heping <wen@FreeBSD.org> | 2010-11-25 06:16:19 +0000 |
---|---|---|
committer | Wen Heping <wen@FreeBSD.org> | 2010-11-25 06:16:19 +0000 |
commit | f82af8989d60fc5d95eb4a9c69d35cd8378c849f (patch) | |
tree | 32c8eb17b52dcf0b11aa499d71d570888f33a72e /lang/go | |
parent | 01dc94c1c1c1c798f4fb52bbd859bf9cb9a6d126 (diff) | |
download | ports-f82af8989d60fc5d95eb4a9c69d35cd8378c849f.tar.gz ports-f82af8989d60fc5d95eb4a9c69d35cd8378c849f.zip |
Notes
Diffstat (limited to 'lang/go')
-rw-r--r-- | lang/go/files/bsd.go.mk | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/lang/go/files/bsd.go.mk b/lang/go/files/bsd.go.mk new file mode 100644 index 000000000000..f0bbf7183458 --- /dev/null +++ b/lang/go/files/bsd.go.mk @@ -0,0 +1,35 @@ +# Date created: 2010-11-23 +# Whom: Wen Heping <wenheping@gmail.com> +# + +.if ${ARCH} == "i386" +GOARCH= 386 +GOOBJ= 8 +GOOS= freebsd +.else +GOARCH= amd64 +GOOBJ= 6 +GOOS= freebsd +.endif + +GO_CMD= ${LOCALBASE}/bin/${GOOBJ}g +GOROOT_REL= lib/go +GOROOT= ${LOCALBASE}/${GOROOT_REL} +GO_LIBDIR= ${GOROOT_REL}/pkg/${GOOS}_${GOARCH} + +.if defined(USE_GO) +BUILD_DEPENDS+= ${GO_CMD}:${PORTSDIR}/lang/go +RUN_DEPENDS+= ${GO_CMD}:${PORTSDIR}/lang/go + +USE_GMAKE= yes + +MAKE_ENV+= GOROOT=${GOROOT} GOARCH=${GOARCH} GOOS=${GOOS} + +PLIST_SUB+= GO_LIBDIR=${GO_LIBDIR} +.endif + + +.if defined(USE_GO) +do-install: + @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} install) +.endif |