1 |
commit: c202ce59ca38b4906d2aaf1813f672cfd3f6f7cf |
2 |
Author: Keri Harris <keri <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 14 18:26:34 2022 +0000 |
4 |
Commit: Keri Harris <keri <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 14 18:30:38 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c202ce59 |
7 |
|
8 |
dev-lang/mercury: 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/Manifest | 2 + |
14 |
dev-lang/mercury/mercury-22.01.ebuild | 201 ++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 203 insertions(+) |
16 |
|
17 |
diff --git a/dev-lang/mercury/Manifest b/dev-lang/mercury/Manifest |
18 |
index 210ada8b36bb..7b52e540f6fd 100644 |
19 |
--- a/dev-lang/mercury/Manifest |
20 |
+++ b/dev-lang/mercury/Manifest |
21 |
@@ -1,4 +1,6 @@ |
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-22.01-gentoo-patchset-0.tar.gz 4147 BLAKE2B d59f58cb8870ee3ba636f62c1df7ab54d45d23e92626e1a18717e2ef7511c8a14a63c7d9bbfbeb8ec78841f6a05311f2431c5488df9996dae1ab71ce39c99a55 SHA512 a38d524e900b1771a12921618f785436ebca6029d94c9bd7a3115682b900d688d4cab3e3167a7b110f2fc4f5e9d09c1f24dffe9e39222efd20bb17782829b4a8 |
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/mercury-22.01.ebuild b/dev-lang/mercury/mercury-22.01.ebuild |
30 |
new file mode 100644 |
31 |
index 000000000000..3524e6009a37 |
32 |
--- /dev/null |
33 |
+++ b/dev-lang/mercury/mercury-22.01.ebuild |
34 |
@@ -0,0 +1,201 @@ |
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 autotools elisp-common 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="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/${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 examples java mono profile readline threads trail" |
55 |
+ |
56 |
+DEPEND="net-libs/libnsl:0= |
57 |
+ readline? ( sys-libs/readline:= ) |
58 |
+ java? ( >=virtual/jdk-1.8:* ) |
59 |
+ mono? ( dev-lang/mono ) |
60 |
+ doc? ( sys-apps/texinfo )" |
61 |
+ |
62 |
+RDEPEND="${DEPEND} |
63 |
+ emacs? ( >=app-editors/emacs-23.1:* )" |
64 |
+ |
65 |
+S="${WORKDIR}"/${MY_P} |
66 |
+ |
67 |
+SITEFILE=50${PN}-gentoo.el |
68 |
+ |
69 |
+src_prepare() { |
70 |
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then |
71 |
+ eapply "${WORKDIR}"/${PV} |
72 |
+ fi |
73 |
+ eapply_user |
74 |
+ |
75 |
+ AT_M4DIR=m4 eautoreconf |
76 |
+ |
77 |
+ xdg_environment_reset |
78 |
+} |
79 |
+ |
80 |
+src_configure() { |
81 |
+ strip-flags |
82 |
+ |
83 |
+ local myconf |
84 |
+ myconf="--libdir=/usr/$(get_libdir) \ |
85 |
+ $(use_enable mono csharp-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} -Wno-error" >> 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.md NEWS README README.md \ |
200 |
+ README.Linux README.Linux-m68k README.Linux-PPC \ |
201 |
+ RELEASE_NOTES VERSION || die |
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 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 |
+} |