From 044c6322e1749ef61e123c4cf0caa7c6ec2b96d0 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Mon, 3 Jun 2013 22:27:50 +0200 Subject: dev-libs/glib: Fix building for mingw target by defining the correct --with-threads option, bug #472218 Package-Manager: portage-2.1.12.2 --- dev-libs/glib/ChangeLog | 11 + dev-libs/glib/Manifest | 12 +- .../files/glib-2.31.x-external-gdbus-codegen.patch | 99 ++++++++ dev-libs/glib/files/glib-2.32.4-bashcomp.patch | 27 +++ ...ib-2.34.0-testsuite-skip-gdbus-auth-tests.patch | 62 +++++ .../files/glib-2.34.0-testsuite-skip-thread4.patch | 44 ++++ .../glib/files/glib-2.34.3-automake-1.13.patch | 23 ++ dev-libs/glib/glib-2.34.3.ebuild | 249 +++++++++++++++++++++ dev-libs/glib/metadata.xml | 7 + 9 files changed, 532 insertions(+), 2 deletions(-) create mode 100644 dev-libs/glib/files/glib-2.31.x-external-gdbus-codegen.patch create mode 100644 dev-libs/glib/files/glib-2.32.4-bashcomp.patch create mode 100644 dev-libs/glib/files/glib-2.34.0-testsuite-skip-gdbus-auth-tests.patch create mode 100644 dev-libs/glib/files/glib-2.34.0-testsuite-skip-thread4.patch create mode 100644 dev-libs/glib/files/glib-2.34.3-automake-1.13.patch create mode 100644 dev-libs/glib/glib-2.34.3.ebuild (limited to 'dev-libs') diff --git a/dev-libs/glib/ChangeLog b/dev-libs/glib/ChangeLog index e3ec8bc4..e3ff2d74 100644 --- a/dev-libs/glib/ChangeLog +++ b/dev-libs/glib/ChangeLog @@ -2,6 +2,17 @@ # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*glib-2.34.3 (03 Jun 2013) + + 03 Jun 2013; Bertrand Jacquin + +files/glib-2.31.x-external-gdbus-codegen.patch, + +files/glib-2.32.4-bashcomp.patch, + +files/glib-2.34.0-testsuite-skip-gdbus-auth-tests.patch, + +files/glib-2.34.0-testsuite-skip-thread4.patch, + +files/glib-2.34.3-automake-1.13.patch, +glib-2.34.3.ebuild, metadata.xml: + dev-libs/glib: Fix building for mingw target by defining the correct --with- + threads option, bug #472218 + 03 Jun 2013; Bertrand Jacquin -files/glib-2.18.4-BJA-strfuncs-std99-Makefile.am.diff: dev-libs/glib: remove unused patch diff --git a/dev-libs/glib/Manifest b/dev-libs/glib/Manifest index f772d4dd..f96358ea 100644 --- a/dev-libs/glib/Manifest +++ b/dev-libs/glib/Manifest @@ -2,9 +2,17 @@ AUX glib-2.10.3-ia64-atomic-ops.patch 1058 SHA256 ad9cad6793626b4e36a59aa6cb8396 AUX glib-2.12.12-fbsd.patch 668 SHA256 23b0dc406d3d45fe125268b731af67147e83f6e38a63c7892828bdbfe1c31e8d WHIRLPOOL 1a90159aa6ac5f5f5dcb4f7225343af88d43540b802f2588279c60d5f27f51e5411ad29441ad10ad5adb947cf7d73016e93fb02d64203375f851758e680690ab AUX glib-2.18.1-workaround-gio-test-failure-without-userpriv.patch 616 SHA256 e64ad4fbd67f142f5a19b29eab323bf18856309ed064e7a9f838b6c1c38a8adb WHIRLPOOL 1707097837ccf374654bf40f7142adbfbbd27330cbf4405cbb5250a197da09641c2a5f1c5e468480a869cf8c6bc2162e09700b1e68d87e63710d20dcc2d3c5b6 AUX glib-2.18.4-BJA-strfuncs-std99-Makefile.in.diff 4101 SHA256 360e5fa05eabb6c74b2f671f3a079a41d25dfc3e158252ae57c3356bef8ab504 WHIRLPOOL 4f5e0ea1dc10c703d68d72e49dd9e9884fa26b6c78d1ab1954de4c6824fc1736b95878b00f2f8761a27e61d5f738686d9217dcae3183e88ec06764ff7ce6b225 +AUX glib-2.31.x-external-gdbus-codegen.patch 3504 SHA256 47a0f2f2a99a50042063952994c8538097dee14ea5b2ca39f1c168092c645c6e WHIRLPOOL c64cdb643d36df9b20f386aee75f285f3cf17366f2ec3a93370e365a54d72454085cbd3b043ca4fd919115575d46c07a5bf972dee4981aab736bc9da0ca41203 +AUX glib-2.32.4-bashcomp.patch 843 SHA256 262a3689dc030712eea1349ee96cbf21123b0329c78629e2e80cd9917ac415fb WHIRLPOOL 87d57428ef8626ab9f207e6a7df896748912c717fdc8aef3ebf1de73b72899fd5adfd97800ec4ce2fd38528f16267778a26492f79a85dd42f99734e1fa299ffb +AUX glib-2.34.0-testsuite-skip-gdbus-auth-tests.patch 1784 SHA256 00ff3dd00872158eaf5a9e622d0877b8003c16880af07ceb9fed4d4bdfba69a1 WHIRLPOOL 211ad59497093b34c313f22884b0a29a7a9973167e6a56f4737962d590b30ae7fd2dd9b1d9843c6d247cba8ee0d866cb1981a30c363aa19c711d32145a15e345 +AUX glib-2.34.0-testsuite-skip-thread4.patch 1312 SHA256 65ed09251a66b096df38431fde13335038e26c4fa973534af68948757801a3a5 WHIRLPOOL 8da1696ce6fd7fac83bef9563baf71e2b67b3e194ab3e631d238dc6e0a2d5493dc7a7f3af61bfa64a2023b0554ecaf3c523e7d9edea30e22f3615186e63f14cc +AUX glib-2.34.3-automake-1.13.patch 645 SHA256 a8f4bd4bfa03e2d4014af5e3ce899188bd935bfb4917444c2b09f1a493ebfacb WHIRLPOOL 585cd5ee5cb1a52f62a4db7056f7fe3d6c3886e77870637f25ef52386330e544cf8590a05a72d095cca9ed0bf1bae86e1fae99c886039736b4ba7b06dff15429 AUX glib-2.6.3-testglib-ssp.patch 344 SHA256 c2ece3d7b4533e3bfbe8100df5d0824176d9dfa0b18697a8919162956c8ebfa8 WHIRLPOOL f0bfe963ff947a1764a6f9837301d5ef0278a75682ed2b8a5e79e89781c4965b2b50b9749150b8e123bf6ad3afcee7a6695a48674c35bc06a5502973b7e620fb AUX glib2-CVE-2008-4316.patch 2692 SHA256 c249ef6513c2490e9efe836e9d41a4a5f1056979748e2535b8ec7d13a71b1bf0 WHIRLPOOL 1f2749c086ae408d193d4d99ffcfd23cba1a043a5271e29f5b519fe9e1b210a8e8ec57229ce66f58a55130561762395b7a0095c15bb6d963e04beef050044ab0 DIST glib-2.18.4.tar.bz2 4809051 SHA256 6aeb2c845e9fdc388943acdaba2f6357e3007c5ffaa8d666904679cfb40de100 +DIST glib-2.34.3.tar.xz 6334872 SHA256 855fcbf87cb93065b488358e351774d8a39177281023bae58c286f41612658a7 WHIRLPOOL 296f29666bdd38faae41a1b0b7875dd5fb6ac23d5d27282658e73bbb614db944b3a92d5334ddcca19f959e4c5ef2bf20a5b0f19390558645f986afc2f84edd4d +DIST pkg-config-0.26.tar.gz 396399 SHA256 94c1936a797c930fb3e4e5a154165b6268caba22b32d24083dd4c492a533c8af WHIRLPOOL f535946a02192a9bffc7be0fae454e25aa86af8bac7f47622d52ed13f77f1ba05ff9b5693b2a501981e3991e4e1595eced22dee4ab748b310baa7d57267a62a7 EBUILD glib-2.18.4-r1.ebuild 2608 SHA256 9bd91324b9c343233e87a95b338b08afc50093a061a96e458dc2ce605f69d235 WHIRLPOOL 5d367f6923df123a2fea7caa6945d589011fd9b7c9ee610cfbe8875b16b038e1dc6eff512f42d616b57aaf5b89c14f2bb253689422cc03509cb216d9ae9e8f44 -MISC ChangeLog 973 SHA256 fee9f02dd33f22f297c7fe967754302d730131f345b7104da1c26eb849613b01 WHIRLPOOL 38362267f4d82de0682b72d0e0d25c68dc3ad5475e866ddc6a54b158fa1b013feaaf53be8b62f8df8a72e9801ac99c86a78dcde52e5fc37e6da3c0dfaf057bcc -MISC metadata.xml 139 SHA256 5cdc1888ebc8807b9a37b1d33429c61cabe7415a4f240e21a4c2ff8eca7a34ed WHIRLPOOL 620431014dd4fb752c3d46d11904ecb2c6d4525f5b4e30f4f778a3b74d3f7187ae4ccd856ebd7eabb48ce261b21849c732928fe647edce024a3fdc082d8f8630 +EBUILD glib-2.34.3.ebuild 8666 SHA256 80c19f11dc7f2a0d3f6d1148dd332d70f6a4ffa70d529ca89ad7040c40dbab0f WHIRLPOOL dbefea7e43dca7a69599108ce2a731c6b409eb00b45756d3a51a67415cc89435d1f9617277725d3a2391b4a3dd8d3762ac3cf27f7c18c274bb6f58fb944d73f1 +MISC ChangeLog 1440 SHA256 cf733fa0cc5c98d838e5ad43c8072b14e28a03a8f353568346dd13b6bd605d66 WHIRLPOOL 3b5b202f050449447bf109b4f9e1777f031dcff7e29e832d32f750c0fe353f81fa152c0cb407d8de6b8fd9900af63025eeb9d015cb78130b22ea7b61a21f8cdf +MISC metadata.xml 396 SHA256 15590ae8a4e9724b07cdc4766f62257c604ffb256acc15f065e005a34cfe81cb WHIRLPOOL 0cc2b231d0d1f14e31361c4160f9164af7972d3832e475655cc1fbc7be3bf948ea40f295de55583b065a5b17af7842d03f6d4c869c7f65bae1306b4faf00eae4 diff --git a/dev-libs/glib/files/glib-2.31.x-external-gdbus-codegen.patch b/dev-libs/glib/files/glib-2.31.x-external-gdbus-codegen.patch new file mode 100644 index 00000000..df1378eb --- /dev/null +++ b/dev-libs/glib/files/glib-2.31.x-external-gdbus-codegen.patch @@ -0,0 +1,99 @@ +From 732f04b55f59b8107a7fbe317317edb5f184ea8f Mon Sep 17 00:00:00 2001 +From: Priit Laes +Date: Fri, 3 Feb 2012 09:08:28 +0200 +Subject: [PATCH] Split out gdbus codegen + +--- + configure.ac | 4 +--- + docs/reference/gio/Makefile.am | 3 +-- + gio/Makefile.am | 2 +- + gio/tests/Makefile.am | 6 ++---- + gio/tests/gdbus-object-manager-example/Makefile.am | 6 ++---- + 5 files changed, 7 insertions(+), 14 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 4cf04a1..0bb18c8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -356,7 +356,7 @@ fi + AC_SUBST(PERL_PATH) + + # Need suitable python path for greport +-AM_PATH_PYTHON(2.5,,PYTHON="/usr/bin/env python2.5") ++# AM_PATH_PYTHON(2.5,,PYTHON="/usr/bin/env python2.5") + + + dnl *********************** +@@ -3525,8 +3525,6 @@ gobject/glib-mkenums + gobject/tests/Makefile + gthread/Makefile + gio/Makefile +-gio/gdbus-2.0/codegen/Makefile +-gio/gdbus-2.0/codegen/config.py + gio/xdgmime/Makefile + gio/inotify/Makefile + gio/fen/Makefile +diff --git a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am +index 535aa26..5027dd5 100644 +--- a/docs/reference/gio/Makefile.am ++++ b/docs/reference/gio/Makefile.am +@@ -144,8 +144,7 @@ man_MANS = \ + glib-compile-resources.1 \ + gsettings.1 \ + gresource.1 \ +- gdbus.1 \ +- gdbus-codegen.1 ++ gdbus.1 + + if ENABLE_MAN + +diff --git a/gio/Makefile.am b/gio/Makefile.am +index 67eeae6..277931b 100644 +--- a/gio/Makefile.am ++++ b/gio/Makefile.am +@@ -2,7 +2,7 @@ include $(top_srcdir)/Makefile.decl + + NULL = + +-SUBDIRS = gdbus-2.0/codegen ++SUBDIRS = + + if OS_UNIX + SUBDIRS += xdgmime +diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am +index e987fd1..66af8cf 100644 +--- a/gio/tests/Makefile.am ++++ b/gio/tests/Makefile.am +@@ -275,10 +275,8 @@ gdbus_close_pending_SOURCES = gdbus-close-pending.c gdbus-sessionbus.c gdbus-ses + gdbus_close_pending_LDADD = $(progs_ldadd) + + if OS_UNIX +-gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c : test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen +- $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \ +- UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \ +- $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \ ++gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c : test-codegen.xml Makefile ++ $(AM_V_GEN) gdbus-codegen \ + --interface-prefix org.project. \ + --generate-c-code gdbus-test-codegen-generated \ + --c-generate-object-manager \ +diff --git a/gio/tests/gdbus-object-manager-example/Makefile.am b/gio/tests/gdbus-object-manager-example/Makefile.am +index 9861d0e..9ca6eb9 100644 +--- a/gio/tests/gdbus-object-manager-example/Makefile.am ++++ b/gio/tests/gdbus-object-manager-example/Makefile.am +@@ -21,10 +21,8 @@ GDBUS_GENERATED = \ + gdbus-example-objectmanager-generated-org.gtk.GDBus.Example.ObjectManager.Cat.xml \ + $(NULL) + +-$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen +- $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \ +- UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \ +- $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \ ++$(GDBUS_GENERATED) : gdbus-example-objectmanager.xml Makefile ++ $(AM_V_GEN) gdbus-codegen \ + --interface-prefix org.gtk.GDBus.Example.ObjectManager. \ + --c-namespace Example \ + --c-generate-object-manager \ +-- +1.7.8.4 + diff --git a/dev-libs/glib/files/glib-2.32.4-bashcomp.patch b/dev-libs/glib/files/glib-2.32.4-bashcomp.patch new file mode 100644 index 00000000..33abffcf --- /dev/null +++ b/dev-libs/glib/files/glib-2.32.4-bashcomp.patch @@ -0,0 +1,27 @@ +From 6d032421b4871105e1f37bb75a5ec7b012f19f61 Mon Sep 17 00:00:00 2001 +From: Alexandre Rostovtsev +Date: Sun, 15 Jul 2012 22:30:07 -0400 +Subject: [PATCH] gio: use /usr/share/bash-completion for bashcomp + +In Gentoo, we use /usr/share/bash-completion, not +/usr/share/bash-completion/completions. +--- + gio/Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/gio/Makefile.am b/gio/Makefile.am +index 704367c..bee9dc6 100644 +--- a/gio/Makefile.am ++++ b/gio/Makefile.am +@@ -715,7 +715,7 @@ gdbus_LDADD = libgio-2.0.la \ + $(top_builddir)/glib/libglib-2.0.la \ + $(top_builddir)/gobject/libgobject-2.0.la + +-completiondir = $(datadir)/bash-completion/completions ++completiondir = $(datadir)/bash-completion + completion_DATA = \ + completion/gdbus \ + completion/gsettings \ +-- +1.7.8.6 + diff --git a/dev-libs/glib/files/glib-2.34.0-testsuite-skip-gdbus-auth-tests.patch b/dev-libs/glib/files/glib-2.34.0-testsuite-skip-gdbus-auth-tests.patch new file mode 100644 index 00000000..aff75cbe --- /dev/null +++ b/dev-libs/glib/files/glib-2.34.0-testsuite-skip-gdbus-auth-tests.patch @@ -0,0 +1,62 @@ +From 6e6aa7de746b78bc5fc6d2cad1cac762f6d2205f Mon Sep 17 00:00:00 2001 +From: Priit Laes +Date: Tue, 3 Jul 2012 12:50:44 +0300 +Subject: [PATCH] Gentoo: skip over gdbus-auth /gdbus/auth/*/DBUS_COOKIE_SHA1 + tests + +https://bugzilla.gnome.org/show_bug.cgi?id=679308 +--- + gio/tests/gdbus-auth.c | 9 +++++++++ + 1 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/gio/tests/gdbus-auth.c b/gio/tests/gdbus-auth.c +index 737770e..9f42c24 100644 +--- a/gio/tests/gdbus-auth.c ++++ b/gio/tests/gdbus-auth.c +@@ -89,11 +89,14 @@ auth_client_external (void) + auth_client_mechanism ("EXTERNAL"); + } + ++#if 0 ++// https://bugzilla.gnome.org/show_bug.cgi?id=679308 + static void + auth_client_dbus_cookie_sha1 (void) + { + auth_client_mechanism ("DBUS_COOKIE_SHA1"); + } ++#endif + + /* ---------------------------------------------------------------------------------------------------- */ + +@@ -250,11 +253,13 @@ auth_server_external (void) + auth_server_mechanism ("EXTERNAL"); + } + ++#if 0 + static void + auth_server_dbus_cookie_sha1 (void) + { + auth_server_mechanism ("DBUS_COOKIE_SHA1"); + } ++#endif + + /* ---------------------------------------------------------------------------------------------------- */ + +@@ -272,10 +277,14 @@ main (int argc, + session_bus_up (); + + g_test_add_func ("/gdbus/auth/client/EXTERNAL", auth_client_external); ++#if 0 + g_test_add_func ("/gdbus/auth/client/DBUS_COOKIE_SHA1", auth_client_dbus_cookie_sha1); ++#endif + g_test_add_func ("/gdbus/auth/server/ANONYMOUS", auth_server_anonymous); + g_test_add_func ("/gdbus/auth/server/EXTERNAL", auth_server_external); ++#if 0 + g_test_add_func ("/gdbus/auth/server/DBUS_COOKIE_SHA1", auth_server_dbus_cookie_sha1); ++#endif + + ret = g_test_run(); + +-- +1.7.8.6 + diff --git a/dev-libs/glib/files/glib-2.34.0-testsuite-skip-thread4.patch b/dev-libs/glib/files/glib-2.34.0-testsuite-skip-thread4.patch new file mode 100644 index 00000000..f409094a --- /dev/null +++ b/dev-libs/glib/files/glib-2.34.0-testsuite-skip-thread4.patch @@ -0,0 +1,44 @@ +From 8a8112aad6dc98aaaf9767b31e48f5ae8fabd858 Mon Sep 17 00:00:00 2001 +From: Priit Laes +Date: Tue, 3 Jul 2012 11:21:56 +0300 +Subject: [PATCH] Gentoo: skip over thread/thread4 test failure + +https://bugzilla.gnome.org/show_bug.cgi?id=679306 +--- + glib/tests/thread.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/glib/tests/thread.c b/glib/tests/thread.c +index 29b3850..ffe8087 100644 +--- a/glib/tests/thread.c ++++ b/glib/tests/thread.c +@@ -124,6 +124,8 @@ test_thread3 (void) + g_assert_cmpint (GPOINTER_TO_INT(result), ==, 9); + } + ++#if 0 ++// https://bugzilla.gnome.org/show_bug.cgi?id=679306 + /* test that thread creation fails as expected, + * by setting RLIMIT_NPROC ridiculously low + */ +@@ -152,6 +154,7 @@ test_thread4 (void) + g_error ("resetting RLIMIT_NPROC failed: %s\n", g_strerror (ret)); + #endif + } ++#endif + + static void + test_thread5 (void) +@@ -195,7 +198,9 @@ main (int argc, char *argv[]) + g_test_add_func ("/thread/thread1", test_thread1); + g_test_add_func ("/thread/thread2", test_thread2); + g_test_add_func ("/thread/thread3", test_thread3); ++#if 0 + g_test_add_func ("/thread/thread4", test_thread4); ++#endif + g_test_add_func ("/thread/thread5", test_thread5); + g_test_add_func ("/thread/thread6", test_thread6); + +-- +1.7.8.6 + diff --git a/dev-libs/glib/files/glib-2.34.3-automake-1.13.patch b/dev-libs/glib/files/glib-2.34.3-automake-1.13.patch new file mode 100644 index 00000000..5f4e7b6b --- /dev/null +++ b/dev-libs/glib/files/glib-2.34.3-automake-1.13.patch @@ -0,0 +1,23 @@ +Replace macros deprecated in automake-1.13; fixed upstream in glib-2.36 + +diff --git a/configure.ac b/configure.ac +index a3567b3..3e3d697 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -56,7 +56,7 @@ m4_define([glib_debug_default], + AC_INIT(glib, [glib_version], + [http://bugzilla.gnome.org/enter_bug.cgi?product=glib]) + +-AC_CONFIG_HEADER([config.h]) ++AC_CONFIG_HEADERS([config.h]) + AC_CONFIG_SRCDIR([glib/glib.h]) + AC_CONFIG_MACRO_DIR([m4macros]) + +@@ -291,7 +291,6 @@ AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=) + AM_CONDITIONAL(HAVE_CXX, [test "$CXX" != ""]) + AC_LANG_RESTORE + +-AM_PROG_CC_STDC + AM_PROG_CC_C_O + AC_PROG_INSTALL + diff --git a/dev-libs/glib/glib-2.34.3.ebuild b/dev-libs/glib/glib-2.34.3.ebuild new file mode 100644 index 00000000..96c5648c --- /dev/null +++ b/dev-libs/glib/glib-2.34.3.ebuild @@ -0,0 +1,249 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/glib-2.34.3.ebuild,v 1.5 2013/04/30 14:29:12 tetromino Exp $ + +EAPI="5" +PYTHON_DEPEND="utils? 2" # Avoid runtime dependency on python when USE=test + +inherit autotools gnome.org libtool eutils flag-o-matic gnome2-utils multilib pax-utils python toolchain-funcs virtualx linux-info + +DESCRIPTION="The GLib library of C routines" +HOMEPAGE="http://www.gtk.org/" +SRC_URI="${SRC_URI} + http://pkgconfig.freedesktop.org/releases/pkg-config-0.26.tar.gz" # pkg.m4 for eautoreconf + +LICENSE="LGPL-2+" +SLOT="2" +IUSE="debug fam kernel_linux selinux static-libs systemtap test utils xattr" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" + +RDEPEND="virtual/libiconv + virtual/libffi + sys-libs/zlib + || ( + >=dev-libs/elfutils-0.142 + >=dev-libs/libelf-0.8.12 ) + xattr? ( sys-apps/attr ) + fam? ( virtual/fam ) + utils? ( >=dev-util/gdbus-codegen-${PV} )" +DEPEND="${RDEPEND} + app-text/docbook-xml-dtd:4.1.2 + >=dev-libs/libxslt-1.0 + >=sys-devel/gettext-0.11 + >=dev-util/gtk-doc-am-1.15 + systemtap? ( >=dev-util/systemtap-1.3 ) + test? ( + sys-devel/gdb + =dev-lang/python-2* + >=dev-util/gdbus-codegen-${PV} + >=sys-apps/dbus-1.2.14 ) + !& /dev/null; then + if has_version sys-apps/dbus; then + export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include" + export DBUS1_LIBS="-ldbus-1" + fi + export LIBFFI_CFLAGS="-I$(echo /usr/$(get_libdir)/libffi-*/include)" + export LIBFFI_LIBS="-lffi" + fi + + local myconf + + case "${CHOST}" in + *-mingw*) myconf="${myconf} --with-threads=win32" ;; + *) myconf="${myconf} --with-threads=posix" ;; + esac + + # Building with --disable-debug highly unrecommended. It will build glib in + # an unusable form as it disables some commonly used API. Please do not + # convert this to the use_enable form, as it results in a broken build. + # -- compnerd (3/27/06) + use debug && myconf="--enable-debug" + + if use test; then + myconf="${myconf} --enable-modular-tests" + else + if [[ ${PV} = 9999 ]] && use doc; then + # need to build tests if USE=doc for bug #387385 + myconf="${myconf} --enable-modular-tests" + else + myconf="${myconf} --disable-modular-tests" + fi + fi + + # Always use internal libpcre, bug #254659 + econf ${myconf} \ + $(use_enable xattr) \ + $(use_enable fam) \ + $(use_enable selinux) \ + $(use_enable static-libs static) \ + $(use_enable systemtap dtrace) \ + $(use_enable systemtap systemtap) \ + --enable-man \ + --with-pcre=internal \ + --with-xml-catalog="${EPREFIX}/etc/xml/catalog" +} + +src_install() { + local f + + # install-exec-hook substitutes ${PYTHON} in glib/gtester-report + emake DESTDIR="${D}" PYTHON="${EPREFIX}/usr/bin/python2" install + + if ! use utils; then + rm "${ED}usr/bin/gtester-report" + fi + + # Do not install charset.alias even if generated, leave it to libiconv + rm -f "${ED}/usr/lib/charset.alias" + + # Don't install gdb python macros, bug 291328 + rm -rf "${ED}/usr/share/gdb/" "${ED}/usr/share/glib-2.0/gdb/" + + dodoc AUTHORS ChangeLog* NEWS* README + + # Completely useless with or without USE static-libs, people need to use + # pkg-config + prune_libtool_files --modules +} + +src_test() { + gnome2_environment_reset + + unset DBUS_SESSION_BUS_ADDRESS + export XDG_CONFIG_DIRS=/etc/xdg + export XDG_DATA_DIRS=/usr/local/share:/usr/share + export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp" + unset GSETTINGS_BACKEND # bug 352451 + export LC_TIME=C # bug #411967 + + # Related test is a bit nitpicking + mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" + chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" + + # Hardened: gdb needs this, bug #338891 + if host-is-pax ; then + pax-mark -mr "${S}"/tests/.libs/assert-msg-test \ + || die "Hardened adjustment failed" + fi + + # Need X for dbus-launch session X11 initialization + Xemake check +} + +pkg_preinst() { + # Only give the introspection message if: + # * The user has gobject-introspection + # * Has glib already installed + # * Previous version was different from new version + # TODO: add a subslotted virtual to trigger this automatically + if has_version "dev-libs/gobject-introspection" && ! has_version "=${CATEGORY}/${PF}"; then + ewarn "You must rebuild gobject-introspection so that the installed" + ewarn "typelibs and girs are regenerated for the new APIs in glib" + fi +} + +pkg_postinst() { + # Inform users about possible breakage when updating glib and not dbus-glib, bug #297483 + # TODO: add a subslotted virtual to trigger this automatically + if has_version dev-libs/dbus-glib; then + ewarn "If you experience a breakage after updating dev-libs/glib try" + ewarn "rebuilding dev-libs/dbus-glib" + fi + + if has_version ' + gnome + + Build support for profiling and tracing using + dev-util/systemtap + Install gtester-report utility to generate test + report files for your software. + -- cgit v1.2.3