1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} )
7 inherit python-r1 toolchain-funcs
9 DESCRIPTION="Private sip module for PyQt5"
10 HOMEPAGE="https://www.riverbankcomputing.com/software/sip/intro"
13 MY_P=${MY_PN}-${PV/_pre/.dev}
14 if [[ ${PV} == *_pre* ]]; then
15 SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz"
17 SRC_URI="https://www.riverbankcomputing.com/static/Downloads/${MY_PN}/${PV}/${MY_P}.tar.gz"
20 # Sub-slot based on SIP_API_MAJOR_NR from siplib/sip.h
22 LICENSE="|| ( GPL-2 GPL-3 SIP )"
23 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
26 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
28 DEPEND="${PYTHON_DEPS}"
30 !<dev-python/PyQt5-5.12.2
36 # Sub-slot sanity check
37 local sub_slot=${SLOT#*/}
38 local sip_api_major_nr=$(sed -nre 's:^#define SIP_API_MAJOR_NR\s+([0-9]+):\1:p' siplib/sip.h || die)
39 if [[ ${sub_slot} != ${sip_api_major_nr} ]]; then
41 eerror "Ebuild sub-slot (${sub_slot}) does not match SIP_API_MAJOR_NR (${sip_api_major_nr})"
42 eerror "Please update SLOT variable as follows:"
43 eerror " SLOT=\"${SLOT%%/*}/${sip_api_major_nr}\""
45 die "sub-slot sanity check failed"
53 if ! python_is_python3; then
54 local CFLAGS="${CFLAGS} -fno-strict-aliasing"
60 --sip-module PyQt5.sip
61 --sysroot="${ESYSROOT}/usr"
68 CXXFLAGS="${CXXFLAGS}"
71 LINK_SHLIB="$(tc-getCXX)"
80 python_foreach_impl run_in_build_dir configuration
84 python_foreach_impl run_in_build_dir default
89 emake DESTDIR="${D}" install
91 python_foreach_impl run_in_build_dir installation