1 # This ebuild is a modified version of the work originally distributed with
2 # Gentoo GNU/Linux, covered by the following copyright and permission notice:
4 # Copyright 1999-2020 Gentoo Authors
5 # Distributed under the terms of the GNU General Public License v2
7 # The modifications are:
9 # * Resurrect python2 version installable alongside newer version (2020-11)
10 # * Avoid python eclasses as there is no more python2 support (2022-12)
11 # * Drop unused eutils inherit (2023-09)
16 GNOME2_EAUTORECONF=yes
18 inherit autotools virtualx gnome2
20 DESCRIPTION="GLib's GObject library bindings for Python 2"
21 HOMEPAGE="http://www.pygtk.org/"
25 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
26 IUSE="examples libffi test"
28 # Tests seem to require network access which can't work.
31 BDEPEND="virtual/pkgconfig
34 RDEPEND=">=dev-libs/glib-2.24.0:2
35 libffi? ( dev-libs/libffi:= )
36 !<dev-python/pygtk-2.23
41 media-fonts/font-cursor-misc
42 media-fonts/font-misc-misc )"
45 # Fix FHS compliance, see upstream bug #535524
46 "$FILESDIR/$PN-2.28.3-fix-codegen-location.patch"
48 # Do not build tests if unneeded, bug #226345
49 "$FILESDIR/$PN-2.28.3-make_check.patch"
51 # Support installation for multiple Python versions, upstream bug #648292
52 "$FILESDIR/$PN-2.28.3-support_multiple_python_versions.patch"
54 # Disable tests that fail
55 "$FILESDIR/$P-disable-failing-tests.patch"
57 # Disable introspection tests when we build with --disable-introspection
58 "$FILESDIR/$P-tests-no-introspection.patch"
61 "$FILESDIR/$P-set_qdata.patch"
62 "$FILESDIR/$P-gio-types-2.32.patch"
64 # Fix glib-2.36 compatibility, bug #486602
65 "$FILESDIR/$P-glib-2.36-class_init.patch"
67 # Fix python byte-compilation
68 "$FILESDIR/$P-python-byte-compile.patch"
73 -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
74 -e 's:AM_PROG_CC_STDC:AC_PROG_CC:' \
81 DOCS="AUTHORS ChangeLog* NEWS README"
83 # --disable-introspection and --disable-cairo because we use pygobject:3
84 # for introspection support
86 --disable-introspection
88 $(use_with libffi ffi)
92 gnome2_src_configure "${myconf[@]}"
95 # FIXME: With python multiple ABI support, tests return 1 even when they pass
97 unset DBUS_SESSION_BUS_ADDRESS
98 export GIO_USE_VFS="local" # prevents odd issues with deleting ${T}/.gvfs
99 export XDG_CACHE_HOME="${T}/${EPYTHON}"
101 virtx emake -j1 check
103 unset XDG_CACHE_HOME GIO_USE_VFS
109 if use examples; then