Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/xraylib/
Date: Fri, 29 Jan 2021 21:41:35
Message-Id: 1611956470.5f30376c31a4e93fa6a839d51ca832b6f113bc7a.andrewammerlaan@gentoo
1 commit: 5f30376c31a4e93fa6a839d51ca832b6f113bc7a
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
3 AuthorDate: Fri Jan 29 21:41:10 2021 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
5 CommitDate: Fri Jan 29 21:41:10 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=5f30376c
7
8 sci-libs/xraylib: version bump, EAPI bump, add ruby and lua targets
9
10 drop java support, uses gradle now which is not supported
11 by portage at the moment
12
13 Package-Manager: Portage-3.0.14, Repoman-3.0.2
14 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
15
16 sci-libs/xraylib/xraylib-2.16.0.ebuild | 83 ------------------------------
17 sci-libs/xraylib/xraylib-3.1.0.ebuild | 83 ------------------------------
18 sci-libs/xraylib/xraylib-4.0.0.ebuild | 94 ++++++++++++++++++++++++++++++++++
19 3 files changed, 94 insertions(+), 166 deletions(-)
20
21 diff --git a/sci-libs/xraylib/xraylib-2.16.0.ebuild b/sci-libs/xraylib/xraylib-2.16.0.ebuild
22 deleted file mode 100644
23 index 97905e356..000000000
24 --- a/sci-libs/xraylib/xraylib-2.16.0.ebuild
25 +++ /dev/null
26 @@ -1,83 +0,0 @@
27 -# Copyright 1999-2015 Gentoo Foundation
28 -# Distributed under the terms of the GNU General Public License v2
29 -
30 -EAPI=5
31 -
32 -AUTOTOOLS_AUTORECONF=true
33 -FORTRAN_NEEDED=fortran
34 -FORTRAN_STANDARD=2003
35 -PYTHON_COMPAT=( python2_7 ) # python 3 supported by github master
36 -
37 -inherit eutils autotools-utils python-single-r1 java-pkg-opt-2 fortran-2
38 -
39 -DESCRIPTION="X-ray matter interaction cross sections for X-ray fluorescence library"
40 -HOMEPAGE="https://github.com/tschoonj/xraylib"
41 -SRC_URI="https://github.com/tschoonj/xraylib/archive/${P}.tar.gz"
42 -
43 -LICENSE="BSD"
44 -SLOT="0"
45 -KEYWORDS="~amd64"
46 -IUSE="examples fortran java lua perl python"
47 -
48 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
49 -
50 -RDEPEND="
51 - java? ( >=virtual/jre-1.4:* )
52 - lua? ( dev-lang/lua:0 )
53 - perl? ( dev-lang/perl )
54 - python? ( ${PYTHON_DEPS} )"
55 -
56 -DEPEND="${RDEPEND}
57 - java? ( >=virtual/jdk-1.4:* )"
58 -
59 -S="${WORKDIR}/${PN}-${P}"
60 -
61 -DOCS=(AUTHORS BUGS Changelog README TODO)
62 -
63 -pkg_setup() {
64 - fortran-2_pkg_setup
65 - java-pkg-opt-2_pkg_setup
66 - use python && python-single-r1_pkg_setup
67 -}
68 -
69 -src_prepare() {
70 - java-pkg-opt-2_src_prepare
71 - autotools-utils_src_prepare
72 -}
73 -
74 -src_configure() {
75 - local myeconfargs=(
76 - --disable-idl
77 - $(use_enable fortran fortran2003)
78 - $(use_enable java)
79 - $(use_enable lua)
80 - $(use_enable perl)
81 - $(use_enable python)
82 - $(use_enable python python-integration)
83 - )
84 - autotools-utils_src_configure
85 -}
86 -
87 -src_compile() {
88 - # see https://github.com/tschoonj/xraylib/issues/11
89 - if use fortran || use java; then
90 - MAKEOPTS+=" -j1"
91 - fi
92 - autotools-utils_src_compile
93 -}
94 -
95 -src_install() {
96 - autotools-utils_src_install
97 -
98 - if use examples; then
99 - insinto /usr/share/doc/${PF}/examples
100 - doins example/*.c example/*.cpp
101 - use java && doins example/*.java
102 - use lua && doins example/*.lua
103 - use perl && doins example/*.pl
104 - use python && doins example/*.py
105 - docompress -x /usr/share/doc/${PF}/examples # Don't compress examples
106 - fi
107 -
108 - use java && java-pkg_regso /usr/share/xraylib/java/libxraylib.so
109 -}
110
111 diff --git a/sci-libs/xraylib/xraylib-3.1.0.ebuild b/sci-libs/xraylib/xraylib-3.1.0.ebuild
112 deleted file mode 100644
113 index 97905e356..000000000
114 --- a/sci-libs/xraylib/xraylib-3.1.0.ebuild
115 +++ /dev/null
116 @@ -1,83 +0,0 @@
117 -# Copyright 1999-2015 Gentoo Foundation
118 -# Distributed under the terms of the GNU General Public License v2
119 -
120 -EAPI=5
121 -
122 -AUTOTOOLS_AUTORECONF=true
123 -FORTRAN_NEEDED=fortran
124 -FORTRAN_STANDARD=2003
125 -PYTHON_COMPAT=( python2_7 ) # python 3 supported by github master
126 -
127 -inherit eutils autotools-utils python-single-r1 java-pkg-opt-2 fortran-2
128 -
129 -DESCRIPTION="X-ray matter interaction cross sections for X-ray fluorescence library"
130 -HOMEPAGE="https://github.com/tschoonj/xraylib"
131 -SRC_URI="https://github.com/tschoonj/xraylib/archive/${P}.tar.gz"
132 -
133 -LICENSE="BSD"
134 -SLOT="0"
135 -KEYWORDS="~amd64"
136 -IUSE="examples fortran java lua perl python"
137 -
138 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
139 -
140 -RDEPEND="
141 - java? ( >=virtual/jre-1.4:* )
142 - lua? ( dev-lang/lua:0 )
143 - perl? ( dev-lang/perl )
144 - python? ( ${PYTHON_DEPS} )"
145 -
146 -DEPEND="${RDEPEND}
147 - java? ( >=virtual/jdk-1.4:* )"
148 -
149 -S="${WORKDIR}/${PN}-${P}"
150 -
151 -DOCS=(AUTHORS BUGS Changelog README TODO)
152 -
153 -pkg_setup() {
154 - fortran-2_pkg_setup
155 - java-pkg-opt-2_pkg_setup
156 - use python && python-single-r1_pkg_setup
157 -}
158 -
159 -src_prepare() {
160 - java-pkg-opt-2_src_prepare
161 - autotools-utils_src_prepare
162 -}
163 -
164 -src_configure() {
165 - local myeconfargs=(
166 - --disable-idl
167 - $(use_enable fortran fortran2003)
168 - $(use_enable java)
169 - $(use_enable lua)
170 - $(use_enable perl)
171 - $(use_enable python)
172 - $(use_enable python python-integration)
173 - )
174 - autotools-utils_src_configure
175 -}
176 -
177 -src_compile() {
178 - # see https://github.com/tschoonj/xraylib/issues/11
179 - if use fortran || use java; then
180 - MAKEOPTS+=" -j1"
181 - fi
182 - autotools-utils_src_compile
183 -}
184 -
185 -src_install() {
186 - autotools-utils_src_install
187 -
188 - if use examples; then
189 - insinto /usr/share/doc/${PF}/examples
190 - doins example/*.c example/*.cpp
191 - use java && doins example/*.java
192 - use lua && doins example/*.lua
193 - use perl && doins example/*.pl
194 - use python && doins example/*.py
195 - docompress -x /usr/share/doc/${PF}/examples # Don't compress examples
196 - fi
197 -
198 - use java && java-pkg_regso /usr/share/xraylib/java/libxraylib.so
199 -}
200
201 diff --git a/sci-libs/xraylib/xraylib-4.0.0.ebuild b/sci-libs/xraylib/xraylib-4.0.0.ebuild
202 new file mode 100644
203 index 000000000..e89a19dde
204 --- /dev/null
205 +++ b/sci-libs/xraylib/xraylib-4.0.0.ebuild
206 @@ -0,0 +1,94 @@
207 +# Copyright 1999-2021 Gentoo Authors
208 +# Distributed under the terms of the GNU General Public License v2
209 +
210 +EAPI=7
211 +
212 +AUTOTOOLS_AUTORECONF=true
213 +FORTRAN_NEEDED=fortran
214 +FORTRAN_STANDARD=2003
215 +PYTHON_COMPAT=( python3_{7,8,9} ) # python 3 supported by github master
216 +LUA_COMPAT=( lua5-{1..3} )
217 +USE_RUBY="ruby27 ruby30"
218 +
219 +inherit python-single-r1 lua-single ruby-single java-pkg-opt-2 fortran-2
220 +
221 +DESCRIPTION="X-ray matter interaction cross sections for X-ray fluorescence library"
222 +HOMEPAGE="https://github.com/tschoonj/xraylib"
223 +SRC_URI="http://lvserver.ugent.be/xraylib/${P}.tar.gz"
224 +
225 +LICENSE="BSD"
226 +SLOT="0"
227 +KEYWORDS="~amd64"
228 +
229 +#IUSE="examples fortran java lua perl python"
230 +# jave now uses the gradle build system which is not supported by portage
231 +IUSE="examples fortran lua perl php python ruby"
232 +
233 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
234 +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
235 +
236 +RDEPEND="
237 + lua? ( ${LUA_DEPS} )
238 + perl? ( dev-lang/perl )
239 + php? ( <dev-lang/php-8:* )
240 + python? (
241 + ${PYTHON_DEPS}
242 + $(python_gen_cond_dep \
243 + 'dev-python/numpy[${PYTHON_USEDEP}]'
244 + )
245 + )
246 + ruby? ( ${RUBY_DEPS} )
247 +" # java? ( >=virtual/jre-1.7:* )
248 +
249 +DEPEND="${RDEPEND}"
250 +# java? ( >=virtual/jdk-1.7:* )
251 +
252 +DOCS=( AUTHORS Changelog README TODO )
253 +
254 +pkg_setup() {
255 + fortran-2_pkg_setup
256 + java-pkg-opt-2_pkg_setup
257 + use python && python-single-r1_pkg_setup
258 +}
259 +
260 +src_configure() {
261 + econf \
262 + --disable-idl \
263 + $(use_enable fortran fortran2003) \
264 + $(use_enable lua) \
265 + $(use_enable perl) \
266 + $(use_enable perl perl-integration) \
267 + $(use_enable php) \
268 + $(use_enable php php-integration) \
269 + $(use_enable python) \
270 + $(use_enable python python-integration) \
271 + $(use_enable python python-numpy) \
272 + $(use_enable ruby) \
273 + $(use_enable ruby ruby-integration) \
274 + # $(use_enable java)
275 +}
276 +
277 +src_test() {
278 + # see https://github.com/tschoonj/xraylib/issues/11
279 + emake -j1 check
280 +}
281 +
282 +src_install() {
283 + default
284 + use python && python_optimize
285 +
286 + if use examples; then
287 + insinto /usr/share/doc/${PF}/examples
288 + doins example/*.c example/*.cpp
289 + use fortran && doins example/*.f90
290 + use lua && doins example/*.lua
291 + use perl && doins example/*.pl
292 + use php && doins example/*.php
293 + use python && doins example/*.py
294 + use ruby && doins example/*.rb
295 + # use java && doins example/*.java
296 + docompress -x /usr/share/doc/${PF}/examples # Don't compress examples
297 + fi
298 +
299 + # use java && java-pkg_regso /usr/share/xraylib/java/libxraylib.so
300 +}