dev-lang/go: fix installation on Darwin
authorFabian Groffen <grobian@gentoo.org>
Thu, 6 Dec 2018 10:16:18 +0000 (11:16 +0100)
committerFabian Groffen <grobian@gentoo.org>
Thu, 6 Dec 2018 10:16:34 +0000 (11:16 +0100)
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

dev-lang/go/go-1.11.2.ebuild
dev-lang/go/go-9999.ebuild

index 3eecca0eb6229a11f44e590ac46577289a08429e..58aa8cbd90dd256faa12ae579de2ba30f865212a 100644 (file)
@@ -225,4 +225,12 @@ src_install()
                dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
        done
        einstalldocs
+
+       if [[ ${CHOST} == *-darwin* ]] ; then
+               # fix install_name for test object (binutils_test) on Darwin, it
+               # is never used in real circumstances
+               local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/
+                     libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64
+               install_name_tool -id "${libmac64}" "${D}${libmac64}"
+       fi
 }
index 503bf3c4a123279e5cfc28a7dd54ca7788b6629f..dd4aa9a0894bff2f951157f8d625e36cf5835773 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -225,4 +225,12 @@ src_install()
                dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
        done
        einstalldocs
+
+       if [[ ${CHOST} == *-darwin* ]] ; then
+               # fix install_name for test object (binutils_test) on Darwin, it
+               # is never used in real circumstances
+               local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/
+                     libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64
+               install_name_tool -id "${libmac64}" "${D}${libmac64}"
+       fi
 }