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