x11-libs/pixman: Use tc-has-openmp
authorMatt Turner <mattst88@gentoo.org>
Mon, 17 Jun 2019 15:40:52 +0000 (11:40 -0400)
committerMatt Turner <mattst88@gentoo.org>
Mon, 17 Jun 2019 15:42:04 +0000 (11:42 -0400)
Closes: https://bugs.gentoo.org/684656
Signed-off-by: Matt Turner <mattst88@gentoo.org>
x11-libs/pixman/pixman-0.38.4.ebuild
x11-libs/pixman/pixman-9999.ebuild

index 3fbd5e9c8325e9cf378898f0b6c079a1a676c6ad..b5fcceac9572ae2165f69930a52ca5c7f6aa3345 100644 (file)
@@ -9,7 +9,7 @@ if [[ ${PV} = 9999* ]]; then
        GIT_ECLASS="git-r3"
 fi
 
-inherit ${GIT_ECLASS} meson multilib-minimal
+inherit ${GIT_ECLASS} meson multilib-minimal toolchain-funcs
 
 DESCRIPTION="Low-level pixel manipulation routines"
 HOMEPAGE="http://www.pixman.org/ https://gitlab.freedesktop.org/pixman/pixman/"
@@ -30,6 +30,9 @@ src_unpack() {
 }
 
 multilib_src_configure() {
+       local openmp=disabled
+       tc-has-openmp && openmp=enabled
+
        local emesonargs=(
                $(meson_feature cpu_flags_arm_iwmmxt iwmmxt)
                $(meson_use     cpu_flags_arm_iwmmxt2 iwmmxt2)
@@ -41,7 +44,7 @@ multilib_src_configure() {
                $(meson_feature loongson2f loongson-mmi)
                -Dgtk=disabled
                -Dlibpng=disabled
-               -Dopenmp=auto # only used in unit tests
+               -Dopenmp=$openmp # only used in unit tests
        )
        meson_src_configure
 }
index 58862e4166be36a08ccff14dbd955807d53265a9..0e6923456a80749bfae8f576b287e618183ad5c1 100644 (file)
@@ -9,7 +9,7 @@ if [[ ${PV} = 9999* ]]; then
        GIT_ECLASS="git-r3"
 fi
 
-inherit ${GIT_ECLASS} meson multilib-minimal
+inherit ${GIT_ECLASS} meson multilib-minimal toolchain-funcs
 
 DESCRIPTION="Low-level pixel manipulation routines"
 HOMEPAGE="http://www.pixman.org/ https://gitlab.freedesktop.org/pixman/pixman/"
@@ -30,6 +30,9 @@ src_unpack() {
 }
 
 multilib_src_configure() {
+       local openmp=disabled
+       tc-has-openmp && openmp=enabled
+
        local emesonargs=(
                $(meson_feature cpu_flags_arm_iwmmxt iwmmxt)
                $(meson_use     cpu_flags_arm_iwmmxt2 iwmmxt2)
@@ -41,7 +44,7 @@ multilib_src_configure() {
                $(meson_feature loongson2f loongson-mmi)
                -Dgtk=disabled
                -Dlibpng=disabled
-               -Dopenmp=auto # only used in unit tests
+               -Dopenmp=$openmp # only used in unit tests
        )
        meson_src_configure
 }