commit:     0088c608826a9ee359815bff9e47201f4a4b8dff
Author:     yemou Hannam <meeyou <AT> tuta <DOT> io>
AuthorDate: Fri Oct 22 02:34:17 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Nov 10 07:50:39 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0088c608

gui-wm/wayfire: add debug useflag

Build wayfire with asan as suggested by upstream for debugging
crashes.

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: yemou Hannam <meeyou <AT> tuta.io>
Closes: https://github.com/gentoo/gentoo/pull/22665
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 gui-wm/wayfire/wayfire-0.7.2.ebuild | 10 ++++++++--
 gui-wm/wayfire/wayfire-9999.ebuild  | 10 ++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/gui-wm/wayfire/wayfire-0.7.2.ebuild 
b/gui-wm/wayfire/wayfire-0.7.2.ebuild
index eca2999b571..50b70ce184d 100644
--- a/gui-wm/wayfire/wayfire-0.7.2.ebuild
+++ b/gui-wm/wayfire/wayfire-0.7.2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit meson
+inherit meson toolchain-funcs
 
 DESCRIPTION="compiz like 3D wayland compositor"
 HOMEPAGE="https://github.com/WayfireWM/wayfire";
@@ -18,7 +18,7 @@ fi
 
 LICENSE="MIT"
 SLOT="0"
-IUSE="+gles +system-wfconfig +system-wlroots X"
+IUSE="debug +gles +system-wfconfig +system-wlroots X"
 
 DEPEND="
        dev-libs/libevdev
@@ -71,7 +71,13 @@ src_configure() {
                $(meson_feature system-wlroots use_system_wlroots)
                $(meson_feature X xwayland)
                $(meson_use gles enable_gles32)
+               $(usex debug --buildtype=debug "")
+               $(usex debug -Db_sanitize=address,undefined "")
        )
+
+       # Clang will fail to link without this
+       tc-is-clang && emesonargs+=( $(usex debug -Db_lundef=false "") )
+
        meson_src_configure
 }
 

diff --git a/gui-wm/wayfire/wayfire-9999.ebuild 
b/gui-wm/wayfire/wayfire-9999.ebuild
index 8c86b4aadda..aa79e894749 100644
--- a/gui-wm/wayfire/wayfire-9999.ebuild
+++ b/gui-wm/wayfire/wayfire-9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit meson
+inherit meson toolchain-funcs
 
 DESCRIPTION="compiz like 3D wayland compositor"
 HOMEPAGE="https://github.com/WayfireWM/wayfire";
@@ -18,7 +18,7 @@ fi
 
 LICENSE="MIT"
 SLOT="0"
-IUSE="+gles +system-wfconfig +system-wlroots X"
+IUSE="debug +gles +system-wfconfig +system-wlroots X"
 
 DEPEND="
        dev-libs/libevdev
@@ -65,7 +65,13 @@ src_configure() {
                $(meson_feature system-wlroots use_system_wlroots)
                $(meson_feature X xwayland)
                $(meson_use gles enable_gles32)
+               $(usex debug --buildtype=debug "")
+               $(usex debug -Db_sanitize=address,undefined "")
        )
+
+       # Clang will fail to link without this
+       tc-is-clang && emesonargs+=( $(usex debug -Db_lundef=false "") )
+
        meson_src_configure
 }
 

Reply via email to