summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeri Harris <keri@gentoo.org>2010-11-06 20:58:43 +0000
committerKeri Harris <keri@gentoo.org>2010-11-06 20:58:43 +0000
commita7d46afa1a0b217ff27c95d11a75f91a28f84c2c (patch)
tree2c3830ed48cfea31fd45719017223f462831af42 /dev-lang/mercury
parentNo stable consumers in the tree, revert to ~ppc64; bug #326091 (diff)
downloadgentoo-2-a7d46afa1a0b217ff27c95d11a75f91a28f84c2c.tar.gz
gentoo-2-a7d46afa1a0b217ff27c95d11a75f91a28f84c2c.tar.bz2
gentoo-2-a7d46afa1a0b217ff27c95d11a75f91a28f84c2c.zip
Add bootstrap_depend step to stop race condition in mmc dependency generation; document src_compile() steps
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang/mercury')
-rw-r--r--dev-lang/mercury/ChangeLog6
-rw-r--r--dev-lang/mercury/mercury-10.04.2-r1.ebuild19
2 files changed, 22 insertions, 3 deletions
diff --git a/dev-lang/mercury/ChangeLog b/dev-lang/mercury/ChangeLog
index c48d1e17dbaa..42f341d8ecfb 100644
--- a/dev-lang/mercury/ChangeLog
+++ b/dev-lang/mercury/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-lang/mercury
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/ChangeLog,v 1.127 2010/11/06 09:18:00 keri Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/ChangeLog,v 1.128 2010/11/06 20:58:43 keri Exp $
+
+ 06 Nov 2010; <keri@gentoo.org> mercury-10.04.2-r1.ebuild:
+ Add bootstrap_depend step to stop race condition in mmc dependency
+ generation; document src_compile() steps
06 Nov 2010; <keri@gentoo.org> mercury-10.04.2-r1.ebuild:
Use 2-pass mercury_compiler bootstrap to allow patching .m files; closes
diff --git a/dev-lang/mercury/mercury-10.04.2-r1.ebuild b/dev-lang/mercury/mercury-10.04.2-r1.ebuild
index 430940e13e6b..b7796bf6f459 100644
--- a/dev-lang/mercury/mercury-10.04.2-r1.ebuild
+++ b/dev-lang/mercury/mercury-10.04.2-r1.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/mercury-10.04.2-r1.ebuild,v 1.5 2010/11/06 09:18:00 keri Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/mercury-10.04.2-r1.ebuild,v 1.6 2010/11/06 20:58:43 keri Exp $
inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib
-PATCHSET_VER="1"
+PATCHSET_VER="2"
MY_P=${PN}-compiler-${PV}
DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language"
@@ -69,6 +69,15 @@ src_compile() {
econf ${myconf}
+ # Generate Mercury .m dependencies. This step will vacuously
+ # succeed if we do not have a bootstrappable instance of mmc
+ # already installed. This step is required as mmc does not wait
+ # for all dependencies to be generated before compiling .m files.
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ bootstrap_depend || die "emake depend failed"
+
+ # Build Mercury using base llds grade
emake \
PARALLEL=${MAKEOPTS} \
EXTRA_MLFLAGS=--no-strip \
@@ -76,6 +85,8 @@ src_compile() {
EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
|| die "emake failed"
+ # We can now patch .m Mercury compiler files since we
+ # have just built mercury_compiler.
EPATCH_FORCE=yes
EPATCH_SUFFIX=patch
epatch "${WORKDIR}"/${PV}-mmc
@@ -85,6 +96,7 @@ src_compile() {
"${S}"/compiler/make.program_target.m \
|| die "sed libdir failed"
+ # Rebuild Mercury compiler using the just built mercury_compiler
emake \
PARALLEL=${MAKEOPTS} \
EXTRA_MLFLAGS=--no-strip \
@@ -93,6 +105,9 @@ src_compile() {
MERCURY_COMPILER="${S}"/compiler/mercury_compile \
compiler || die "emake compiler failed"
+ # The default Mercury grade may not be the same as the grade used to
+ # compile the llds base grade. Since src_test() is run before
+ # src_install() we compile the default grade now
emake \
PARALLEL=${MAKEOPTS} \
EXTRA_MLFLAGS=--no-strip \