summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-lang/mercury/ChangeLog13
-rw-r--r--dev-lang/mercury/files/mercury-10.04_beta1-docs.patch20
-rw-r--r--dev-lang/mercury/files/mercury-10.04_beta1-multilib.patch116
-rw-r--r--dev-lang/mercury/files/mercury-10.04_beta1-no-reconf.patch59
-rw-r--r--dev-lang/mercury/files/mercury-10.04_beta1-tests-workspace.patch29
-rw-r--r--dev-lang/mercury/mercury-10.04_beta1.ebuild128
6 files changed, 363 insertions, 2 deletions
diff --git a/dev-lang/mercury/ChangeLog b/dev-lang/mercury/ChangeLog
index 0f83e774de03..0c3107bf8715 100644
--- a/dev-lang/mercury/ChangeLog
+++ b/dev-lang/mercury/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-lang/mercury
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/ChangeLog,v 1.95 2008/12/25 22:07:58 keri Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/ChangeLog,v 1.96 2010/02/13 02:50:34 keri Exp $
+
+*mercury-10.04_beta1 (13 Feb 2010)
+
+ 13 Feb 2010; <keri@gentoo.org> +mercury-10.04_beta1.ebuild,
+ +files/mercury-10.04_beta1-docs.patch,
+ +files/mercury-10.04_beta1-multilib.patch,
+ +files/mercury-10.04_beta1-no-reconf.patch,
+ +files/mercury-10.04_beta1-tests-workspace.patch:
+ Version bump
25 Dec 2008; <keri@gentoo.org> -files/mercury-0.12.2-CFLAGS.patch,
-files/mercury-0.12.2-MAKEOPTS.patch,
diff --git a/dev-lang/mercury/files/mercury-10.04_beta1-docs.patch b/dev-lang/mercury/files/mercury-10.04_beta1-docs.patch
new file mode 100644
index 000000000000..32074b0b3e55
--- /dev/null
+++ b/dev-lang/mercury/files/mercury-10.04_beta1-docs.patch
@@ -0,0 +1,20 @@
+--- mercury-compiler-10.04-beta.orig/doc/Mmakefile 2009-10-02 17:38:22.000000000 +1300
++++ mercury-compiler-10.04-beta/doc/Mmakefile 2010-02-10 05:45:10.000000000 +1300
+@@ -120,7 +120,7 @@
+ # formatted versions of the man pages.
+ # But it might make sense to add them.
+ .PHONY: all
+-all: $(INFOPAGES) $(DVI) $(HTML) manpages $(MDB_DOC)
++all: $(INFOPAGES) $(HTML) manpages $(MDB_DOC)
+ #all: ps pdf text formatted_manpages
+
+ #-----------------------------------------------------------------------------#
+@@ -351,7 +351,7 @@
+ # versions of the documentation. If they are added they should
+ # be installed here.
+ .PHONY: install
+-install: install_info install_html install_dvi install_manpages \
++install: install_info install_html install_manpages \
+ install_mdb_doc
+ # install_text install_ps
+
diff --git a/dev-lang/mercury/files/mercury-10.04_beta1-multilib.patch b/dev-lang/mercury/files/mercury-10.04_beta1-multilib.patch
new file mode 100644
index 000000000000..a037730f60c1
--- /dev/null
+++ b/dev-lang/mercury/files/mercury-10.04_beta1-multilib.patch
@@ -0,0 +1,116 @@
+diff -u mercury-compiler-10.04-beta.orig/compiler/make.program_target.c mercury-compiler-10.04-beta/compiler/make.program_target.c
+--- mercury-compiler-10.04-beta.orig/compiler/make.program_target.c 2010-02-04 12:34:34.000000000 +1300
++++ mercury-compiler-10.04-beta/compiler/make.program_target.c 2010-02-13 07:43:10.000000000 +1300
+@@ -5449,7 +5449,7 @@
+ make__program_target__install_grade_init_6_0_i2);
+ MR_def_label(make__program_target__install_grade_init_6_0,2)
+ MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
+- MR_r2 = (MR_Word) MR_string_const("lib", 3);
++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3);
+ MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0,
+ make__program_target__install_grade_init_6_0_i3);
+ MR_def_label(make__program_target__install_grade_init_6_0,3)
+@@ -5900,7 +5900,7 @@
+ make__program_target__make_grade_install_dirs_6_0_i2);
+ MR_def_label(make__program_target__make_grade_install_dirs_6_0,2)
+ MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
+- MR_r2 = (MR_Word) MR_string_const("lib", 3);
++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3);
+ MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0,
+ make__program_target__make_grade_install_dirs_6_0_i3);
+ MR_def_label(make__program_target__make_grade_install_dirs_6_0,3)
+@@ -6336,7 +6336,7 @@
+ if ((strcmp((char *) (MR_Word *) MR_sv(3), MR_string_const("java", 4)) != 0)) {
+ MR_GOTO_LAB(make__program_target__install_library_grade_files_10_0_i11);
+ }
+- MR_r2 = (MR_Word) MR_string_const("lib", 3);
++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3);
+ MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0,
+ make__program_target__install_library_grade_files_10_0_i13);
+ MR_def_label(make__program_target__install_library_grade_files_10_0,13)
+@@ -6393,7 +6393,7 @@
+ if ((strcmp((char *) (MR_Word *) MR_sv(3), MR_string_const("erlang", 6)) != 0)) {
+ MR_GOTO_LAB(make__program_target__install_library_grade_files_10_0_i19);
+ }
+- MR_r2 = (MR_Word) MR_string_const("lib", 3);
++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3);
+ MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0,
+ make__program_target__install_library_grade_files_10_0_i21);
+ MR_def_label(make__program_target__install_library_grade_files_10_0,21)
+@@ -6458,7 +6458,7 @@
+ make__program_target__install_library_grade_files_10_0_i41);
+ MR_def_label(make__program_target__install_library_grade_files_10_0,19)
+ MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
+- MR_r2 = (MR_Word) MR_string_const("lib", 3);
++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3);
+ MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0,
+ make__program_target__install_library_grade_files_10_0_i28);
+ MR_def_label(make__program_target__install_library_grade_files_10_0,28)
+@@ -6595,7 +6595,7 @@
+ make__program_target__make_install_dirs_5_0_i2);
+ MR_def_label(make__program_target__make_install_dirs_5_0,2)
+ MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
+- MR_r2 = (MR_Word) MR_string_const("lib", 3);
++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3);
+ MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0,
+ make__program_target__make_install_dirs_5_0_i3);
+ MR_def_label(make__program_target__make_install_dirs_5_0,3)
+@@ -6816,7 +6816,7 @@
+ make__program_target__install_library_7_0_i11);
+ MR_def_label(make__program_target__install_library_7_0,11)
+ MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
+- MR_r2 = (MR_Word) MR_string_const("lib", 3);
++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3);
+ MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0,
+ make__program_target__install_library_7_0_i12);
+ MR_def_label(make__program_target__install_library_7_0,12)
+@@ -10604,7 +10604,7 @@
+ make__program_target__install_ints_and_headers_8_0_i13);
+ MR_def_label(make__program_target__install_ints_and_headers_8_0,13)
+ MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
+- MR_r2 = (MR_Word) MR_string_const("lib", 3);
++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3);
+ MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0,
+ make__program_target__install_ints_and_headers_8_0_i14);
+ MR_def_label(make__program_target__install_ints_and_headers_8_0,14)
+@@ -11233,7 +11233,7 @@
+ make__program_target__install_grade_ints_and_headers_9_0_i5);
+ MR_def_label(make__program_target__install_grade_ints_and_headers_9_0,5)
+ MR_MAYBE_INIT_LOCAL_THREAD_ENGINE_BASE
+- MR_r2 = (MR_Word) MR_string_const("lib", 3);
++ MR_r2 = (MR_Word) MR_string_const("@libdir@", 3);
+ MR_np_call_localret_ent(fn__f_100_105_114_95_95_47_2_0,
+ make__program_target__install_grade_ints_and_headers_9_0_i6);
+ MR_def_label(make__program_target__install_grade_ints_and_headers_9_0,6)
+diff -u mercury-compiler-10.04-beta.orig/scripts/Mmake.vars.in mercury-compiler-10.04-beta/scripts/Mmake.vars.in
+--- mercury-compiler-10.04-beta.orig/scripts/Mmake.vars.in 2009-08-18 17:10:40.000000000 +1200
++++ mercury-compiler-10.04-beta/scripts/Mmake.vars.in 2010-02-13 07:48:26.000000000 +1300
+@@ -688,18 +688,18 @@
+ INSTALL_PREFIX = @prefix@
+ FINAL_INSTALL_PREFIX = @prefix@
+ INSTALL_BINDIR = $(INSTALL_PREFIX)/bin
+-INSTALL_LIBDIR = $(INSTALL_PREFIX)/lib/mercury
+-FINAL_INSTALL_LIBDIR = $(FINAL_INSTALL_PREFIX)/lib/mercury
+-INSTALL_JAVA_LIBRARY_DIR= $(INSTALL_PREFIX)/lib/mercury/lib/java
++INSTALL_LIBDIR = $(INSTALL_PREFIX)/@libdir@/mercury
++FINAL_INSTALL_LIBDIR = $(FINAL_INSTALL_PREFIX)/@libdir@/mercury
++INSTALL_JAVA_LIBRARY_DIR= $(INSTALL_PREFIX)/@libdir@/mercury/lib/java
+ INSTALL_INFO_DIR = $(INSTALL_PREFIX)/info
+-INSTALL_DVI_DIR = $(INSTALL_PREFIX)/lib/mercury/doc
+-INSTALL_TEXT_DIR = $(INSTALL_PREFIX)/lib/mercury/doc
+-INSTALL_PS_DIR = $(INSTALL_PREFIX)/lib/mercury/doc
+-INSTALL_PDF_DIR = $(INSTALL_PREFIX)/lib/mercury/doc
++INSTALL_DVI_DIR = $(INSTALL_PREFIX)/@libdir@/mercury/doc
++INSTALL_TEXT_DIR = $(INSTALL_PREFIX)/@libdir@/mercury/doc
++INSTALL_PS_DIR = $(INSTALL_PREFIX)/@libdir@/mercury/doc
++INSTALL_PDF_DIR = $(INSTALL_PREFIX)/@libdir@/mercury/doc
+ INSTALL_MAN_DIR = $(INSTALL_PREFIX)/man
+-INSTALL_HTML_DIR = $(INSTALL_PREFIX)/lib/mercury/html
+-INSTALL_MDB_DOC_DIR = $(INSTALL_PREFIX)/lib/mercury/mdb
+-INSTALL_ELISP_DIR = $(INSTALL_PREFIX)/lib/mercury/elisp
++INSTALL_HTML_DIR = $(INSTALL_PREFIX)/@libdir@/mercury/html
++INSTALL_MDB_DOC_DIR = $(INSTALL_PREFIX)/@libdir@/mercury/mdb
++INSTALL_ELISP_DIR = $(INSTALL_PREFIX)/@libdir@/mercury/elisp
+ INSTALL_CGI_DIR = @CGIDIR@
+
+ # You should not need to override anything below here
diff --git a/dev-lang/mercury/files/mercury-10.04_beta1-no-reconf.patch b/dev-lang/mercury/files/mercury-10.04_beta1-no-reconf.patch
new file mode 100644
index 000000000000..5c9601737302
--- /dev/null
+++ b/dev-lang/mercury/files/mercury-10.04_beta1-no-reconf.patch
@@ -0,0 +1,59 @@
+diff -ur mercury-compiler-10.04-beta.orig/runtime/Mmakefile mercury-compiler-10.04-beta/runtime/Mmakefile
+--- mercury-compiler-10.04-beta.orig/runtime/Mmakefile 2009-12-03 18:28:00.000000000 +1300
++++ mercury-compiler-10.04-beta/runtime/Mmakefile 2010-02-10 05:47:50.000000000 +1300
+@@ -460,8 +460,6 @@
+ mkdir -p $(INSTALL_GRADE_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
+
+ ifneq "$(filter java% erlang%,$(GRADE))" ""
+
+@@ -507,7 +505,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
+diff -ur mercury-compiler-10.04-beta.orig/scripts/Mmakefile mercury-compiler-10.04-beta/scripts/Mmakefile
+--- mercury-compiler-10.04-beta.orig/scripts/Mmakefile 2009-09-02 11:54:38.000000000 +1200
++++ mercury-compiler-10.04-beta/scripts/Mmakefile 2010-02-10 05:50:28.000000000 +1300
+@@ -24,17 +24,13 @@
+ canonical_grade \
+ mdb \
+ mdprof \
+- mercury.bat \
+- mercury_config \
+ mercury_update_interface \
+ mgnuc \
+- mkfifo_using_mknod \
+ ml \
+ mmake \
+ mmc \
+ mprof \
+- mtags \
+- prepare_install_dir
++ mtags
+
+ SCRIPTS = $(NONCONF_SCRIPTS) $(CONF_SCRIPTS)
+
+@@ -113,8 +109,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
+@@ -132,7 +126,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-10.04_beta1-tests-workspace.patch b/dev-lang/mercury/files/mercury-10.04_beta1-tests-workspace.patch
new file mode 100644
index 000000000000..04999eb3fefc
--- /dev/null
+++ b/dev-lang/mercury/files/mercury-10.04_beta1-tests-workspace.patch
@@ -0,0 +1,29 @@
+--- mercury-tests-10.04-beta.orig/Mmake.common 2009-08-14 15:21:53.000000000 +1200
++++ mercury-tests-10.04-beta/Mmake.common 2010-02-11 18:43:14.000000000 +1300
+@@ -79,8 +79,8 @@
+ -include $(TESTS_DIR)/Mmake.params
+
+ MCFLAGS += --flags $(TESTS_DIR)/TESTS_FLAGS
+-ifdef WORKSPACE_FLAGS
+-MCFLAGS += --flags $(TESTS_DIR)/WS_FLAGS
++ifdef WORKSPACE
++MCFLAGS += --flags $(TESTS_DIR)/WS_FLAGS.ws
+ endif
+
+ # Avoid trying to make this file with `mmc --make' if it doesn't exist.
+--- mercury-compiler-10.04-beta.orig/configure 2010-02-03 18:50:14.000000000 +1300
++++ mercury-compiler-10.04-beta/configure 2010-02-11 18:46:48.000000000 +1300
+@@ -14688,10 +14688,10 @@
+ test_flags="tests/TESTS_FLAGS"
+ test_mdbrc="tests/mdbrc"
+ else
+- if test -e ../tests/TESTS_FLAGS.in
++ if test -e ../mercury-tests-10.04-beta/TESTS_FLAGS.in
+ then
+- test_flags="../tests/TESTS_FLAGS"
+- test_mdbrc="../tests/mdbrc"
++ test_flags="../mercury-tests-10.04-beta/TESTS_FLAGS"
++ test_mdbrc="../mercury-tests-10.04-beta/mdbrc"
+ else
+ test_flags=""
+ test_mdbrc=""
diff --git a/dev-lang/mercury/mercury-10.04_beta1.ebuild b/dev-lang/mercury/mercury-10.04_beta1.ebuild
new file mode 100644
index 000000000000..31574d1abe8b
--- /dev/null
+++ b/dev-lang/mercury/mercury-10.04_beta1.ebuild
@@ -0,0 +1,128 @@
+# 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_beta1.ebuild,v 1.1 2010/02/13 02:50:34 keri Exp $
+
+inherit elisp-common eutils flag-o-matic java-pkg-opt-2 multilib
+
+MY_PV=${PV/%?/}
+MY_P=${PN}-compiler-${MY_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="http://www.mercury.cs.mu.oz.au/download/files/beta-releases/10.04-beta/mercury-compiler-10.04-beta.tar.gz
+ test? ( http://www.mercury.cs.mu.oz.au/download/files/beta-releases/10.04-beta/mercury-tests-10.04-beta.tar.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+
+IUSE="debug emacs java minimal readline test threads"
+
+DEPEND="!dev-libs/mpatrol
+ !dev-util/mono-debugger
+ readline? ( sys-libs/readline )
+ java? ( >=virtual/jdk-1.5 )"
+
+RDEPEND="${DEPEND}
+ emacs? ( virtual/emacs )"
+
+S="${WORKDIR}"/${MY_P}
+TESTDIR="${WORKDIR}"/${PN}-tests-${MY_PV/_/-}
+
+SITEFILE=50${PN}-gentoo.el
+
+src_unpack() {
+ unpack ${A}
+
+ epatch "${FILESDIR}"/${P}-multilib.patch
+ epatch "${FILESDIR}"/${P}-docs.patch
+ epatch "${FILESDIR}"/${P}-no-reconf.patch
+
+ sed -i -e "s/@libdir@/$(get_libdir)/" \
+ "${S}"/compiler/make.program_target.c \
+ "${S}"/scripts/Mmake.vars.in
+
+ if use test; then
+ epatch "${FILESDIR}"/${P}-tests-workspace.patch
+ fi
+}
+
+src_compile() {
+ strip-flags
+
+ local myconf
+ myconf="--libdir=/usr/$(get_libdir) \
+ --disable-gcc-back-end \
+ --disable-aditi-back-end \
+ --disable-deep-profiler \
+ --disable-dotnet-grades \
+ $(use_enable java java-grade) \
+ $(use_enable debug debug-grades) \
+ $(use_enable threads par-grades) \
+ $(use_enable !minimal most-grades) \
+ $(use_with readline) \
+ PACKAGE_VERSION=${PV}"
+
+ econf \
+ ${myconf} \
+ || die "econf failed"
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ EXTRA_MLFLAGS=--no-strip \
+ || die "emake failed"
+}
+
+src_test() {
+ TEST_GRADE=`scripts/ml --print-grade`
+ TWS="${S}"
+
+ cd "${TESTDIR}"
+ sed -i -e "s:@WORKSPACE@:${TWS}:" WS_FLAGS.ws
+
+ PATH="${TWS}"/scripts:"${TWS}"/util:"${PATH}" \
+ TERM="" \
+ WORKSPACE="${TWS}" \
+ MERCURY_COMPILER="${TWS}"/compiler/mercury_compile \
+ MERCURY_CONFIG_DIR="${TWS}" \
+ MMAKE_DIR="${TWS}"/scripts \
+ MERCURY_SUPPRESS_STACK_TRACE=yes \
+ GRADE=${TEST_GRADE} \
+ MERCURY_ALL_LOCAL_C_INCL_DIRS=" -I${TWS}/boehm_gc \
+ -I${TWS}/boehm_gc/include \
+ -I${TWS}/runtime \
+ -I${TWS}/library \
+ -I${TWS}/mdbcomp \
+ -I${TWS}/browser \
+ -I${TWS}/trace" \
+ mmake || die "mmake test failed"
+}
+
+src_install() {
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \
+ INSTALL_PREFIX="${D}"/usr \
+ INSTALL_MAN_DIR="${D}"/usr/share/man \
+ INSTALL_INFO_DIR="${D}"/usr/share/info \
+ INSTALL_HTML_DIR="${D}"/usr/share/doc/${PF}/html \
+ INSTALL_ELISP_DIR="${D}/${SITELISP}"/${PN} \
+ install || die "make install failed"
+
+ if use emacs; then
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
+ || die "elisp-site-file-install failed"
+ fi
+
+ dodoc \
+ BUGS HISTORY LIMITATIONS NEWS README README.Linux \
+ README.Linux-Alpha README.Linux-m68k README.Linux-PPC \
+ RELEASE_NOTES TODO VERSION WORK_IN_PROGRESS
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}