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