Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jun 2013 17:32:06 +1000 (EST)
From:      Kubilay Kocak <koobs.freebsd@gmail.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/179529: [PATCH] lang/go: update to 1.1.1, 1, Remove bash and bison dependencies
Message-ID:  <20130613073206.397A13C27B@9-STABLE-amd64.elysium>
Resent-Message-ID: <201306130740.r5D7e09B036567@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         179529
>Category:       ports
>Synopsis:       [PATCH] lang/go: update to 1.1.1,1, Remove bash and bison dependencies
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 13 07:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Kubilay Kocak
>Release:        FreeBSD 9.1-STABLE amd64
>Organization:
>Environment:
System: FreeBSD 9-STABLE-amd64.elysium 9.1-STABLE FreeBSD 9.1-STABLE #1 r250655: Wed May 15 15:28:38 EST
>Description:
<CommitLog>
lang/go: Update to 1.1.1, Remove bash and bison dependencies

- Update to 1.1.1,1
- Update pkg-plist
- Remove bash and bison dependencies (yay!)
- Fix shebangs for files referencing bash in WRKSRC
- Add 2 patches to address bashisms
- Add post-patch: target to remove .orig files (which get installed if you dont)
- Tweak tab/whitespace for do-build: target whilst keeping readability
- Adjust the regression-test target to be PREFIX-safe (thanks mandree)

Changes: 

Includes several compiler and runtime bug fixes. See:
https://code.google.com/p/go/source/list?name=go1.1.1
</CommitLog>

<QA>
portlint: Possible direct use of command "sh" found (false positive)
porttest: OK (9-STABLE amd64)
unittest: ALL TESTS PASSED
testport: OK (All versions/archs, known build failures on jailed */i386)
</QA>

