commit:     7a834d5d13cdaea1cd1755c88ab35adc49f9a454
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  6 07:21:32 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun  6 07:22:24 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a834d5d

vala.eclass: workaround Vala breakage with Clang 16

Conditionally pass -Wno-incompatible-function-pointer-types for now in 
vala_setup
until Vala itself is fixed.

While this will affect other stuff in the same package, it's limited to when
Vala is enabled, so it's better than before at least. Right now, the situation
is both difficult for users & also blocks further testing.

Thanks to cyrillic for the nudge.

Bug: https://bugs.gentoo.org/892708
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/vala.eclass | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/eclass/vala.eclass b/eclass/vala.eclass
index 11f8e52f92dd..d02cc246977a 100644
--- a/eclass/vala.eclass
+++ b/eclass/vala.eclass
@@ -22,6 +22,8 @@ esac
 if [[ -z ${_VALA_ECLASS} ]] ; then
 _VALA_ECLASS=1
 
+inherit flag-o-matic
+
 # @ECLASS_VARIABLE: VALA_MIN_API_VERSION
 # @DESCRIPTION:
 # Minimum vala API version (e.g. 0.56).
@@ -169,6 +171,10 @@ vala_setup() {
        done
        : 
"${PKG_CONFIG_PATH:="${EPREFIX}/usr/$(get_libdir)/pkgconfig:${EPREFIX}/usr/share/pkgconfig"}"
        export PKG_CONFIG_PATH="${T}/pkgconfig:${PKG_CONFIG_PATH}"
+
+       # See bug #892708.
+       # Workaround for https://gitlab.gnome.org/GNOME/vala/-/issues/1408.
+       append-cflags $(test-flags-CC -Wno-incompatible-function-pointer-types)
 }
 
 # @FUNCTION: vala_src_prepare

Reply via email to