summaryrefslogtreecommitdiff
path: root/dev-python/pygtk
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/pygtk
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/pygtk')
-rw-r--r--dev-python/pygtk/Manifest9
-rw-r--r--dev-python/pygtk/files/pygtk-2.13.0-fix-codegen-location.patch11
-rw-r--r--dev-python/pygtk/files/pygtk-2.14.1-libdir-pc.patch12
-rw-r--r--dev-python/pygtk/files/pygtk-2.24.0-fix-leaks.patch58
-rw-r--r--dev-python/pygtk/files/pygtk-2.24.0-quartz-objc.patch45
-rw-r--r--dev-python/pygtk/files/pygtk-2.24.0-test-fail.patch9
-rw-r--r--dev-python/pygtk/files/pygtk-2.24.0-test_dialog.patch28
-rw-r--r--dev-python/pygtk/metadata.xml23
-rw-r--r--dev-python/pygtk/pygtk-2.24.0-r4.ebuild106
9 files changed, 301 insertions, 0 deletions
diff --git a/dev-python/pygtk/Manifest b/dev-python/pygtk/Manifest
new file mode 100644
index 000000000000..b30cce7ef635
--- /dev/null
+++ b/dev-python/pygtk/Manifest
@@ -0,0 +1,9 @@
+AUX pygtk-2.13.0-fix-codegen-location.patch 507 BLAKE2B 5013ac893c46143c2271a89df374584e43f28a78416466a6b1f5e5279452d1768800a700c6273f323b4bbb32831f046809f56f3fe4753c58c863f8aa7dd52514 SHA512 382fae5afc3082f0239e1228c226c8ae6ac1b8524cb9a2aa8ca2b3d3cef5b1e280058df1a3c764785f129c4d4c8808e1c4f6fa09f213ee53efa269ca4ad27542
+AUX pygtk-2.14.1-libdir-pc.patch 284 BLAKE2B 9ad16a6abfea68a656f58641cc572955b967e0dbe4baa3b92052bf92744da955a5be1cd721326d9a7b7e052879859bb59c79f4f5302fe55177653f3eadba6866 SHA512 cf1fb2731b14d9f96624be0bd250c178c25232f579e585567d8e44436f43f1d5444c9c85acca7cc13511cd036e19eacc40df158b0103c785f22149b76c9fe1a9
+AUX pygtk-2.24.0-fix-leaks.patch 1681 BLAKE2B a3c8fea7152e41e7877badd1482cbbf51a2ebb65cb7d695da568d210a8de381e081eef28f09a8044ec54e258ca7a04cafe5135d2badfd93986494926ce21bcf6 SHA512 438d72249f3a7073a8cba690610ca551ffa2c88b9df693b00a46178fdb53eec9a6e7db068b7b2700de4e4506810cc0746560db889abfdd2d30e57e8821f9d878
+AUX pygtk-2.24.0-quartz-objc.patch 1023 BLAKE2B 2fca6b1b92f424e853a6724857372f704581e2fac12a15e4b98261f471fc7381d4fae6b4517bdeb45b46e790692b1fdba0d35998c7d12b711cd0d04a6bb434eb SHA512 9e8f2bdfdd5ab4a4296f928fce5da532d16dc135cb58017bd0238deaa6fdf45a0f4b43a6ef76b5f9e117beade8172f230456636f3bc00672502cd126d609c35a
+AUX pygtk-2.24.0-test-fail.patch 248 BLAKE2B b71575b455e5e5ba740f412d199572d7be2f2290f84d047bab45c7ed464a029bb23ab9696a96b42b69575d2a977ecbd2fa63ced9b325b456a341f756ce00314d SHA512 e306324fa5542c492942c3a3f0be4d6a53f5641fff4362507195afa89bd73722aa2f65563ce7a8000d04b7824f69d840d3a8a53b8ec39bc31b97d2d215ebfde3
+AUX pygtk-2.24.0-test_dialog.patch 961 BLAKE2B 035021b5a4a94e487f8e4fdd69b83e54d2baea1891ce1bf8378e7375749de4a45477acdfe2a07e259d907bb182c2951bb512e7ded0ffdeed138ab4fce81f81b7 SHA512 13254063895412641b51cb536892f2c4b9bb76ac1ffa92f8d82fa20b80f5c7748392a968315af3731def20392de917a0ae2b4ac0607cee9e2f38911283d33ca9
+DIST pygtk-2.24.0.tar.bz2 2361097 BLAKE2B 35b8ad94f242dcfb5d0593762eaa5480928e63bfbf8d030dd199200daa1dd6fd1769c878517cbb56e3beeaeecedb554b06b04cc35f9b2eefd2d8ec4381daf707 SHA512 64f4344fcf7636e0b2016ffd5310250b5c02a1bf87e44aef39b5d4cf4a5fc50d27cb4f030d4c6802cff61fffb88dee7752821e3d8a4cd1c34dc3745d9ff2f0da
+EBUILD pygtk-2.24.0-r4.ebuild 2705 BLAKE2B 8d8ab339ba8a24685d5385ebcb34a7ba0a03b2aaa1d507592c173ff727af85172564c7a8abf8ec0b330bc3aa12c1810ffe7b4fbb99d8cf4053521c7db1fee927 SHA512 b8aebf7afa4d5cff53855d870b1e93a7fc6b3ec1bcc31e6998805f1ff5301d1d83415a2a596ab262b6b6b98bdce2488938b2b6072b4acd75668834cbba016d1e
+MISC metadata.xml 1105 BLAKE2B 271b1e6baf35487a0746bdb5eebe9a9f7c8f5dc2b14806e717a3fc3b468c063609c0693b3ee881e4538ca789926b5a9987f9fcac1746709f1ba19c36949af72c SHA512 037cab51c9a9cab4649559886753432a9e204dfd3fb2f145946a805fda17c3b544014d10b8b59a5b4b3d8e97d15a0048cd6f295bbca36515e963d52e9ad6181c
diff --git a/dev-python/pygtk/files/pygtk-2.13.0-fix-codegen-location.patch b/dev-python/pygtk/files/pygtk-2.13.0-fix-codegen-location.patch
new file mode 100644
index 000000000000..701d828f1f88
--- /dev/null
+++ b/dev-python/pygtk/files/pygtk-2.13.0-fix-codegen-location.patch
@@ -0,0 +1,11 @@
+--- a/pygtk-2.0.pc.in 2007-11-01 12:20:22.000000000 -0400
++++ b/pygtk-2.0.pc.in 2008-05-28 22:21:04.000000000 -0400
+@@ -12,7 +12,7 @@ pygtkincludedir=${includedir}/pygtk-2.0
+ # This is strictly speaking not necessarily so (we refer to another
+ # package), but we want to preserve compatibility with times codegen
+ # was in PyGTK, not PyGObject.
+-codegendir=${datadir}/pygobject/2.0/codegen
++codegendir=${pyexecdir}/gtk-2.0/codegen
+
+ Name: PyGTK
+ Description: Python bindings for GTK+ and related libraries
diff --git a/dev-python/pygtk/files/pygtk-2.14.1-libdir-pc.patch b/dev-python/pygtk/files/pygtk-2.14.1-libdir-pc.patch
new file mode 100644
index 000000000000..d943e952a421
--- /dev/null
+++ b/dev-python/pygtk/files/pygtk-2.14.1-libdir-pc.patch
@@ -0,0 +1,12 @@
+https://bugzilla.gnome.org/show_bug.cgi?id=663421
+
+--- a/pygtk-2.0.pc.in
++++ b/pygtk-2.0.pc.in
+@@ -12,6 +12,7 @@
+ includedir=@includedir@
+ datarootdir=@datarootdir@
+ datadir=@datadir@
++libdir=@libdir@
+ pyexecdir=@pyexecdir@
+
+ # you can use the --variable=pygtkincludedir argument to
diff --git a/dev-python/pygtk/files/pygtk-2.24.0-fix-leaks.patch b/dev-python/pygtk/files/pygtk-2.24.0-fix-leaks.patch
new file mode 100644
index 000000000000..9106d43c4192
--- /dev/null
+++ b/dev-python/pygtk/files/pygtk-2.24.0-fix-leaks.patch
@@ -0,0 +1,58 @@
+From eca72baa5616fbe4dbebea43c7e5940847dc5ab8 Mon Sep 17 00:00:00 2001
+From: Owen W. Taylor <otaylor@fishsoup.net>
+Date: Tue, 27 Sep 2011 04:17:52 +0000
+Subject: Fix leaks of Pango objects
+
+Gtk.PrintContext.create_pango_context()
+Gtk.PrintContext.create_pango_layout()
+pangocairo.CairoContext.create_layout()
+
+were leaking the objects they returned.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=660216
+---
+diff --git a/gtk/gtk-2.10.defs b/gtk/gtk-2.10.defs
+index 69c7e0c..faa45e1 100644
+--- a/gtk/gtk-2.10.defs
++++ b/gtk/gtk-2.10.defs
+@@ -1388,12 +1388,14 @@
+ (define-method create_pango_context
+ (of-object "GtkPrintContext")
+ (c-name "gtk_print_context_create_pango_context")
++ (caller-owns-return #t)
+ (return-type "PangoContext*")
+ )
+
+ (define-method create_pango_layout
+ (of-object "GtkPrintContext")
+ (c-name "gtk_print_context_create_pango_layout")
++ (caller-owns-return #t)
+ (return-type "PangoLayout*")
+ )
+
+diff --git a/pangocairo.override b/pangocairo.override
+index bb923e6..5101107 100644
+--- a/pangocairo.override
++++ b/pangocairo.override
+@@ -118,11 +118,16 @@ _wrap_pango_cairo_update_context(PyGObject *self, PyObject *args, PyObject *kwar
+ static PyObject *
+ _wrap_pango_cairo_create_layout(PyGObject *self)
+ {
+- PangoLayout *ret;
++ PangoLayout *layout;
++ PyObject *ret;
+
+- ret = pango_cairo_create_layout(PycairoContext_GET(self));
++ layout = pango_cairo_create_layout(PycairoContext_GET(self));
+ /* pygobject_new handles NULL checking */
+- return pygobject_new((GObject *)ret);
++ ret = pygobject_new((GObject *)layout);
++ if (layout)
++ g_object_unref(layout);
++
++ return ret;
+ }
+
+ static PyObject *
+--
+cgit v0.9.2
diff --git a/dev-python/pygtk/files/pygtk-2.24.0-quartz-objc.patch b/dev-python/pygtk/files/pygtk-2.24.0-quartz-objc.patch
new file mode 100644
index 000000000000..828057e62b73
--- /dev/null
+++ b/dev-python/pygtk/files/pygtk-2.24.0-quartz-objc.patch
@@ -0,0 +1,45 @@
+From: Anders F Bjorklund <afb@users.sourceforge.net>
+Date: Mon, 4 Apr 2011 21:34:20 +0200
+Subject: [PATCH] use objective-c for quartz
+
+https://bugzilla.gnome.org/show_bug.cgi?id=646743
+---
+ configure.ac | 5 +++++
+ gtk/Makefile.am | 5 +++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 84c78f6c..27192f9c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -445,6 +445,11 @@ case $gdk_target in
+ ;;
+ esac
+
++if test "x$gdk_target" = "xquartz"; then
++ AM_CONDITIONAL(USE_QUARTZ, true)
++else
++ AM_CONDITIONAL(USE_QUARTZ, false)
++fi
+
+ dnl checks to see if numpy is installed.
+ AC_ARG_ENABLE(numpy,
+diff --git a/gtk/Makefile.am b/gtk/Makefile.am
+index 7bb5d0c8..44d68700 100644
+--- a/gtk/Makefile.am
++++ b/gtk/Makefile.am
+@@ -9,6 +9,11 @@ INCLUDES = \
+ $(PYGOBJECT_CFLAGS) \
+ -I$(srcdir)/gtk
+
++if USE_QUARTZ
++# same as in gtk+/gdk/quartz/Makefile.am
++INCLUDES += "-xobjective-c"
++endif
++
+ # defs files
+ defsdir = $(pkgdatadir)/$(PLATFORM_VERSION)/defs
+ defs_DATA =
+--
+2.12.0
+
diff --git a/dev-python/pygtk/files/pygtk-2.24.0-test-fail.patch b/dev-python/pygtk/files/pygtk-2.24.0-test-fail.patch
new file mode 100644
index 000000000000..5bb1aec13d89
--- /dev/null
+++ b/dev-python/pygtk/files/pygtk-2.24.0-test-fail.patch
@@ -0,0 +1,9 @@
+--- tests/runtests.py
++++ tests/runtests.py
+@@ -41,4 +41,5 @@
+ suite.addTest(loader.loadTestsFromName(name))
+
+ testRunner = unittest.TextTestRunner()
+-testRunner.run(suite)
++result = testRunner.run(suite)
++sys.exit(not result.wasSuccessful())
diff --git a/dev-python/pygtk/files/pygtk-2.24.0-test_dialog.patch b/dev-python/pygtk/files/pygtk-2.24.0-test_dialog.patch
new file mode 100644
index 000000000000..832007af2328
--- /dev/null
+++ b/dev-python/pygtk/files/pygtk-2.24.0-test_dialog.patch
@@ -0,0 +1,28 @@
+From eb92ecdfe7e310499743a5686560e18bb48ef0f0 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Wed, 2 Oct 2013 14:51:20 -0400
+Subject: [PATCH] tests: fix MessageDialogTest.testSubclass
+
+Don't check sub.__gtype__ until we set sub
+
+https://bugzilla.gnome.org/show_bug.cgi?id=709304
+---
+ tests/test_dialog.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test_dialog.py b/tests/test_dialog.py
+index a6a3ce5..6540be3 100644
+--- a/tests/test_dialog.py
++++ b/tests/test_dialog.py
+@@ -20,7 +20,7 @@ class MessageDialogTest(unittest.TestCase):
+ print sub.__gtype__.name
+ self.assertEqual(sub.__gtype__.name, 'GtkMessageDialog')
+
+- type('Sub', (gtk.MessageDialog,), {'__gtype_name__': 'SubDialog'})
++ sub = type('Sub', (gtk.MessageDialog,), {'__gtype_name__': 'SubDialog'})
+ self.assertEqual(sub.__gtype__.name, 'SubDialog')
+
+ def testDialogLeak(self):
+--
+1.8.3.2
+
diff --git a/dev-python/pygtk/metadata.xml b/dev-python/pygtk/metadata.xml
new file mode 100644
index 000000000000..a6d18544f32e
--- /dev/null
+++ b/dev-python/pygtk/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>gnome@gentoo.org</email>
+ <name>Gentoo GNOME Desktop</name>
+</maintainer>
+<maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+</maintainer>
+<longdescription>
+PyGTK provides a convenient wrapper for the GTK+ library for use in
+Python programs, taking care of many of the boring details such as
+managing memory and type casting. When combined with PyORBit and
+gnome-python, it can be used to write full featured Gnome applications.
+</longdescription>
+<longdescription lang="ja">
+PyGTKは、Python言語プログラムでGTK+ライブラリを使うための、マネージング・メモリ&gt;やタイプ・キャスティングの様な詰まらない事柄の世話をしてくれる便利なラッパーを提
+供します。PyORBitとgnome-pythonと組みあわせると、GNOMEのアプリケーションの特性を
+完全に抑えるものにすることができます。
+</longdescription>
+</pkgmetadata>
diff --git a/dev-python/pygtk/pygtk-2.24.0-r4.ebuild b/dev-python/pygtk/pygtk-2.24.0-r4.ebuild
new file mode 100644
index 000000000000..7766afe1888a
--- /dev/null
+++ b/dev-python/pygtk/pygtk-2.24.0-r4.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME_TARBALL_SUFFIX="bz2"
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils flag-o-matic gnome2 python-r1 virtualx
+
+DESCRIPTION="GTK+2 bindings for Python"
+HOMEPAGE="http://www.pygtk.org/"
+
+LICENSE="LGPL-2.1"
+SLOT="2"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc examples test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ >=dev-libs/glib-2.8:2
+ >=x11-libs/pango-1.16
+ >=dev-libs/atk-1.12
+ >=x11-libs/gtk+-2.24:2
+ >=dev-python/pycairo-1.0.2[${PYTHON_USEDEP}]
+ >=dev-python/pygobject-2.26.8-r53:2[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ >=gnome-base/libglade-2.5:2.0
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? (
+ dev-libs/libxslt
+ >=app-text/docbook-xsl-stylesheets-1.70.1 )
+"
+
+src_prepare() {
+ # Fix declaration of codegen in .pc
+ epatch "${FILESDIR}/${PN}-2.13.0-fix-codegen-location.patch"
+ epatch "${FILESDIR}/${PN}-2.14.1-libdir-pc.patch"
+
+ # Fix leaks of Pango objects
+ epatch "${FILESDIR}/${PN}-2.24.0-fix-leaks.patch"
+
+ # Fail when tests are failing, bug #391307
+ epatch "${FILESDIR}/${PN}-2.24.0-test-fail.patch"
+
+ # Fix broken tests, https://bugzilla.gnome.org/show_bug.cgi?id=709304
+ epatch "${FILESDIR}/${P}-test_dialog.patch"
+
+ # Fix build on Darwin
+ epatch "${FILESDIR}/${PN}-2.24.0-quartz-objc.patch"
+
+ # Examples is handled "manually"
+ sed -e 's/\(SUBDIRS = .* \)examples/\1/' \
+ -i Makefile.am Makefile.in || die
+
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die #466968
+
+ AT_M4DIR="m4" eautoreconf
+
+ prepare_pygtk() {
+ mkdir -p "${BUILD_DIR}" || die
+ }
+ python_foreach_impl prepare_pygtk
+}
+
+src_configure() {
+ use hppa && append-flags -ffunction-sections
+ configure_pygtk() {
+ ECONF_SOURCE="${S}" gnome2_src_configure \
+ $(use_enable doc docs) \
+ --with-glade \
+ --enable-thread
+ }
+ python_foreach_impl run_in_build_dir configure_pygtk
+}
+
+src_compile() {
+ python_foreach_impl run_in_build_dir gnome2_src_compile
+}
+
+src_test() {
+ # Let tests pass without permissions problems, bug #245103
+ gnome2_environment_reset
+ unset DBUS_SESSION_BUS_ADDRESS
+
+ testing() {
+ cd tests
+ Xemake check-local
+ }
+ python_foreach_impl run_in_build_dir testing
+}
+
+src_install() {
+ dodoc AUTHORS ChangeLog INSTALL MAPPING NEWS README THREADS TODO
+
+ if use examples; then
+ rm examples/Makefile*
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+
+ python_foreach_impl run_in_build_dir gnome2_src_install
+ prune_libtool_files --modules
+}