Add fix from upstream for building with C++ compilers.
authorMike Frysinger <vapier@gentoo.org>
Tue, 10 Jan 2012 21:25:05 +0000 (21:25 +0000)
committerMike Frysinger <vapier@gentoo.org>
Tue, 10 Jan 2012 21:25:05 +0000 (21:25 +0000)
Package-Manager: portage-2.2.0_alpha84/cvs/Linux x86_64

dev-libs/glib/ChangeLog
dev-libs/glib/Manifest
dev-libs/glib/files/glib-2.30.2-missing-decls.patch [new file with mode: 0644]
dev-libs/glib/glib-2.30.2-r1.ebuild [new file with mode: 0644]

index 29abcb90f6ba44c4f7e917542e29d0f2e81752a0..a6a61a1c564f5a9a8b7b338ac116cbe979c8bb50 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for dev-libs/glib
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/ChangeLog,v 1.496 2011/12/31 21:26:59 tetromino Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/ChangeLog,v 1.497 2012/01/10 21:25:04 vapier Exp $
+
+*glib-2.30.2-r1 (10 Jan 2012)
+
+  10 Jan 2012; Mike Frysinger <vapier@gentoo.org> +glib-2.30.2-r1.ebuild,
+  +files/glib-2.30.2-missing-decls.patch:
+  Add fix from upstream for building with C++ compilers.
 
   31 Dec 2011; Alexandre Rostovtsev <tetromino@gentoo.org>
   glib-2.30.1-r2.ebuild, glib-2.30.2.ebuild:
index 350563d8953d090751af3ae226cfc45ee26365c2..ccda6c54a122ef13b885e5ed974c10217409e46b 100644 (file)
@@ -1,5 +1,5 @@
 -----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
+Hash: SHA1
 
 AUX glib-1.2.10-automake.patch 827 RMD160 3b1485f89a157b60f31f5ae8ffe2333ab842d217 SHA1 cd40e4dc579190a89e09fad9ac7b209f24b231b3 SHA256 db6d22caf4054c09467b50b6d85566eec7479a29169460950e423c083332ef67
 AUX glib-1.2.10-configure-LANG.patch 1464 RMD160 91481ba6b3f7a1d6e22a4ab7003fcee17450f3c1 SHA1 d98cc2f4ac6cc4aae55270ad0e5705af4de9b3ad SHA256 32377819896297caf9628f382c7bba09ee0a049bd977e9ea927314c0c2e669b4
@@ -17,6 +17,7 @@ AUX glib-2.29.18-external-gdbus-codegen.patch 3099 RMD160 f34d34c3b716a4472123eb
 AUX glib-2.30.1-external-gdbus-codegen.patch 2293 RMD160 9b2f6beda060c45d473edc48c8fb839e6036372d SHA1 11a902608b7261e1db7736ebb59c0ca94b549efb SHA256 45daf662034806d2858f1b2b43185e6891e9d395acd3bbfb7a81a15541b49078
 AUX glib-2.30.1-homedir-env.patch 1849 RMD160 2bbe190e2d6ee96cb33dcfe37c1ff227ea4e8ca9 SHA1 42077f9373acce576b4eb811b6464f0332db7711 SHA256 4f0e149703a9aadc4fb568b9fa00419b9848b345b19d3cc9e1a2bd67985ea25b
 AUX glib-2.30.2-machine-id.patch 1077 RMD160 f210274f62ca031b2e5ddd3500e71a4921e4addf SHA1 8ce7adcd443d87725de7dbfe0c1078be1e3ab2da SHA256 c8341c9025bfaa728cb69ad6ee47040aba2309046050dbb357def72cf90413f4
+AUX glib-2.30.2-missing-decls.patch 940 RMD160 51326d265cac3014b38eecb42f2f9df8a6f338c8 SHA1 fd8717c52f2047e44482c127dd1536fdfe2ab581 SHA256 028943a9f0684ed99e3cbac0631a0c3670d386c6f4234d90a84ebbe0fc851388
 DIST glib-1.2.10-r1-as-needed.patch.bz2 9099 RMD160 5b7a21da6dc10112409bd885501a6976a2eb894d SHA1 468a7947b7d1688c2e7d61da80d40ca59422fbec SHA256 3bb8c45706f97b526da851061c89618bc258fa61f9100802c1340548e4bb2731
 DIST glib-1.2.10.tar.gz 421480 RMD160 f19efe8c87ebeea979a4d36902d8a8209640cd95 SHA1 e5a9361c594608d152d5d9650154c2e3260b87fa SHA256 6e1ce7eedae713b11db82f11434d455d8a1379f783a79812cd2e05fc024a8d9f
 DIST glib-2.28.8.tar.xz 5223564 RMD160 9f665eee95990ace173676a4ad7aeeb0cc17fef9 SHA1 9b11968fedf4da45bcd10c4a8c50012d41b3af50 SHA256 4d7ca95dbde8e8f60ab428c765b0dbb8a44be9eb9316491803ce5ee7b4748353
