From 01a8d4537012ad93dc8510e9b762acdc8c4536c7 Mon Sep 17 00:00:00 2001 From: Jason Wessel Date: Wed, 13 Sep 2017 12:39:46 -0700 Subject: nets, docker, runc, oci-*tools: go.bbclass compile fixes Recently in the oe-core the go.bbclass changed and requires the defition of the GO_IMPORT variable. This was intended to simplify how the compilation works with go packages and it is still a work in progress. This patch set makes the recipes compatible to generate the same end result as before using the new go.bbclass from oe-core. Any patches that were included in the recipes had to have the paths adjusted because the new go.bbclass manipulates the notion of S to be S + "src" + "$GO_IMPORT" internally for the purpose of unpack, patch and compile. Signed-off-by: Jason Wessel Signed-off-by: Bruce Ashfield --- .../oci-runtime-tools/oci-runtime-tools_git.bb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'recipes-containers/oci-runtime-tools') diff --git a/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb b/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb index d73edfe7..0d9c6e65 100644 --- a/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb +++ b/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb @@ -1,14 +1,13 @@ HOMEPAGE = "https://github.com/opencontainers/runtime-tools" SUMMARY = "oci-runtime-tool is a collection of tools for working with the OCI runtime specification" LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b355a61a394a504dacde901c958f662c" +LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=b355a61a394a504dacde901c958f662c" SRC_URI = "git://github.com/opencontainers/runtime-tools.git" SRCREV = "15ec1df3f6607f4223ab3915547c184cf60a30dd" PV = "0.0.1+git${SRCPV}" - -S = "${WORKDIR}/git" +GO_IMPORT = "import" INSANE_SKIP_${PN} += "ldflags" @@ -18,7 +17,7 @@ inherit go do_compile() { export GOARCH="${TARGET_GOARCH}" export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go" - export GOPATH="${S}:${S}/vendor" + export GOPATH="${S}/src/import:${S}/src/import/vendor" # Pass the needed cflags/ldflags so that cgo # can find the needed headers files and libraries @@ -29,17 +28,18 @@ do_compile() { export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" # link fixups for compilation - rm -f ${S}/vendor/src - ln -sf ./ ${S}/vendor/src - mkdir -p ${S}/vendor/github.com/opencontainers/runtime-tools - ln -sf ../../../../generate ${S}/vendor/github.com/opencontainers/runtime-tools/generate - ln -sf ../../../../validate ${S}/vendor/github.com/opencontainers/runtime-tools/validate - ln -sf ../../../../cmd ${S}/vendor/github.com/opencontainers/runtime-tools/cmd + rm -f ${S}/src/import/vendor/src + ln -sf ./ ${S}/src/import/vendor/src + mkdir -p ${S}/src/import/vendor/github.com/opencontainers/runtime-tools + ln -sf ../../../../generate ${S}/src/import/vendor/github.com/opencontainers/runtime-tools/generate + ln -sf ../../../../validate ${S}/src/import/vendor/github.com/opencontainers/runtime-tools/validate + ln -sf ../../../../cmd ${S}/src/import/vendor/github.com/opencontainers/runtime-tools/cmd + cd ${S}/src/import oe_runmake } do_install() { install -d ${D}/${sbindir} - install ${S}/oci-runtime-tool ${D}/${sbindir}/oci-runtime-tool + install ${S}/src/import/oci-runtime-tool ${D}/${sbindir}/oci-runtime-tool } -- cgit v1.2.3-54-g00ecf