1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00
freebsd-ports/lang/go/Makefile
Baptiste Daroussin 4a4ec28d37 Convert all :U to :tu and :L to :tl
Since FreeBSD 8.4 and FreeBSD 9.1 make(1) do support :tu and :tl as a
replacement for :U and :L (which has been marked as deprecated)

bmake which is the default on FreeBSD 10+ only support by default
:tu/:tl a hack has been added at the time to support :U and :L to ease
migration. This hack is now not necessary anymore

Note that this makes the ports tree incompatible with make(1) from
FreeBSD 8.3 or earlier

With hat:	portmgr
2014-05-05 09:45:36 +00:00

66 lines
1.3 KiB
Makefile

# Created by: Devon H. O'Dell <devon.odell@gmail.com>
# $FreeBSD$
PORTNAME= go
PORTVERSION= 1.2.1
PORTEPOCH= 1
CATEGORIES= lang
MASTER_SITES= GOOGLE_CODE
DISTNAME= go${PORTVERSION}.src
MAINTAINER= jlaffaye@FreeBSD.org
COMMENT= Go programming language
LICENSE= BSD3CLAUSE
USES= shebangfix
SHEBANG_LANG= sh
SHEBANG_FILES= ${WRKSRC}/src/*.bash \
${WRKSRC}/doc/progs/run \
${WRKSRC}/doc/articles/wiki/*.bash \
${WRKSRC}/test/bench/shootout/timing.sh
sh_OLD_CMD= ${SETENV} bash
sh_CMD= ${SH}
WRKSRC= ${WRKDIR}/go
ONLY_FOR_ARCHS= i386 amd64
.include <bsd.port.pre.mk>
.if ${ARCH} == "i386"
GOARCH=386
GOOBJ=8
PLIST_SUB+= I386_ONLY=""
PLIST_SUB+= AMD64_ONLY="@comment "
.else
GOARCH=amd64
GOOBJ=6
PLIST_SUB+= I386_ONLY="@comment "
PLIST_SUB+= AMD64_ONLY=""
.endif
PLIST_SUB+= ARCH=${GOARCH} \
GOOBJ=${GOOBJ}
post-patch:
@cd ${WRKSRC} && ${FIND} . -name '*.orig' -delete
do-build:
cd ${WRKSRC}/src && \
CC=${CC} \
GOROOT=${WRKSRC} GOROOT_FINAL=${PREFIX}/go \
GOBIN= GOARCH=${GOARCH} GOOS=${OPSYS:tl} \
${SH} make.bash
do-install:
@${CP} -a ${WRKSRC} ${STAGEDIR}${PREFIX}
.for f in go gofmt
@${LN} -sf ${PREFIX}/go/bin/${f} ${STAGEDIR}${PREFIX}/bin/${f}
.endfor
regression-test: build
cd ${WRKSRC}/src && GOROOT=${WRKSRC} PATH=${WRKSRC}/bin:${PATH} ${SH} run.bash --no-rebuild --banner
.include <bsd.port.post.mk>