public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alexandre Restovtsev" <tetromino@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gnome:master commit in: dev-libs/glib/files/, dev-libs/glib/
Date: Mon, 17 Oct 2011 19:10:26 +0000 (UTC)	[thread overview]
Message-ID: <2296264ba6c42b9b063d70dd224eccb1c54d2183.tetromino@gentoo> (raw)

commit:     2296264ba6c42b9b063d70dd224eccb1c54d2183
Author:     Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
AuthorDate: Mon Oct 17 17:14:18 2011 +0000
Commit:     Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
CommitDate: Mon Oct 17 19:10:12 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=2296264b

dev-libs/glib: sync with gx86

---
 .../glib-2.29.18-external-gdbus-codegen.patch      |   95 --------------------
 .../files/glib-2.30.1-external-gdbus-codegen.patch |   75 +++++++++++++++
 dev-libs/glib/files/glib-2.30.1-homedir-env.patch  |   61 +++++++++++++
 dev-libs/glib/glib-9999.ebuild                     |   61 ++++++++-----
 4 files changed, 172 insertions(+), 120 deletions(-)

diff --git a/dev-libs/glib/files/glib-2.29.18-external-gdbus-codegen.patch b/dev-libs/glib/files/glib-2.29.18-external-gdbus-codegen.patch
deleted file mode 100644
index abec0dd..0000000
--- a/dev-libs/glib/files/glib-2.29.18-external-gdbus-codegen.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 89a3234d52451cadb21c322931adb6e8928eb21d Mon Sep 17 00:00:00 2001
-From: Alexandre Rostovtsev <tetromino@gmail.com>
-Date: Wed, 24 Aug 2011 21:35:59 -0400
-Subject: [PATCH] Use an external gdbus-codegen package
-
----
- configure.ac                                       |    4 +---
- docs/reference/gio/Makefile.am                     |    3 +--
- gio/Makefile.am                                    |    2 +-
- gio/tests/Makefile.am                              |    4 +---
- gio/tests/gdbus-object-manager-example/Makefile.am |    4 +---
- 5 files changed, 5 insertions(+), 12 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index dc23b8b..0bb0c4a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -365,7 +365,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 ***********************
-@@ -3858,8 +3858,6 @@ gobject/tests/Makefile
- gthread/Makefile
- gthread/tests/Makefile
- gio/Makefile
--gio/gdbus-2.0/codegen/Makefile
--gio/gdbus-2.0/codegen/config.py
- gio/xdgmime/Makefile
- gio/inotify/Makefile
- gio/libasyncns/Makefile
-diff --git a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am
-index 9eb0fce..511aec9 100644
---- a/docs/reference/gio/Makefile.am
-+++ b/docs/reference/gio/Makefile.am
-@@ -79,8 +79,7 @@ man_MANS =			\
- 	gio-querymodules.1	\
- 	glib-compile-schemas.1	\
- 	gsettings.1		\
--	gdbus.1			\
--	gdbus-codegen.1
-+	gdbus.1
- 
- if ENABLE_MAN
- 
-diff --git a/gio/Makefile.am b/gio/Makefile.am
-index 7803bb2..d4a08e5 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 += libasyncns xdgmime
-diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
-index a85ea4f..8fbe8ec 100644
---- a/gio/tests/Makefile.am
-+++ b/gio/tests/Makefile.am
-@@ -261,9 +261,7 @@ gdbus_bz627724_LDADD = $(progs_ldadd)
- 
- if OS_UNIX
- gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c : test-codegen.xml
--	$(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
--		UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
--		$(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
-+	$(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 5e6eb9a..8b16926 100644
---- a/gio/tests/gdbus-object-manager-example/Makefile.am
-+++ b/gio/tests/gdbus-object-manager-example/Makefile.am
-@@ -22,9 +22,7 @@ GDBUS_GENERATED = 										\
- 	$(NULL)
- 
- $(GDBUS_GENERATED) : gdbus-example-objectmanager.xml
--	$(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
--		UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
--		$(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
-+	$(AM_V_GEN) gdbus-codegen \
- 		--interface-prefix org.gtk.GDBus.Example.ObjectManager. \
- 		--c-namespace Example \
- 		--c-generate-object-manager \
--- 
-1.7.6.1
-

diff --git a/dev-libs/glib/files/glib-2.30.1-external-gdbus-codegen.patch b/dev-libs/glib/files/glib-2.30.1-external-gdbus-codegen.patch
new file mode 100644
index 0000000..916b291
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.30.1-external-gdbus-codegen.patch
@@ -0,0 +1,75 @@
+Use an external gdbus-codegen package
+
+--- configure.ac
++++ configure.ac
+@@ -367,7 +367,7 @@
+ 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 ***********************
+@@ -3857,8 +3857,6 @@
+ gthread/Makefile
+ gthread/tests/Makefile
+ gio/Makefile
+-gio/gdbus-2.0/codegen/Makefile
+-gio/gdbus-2.0/codegen/config.py
+ gio/xdgmime/Makefile
+ gio/inotify/Makefile
+ gio/libasyncns/Makefile
+--- docs/reference/gio/Makefile.am
++++ docs/reference/gio/Makefile.am
+@@ -138,8 +138,7 @@
+ 	gio-querymodules.1	\
+ 	glib-compile-schemas.1	\
+ 	gsettings.1		\
+-	gdbus.1			\
+-	gdbus-codegen.1
++	gdbus.1
+ 
+ if ENABLE_MAN
+ 
+--- gio/Makefile.am
++++ gio/Makefile.am
+@@ -2,7 +2,7 @@
+ 
+ NULL =
+ 
+-SUBDIRS = gdbus-2.0/codegen
++SUBDIRS =
+ 
+ if OS_UNIX
+ SUBDIRS += libasyncns xdgmime
+--- gio/tests/gdbus-object-manager-example/Makefile.am
++++ gio/tests/gdbus-object-manager-example/Makefile.am
+@@ -21,10 +21,8 @@
+ 	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 \
+--- gio/tests/Makefile.am
++++ gio/tests/Makefile.am
+@@ -266,10 +266,8 @@
+ 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/dev-libs/glib/files/glib-2.30.1-homedir-env.patch b/dev-libs/glib/files/glib-2.30.1-homedir-env.patch
new file mode 100644
index 0000000..30d4499
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.30.1-homedir-env.patch
@@ -0,0 +1,61 @@
+Description: Handle the G_HOME environment variable to override the passwd entry
+ This will allow to fix various kinds of build failures due to restricted
+ build environments.
+Author: Josselin Mouette <joss@debian.org>
+Origin: vendor
+
+--- a/docs/reference/glib/running.sgml
++++ b/docs/reference/glib/running.sgml
+@@ -213,6 +213,22 @@
+   </para>
+ </formalpara>
+ 
++<formalpara id="G_HOME">
++  <title><envar>G_HOME</envar></title>
++
++  <para>
++    For various reasons, GLib applications ignore the <envar>HOME</envar>
++    environment variable on Unix systems and will use the user directory
++    as specified by the <filename>passwd</filename> entry, which is more
++    reliable.
++  </para>
++  <para>
++    The <envar>G_HOME</envar> environment variable will override any
++    other setting for the home directory. It is not meant for daily usage,
++    but it is useful in testing or building environments.
++  </para>
++</formalpara>
++
+ </refsect2>
+ 
+ <refsect2 id="setlocale">
+--- a/glib/gutils.c
++++ b/glib/gutils.c
+@@ -1626,11 +1626,14 @@
+     }
+ #endif	/* !G_OS_WIN32 */
+   
++  g_home_dir = g_strdup (g_getenv ("G_HOME"));
++  
+ #ifdef G_OS_WIN32
+   /* We check $HOME first for Win32, though it is a last resort for Unix
+    * where we prefer the results of getpwuid().
+    */
+-  g_home_dir = g_strdup (g_getenv ("HOME"));
++  if (!g_home_dir)
++    g_home_dir = g_strdup (g_getenv ("HOME"));
+ 
+   /* Only believe HOME if it is an absolute path and exists */
+   if (g_home_dir)
+@@ -1926,6 +1929,11 @@
+  *      homedir = g_get_home_dir (<!-- -->);
+  * ]|
+  *
++ * However, to allow changing this value for testing and development
++ * purposes, the value of the <envar>G_HOME</envar> environment 
++ * variable, if set, will override the <filename>passwd</filename>
++ * entry.
++ *
+  * Returns: the current user's home directory
+  */
+ G_CONST_RETURN gchar*

diff --git a/dev-libs/glib/glib-9999.ebuild b/dev-libs/glib/glib-9999.ebuild
index af12ca6..28ffe51 100644
--- a/dev-libs/glib/glib-9999.ebuild
+++ b/dev-libs/glib/glib-9999.ebuild
@@ -3,9 +3,10 @@
 # $Header: $
 
 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 virtualx
-# Do not inherit python.eclass to avoid python runtime dependency; #377549
+inherit autotools gnome.org libtool eutils flag-o-matic multilib pax-utils python virtualx
 if [[ ${PV} = 9999 ]]; then
 	inherit gnome2-live
 fi
@@ -17,18 +18,19 @@ SRC_URI="${SRC_URI}
 
 LICENSE="LGPL-2"
 SLOT="2"
-IUSE="debug doc fam selinux +static-libs systemtap test xattr"
+IUSE="debug doc fam selinux +static-libs systemtap test utils xattr"
 if [[ ${PV} = 9999 ]]; then
 	KEYWORDS=""
 else
-	KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+	KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux"
 fi
 
 RDEPEND="virtual/libiconv
 	virtual/libffi
 	sys-libs/zlib
 	xattr? ( sys-apps/attr )
-	fam? ( virtual/fam )"
+	fam? ( virtual/fam )
+	utils? ( >=dev-util/gdbus-codegen-${PV} )"
 DEPEND="${RDEPEND}
 	>=sys-devel/gettext-0.11
 	>=dev-util/gtk-doc-am-1.15
@@ -38,13 +40,20 @@ DEPEND="${RDEPEND}
 		~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-2.30.0
+		>=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
 
-# XXX: Consider adding test? ( sys-devel/gdb ); assert-msg-test tries to use it
+pkg_setup() {
+	# Needed for gio/tests/gdbus-testserver.py
+	if use test ; then
+		python_set_active_version 2
+		python_pkg_setup
+	fi
+}
 
 src_prepare() {
 	[[ ${PV} = 9999 ]] && gnome2-live_src_prepare
@@ -61,7 +70,7 @@ src_prepare() {
 
 	# 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"
+#	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
@@ -87,9 +96,6 @@ src_prepare() {
 			sed -i -e "/desktop-app-info\/lastused/d" gio/tests/desktop-app-info.c || die
 		fi
 
-		# Disable flaky gdbus/connection/life-cycle test; bug #384853
-		sed -i -e "/connection\/life-cycle/d" gio/tests/gdbus-connection.c || die
-
 		# 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"
@@ -103,21 +109,18 @@ src_prepare() {
 			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
-		else
-			# use python2 for the test server
-			sed -i -e 's:/usr/bin/env python$:/usr/bin/env python2:' gio/tests/gdbus-testserver.py || die
 		fi
 	fi
 
 	# gdbus-codegen is a separate package
-	epatch "${FILESDIR}/${PN}-2.29.18-external-gdbus-codegen.patch"
+	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"
 
 	# disable pyc compiling
 	ln -sfn $(type -P true) py-compile
 
-	# python2 needed for gtester-report
-	sed -e 's:/usr/bin/env python$:/usr/bin/env python2:' -i glib/gtester-report || die
-
 	# 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
@@ -131,8 +134,10 @@ src_prepare() {
 src_configure() {
 	# Avoid circular depend with dev-util/pkgconfig
 	if ! has_version dev-util/pkgconfig; then
-		export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include"
-		export DBUS1_LIBS="-ldbus-1"
+		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
@@ -162,7 +167,13 @@ src_configure() {
 
 src_install() {
 	local f
-	emake DESTDIR="${D}" install || die "Installation failed"
+
+	# 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"
@@ -172,17 +183,17 @@ src_install() {
 
 	# This is there for git snapshots and the live ebuild, bug 351966
 	emake README || die "emake README failed"
-	dodoc AUTHORS ChangeLog* NEWS* README || die "dodoc failed"
+	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} || die
+		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 "${ED}" -name '*.la' -exec rm -f {} +
+	find "${E}" -name '*.la' -exec rm -f {} +
 }
 
 src_test() {
@@ -204,7 +215,7 @@ src_test() {
 	fi
 
 	# Need X for dbus-launch session X11 initialization
-	Xemake check || die "tests failed"
+	Xemake check
 }
 
 pkg_preinst() {



             reply	other threads:[~2011-10-17 19:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-17 19:10 Alexandre Restovtsev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-08-20  8:33 [gentoo-commits] proj/gnome:master commit in: dev-libs/glib/files/, dev-libs/glib/ Mart Raudsepp
2018-06-24 14:05 Sobhan Mohammadpour
2018-01-02 15:17 Sobhan Mohammadpour
2017-12-18 13:50 Sobhan Mohammadpour
2014-04-15 22:05 Gilles Dartiguelongue
2014-04-15 22:05 Gilles Dartiguelongue
2013-11-24 19:34 Gilles Dartiguelongue
2013-02-28 10:37 Priit Laes
2012-09-25 15:46 Alexandre Rostovtsev
2012-07-16  5:53 Alexandre Restovtsev
2012-07-03 11:10 Priit Laes
2012-05-25  9:41 Alexandre Restovtsev
2012-05-24  7:33 Alexandre Restovtsev
2012-03-06 23:29 Alexandre Restovtsev
2012-02-25 15:08 Nirbheek Chauhan
2012-02-03  8:32 Priit Laes
2011-12-20 15:29 Priit Laes
2011-06-18 17:35 Priit Laes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2296264ba6c42b9b063d70dd224eccb1c54d2183.tetromino@gentoo \
    --to=tetromino@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox