1 |
commit: 31ff53a17e4106d5b26287d047fd077f7ccbef7d |
2 |
Author: Keri Harris <keri <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 26 17:26:55 2017 +0000 |
4 |
Commit: Keri Harris <keri <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 26 17:26:55 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31ff53a1 |
7 |
|
8 |
dev-lang/mercury: version bump |
9 |
|
10 |
Package-Manager: Portage-2.3.8, Repoman-2.3.1 |
11 |
|
12 |
dev-lang/mercury/Manifest | 2 + |
13 |
dev-lang/mercury/mercury-14.01.ebuild | 202 ++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 204 insertions(+) |
15 |
|
16 |
diff --git a/dev-lang/mercury/Manifest b/dev-lang/mercury/Manifest |
17 |
index 3d88bd89110..4ac655aaa95 100644 |
18 |
--- a/dev-lang/mercury/Manifest |
19 |
+++ b/dev-lang/mercury/Manifest |
20 |
@@ -1,2 +1,4 @@ |
21 |
DIST mercury-13.05.2-gentoo-patchset-0.tar.gz 5155 SHA256 647fb5931a76b86a003063e7f17f929866bb2f2791c98a444a1e9765e70ab4c4 SHA512 8c7305be8c97eebb2107f9ec9debdb572e19b77dbc2e9b5879387322acf06bb0a0a200583d1f01f892640991817c3f17d7c723825c6c1a94d365415cf1d648c6 WHIRLPOOL ce41a9eb302416125816dc09df87b97daeb39253b6ef686ef7ae783366a15e387390b03d63a5ee582a1ddd0244bd109e9da4c6ebbfaa8ad8ee574c87b286a91f |
22 |
+DIST mercury-14.01-gentoo-patchset-0.tar.gz 5728 SHA256 43fc8145e784b9e09561fd2b7268cfd37151b134203785b9256b4b7fd87e3d13 SHA512 f1e375ac192e478a82863aa7b8e28c1044a490c41bb63f7842b16b12b7cfa9c85938eacad4c3eacf348aafd42dfaa0dea5324b734d0d2a7454e3e9334369658e WHIRLPOOL eaad62d89285404518e3dca7f98065eea5aaa2f8b46d8ff0f01a0a6b6f886db51800faab81b4e1cd89cd61b771d65562a75f28c399aef053e730d7975ac8f8b6 |
23 |
DIST mercury-srcdist-13.05.2.tar.gz 53847394 SHA256 8491cf419b996a315bf8664154dd91aed940274ded98e3aded733dbe1939f95f SHA512 2298804d3a04bca6be4bd3046643c7c0d0b22c447423017869cd9bf3a4fb6ec9fd29b5d8e1a386d5d52d07be5cad73608f1fcacf46732a7add93a01dcd199c08 WHIRLPOOL 2a81bebfd4b97b9bb1b0e174025e6050149c8e5f812cd97cbdc41818faa18c15f9494925f1f320682087cc45264bc00db07bef6862afef12317f77cc169a7f86 |
24 |
+DIST mercury-srcdist-14.01.tar.gz 52683989 SHA256 4446b7b4eafd35540495ef90ce93b71cb88efa2d744628aee80f76a694aefcc1 SHA512 77f61df64fc150e08f191860f285b97d11a71a52eabc95f660b3c90d88f8ee71d1227f7ab4b8be78be9d4aa3d62a260a874020023e4795da4cfd2e6fefa9965f WHIRLPOOL a7123063590e39ae15222eb59a2c3681ae37bea211967c857eb8725090d342f0aba7a55446529f8608afb9895746581943527b1b3c313c5cbb96f638a3377404 |
25 |
|
26 |
diff --git a/dev-lang/mercury/mercury-14.01.ebuild b/dev-lang/mercury/mercury-14.01.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..9dd9a6bf182 |
29 |
--- /dev/null |
30 |
+++ b/dev-lang/mercury/mercury-14.01.ebuild |
31 |
@@ -0,0 +1,202 @@ |
32 |
+# Copyright 1999-2017 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=5 |
36 |
+ |
37 |
+inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib xdg-utils |
38 |
+ |
39 |
+PATCHSET_VER="0" |
40 |
+MY_P=${PN}-srcdist-${PV} |
41 |
+ |
42 |
+DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language" |
43 |
+HOMEPAGE="http://www.mercurylang.org/index.html" |
44 |
+SRC_URI="http://dl.mercurylang.org/release/${MY_P}.tar.gz |
45 |
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz" |
46 |
+ |
47 |
+LICENSE="GPL-2 LGPL-2" |
48 |
+SLOT="0" |
49 |
+KEYWORDS="~amd64 ~x86" |
50 |
+ |
51 |
+IUSE="debug emacs erlang examples java minimal readline threads" |
52 |
+ |
53 |
+DEPEND="!dev-libs/mpatrol |
54 |
+ !dev-util/mono-debugger |
55 |
+ readline? ( sys-libs/readline:= ) |
56 |
+ erlang? ( dev-lang/erlang ) |
57 |
+ java? ( >=virtual/jdk-1.6:= )" |
58 |
+ |
59 |
+RDEPEND="${DEPEND} |
60 |
+ emacs? ( virtual/emacs )" |
61 |
+ |
62 |
+S="${WORKDIR}"/${MY_P} |
63 |
+ |
64 |
+SITEFILE=50${PN}-gentoo.el |
65 |
+ |
66 |
+src_prepare() { |
67 |
+ cd "${WORKDIR}" || die |
68 |
+ EPATCH_FORCE=yes |
69 |
+ EPATCH_SUFFIX=patch |
70 |
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then |
71 |
+ epatch "${WORKDIR}"/${PV} |
72 |
+ fi |
73 |
+ |
74 |
+ sed -i -e "s/@libdir@/$(get_libdir)/" \ |
75 |
+ "${S}"/scripts/Mmake.vars.in \ |
76 |
+ || die "sed libdir failed" |
77 |
+ |
78 |
+ cd "${S}" || die |
79 |
+ eautoconf |
80 |
+ |
81 |
+ xdg_environment_reset |
82 |
+} |
83 |
+ |
84 |
+src_configure() { |
85 |
+ strip-flags |
86 |
+ |
87 |
+ local myconf |
88 |
+ myconf="--libdir=/usr/$(get_libdir) \ |
89 |
+ --disable-deep-profiler \ |
90 |
+ --disable-dotnet-grades \ |
91 |
+ --without-hwloc \ |
92 |
+ $(use_enable erlang erlang-grade) \ |
93 |
+ $(use_enable java java-grade) \ |
94 |
+ $(use_enable debug debug-grades) \ |
95 |
+ $(use_enable threads par-grades) \ |
96 |
+ $(use_enable !minimal most-grades) \ |
97 |
+ $(use_with readline)" |
98 |
+ |
99 |
+ econf ${myconf} |
100 |
+} |
101 |
+ |
102 |
+src_compile() { |
103 |
+ # Build Mercury using base llds grade |
104 |
+ emake \ |
105 |
+ PARALLEL=${MAKEOPTS} \ |
106 |
+ MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \ |
107 |
+ EXTRA_CFLAGS='${CFLAGS}' \ |
108 |
+ EXTRA_LDFLAGS='${LDFLAGS}'" \ |
109 |
+ || die "emake failed" |
110 |
+ |
111 |
+ # We can now patch .m Mercury compiler files since we |
112 |
+ # have just built mercury_compiler. |
113 |
+ EPATCH_FORCE=yes |
114 |
+ EPATCH_SUFFIX=patch |
115 |
+ if [[ -d "${WORKDIR}"/${PV}-mmc ]] ; then |
116 |
+ epatch "${WORKDIR}"/${PV}-mmc |
117 |
+ fi |
118 |
+ |
119 |
+ sed -i -e "s/@libdir@/$(get_libdir)/" \ |
120 |
+ "${S}"/compiler/file_util.m \ |
121 |
+ "${S}"/compiler/make.program_target.m \ |
122 |
+ || die "sed libdir failed" |
123 |
+ |
124 |
+ # Rebuild Mercury compiler using the just built mercury_compiler |
125 |
+ emake \ |
126 |
+ PARALLEL=${MAKEOPTS} \ |
127 |
+ MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \ |
128 |
+ EXTRA_CFLAGS='${CFLAGS}' \ |
129 |
+ EXTRA_LDFLAGS='${LDFLAGS}'" \ |
130 |
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \ |
131 |
+ compiler || die "emake compiler failed" |
132 |
+ |
133 |
+ # The default Mercury grade may not be the same as the grade used to |
134 |
+ # compile the llds base grade. Since src_test() is run before |
135 |
+ # src_install() we compile the default grade now |
136 |
+ emake \ |
137 |
+ PARALLEL=${MAKEOPTS} \ |
138 |
+ MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \ |
139 |
+ EXTRA_CFLAGS='${CFLAGS}' \ |
140 |
+ EXTRA_LDFLAGS='${LDFLAGS}'" \ |
141 |
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \ |
142 |
+ default_grade || die "emake default_grade failed" |
143 |
+} |
144 |
+ |
145 |
+src_test() { |
146 |
+ TEST_GRADE=`scripts/ml --print-grade` |
147 |
+ if [ -d "${S}"/install_grade_dir.${TEST_GRADE} ] ; then |
148 |
+ TWS="${S}"/install_grade_dir.${TEST_GRADE} |
149 |
+ cp runtime/mer_rt.init "${TWS}"/runtime/ |
150 |
+ cp mdbcomp/mer_mdbcomp.init "${TWS}"/mdbcomp/ |
151 |
+ cp browser/mer_browser.init "${TWS}"/browser/ |
152 |
+ else |
153 |
+ TWS="${S}" |
154 |
+ fi |
155 |
+ |
156 |
+ cd "${S}"/tests || die |
157 |
+ sed -e "s:@WORKSPACE@:${TWS}:" < WS_FLAGS.ws > WS_FLAGS \ |
158 |
+ || die "sed WORKSPACE failed" |
159 |
+ |
160 |
+ # Mercury tests must be run in C locale since Mercury output is |
161 |
+ # compared to hard-coded warnings/errors |
162 |
+ LC_ALL="C" \ |
163 |
+ PATH="${TWS}"/scripts:"${TWS}"/util:"${S}"/slice:"${PATH}" \ |
164 |
+ TERM="" \ |
165 |
+ WORKSPACE="${TWS}" \ |
166 |
+ WORKSPACE_FLAGS=yes \ |
167 |
+ MERCURY_COMPILER="${TWS}"/compiler/mercury_compile \ |
168 |
+ MMAKE_DIR="${TWS}"/scripts \ |
169 |
+ MERCURY_SUPPRESS_STACK_TRACE=yes \ |
170 |
+ GRADE=${TEST_GRADE} \ |
171 |
+ MERCURY_ALL_LOCAL_C_INCL_DIRS=" -I${TWS}/boehm_gc/include \ |
172 |
+ -I${TWS}/runtime \ |
173 |
+ -I${TWS}/library" \ |
174 |
+ mmake || die "mmake test failed" |
175 |
+} |
176 |
+ |
177 |
+src_install() { |
178 |
+ emake \ |
179 |
+ PARALLEL=${MAKEOPTS} \ |
180 |
+ MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \ |
181 |
+ EXTRA_CFLAGS='${CFLAGS}' \ |
182 |
+ EXTRA_LDFLAGS='${LDFLAGS}'" \ |
183 |
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \ |
184 |
+ INSTALL_PREFIX="${D}"/usr \ |
185 |
+ INSTALL_MAN_DIR="${D}"/usr/share/man \ |
186 |
+ INSTALL_INFO_DIR="${D}"/usr/share/info \ |
187 |
+ INSTALL_HTML_DIR="${D}"/usr/share/doc/${PF}/html \ |
188 |
+ INSTALL_ELISP_DIR="${D}/${SITELISP}"/${PN} \ |
189 |
+ install || die "emake install failed" |
190 |
+ |
191 |
+ if use emacs; then |
192 |
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" \ |
193 |
+ || die "elisp-site-file-install failed" |
194 |
+ fi |
195 |
+ |
196 |
+ dodoc \ |
197 |
+ BUGS HISTORY LIMITATIONS NEWS README README.Linux \ |
198 |
+ README.Linux-Alpha README.Linux-m68k README.Linux-PPC \ |
199 |
+ RELEASE_NOTES TODO VERSION WORK_IN_PROGRESS || die |
200 |
+ |
201 |
+ if use erlang; then |
202 |
+ dodoc README.Erlang || die |
203 |
+ fi |
204 |
+ |
205 |
+ if use java; then |
206 |
+ dodoc README.Java || die |
207 |
+ fi |
208 |
+ |
209 |
+ if use examples; then |
210 |
+ insinto /usr/share/doc/${PF}/samples |
211 |
+ doins samples/{*.m,README,Mmakefile} || die |
212 |
+ doins -r samples/c_interface \ |
213 |
+ samples/diff \ |
214 |
+ samples/muz \ |
215 |
+ samples/rot13 \ |
216 |
+ samples/solutions \ |
217 |
+ samples/solver_types || die |
218 |
+ |
219 |
+ if use java; then |
220 |
+ doins -r samples/java_interface || die |
221 |
+ fi |
222 |
+ |
223 |
+ ecvs_clean "${D}"/usr/share/doc/${PF}/samples |
224 |
+ fi |
225 |
+} |
226 |
+ |
227 |
+pkg_postinst() { |
228 |
+ use emacs && elisp-site-regen |
229 |
+} |
230 |
+ |
231 |
+pkg_postrm() { |
232 |
+ use emacs && elisp-site-regen |
233 |
+} |