2013-03-12 05:57:10 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.9 2013/03/12 09:57:10 jsing Exp $
|
2012-03-31 08:37:15 -04:00
|
|
|
|
|
|
|
ONLY_FOR_ARCHS = amd64 i386
|
|
|
|
|
|
|
|
COMMENT = Go programming language
|
|
|
|
|
2012-10-01 02:20:09 -04:00
|
|
|
VERSION = 1.0.3
|
2013-03-12 05:57:10 -04:00
|
|
|
REVISION = 0
|
2012-03-31 08:37:15 -04:00
|
|
|
EXTRACT_SUFX = .src.tar.gz
|
2012-05-20 12:32:51 -04:00
|
|
|
DISTNAME = go${VERSION}
|
2012-03-31 08:37:15 -04:00
|
|
|
PKGNAME = go-${VERSION}
|
|
|
|
CATEGORIES = lang
|
|
|
|
|
|
|
|
HOMEPAGE = http://www.golang.org/
|
|
|
|
|
|
|
|
MAINTAINER = Joel Sing <jsing@openbsd.org>
|
|
|
|
|
|
|
|
# software: BSD, documentation: CC-BY-3.0
|
|
|
|
PERMIT_PACKAGE_CDROM = Yes
|
|
|
|
|
|
|
|
WANTLIB = c m
|
|
|
|
|
|
|
|
MASTER_SITES = http://go.googlecode.com/files/
|
|
|
|
|
|
|
|
BUILD_DEPENDS = shells/bash
|
|
|
|
|
|
|
|
SEPARATE_BUILD = simple
|
|
|
|
CONFIGURE_STYLE = None
|
|
|
|
SUBST_VARS = GOEXE GOCFG
|
|
|
|
|
|
|
|
WRKDIST = ${WRKDIR}/go
|
|
|
|
WRKSRC = ${WRKDIST}/src
|
|
|
|
|
|
|
|
GOOS = openbsd
|
|
|
|
GOARCH = unknown
|
|
|
|
GOROOT = ${PREFIX}/go
|
|
|
|
|
|
|
|
.if ${MACHINE_ARCH} == "amd64"
|
|
|
|
GOARCH = amd64
|
|
|
|
EXEPREFIX = 6
|
|
|
|
PKG_ARGS += -Damd64=1
|
|
|
|
PKG_ARGS += -Di386=0
|
|
|
|
.elif ${MACHINE_ARCH} == "i386"
|
|
|
|
GOARCH = 386
|
|
|
|
EXEPREFIX = 8
|
|
|
|
PKG_ARGS += -Damd64=0
|
|
|
|
PKG_ARGS += -Di386=1
|
2012-07-30 11:49:55 -04:00
|
|
|
.else
|
|
|
|
PKG_ARGS += -Damd64=0 -Di386=0
|
2012-03-31 08:37:15 -04:00
|
|
|
.endif
|
2012-07-30 11:49:55 -04:00
|
|
|
|
2012-03-31 08:37:15 -04:00
|
|
|
GOCFG = /${GOOS}_${GOARCH}
|
|
|
|
GOEXE = ${GOCFG}/${EXEPREFIX}
|
|
|
|
|
|
|
|
do-configure:
|
|
|
|
. if ${GOARCH} == "unknown"
|
|
|
|
@echo "Unable to determine GOARCH for ${MACHINE_ARCH}."
|
|
|
|
@exit 1
|
|
|
|
. endif
|
|
|
|
|
|
|
|
|
|
|
|
do-build:
|
|
|
|
@cd ${WRKSRC} && \
|
2012-05-20 12:32:51 -04:00
|
|
|
GOROOT=${WRKDIST} \
|
|
|
|
GOBIN=${WRKDIST}/bin \
|
2012-03-31 08:37:15 -04:00
|
|
|
GOROOT_FINAL=${GOROOT} ./make.bash --no-banner
|
|
|
|
|
2013-03-11 07:20:26 -04:00
|
|
|
do-test:
|
2012-03-31 08:37:15 -04:00
|
|
|
@cd ${WRKSRC} && \
|
|
|
|
ulimit -n 256 -d 2097152 && \
|
2012-10-01 02:20:09 -04:00
|
|
|
PATH=${WRKDIST}/bin:${PATH} GOROOT=${WRKDIST} ./run.bash
|
2012-03-31 08:37:15 -04:00
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_PROGRAM} ${WRKDIST}/bin/go{,doc,fmt} ${PREFIX}/bin
|
|
|
|
|
|
|
|
${INSTALL_PROGRAM_DIR} ${GOROOT}
|
|
|
|
|
|
|
|
@cd ${WRKDIST} && \
|
|
|
|
find . ! -name .hg\* -type f -maxdepth 1 \
|
|
|
|
-exec ${INSTALL_DATA} {} \
|
|
|
|
${GOROOT} \;
|
|
|
|
|
2012-10-01 02:20:09 -04:00
|
|
|
. for dir in doc include lib misc src pkg
|
2012-03-31 08:37:15 -04:00
|
|
|
@cd ${WRKDIST} && \
|
|
|
|
find ${dir} -type d \
|
|
|
|
-exec ${INSTALL_DATA_DIR} \
|
|
|
|
${GOROOT}/{} \;
|
|
|
|
@cd ${WRKDIST} && \
|
|
|
|
find ${dir} ! -name \*.orig -type f \
|
|
|
|
-exec ${INSTALL_DATA} {} \
|
|
|
|
${GOROOT}/{} \;
|
|
|
|
. endfor
|
|
|
|
|
|
|
|
# These get installed via `find' however we need them to be executable
|
|
|
|
${INSTALL_PROGRAM_DIR} ${GOROOT}/pkg/tool/${GOOS}_${GOARCH}
|
|
|
|
${INSTALL_PROGRAM} ${WRKDIST}/pkg/tool/${GOOS}_${GOARCH}/* \
|
|
|
|
${GOROOT}/pkg/tool/${GOOS}_${GOARCH}
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|