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