[meta-virtualization] [PATCH 5/7] Enable go-cross 1.3 to coexist with later versions
Amy Fong
amy.fong at windriver.com
Tue Oct 6 11:34:07 PDT 2015
Since we need go 1.3 to co-exist with later versions (ie 1.4),
package go-cross_1.3 as go-cross-1.3_1.3.
go 1.3 will be installed to a different path than go-cross, this requires
go packages needing go 1.3 to set its PATH to:
export PATH=${STAGING_BINDIR_NATIVE}/${HOST_SYS}/go-1.3:$PATH
Signed-off-by: Amy Fong <amy.fong at windriver.com>
---
recipes-containers/docker/docker_git.bb | 4 +++-
.../go-cross/{go-cross_1.3.bb => go-cross-1.3_1.3.bb} | 11 ++++++-----
2 files changed, 9 insertions(+), 6 deletions(-)
rename recipes-devtools/go-cross/{go-cross_1.3.bb => go-cross-1.3_1.3.bb} (88%)
diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
index aa125a3..165b319 100644
--- a/recipes-containers/docker/docker_git.bb
+++ b/recipes-containers/docker/docker_git.bb
@@ -36,7 +36,7 @@ S = "${WORKDIR}/git"
DOCKER_VERSION = "1.6.2"
PV = "${DOCKER_VERSION}+git${SRCREV}"
-DEPENDS = "go-cross \
+DEPENDS = "go-cross-1.3 \
go-cli \
go-pty \
go-context \
@@ -65,6 +65,8 @@ do_configure() {
}
do_compile() {
+ export PATH=${STAGING_BINDIR_NATIVE}/${HOST_SYS}/go-1.3:$PATH
+
export GOARCH="${TARGET_ARCH}"
# supported amd64, 386, arm
if [ "${TARGET_ARCH}" = "x86_64" ]; then
diff --git a/recipes-devtools/go-cross/go-cross_1.3.bb b/recipes-devtools/go-cross/go-cross-1.3_1.3.bb
similarity index 88%
rename from recipes-devtools/go-cross/go-cross_1.3.bb
rename to recipes-devtools/go-cross/go-cross-1.3_1.3.bb
index 1fb4870..775e28f 100644
--- a/recipes-devtools/go-cross/go-cross_1.3.bb
+++ b/recipes-devtools/go-cross/go-cross-1.3_1.3.bb
@@ -25,7 +25,7 @@ SRC_URI += "\
do_compile() {
## Setting `$GOBIN` doesn't do any good, looks like it ends up copying binaries there.
- export GOROOT_FINAL="${SYSROOT}${libdir}/go"
+ export GOROOT_FINAL="${SYSROOT}${libdir}/go-1.3"
export GOHOSTOS="linux"
export GOOS="linux"
@@ -61,11 +61,12 @@ do_compile() {
do_install() {
## It should be okay to ignore `${WORKDIR}/go/bin/linux_arm`...
## Also `gofmt` is not needed right now.
- install -d "${D}${bindir}"
- install -m 0755 "${WORKDIR}/go/bin/go" "${D}${bindir}"
- install -d "${D}${libdir}/go"
+ install -d "${D}${bindir}/go-1.3"
+ install -m 0755 "${WORKDIR}/go/bin/go" "${D}${bindir}/go-1.3/"
+ install -d "${D}${libdir}/go-1.3"
+
## TODO: use `install` instead of `cp`
for dir in include lib pkg src test
- do cp -a "${WORKDIR}/go/${dir}" "${D}${libdir}/go/"
+ do cp -a "${WORKDIR}/go/${dir}" "${D}${libdir}/go-1.3/"
done
}
--
2.5.3
More information about the meta-virtualization
mailing list