@@ -26,13 +27,24 @@ DIST pkg-config-0.26.tar.gz 396399 RMD160 face3d16ec338b9b1ab41d56d6e4d1a5624b52
 EBUILD glib-1.2.10-r5.ebuild 1777 RMD160 eaf01d9d6f1ba55edb93e46f46110b9e9c2fb778 SHA1 dbedf2bc146dcbec47ad308621bf1077c9f735cb SHA256 9d9dd1ea44c25087918148c2ba1203f3b38be09996bd7e48a26f9b4f93405d36
 EBUILD glib-2.28.8.ebuild 7404 RMD160 df5a5f4ee06e7620b6b75a43ea6764e20626b022 SHA1 7a1418dbd1df2b8a6a511e781532a19ebdef6b63 SHA256 e21a8482d3ece513afb5620df8838f25e4b5adbd2c7e6d006e864e755d69d702
 EBUILD glib-2.30.1-r2.ebuild 8495 RMD160 af0d12e4d79adb1ce31bbdca515de5fbb04fd714 SHA1 a2105fef9ab37b35fdd90fcdee8b6fa80fcfc71d SHA256 31374346b2d69d74980edda42b75c136bf9c5a157cf55bb8b25485a5224c4382
+EBUILD glib-2.30.2-r1.ebuild 8608 RMD160 3ccc8e29d45cb96aa6855eb652f5d34e028cfbea SHA1 700e201e0162366de5951a86ffe37fbbaf9ba4c6 SHA256 f6a58f21cb000c2bf5fc4b42090e7e6f091859e249ba38151c676a888935b795
 EBUILD glib-2.30.2.ebuild 8504 RMD160 7996e900feb09f2860edae98e9b5ec3e11335cae SHA1 638f88102c1e66b72fa60750e67cb528af4fe04f SHA256 3f8ace46fc8b58975c911c5b79c66d61a6e5f3305ea837a474fab3fd59c4b9c7
-MISC ChangeLog 66400 RMD160 99a519b0b065f8e9da3303657e3c9d6d47e7acf0 SHA1 2f5676954c67f4a07dca191ed5a0934b4734bd61 SHA256 c2fec8a770c353286c72d95986503ec2e10e6fc9f028deb5ce6d9c1e58e97b1b
+MISC ChangeLog 66602 RMD160 999dffe1df9625cabb4665664bd7fc6501a3d885 SHA1 e88d28a35d1a17678eff9efcd0b21ca6299d486a SHA256 fc804cb45b368f516f43bb138dd4b21df997e8e1b722ca565c4530c49c25531a
 MISC metadata.xml 497 RMD160 447ae0d07ac529dbe1830e383d2ef4eae7359ea7 SHA1 4cb36fafa32d53a0dbeec978b0d75f4e7acb3fa0 SHA256 a1840f7e6af57edc9fe5b54deae9e2083858d27792fda3f4e1e8e04624b17d0d
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
-iF4EAREIAAYFAk7/fikACgkQdjK8w9WeBnAAoAEAj29VeTFthcTBmb47jjRmFw+d
-YjrNL/2pnfdmz+PklCsBAJE4mMHmhyQOEY8VIELZ0pNejgKHbMv3wkbtOH8xn5rm
-=3kEq
+iQIcBAEBAgAGBQJPDKy4AAoJELEHsLL7fEFWXycQALQ3P2OYI0jzK/nAaWHWUJN7
+5mIHnEU4iNYqGaGLcr7CkccgUvnjvRBQzE6SQmHHFXqrAngkbNpGLpHK9eR4rp0a
+AKqvZmpd2ZrYpfVlGo3uRE8XyZ2atAC+1qqzMoAzjpGxtvBhrUZpTt50kAE+TRaE
+UsqMeCYRj72MGdjYopJDME8ywRgfqodZtZbFCRqfM3G0uHWuGikEJj4xJMX4mpzJ
+lK5y3TcNDHvgyHpAd3++zZxAheRO4S3nP1+xJr+ttHg2dUU8bn7AGO8Ga4bWLLfn
+CCk+nOqmVtjPDjn8XPQU+Hgq1QuYPuWR0bOIsfU6O3rBbx8Gm+9cXTXfFllPHrqF
+LaPsrmQKcd0hplug7mnwKljLAFV/Jw6s64MgTNaSvZlAMSgms7jtQ8XjJWxbt3xe
+1Vc42TasPsDFY74/ET03SI7fAwNpztVDUnxtb6pBbmLSiBGxK+ICO0BNFen8HVUl
+It2kuApA1bWmcoMtTtZDYNl4kI0rmrqYJ8PrAd6WqqYad6zO1xNMDY6mBCP/oqal
+Es1HhdSupIMqCM2dBtDQLMpuhvgQMcFzvktIqwObl7H6GqrynqPTGt+yqkAn3PqM
+wopq7eog7MkzWy/QxCWuqGfQnmJWZs68HsETA5d0dpX1lKQeo2kVUHw63ECgCPGA
+K2YPzLBUwXoh4RbBuYht
+=hZdD
 -----END PGP SIGNATURE-----
