dev-util/meson: add workaround for test_static_library_lto
authorMike Gilbert <floppym@gentoo.org>
Thu, 13 Dec 2018 17:11:37 +0000 (12:11 -0500)
committerMike Gilbert <floppym@gentoo.org>
Thu, 13 Dec 2018 17:12:24 +0000 (12:12 -0500)
Closes: https://bugs.gentoo.org/672706
Package-Manager: Portage-2.3.52_p8, Repoman-2.3.12_p20
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
dev-util/meson/meson-0.48.2.ebuild
dev-util/meson/meson-0.49.0.ebuild
dev-util/meson/meson-9999.ebuild

index 07742ab26563c439e0a8ba47d1be081430aaa0a9..1b7da1e7a7727a842fae388545255482e48d820d 100644 (file)
@@ -12,7 +12,7 @@ else
        KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x64-macos ~x64-solaris"
 fi
 
-inherit distutils-r1
+inherit distutils-r1 toolchain-funcs
 
 DESCRIPTION="Open source build system"
 HOMEPAGE="http://mesonbuild.com/"
@@ -32,6 +32,16 @@ python_prepare_all() {
        distutils-r1_python_prepare_all
 }
 
+src_test() {
+       if tc-is-gcc; then
+               # LTO fails for static libs because the bfd plugin in missing.
+               # Remove this workaround after sys-devel/gcc-config-2.0 is stable.
+               # https://bugs.gentoo.org/672706
+               tc-getPROG AR gcc-ar >/dev/null
+       fi
+       distutils-r1_src_test
+}
+
 python_test() {
        (
                # test_meson_installed
index 9605fa9af90cbaea9ebfc85bfb7fba1125328d12..5e725b324a15490495491c19df796a4f28f4f80e 100644 (file)
@@ -12,7 +12,7 @@ else
        KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x64-macos ~x64-solaris"
 fi
 
-inherit distutils-r1
+inherit distutils-r1 toolchain-funcs
 
 DESCRIPTION="Open source build system"
 HOMEPAGE="http://mesonbuild.com/"
@@ -32,6 +32,16 @@ python_prepare_all() {
        distutils-r1_python_prepare_all
 }
 
+src_test() {
+       if tc-is-gcc; then
+               # LTO fails for static libs because the bfd plugin in missing.
+               # Remove this workaround after sys-devel/gcc-config-2.0 is stable.
+               # https://bugs.gentoo.org/672706
+               tc-getPROG AR gcc-ar >/dev/null
+       fi
+       distutils-r1_src_test
+}
+
 python_test() {
        (
                # test_meson_installed
index 9605fa9af90cbaea9ebfc85bfb7fba1125328d12..5e725b324a15490495491c19df796a4f28f4f80e 100644 (file)
@@ -12,7 +12,7 @@ else
        KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x64-macos ~x64-solaris"
 fi
 
-inherit distutils-r1
+inherit distutils-r1 toolchain-funcs
 
 DESCRIPTION="Open source build system"
 HOMEPAGE="http://mesonbuild.com/"
@@ -32,6 +32,16 @@ python_prepare_all() {
        distutils-r1_python_prepare_all
 }
 
+src_test() {
+       if tc-is-gcc; then
+               # LTO fails for static libs because the bfd plugin in missing.
+               # Remove this workaround after sys-devel/gcc-config-2.0 is stable.
+               # https://bugs.gentoo.org/672706
+               tc-getPROG AR gcc-ar >/dev/null
+       fi
+       distutils-r1_src_test
+}
+
 python_test() {
        (
                # test_meson_installed