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/
Date: Wed, 01 Apr 2020 10:32:30
Message-Id: 1585737112.32ebe0cfa35562636183e0924720e1dab271e0ad.keri@gentoo
1 commit: 32ebe0cfa35562636183e0924720e1dab271e0ad
2 Author: Keri Harris <keri <AT> gentoo <DOT> org>
3 AuthorDate: Wed Apr 1 10:31:05 2020 +0000
4 Commit: Keri Harris <keri <AT> gentoo <DOT> org>
5 CommitDate: Wed Apr 1 10:31:52 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32ebe0cf
7
8 dev-lang/mercury: 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/Manifest | 2 +
14 dev-lang/mercury/mercury-20.01.1.ebuild | 201 ++++++++++++++++++++++++++++++++
15 2 files changed, 203 insertions(+)
16
17 diff --git a/dev-lang/mercury/Manifest b/dev-lang/mercury/Manifest
18 index 358ce03909a..728f4bebfb4 100644
19 --- a/dev-lang/mercury/Manifest
20 +++ b/dev-lang/mercury/Manifest
21 @@ -1,4 +1,6 @@
22 DIST mercury-14.01.1-gentoo-patchset-5.tar.gz 5693 BLAKE2B 300de3254bc0d2f59493c0e2243b0d8786fccce714134a11ce510120b7d9f05ebe4835f084ec2db2ddaf2d405cbae65e86d809847079a7d63a6a68021d9d29e8 SHA512 3f9f1e2359f372e4f510b9a00c197978657b28d1308d12cba4d08a982877e2311d7fb6e626dad07d0fa09d24f97334575557cb49003508fdc7b32288c1ae8f2d
23 DIST mercury-20.01-gentoo-patchset-0.tar.gz 3862 BLAKE2B 79ef6d30add63a5d419e3dd5b376fd9c1727038102db2bc0e8ccd8b71cdc1c80e721647f34764b0aa4fd6d58b9e38c9675f234714f381f94be572b9b64b478e1 SHA512 2835b4740453bcc358363f9eaa0264706125b5e5f7a38802d5f280ccd777d4c760124ed3a635f17ecc2ae772767e9fa5d61093c40094358a0a96a726a23ff08e
24 +DIST mercury-20.01.1-gentoo-patchset-0.tar.gz 3943 BLAKE2B 0fd149c622715bf191182bd93e264096327d7869e30aaa10bb19b70bec5563520026e2561cc6607c62801ed00ed6b5907bbae4be997869b9facb2f9d65ec0c7a SHA512 d866b35b6df14645ef60ff25497f9bbf0c2caeae2145bc0aef2adea0e651379c673c1815c717f1a51457d93cc67e9ae3dafe5d9fce1d4734bf1673e4cfcbd367
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/mercury-20.01.1.ebuild b/dev-lang/mercury/mercury-20.01.1.ebuild
30 new file mode 100644
31 index 00000000000..6770d4264de
32 --- /dev/null
33 +++ b/dev-lang/mercury/mercury-20.01.1.ebuild
34 @@ -0,0 +1,201 @@
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 autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib vcs-clean xdg-utils
41 +
42 +PATCHSET_VER="0"
43 +MY_P=${PN}-srcdist-${PV}
44 +
45 +DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language"
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="debug doc emacs erlang examples java mono profile readline threads trail"
55 +
56 +DEPEND="net-libs/libnsl:0=
57 + readline? ( sys-libs/readline:= )
58 + erlang? ( dev-lang/erlang )
59 + java? ( >=virtual/jdk-1.6:= )
60 + mono? ( dev-lang/mono )
61 + doc? ( sys-apps/texinfo )"
62 +
63 +RDEPEND="${DEPEND}
64 + emacs? ( >=app-editors/emacs-23.1:* )"
65 +
66 +S="${WORKDIR}"/${MY_P}
67 +
68 +SITEFILE=50${PN}-gentoo.el
69 +
70 +src_prepare() {
71 + if [[ -d "${WORKDIR}"/${PV} ]] ; then
72 + eapply "${WORKDIR}"/${PV}
73 + fi
74 + eapply_user
75 +
76 + AT_M4DIR=m4 eautoreconf
77 +
78 + xdg_environment_reset
79 +}
80 +
81 +src_configure() {
82 + strip-flags
83 +
84 + local myconf
85 + myconf="--libdir=/usr/$(get_libdir) \
86 + $(use_enable mono csharp-grade) \
87 + $(use_enable erlang erlang-grade) \
88 + $(use_enable java java-grade) \
89 + $(use_enable debug debug-grades) \
90 + $(use_enable profile prof-grades) \
91 + $(use_enable threads par-grades) \
92 + $(use_enable trail trail-grades) \
93 + $(use_with readline)"
94 +
95 + econf ${myconf}
96 +}
97 +
98 +src_compile() {
99 + # Prepare mmake flags
100 + echo "EXTRA_CFLAGS = ${CFLAGS}" >> Mmake.params
101 + echo "EXTRA_LD_LIBFLAGS = ${LDFLAGS}" >> Mmake.params
102 + echo "EXTRA_MLFLAGS = --no-strip" >> Mmake.params
103 +
104 + echo "EXTRA_LD_LIBFLAGS += -Wl,-soname=libgc.so" >> boehm_gc/Mmake.boehm_gc.params
105 + echo "EXTRA_LD_LIBFLAGS += -Wl,-soname=libmer_rt.so" >> runtime/Mmake.runtime.params
106 + echo "EXTRA_LD_LIBFLAGS += -Wl,-soname=libmer_std.so" >> library/Mmake.library.params
107 +
108 + # Build Mercury using bootstrap grade
109 + emake \
110 + PARALLEL="'${MAKEOPTS}'" \
111 + TEXI2DVI="" PDFTEX=""
112 +
113 + # We can now patch .m Mercury compiler files since we
114 + # have just built mercury_compiler.
115 + if [[ -d "${WORKDIR}"/${PV}-mmc ]] ; then
116 + eapply "${WORKDIR}"/${PV}-mmc
117 + fi
118 +
119 + # Rebuild Mercury compiler using the just built mercury_compiler
120 + emake \
121 + PARALLEL="'${MAKEOPTS}'" \
122 + MERCURY_COMPILER="${S}"/compiler/mercury_compile \
123 + TEXI2DVI="" PDFTEX=""
124 +
125 + # The default Mercury grade may not be the same as the bootstrap
126 + # grade. Since src_test() is run before src_install() we compile
127 + # the default grade now
128 + emake \
129 + PARALLEL="'${MAKEOPTS}'" \
130 + MERCURY_COMPILER="${S}"/compiler/mercury_compile \
131 + TEXI2DVI="" PDFTEX="" \
132 + default_grade
133 +}
134 +
135 +src_test() {
136 + TEST_GRADE=$(scripts/ml --print-grade)
137 + if [ -d "${S}"/install_grade_dir.${TEST_GRADE} ] ; then
138 + TWS="${S}"/install_grade_dir.${TEST_GRADE}
139 + cp runtime/mer_rt.init "${TWS}"/runtime/
140 + cp mdbcomp/mer_mdbcomp.init "${TWS}"/mdbcomp/
141 + cp browser/mer_browser.init "${TWS}"/browser/
142 + else
143 + TWS="${S}"
144 + fi
145 +
146 + cd "${S}"/tests || die
147 + sed -e "s:@WORKSPACE@:${TWS}:" \
148 + < WS_FLAGS.ws \
149 + > WS_FLAGS \
150 + || die "sed WORKSPACE failed"
151 + sed -e "s:@WORKSPACE@:${TWS}:" \
152 + < .mgnuc_copts.ws \
153 + > .mgnuc_copts \
154 + || die "sed WORKSPACE failed"
155 + find . -mindepth 1 -type d -exec cp .mgnuc_opts {} \;
156 + find . -mindepth 1 -type d -exec cp .mgnuc_copts {} \;
157 +
158 + # Mercury tests must be run in C locale since Mercury output is
159 + # compared to hard-coded warnings/errors
160 + LC_ALL="C" \
161 + PATH="${TWS}"/scripts:"${TWS}"/util:"${S}"/slice:"${PATH}" \
162 + TERM="" \
163 + WORKSPACE="${TWS}" \
164 + WORKSPACE_FLAGS=yes \
165 + MERCURY_COMPILER="${TWS}"/compiler/mercury_compile \
166 + MMAKE_DIR="${TWS}"/scripts \
167 + MERCURY_SUPPRESS_STACK_TRACE=yes \
168 + GRADE=${TEST_GRADE} \
169 + mmake || die "mmake test failed"
170 +}
171 +
172 +src_install() {
173 + emake \
174 + PARALLEL="'${MAKEOPTS}'" \
175 + MERCURY_COMPILER="${S}"/compiler/mercury_compile \
176 + TEXI2DVI="" PDFTEX="" \
177 + DESTDIR="${D}" \
178 + INSTALL_ELISP_DIR="${D}/${SITELISP}"/${PN} \
179 + install
180 +
181 + if use java; then
182 + keepdir /usr/$(get_libdir)/mercury/modules/java
183 + fi
184 +
185 + if use mono; then
186 + keepdir /usr/$(get_libdir)/mercury/modules/csharp
187 + fi
188 +
189 + if use emacs; then
190 + elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
191 + || die "elisp-site-file-install failed"
192 + fi
193 +
194 + dodoc \
195 + BUGS HISTORY LIMITATIONS NEWS README README.Linux \
196 + README.Linux-Alpha README.Linux-m68k README.Linux-PPC \
197 + RELEASE_NOTES VERSION || die
198 +
199 + if use erlang; then
200 + dodoc README.Erlang
201 + fi
202 +
203 + if use java; then
204 + dodoc README.Java
205 + fi
206 +
207 + if use mono; then
208 + dodoc README.CSharp
209 + fi
210 +
211 + if use examples; then
212 + docinto /usr/share/doc/${PF}/samples
213 + dodoc samples/{*.m,README,Mmakefile}
214 + dodoc -r samples/c_interface \
215 + samples/diff \
216 + samples/muz \
217 + samples/rot13 \
218 + samples/solutions \
219 + samples/solver_types
220 +
221 + if use java; then
222 + dodoc -r samples/java_interface
223 + fi
224 +
225 + ecvs_clean "${D}"/usr/share/doc/${PF}/samples
226 + fi
227 +}
228 +
229 +pkg_postinst() {
230 + use emacs && elisp-site-regen
231 +}
232 +
233 +pkg_postrm() {
234 + use emacs && elisp-site-regen
235 +}