diff --git a/dev-libs/glib/files/glib-2.30.2-missing-decls.patch b/dev-libs/glib/files/glib-2.30.2-missing-decls.patch
new file mode 100644 (file)
index 0000000..3641f88
--- /dev/null
@@ -0,0 +1,36 @@
+Fix from upstream for building with C++ compilers:
+https://bugzilla.gnome.org/show_bug.cgi?id=663880
+
+From 5d9f05eef147f17d71e38c9fba2e3f622c9ed21b Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Sat, 12 Nov 2011 10:26:31 -0500
+Subject: [PATCH] glib-unix.h: Add G_BEGIN/END_DECLS
+
+The omission was pointed out in bug 663880.
+---
+ glib/glib-unix.h |    6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/glib/glib-unix.h b/glib/glib-unix.h
+index 9642b5c..7be37f0 100644
+--- a/glib/glib-unix.h
++++ b/glib/glib-unix.h
+@@ -38,6 +38,8 @@
+ #error "This header may only be used on UNIX"
+ #endif
++G_BEGIN_DECLS
++
+ /**
+  * G_UNIX_ERROR:
+  *
+@@ -77,4 +79,6 @@ guint    g_unix_signal_add         (gint        signum,
+                                     GSourceFunc handler,
+                                     gpointer    user_data);
+-#endif
++G_END_DECLS
++
++#endif  /* __G_UNIX_H__ */
+-- 
+1.7.7.1
diff --git a/dev-libs/glib/glib-2.30.2-r1.ebuild b/dev-libs/glib/glib-2.30.2-r1.ebuild
new file mode 100644 (file)
index 0000000..f70765e
--- /dev/null
@@ -0,0 +1,244 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/glib-2.30.2-r1.ebuild,v 1.1 2012/01/10 21:25:04 vapier Exp $
+
+EAPI="4"
+PYTHON_DEPEND="utils? 2"
+# Avoid runtime dependency on python when USE=test
+
+inherit autotools gnome.org libtool eutils flag-o-matic multilib pax-utils python virtualx
+
+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 doc fam selinux +static-libs systemtap test utils xattr"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
+
+RDEPEND="virtual/libiconv
+       virtual/libffi
+       sys-libs/zlib
+       xattr? ( sys-apps/attr )
+       fam? ( virtual/fam )
+       utils? ( >=dev-util/gdbus-codegen-${PV} )"
+DEPEND="${RDEPEND}
+       >=sys-devel/gettext-0.11
+       >=dev-util/gtk-doc-am-1.15
+       doc? (
+               >=dev-libs/libxslt-1.0
+               >=dev-util/gdbus-codegen-${PV}
+               >=dev-util/gtk-doc-1.15
+               ~app-text/docbook-xml-dtd-4.1.2 )
+       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-util/gtk-doc-1.15-r2"
+PDEPEND="!<gnome-base/gvfs-1.6.4-r990" # Earlier versions do not work with glib
+
+pkg_setup() {
+       # Needed for gio/tests/gdbus-testserver.py
+       if use test ; then
+               python_set_active_version 2
+               python_pkg_setup
+       fi
+}
+
+src_prepare() {
+       mv -vf "${WORKDIR}"/pkg-config-*/pkg.m4 "${WORKDIR}"/ || die
+
+       if use ia64 ; then
+               # Only apply for < 4.1
+               local major=$(gcc-major-version)
+               local minor=$(gcc-minor-version)
+               if (( major < 4 || ( major == 4 && minor == 0 ) )); then
+                       epatch "${FILESDIR}/glib-2.10.3-ia64-atomic-ops.patch"
+               fi
+       fi
+
+       # Fix from upstream for building with C++ compilers.
+       epatch "${FILESDIR}"/${P}-missing-decls.patch
+
+       # Don't fail gio tests when ran without userpriv, upstream bug 552912
+       # This is only a temporary workaround, remove as soon as possible
+#      epatch "${FILESDIR}/${PN}-2.18.1-workaround-gio-test-failure-without-userpriv.patch"
+
+       # Fix gmodule issues on fbsd; bug #184301
+       epatch "${FILESDIR}"/${PN}-2.12.12-fbsd.patch
+
+       # Fix test failure when upgrading from 2.22 to 2.24, upstream bug 621368
+       epatch "${FILESDIR}/${PN}-2.24-assert-test-failure.patch"
+
+       # Do not try to remove files on live filesystem, upstream bug #619274
+       sed 's:^\(.*"/desktop-app-info/delete".*\):/*\1*/:' \
+               -i "${S}"/gio/tests/desktop-app-info.c || die "sed failed"
+
+       # need to build tests if USE=doc for bug #387385
+       if ! use test && ! use doc; then
+               # don't waste time building tests
+               sed 's/^\(.*\SUBDIRS .*\=.*\)tests\(.*\)$/\1\2/' -i $(find . -name Makefile.am -o -name Makefile.in) || die
+       else
+               # Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629
+               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 "/desktop-app-info\/default/d" gio/tests/desktop-app-info.c || die
+                       sed -i -e "/desktop-app-info\/fallback/d" gio/tests/desktop-app-info.c || die
+                       sed -i -e "/desktop-app-info\/lastused/d" gio/tests/desktop-app-info.c || die
+               fi
+
+               # Disable tests requiring dbus-python and pygobject; bugs #349236, #377549, #384853
+               if ! has_version dev-python/dbus-python || ! has_version 'dev-python/pygobject:2' ; then
+                       ewarn "Some tests will be skipped due to dev-python/dbus-python or dev-python/pygobject:2"
+                       ewarn "not being present on your system, think on installing them to get these tests run."
+                       sed -i -e "/connection\/filter/d" gio/tests/gdbus-connection.c || die
+                       sed -i -e "/connection\/large_message/d" gio/tests/gdbus-connection-slow.c || die
+                       sed -i -e "/gdbus\/proxy/d" gio/tests/gdbus-proxy.c || die
+                       sed -i -e "/gdbus\/proxy-well-known-name/d" gio/tests/gdbus-proxy-well-known-name.c || die
+                       sed -i -e "/gdbus\/introspection-parser/d" gio/tests/gdbus-introspection.c || die
+                       sed -i -e "/g_test_add_func/d" gio/tests/gdbus-threading.c || die
+                       sed -i -e "/gdbus\/method-calls-in-thread/d" gio/tests/gdbus-threading.c || die
+                       # needed to prevent gdbus-threading from asserting
+                       ln -sfn $(type -P true) gio/tests/gdbus-testserver.py
+               fi
+       fi
+
+       # gdbus-codegen is a separate package
+       epatch "${FILESDIR}/${PN}-2.30.1-external-gdbus-codegen.patch"
+
+       # Handle the G_HOME environment variable to override the passwd entry, upstream bug #142568
+       epatch "${FILESDIR}/${PN}-2.30.1-homedir-env.patch"
+
+       # Fix hardcoded path to machine-id wrt #390143
+       epatch "${FILESDIR}/${PN}-2.30.2-machine-id.patch"
+
+       # disable pyc compiling
+       echo '#!/bin/sh' > py-compile
+
+       # Needed for the punt-python-check patch, disabling timeout test
+       # Also needed to prevent croscompile failures, see bug #267603
+       # Also needed for the no-gdbus-codegen patch
+       AT_M4DIR="${WORKDIR}" eautoreconf
+
+       [[ ${CHOST} == *-freebsd* ]] && elibtoolize
+
+       epunt_cxx
+}
+
+src_configure() {
+       # Avoid circular depend with dev-util/pkgconfig
+       if ! has_version dev-util/pkgconfig; 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
+
+       # 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"
+
+       # Always use internal libpcre, bug #254659
+       econf ${myconf} \
+               $(use_enable xattr) \
+               $(use_enable doc man) \
+               $(use_enable doc gtk-doc) \
+               $(use_enable fam) \
+               $(use_enable selinux) \
+               $(use_enable static-libs static) \
+               $(use_enable systemtap dtrace) \
+               $(use_enable systemtap systemtap) \
+               --enable-regex \
+               --with-pcre=internal \
+               --with-threads=posix
+}
+
+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
+
+       insinto /usr/share/bash-completion
+       for f in gdbus gsettings; do
+               newins "${ED}/etc/bash_completion.d/${f}-bash-completion.sh" ${f}
+       done
+       rm -rf "${ED}/etc"
+
+       # Completely useless with or without USE static-libs, people need to use
+       # pkg-config
+       find "${D}" -name '*.la' -exec rm -f {} +
+}
+
+src_test() {
+       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"
+       export XDG_DATA_HOME="${T}"
+       unset GSETTINGS_BACKEND # bug 352451
+
+       # 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
+       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
+       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 '<x11-libs/gtk+-3.0.12:3'; then
+               # To have a clear upgrade path for gtk+-3.0.x users, have to resort to
+               # a warning instead of a blocker
+               ewarn
+               ewarn "Using <gtk+-3.0.12:3 with ${P} results in frequent crashes."
+               ewarn "You should upgrade to a newer version of gtk+:3 immediately."
+       fi
+}