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: Sat, 14 May 2022 18:31:21
Message-Id: 1652553039.23570d13762049e4c6abc53e3b1d5bb7c8462d2e.keri@gentoo
1 commit: 23570d13762049e4c6abc53e3b1d5bb7c8462d2e
2 Author: Keri Harris <keri <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 14 18:29:53 2022 +0000
4 Commit: Keri Harris <keri <AT> gentoo <DOT> org>
5 CommitDate: Sat May 14 18:30:39 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23570d13
7
8 dev-lang/mercury-extras: version bump
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Keri Harris <keri <AT> gentoo.org>
12
13 dev-lang/mercury-extras/Manifest | 2 +
14 .../mercury-extras/mercury-extras-22.01.ebuild | 298 +++++++++++++++++++++
15 2 files changed, 300 insertions(+)
16
17 diff --git a/dev-lang/mercury-extras/Manifest b/dev-lang/mercury-extras/Manifest
18 index f58135466d92..18e6588dc2eb 100644
19 --- a/dev-lang/mercury-extras/Manifest
20 +++ b/dev-lang/mercury-extras/Manifest
21 @@ -1,4 +1,6 @@
22 DIST mercury-extras-20.06-gentoo-patchset-0.tar.gz 1093 BLAKE2B cd0087a7a878c303a610e0007b352deec2e54b8223af1fbdcdd5e1fec0a7d6b4533895ba4ec01d4f90734349535a4c16c69f4ec60495f5a7888f99e4580e3ce3 SHA512 abd74dee931a01085a75f45d2793109737662345bdc68f4cf25dd874b59726da6a5ec8acd84cc8f0957052eeb9e5a9e3502090a0688fbea817d05c6948728ecb
23 DIST mercury-extras-20.06.1-gentoo-patchset-0.tar.gz 617 BLAKE2B e16a3887bd0927911e2062befa38119d0347e01eae08d21dcf185942648ce52a94890c26059d39b096f69d19227c2ed22e2d3ded0cc762ebfd1bcb702810f5ea SHA512 1274c08c7c02f6f5fa5183f42e958a8e469df38d8e693722134a24aa846d4f3a74dafa0dd4f9d11fbca58497ff6d714aa7456dc2fd516d8961bc1ba43f3b3b8c
24 +DIST mercury-extras-22.01-gentoo-patchset-0.tar.gz 436 BLAKE2B 2c1ff61b87e04777f3d3b66e7a6ae1c8e82e7caec413e2ed51eeb785b5dd8bc1773aa065219ccc58833b1c2aae3d481f531b94a48c215ce7eea2e0762948f946 SHA512 eac4615c951665150c6e6d2cc317d68be8e510aa9be663cadfe04b55d30fe8a0d17fae93a19d1e54556179618262ea4fdb6381e05aca278c4c516bc1f52656bd
25 DIST mercury-srcdist-20.06.1.tar.gz 47796261 BLAKE2B f282c6edb78e9090eb451585c65c9214927b94eaa5fcdf6f674aef6beb62eb65179f998bcc2e56c3c93b73dd1dc94973084eb8363bc05e334384096c9520d478 SHA512 94e901e5d3db39e3342bf2d6a2a74556a7b18b295c7e02669b487a81d41c72e572046ce1133d670ca6c1b8e246dd277439087efe8fb99b979a73555a101aa9a8
26 DIST mercury-srcdist-20.06.tar.gz 47768559 BLAKE2B f242aa2ef7da53aa2dfa054e4fee8646434d276f0748b014e33ea52d22f2a8a37e6fecaa20617f4943c4c1e7d8c179ed0603a344fde2dd58da98b2bacadf1a71 SHA512 b76bd22d8eb16242c68b614ff122ed7ee7535efef6c0ceb8cc798fee4c550bc41b6faff2135cea43b24c652b654bb35ae049656585d8e7bf3a1122d07cb1ecf4
27 +DIST mercury-srcdist-22.01.tar.gz 48960609 BLAKE2B 4ac45251bc098c1465f4bc418501db152bfcf36a2e04bb9153a44c44ff2dff300545103c29551818e773728c5a61947c019997fcc2cb64900e538d5ef64c1b39 SHA512 35b3b1e9fd85062edea5263b304bfc965382d04353e5548d59211519ee222bb6a8e8c95cb03faa089062e39c90b2d1c4af7ca0d9eabbf3bb44872d461e10ff2d
28
29 diff --git a/dev-lang/mercury-extras/mercury-extras-22.01.ebuild b/dev-lang/mercury-extras/mercury-extras-22.01.ebuild
30 new file mode 100644
31 index 000000000000..c90f5ea06af4
32 --- /dev/null
33 +++ b/dev-lang/mercury-extras/mercury-extras-22.01.ebuild
34 @@ -0,0 +1,298 @@
35 +# Copyright 1999-2022 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="https://www.mercurylang.org/index.html"
47 +SRC_URI="https://dl.mercurylang.org/release/${MY_P}.tar.gz
48 + https://dev.gentoo.org/~keri/distfiles/mercury-extras/${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:odbc)
105 + $(use iodbc && echo odbc/odbc:lib:libiodbc)
106 + posix/posix:lib:
107 + $(has_version dev-lang/mercury[trail] && echo \
108 + references/global: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 + echo "MCFLAGS += --libgrades-exclude java" \
128 + >> "${S}"/${mercury_pkg_dir}/Mercury.options
129 + echo "MCFLAGS += --libgrades-exclude csharp" \
130 + >> "${S}"/${mercury_pkg_dir}/Mercury.options
131 +
132 + if test -n "$mercury_pkg_deps"; then
133 + echo "EXTRA_CFLAGS += $(pkg-config --cflags ${mercury_pkg_deps/,/ })" \
134 + >> "${S}"/${mercury_pkg_dir}/Mercury.options
135 + echo "EXTRA_LDFLAGS += $(pkg-config --libs ${mercury_pkg_deps/,/ })" \
136 + >> "${S}"/${mercury_pkg_dir}/Mercury.options
137 + fi
138 +
139 + if test ${mercury_pkg_name} = dl; then
140 + echo "EXTRA_LDFLAGS += -ldl" >> "${S}"/${mercury_pkg_dir}/Mercury.options
141 + elif test ${mercury_pkg_name} = gmp_int; then
142 + echo "EXTRA_LDFLAGS += -lgmp" >> "${S}"/${mercury_pkg_dir}/Mercury.options
143 + elif test ${mercury_pkg_name} = mercury_tcltk; then
144 + echo "EXTRA_CFLAGS += -DUSE_INTERP_RESULT" \
145 + >> "${S}"/${mercury_pkg_dir}/Mercury.options
146 + elif test ${mercury_pkg_name} = odbc && use odbc; then
147 + echo "EXTRA_CFLAGS += -DMODBC_UNIX -DMODBC_MYSQL" \
148 + >> "${S}"/${mercury_pkg_dir}/Mercury.options
149 + elif test ${mercury_pkg_name} = odbc && use iodbc; then
150 + echo "EXTRA_CFLAGS += -DMODBC_IODBC -DMODBC_MYSQL" \
151 + >> "${S}"/${mercury_pkg_dir}/Mercury.options
152 + fi
153 +}
154 +
155 +mercury_pkg_compile() {
156 + mercury_pkg=${1%%:*}
157 + mercury_pkg_dir=${mercury_pkg%/*}
158 + mercury_pkg_name=${mercury_pkg##*/}
159 +
160 + mercury_pkg_atts=${1#*:}
161 + mercury_pkg_type=${mercury_pkg_atts%:*}
162 +
163 + cd "${S}"/${mercury_pkg_dir} || die
164 +
165 + echo ">> Compiling Mercury package: ${mercury_pkg}"
166 +
167 + if test "${mercury_pkg_type}" = "bin"; then
168 + mercury_mmc_target=${mercury_pkg_name}
169 + else
170 + mercury_mmc_target=lib${mercury_pkg_name}
171 + fi
172 +
173 + mmc -f *.m || die "mmc -f .m failed"
174 +
175 + mmc \
176 + --make \
177 + --verbose-commands \
178 + --no-strip \
179 + --cflags "${CFLAGS}" \
180 + --ld-flags "${LDFLAGS}" \
181 + --ld-libflags "${LDFLAGS}" \
182 + ${mercury_mmc_target} || die "mmc ${mercury_mmc_target} failed"
183 +}
184 +
185 +mercury_pkg_install() {
186 + mercury_pkg=${1%%:*}
187 + mercury_pkg_dir=${mercury_pkg%/*}
188 + mercury_pkg_name=${mercury_pkg##*/}
189 +
190 + mercury_pkg_atts=${1#*:}
191 + mercury_pkg_type=${mercury_pkg_atts%:*}
192 +
193 + cd "${S}"/${mercury_pkg_dir} || die
194 +
195 + echo ">> Installing Mercury package: ${mercury_pkg}"
196 +
197 + if test "${mercury_pkg_type}" = "bin"; then
198 + into /usr/$(get_libdir)/mercury/extras
199 + dobin ${mercury_pkg_name}
200 + else
201 + mmc \
202 + --make \
203 + --verbose-commands \
204 + --no-strip \
205 + --cflags "${CFLAGS}" \
206 + --ld-flags "${LDFLAGS}" \
207 + --ld-libflags "${LDFLAGS}" \
208 + --install-prefix "${D}/usr/$(get_libdir)/mercury/extras" \
209 + lib${mercury_pkg_name}.install || die "mmc lib${mercury_pkg_name}.install failed"
210 + fi
211 +}
212 +
213 +src_prepare() {
214 + cd "${WORKDIR}"/${MY_P}
215 + if [[ -d "${WORKDIR}"/${PV} ]] ; then
216 + eapply "${WORKDIR}"/${PV}
217 + fi
218 + eapply_user
219 +
220 + cd "${S}"
221 + for mercury_pkg in $(mercury_pkgs); do
222 + mercury_pkg_setup ${mercury_pkg}
223 + done
224 +
225 + cp "${S}"/net/*.m "${S}"/mopenssl/ || die
226 +}
227 +
228 +src_compile() {
229 + for mercury_pkg in $(mercury_pkgs); do
230 + mercury_pkg_compile ${mercury_pkg}
231 + done
232 +}
233 +
234 +src_install() {
235 + for mercury_pkg in $(mercury_pkgs); do
236 + mercury_pkg_install ${mercury_pkg}
237 + done
238 +
239 + cd "${S}"
240 + dodoc README.md
241 +
242 + if use examples; then
243 + docinto samples/cgi
244 + dodoc cgi/form_test.m
245 +
246 + docinto samples/complex_numbers
247 + dodoc complex_numbers/samples/*.m
248 +
249 + if use ncurses; then
250 + docinto samples/curs
251 + dodoc curs/samples/*.m
252 +
253 + docinto samples/curses
254 + dodoc curses/sample/*.m
255 + fi
256 +
257 + docinto samples/dynamic_linking
258 + dodoc dynamic_linking/{hello,dl_test}.m
259 +
260 + docinto samples/gator
261 + dodoc -r gator/*
262 +
263 + if use gmp; then
264 + docinto samples/gmp_int
265 + dodoc gmp_int/gmp_int_test.m
266 + fi
267 +
268 + if use tommath; then
269 + docinto samples/mp_int
270 + dodoc mp_int/mp_int_test.m
271 + fi
272 +
273 + if use X; then
274 + docinto samples/graphics
275 + dodoc graphics/easyx/samples/*.m
276 + fi
277 +
278 + if use glut && use opengl; then
279 + docinto samples/graphics
280 + dodoc graphics/samples/gears/*.m
281 + dodoc graphics/samples/maze/*.m
282 + fi
283 +
284 + if use tk; then
285 + docinto samples/graphics
286 + dodoc graphics/samples/calc/*.m
287 + fi
288 +
289 + docinto samples/lex
290 + dodoc lex/samples/*.m
291 +
292 + docinto samples/log4m
293 + dodoc log4m/*.m
294 +
295 + docinto samples/monte
296 + dodoc monte/*.m
297 +
298 + docinto samples/moose
299 + dodoc moose/samples/*
300 +
301 + docinto samples/net
302 + dodoc net/test_lookups.m
303 +
304 + if use odbc || use iodbc; then
305 + docinto samples/odbc
306 + dodoc odbc/odbc_test.m
307 + fi
308 +
309 + docinto samples/posix
310 + dodoc posix/samples/*.m
311 +
312 + docinto samples/random
313 + dodoc random/*.m
314 +
315 + if has_version dev-lang/mercury[trail]; then
316 + docinto samples/references
317 + dodoc references/samples/*.m
318 +
319 + docinto samples/trail
320 + dodoc trail/*.m
321 + fi
322 +
323 + if use xml; then
324 + docinto samples/xml
325 + dodoc xml/tryit.m
326 + dodoc xml/samples/*
327 + dodoc xml_stylesheets/*.xsl
328 + fi
329 +
330 + ecvs_clean
331 + fi
332 +}