Bug 179529 - [PATCH] lang/go: update to 1.1.1,1, Remove bash and bison dependencies
Summary: [PATCH] lang/go: update to 1.1.1,1, Remove bash and bison dependencies
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Julien Laffaye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-13 08:40 UTC by koobs
Modified: 2013-06-16 11:30 UTC (History)
1 user (show)

See Also:


Attachments
go-1.1.1,1.patch (4.74 KB, patch)
2013-06-13 08:40 UTC, koobs
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description koobs 2013-06-13 08:40:00 UTC
<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)
Comment 1 Edwin Groothuis freebsd_committer 2013-06-13 08:40:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->jlaffaye

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer 2013-06-16 11:25:20 UTC
Author: jlaffaye
Date: Sun Jun 16 10:25:11 2013
New Revision: 321031
URL: http://svnweb.freebsd.org/changeset/ports/321031

Log:
  - Update to 1.1.1
  - Remove bash and bison dependencies
  - Specify the PATH in regression-test target
  
  PR:             179529
  Submitted by:   koobs

Added:
  head/lang/go/files/patch-doc__progs__run   (contents, props changed)
  head/lang/go/files/patch-test__bench__shootout__timing.sh   (contents, props changed)
Modified:
  head/lang/go/Makefile   (contents, props changed)
  head/lang/go/distinfo   (contents, props changed)
  head/lang/go/pkg-plist   (contents, props changed)

Modified: head/lang/go/Makefile
==============================================================================
--- head/lang/go/Makefile	Sun Jun 16 09:42:21 2013	(r321030)
+++ head/lang/go/Makefile	Sun Jun 16 10:25:11 2013	(r321031)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	go
-PORTVERSION=	1.1
+PORTVERSION=	1.1.1
 PORTEPOCH=	1
 CATEGORIES=	lang
 MASTER_SITES=	GOOGLE_CODE
@@ -13,8 +13,15 @@ COMMENT=	Go programming language
 
 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 @@ GOOBJ=6
 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 && \
+		GOROOT=${WRKSRC} GOROOT_FINAL=${PREFIX}/go \
+		GOBIN= GOARCH=${GOARCH} GOOS=${OPSYS:L} \
+		${SH} make.bash
 
 post-install:
 	@${CAT} ${PKGMESSAGE}
@@ -58,6 +64,6 @@ do-install:
 .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>

Modified: head/lang/go/distinfo
==============================================================================
--- head/lang/go/distinfo	Sun Jun 16 09:42:21 2013	(r321030)
+++ head/lang/go/distinfo	Sun Jun 16 10:25:11 2013	(r321031)
@@ -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

Added: head/lang/go/files/patch-doc__progs__run
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/go/files/patch-doc__progs__run	Sun Jun 16 10:25:11 2013	(r321031)
@@ -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

Added: head/lang/go/files/patch-test__bench__shootout__timing.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/go/files/patch-test__bench__shootout__timing.sh	Sun Jun 16 10:25:11 2013	(r321031)
@@ -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() {

Modified: head/lang/go/pkg-plist
==============================================================================
--- head/lang/go/pkg-plist	Sun Jun 16 09:42:21 2013	(r321030)
+++ head/lang/go/pkg-plist	Sun Jun 16 10:25:11 2013	(r321031)
@@ -3678,6 +3678,7 @@ go/test/fixedbugs/issue5125.dir/main.go
 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/issue5260.go
 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 @@ go/test/zerodivide.go
 @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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Julien Laffaye freebsd_committer 2013-06-16 11:25:44 UTC
State Changed
From-To: open->closed

Committed. Thanks!