Gentoo Archives: gentoo-commits

From: Davide Pesavento <pesa@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/sip/
Date: Sun, 28 Apr 2019 18:16:28
Message-Id: 1556475378.b42e94fc10afdc95b25437e3f422d96db4529137.pesa@gentoo
1 commit: b42e94fc10afdc95b25437e3f422d96db4529137
2 Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 28 18:15:39 2019 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 28 18:16:18 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b42e94fc
7
8 dev-python/sip: add 4.19.16
9
10 Package-Manager: Portage-2.3.65, Repoman-2.3.12
11 Signed-off-by: Davide Pesavento <pesa <AT> gentoo.org>
12
13 dev-python/sip/Manifest | 1 +
14 dev-python/sip/sip-4.19.16.ebuild | 98 +++++++++++++++++++++++++++++++++++++++
15 2 files changed, 99 insertions(+)
16
17 diff --git a/dev-python/sip/Manifest b/dev-python/sip/Manifest
18 index efd7618cdf2..5e97c329b13 100644
19 --- a/dev-python/sip/Manifest
20 +++ b/dev-python/sip/Manifest
21 @@ -1,2 +1,3 @@
22 DIST sip-4.19.13.tar.gz 1038815 BLAKE2B 0b6f2941140a535cfdfb51db71cf9a55e5f65be85961e304496fded7781da42b0ab7d01045b8802468a3ce3b57e7f571851fc7713fd47a03c8344017982d6632 SHA512 eb456e1f7efa463f859047acc5301e19279e1627629d0bad3ac7a0a52b77575126bc3f2c64bb4278ae11d415c13d2731dfc8c816bba71307173d393a414aae98
23 DIST sip-4.19.15.tar.gz 1053921 BLAKE2B afe0f1c2faf839305d21da05a667e649c37ab42c95df86d237bbd8f39a6b8bb7224da547467311bf82a85ce8f0fafd8bb6dd7cbf6050f2b157773339438d6277 SHA512 9518a5e90d54758b13dd8752669d4deb175cea8d8cdf810deaf554cd157d32ab7e394d23c774993fac3b7c02d56445b80962457d59f5cda543917a0251816422
24 +DIST sip-4.19.16.tar.gz 1055966 BLAKE2B 0c078c7d747c3b92e739227829233dddd3c9e7c86ff50f80cd428bc8717f4ba22741fbabfd76d8e263c18a09ad14e7dfbde3423e984d31cd9a5734b1eaa25c86 SHA512 6a4e3e8580e914544c9037db61ab9cf05e2460cf2dbdeb67d30c949aa150952d2bb337061f7c7a9222251b04f83a1db1554ff576c3e83b8f60851b442133befa
25
26 diff --git a/dev-python/sip/sip-4.19.16.ebuild b/dev-python/sip/sip-4.19.16.ebuild
27 new file mode 100644
28 index 00000000000..cbfa17402c9
29 --- /dev/null
30 +++ b/dev-python/sip/sip-4.19.16.ebuild
31 @@ -0,0 +1,98 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
38 +inherit python-r1 toolchain-funcs
39 +
40 +DESCRIPTION="Python extension module generator for C and C++ libraries"
41 +HOMEPAGE="https://www.riverbankcomputing.com/software/sip/intro"
42 +
43 +MY_PN=sip
44 +MY_P=${MY_PN}-${PV/_pre/.dev}
45 +if [[ ${PV} == *_pre* ]]; then
46 + SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz"
47 +else
48 + SRC_URI="https://www.riverbankcomputing.com/static/Downloads/${MY_PN}/${PV}/${MY_P}.tar.gz"
49 +fi
50 +
51 +# Sub-slot based on SIP_API_MAJOR_NR from siplib/sip.h
52 +SLOT="0/12"
53 +LICENSE="|| ( GPL-2 GPL-3 SIP )"
54 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
55 +IUSE="doc"
56 +
57 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
58 +
59 +DEPEND="${PYTHON_DEPS}"
60 +RDEPEND="${DEPEND}"
61 +
62 +S=${WORKDIR}/${MY_P}
63 +
64 +PATCHES=( "${FILESDIR}"/${PN}-4.18-darwin.patch )
65 +
66 +src_prepare() {
67 + # Sub-slot sanity check
68 + local sub_slot=${SLOT#*/}
69 + local sip_api_major_nr=$(sed -nre 's:^#define SIP_API_MAJOR_NR\s+([0-9]+):\1:p' siplib/sip.h || die)
70 + if [[ ${sub_slot} != ${sip_api_major_nr} ]]; then
71 + eerror
72 + eerror "Ebuild sub-slot (${sub_slot}) does not match SIP_API_MAJOR_NR (${sip_api_major_nr})"
73 + eerror "Please update SLOT variable as follows:"
74 + eerror " SLOT=\"${SLOT%%/*}/${sip_api_major_nr}\""
75 + eerror
76 + die "sub-slot sanity check failed"
77 + fi
78 +
79 + default
80 +}
81 +
82 +src_configure() {
83 + configuration() {
84 + if ! python_is_python3; then
85 + local CFLAGS="${CFLAGS} -fno-strict-aliasing"
86 + fi
87 +
88 + local incdir=$(python_get_includedir)
89 + local myconf=(
90 + "${PYTHON}"
91 + "${S}"/configure.py
92 + --sysroot="${ESYSROOT}/usr"
93 + --bindir="${EPREFIX}/usr/bin"
94 + --destdir="$(python_get_sitedir)"
95 + --incdir="${incdir#${SYSROOT}}"
96 + AR="$(tc-getAR) cqs"
97 + CC="$(tc-getCC)"
98 + CFLAGS="${CFLAGS}"
99 + CFLAGS_RELEASE=
100 + CXX="$(tc-getCXX)"
101 + CXXFLAGS="${CXXFLAGS}"
102 + CXXFLAGS_RELEASE=
103 + LINK="$(tc-getCXX)"
104 + LINK_SHLIB="$(tc-getCXX)"
105 + LFLAGS="${LDFLAGS}"
106 + LFLAGS_RELEASE=
107 + RANLIB=
108 + STRIP=
109 + )
110 + echo "${myconf[@]}"
111 + "${myconf[@]}" || die
112 + }
113 + python_foreach_impl run_in_build_dir configuration
114 +}
115 +
116 +src_compile() {
117 + python_foreach_impl run_in_build_dir default
118 +}
119 +
120 +src_install() {
121 + installation() {
122 + emake DESTDIR="${D}" install
123 + python_optimize
124 + }
125 + python_foreach_impl run_in_build_dir installation
126 +
127 + einstalldocs
128 + use doc && dodoc -r doc/html
129 +}