Gentoo Archives: gentoo-commits

From: "Keri Harris (keri)" <keri@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/mercury: ChangeLog mercury-11.01.ebuild
Date: Fri, 29 Apr 2011 23:32:00
Message-Id: 20110429233149.488CC20054@flycatcher.gentoo.org
1 keri 11/04/29 23:31:49
2
3 Modified: ChangeLog
4 Added: mercury-11.01.ebuild
5 Log:
6 Version bump
7
8 (Portage version: 2.1.9.42/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.136 dev-lang/mercury/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/mercury/ChangeLog?rev=1.136&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/mercury/ChangeLog?rev=1.136&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/mercury/ChangeLog?r1=1.135&r2=1.136
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/mercury/ChangeLog,v
20 retrieving revision 1.135
21 retrieving revision 1.136
22 diff -u -r1.135 -r1.136
23 --- ChangeLog 12 Feb 2011 18:28:00 -0000 1.135
24 +++ ChangeLog 29 Apr 2011 23:31:48 -0000 1.136
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-lang/mercury
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/ChangeLog,v 1.135 2011/02/12 18:28:00 armin76 Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/ChangeLog,v 1.136 2011/04/29 23:31:48 keri Exp $
30 +
31 +*mercury-11.01 (29 Apr 2011)
32 +
33 + 29 Apr 2011; <keri@g.o> +mercury-11.01.ebuild:
34 + Version bump
35
36 12 Feb 2011; Raúl Porcel <armin76@g.o> mercury-0.13.1-r2.ebuild,
37 mercury-10.04.ebuild, mercury-10.04-r1.ebuild, mercury-10.04.1.ebuild,
38
39
40
41 1.1 dev-lang/mercury/mercury-11.01.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/mercury/mercury-11.01.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/mercury/mercury-11.01.ebuild?rev=1.1&content-type=text/plain
45
46 Index: mercury-11.01.ebuild
47 ===================================================================
48 # Copyright 1999-2011 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/mercury-11.01.ebuild,v 1.1 2011/04/29 23:31:48 keri Exp $
51
52 EAPI=2
53
54 inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib
55
56 PATCHSET_VER="0"
57 MY_P=${PN}-compiler-${PV}
58
59 DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language"
60 HOMEPAGE="http://www.cs.mu.oz.au/research/mercury/index.html"
61 SRC_URI="http://www.mercury.csse.unimelb.edu.au/download/files/${MY_P}.tar.gz
62 mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz
63 test? ( http://www.mercury.csse.unimelb.edu.au/download/files/mercury-tests-${PV}.tar.gz )"
64
65 LICENSE="GPL-2"
66 SLOT="0"
67 KEYWORDS="~amd64 ~ppc ~x86"
68
69 IUSE="debug emacs erlang examples java minimal readline test threads"
70
71 DEPEND="!dev-libs/mpatrol
72 !dev-util/mono-debugger
73 readline? ( sys-libs/readline )
74 erlang? ( dev-lang/erlang )
75 java? ( >=virtual/jdk-1.5 )"
76
77 RDEPEND="${DEPEND}
78 emacs? ( virtual/emacs )"
79
80 S="${WORKDIR}"/${MY_P}
81 TESTDIR="${WORKDIR}"/${PN}-tests-${PV}
82
83 SITEFILE=50${PN}-gentoo.el
84
85 src_prepare() {
86 cd "${WORKDIR}"
87 EPATCH_FORCE=yes
88 EPATCH_SUFFIX=patch
89 epatch "${WORKDIR}"/${PV}
90
91 sed -i -e "s/@libdir@/$(get_libdir)/" \
92 "${S}"/scripts/Mmake.vars.in \
93 || die "sed libdir failed"
94
95 if use test; then
96 epatch "${WORKDIR}"/${PV}-tests
97 fi
98
99 cd "${S}"
100 eautoconf
101 }
102
103 src_configure() {
104 strip-flags
105
106 local myconf
107 myconf="--libdir=/usr/$(get_libdir) \
108 --disable-gcc-back-end \
109 --disable-deep-profiler \
110 --disable-dotnet-grades \
111 $(use_enable erlang erlang-grade) \
112 $(use_enable java java-grade) \
113 $(use_enable debug debug-grades) \
114 $(use_enable threads par-grades) \
115 $(use_enable !minimal most-grades) \
116 $(use_with readline)"
117
118 econf ${myconf}
119 }
120
121 src_compile() {
122 # Generate Mercury .m dependencies. This step will vacuously
123 # succeed if we do not have a bootstrappable instance of mmc
124 # already installed. This step is required as mmc does not wait
125 # for all dependencies to be generated before compiling .m files.
126 emake \
127 PARALLEL=${MAKEOPTS} \
128 bootstrap_depend || die "emake depend failed"
129
130 # Build Mercury using base llds grade
131 emake \
132 PARALLEL=${MAKEOPTS} \
133 EXTRA_MLFLAGS=--no-strip \
134 EXTRA_LDFLAGS="${LDFLAGS}" \
135 EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
136 || die "emake failed"
137
138 # We can now patch .m Mercury compiler files since we
139 # have just built mercury_compiler.
140 EPATCH_FORCE=yes
141 EPATCH_SUFFIX=patch
142 epatch "${WORKDIR}"/${PV}-mmc
143
144 sed -i -e "s/@libdir@/$(get_libdir)/" \
145 "${S}"/compiler/file_util.m \
146 "${S}"/compiler/make.program_target.m \
147 || die "sed libdir failed"
148
149 # Rebuild Mercury compiler using the just built mercury_compiler
150 emake \
151 PARALLEL=${MAKEOPTS} \
152 EXTRA_MLFLAGS=--no-strip \
153 EXTRA_LDFLAGS="${LDFLAGS}" \
154 EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
155 MERCURY_COMPILER="${S}"/compiler/mercury_compile \
156 compiler || die "emake compiler failed"
157
158 # The default Mercury grade may not be the same as the grade used to
159 # compile the llds base grade. Since src_test() is run before
160 # src_install() we compile the default grade now
161 emake \
162 PARALLEL=${MAKEOPTS} \
163 EXTRA_MLFLAGS=--no-strip \
164 EXTRA_LDFLAGS="${LDFLAGS}" \
165 EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
166 MERCURY_COMPILER="${S}"/compiler/mercury_compile \
167 default_grade || die "emake default_grade failed"
168 }
169
170 src_test() {
171 TEST_GRADE=`scripts/ml --print-grade`
172 if [ -d "${S}"/install_grade_dir.${TEST_GRADE} ] ; then
173 TWS="${S}"/install_grade_dir.${TEST_GRADE}
174 cp browser/mer_browser.init "${TWS}"/browser/
175 cp mdbcomp/mer_mdbcomp.init "${TWS}"/mdbcomp/
176 cp runtime/mer_rt.init "${TWS}"/runtime/
177 cp ssdb/mer_ssdb.init "${TWS}"/ssdb/
178 else
179 TWS="${S}"
180 fi
181
182 cd "${TESTDIR}"
183 sed -i -e "s:@WORKSPACE@:${TWS}:" WS_FLAGS.ws \
184 || die "sed WORKSPACE failed"
185
186 # Mercury tests must be run in C locale since Mercury output is
187 # compared to hard-coded warnings/errors
188 LC_ALL="C" \
189 PATH="${TWS}"/scripts:"${TWS}"/util:"${TWS}"/slice:"${PATH}" \
190 TERM="" \
191 WORKSPACE="${TWS}" \
192 MERCURY_COMPILER="${TWS}"/compiler/mercury_compile \
193 MERCURY_CONFIG_DIR="${TWS}" \
194 MMAKE_DIR="${TWS}"/scripts \
195 MERCURY_SUPPRESS_STACK_TRACE=yes \
196 GRADE=${TEST_GRADE} \
197 MERCURY_ALL_LOCAL_C_INCL_DIRS=" -I${TWS}/boehm_gc \
198 -I${TWS}/boehm_gc/include \
199 -I${TWS}/runtime \
200 -I${TWS}/library \
201 -I${TWS}/mdbcomp \
202 -I${TWS}/browser \
203 -I${TWS}/trace" \
204 mmake || die "mmake test failed"
205 }
206
207 src_install() {
208 emake \
209 PARALLEL=${MAKEOPTS} \
210 EXTRA_LDFLAGS="${LDFLAGS}" \
211 EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
212 MERCURY_COMPILER="${S}"/compiler/mercury_compile \
213 INSTALL_PREFIX="${D}"/usr \
214 INSTALL_MAN_DIR="${D}"/usr/share/man \
215 INSTALL_INFO_DIR="${D}"/usr/share/info \
216 INSTALL_HTML_DIR="${D}"/usr/share/doc/${PF}/html \
217 INSTALL_ELISP_DIR="${D}/${SITELISP}"/${PN} \
218 install || die "make install failed"
219
220 if use emacs; then
221 elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
222 || die "elisp-site-file-install failed"
223 fi
224
225 dodoc \
226 BUGS HISTORY LIMITATIONS NEWS README README.Linux \
227 README.Linux-Alpha README.Linux-m68k README.Linux-PPC \
228 RELEASE_NOTES TODO VERSION WORK_IN_PROGRESS || die
229
230 if use erlang; then
231 dodoc README.Erlang || die
232 fi
233
234 if use java; then
235 dodoc README.Java || die
236 fi
237
238 if use examples; then
239 insinto /usr/share/doc/${PF}/samples
240 doins samples/{*.m,README,Mmakefile} || die
241 doins -r samples/c_interface \
242 samples/diff \
243 samples/muz \
244 samples/rot13 \
245 samples/solutions \
246 samples/solver_types || die
247
248 if use java; then
249 doins -r samples/java_interface || die
250 fi
251
252 rm -rf $(find "${D}"/usr/share/doc/${PF}/samples \
253 -name CVS -o -name .cvsignore)
254 fi
255 }
256
257 pkg_postinst() {
258 use emacs && elisp-site-regen
259 }
260
261 pkg_postrm() {
262 use emacs && elisp-site-regen
263 }