[dev-python/pygobject*] provide split ebuilds version of pygobject
dev-python/pygobject[cairo] is starting to be required for several graphical application that otherwise fail to run at runtime. The list of apps includes the in-development Entropy Rigo Browser. Unfortunately, dev-python/pygobject[cairo] pulls in a shitload of deps: half X -> mesa -> llvm/clang. This is unwanted on X-less images we have (SpinBase) due to the big amount of extra software we would have to ship with. We cannot remove dev-python/pygobject from ISO images because Anaconda requires it.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
AUX pygobject-2.90.1-make_check.patch 2572 RMD160 15fa252864308469a9d84ed3d0195fe38b329127 SHA1 a3daba6e1cd7b15663c6cae862236abd876a50aa SHA256 e665baf786eb565cd095ca1651a696264b112dcbc534593c4fa3da2d4e3b2ddf
|
||||
AUX pygobject-3.0.0-support_multiple_python_versions.patch 2794 RMD160 3dd6dfc06063d7eca37c02a08b15c7d3c5615a12 SHA1 56311e3c80ff768d1f88ef635cae34441532cc1e SHA256 ee1e3182dadd4e585179916e4cff3836d2e4464663667a8f5afcf5949d3c000c
|
||||
AUX pygobject-3.0.3-disable-new-gi-tests.patch 2825 RMD160 ca269ff563a6c49bf70517274bddc0c3d4aef8a4 SHA1 3ba5f141f764b407f787e6afdeeac951e142f1b8 SHA256 eec3f3cacfa7655d9dd0755cb5c9a1a235b5351990dfc0d39f646d5ba2e2deda
|
||||
AUX pygobject-3.0.3-gobject-property-min-max.patch 2505 RMD160 6bd1c482426102669f91cf86dff7a6cbb5cfcd7c SHA1 460b0a2932cedb150f668e21ababe74fc56f61b4 SHA256 9f79c7a7f163323d3d72b2c2758fba4fd4c712869e5f8c7ba10364466a30d9c3
|
||||
AUX pygobject-3.0.3-tests-python3.patch 953 RMD160 da11f5e7541a44d69639a9cb2fb1c845bae5864b SHA1 83f864613330148cc4a58c56f6190a6db6beb3a1 SHA256 e9b9da15e44239a85b71d5dde5ae112780c9527b81bddf4edfa9d620bf371d00
|
||||
DIST pygobject-3.0.4.tar.xz 547180 RMD160 f72d82b862359fee51bffc12076c29a49b9c4b6a SHA1 72df1cdd6e34d52ada6e32f1bbd7f36f4be67512 SHA256 f457b1d7f6b8bfa727593c3696d2b405da66b4a8d34cd7d3362ebda1221f0661
|
||||
EBUILD pygobject-base-3.0.4.ebuild 3339 RMD160 0462f147689e7d3dce7c9235d44aee8a19553c7c SHA1 951e887118e5cc1e43b45ff167faada9d147010a SHA256 997abddf3019cd5de5c1d420c0718a8120e2b879884cc92e813c75e97364d762
|
||||
MISC metadata.xml 178 RMD160 52828e1ca616ad731f2ab1ed2890d6d3a7cc8043 SHA1 a42d68a6c263ea8d8cbb678548e209aa9642a74e SHA256 aeea09173ed30175422e4f951e369e1882919be3d56e655468e5d4bffea0fc3c
|
||||
@@ -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)
|
||||
+85
@@ -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
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
Disable tests requiring >=gobject-introspection-1.31
|
||||
|
||||
diff --git a/tests/test_everything.py b/tests/test_everything.py
|
||||
index 43735e5..ecfdef4 100644
|
||||
--- a/tests/test_everything.py
|
||||
+++ b/tests/test_everything.py
|
||||
@@ -507,22 +507,3 @@ class TestAdvancedInterfaces(unittest.TestCase):
|
||||
self.assertEquals(ret[0], 51);
|
||||
self.assertEquals(ret[1], 61);
|
||||
self.assertEquals(ret[2], 32);
|
||||
-
|
||||
- def test_obj_skip_return_val_no_out(self):
|
||||
- obj = Everything.TestObj();
|
||||
- # raises an error for 0, succeeds for any other value
|
||||
- self.assertRaises(GLib.GError, obj.skip_return_val_no_out, 0)
|
||||
-
|
||||
- ret = obj.skip_return_val_no_out(1)
|
||||
- self.assertEquals(ret, None)
|
||||
-
|
||||
-class TestSignals(unittest.TestCase):
|
||||
- def test_object_param_signal(self):
|
||||
- obj = Everything.TestObj();
|
||||
-
|
||||
- def callback (obj_param):
|
||||
- self.assertEquals(obj_param.props.int, 3)
|
||||
- self.assertEquals(obj_param.__grefcount__, 2)
|
||||
-
|
||||
- obj.connect('sig-with-obj', callback)
|
||||
- obj.emit_sig_with_obj()
|
||||
diff --git a/tests/test_gi.py b/tests/test_gi.py
|
||||
index 0a9b1b2..7e24778 100644
|
||||
--- a/tests/test_gi.py
|
||||
+++ b/tests/test_gi.py
|
||||
@@ -770,18 +770,6 @@ class TestArray(unittest.TestCase):
|
||||
def test_gstrv_inout(self):
|
||||
self.assertEquals(['-1', '0', '1', '2'], GIMarshallingTests.gstrv_inout(['0', '1', '2']))
|
||||
|
||||
- def test_array_gvariant_none_in(self):
|
||||
- v = [GLib.Variant("i", 27), GLib.Variant("s", "Hello")]
|
||||
- self.assertEquals([27, "Hello"], map(GLib.Variant.unpack, GIMarshallingTests.array_gvariant_none_in(v)))
|
||||
-
|
||||
- def test_array_gvariant_container_in(self):
|
||||
- v = [GLib.Variant("i", 27), GLib.Variant("s", "Hello")]
|
||||
- self.assertEquals([27, "Hello"], map(GLib.Variant.unpack, GIMarshallingTests.array_gvariant_none_in(v)))
|
||||
-
|
||||
- def test_array_gvariant_full_in(self):
|
||||
- v = [GLib.Variant("i", 27), GLib.Variant("s", "Hello")]
|
||||
- self.assertEquals([27, "Hello"], map(GLib.Variant.unpack, GIMarshallingTests.array_gvariant_none_in(v)))
|
||||
-
|
||||
def test_bytearray_gvariant(self):
|
||||
v = GLib.Variant.new_bytestring("foo")
|
||||
self.assertEquals(v.get_bytestring(), "foo")
|
||||
@@ -1651,16 +1639,6 @@ class TestPythonGObject(unittest.TestCase):
|
||||
def do_method_not_a_vfunc(self):
|
||||
pass
|
||||
|
||||
- def test_subsubobject(self):
|
||||
- class SubSubSubObject(GIMarshallingTests.SubSubObject):
|
||||
- def do_method_deep_hierarchy(self, num):
|
||||
- self.props.int = num * 2
|
||||
-
|
||||
- sub_sub_sub_object = SubSubSubObject()
|
||||
- GIMarshallingTests.SubSubObject.do_method_deep_hierarchy(sub_sub_sub_object, 5)
|
||||
- self.assertEqual(sub_sub_sub_object.props.int, 5)
|
||||
-
|
||||
-
|
||||
class TestMultiOutputArgs(unittest.TestCase):
|
||||
|
||||
def test_int_out_out(self):
|
||||
@@ -0,0 +1,70 @@
|
||||
From 00030bc6f0fb961c716ed692144cd8e4bb9be7d0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Sebastian=20P=C3=B6lsterl?= <sebp@k-d-w.org>
|
||||
Date: Sat, 10 Dec 2011 12:51:45 +0100
|
||||
Subject: [PATCH] Fixed bug where GObject.property did not respect minimum and
|
||||
maximum values
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=664864
|
||||
---
|
||||
gi/_gobject/propertyhelper.py | 2 +-
|
||||
tests/test_properties.py | 31 +++++++++++++++++++++++++++++++
|
||||
2 files changed, 32 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/gi/_gobject/propertyhelper.py b/gi/_gobject/propertyhelper.py
|
||||
index 4635350..9208a0b 100644
|
||||
--- a/gi/_gobject/propertyhelper.py
|
||||
+++ b/gi/_gobject/propertyhelper.py
|
||||
@@ -298,7 +298,7 @@ class property(object):
|
||||
ptype = self.type
|
||||
if ptype in [TYPE_INT, TYPE_UINT, TYPE_LONG, TYPE_ULONG,
|
||||
TYPE_INT64, TYPE_UINT64, TYPE_FLOAT, TYPE_DOUBLE]:
|
||||
- args = self._get_minimum(), self._get_maximum(), self.default
|
||||
+ args = self.minimum, self.maximum, self.default
|
||||
elif (ptype == TYPE_STRING or ptype == TYPE_BOOLEAN or
|
||||
ptype.is_a(TYPE_ENUM)):
|
||||
args = (self.default,)
|
||||
diff --git a/tests/test_properties.py b/tests/test_properties.py
|
||||
index 3521647..75aacff 100644
|
||||
--- a/tests/test_properties.py
|
||||
+++ b/tests/test_properties.py
|
||||
@@ -367,6 +367,37 @@ class TestProperty(unittest.TestCase):
|
||||
GObject.property, type=gtype, minimum=min,
|
||||
maximum=max+1)
|
||||
|
||||
+ def testMinMax(self):
|
||||
+ class C(GObject.GObject):
|
||||
+ prop_int = GObject.property(type=int, minimum=1, maximum=100, default=1)
|
||||
+ prop_float = GObject.property(type=float, minimum=0.1, maximum=10.5, default=1.1)
|
||||
+
|
||||
+ def __init__(self):
|
||||
+ GObject.GObject.__init__(self)
|
||||
+
|
||||
+ o = C()
|
||||
+ self.assertEqual(o.prop_int, 1)
|
||||
+
|
||||
+ o.prop_int = 5
|
||||
+ self.assertEqual(o.prop_int, 5)
|
||||
+
|
||||
+ o.prop_int = 0
|
||||
+ self.assertEqual(o.prop_int, 5)
|
||||
+
|
||||
+ o.prop_int = 101
|
||||
+ self.assertEqual(o.prop_int, 5)
|
||||
+
|
||||
+ self.assertEqual(o.prop_float, 1.1)
|
||||
+
|
||||
+ o.prop_float = 7.75
|
||||
+ self.assertEqual(o.prop_float, 7.75)
|
||||
+
|
||||
+ o.prop_float = 0.09
|
||||
+ self.assertEqual(o.prop_float, 7.75)
|
||||
+
|
||||
+ o.prop_float = 10.51
|
||||
+ self.assertEqual(o.prop_float, 7.75)
|
||||
+
|
||||
def testMultipleInstances(self):
|
||||
class C(GObject.GObject):
|
||||
prop = GObject.property(type=str, default='default')
|
||||
--
|
||||
1.7.8.1
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From 8d88283688797b8fc70a7cbccd42a71b8518098d Mon Sep 17 00:00:00 2001
|
||||
From: Alexandre Rostovtsev <tetromino@gentoo.org>
|
||||
Date: Mon, 26 Dec 2011 00:44:56 -0500
|
||||
Subject: [PATCH] Fix bytearray test compatibility with python3
|
||||
|
||||
https://bugs.gentoo.org/show_bug.cgi?id=321879
|
||||
---
|
||||
tests/test_gi.py | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/test_gi.py b/tests/test_gi.py
|
||||
index 0a9b1b2..8726187 100644
|
||||
--- a/tests/test_gi.py
|
||||
+++ b/tests/test_gi.py
|
||||
@@ -783,8 +783,8 @@ class TestArray(unittest.TestCase):
|
||||
self.assertEquals([27, "Hello"], map(GLib.Variant.unpack, GIMarshallingTests.array_gvariant_none_in(v)))
|
||||
|
||||
def test_bytearray_gvariant(self):
|
||||
- v = GLib.Variant.new_bytestring("foo")
|
||||
- self.assertEquals(v.get_bytestring(), "foo")
|
||||
+ v = GLib.Variant.new_bytestring(b"foo")
|
||||
+ self.assertEquals(v.get_bytestring(), b"foo")
|
||||
|
||||
class TestGArray(unittest.TestCase):
|
||||
|
||||
--
|
||||
1.7.8.1
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>gnome</herd>
|
||||
<herd>python</herd>
|
||||
</pkgmetadata>
|
||||
@@ -0,0 +1,124 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="4"
|
||||
GCONF_DEBUG="no"
|
||||
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 *-pypy-*"
|
||||
|
||||
REAL_PN="${PN/-base}"
|
||||
GNOME_ORG_MODULE="${REAL_PN}"
|
||||
|
||||
# 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="examples test +threads" # doc
|
||||
|
||||
COMMON_DEPEND=">=dev-libs/glib-2.24.0:2
|
||||
>=dev-libs/gobject-introspection-1.29
|
||||
virtual/libffi"
|
||||
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
|
||||
--disable-cairo
|
||||
$(use_enable threads thread)"
|
||||
|
||||
python_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Do not build tests if unneeded, bug #226345
|
||||
epatch "${FILESDIR}/${REAL_PN}-2.90.1-make_check.patch"
|
||||
|
||||
# Support installation for multiple Python versions, upstream bug #648292
|
||||
epatch "${FILESDIR}/${REAL_PN}-3.0.0-support_multiple_python_versions.patch"
|
||||
|
||||
# Disable tests that fail
|
||||
#epatch "${FILESDIR}/${REAL_PN}-2.28.3-disable-failing-tests.patch"
|
||||
|
||||
# FIXME: disable tests that require >=gobject-introspection-1.31
|
||||
epatch "${FILESDIR}/${REAL_PN}-3.0.3-disable-new-gi-tests.patch"
|
||||
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=666852
|
||||
epatch "${FILESDIR}/${REAL_PN}-3.0.3-tests-python3.patch"
|
||||
|
||||
python_clean_py-compile_files
|
||||
|
||||
eautoreconf
|
||||
gnome2_src_prepare
|
||||
|
||||
python_copy_sources
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
python_execute_function -s gnome2_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
python_src_compile
|
||||
}
|
||||
|
||||
# FIXME: With python multiple ABI support, tests return 1 even when they pass
|
||||
src_test() {
|
||||
unset DBUS_SESSION_BUS_ADDRESS
|
||||
export GIO_USE_VFS="local" # prevents odd issues with deleting ${T}/.gvfs
|
||||
|
||||
testing() {
|
||||
export XDG_CACHE_HOME="${T}/$(PYTHON --ABI)"
|
||||
Xemake check PYTHON=$(PYTHON -a)
|
||||
unset XDG_CACHE_HOME
|
||||
}
|
||||
python_execute_function -s testing
|
||||
unset GIO_USE_VFS
|
||||
}
|
||||
|
||||
src_install() {
|
||||
python_execute_function -s gnome2_src_install
|
||||
python_clean_installation_image
|
||||
|
||||
if use examples; then
|
||||
insinto /usr/share/doc/${PF}
|
||||
doins -r examples
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
python_mod_optimize gi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
python_mod_cleanup gi
|
||||
}
|
||||
Reference in New Issue
Block a user