1 # Copyright © 2020 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
15 PYTHON_COMPAT=( python2_7 )
16 PYTHON_REQ_USE="threads(+)"
17 DISTUTILS_USE_SETUPTOOLS=no
21 DESCRIPTION="Python bindings for the cairo library"
22 HOMEPAGE="https://www.cairographics.org/pycairo/ https://github.com/pygobject/pycairo"
23 SRC_URI="https://github.com/pygobject/${PN}/releases/download/v${PV}/${P}.tar.gz"
25 LICENSE="|| ( LGPL-2.1 MPL-1.1 )"
27 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
30 # Strong block on old pycairo w/ python2 support because the merge will
31 # otherwise not work properly due to replacing a directory with a file.
33 RDEPEND=">=x11-libs/cairo-1.13.1[svg]
34 !!dev-python/pycairo:0[python_targets_python2_7]"
38 "$FILESDIR/$P-no-setuptools.patch"
39 "$FILESDIR/$PN-1.19.1-py39.patch"
42 distutils_enable_tests setup.py
45 einfo "Skipping tests on Python 2 to unblock deps"
49 distutils-r1_python_install \
50 install_pkgconfig --pkgconfigdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
53 python_install_all() {
58 distutils-r1_python_install_all