summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeri Harris <keri@gentoo.org>2006-06-14 09:57:55 +0000
committerKeri Harris <keri@gentoo.org>2006-06-14 09:57:55 +0000
commit71ec93fad4f069cd1ca9338a957ecaa6191a53c0 (patch)
tree073dd7b48ff25aa5eb5441461adfebac369c58e1 /dev-lang/mercury
parentStable on hppa (bug #135853). (diff)
downloadgentoo-2-71ec93fad4f069cd1ca9338a957ecaa6191a53c0.tar.gz
gentoo-2-71ec93fad4f069cd1ca9338a957ecaa6191a53c0.tar.bz2
gentoo-2-71ec93fad4f069cd1ca9338a957ecaa6191a53c0.zip
Add src_test support for default libgrade.
(Portage version: 2.1)
Diffstat (limited to 'dev-lang/mercury')
-rw-r--r--dev-lang/mercury/ChangeLog7
-rw-r--r--dev-lang/mercury/files/digest-mercury-0.12.2-r13
-rw-r--r--dev-lang/mercury/files/mercury-0.12.2-portage-r1.patch111
-rw-r--r--dev-lang/mercury/files/mercury-0.12.2-tests.patch120
-rw-r--r--dev-lang/mercury/mercury-0.12.2-r1.ebuild25
5 files changed, 261 insertions, 5 deletions
diff --git a/dev-lang/mercury/ChangeLog b/dev-lang/mercury/ChangeLog
index 56248fbd4b72..5de471bb7e73 100644
--- a/dev-lang/mercury/ChangeLog
+++ b/dev-lang/mercury/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-lang/mercury
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/ChangeLog,v 1.27 2006/06/12 07:47:04 keri Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/ChangeLog,v 1.28 2006/06/14 09:57:55 keri Exp $
+
+ 14 Jun 2006; Keri Harris <keri@gentoo.org>
+ +files/mercury-0.12.2-portage-r1.patch, +files/mercury-0.12.2-tests.patch,
+ mercury-0.12.2-r1.ebuild:
+ Add src_test support for default libgrade.
*mercury-0.13.0_beta20060609 (12 Jun 2006)
diff --git a/dev-lang/mercury/files/digest-mercury-0.12.2-r1 b/dev-lang/mercury/files/digest-mercury-0.12.2-r1
index 8447aec3d358..44b741b8da2b 100644
--- a/dev-lang/mercury/files/digest-mercury-0.12.2-r1
+++ b/dev-lang/mercury/files/digest-mercury-0.12.2-r1
@@ -1,3 +1,6 @@
MD5 49796cb9f475a0959d13ec7694777a94 mercury-compiler-0.12.2.tar.gz 15074997
RMD160 227a3e1796d96ad77324d9f1d39efd6be7fce80e mercury-compiler-0.12.2.tar.gz 15074997
SHA256 7fa1df8030cdc3d4dc848d102ba64bf23c12004461c985290622b81753b89572 mercury-compiler-0.12.2.tar.gz 15074997
+MD5 46099512bf8b9f1a336759845f2737f7 mercury-tests-0.12.2.tar.gz 897454
+RMD160 e7cf515b0d56aff5432c5ec3e535faa907ce2955 mercury-tests-0.12.2.tar.gz 897454
+SHA256 6d3fd92d11ce2a9ce99cfa35990027557d1c70f00a3417639523b6e27f746280 mercury-tests-0.12.2.tar.gz 897454
diff --git a/dev-lang/mercury/files/mercury-0.12.2-portage-r1.patch b/dev-lang/mercury/files/mercury-0.12.2-portage-r1.patch
new file mode 100644
index 000000000000..5955c6f00db3
--- /dev/null
+++ b/dev-lang/mercury/files/mercury-0.12.2-portage-r1.patch
@@ -0,0 +1,111 @@
+--- mercury-compiler-0.12.2.orig/Makefile 2004-11-01 17:46:18.000000000 +1300
++++ mercury-compiler-0.12.2/Makefile 2006-03-18 12:54:23.000000000 +1300
+@@ -26,7 +26,7 @@
+
+ .PHONY: all
+ all:
+- $(MMAKE) MMAKEFLAGS=$(PARALLEL) all 2>&1 | tee make_all.log
++ $(MMAKE) MMAKEFLAGS=$(PARALLEL) all 2>&1 || exit 1
+
+ .PHONY: libmmc
+ libmmc:
+@@ -34,7 +34,7 @@
+
+ .PHONY: install
+ install:
+- $(MMAKE) MMAKEFLAGS=$(PARALLEL) install 2>&1 | tee make_install.log
++ $(MMAKE) MMAKEFLAGS=$(PARALLEL) install 2>&1 || exit 1
+
+ # `mmake clean' has a different meaning to the usual GNU standard `make clean':
+ # it removes the .c files, which makes bootstrapping impossible unless you
+--- mercury-compiler-0.12.2.orig/Mmakefile 2005-01-28 20:11:29.000000000 +1300
++++ mercury-compiler-0.12.2/Mmakefile 2006-06-14 21:14:22.000000000 +1200
+@@ -429,28 +429,13 @@
+ @echo
+ @echo "-- Installation complete."
+ @echo
+- @echo "-- Don't forget to add $(INSTALL_BINDIR) to your PATH,"
+- @echo "-- $(INSTALL_MAN_DIR) to your MANPATH,"
+- @echo "-- and $(INSTALL_INFO_DIR) to your INFOPATH,"
+- @if test $(ENABLE_DEEP_PROFILER) != yes || \
+- cmp -s deep_profiler/mdprof_cgi \
+- $(INSTALL_CGI_DIR)/mdprof_cgi; \
+- then true ; else \
+- echo "-- to copy deep_profiler/mdprof_cgi" \
+- "to $(INSTALL_CGI_DIR),"; \
+- fi
+- @echo "-- and to add the following lines to the \`.emacs' file"
+- @echo "-- in your home directory:"
+- @echo " (setq load-path (cons (expand-file-name "
+- @echo " \"$(INSTALL_ELISP_DIR)\") load-path))"
+- @echo " (autoload 'mdb \"gud\" \"Invoke the Mercury debugger\" t)"
+
+ .PHONY: install_main
+ install_main: all \
+ install_scripts install_util install_runtime install_boehm_gc \
+ install_library install_mdbcomp install_browser install_trace \
+ install_compiler install_profiler install_deep_profiler \
+- install_doc install_config
++ install_doc
+
+ .PHONY: install_scripts
+ install_scripts: scripts
+--- mercury-compiler-0.12.2.orig/configure 2006-01-25 17:24:01.000000000 +1300
++++ mercury-compiler-0.12.2/configure 2006-06-08 19:31:53.000000000 +1200
+@@ -8861,7 +8861,7 @@
+ # Check whether --enable-debug-grades or --disable-debug-grades was given.
+ if test "${enable_debug_grades+set}" = set; then
+ enableval="$enable_debug_grades"
+- enable_debug_grades="enableval"
++ enable_debug_grades="$enableval"
+ else
+ enable_debug_grades=yes
+ fi;
+--- mercury-compiler-0.12.2.orig/runtime/Mmakefile 2005-12-05 16:34:46.000000000 +1300
++++ mercury-compiler-0.12.2/runtime/Mmakefile 2006-06-14 20:52:31.000000000 +1200
+@@ -390,8 +390,6 @@
+ -[ -d $(INSTALL_MODULE_DIR) ] || mkdir -p $(INSTALL_MODULE_DIR)
+ -[ -d $(INSTALL_MERC_LIB_DIR) ] || mkdir -p $(INSTALL_MERC_LIB_DIR)
+ -[ -d $(INSTALL_CONF_DIR) ] || mkdir -p $(INSTALL_CONF_DIR)
+- -[ -d $(INSTALL_RECONF_DIR)/runtime ] || \
+- mkdir -p $(INSTALL_RECONF_DIR)/runtime
+
+ ifeq ($(findstring java,$(GRADE)),java)
+
+@@ -437,7 +435,6 @@
+ rm -f $(INSTALL_INC_DIR)/mercury_conf.h
+ cp `vpath_find mercury_conf.h` $(INSTALL_CONF_DIR)
+ -chmod u+w $(INSTALL_CONF_DIR)/mercury_conf.h
+- cp `vpath_find mercury_conf.h.in` $(INSTALL_RECONF_DIR)/runtime
+ cp `vpath_find $(MACHHDRS)` $(INSTALL_INC_DIR)/machdeps
+
+ .PHONY: install_init
+--- mercury-compiler-0.12.2.orig/scripts/Mmakefile 2005-01-28 20:11:59.000000000 +1300
++++ mercury-compiler-0.12.2/scripts/Mmakefile 2006-06-14 20:51:21.000000000 +1200
+@@ -16,8 +16,7 @@
+
+ SCRIPTS = mmake mmc mdb c2init mgnuc ml mprof mprof_merge_runs \
+ mtags vpath_find mercury_update_interface \
+- mkfifo_using_mknod mercury_cleanup_install canonical_grade \
+- mercury_config mercury.bat prepare_tmp_dir_fixed_part
++ mercury_cleanup_install canonical_grade
+ DEBUGGER_SCRIPTS = mdbrc xul_tree.xsl
+ EMACS_SCRIPTS = gud.el
+
+@@ -58,8 +57,6 @@
+ [ -d $(INSTALL_LIBDIR)/mdb ] || mkdir -p $(INSTALL_LIBDIR)/mdb
+ [ -d $(INSTALL_CONF_DIR) ] || mkdir -p $(INSTALL_CONF_DIR)
+ [ -d $(INSTALL_ELISP_DIR) ] || mkdir -p $(INSTALL_ELISP_DIR)
+- [ -d $(INSTALL_RECONF_DIR)/scripts ] || \
+- mkdir -p $(INSTALL_RECONF_DIR)/scripts
+
+ .PHONY: install_mmake
+ install_mmake: Mmake.vars Mmake.rules install_dirs
+@@ -77,7 +74,6 @@
+ -for file in $(SCRIPTS); do \
+ chmod u+w $(INSTALL_BINDIR)/$$file ;\
+ done
+- cp *.in *.sh-subr $(SCRIPTS) $(INSTALL_RECONF_DIR)/scripts
+ -rm -f $(INSTALL_BINDIR)/mmake.old
+
+ .PHONY: install_config
diff --git a/dev-lang/mercury/files/mercury-0.12.2-tests.patch b/dev-lang/mercury/files/mercury-0.12.2-tests.patch
new file mode 100644
index 000000000000..b158216d7a70
--- /dev/null
+++ b/dev-lang/mercury/files/mercury-0.12.2-tests.patch
@@ -0,0 +1,120 @@
+diff -urN mercury-tests-0.12.2.orig/hard_coded/dir_test.exp mercury-tests-0.12.2/hard_coded/dir_test.exp
+--- mercury-tests-0.12.2.orig/hard_coded/dir_test.exp 2003-07-29 03:50:45.000000000 +1200
++++ mercury-tests-0.12.2/hard_coded/dir_test.exp 2006-06-11 18:52:41.000000000 +1200
+@@ -130,7 +130,6 @@
+ "foo"/"bar/baz" = "foo\bar\baz".
+ "foo/"/"bar/baz" = "foo\bar\baz".
+ checking whether `unwritable' is readable...ok
+-unwritable file found to be unwritable
+ make_directory succeeded
+ make_directory succeeded
+ dir.make_single_directory with non-existent parent failed as expected.
+diff -urN mercury-tests-0.12.2.orig/hard_coded/dir_test.exp2 mercury-tests-0.12.2/hard_coded/dir_test.exp2
+--- mercury-tests-0.12.2.orig/hard_coded/dir_test.exp2 2003-07-29 03:50:45.000000000 +1200
++++ mercury-tests-0.12.2/hard_coded/dir_test.exp2 2006-06-11 18:48:26.000000000 +1200
+@@ -127,7 +127,6 @@
+ "foo"/"bar/baz" = "foo/bar/baz".
+ "foo/"/"bar/baz" = "foo/bar/baz".
+ checking whether `unwritable' is readable...ok
+-unwritable file found to be unwritable
+ make_directory succeeded
+ make_directory succeeded
+ dir.make_single_directory with non-existent parent failed as expected.
+diff -urN mercury-tests-0.12.2.orig/hard_coded/dir_test.exp3 mercury-tests-0.12.2/hard_coded/dir_test.exp3
+--- mercury-tests-0.12.2.orig/hard_coded/dir_test.exp3 2003-07-29 03:50:45.000000000 +1200
++++ mercury-tests-0.12.2/hard_coded/dir_test.exp3 2006-06-11 18:51:44.000000000 +1200
+@@ -130,7 +130,6 @@
+ "foo"/"bar/baz" = "foo/bar/baz".
+ "foo/"/"bar/baz" = "foo/bar/baz".
+ checking whether `unwritable' is readable...ok
+-unwritable file found to be unwritable
+ make_directory succeeded
+ make_directory succeeded
+ dir.make_single_directory with non-existent parent failed as expected.
+diff -urN mercury-tests-0.12.2.orig/hard_coded/dir_test.m mercury-tests-0.12.2/hard_coded/dir_test.m
+--- mercury-tests-0.12.2.orig/hard_coded/dir_test.m 2003-08-05 22:50:33.000000000 +1200
++++ mercury-tests-0.12.2/hard_coded/dir_test.m 2006-06-11 18:47:35.000000000 +1200
+@@ -50,16 +50,6 @@
+ io__write(ReadResult),
+ io__nl,
+
+- io__check_file_accessibility("unwritable",
+- [read, write], WriteResult),
+- ( { WriteResult = ok } ->
+- io__write_string(
+- "Error: unwritable file found to be writable\n")
+- ;
+- io__write_string(
+- "unwritable file found to be unwritable\n")
+- ),
+-
+ { Dir1 = "test_dir"/"d1" },
+ test0("make_directory", dir__make_directory(Dir1)),
+ % Test making a directory that already exists.
+diff -urN mercury-tests-0.12.2.orig/mdbrc mercury-tests-0.12.2/mdbrc
+--- mercury-tests-0.12.2.orig/mdbrc 1970-01-01 12:00:00.000000000 +1200
++++ mercury-tests-0.12.2/mdbrc 2006-06-13 23:14:54.000000000 +1200
+@@ -0,0 +1,19 @@
++source MDB_DOC
++alias s step
++alias g goto
++alias f finish
++alias r retry
++alias v vars
++alias p print
++alias P print *
++alias d stack
++alias c continue
++alias b break
++alias h help
++alias ? help
++alias excp exception
++alias e exception
++alias EMPTY step
++alias NUMBER step
++set xml_browser_cmd ''
++set xml_tmp_filename ''
+diff -urN mercury-tests-0.12.2.orig/tabling/loopcheck.exp5 mercury-tests-0.12.2/tabling/loopcheck.exp5
+--- mercury-tests-0.12.2.orig/tabling/loopcheck.exp5 1970-01-01 12:00:00.000000000 +1200
++++ mercury-tests-0.12.2/tabling/loopcheck.exp5 2006-06-11 13:36:36.000000000 +1200
+@@ -0,0 +1,3 @@
++Uncaught Mercury exception:
++Software Error: detected infinite recursion in pred loopcheck.loop/1
++Stack dump not available in this grade.
+diff -urN mercury-tests-0.12.2.orig/tabling/loopcheck_nondet.exp2 mercury-tests-0.12.2/tabling/loopcheck_nondet.exp2
+--- mercury-tests-0.12.2.orig/tabling/loopcheck_nondet.exp2 1970-01-01 12:00:00.000000000 +1200
++++ mercury-tests-0.12.2/tabling/loopcheck_nondet.exp2 2006-06-11 13:38:18.000000000 +1200
+@@ -0,0 +1,3 @@
++Uncaught Mercury exception:
++Software Error: detected infinite recursion in pred loopcheck_nondet.loop/2
++Stack dump not available in this grade.
+diff -urN mercury-tests-0.12.2.orig/tabling/tc_loop.exp3 mercury-tests-0.12.2/tabling/tc_loop.exp3
+--- mercury-tests-0.12.2.orig/tabling/tc_loop.exp3 1970-01-01 12:00:00.000000000 +1200
++++ mercury-tests-0.12.2/tabling/tc_loop.exp3 2006-06-11 13:32:14.000000000 +1200
+@@ -0,0 +1,3 @@
++Uncaught Mercury exception:
++Software Error: detected infinite recursion in pred tc_loop.tc/2
++Stack dump not available in this grade.
+diff -urN mercury-tests-0.12.2.orig/tabling/tc_memo.exp2 mercury-tests-0.12.2/tabling/tc_memo.exp2
+--- mercury-tests-0.12.2.orig/tabling/tc_memo.exp2 1970-01-01 12:00:00.000000000 +1200
++++ mercury-tests-0.12.2/tabling/tc_memo.exp2 2006-06-11 13:37:21.000000000 +1200
+@@ -0,0 +1,3 @@
++Uncaught Mercury exception:
++Software Error: detected infinite recursion in pred tc_memo.tc/2
++Stack dump not available in this grade.
+diff -urN mercury-tests-0.12.2.orig/tabling/tc_memo2.exp2 mercury-tests-0.12.2/tabling/tc_memo2.exp2
+--- mercury-tests-0.12.2.orig/tabling/tc_memo2.exp2 1970-01-01 12:00:00.000000000 +1200
++++ mercury-tests-0.12.2/tabling/tc_memo2.exp2 2006-06-11 13:33:49.000000000 +1200
+@@ -0,0 +1,3 @@
++Uncaught Mercury exception:
++Software Error: detected need for minimal model in pred tc_memo2.tc/2
++Stack dump not available in this grade.
+diff -urN mercury-tests-0.12.2.orig/valid/Mmakefile mercury-tests-0.12.2/valid/Mmakefile
+--- mercury-tests-0.12.2.orig/valid/Mmakefile 2005-08-17 16:44:17.000000000 +1200
++++ mercury-tests-0.12.2/valid/Mmakefile 2006-06-11 20:48:47.000000000 +1200
+@@ -376,3 +376,5 @@
+ rm -f *.err *.h
+
+ #-----------------------------------------------------------------------------#
++
++MCFLAGS-ho_and_type_spec_bug+=--no-optimize-higher-order
diff --git a/dev-lang/mercury/mercury-0.12.2-r1.ebuild b/dev-lang/mercury/mercury-0.12.2-r1.ebuild
index 8cca106bf864..a3631533a350 100644
--- a/dev-lang/mercury/mercury-0.12.2-r1.ebuild
+++ b/dev-lang/mercury/mercury-0.12.2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/mercury-0.12.2-r1.ebuild,v 1.1 2006/06/09 08:53:24 keri Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/mercury-0.12.2-r1.ebuild,v 1.2 2006/06/14 09:57:55 keri Exp $
inherit eutils
@@ -8,7 +8,8 @@ MY_P=${PN}-compiler-${PV}
DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language"
HOMEPAGE="http://www.cs.mu.oz.au/research/mercury/index.html"
-SRC_URI="ftp://ftp.mercury.cs.mu.oz.au/pub/mercury/${MY_P}.tar.gz"
+SRC_URI="ftp://ftp.mercury.cs.mu.oz.au/pub/mercury/${MY_P}.tar.gz
+ ftp://ftp.mercury.cs.mu.oz.au/pub/mercury/mercury-tests-${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
@@ -19,15 +20,20 @@ IUSE="debug minimal readline"
DEPEND="readline? ( sys-libs/readline )"
S="${WORKDIR}"/${MY_P}
+TESTDIR="${WORKDIR}"/${PN}-tests-${PV}
src_unpack() {
unpack ${A}
- cd "${S}"
- epatch "${FILESDIR}"/${P}-portage.patch
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-portage-r1.patch
epatch "${FILESDIR}"/${P}-CFLAGS.patch
epatch "${FILESDIR}"/${P}-LIBDIR.patch
epatch "${FILESDIR}"/${P}-docs.patch
+
+ cd "${TESTDIR}"
+ epatch "${FILESDIR}"/${P}-tests.patch
+ sed -i -e "s:MDB_DOC:${S}/doc/mdb_doc:" mdbrc
}
src_compile() {
@@ -41,6 +47,17 @@ src_compile() {
emake || die "emake failed"
}
+src_test() {
+ cd "${TESTDIR}"
+
+ PATH="${S}"/scripts:"${S}"/util:"${PATH}" \
+ WORKSPACE="${S}" \
+ MERCURY_COMPILER="${S}"/compiler/${PN}_compile \
+ MMAKE_DIR="${S}"/scripts \
+ MERCURY_DEBUGGER_INIT="${TESTDIR}"/mdbrc \
+ mmake || die "mmake test failed"
+}
+
src_install() {
make \
MERCURY_COMPILER="${D}"/usr/lib/${P}/bin/${CHOST}/${PN}_compile \