summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-lang/mercury/ChangeLog7
-rw-r--r--dev-lang/mercury/files/mercury-10.04-libgrades.patch281
-rw-r--r--dev-lang/mercury/mercury-10.04.ebuild21
3 files changed, 305 insertions, 4 deletions
diff --git a/dev-lang/mercury/ChangeLog b/dev-lang/mercury/ChangeLog
index 537481a34920..129e5a44feae 100644
--- a/dev-lang/mercury/ChangeLog
+++ b/dev-lang/mercury/ChangeLog
@@ -1,6 +1,11 @@
# 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.108 2010/07/24 02:29:17 keri Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/ChangeLog,v 1.109 2010/07/25 08:45:23 keri Exp $
+
+ 25 Jul 2010; <keri@gentoo.org> mercury-10.04.ebuild,
+ +files/mercury-10.04-libgrades.patch:
+ Compile libgrades after default llds grade in case default llds grade !=
+ default grade (used in testsuite)
24 Jul 2010; <keri@gentoo.org> files/mercury-10.04-boehm_gc.patch:
Update generic mach_dep for ASM_CLEAR_CODE targets
diff --git a/dev-lang/mercury/files/mercury-10.04-libgrades.patch b/dev-lang/mercury/files/mercury-10.04-libgrades.patch
new file mode 100644
index 000000000000..ed63fbc6a65c
--- /dev/null
+++ b/dev-lang/mercury/files/mercury-10.04-libgrades.patch
@@ -0,0 +1,281 @@
+diff -ur mercury-compiler-10.04.orig/Makefile mercury-compiler-10.04/Makefile
+--- mercury-compiler-10.04.orig/Makefile 2010-07-12 04:31:01.000000000 +1200
++++ mercury-compiler-10.04/Makefile 2010-07-25 20:05:55.000000000 +1200
+@@ -69,6 +69,6 @@
+ $(MMAKE) uninstall
+
+ .DEFAULT:
+- $(MMAKE) $@
++ $(MMAKE) MMAKEFLAGS=$(PARALLEL) $@
+
+ #-----------------------------------------------------------------------------#
+diff -ur mercury-compiler-10.04.orig/Mmakefile mercury-compiler-10.04/Mmakefile
+--- mercury-compiler-10.04.orig/Mmakefile 2009-10-20 17:07:24.000000000 +1300
++++ mercury-compiler-10.04/Mmakefile 2010-07-25 20:05:55.000000000 +1200
+@@ -286,6 +286,54 @@
+ mdbcomp browser ssdb trace
+ +cd deep_profiler && $(SUBDIR_MMAKE)
+
++.PHONY: libgrades
++libgrades:
++ +for grade in x $(LIBGRADES); do \
++ if [ "$${grade}" = "x" -o "$${grade}" = "$(GRADE)" ]; then \
++ continue; \
++ fi; \
++ case $${grade} in \
++ java*|erlang*) continue; \
++ esac; \
++ gc_grade=`scripts/ml --grade $${grade} --print-gc-grade`; \
++ IWS=`/bin/pwd`/install_grade_dir.$${grade}; \
++ ( \
++ scripts/prepare_install_dir $${IWS} && \
++ ( cd $${IWS}/boehm_gc && \
++ $(SUBDIR_MMAKE) MC=mmc GRADE=$${grade} WORKSPACE=$${IWS} \
++ GC_GRADE=$${gc_grade} libgrade ) && \
++ ( cd $${IWS}/runtime && \
++ $(SUBDIR_MMAKE) MC=mmc GRADE=$${grade} WORKSPACE=$${IWS} \
++ libgrade ) && \
++ ( cd $${IWS}/library && \
++ $(SUBDIR_MMAKE) MC=mmc GRADE=$${grade} WORKSPACE=$${IWS} \
++ depend && \
++ $(SUBDIR_MMAKE) MC=mmc GRADE=$${grade} WORKSPACE=$${IWS} \
++ libgrade ) && \
++ ( cd $${IWS}/mdbcomp && \
++ $(SUBDIR_MMAKE) MC=mmc GRADE=$${grade} WORKSPACE=$${IWS} \
++ depend && \
++ $(SUBDIR_MMAKE) MC=mmc GRADE=$${grade} WORKSPACE=$${IWS} \
++ libgrade ) && \
++ ( cd $${IWS}/browser && \
++ $(SUBDIR_MMAKE) MC=mmc GRADE=$${grade} WORKSPACE=$${IWS} \
++ depend && \
++ $(SUBDIR_MMAKE) MC=mmc GRADE=$${grade} WORKSPACE=$${IWS} \
++ libgrade ) && \
++ ( cd $${IWS}/ssdb && \
++ $(SUBDIR_MMAKE) MC=mmc GRADE=$${grade} WORKSPACE=$${IWS} \
++ depend && \
++ $(SUBDIR_MMAKE) MC=mmc GRADE=$${grade} WORKSPACE=$${IWS} \
++ libgrade ) && \
++ ( cd $${IWS}/trace && \
++ $(SUBDIR_MMAKE) MC=mmc GRADE=$${grade} WORKSPACE=$${IWS} \
++ libgrade ) && \
++ true \
++ ) || \
++ { echo "To clean up from failed install, remove $${IWS}"; \
++ exit 1; }; \
++ done;
++
+ #-----------------------------------------------------------------------------#
+
+ .PHONY: tags
+diff -ur mercury-compiler-10.04.orig/boehm_gc/Mmakefile mercury-compiler-10.04/boehm_gc/Mmakefile
+--- mercury-compiler-10.04.orig/boehm_gc/Mmakefile 2010-02-27 02:16:44.000000000 +1300
++++ mercury-compiler-10.04/boehm_gc/Mmakefile 2010-07-25 20:05:55.000000000 +1200
+@@ -176,6 +176,9 @@
+
+ # No need to install the Boehm collector for grades which don't use it.
+
++.PHONY: libgrade
++libgrade:
++
+ .PHONY: install_headers
+ install_headers:
+
+@@ -187,6 +190,9 @@
+
+ else
+
++.PHONY: libgrade
++libgrade: lib$(GC_GRADE).$A lib$(GC_GRADE).$(EXT_FOR_SHARED_LIB)
++
+ .PHONY: install_headers
+ install_headers: install_dirs
+ cp $(HEADERS) $(INSTALL_INC_DIR)
+diff -ur mercury-compiler-10.04.orig/browser/Mmakefile mercury-compiler-10.04/browser/Mmakefile
+--- mercury-compiler-10.04.orig/browser/Mmakefile 2010-05-10 18:31:55.000000000 +1200
++++ mercury-compiler-10.04/browser/Mmakefile 2010-07-25 20:05:55.000000000 +1200
+@@ -256,16 +256,28 @@
+
+ # there is no browser in the .NET or Erlang backends
+
++.PHONY: libgrade
++libgrade:
++
+ .PHONY: install_library
+ install_library:
+
+ else ifneq (,$(findstring java,$(GRADE)))
+
++.PHONY: libgrade
++libgrade:
++
+ .PHONY: install_library
+ install_library: lib$(BROWSER_LIB_NAME).install
+
+ else
+
++.PHONY: libgrade
++libgrade: \
++ lib$(BROWSER_LIB_NAME).$A \
++ lib$(BROWSER_LIB_NAME).$(EXT_FOR_SHARED_LIB) \
++ all-ints
++
+ .PHONY: install_library
+ install_library: \
+ lib$(BROWSER_LIB_NAME).install_library \
+diff -ur mercury-compiler-10.04.orig/library/Mmakefile mercury-compiler-10.04/library/Mmakefile
+--- mercury-compiler-10.04.orig/library/Mmakefile 2010-05-20 21:29:30.000000000 +1200
++++ mercury-compiler-10.04/library/Mmakefile 2010-07-25 20:05:55.000000000 +1200
+@@ -493,6 +493,9 @@
+
+ # XXX some modules in the browser directory need library.int3
+
++.PHONY: libgrade
++libgrade: mercury.dll
++
+ .PHONY: install_library
+ install_library: mercury.dll install_grade_dirs install_gac \
+ install_strong_name lib$(STD_LIB_NAME).install_grade_hdrs \
+@@ -531,6 +534,9 @@
+
+ else
+
++.PHONY: libgrade
++libgrade: lib$(STD_LIB_NAME)
++
+ # we depend on lib$(STD_LIB_NAME) because lib$(STD_LIB_NAME).install_library
+ # doesn't make library.int3, but some modules in the browser directory need it.
+
+@@ -541,6 +547,9 @@
+
+ else #ifneq ($(MMAKE_USE_MMC_MAKE),yes)
+
++.PHONY: libgrade
++libgrade: lib$(STD_LIB_NAME) all-ints
++
+ .PHONY: install_mercury
+ install_mercury: install_library
+
+diff -ur mercury-compiler-10.04.orig/mdbcomp/Mmakefile mercury-compiler-10.04/mdbcomp/Mmakefile
+--- mercury-compiler-10.04.orig/mdbcomp/Mmakefile 2010-05-10 18:32:00.000000000 +1200
++++ mercury-compiler-10.04/mdbcomp/Mmakefile 2010-07-25 20:05:55.000000000 +1200
+@@ -215,16 +215,28 @@
+
+ # there is no debugger in the .NET or Erlang backends
+
++.PHONY: libgrade
++libgrade:
++
+ .PHONY: install_library
+ install_library:
+
+ else ifneq (,$(findstring java,$(GRADE)))
+
++.PHONY: libgrade
++libgrade:
++
+ .PHONY: install_library
+ install_library: lib$(MDBCOMP_LIB_NAME).install
+
+ else
+
++.PHONY: libgrade
++libgrade: \
++ lib$(MDBCOMP_LIB_NAME).$A \
++ lib$(MDBCOMP_LIB_NAME).$(EXT_FOR_SHARED_LIB) \
++ all-ints
++
+ .PHONY: install_library
+ install_library: \
+ lib$(MDBCOMP_LIB_NAME).install_library \
+diff -ur mercury-compiler-10.04.orig/runtime/Mmakefile mercury-compiler-10.04/runtime/Mmakefile
+--- mercury-compiler-10.04.orig/runtime/Mmakefile 2010-07-16 03:24:52.000000000 +1200
++++ mercury-compiler-10.04/runtime/Mmakefile 2010-07-25 20:05:55.000000000 +1200
+@@ -466,6 +466,9 @@
+ # mercury/library/Mmakefile.)
+ # (Runtime support for the Erlang backend is in the library directory.)
+
++.PHONY: libgrade
++libgrade:
++
+ .PHONY: install_headers
+ install_headers:
+
+@@ -478,6 +481,9 @@
+ else
+ ifeq ($(findstring il,$(GRADE)),il)
+
++.PHONY: libgrade
++libgrade: $(DOTNET_DLLS)
++
+ .PHONY: install_headers
+ install_headers:
+
+@@ -492,6 +498,9 @@
+
+ else
+
++.PHONY: libgrade
++libgrade: lib$(RT_LIB_NAME).$A lib$(RT_LIB_NAME).$(EXT_FOR_SHARED_LIB)
++
+ # mercury_conf.h needs to be in a separate directory so it can be
+ # overridden by a different configuration.
+ .PHONY: install_headers
+diff -ur mercury-compiler-10.04.orig/ssdb/Mmakefile mercury-compiler-10.04/ssdb/Mmakefile
+--- mercury-compiler-10.04.orig/ssdb/Mmakefile 2010-05-10 18:32:00.000000000 +1200
++++ mercury-compiler-10.04/ssdb/Mmakefile 2010-07-25 20:05:55.000000000 +1200
+@@ -250,16 +250,28 @@
+
+ # there is no ssdb in the .NET or Erlang backends
+
++.PHONY: libgrade
++libgrade:
++
+ .PHONY: install_library
+ install_library:
+
+ else ifneq (,$(findstring java,$(GRADE)))
+
++.PHONY: libgrade
++libgrade:
++
+ .PHONY: install_library
+ install_library: lib$(SSDB_LIB_NAME).install
+
+ else
+
++.PHONY: libgrade
++libgrade: \
++ lib$(SSDB_LIB_NAME).$A \
++ lib$(SSDB_LIB_NAME).$(EXT_FOR_SHARED_LIB) \
++ all-ints
++
+ .PHONY: install_library
+ install_library: \
+ lib$(SSDB_LIB_NAME).install_library \
+diff -ur mercury-compiler-10.04.orig/trace/Mmakefile mercury-compiler-10.04/trace/Mmakefile
+--- mercury-compiler-10.04.orig/trace/Mmakefile 2008-07-30 05:58:58.000000000 +1200
++++ mercury-compiler-10.04/trace/Mmakefile 2010-07-25 20:05:55.000000000 +1200
+@@ -324,6 +324,9 @@
+
+ # there is no tracing in the .NET, Java, Erlang backends
+
++.PHONY: libgrade
++libgrade:
++
+ .PHONY: install_headers
+ install_headers:
+
+@@ -332,6 +335,13 @@
+
+ else
+
++.PHONY: libgrade
++libgrade: \
++ lib$(TRACE_LIB_NAME).$A \
++ lib$(TRACE_LIB_NAME).$(EXT_FOR_SHARED_LIB) \
++ lib$(EVENTSPEC_LIB_NAME).$A \
++ lib$(EVENTSPEC_LIB_NAME).$(EXT_FOR_SHARED_LIB)
++
+ .PHONY: install_headers
+ install_headers: $(HDRS) $(LIB_GLOBALS_H)
+ cp `vpath_find $(HDRS) $(LIB_GLOBALS_H)` $(INSTALL_INC_DIR)
diff --git a/dev-lang/mercury/mercury-10.04.ebuild b/dev-lang/mercury/mercury-10.04.ebuild
index 8ca605ec33ff..ac4091ade649 100644
--- a/dev-lang/mercury/mercury-10.04.ebuild
+++ b/dev-lang/mercury/mercury-10.04.ebuild
@@ -1,6 +1,6 @@
# 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.ebuild,v 1.2 2010/07/24 00:05:32 keri Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/mercury-10.04.ebuild,v 1.3 2010/07/25 08:45:23 keri Exp $
inherit elisp-common eutils flag-o-matic java-pkg-opt-2 multilib
@@ -35,6 +35,7 @@ src_unpack() {
unpack ${A}
epatch "${FILESDIR}"/${P}-multilib.patch
+ epatch "${FILESDIR}"/${P}-libgrades.patch
epatch "${FILESDIR}"/${P}-boehm_gc.patch
epatch "${FILESDIR}"/${P}-docs.patch
epatch "${FILESDIR}"/${P}-no-reconf.patch
@@ -73,11 +74,25 @@ src_compile() {
PARALLEL=${MAKEOPTS} \
EXTRA_MLFLAGS=--no-strip \
|| die "emake failed"
+
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ EXTRA_MLFLAGS=--no-strip \
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \
+ libgrades || die "emake libgrades failed"
}
src_test() {
TEST_GRADE=`scripts/ml --print-grade`
- TWS="${S}"
+ if [ -d "${S}"/install_grade_dir.${TEST_GRADE} ] ; then
+ TWS="${S}"/install_grade_dir.${TEST_GRADE}
+ cp browser/mer_browser.init "${TWS}"/browser/
+ cp mdbcomp/mer_mdbcomp.init "${TWS}"/mdbcomp/
+ cp runtime/mer_rt.init "${TWS}"/runtime/
+ cp ssdb/mer_ssdb.init "${TWS}"/ssdb/
+ else
+ TWS="${S}"
+ fi
cd "${TESTDIR}"
sed -i -e "s:@WORKSPACE@:${TWS}:" WS_FLAGS.ws
@@ -126,7 +141,7 @@ src_install() {
fi
if use java; then
- dodoc README.java
+ dodoc README.Java
fi
}