app-emulation/libpod: fix network-sandbox for go-1.14
authorZac Medico <zmedico@gentoo.org>
Mon, 9 Mar 2020 22:18:21 +0000 (15:18 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 9 Mar 2020 22:21:44 +0000 (15:21 -0700)
Closes: https://bugs.gentoo.org/711964
Package-Manager: Portage-2.3.93, Repoman-2.3.20
Signed-off-by: Zac Medico <zmedico@gentoo.org>
app-emulation/libpod/libpod-1.8.0.ebuild

index 502e3dde382a472789404e2e5db79cc6303c1907..27fe79a5b91bfc0700438fc793c186ac3e1b107c 100644 (file)
@@ -41,11 +41,15 @@ src_prepare() {
 
        # Disable installation of python modules here, since those are
        # installed by separate ebuilds.
-       sed -e '/^GIT_.*/d' \
-               -e 's:GO111MODULE=off:GO111MODULE=on:' \
-               -e 's/$(GO) build/$(GO) build -v -work -x/' \
-               -e 's/^\(install:.*\) install\.python$/\1/' \
-               -i Makefile || die
+       local makefile_sed_args=(
+               -e '/^GIT_.*/d'
+               -e 's/$(GO) build/$(GO) build -v -work -x/'
+               -e 's/^\(install:.*\) install\.python$/\1/'
+       )
+
+       has_version -b '>=dev-lang/go-1.14' || makefile_sed_args+=(-e 's:GO111MODULE=off:GO111MODULE=on:')
+
+       sed "${makefile_sed_args[@]}" -i Makefile || die
 
        sed -e 's|OUTPUT="${CIRRUS_TAG:.*|OUTPUT='v${PV}'|' \
                -i hack/get_release_info.sh || die