Port maintainer (jlaffaye@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_7 (mode: update, diff: ports)
>How-To-Repeat:
>Fix:

--- go-1.1.1,1.patch begins here ---
diff -ruN /usr/ports/lang/go/Makefile ./Makefile
--- /usr/ports/lang/go/Makefile	2013-06-03 01:40:29.000000000 +1000
+++ ./Makefile	2013-06-13 16:46:54.325549930 +1000
@@ -1,8 +1,8 @@
 # Created by: Devon H. O'Dell <devon.odell@gmail.com>
-# $FreeBSD: lang/go/Makefile 319677 2013-06-02 15:40:29Z jlaffaye $
+# $FreeBSD: head/lang/go/Makefile 319677 2013-06-02 15:40:29Z jlaffaye $
 
 PORTNAME=	go
-PORTVERSION=	1.1
+PORTVERSION=	1.1.1
 PORTEPOCH=	1
 CATEGORIES=	lang
 MASTER_SITES=	GOOGLE_CODE
@@ -13,8 +13,15 @@
 
 LICENSE=	BSD
 
-BUILD_DEPENDS=	bash:${PORTSDIR}/shells/bash	\
-		bison:${PORTSDIR}/devel/bison
+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
@@ -35,18 +42,17 @@
 PLIST_SUB+=	ENAM=""
 .endif
 
-PLIST_SUB+=	ARCH=${GOARCH}		\
+PLIST_SUB+=	ARCH=${GOARCH} \
 		GOOBJ=${GOOBJ}
 
+post-patch:
+	@cd ${WRKSRC} && ${FIND} . -name '*.orig' -delete
+
 do-build:
-	(cd ${WRKSRC}/src &&			\
-		GOTRACEBACK=2			\
-		GOROOT=${WRKSRC}		\
-		GOROOT_FINAL=${PREFIX}/go	\
-		GOBIN=				\
-		GOARCH=${GOARCH}		\
-		GOOS=${OPSYS:L}			\
-		bash make.bash)
+	cd ${WRKSRC}/src && \
+		GOTRACEBACK=2 GOROOT=${WRKSRC} GOROOT_FINAL=${PREFIX}/go \
+		GOBIN= GOARCH=${GOARCH} GOOS=${OPSYS:L} \
+		${SH} make.bash
 
 post-install:
 	@${CAT} ${PKGMESSAGE}
@@ -58,6 +64,6 @@
 .endfor
 
 regression-test: build
-	(cd ${WRKSRC}/src && GOROOT=${WRKSRC} ./run.bash --no-rebuild --banner)
+	cd ${WRKSRC}/src && GOROOT=${WRKSRC} PATH=${WRKSRC}/bin:${PATH} ${SH} run.bash --no-rebuild --banner
 
 .include <bsd.port.post.mk>
diff -ruN /usr/ports/lang/go/distinfo ./distinfo
--- /usr/ports/lang/go/distinfo	2013-05-20 05:59:31.000000000 +1000
+++ ./distinfo	2013-06-13 16:23:08.035657402 +1000
@@ -1,2 +1,2 @@
-SHA256 (go1.1.src.tar.gz) = bf1d057d8386e840f9cd3f787252e26d8ee196852e9232a6f9ce762337b19cb6
-SIZE (go1.1.src.tar.gz) = 9041413
+SHA256 (go1.1.1.src.tar.gz) = 257f74b8d812bbdec695e842de587a1495e7728b4e63d280586a14786adbb5af
+SIZE (go1.1.1.src.tar.gz) = 9045336
diff -ruN /usr/ports/lang/go/files/patch-doc__progs__run ./files/patch-doc__progs__run
--- /usr/ports/lang/go/files/patch-doc__progs__run	1970-01-01 10:00:00.000000000 +1000
+++ ./files/patch-doc__progs__run	2013-06-09 23:33:57.265513000 +1000
@@ -0,0 +1,11 @@
+--- ./doc/progs/run.orig	2013-06-09 23:20:14.695515753 +1000
++++ ./doc/progs/run	2013-06-09 23:20:14.695515753 +1000
+@@ -87,7 +87,7 @@
+ # Write to temporary file to avoid mingw bash bug.
+ TMPFILE="${TMPDIR:-/tmp}/gotest3.$USER"
+ 
+-function testit {
++testit () {
+ 	./$1 >"$TMPFILE" 2>&1 || true
+ 	x=$(echo $(cat "$TMPFILE")) # extra echo canonicalizes
+ 	if ! echo "$x" | grep "$2" > /dev/null
diff -ruN /usr/ports/lang/go/files/patch-test__bench__shootout__timing.sh ./files/patch-test__bench__shootout__timing.sh
--- /usr/ports/lang/go/files/patch-test__bench__shootout__timing.sh	1970-01-01 10:00:00.000000000 +1000
+++ ./files/patch-test__bench__shootout__timing.sh	2013-06-09 23:33:57.255560000 +1000
@@ -0,0 +1,11 @@
+--- ./test/bench/shootout/timing.sh.orig	2013-06-09 23:33:01.405924747 +1000
++++ ./test/bench/shootout/timing.sh	2013-06-09 23:33:16.526347653 +1000
+@@ -81,7 +81,7 @@
+ 	$1
+ 	shift
+ 	
+-	echo $((time -p $* >/dev/null) 2>&1) | awk '{print $4 "u " $6 "s " $2 "r"}'
++	echo $( (time -p $* >/dev/null) 2>&1) | awk '{print $4 "u " $6 "s " $2 "r"}'
+ }
+ 
+ fasta() {
diff -ruN /usr/ports/lang/go/pkg-plist ./pkg-plist
--- /usr/ports/lang/go/pkg-plist	2013-05-20 05:59:31.000000000 +1000
+++ ./pkg-plist	2013-06-13 17:09:08.075561630 +1000
@@ -3678,6 +3678,7 @@
 go/test/fixedbugs/issue5125.go
 go/test/fixedbugs/issue5162.go
 go/test/fixedbugs/issue5231.go
+go/test/fixedbugs/issue5244.go
 go/test/fixedbugs/issue5259.dir/bug.go
 go/test/fixedbugs/issue5259.dir/main.go
 go/test/fixedbugs/issue5259.go
@@ -3687,6 +3688,16 @@
 go/test/fixedbugs/issue5291.dir/pkg1.go
 go/test/fixedbugs/issue5291.dir/prog.go
 go/test/fixedbugs/issue5291.go
+go/test/fixedbugs/issue5470.dir/a.go
+go/test/fixedbugs/issue5470.dir/b.go
+go/test/fixedbugs/issue5470.go
+go/test/fixedbugs/issue5493.go
+go/test/fixedbugs/issue5515.go
+go/test/fixedbugs/issue5607.go
+go/test/fixedbugs/issue5614.dir/rethinkgo.go
+go/test/fixedbugs/issue5614.dir/y.go
+go/test/fixedbugs/issue5614.dir/x.go
+go/test/fixedbugs/issue5614.go
 go/test/fixedbugs/issue887.go
 go/test/float_lit.go
 go/test/floatcmp.go
@@ -3912,6 +3923,8 @@
 @dirrm go/test/interface
 @dirrm go/test/import4.dir
 @dirrm go/test/import2.dir
+@dirrm go/test/fixedbugs/issue5614.dir
+@dirrm go/test/fixedbugs/issue5470.dir
 @dirrm go/test/fixedbugs/issue5291.dir
 @dirrm go/test/fixedbugs/issue5260.dir
 @dirrm go/test/fixedbugs/issue5259.dir
--- go-1.1.1,1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130613073206.397A13C27B>