Gentoo Archives: gentoo-commits

From: Keri Harris <keri@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/mercury-extras/
Date: Sun, 29 Mar 2020 10:43:22
Message-Id: 1585478583.afd55ec4490b855a0ec20b080aef810ec497708b.keri@gentoo
1 commit: afd55ec4490b855a0ec20b080aef810ec497708b
2 Author: Keri Harris <keri <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 29 10:42:52 2020 +0000
4 Commit: Keri Harris <keri <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 29 10:43:03 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afd55ec4
7
8 dev-lang/mercury-extras: version bump
9
10 Signed-off-by: Keri Harris <keri <AT> gentoo.org>
11 Package-Manager: Portage-2.3.89, Repoman-2.3.11
12
13 dev-lang/mercury-extras/Manifest | 2 +
14 .../mercury-extras/mercury-extras-20.01.ebuild | 317 +++++++++++++++++++++
15 dev-lang/mercury-extras/metadata.xml | 3 +
16 3 files changed, 322 insertions(+)
17
18 diff --git a/dev-lang/mercury-extras/Manifest b/dev-lang/mercury-extras/Manifest
19 index 7e5e48b7128..e20f8ef9a2c 100644
20 --- a/dev-lang/mercury-extras/Manifest
21 +++ b/dev-lang/mercury-extras/Manifest
22 @@ -1,2 +1,4 @@
23 DIST mercury-extras-14.01.1-gentoo-patchset-4.tar.gz 4361 BLAKE2B a1939e4b76782cb01fc7ee5dcb1ccbb885e93992d0e6f540552eb987f405b3a70671527dfacb873323f6030bb6de2f6cdd23768dbc36e8b656d836e2890b7d8a SHA512 e30ac4e9c0592a1ea5253663bf351814e91977ea53892dca4d996b217aac959265563910cc21aa64ee12a93ea379cb8143730585c7d32390bcf05f2a1b0590d7
24 +DIST mercury-extras-20.01-gentoo-patchset-0.tar.gz 542 BLAKE2B 4f24f5af21cbd566eb72ce03d618d858f16d02a921b506c933342181ea057d98377077535571223c85b1f1fa5854e52005f67f40dd75bb392929faaad889eed1 SHA512 6a2eb1dbaac1f028c0ce5f0e21a8f24bd4ba9b068f1ea5d8554c5fb7376642797709f0aa93db336d2f015b6f815d0aa27c7d60720aab340ace180d49791bd852
25 DIST mercury-srcdist-14.01.1.tar.gz 52658945 BLAKE2B 6497921a0227b9a6fbcbabdd309ef3325f32dda14fc4ddb443368385b89be4011d677a24b30b3702147d1b782fe2597760ad66dd34503aa6aebaf79707466529 SHA512 a128ef0fd4955abadea32019ec59297ffe32537415f32e9e948cbc1c3439bb40eb09de77569690fb18dd7d6969a2b1141b3ae5baeb87f2627eaa65ad93add92c
26 +DIST mercury-srcdist-20.01.tar.gz 47103868 BLAKE2B 68be786e925bdf94dcba6c6a2a746a384da345ee33250785d8d2b9281815694a4525cdd694c26f58051c097f2a897291e640e2139729ccede9bd2e472077d8c9 SHA512 90e36faa375603e596b2dd692363528120fda62ae6d2e2b119cf76de1656dae4028aff00858a4bff3fdfb9b2210ea17db0aa516ce4283604c46a5935dd2cd4b7
27
28 diff --git a/dev-lang/mercury-extras/mercury-extras-20.01.ebuild b/dev-lang/mercury-extras/mercury-extras-20.01.ebuild
29 new file mode 100644
30 index 00000000000..8a9593959ae
31 --- /dev/null
32 +++ b/dev-lang/mercury-extras/mercury-extras-20.01.ebuild
33 @@ -0,0 +1,317 @@
34 +# Copyright 1999-2020 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +inherit eutils multilib vcs-clean
40 +
41 +PATCHSET_VER="0"
42 +MY_P=mercury-srcdist-${PV}
43 +
44 +DESCRIPTION="Additional libraries and tools that are not part of the Mercury standard library"
45 +HOMEPAGE="http://www.mercurylang.org/index.html"
46 +SRC_URI="http://dl.mercurylang.org/release/${MY_P}.tar.gz
47 + mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
48 +
49 +LICENSE="GPL-2 LGPL-2"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~x86"
52 +
53 +IUSE="cairo examples glut gmp iodbc ncurses odbc opengl ssl tk tommath X xml"
54 +REQUIRED_USE="?? ( odbc iodbc )"
55 +
56 +RDEPEND="
57 + ~dev-lang/mercury-${PV}
58 + cairo? ( >=x11-libs/cairo-1.10.0 )
59 + gmp? ( dev-libs/gmp:0 )
60 + glut? ( media-libs/freeglut )
61 + odbc? ( dev-db/unixODBC )
62 + iodbc? ( dev-db/libiodbc )
63 + tommath? ( dev-libs/libtommath )
64 + ncurses? ( sys-libs/ncurses:= )
65 + opengl? (
66 + virtual/opengl
67 + virtual/glu
68 + )
69 + tk? (
70 + dev-lang/tcl:0
71 + dev-lang/tk:0
72 + )
73 + X? ( x11-libs/libX11 )"
74 +
75 +DEPEND="${RDEPEND}"
76 +
77 +S="${WORKDIR}"/${MY_P}/extras
78 +
79 +mercury_pkgs() {
80 + echo "
81 + align_right/align_right:bin:
82 + base64/mercury_base64:lib:
83 + cgi/mercury_www:lib:
84 + complex_numbers/complex_numbers:lib:
85 + $(use ncurses && echo \
86 + curs/curs:lib:ncurses,panel curses/mcurses:lib:ncurses)
87 + dynamic_linking/dl:lib:
88 + error/error:bin:
89 + fixed/fixed:lib:
90 + $(use gmp && echo gmp_int/gmp_int:lib:)
91 + $(use tommath && echo mp_int/mp_int:lib:libtommath)
92 + $(use X && echo graphics/easyx/easyx:lib:x11)
93 + $(use cairo && echo graphics/mercury_cairo/mercury_cairo:lib:cairo)
94 + $(use glut && echo graphics/mercury_glut/mercury_glut:lib:freeglut)
95 + $(use opengl && echo graphics/mercury_opengl/mercury_opengl:lib:gl,glu)
96 + $(use tk && echo graphics/mercury_tcltk/mercury_tcltk:lib:tk)
97 + lex/lex:lib:
98 + lex/regex:lib:
99 + moose/moose:bin:
100 + net/net:lib:
101 + net/echo:bin:
102 + $(use ssl && echo mopenssl/mopenssl:lib:openssl)
103 + $(use odbc && echo odbc/odbc:lib:)
104 + $(use iodbc && echo odbc/odbc:lib:libiodbc)
105 + posix/posix:lib:
106 + $(has_version dev-lang/mercury[trail] && echo \
107 + references/global:lib: trailed_update/trailed_update:lib:)
108 + show_ops/show_ops:bin:
109 + solver_types/library/any:lib:
110 + $(use xml && echo xml/xml:lib:)"
111 +}
112 +
113 +mercury_pkg_setup() {
114 + mercury_pkg=${1%%:*}
115 + mercury_pkg_dir=${mercury_pkg%/*}
116 + mercury_pkg_name=${mercury_pkg##*/}
117 +
118 + mercury_pkg_atts=${1#*:}
119 + mercury_pkg_type=${mercury_pkg_atts%%:*}
120 + mercury_pkg_deps=${mercury_pkg_atts#*:}
121 +
122 + cd "${S}"/${mercury_pkg_dir} || die
123 +
124 + echo ">> Preparing Mercury package: ${mercury_pkg}"
125 +
126 + if ! test -f "${S}"/${mercury_pkg_dir}/gentoo.params; then
127 + echo "LIBGRADES := \$(filter-out java,\$(LIBGRADES))" \
128 + > "${S}"/${mercury_pkg_dir}/gentoo.params
129 + echo "LIBGRADES := \$(filter-out erlang,\$(LIBGRADES))" \
130 + >> "${S}"/${mercury_pkg_dir}/gentoo.params
131 + echo "LIBGRADES := \$(filter-out csharp,\$(LIBGRADES))" \
132 + >> "${S}"/${mercury_pkg_dir}/gentoo.params
133 + echo "include gentoo.params" > "${S}"/${mercury_pkg_dir}/Mmakefile
134 + fi
135 +
136 + if test -n "$mercury_pkg_deps"; then
137 + echo "EXTRA_CFLAGS += $(pkg-config --cflags ${mercury_pkg_deps/,/ })" \
138 + >> "${S}"/${mercury_pkg_dir}/gentoo.params
139 + echo "EXTRA_MLLIBS += $(pkg-config --libs ${mercury_pkg_deps/,/ })" \
140 + >> "${S}"/${mercury_pkg_dir}/gentoo.params
141 + fi
142 +
143 + if test ${mercury_pkg_name} = dl; then
144 + echo "EXTRA_MLLIBS = -ldl" >> "${S}"/${mercury_pkg_dir}/gentoo.params
145 + elif test ${mercury_pkg_name} = gmp_int; then
146 + echo "EXTRA_MLLIBS = -lgmp" >> "${S}"/${mercury_pkg_dir}/gentoo.params
147 + elif test ${mercury_pkg_name} = mercury_tcltk; then
148 + echo "EXTRA_CFLAGS += -DUSE_INTERP_RESULT" \
149 + >> "${S}"/${mercury_pkg_dir}/gentoo.params
150 + elif test ${mercury_pkg_name} = mopenssl; then
151 + local net_libdir="${D}/usr/$(get_libdir)/mercury/extras/lib/\$(GRADE)"
152 + echo "EXTRA_MLLIBS += -L${net_libdir} -L../net -lnet" \
153 + >> "${S}"/${mercury_pkg_dir}/gentoo.params
154 + echo "net%:" >> "${S}"/${mercury_pkg_dir}/gentoo.params
155 + echo " cp ../net/\$@ \$@" >> "${S}"/${mercury_pkg_dir}/gentoo.params
156 + elif test ${mercury_pkg_name} = odbc && use odbc; then
157 + echo "EXTRA_CFLAGS = -DMODBC_UNIX -DMODBC_MYSQL" \
158 + >> "${S}"/${mercury_pkg_dir}/Mmakefile
159 + echo "EXTRA_MLLIBS = -lodbc" >> "${S}"/${mercury_pkg_dir}/gentoo.params
160 + elif test ${mercury_pkg_name} = odbc && use iodbc; then
161 + echo "EXTRA_CFLAGS += -DMODBC_IODBC -DMODBC_MYSQL" \
162 + >> "${S}"/${mercury_pkg_dir}/gentoo.params
163 + fi
164 +}
165 +
166 +mercury_pkg_compile() {
167 + mercury_pkg=${1%%:*}
168 + mercury_pkg_dir=${mercury_pkg%/*}
169 + mercury_pkg_name=${mercury_pkg##*/}
170 +
171 + mercury_pkg_atts=${1#*:}
172 + mercury_pkg_type=${mercury_pkg_atts%:*}
173 +
174 + cd "${S}"/${mercury_pkg_dir} || die
175 +
176 + echo ">> Compiling Mercury package: ${mercury_pkg}"
177 +
178 + if test "${mercury_pkg_type}" = "bin"; then
179 + mercury_mmc_target=${mercury_pkg_name}
180 + else
181 + mercury_mmc_target=lib${mercury_pkg_name}
182 + fi
183 +
184 + # Mercury dependency generation must be run single-threaded
185 + mmc -f *.m || die "mmc -f .m failed"
186 + mmake -j1 \
187 + ${mercury_pkg_name}.depend \
188 + || die "mmake ${mercury_pkg} depend failed"
189 +
190 + # Compiling Mercury submodules is not thread-safe
191 + mmake -j1 \
192 + MLFLAGS=--no-strip \
193 + CFLAGS="${CFLAGS}" \
194 + LD_LIBFLAGS="${LDFLAGS} -L/usr/$(get_libdir)" \
195 + ${mercury_mmc_target} || die "mmake ${mercury_pkg} failed"
196 +
197 +}
198 +
199 +mercury_pkg_install() {
200 + mercury_pkg=${1%%:*}
201 + mercury_pkg_dir=${mercury_pkg%/*}
202 + mercury_pkg_name=${mercury_pkg##*/}
203 +
204 + mercury_pkg_atts=${1#*:}
205 + mercury_pkg_type=${mercury_pkg_atts%:*}
206 +
207 + cd "${S}"/${mercury_pkg_dir} || die
208 +
209 + echo ">> Installing Mercury package: ${mercury_pkg}"
210 +
211 + if test "${mercury_pkg_type}" = "bin"; then
212 + into /usr/$(get_libdir)/mercury/extras
213 + dobin ${mercury_pkg_name}
214 + else
215 + # Compiling Mercury submodules is not thread-safe
216 + mmake -j1 \
217 + MLFLAGS=--no-strip \
218 + CFLAGS="${CFLAGS}" \
219 + LD_LIBFLAGS="${LDFLAGS} -L/usr/$(get_libdir)" \
220 + INSTALL_LIBDIR="${D}/usr/$(get_libdir)/mercury/extras" \
221 + lib${mercury_pkg_name}.install || die "mmake ${mercury_pkg} failed"
222 + fi
223 +}
224 +
225 +src_prepare() {
226 + cd "${WORKDIR}"/${MY_P}
227 + if [[ -d "${WORKDIR}"/${PV} ]] ; then
228 + eapply "${WORKDIR}"/${PV}
229 + fi
230 + eapply_user
231 +
232 + cd "${S}"
233 + for mercury_pkg in $(mercury_pkgs); do
234 + mercury_pkg_setup ${mercury_pkg}
235 + done
236 +}
237 +
238 +src_compile() {
239 + for mercury_pkg in $(mercury_pkgs); do
240 + mercury_pkg_compile ${mercury_pkg}
241 + done
242 +}
243 +
244 +src_install() {
245 + for mercury_pkg in $(mercury_pkgs); do
246 + mercury_pkg_install ${mercury_pkg}
247 + done
248 +
249 + cd "${S}"
250 + dodoc README
251 +
252 + if use examples; then
253 + docinto samples/cgi
254 + dodoc cgi/form_test.m
255 +
256 + docinto samples/complex_numbers
257 + dodoc complex_numbers/samples/*.m
258 +
259 + if use ncurses; then
260 + docinto samples/curs
261 + dodoc curs/samples/*.m
262 +
263 + docinto samples/curses
264 + dodoc curses/sample/*.m
265 + fi
266 +
267 + docinto samples/dynamic_linking
268 + dodoc dynamic_linking/{hello,dl_test}.m
269 +
270 + docinto samples/gator
271 + dodoc -r gator/*
272 +
273 + if use gmp; then
274 + docinto samples/gmp_int
275 + dodoc gmp_int/gmp_int_test.m
276 + fi
277 +
278 + if use tommath; then
279 + docinto samples/mp_int
280 + dodoc mp_int/mp_int_test.m
281 + fi
282 +
283 + if use X; then
284 + docinto samples/graphics
285 + dodoc graphics/easyx/samples/*.m
286 + fi
287 +
288 + if use glut && use opengl; then
289 + docinto samples/graphics
290 + dodoc graphics/samples/gears/*.m
291 + dodoc graphics/samples/maze/*.m
292 + fi
293 +
294 + if use tk; then
295 + docinto samples/graphics
296 + dodoc graphics/samples/calc/*.m
297 + fi
298 +
299 + if use opengl && use tk; then
300 + docinto samples/graphics
301 + dodoc graphics/samples/pent/*.m
302 + fi
303 +
304 + docinto samples/lex
305 + dodoc lex/samples/*.m
306 +
307 + docinto samples/log4m
308 + dodoc log4m/*.m
309 +
310 + docinto samples/monte
311 + dodoc monte/*.m
312 +
313 + docinto samples/moose
314 + dodoc moose/samples/*
315 +
316 + docinto samples/net
317 + dodoc net/test_lookups.m
318 +
319 + if use odbc || use iodbc; then
320 + docinto samples/odbc
321 + dodoc odbc/odbc_test.m
322 + fi
323 +
324 + docinto samples/posix
325 + dodoc posix/samples/*.m
326 +
327 + docinto samples/random
328 + dodoc random/*.m
329 +
330 + if has_version dev-lang/mercury[trail]; then
331 + docinto samples/references
332 + dodoc references/samples/*.m
333 +
334 + docinto samples/trail
335 + dodoc trail/*.m
336 +
337 + docinto samples/trailed_update
338 + dodoc trailed_update/samples/*.m
339 + fi
340 +
341 + if use xml; then
342 + docinto samples/xml
343 + dodoc xml/tryit.m
344 + dodoc xml/samples/*
345 + dodoc xml_stylesheets/*.xsl
346 + fi
347 +
348 + ecvs_clean
349 + fi
350 +}
351
352 diff --git a/dev-lang/mercury-extras/metadata.xml b/dev-lang/mercury-extras/metadata.xml
353 index c301cedb922..d51dcb06bfd 100644
354 --- a/dev-lang/mercury-extras/metadata.xml
355 +++ b/dev-lang/mercury-extras/metadata.xml
356 @@ -5,4 +5,7 @@
357 <email>keri@g.o</email>
358 <name>Keri Harris</name>
359 </maintainer>
360 +<use>
361 + <flag name="tommath">Enable support for tommath library</flag>
362 +</use>
363 </pkgmetadata>