[SCM] Packaging for Google Go branch, debian-sid, updated. debian/2011.02.01.1-1-8-g38ffa67

Ondřej Surý ondrej at sury.org
Fri Feb 18 10:46:51 UTC 2011


The following commit has been merged in the debian-sid branch:
commit f30cf701e9d48fcb537314f4f338b3476e7b002f
Author: Ondřej Surý <ondrej at sury.org>
Date:   Wed Feb 16 14:55:56 2011 +0100

    Correctly export GOROOT_FINAL to the subprocess environment

diff --git a/debian/patches/002-use_GOROOT_FINAL_in_generated_binaries.patch b/debian/patches/002-use_GOROOT_FINAL_in_generated_binaries.patch
new file mode 100644
index 0000000..77f9bcc
--- /dev/null
+++ b/debian/patches/002-use_GOROOT_FINAL_in_generated_binaries.patch
@@ -0,0 +1,21 @@
+--- a/src/pkg/runtime/Makefile
++++ b/src/pkg/runtime/Makefile
+@@ -129,7 +129,7 @@ mkversion: mkversion.c
+ 	quietgcc -o $@ -I "$(GOROOT)/include" $< "$(GOROOT)/lib/lib9.a"
+ 
+ version.go: mkversion
+-	./mkversion >version.go
++	GOROOT=$(QUOTED_GOROOT_FINAL) ./mkversion >version.go
+ 
+ version_$(GOARCH).go:
+ 	(echo 'package runtime'; echo 'const theGoarch = "$(GOARCH)"') >$@
+--- a/src/Make.inc
++++ b/src/Make.inc
+@@ -82,6 +82,7 @@ export GOARCH GOOS GOHOSTARCH GOHOSTOS
+ nullstring :=
+ space := $(nullstring) # a space at the end
+ QUOTED_GOROOT:=$(subst $(space),\ ,$(GOROOT))
++QUOTED_GOROOT_FINAL:=$(subst $(space),\ ,$(GOROOT_FINAL))
+ 
+ # default GOBIN
+ ifndef GOBIN
diff --git a/debian/patches/003-set_correct_runpath.patch b/debian/patches/003-set_correct_runpath.patch
new file mode 100644
index 0000000..c7d2f5f
--- /dev/null
+++ b/debian/patches/003-set_correct_runpath.patch
@@ -0,0 +1,11 @@
+--- a/src/Make.cmd
++++ b/src/Make.cmd
+@@ -13,7 +13,7 @@ include $(QUOTED_GOROOT)/src/Make.common
+ PREREQ+=$(patsubst %,%.make,$(DEPS))
+ 
+ $(TARG): _go_.$O
+-	$(LD) -o $@ _go_.$O
++	$(LD) -o $@ -r $(QUOTED_GOROOT_FINAL)/pkg/$(GOOS)_$(GOARCH) _go_.$O
+ 
+ _go_.$O: $(GOFILES) $(PREREQ)
+ 	$(GC) -o $@ $(GOFILES)
diff --git a/debian/patches/series b/debian/patches/series
index 36ee79f..144de93 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
 001-allow_IPv4_on_IPv6_sockets.patch
+002-use_GOROOT_FINAL_in_generated_binaries.patch
+003-set_correct_runpath.patch
diff --git a/debian/rules b/debian/rules
index 6d5e7a5..032ffe8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -113,7 +113,7 @@ else
     GOARCH := $(DEB_HOST_ARCH_CPU)
 endif
 
-export GOROOT GOOS GOARCH GOARM GOBIN GOHOSTARCH GOHOSTOS
+export GOROOT GOROOT_FINAL GOOS GOARCH GOARM GOBIN GOHOSTARCH GOHOSTOS
 
 REPO = https://go.googlecode.com/hg/
 REV = release

-- 
Packaging for Google Go



More information about the Pkg-google-commits mailing list