1 |
commit: 15ae8d113686c40375ccc0cc70422a9ca9cb4bed |
2 |
Author: Keri Harris <keri <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 3 11:07:04 2021 +0000 |
4 |
Commit: Keri Harris <keri <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 3 11:07:25 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15ae8d11 |
7 |
|
8 |
dev-lang/mercury: version bump |
9 |
|
10 |
Package-Manager: Portage-3.0.20, Repoman-3.0.2 |
11 |
Signed-off-by: Keri Harris <keri <AT> gentoo.org> |
12 |
|
13 |
dev-lang/mercury/Manifest | 2 + |
14 |
dev-lang/mercury/mercury-20.06.1.ebuild | 207 ++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 209 insertions(+) |
16 |
|
17 |
diff --git a/dev-lang/mercury/Manifest b/dev-lang/mercury/Manifest |
18 |
index db766ffb277..210ada8b36b 100644 |
19 |
--- a/dev-lang/mercury/Manifest |
20 |
+++ b/dev-lang/mercury/Manifest |
21 |
@@ -1,2 +1,4 @@ |
22 |
DIST mercury-20.06-gentoo-patchset-3.tar.gz 5265 BLAKE2B 0539611691cfb714937bca8dc967246ce32c515b7133391d81333284e6ceffe29b929c042ee0000752bd9980c2d2332de20d7c5dc4e1a6077a6421056d975808 SHA512 54595a71db4d7684071c6496c3e92fe8c9de0a29832cc85901046f2627bd453cf0760b9857e73a91e87edfddc80d384627dc5c2cb7f3bc12ea5737eb5afa4f3b |
23 |
+DIST mercury-20.06.1-gentoo-patchset-0.tar.gz 4426 BLAKE2B df6f1a3b52b1f57f502621abba175a55342ae88ecbbe8e37d22b89a7514e0dea14299c87fb1dd47866c5fc89bbb2746a92de8dcf037c1a9d5d2ba4e2e9b8c828 SHA512 c26c209a2fc2380793373785c7a8290ea336c38fe1c243df5c71791e2d1f8b6f8d4a9452a9139181aeb0422cd538c5e6ffe40332ea5b2635cab3324dc4dc320b |
24 |
+DIST mercury-srcdist-20.06.1.tar.gz 47796261 BLAKE2B f282c6edb78e9090eb451585c65c9214927b94eaa5fcdf6f674aef6beb62eb65179f998bcc2e56c3c93b73dd1dc94973084eb8363bc05e334384096c9520d478 SHA512 94e901e5d3db39e3342bf2d6a2a74556a7b18b295c7e02669b487a81d41c72e572046ce1133d670ca6c1b8e246dd277439087efe8fb99b979a73555a101aa9a8 |
25 |
DIST mercury-srcdist-20.06.tar.gz 47768559 BLAKE2B f242aa2ef7da53aa2dfa054e4fee8646434d276f0748b014e33ea52d22f2a8a37e6fecaa20617f4943c4c1e7d8c179ed0603a344fde2dd58da98b2bacadf1a71 SHA512 b76bd22d8eb16242c68b614ff122ed7ee7535efef6c0ceb8cc798fee4c550bc41b6faff2135cea43b24c652b654bb35ae049656585d8e7bf3a1122d07cb1ecf4 |
26 |
|
27 |
diff --git a/dev-lang/mercury/mercury-20.06.1.ebuild b/dev-lang/mercury/mercury-20.06.1.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..c8cd32155c4 |
30 |
--- /dev/null |
31 |
+++ b/dev-lang/mercury/mercury-20.06.1.ebuild |
32 |
@@ -0,0 +1,207 @@ |
33 |
+# Copyright 1999-2021 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+inherit autotools elisp-common 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="https://www.mercurylang.org/index.html" |
45 |
+SRC_URI="https://dl.mercurylang.org/release-20.06/${MY_P}.tar.gz |
46 |
+ https://dev.gentoo.org/~keri/distfiles/mercury/${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.8:* ) |
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_LDFLAGS = ${LDFLAGS}" >> Mmake.params |
100 |
+ echo "EXTRA_LD_LIBFLAGS = ${LDFLAGS}" >> Mmake.params |
101 |
+ echo "EXTRA_MLFLAGS = --no-strip" >> Mmake.params |
102 |
+ |
103 |
+ if use trail; then |
104 |
+ echo "CFLAGS-int = -O0" >> Mmake.params |
105 |
+ echo "CFLAGS-uint = -O0" >> Mmake.params |
106 |
+ fi |
107 |
+ |
108 |
+ echo "EXTRA_LD_LIBFLAGS += -Wl,-soname=libgc.so" >> boehm_gc/Mmake.boehm_gc.params |
109 |
+ echo "EXTRA_LD_LIBFLAGS += -Wl,-soname=libmer_rt.so" >> runtime/Mmake.runtime.params |
110 |
+ echo "EXTRA_LD_LIBFLAGS += -Wl,-soname=libmer_std.so" >> library/Mmake.library.params |
111 |
+ |
112 |
+ # Build Mercury using bootstrap grade |
113 |
+ emake \ |
114 |
+ PARALLEL="'${MAKEOPTS}'" \ |
115 |
+ TEXI2DVI="" PDFTEX="" |
116 |
+ |
117 |
+ # We can now patch .m Mercury compiler files since we |
118 |
+ # have just built mercury_compiler. |
119 |
+ if [[ -d "${WORKDIR}"/${PV}-mmc ]] ; then |
120 |
+ eapply "${WORKDIR}"/${PV}-mmc |
121 |
+ fi |
122 |
+ |
123 |
+ # Rebuild Mercury compiler using the just built mercury_compiler |
124 |
+ emake \ |
125 |
+ PARALLEL="'${MAKEOPTS}'" \ |
126 |
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \ |
127 |
+ TEXI2DVI="" PDFTEX="" |
128 |
+ |
129 |
+ # The default Mercury grade may not be the same as the bootstrap |
130 |
+ # grade. Since src_test() is run before src_install() we compile |
131 |
+ # the default grade now |
132 |
+ emake \ |
133 |
+ PARALLEL="'${MAKEOPTS}'" \ |
134 |
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \ |
135 |
+ TEXI2DVI="" PDFTEX="" \ |
136 |
+ default_grade |
137 |
+} |
138 |
+ |
139 |
+src_test() { |
140 |
+ TEST_GRADE=$(scripts/ml --print-grade) |
141 |
+ if [ -d "${S}"/install_grade_dir.${TEST_GRADE} ] ; then |
142 |
+ TWS="${S}"/install_grade_dir.${TEST_GRADE} |
143 |
+ cp runtime/mer_rt.init "${TWS}"/runtime/ |
144 |
+ cp mdbcomp/mer_mdbcomp.init "${TWS}"/mdbcomp/ |
145 |
+ cp browser/mer_browser.init "${TWS}"/browser/ |
146 |
+ else |
147 |
+ TWS="${S}" |
148 |
+ fi |
149 |
+ |
150 |
+ cd "${S}"/tests || die |
151 |
+ sed -e "s:@WORKSPACE@:${TWS}:" \ |
152 |
+ < WS_FLAGS.ws \ |
153 |
+ > WS_FLAGS \ |
154 |
+ || die "sed WORKSPACE failed" |
155 |
+ sed -e "s:@WORKSPACE@:${TWS}:" \ |
156 |
+ < .mgnuc_copts.ws \ |
157 |
+ > .mgnuc_copts \ |
158 |
+ || die "sed WORKSPACE failed" |
159 |
+ find . -mindepth 1 -type d -exec cp .mgnuc_opts {} \; |
160 |
+ find . -mindepth 1 -type d -exec cp .mgnuc_copts {} \; |
161 |
+ |
162 |
+ # Mercury tests must be run in C locale since Mercury output is |
163 |
+ # compared to hard-coded warnings/errors |
164 |
+ LC_ALL="C" \ |
165 |
+ PATH="${TWS}"/scripts:"${TWS}"/util:"${S}"/slice:"${PATH}" \ |
166 |
+ TERM="" \ |
167 |
+ WORKSPACE="${TWS}" \ |
168 |
+ WORKSPACE_FLAGS=yes \ |
169 |
+ MERCURY_COMPILER="${TWS}"/compiler/mercury_compile \ |
170 |
+ MMAKE_DIR="${TWS}"/scripts \ |
171 |
+ MERCURY_SUPPRESS_STACK_TRACE=yes \ |
172 |
+ GRADE=${TEST_GRADE} \ |
173 |
+ mmake || die "mmake test failed" |
174 |
+} |
175 |
+ |
176 |
+src_install() { |
177 |
+ emake \ |
178 |
+ PARALLEL="'${MAKEOPTS}'" \ |
179 |
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \ |
180 |
+ TEXI2DVI="" PDFTEX="" \ |
181 |
+ DESTDIR="${D}" \ |
182 |
+ INSTALL_ELISP_DIR="${D}/${SITELISP}"/${PN} \ |
183 |
+ install |
184 |
+ |
185 |
+ if use java; then |
186 |
+ keepdir /usr/$(get_libdir)/mercury/modules/java |
187 |
+ fi |
188 |
+ |
189 |
+ if use mono; then |
190 |
+ keepdir /usr/$(get_libdir)/mercury/modules/csharp |
191 |
+ fi |
192 |
+ |
193 |
+ if use emacs; then |
194 |
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" \ |
195 |
+ || die "elisp-site-file-install failed" |
196 |
+ fi |
197 |
+ |
198 |
+ dodoc \ |
199 |
+ BUGS HISTORY LIMITATIONS NEWS README README.Linux \ |
200 |
+ README.Linux-Alpha README.Linux-m68k README.Linux-PPC \ |
201 |
+ RELEASE_NOTES VERSION || die |
202 |
+ |
203 |
+ if use erlang; then |
204 |
+ dodoc README.Erlang |
205 |
+ fi |
206 |
+ |
207 |
+ if use java; then |
208 |
+ dodoc README.Java |
209 |
+ fi |
210 |
+ |
211 |
+ if use mono; then |
212 |
+ dodoc README.CSharp |
213 |
+ fi |
214 |
+ |
215 |
+ if use examples; then |
216 |
+ docinto samples |
217 |
+ dodoc samples/{*.m,README,Mmakefile} |
218 |
+ dodoc -r samples/c_interface \ |
219 |
+ samples/diff \ |
220 |
+ samples/muz \ |
221 |
+ samples/rot13 \ |
222 |
+ samples/solutions \ |
223 |
+ samples/solver_types |
224 |
+ |
225 |
+ if use java; then |
226 |
+ dodoc -r samples/java_interface |
227 |
+ fi |
228 |
+ |
229 |
+ ecvs_clean "${D}"/usr/share/doc/${PF}/samples |
230 |
+ fi |
231 |
+} |
232 |
+ |
233 |
+pkg_postinst() { |
234 |
+ use emacs && elisp-site-regen |
235 |
+} |
236 |
+ |
237 |
+pkg_postrm() { |
238 |
+ use emacs && elisp-site-regen |
239 |
+} |