summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuilherme Amadio <amadio@gentoo.org>2017-03-14 10:07:01 -0300
committerGuilherme Amadio <amadio@gentoo.org>2017-03-15 22:32:02 -0300
commit45de86a213440aaf9e5cdee8c88e35d67d7778c1 (patch)
treed3f1bc16345acd2f298b995bd6a7fdeb27075e35 /dev-python/pygtk
parentnet-misc/mikutter: bump and drop old (diff)
downloadgentoo-45de86a213440aaf9e5cdee8c88e35d67d7778c1.tar.gz
gentoo-45de86a213440aaf9e5cdee8c88e35d67d7778c1.tar.bz2
gentoo-45de86a213440aaf9e5cdee8c88e35d67d7778c1.zip
dev-python/pygtk: Fix build on macOS, bugs 370079 and 400843
Gentoo-Bug: https://bugs.gentoo.org/370079 Gentoo-Bug: https://bugs.gentoo.org/400843 Package-Manager: Portage-2.3.4, Repoman-2.3.2
Diffstat (limited to 'dev-python/pygtk')
-rw-r--r--dev-python/pygtk/files/pygtk-2.24.0-quartz-objc.patch45
-rw-r--r--dev-python/pygtk/pygtk-2.24.0-r4.ebuild3
2 files changed, 48 insertions, 0 deletions
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/pygtk-2.24.0-r4.ebuild b/dev-python/pygtk/pygtk-2.24.0-r4.ebuild
index ee46d4be3091..13904131a06c 100644
--- a/dev-python/pygtk/pygtk-2.24.0-r4.ebuild
+++ b/dev-python/pygtk/pygtk-2.24.0-r4.ebuild
@@ -47,6 +47,9 @@ src_prepare() {
# 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