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: Sat, 19 Jun 2021 19:37:35
Message-Id: 1624131426.3b5cdd5604f885c8b0b68be0dc00fddaa5cfe8ac.pesa@gentoo
1 commit: 3b5cdd5604f885c8b0b68be0dc00fddaa5cfe8ac
2 Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 19 19:37:06 2021 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 19 19:37:06 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b5cdd56
7
8 dev-python/sip: stop installing .dist-info
9
10 Closes: https://bugs.gentoo.org/796251
11 Package-Manager: Portage-3.0.20, Repoman-3.0.3
12 Signed-off-by: Davide Pesavento <pesa <AT> gentoo.org>
13
14 dev-python/sip/sip-4.19.25-r1.ebuild | 93 ++++++++++++++++++++++
15 .../{sip-5.5.0-r1.ebuild => sip-5.5.0-r2.ebuild} | 3 +-
16 dev-python/sip/sip-6.1.1.ebuild | 3 +-
17 3 files changed, 97 insertions(+), 2 deletions(-)
18
19 diff --git a/dev-python/sip/sip-4.19.25-r1.ebuild b/dev-python/sip/sip-4.19.25-r1.ebuild
20 new file mode 100644
21 index 00000000000..6c1abd79157
22 --- /dev/null
23 +++ b/dev-python/sip/sip-4.19.25-r1.ebuild
24 @@ -0,0 +1,93 @@
25 +# Copyright 1999-2021 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=7
29 +
30 +PYTHON_COMPAT=( python3_{8..10} )
31 +inherit python-r1 toolchain-funcs
32 +
33 +DESCRIPTION="Python bindings generator for C/C++ libraries"
34 +HOMEPAGE="https://www.riverbankcomputing.com/software/sip/"
35 +
36 +MY_P=${PN}-${PV/_pre/.dev}
37 +if [[ ${PV} == *_pre* ]]; then
38 + SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz"
39 +else
40 + SRC_URI="https://www.riverbankcomputing.com/static/Downloads/${PN}/${PV}/${MY_P}.tar.gz"
41 +fi
42 +S=${WORKDIR}/${MY_P}
43 +
44 +# Sub-slot based on SIP_API_MAJOR_NR from siplib/sip.h
45 +SLOT="0/12"
46 +LICENSE="|| ( GPL-2 GPL-3 SIP )"
47 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
48 +IUSE="doc"
49 +
50 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
51 +
52 +DEPEND="${PYTHON_DEPS}"
53 +RDEPEND="${DEPEND}"
54 +
55 +PATCHES=( "${FILESDIR}"/${PN}-4.18-darwin.patch )
56 +
57 +src_prepare() {
58 + # Sub-slot sanity check
59 + local sub_slot=${SLOT#*/}
60 + local sip_api_major_nr=$(sed -nre 's:^#define SIP_API_MAJOR_NR\s+([0-9]+):\1:p' siplib/sip.h || die)
61 + if [[ ${sub_slot} != ${sip_api_major_nr} ]]; then
62 + eerror
63 + eerror "Ebuild sub-slot (${sub_slot}) does not match SIP_API_MAJOR_NR (${sip_api_major_nr})"
64 + eerror "Please update SLOT variable as follows:"
65 + eerror " SLOT=\"${SLOT%%/*}/${sip_api_major_nr}\""
66 + eerror
67 + die "sub-slot sanity check failed"
68 + fi
69 +
70 + default
71 +}
72 +
73 +src_configure() {
74 + configuration() {
75 + local incdir=$(python_get_includedir)
76 + local myconf=(
77 + "${EPYTHON}"
78 + "${S}"/configure.py
79 + --sysroot="${ESYSROOT}/usr"
80 + --bindir="${EPREFIX}/usr/bin"
81 + --destdir="$(python_get_sitedir)"
82 + --incdir="${incdir#${SYSROOT}}"
83 + --no-dist-info
84 + AR="$(tc-getAR) cqs"
85 + CC="$(tc-getCC)"
86 + CFLAGS="${CFLAGS}"
87 + CFLAGS_RELEASE=
88 + CXX="$(tc-getCXX)"
89 + CXXFLAGS="${CXXFLAGS}"
90 + CXXFLAGS_RELEASE=
91 + LINK="$(tc-getCXX)"
92 + LINK_SHLIB="$(tc-getCXX)"
93 + LFLAGS="${LDFLAGS}"
94 + LFLAGS_RELEASE=
95 + RANLIB=
96 + STRIP=
97 + )
98 + echo "${myconf[@]}"
99 + "${myconf[@]}" || die
100 + }
101 + python_foreach_impl run_in_build_dir configuration
102 +}
103 +
104 +src_compile() {
105 + python_foreach_impl run_in_build_dir default
106 +}
107 +
108 +src_install() {
109 + installation() {
110 + emake DESTDIR="${D}" install
111 + python_optimize
112 + }
113 + python_foreach_impl run_in_build_dir installation
114 +
115 + einstalldocs
116 + use doc && dodoc -r doc/html
117 +}
118
119 diff --git a/dev-python/sip/sip-5.5.0-r1.ebuild b/dev-python/sip/sip-5.5.0-r2.ebuild
120 similarity index 90%
121 rename from dev-python/sip/sip-5.5.0-r1.ebuild
122 rename to dev-python/sip/sip-5.5.0-r2.ebuild
123 index 26eee4168c3..3fef4177058 100644
124 --- a/dev-python/sip/sip-5.5.0-r1.ebuild
125 +++ b/dev-python/sip/sip-5.5.0-r2.ebuild
126 @@ -3,7 +3,7 @@
127
128 EAPI=7
129
130 -PYTHON_COMPAT=( python3_{7..10} )
131 +PYTHON_COMPAT=( python3_{8..10} )
132 inherit distutils-r1
133
134 DESCRIPTION="Python bindings generator for C/C++ libraries"
135 @@ -21,6 +21,7 @@ LICENSE="|| ( GPL-2 GPL-3 SIP )"
136 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
137
138 RDEPEND="
139 + !<dev-python/sip-4.19.25-r1[${PYTHON_USEDEP}]
140 !=dev-python/sip-5.5.0-r0[${PYTHON_USEDEP}]
141 dev-python/packaging[${PYTHON_USEDEP}]
142 dev-python/toml[${PYTHON_USEDEP}]
143
144 diff --git a/dev-python/sip/sip-6.1.1.ebuild b/dev-python/sip/sip-6.1.1.ebuild
145 index 26eee4168c3..3fef4177058 100644
146 --- a/dev-python/sip/sip-6.1.1.ebuild
147 +++ b/dev-python/sip/sip-6.1.1.ebuild
148 @@ -3,7 +3,7 @@
149
150 EAPI=7
151
152 -PYTHON_COMPAT=( python3_{7..10} )
153 +PYTHON_COMPAT=( python3_{8..10} )
154 inherit distutils-r1
155
156 DESCRIPTION="Python bindings generator for C/C++ libraries"
157 @@ -21,6 +21,7 @@ LICENSE="|| ( GPL-2 GPL-3 SIP )"
158 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
159
160 RDEPEND="
161 + !<dev-python/sip-4.19.25-r1[${PYTHON_USEDEP}]
162 !=dev-python/sip-5.5.0-r0[${PYTHON_USEDEP}]
163 dev-python/packaging[${PYTHON_USEDEP}]
164 dev-python/toml[${PYTHON_USEDEP}]