1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 GNOME_TARBALL_SUFFIX="bz2"
8 PYTHON_COMPAT=( python2_7 )
10 inherit autotools flag-o-matic gnome2 python-r1 virtualx
12 DESCRIPTION="GTK+2 bindings for Python"
13 HOMEPAGE="https://gitlab.gnome.org/Archive/pygtk"
17 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ~ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
18 IUSE="doc examples test"
19 REQUIRED_USE=$PYTHON_REQUIRED_USE
21 RESTRICT="!test? ( test )"
23 RDEPEND="${PYTHON_DEPS}
27 >=x11-libs/gtk+-2.24:2
28 >=dev-python/pycairo-1.0.2:2[$PYTHON_USEDEP]
29 >=dev-python/pygobject-2.26.8-r53:2[$PYTHON_USEDEP]
30 >=gnome-base/libglade-2.5:2.0
36 >=app-text/docbook-xsl-stylesheets-1.70.1 )
40 # Fix declaration of codegen in .pc
41 "${FILESDIR}/${PN}-2.13.0-fix-codegen-location.patch"
42 "${FILESDIR}/${PN}-2.14.1-libdir-pc.patch"
43 # Fix leaks of Pango objects
44 "${FILESDIR}/${PN}-2.24.0-fix-leaks.patch"
45 # Fail when tests are failing, bug #391307
46 "${FILESDIR}/${PN}-2.24.0-test-fail.patch"
47 # Fix broken tests, https://bugzilla.gnome.org/show_bug.cgi?id=709304
48 "${FILESDIR}/${P}-test_dialog.patch"
50 "${FILESDIR}/${PN}-2.24.0-quartz-objc.patch"
52 "${FILESDIR}/${PN}-2.24.0-pango-1.44.patch"
58 # Examples is handled "manually"
59 sed -e 's/\(SUBDIRS = .* \)examples/\1/' \
60 -i Makefile.am Makefile.in || die
62 sed -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
63 -i configure.ac || die #466968
65 AT_M4DIR="m4" eautoreconf
68 mkdir -p "${BUILD_DIR}" || die
70 python_foreach_impl prepare_pygtk
74 use hppa && append-flags -ffunction-sections
76 ECONF_SOURCE="${S}" gnome2_src_configure \
77 $(use_enable doc docs) \
82 python_foreach_impl run_in_build_dir configure_pygtk
86 python_foreach_impl run_in_build_dir gnome2_src_compile
90 # Let tests pass without permissions problems, bug #245103
91 gnome2_environment_reset
92 unset DBUS_SESSION_BUS_ADDRESS
96 virtx emake check-local
98 python_foreach_impl run_in_build_dir testing
102 dodoc AUTHORS ChangeLog INSTALL MAPPING NEWS README THREADS TODO
104 if use examples; then
105 rm examples/Makefile* || die
109 python_foreach_impl run_in_build_dir gnome2_src_install
110 find "${D}" -name '*.la' -type f -delete || die