commit:     fc4b2f1af84212f6b75e77d083008d5705e6b88a
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 23 15:08:52 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Sep 23 15:18:20 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc4b2f1a

gui-wm/wayfire: add openmp USE flag and checks

Closes: https://bugs.gentoo.org/940040
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 gui-wm/wayfire/wayfire-0.9.0.ebuild | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/gui-wm/wayfire/wayfire-0.9.0.ebuild 
b/gui-wm/wayfire/wayfire-0.9.0.ebuild
index 4d9595e505b1..cc5975a96622 100644
--- a/gui-wm/wayfire/wayfire-0.9.0.ebuild
+++ b/gui-wm/wayfire/wayfire-0.9.0.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit meson
+inherit meson toolchain-funcs
 
 DESCRIPTION="compiz like 3D wayland compositor"
 HOMEPAGE="https://github.com/WayfireWM/wayfire";
@@ -19,7 +19,7 @@ else
 fi
 
 LICENSE="MIT"
-IUSE="+dbus +gles3 test X"
+IUSE="X +dbus +gles3 openmp test"
 RESTRICT="!test? ( test )"
 
 # bundled wlroots has the following dependency string according to included 
headers.
@@ -57,8 +57,22 @@ DEPEND="
 BDEPEND="
        dev-util/wayland-scanner
        virtual/pkgconfig
+       openmp? (
+               || (
+                       sys-devel/gcc[openmp]
+                       sys-devel/clang-runtime[openmp]
+               )
+       )
 "
 
+pkg_pretend() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+       [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
 src_prepare() {
        default
 
@@ -74,6 +88,7 @@ src_configure() {
                $(meson_feature test tests)
                $(meson_feature X xwayland)
                $(meson_use gles3 enable_gles32)
+               $(meson_use openmp enable_openmp)
                -Duse_system_wfconfig=enabled
                -Duse_system_wlroots=enabled
        )

Reply via email to