1 # Copyright © 2020-2021 Nick Bowler
3 # License GPLv2+: GNU General Public License version 2 or any later version.
4 # This is free software: you are free to change and redistribute it.
5 # There is NO WARRANTY, to the extent permitted by law.
7 # This is a modified version of the original ebuild from Gentoo GNU/Linux,
8 # covered by the following copyright and permission notice:
10 # Copyright 1999-2020 Gentoo Authors
11 # Distributed under the terms of the GNU General Public License v2
16 PYTHON_COMPAT=( python2_7 )
17 PYTHON_REQ_USE="threads(+)"
18 DISTUTILS_USE_SETUPTOOLS=no
22 DESCRIPTION="Python bindings for the cairo library"
23 HOMEPAGE="https://www.cairographics.org/pycairo/ https://github.com/pygobject/pycairo"
24 SRC_URI="https://github.com/pygobject/${PN}/releases/download/v${PV}/${P}.tar.gz"
26 LICENSE="|| ( LGPL-2.1 MPL-1.1 )"
28 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
31 # Strong block on old pycairo w/ python2 support because the merge will
32 # otherwise not work properly due to replacing a directory with a file.
34 RDEPEND=">=x11-libs/cairo-1.13.1[svg]
35 !!dev-python/pycairo:0[python_targets_python2_7]"
39 "$FILESDIR/$P-no-setuptools.patch"
40 "$FILESDIR/$PN-1.19.1-py39.patch"
43 distutils_enable_tests setup.py
46 einfo "Skipping tests on Python 2 to unblock deps"
50 distutils-r1_python_install \
51 install_pkgconfig --pkgconfigdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
54 python_install_all() {
59 distutils-r1_python_install_all