summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2011-10-19 01:23:24 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2011-10-19 01:23:24 +0000
commit374a7809cba133f17527ed674348be8549a24dcd (patch)
tree4026b19b8886425e305c380e8ee82bb4699673a5
parentdev-java/commons-dbcp: removed obsolete ebuild (diff)
downloadgentoo-2-374a7809cba133f17527ed674348be8549a24dcd.tar.gz
gentoo-2-374a7809cba133f17527ed674348be8549a24dcd.tar.bz2
gentoo-2-374a7809cba133f17527ed674348be8549a24dcd.zip
New pygobject:3 (and compatible 2.28.6-r50), moved from the gnome overlay.
(Portage version: 2.2.0_alpha69/cvs/Linux x86_64)
-rw-r--r--dev-python/pygobject/ChangeLog16
-rw-r--r--dev-python/pygobject/files/pygobject-2.90.1-make_check.patch72
-rw-r--r--dev-python/pygobject/files/pygobject-3.0.0-support_multiple_python_versions.patch85
-rw-r--r--dev-python/pygobject/pygobject-2.28.6-r50.ebuild140
-rw-r--r--dev-python/pygobject/pygobject-3.0.1.ebuild114
5 files changed, 426 insertions, 1 deletions
diff --git a/dev-python/pygobject/ChangeLog b/dev-python/pygobject/ChangeLog
index 343128baad81..aa8cc6a05a93 100644
--- a/dev-python/pygobject/ChangeLog
+++ b/dev-python/pygobject/ChangeLog
@@ -1,6 +1,20 @@
# ChangeLog for dev-python/pygobject
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pygobject/ChangeLog,v 1.125 2011/10/05 17:13:42 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pygobject/ChangeLog,v 1.126 2011/10/19 01:23:24 tetromino Exp $
+
+*pygobject-3.0.1 (19 Oct 2011)
+*pygobject-2.28.6-r50 (19 Oct 2011)
+
+ 19 Oct 2011; Alexandre Rostovtsev <tetromino@gentoo.org>
+ +pygobject-2.28.6-r50.ebuild, +files/pygobject-2.90.1-make_check.patch,
+ +files/pygobject-3.0.0-support_multiple_python_versions.patch,
+ +pygobject-3.0.1.ebuild:
+ New pygobject:3, moved from the gnome overlay. Per upstream decision,
+ pygobject:2 (starting with 2.28.6-r50) will only be installing the "classic"
+ glib and gobject bindings; the new introspection-based bindings will be
+ provided only by pygobject:3. See
+ http://www.daa.com.au/pipermail/pygtk/2011-August/019920.html for a brief
+ introduction to pygobject:3 porting.
05 Oct 2011; Kacper Kowalik <xarthisius@gentoo.org> pygobject-2.28.6.ebuild:
ppc/ppc64 stable wrt #369909
diff --git a/dev-python/pygobject/files/pygobject-2.90.1-make_check.patch b/dev-python/pygobject/files/pygobject-2.90.1-make_check.patch
new file mode 100644
index 000000000000..c2e80d69a9e5
--- /dev/null
+++ b/dev-python/pygobject/files/pygobject-2.90.1-make_check.patch
@@ -0,0 +1,72 @@
+From b5c4b8b97a1ccb9a4c63ab726ea9c84d81ef51ca Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Fri, 5 Nov 2010 23:39:08 +0100
+Subject: [PATCH 2/3] Do not build tests unless needed
+
+[Alexandre Rostovtsev <tetromino@gmail.com>: port to 2.90.1]
+---
+ tests/Makefile.am | 10 ++++------
+ tests/runtests.py | 3 +++
+ 2 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 4ec6477..c52cb9d 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -1,5 +1,5 @@
+ CLEANFILES =
+-noinst_LTLIBRARIES = libregress.la libgimarshallingtests.la
++check_LTLIBRARIES = libregress.la libgimarshallingtests.la
+
+ nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
+ libregress_la_CFLAGS = $(GIO_CFLAGS) $(PYCAIRO_CFLAGS)
+@@ -43,7 +43,7 @@ gschemas.compiled: org.gnome.test.gschema.xml
+
+ CLEANFILES += Regress-1.0.gir Regress-1.0.typelib GIMarshallingTests-1.0.gir GIMarshallingTests-1.0.typelib gschemas.compiled
+
+-noinst_LTLIBRARIES += testhelper.la
++check_LTLIBRARIES += testhelper.la
+
+ testhelper_la_CFLAGS = -I$(top_srcdir)/gi/_gobject -I$(top_srcdir)/gi/_glib $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
+ testhelper_la_LDFLAGS = -module -avoid-version
+@@ -63,8 +63,6 @@ testhelper.la: $(testhelper_la_OBJECTS) $(testhelper_la_DEPENDENCIES)
+ test -L $@ || $(LN_S) .libs/$@ $@
+
+
+-all: $(LTLIBRARIES:.la=.so)
+-
+ TEST_FILES_STATIC = \
+ test_gobject.py \
+ test_interface.py \
+@@ -97,7 +95,7 @@ EXTRA_DIST = \
+ EXTRA_DIST += $(TEST_FILES_STATIC) $(TEST_FILES_GI)
+
+ clean-local:
+- rm -f $(LTLIBRARIES:.la=.so) file.txt~
++ rm -f $(check_LTLIBRARIES:.la=.so) file.txt~
+
+ DBUS_LAUNCH=$(shell which dbus-launch)
+ RUN_TESTS_ENV_VARS= \
+@@ -108,7 +106,7 @@ RUN_TESTS_ENV_VARS= \
+ TESTS_BUILDDIR=$(builddir)
+ RUN_TESTS_LAUNCH=$(RUN_TESTS_ENV_VARS) $(DBUS_LAUNCH) $(EXEC_NAME) $(PYTHON) $(srcdir)/runtests.py
+
+-check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
++check-local: $(check_LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
+ TEST_FILES="$(TEST_FILES_STATIC)" $(RUN_TESTS_LAUNCH)
+ TEST_FILES="$(TEST_FILES_GI)" $(RUN_TESTS_LAUNCH)
+
+diff --git a/tests/runtests.py b/tests/runtests.py
+index 2a8ecf4..dc9fb03 100755
+--- a/tests/runtests.py
++++ b/tests/runtests.py
+@@ -7,6 +7,9 @@ import sys
+
+ import unittest
+
++# Some tests fail with translated messages.
++os.environ["LC_ALL"] = "C"
++
+ if '--help' in sys.argv:
+ print("Usage: ./runtests.py <testfiles>")
+ sys.exit(0)
diff --git a/dev-python/pygobject/files/pygobject-3.0.0-support_multiple_python_versions.patch b/dev-python/pygobject/files/pygobject-3.0.0-support_multiple_python_versions.patch
new file mode 100644
index 000000000000..f0fab7f7ba7f
--- /dev/null
+++ b/dev-python/pygobject/files/pygobject-3.0.0-support_multiple_python_versions.patch
@@ -0,0 +1,85 @@
+From 228ce7f0f99d2f5fa7d4ac86784d4e81032f9a3a Mon Sep 17 00:00:00 2001
+From: Gilles Dartiguelongue <eva@gentoo.org>
+Date: Fri, 8 Apr 2011 15:43:39 +0200
+Subject: [PATCH 2/3] Enable support to build against multiple version of
+ python
+
+---
+ gi/Makefile.am | 2 +-
+ gi/_glib/Makefile.am | 14 +++++++-------
+ gi/_gobject/Makefile.am | 2 +-
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/gi/Makefile.am b/gi/Makefile.am
+index 0584cc9..9abb61d 100644
+--- a/gi/Makefile.am
++++ b/gi/Makefile.am
+@@ -83,7 +83,7 @@ _gi_la_CPPFLAGS = \
+ _gi_la_LIBADD = \
+ $(extension_libadd) \
+ $(GI_LIBS) \
+- $(top_builddir)/gi/_glib/libpyglib-gi-2.0-@PYTHON_BASENAME@.la
++ $(top_builddir)/gi/_glib/libpyglib-gi-2.0-@PYTHON_BASENAME@@PYTHON_VERSION@.la
+ _gi_la_LDFLAGS = \
+ $(extension_ldflags) \
+ -export-symbols-regex "init_gi|PyInit__gi"
+diff --git a/gi/_glib/Makefile.am b/gi/_glib/Makefile.am
+index 3cf2593..eaa0ce9 100644
+--- a/gi/_glib/Makefile.am
++++ b/gi/_glib/Makefile.am
+@@ -27,24 +27,24 @@ pyglib_PYTHON = \
+ __init__.py \
+ option.py
+
+-lib_LTLIBRARIES = libpyglib-gi-2.0-@PYTHON_BASENAME@.la
++lib_LTLIBRARIES = libpyglib-gi-2.0-@PYTHON_BASENAME@@PYTHON_VERSION@.la
+
+-libpyglib_gi_2_0_@PYTHON_BASENAME@_la_SOURCES = \
++libpyglib_gi_2_0_@PYTHON_BASENAME@@PYTHON_VERSION@_la_SOURCES = \
+ pyglib.c \
+ pyglib.h \
+ pyglib-private.h \
+ pyglib-python-compat.h
+-libpyglib_gi_2_0_@PYTHON_BASENAME@_la_CPPFLAGS = \
++libpyglib_gi_2_0_@PYTHON_BASENAME@@PYTHON_VERSION@_la_CPPFLAGS = \
+ $(extension_cppflags)
+-libpyglib_gi_2_0_@PYTHON_BASENAME@_la_CFLAGS = \
++libpyglib_gi_2_0_@PYTHON_BASENAME@@PYTHON_VERSION@_la_CFLAGS = \
+ $(GLIB_CFLAGS)
+-libpyglib_gi_2_0_@PYTHON_BASENAME@_la_LIBADD = \
++libpyglib_gi_2_0_@PYTHON_BASENAME@@PYTHON_VERSION@_la_LIBADD = \
+ $(extension_libadd) \
+ $(FFI_LIBS) \
+ $(GLIB_LIBS)
+
+ if OS_WIN32
+-libpyglib_gi_2_0_@PYTHON_BASENAME@_la_LDFLAGS = \
++libpyglib_gi_2_0_@PYTHON_BASENAME@@PYTHON_VERSION@_la_LDFLAGS = \
+ -no-undefined
+ endif
+
+@@ -73,7 +73,7 @@ _glib_la_CPPFLAGS = \
+ _glib_la_LIBADD = \
+ $(extension_libadd) \
+ $(GLIB_LIBS) \
+- libpyglib-gi-2.0-@PYTHON_BASENAME@.la
++ libpyglib-gi-2.0-@PYTHON_BASENAME@@PYTHON_VERSION@.la
+ _glib_la_LDFLAGS = \
+ $(extension_ldflags) \
+ -export-symbols-regex "_glib|PyInit__glib"
+diff --git a/gi/_gobject/Makefile.am b/gi/_gobject/Makefile.am
+index 6bddcf7..023907f 100644
+--- a/gi/_gobject/Makefile.am
++++ b/gi/_gobject/Makefile.am
+@@ -65,7 +65,7 @@ _gobject_la_LIBADD = \
+ $(extension_libadd) \
+ $(GLIB_LIBS) \
+ $(FFI_LIBS) \
+- $(top_builddir)/gi/_glib/libpyglib-gi-2.0-@PYTHON_BASENAME@.la
++ $(top_builddir)/gi/_glib/libpyglib-gi-2.0-@PYTHON_BASENAME@@PYTHON_VERSION@.la
+ _gobject_la_LDFLAGS = \
+ $(extension_ldflags) \
+ -export-symbols-regex "_gobject|PyInit__gobject"
+--
+1.7.6.1
+
diff --git a/dev-python/pygobject/pygobject-2.28.6-r50.ebuild b/dev-python/pygobject/pygobject-2.28.6-r50.ebuild
new file mode 100644
index 000000000000..7b37afae442c
--- /dev/null
+++ b/dev-python/pygobject/pygobject-2.28.6-r50.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pygobject/pygobject-2.28.6-r50.ebuild,v 1.1 2011/10/19 01:23:24 tetromino Exp $
+
+EAPI="3"
+GCONF_DEBUG="no"
+GNOME_TARBALL_SUFFIX="xz"
+GNOME2_LA_PUNT="yes"
+SUPPORT_PYTHON_ABIS="1"
+# pygobject is partially incompatible with Python 3.
+# PYTHON_DEPEND="2:2.6 3:3.1"
+# RESTRICT_PYTHON_ABIS="2.4 2.5 3.0 *-jython"
+PYTHON_DEPEND="2:2.6"
+RESTRICT_PYTHON_ABIS="2.4 2.5 3.* *-jython"
+
+# XXX: Is the alternatives stuff needed anymore?
+inherit alternatives autotools gnome2 python virtualx
+
+DESCRIPTION="GLib's GObject library bindings for Python"
+HOMEPAGE="http://www.pygtk.org/"
+
+LICENSE="LGPL-2.1"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc examples +introspection libffi test"
+# FIXME: tests require introspection support, but we can't enable introspection,
+# or we get file collisions with slot 3 :/
+RESTRICT="test"
+
+COMMON_DEPEND=">=dev-libs/glib-2.24.0:2
+ libffi? ( virtual/libffi )"
+DEPEND="${COMMON_DEPEND}
+ doc? (
+ dev-libs/libxslt
+ >=app-text/docbook-xsl-stylesheets-1.70.1 )
+ test? (
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc )
+ >=dev-util/pkgconfig-0.12"
+RDEPEND="${COMMON_DEPEND}
+ !<dev-python/pygtk-2.13"
+# Use slot 3 for introspection support per upstream recommendation
+# (see https://bugzilla.gnome.org/show_bug.cgi?id=642048#c9);
+# keep introspection USE flag in slot 2 for backward compatibility for now.
+PDEPEND="introspection? ( dev-python/pygobject:3 )"
+
+pkg_setup() {
+ DOCS="AUTHORS ChangeLog* NEWS README"
+ # --disable-introspection and --disable-cairo because we use pygobject:3
+ # for introspection support
+ G2CONF="${G2CONF}
+ --disable-dependency-tracking
+ --disable-introspection
+ --disable-cairo
+ $(use_enable doc docs)
+ $(use_with libffi ffi)"
+}
+
+src_prepare() {
+ gnome2_src_prepare
+
+ # Fix FHS compliance, see upstream bug #535524
+ epatch "${FILESDIR}/${PN}-2.28.3-fix-codegen-location.patch"
+
+ # Do not build tests if unneeded, bug #226345
+ epatch "${FILESDIR}/${PN}-2.28.3-make_check.patch"
+
+ # Support installation for multiple Python versions, upstream bug #648292
+ epatch "${FILESDIR}/${PN}-2.28.3-support_multiple_python_versions.patch"
+
+ # Disable tests that fail
+ epatch "${FILESDIR}/${PN}-2.28.3-disable-failing-tests.patch"
+
+ # disable pyc compiling
+ ln -sfn $(type -P true) py-compile
+
+ eautoreconf
+
+ python_copy_sources
+}
+
+src_configure() {
+ python_execute_function -s gnome2_src_configure
+}
+
+src_compile() {
+ python_execute_function -d -s
+}
+
+# FIXME: With python multiple ABI support, tests return 1 even when they pass
+src_test() {
+ unset DBUS_SESSION_BUS_ADDRESS
+
+ testing() {
+ XDG_CACHE_HOME="${T}/$(PYTHON --ABI)"
+ Xemake check PYTHON=$(PYTHON -a)
+ }
+ python_execute_function -s testing
+}
+
+src_install() {
+ [[ -z ${ED} ]] && local ED="${D}"
+ installation() {
+ gnome2_src_install
+ mv "${ED}$(python_get_sitedir)/pygtk.py" "${ED}$(python_get_sitedir)/pygtk.py-2.0"
+ mv "${ED}$(python_get_sitedir)/pygtk.pth" "${ED}$(python_get_sitedir)/pygtk.pth-2.0"
+ }
+ python_execute_function -s installation
+
+ python_clean_installation_image
+
+ sed "s:/usr/bin/python:/usr/bin/python2:" \
+ -i "${ED}"/usr/bin/pygobject-codegen-2.0 \
+ || die "Fix usage of python interpreter"
+
+ if use examples; then
+ insinto /usr/share/doc/${P}
+ doins -r examples || die "doins failed"
+ fi
+}
+
+pkg_postinst() {
+ create_symlinks() {
+ alternatives_auto_makesym "$(python_get_sitedir)/pygtk.py" pygtk.py-[0-9].[0-9]
+ alternatives_auto_makesym "$(python_get_sitedir)/pygtk.pth" pygtk.pth-[0-9].[0-9]
+ }
+ python_execute_function create_symlinks
+
+ python_mod_optimize glib gobject gtk-2.0 pygtk.py
+}
+
+pkg_postrm() {
+ python_mod_cleanup glib gobject gtk-2.0 pygtk.py
+
+ create_symlinks() {
+ alternatives_auto_makesym "$(python_get_sitedir)/pygtk.py" pygtk.py-[0-9].[0-9]
+ alternatives_auto_makesym "$(python_get_sitedir)/pygtk.pth" pygtk.pth-[0-9].[0-9]
+ }
+ python_execute_function create_symlinks
+}
diff --git a/dev-python/pygobject/pygobject-3.0.1.ebuild b/dev-python/pygobject/pygobject-3.0.1.ebuild
new file mode 100644
index 000000000000..c7aa2518b010
--- /dev/null
+++ b/dev-python/pygobject/pygobject-3.0.1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pygobject/pygobject-3.0.1.ebuild,v 1.1 2011/10/19 01:23:24 tetromino Exp $
+
+EAPI="3"
+GCONF_DEBUG="no"
+GNOME_TARBALL_SUFFIX="xz"
+GNOME2_LA_PUNT="yes"
+SUPPORT_PYTHON_ABIS="1"
+PYTHON_DEPEND="2:2.6 3:3.1"
+RESTRICT_PYTHON_ABIS="2.4 2.5 3.0 *-jython"
+
+# XXX: Is the alternatives stuff needed anymore?
+inherit alternatives autotools gnome2 python virtualx
+
+DESCRIPTION="GLib's GObject library bindings for Python"
+HOMEPAGE="http://www.pygtk.org/"
+
+LICENSE="LGPL-2.1"
+SLOT="3"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="+cairo examples test +threads" # doc
+
+COMMON_DEPEND=">=dev-libs/glib-2.24.0:2
+ >=dev-libs/gobject-introspection-1.29
+ virtual/libffi
+ cairo? ( >=dev-python/pycairo-1.10.0 )"
+DEPEND="${COMMON_DEPEND}
+ test? (
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc
+ >=dev-libs/gobject-introspection-1.29.17 )
+ >=dev-util/pkgconfig-0.12"
+# docs disabled for now per upstream default since they are very out of date
+# doc? (
+# app-text/docbook-xml-dtd:4.1.2
+# dev-libs/libxslt
+# >=app-text/docbook-xsl-stylesheets-1.70.1 )
+
+# We now disable introspection support in slot 2 per upstream recommendation
+# (see https://bugzilla.gnome.org/show_bug.cgi?id=642048#c9); however,
+# older versions of slot 2 installed their own site-packages/gi, and
+# slot 3 will collide with them.
+RDEPEND="${COMMON_DEPEND}
+ !<dev-python/pygtk-2.13
+ !<dev-python/pygobject-2.28.6-r50:2[introspection]"
+
+pkg_setup() {
+ DOCS="AUTHORS ChangeLog* NEWS README"
+ # Hard-enable libffi support since both gobject-introspection and
+ # glib-2.29.x rdepend on it anyway
+ G2CONF="${G2CONF}
+ --disable-dependency-tracking
+ --with-ffi
+ $(use_enable cairo)
+ $(use_enable threads thread)"
+}
+
+src_prepare() {
+ gnome2_src_prepare
+
+ # Do not build tests if unneeded, bug #226345
+ epatch "${FILESDIR}/${PN}-2.90.1-make_check.patch"
+
+ # Support installation for multiple Python versions, upstream bug #648292
+ epatch "${FILESDIR}/${PN}-3.0.0-support_multiple_python_versions.patch"
+
+ # Disable tests that fail
+ #epatch "${FILESDIR}/${PN}-2.28.3-disable-failing-tests.patch"
+
+ # disable pyc compiling
+ ln -sfn $(type -P true) py-compile
+
+ eautoreconf
+
+ python_copy_sources
+}
+
+src_configure() {
+ python_execute_function -s gnome2_src_configure
+}
+
+src_compile() {
+ python_execute_function -d -s
+}
+
+# FIXME: With python multiple ABI support, tests return 1 even when they pass
+src_test() {
+ unset DBUS_SESSION_BUS_ADDRESS
+
+ testing() {
+ XDG_CACHE_HOME="${T}/$(PYTHON --ABI)"
+ Xemake check PYTHON=$(PYTHON -a)
+ }
+ python_execute_function -s testing
+}
+
+src_install() {
+ python_execute_function -s gnome2_src_install
+ python_clean_installation_image
+
+ if use examples; then
+ insinto /usr/share/doc/${P}
+ doins -r examples || die "doins failed"
+ fi
+}
+
+pkg_postinst() {
+ python_mod_optimize gi
+}
+
+pkg_postrm() {
+ python_mod_cleanup gi
+}