blob: 7dc47366820bc525fbc60166406c773d33c2cd62 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
# Ports collection makefile for: go
# Date created: 04 December 2010
# Whom: Devon H. O'Dell <devon.odell@gmail.com>
#
# $FreeBSD$
#
PORTNAME= go
PORTVERSION= 20101225
PORTREVISION= 0
CATEGORIES= lang
MASTER_SITES= LOCAL/wen
DISTNAME= go-${PORTVERSION}
MAINTAINER= devon.odell@gmail.com
COMMENT= An experimental, concurrent, garbage-collected language
BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash \
bison:${PORTSDIR}/devel/bison
ONLY_FOR_ARCHS= i386 amd64
USE_GMAKE= yes
GOMAKEDIR= lib/go/src
SUB_FILES= pkg-message
SUB_LIST+= GOOBJ=${GOOBJ} \
ARCH=${GOARCH}
.include <bsd.port.pre.mk>
.if ${ARCH} == "i386"
GOARCH=386
GOOBJ=8
.else
GOARCH=amd64
GOOBJ=6
.endif
GOBIN= ${WRKDIR}/bin
MAKE_ENV= GOROOT=${WRKSRC} \
GOARCH=${GOARCH} \
GOBIN=${GOBIN} \
GOOS=freebsd
PLIST_SUB+= ARCH=${GOARCH} \
GOOBJ=${GOOBJ} \
GOMAKEDIR=${GOMAKEDIR}
pre-build:
@${MKDIR} ${GOBIN}
.if !defined(MAINTAINER_MODE)
do-build:
(cd ${WRKSRC}/src && \
GOROOT=${WRKSRC} \
GOARCH=${GOARCH} \
GOBIN=${GOBIN} \
GOOS=freebsd \
bash make.bash)
.else
(cd ${WRKSRC}/src && \
GOROOT=${WRKSRC} \
GOARCH=${GOARCH} \
GOBIN=${GOBIN} \
GOOS=freebsd \
bash all.bash)
.endif
post-install:
@${CAT} ${PKGMESSAGE}
do-install:
.if !defined(NOPORTDOCS)
${INSTALL} -d -m 0755 ${DOCSDIR}
${CP} -R ${WRKSRC}/doc/ ${DOCSDIR}
.endif
${INSTALL} -d -m 0755 ${PREFIX}/${GOMAKEDIR}
${INSTALL} -d -m 0755 ${PREFIX}/lib/go/pkg
${INSTALL} -m 0644 ${WRKSRC}/src/Make.common ${PREFIX}/${GOMAKEDIR}
${INSTALL} -m 0644 ${WRKSRC}/src/Make.pkg ${PREFIX}/${GOMAKEDIR}
${INSTALL} -m 0644 ${WRKSRC}/src/Make.cmd ${PREFIX}/${GOMAKEDIR}
${INSTALL} -m 0644 ${WRKSRC}/src/Make.ccmd ${PREFIX}/${GOMAKEDIR}
${INSTALL} -m 0644 ${WRKSRC}/src/Make.clib ${PREFIX}/${GOMAKEDIR}
${INSTALL} -m 0644 ${WRKSRC}/src/Make.inc ${PREFIX}/${GOMAKEDIR}
${CP} -R ${WRKSRC}/pkg/* ${PREFIX}/lib/go/pkg/
${CP} -R ${WRKDIR}/bin/* ${PREFIX}/bin/
.include <bsd.port.post.mk>
|