commit:     68ff644e7e8a247fb20698e1dfb32ba204a5fd8d
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed May  3 11:49:09 2023 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed May  3 11:49:14 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68ff644e

dev-libs/glib-2.76.2: fix for Prefix, add keywords

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 dev-libs/glib/glib-2.76.2.ebuild | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/dev-libs/glib/glib-2.76.2.ebuild b/dev-libs/glib/glib-2.76.2.ebuild
index 82c17d96b107..ec20446855bd 100644
--- a/dev-libs/glib/glib-2.76.2.ebuild
+++ b/dev-libs/glib/glib-2.76.2.ebuild
@@ -16,7 +16,7 @@ IUSE="dbus debug +elf gtk-doc +mime selinux static-libs 
sysprof systemtap test u
 RESTRICT="!test? ( test )"
 REQUIRED_USE="gtk-doc? ( test )" # Bug #777636
 
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 
~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 
~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~amd64-linux ~x86-linux 
~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris 
~x86-solaris ~x86-winnt"
 
 # * elfutils (via libelf) does not build on Windows. gresources are not 
embedded
 # within ELF binaries on that platform anyway and inspecting ELF binaries from
@@ -131,6 +131,30 @@ src_prepare() {
        chmod a+x "${T}/glib-test-ld-wrapper" || die
        sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build 
|| die
 
+       # make default sane for us
+       if use prefix ; then
+               sed -i -e "s:/usr/local:${EPREFIX}/usr:" gio/xdgmime/xdgmime.c 
|| die
+               # bug #308609, without path, bug #314057
+               export PERL=perl
+       fi
+
+       if [[ ${CHOST} == *-solaris* ]] ; then
+               # fix standards conflicts
+               sed -i \
+                       -e 
's/\<\(_XOPEN_SOURCE_EXTENDED\)\>/_POSIX_PTHREAD_SEMANTICS/' \
+                       -e '/\<_XOPEN_SOURCE\>/s/\<2\>/600/' \
+                       meson.build || die
+               sed -i -e '/#define\s\+_POSIX_SOURCE/d' \
+                       glib/giounix.c || die
+       fi
+
+       # disable native macOS integrations
+       sed -i -e '/glib_conf.set(.HAVE_\(CARBON\|COCOA\).)/s/true/false/' \
+               meson.build || die
+       sed -i \
+               -e '/AvailabilityMacros.h/d' \
+               gio/giomodule.c || die
+
        default
        gnome2_environment_reset
        # TODO: python_name sedding for correct python shebang? Might be 
relevant mainly for glib-utils only

Reply via email to