summaryrefslogtreecommitdiff
path: root/dev-libs/glib
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/glib')
-rw-r--r--dev-libs/glib/Manifest12
-rw-r--r--dev-libs/glib/glib-2.76.4.ebuild13
-rw-r--r--dev-libs/glib/glib-2.78.3.ebuild13
-rw-r--r--dev-libs/glib/glib-2.78.4-r1.ebuild13
-rw-r--r--dev-libs/glib/glib-2.78.6.ebuild13
-rw-r--r--dev-libs/glib/glib-2.80.4.ebuild332
-rw-r--r--dev-libs/glib/metadata.xml3
7 files changed, 390 insertions, 9 deletions
diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest
index 36d223e88471..1dc5dd8c0c96 100644
--- a/dev-libs/glib/Manifest
+++ b/dev-libs/glib/Manifest
@@ -5,8 +5,10 @@ DIST glib-2.76.4.tar.xz 5274356 BLAKE2B c9ceb514ea81e1e6ab2d0efc82c48c0d8ae6c997
DIST glib-2.78.3.tar.xz 5321388 BLAKE2B 6ef754b15e1ce4377eafdfc317025ac65c3d8010a8816a0cef786cec9da2af9f7d7d1da735c971ab8c848b2dcec050330e5b0fdceb156a36d739848e6160cd19 SHA512 9c1af75fb973d23ce0286d5b7836eea45f9628c148ced5ac10e10abceda05024ae4c57f01439824d3287d986527500b7b959828b630b6e4a3314b5224f4d7246
DIST glib-2.78.4.tar.xz 5331892 BLAKE2B ada7134597d7d863e581a2bb1097ac07a63b27b53309aadab5b1d3686327ee718ad8c5c07af3fce5cc12328e728fc2c4df5fd9e69f431fa00dc634062ef7f926 SHA512 6f3a06e10e7373a2dbf0688512de4126472fb73cbec488b7983b5ffecff09c64d7e1ca462f892e8f215d3d277d103ca802bad7ef0bd0f91edf26fc6ce67187b6
DIST glib-2.78.6.tar.xz 5344808 BLAKE2B d16173794c4aa019459cf8c8c84d4107fb8393828f41ec6c631b9452890f34f9022ed848a543ed134fdb8a575faef6b941cea3e05de512eb1b7a99f7601a2485 SHA512 8d75f8fd77b6309215ca86a0c7648878efe11051f18b279840c137669017ea4066388f8682367e4ea3f154333d833c9dc28ccd4a66a91f0c3854a40a2838f8da
-EBUILD glib-2.76.4.ebuild 10852 BLAKE2B fd5ef68de939553ae5523bc11fef106c720853175147746845b9c7171e01b2c8a56626c657ea1a1f98154f89d11a1f75c483123a958265251fee431b60ad736f SHA512 7fe4fe4f7742a1a2d12ba4ff030cc9a409ab8de45b8361e49b780f0a8865ccea2cdc9395f81ad67b07bc552a4b4bd04009c51b832d69197d8305991461806d56
-EBUILD glib-2.78.3.ebuild 10852 BLAKE2B fd5ef68de939553ae5523bc11fef106c720853175147746845b9c7171e01b2c8a56626c657ea1a1f98154f89d11a1f75c483123a958265251fee431b60ad736f SHA512 7fe4fe4f7742a1a2d12ba4ff030cc9a409ab8de45b8361e49b780f0a8865ccea2cdc9395f81ad67b07bc552a4b4bd04009c51b832d69197d8305991461806d56
-EBUILD glib-2.78.4-r1.ebuild 11097 BLAKE2B 36e0cfd571bf729138f97b4f59385942b41cc35383a52be2c2e6fbc72734edd1e48e7b74b153b0f828186f6b603e2d07e4f8e7a57429dbe5743eed6bed046db3 SHA512 19c6665c651ab8f6d264574b37b3e10f159c41484d967193a5914a3ec98af909595941c151f11466bbf425bd2931803552a75abe2711b74c7811b2eb3d30700e
-EBUILD glib-2.78.6.ebuild 11048 BLAKE2B d1e3e7304f23939608628036d693a6b70a0bb88188d4babbd76819797a1f8ea4e312a189de21793323ea9c1b3425e2fd2bc0713d621b1f0ac4b4f0c17f348d3b SHA512 ee2e4806598dd293275fd59f63d2ca5725c1e0483d3b8c5ed22c1ef64b1c40c10b2396b4c30e0307a3dc965791e7c4de762dea9814b0fe29cbeb7a4550914aa1
-MISC metadata.xml 1358 BLAKE2B ca4bb1facd33c64aa2d8c2197c97a68e08425bf3bb7cc66b3867e208a8032029cbf3d9bf3b23d38c8268228553d80d0334eacfb61cee82e19f5a7604de26d76d SHA512 d89242c1102b798d82631c4179c362461cf19d12e33cb30afcc3551f2c9b2970ad5f3a594fae504b444de294659693fc76ea560c54794692e492d4eebe23b7b9
+DIST glib-2.80.4.tar.xz 5535760 BLAKE2B 1d2b301703b27a5c2def370e1d44b4f7b08a940969563ce9d8d7c38e5f0a32163b95523e09cedc4a57b2af84a57d63dc545abcb31b61a8066ef62ba396fb4f3c SHA512 efdc7dd1e0609b0f2d988a8cc8fd4a3fda96e8450832f905f7686f9063b727cb996e0e4e638aca62f60b76f9f04be62e089a615413e64cf298c7eef26e074570
+EBUILD glib-2.76.4.ebuild 11145 BLAKE2B 9500014a458c528207d29e2ac5915803203456a5c7d9c2480cef6d960601bbc6b5fe66ea019c3613e1e5c718b3eac1d1d8903bd24b555624bb1ec71e956d8f65 SHA512 c8100dd38f030caca84a54cd51cdd11646614efed488baff3695b33e0cef7bd3ab7490966011a72e87187bbc80e58349a20c544e67c9c675430405e3a876ca12
+EBUILD glib-2.78.3.ebuild 11145 BLAKE2B 9500014a458c528207d29e2ac5915803203456a5c7d9c2480cef6d960601bbc6b5fe66ea019c3613e1e5c718b3eac1d1d8903bd24b555624bb1ec71e956d8f65 SHA512 c8100dd38f030caca84a54cd51cdd11646614efed488baff3695b33e0cef7bd3ab7490966011a72e87187bbc80e58349a20c544e67c9c675430405e3a876ca12
+EBUILD glib-2.78.4-r1.ebuild 11390 BLAKE2B 569236b2fc6694eb09b999b94ce027b8fb9152aa2876ed08199fcbb52b894be1660a42da41c063926844b507d5e89eed8cc40c8049bb71b2a887494245974324 SHA512 8eface9ce9509f9661c8f2e7c51e1ede41e6d0db4589c9987a24a4168bf0c4cebf69835825d4d994c70802052bfe487b77629b45219c0c282351328ba476d26b
+EBUILD glib-2.78.6.ebuild 11340 BLAKE2B c53403ccbcbd18e678f8e2c6e53b39ccc6cb558be4e7f96df26f986a4c51ea86cf601bf0a122c2530dfc762af2a1cbe6e85f524687c738a8eb3940afeb6541a9 SHA512 7c1b4e8e69ca36d6b52855c7edbe4b584d549025d88783010359b96469c98b217dd50819ae971c7bfee637a30bd864b991c3a16cc538492b4c7075d719e30f4c
+EBUILD glib-2.80.4.ebuild 11467 BLAKE2B c0efaa4ab793d792f8ca300fddc586b1f09e477898c962d6ee528330992db8d1a633e176e2079f4302a1e5d904e919599ac9ca1e37cd5a542ccf14aa8c7d9f73 SHA512 7d6fb8190795ac10bb9b31f0f618452dc7ed7f3a1cd84aabb258c4fe6cfb3dcee96b0a4430a2d0b42055687c0736464efb218db22862c48c30e31f90f173b84e
+MISC metadata.xml 1499 BLAKE2B 5a75e3b360e4656fe9127f2dc3ba7e90df3eae0586a025b4eefc2317398e53815c98a8014ea6f0dd69ae8afdafa066eec61c18e9fa86d24c78a3f11404c2a7a8 SHA512 2b12c409bf16cf9e01e80c30a6707aac5b48ca4cdeac3852028c003c6cb2d50b5e82be73adeefb8341fd4f157e0f7d22505cebfc2ee0f6d64ca77a7d3cfa8271
diff --git a/dev-libs/glib/glib-2.76.4.ebuild b/dev-libs/glib/glib-2.76.4.ebuild
index 356bd10b8796..7db7e06790ea 100644
--- a/dev-libs/glib/glib-2.76.4.ebuild
+++ b/dev-libs/glib/glib-2.76.4.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 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
# * elfutils (via libelf) does not build on Windows. gresources are not embedded
# within ELF binaries on that platform anyway and inspecting ELF binaries from
@@ -197,6 +197,17 @@ multilib_src_configure() {
$(meson_native_use_feature elf libelf)
-Dmultiarch=false
)
+
+ # Workaround for bug #938302
+ if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
+ local native_file="${T}"/meson.${CHOST}.ini.local
+ cat >> ${native_file} <<-EOF || die
+ [binaries]
+ dtrace='stap-dtrace'
+ EOF
+ emesonargs+=( --native-file "${native_file}" )
+ fi
+
meson_src_configure
}
diff --git a/dev-libs/glib/glib-2.78.3.ebuild b/dev-libs/glib/glib-2.78.3.ebuild
index 356bd10b8796..7db7e06790ea 100644
--- a/dev-libs/glib/glib-2.78.3.ebuild
+++ b/dev-libs/glib/glib-2.78.3.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 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
# * elfutils (via libelf) does not build on Windows. gresources are not embedded
# within ELF binaries on that platform anyway and inspecting ELF binaries from
@@ -197,6 +197,17 @@ multilib_src_configure() {
$(meson_native_use_feature elf libelf)
-Dmultiarch=false
)
+
+ # Workaround for bug #938302
+ if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
+ local native_file="${T}"/meson.${CHOST}.ini.local
+ cat >> ${native_file} <<-EOF || die
+ [binaries]
+ dtrace='stap-dtrace'
+ EOF
+ emesonargs+=( --native-file "${native_file}" )
+ fi
+
meson_src_configure
}
diff --git a/dev-libs/glib/glib-2.78.4-r1.ebuild b/dev-libs/glib/glib-2.78.4-r1.ebuild
index f3dbbeb1f18b..07ae1aeaba24 100644
--- a/dev-libs/glib/glib-2.78.4-r1.ebuild
+++ b/dev-libs/glib/glib-2.78.4-r1.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 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
# * elfutils (via libelf) does not build on Windows. gresources are not embedded
# within ELF binaries on that platform anyway and inspecting ELF binaries from
@@ -206,6 +206,17 @@ multilib_src_configure() {
$(meson_native_use_feature elf libelf)
-Dmultiarch=false
)
+
+ # Workaround for bug #938302
+ if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
+ local native_file="${T}"/meson.${CHOST}.ini.local
+ cat >> ${native_file} <<-EOF || die
+ [binaries]
+ dtrace='stap-dtrace'
+ EOF
+ emesonargs+=( --native-file "${native_file}" )
+ fi
+
meson_src_configure
}
diff --git a/dev-libs/glib/glib-2.78.6.ebuild b/dev-libs/glib/glib-2.78.6.ebuild
index 8c4031522095..e5481fe4d005 100644
--- a/dev-libs/glib/glib-2.78.6.ebuild
+++ b/dev-libs/glib/glib-2.78.6.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 ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
# * elfutils (via libelf) does not build on Windows. gresources are not embedded
# within ELF binaries on that platform anyway and inspecting ELF binaries from
@@ -205,6 +205,17 @@ multilib_src_configure() {
$(meson_native_use_feature elf libelf)
-Dmultiarch=false
)
+
+ # Workaround for bug #938302
+ if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
+ local native_file="${T}"/meson.${CHOST}.ini.local
+ cat >> ${native_file} <<-EOF || die
+ [binaries]
+ dtrace='stap-dtrace'
+ EOF
+ emesonargs+=( --native-file "${native_file}" )
+ fi
+
meson_src_configure
}
diff --git a/dev-libs/glib/glib-2.80.4.ebuild b/dev-libs/glib/glib-2.80.4.ebuild
new file mode 100644
index 000000000000..beb79e841944
--- /dev/null
+++ b/dev-libs/glib/glib-2.80.4.ebuild
@@ -0,0 +1,332 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_REQ_USE="xml(+)"
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit gnome.org gnome2-utils linux-info meson-multilib multilib python-any-r1 toolchain-funcs xdg
+
+DESCRIPTION="The GLib library of C routines"
+HOMEPAGE="https://www.gtk.org/"
+
+LICENSE="LGPL-2.1+"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="dbus debug +elf doc +introspection +mime selinux static-libs sysprof systemtap test utils xattr"
+RESTRICT="!test? ( test )"
+
+# * elfutils (via libelf) does not build on Windows. gresources are not embedded
+# within ELF binaries on that platform anyway and inspecting ELF binaries from
+# other platforms is not that useful so exclude the dependency in this case.
+# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
+# these are used by GIO, which glib[static-libs] consumers don't really seem
+# to need at all, thus not imposing the deps for now and once some consumers
+# are actually found to static link libgio-2.0.a, we can revisit and either add
+# them or just put the (build) deps in that rare consumer instead of recursive
+# RDEPEND here (due to lack of recursive DEPEND).
+RDEPEND="
+ !<dev-libs/gobject-introspection-1.80.1
+ !<dev-util/gdbus-codegen-${PV}
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+ >=dev-libs/libpcre2-10.32:0=[${MULTILIB_USEDEP},unicode(+),static-libs?]
+ >=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ >=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
+ introspection? ( >=dev-libs/gobject-introspection-1.80.1 )
+ kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
+ xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
+ elf? ( virtual/libelf:0= )
+ sysprof? ( >=dev-util/sysprof-capture-3.40.1:4[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}"
+# libxml2 used for optional tests that get automatically skipped
+BDEPEND="
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxslt
+ >=sys-devel/gettext-0.19.8
+ doc? ( >=dev-util/gi-docgen-2023.1 )
+ dev-python/docutils
+ systemtap? ( >=dev-debug/systemtap-1.3 )
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep '
+ dev-python/packaging[${PYTHON_USEDEP}]
+ ')
+ test? ( >=sys-apps/dbus-1.2.14 )
+ virtual/pkgconfig
+"
+# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
+
+PDEPEND="
+ dbus? ( gnome-base/dconf )
+ mime? ( x11-misc/shared-mime-info )
+"
+# shared-mime-info needed for gio/xdgmime, bug #409481
+# dconf is needed to be able to save settings, bug #498436
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/gio-querymodules$(get_exeext)
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
+)
+
+python_check_deps() {
+ python_has_version "dev-python/packaging[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ if use kernel_linux ; then
+ CONFIG_CHECK="~INOTIFY_USER"
+ if use test ; then
+ CONFIG_CHECK="~IPV6"
+ WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
+ fi
+ linux-info_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ if use test; then
+ # TODO: Review the test exclusions, especially now with meson
+ # Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
+ if ! has_version dev-util/desktop-file-utils ; then
+ ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
+ ewarn "think on installing it to get these tests run."
+ sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
+ sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
+ fi
+
+ # gdesktopappinfo requires existing terminal (gnome-terminal or any
+ # other), falling back to xterm if one doesn't exist
+ #if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
+ # ewarn "Some tests will be skipped due to missing terminal program"
+ # These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
+ # Also try https://gitlab.gnome.org/GNOME/glib/issues/1601 once ready
+ # for backport (or in a bump) and file new issue if still fails
+ sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
+ # desktop-app-info/launch* might fail similarly
+ sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
+ #fi
+
+ # https://bugzilla.gnome.org/show_bug.cgi?id=722604
+ sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
+ sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
+
+ ewarn "Tests for search-utils have been skipped"
+ sed -i -e "/search-utils/d" glib/tests/meson.build || die
+
+ # Play nice with network-sandbox, but this approach would defeat the purpose of the test
+ #sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
+ else
+ # Don't build tests, also prevents extra deps, bug #512022
+ sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
+ fi
+
+ # Don't build fuzzing binaries - not used
+ sed -i -e '/subdir.*fuzzing/d' meson.build || die
+
+ # gdbus-codegen is a separate package
+ sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
+ sed -i -e '/install : true/d' gio/gdbus-2.0/codegen/meson.build || die
+
+ # Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
+ sed -i -e '/install_dir/d' gio/tests/meson.build || die
+
+ cat > "${T}/glib-test-ld-wrapper" <<-EOF
+ #!/usr/bin/env sh
+ exec \${LD:-ld} "\$@"
+ EOF
+ 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
+}
+
+multilib_src_configure() {
+ # TODO: figure a way to pass appropriate values for all cross properties
+ # that glib uses (search for get_cross_property)
+ #if tc-is-cross-compiler ; then
+ # https://bugzilla.gnome.org/show_bug.cgi?id=756473
+ # TODO-meson: This should be in meson cross file as 'growing_stack'
+ # property; and more, look at get_cross_property
+ #case ${CHOST} in
+ #hppa*|metag*) export glib_cv_stack_grows=yes ;;
+ #*) export glib_cv_stack_grows=no ;;
+ #esac
+ #fi
+
+ use debug && EMESON_BUILD_TYPE=debug
+
+ local emesonargs=(
+ -Ddefault_library=$(usex static-libs both shared)
+ -Druntime_dir="${EPREFIX}"/run
+ $(meson_feature selinux)
+ $(meson_use xattr)
+ -Dlibmount=enabled # only used if host_system == 'linux'
+ -Dman-pages=enabled
+ $(meson_use systemtap dtrace)
+ $(meson_use systemtap)
+ $(meson_feature sysprof)
+ $(meson_use doc documentation)
+ $(meson_use test tests)
+ -Dinstalled_tests=false
+ -Dnls=enabled
+ -Doss_fuzz=disabled
+ $(meson_native_use_feature elf libelf)
+ -Dmultiarch=false
+ $(meson_native_use_feature introspection)
+ )
+
+ # Workaround for bug #938302
+ if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
+ local native_file="${T}"/meson.${CHOST}.ini.local
+ cat >> ${native_file} <<-EOF || die
+ [binaries]
+ dtrace='stap-dtrace'
+ EOF
+ emesonargs+=( --native-file "${native_file}" )
+ fi
+
+ meson_src_configure
+}
+
+multilib_src_test() {
+ export XDG_CONFIG_DIRS=/etc/xdg
+ export XDG_DATA_DIRS=/usr/local/share:/usr/share
+ export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
+ export LC_TIME=C # bug #411967
+ export TZ=UTC
+ unset GSETTINGS_BACKEND # bug #596380
+ python_setup
+
+ # https://bugs.gentoo.org/839807
+ local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
+ addpredict /usr/b
+
+ # Related test is a bit nitpicking
+ mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" || die
+ chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" || die
+
+ meson_src_test --timeout-multiplier 20 --no-suite flaky
+}
+
+multilib_src_install() {
+ meson_src_install
+ keepdir /usr/$(get_libdir)/gio/modules
+}
+
+multilib_src_install_all() {
+ # These are installed by dev-util/glib-utils
+ # TODO: With patching we might be able to get rid of the python-any deps
+ # and removals, and test depend on glib-utils instead; revisit now with
+ # meson
+ rm "${ED}/usr/bin/glib-genmarshal" || die
+ rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
+ rm "${ED}/usr/bin/glib-mkenums" || die
+ rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
+ rm "${ED}/usr/bin/gtester-report" || die
+ rm "${ED}/usr/share/man/man1/gtester-report.1" || die
+ # gdbus-codegen manpage installed by dev-util/gdbus-codegen
+ rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
+}
+
+pkg_preinst() {
+ xdg_pkg_preinst
+
+ # Make gschemas.compiled belong to glib alone
+ local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
+
+ if [[ -e ${EROOT}${cache} ]]; then
+ cp "${EROOT}"${cache} "${ED}"/${cache} || die
+ else
+ touch "${ED}"${cache} || die
+ fi
+
+ multilib_pkg_preinst() {
+ # Make giomodule.cache belong to glib alone
+ local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
+
+ if [[ -e ${EROOT}${cache} ]]; then
+ cp "${EROOT}"${cache} "${ED}"${cache} || die
+ else
+ touch "${ED}"${cache} || die
+ fi
+ }
+
+ # Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
+ # file due to inability to create it and GIO might not look at any of the modules there
+ if ! tc-is-cross-compiler ; then
+ multilib_foreach_abi multilib_pkg_preinst
+ fi
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+ # glib installs no schemas itself, but we force update for fresh install in case
+ # something has dropped in a schemas file without direct glib dep; and for upgrades
+ # in case the compiled schema format could have changed
+ gnome2_schemas_update
+
+ multilib_pkg_postinst() {
+ gnome2_giomodule_cache_update \
+ || die "Update GIO modules cache failed (for ${ABI})"
+ }
+ if ! tc-is-cross-compiler ; then
+ multilib_foreach_abi multilib_pkg_postinst
+ else
+ ewarn "Updating of GIO modules cache skipped due to cross-compilation."
+ ewarn "You might want to run gio-querymodules manually on the target for"
+ ewarn "your final image for performance reasons and re-run it when packages"
+ ewarn "installing GIO modules get upgraded or added to the image."
+ fi
+
+ for v in ${REPLACING_VERSIONS}; do
+ if ver_test "$v" "-lt" "2.63.6"; then
+ ewarn "glib no longer installs the gio-launch-desktop binary. You may need"
+ ewarn "to restart your session for \"Open With\" dialogs to work."
+ fi
+ done
+}
+
+pkg_postrm() {
+ xdg_pkg_postrm
+ gnome2_schemas_update
+
+ if [[ -z ${REPLACED_BY_VERSION} ]]; then
+ multilib_pkg_postrm() {
+ rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache || die
+ }
+ multilib_foreach_abi multilib_pkg_postrm
+ rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled || die
+ fi
+}
diff --git a/dev-libs/glib/metadata.xml b/dev-libs/glib/metadata.xml
index 30120d5d64c7..2566d0dec213 100644
--- a/dev-libs/glib/metadata.xml
+++ b/dev-libs/glib/metadata.xml
@@ -14,6 +14,9 @@
Enable support for listing and extracting from
ELF resource files with gresource tool
</flag>
+ <flag name="introspection">
+ Enable generating introspection data (requires <pkg>dev-libs/gobject-introspection</pkg> )
+ </flag>
<flag name="mime">
Pull in shared MIME database that many glib-based
applications require at runtime to detect or open files. Warning: