diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-lang/mercury | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-lang/mercury')
-rw-r--r-- | dev-lang/mercury/Manifest | 18 | ||||
-rw-r--r-- | dev-lang/mercury/files/50mercury-gentoo.el | 5 | ||||
-rw-r--r-- | dev-lang/mercury/mercury-11.01.ebuild | 216 | ||||
-rw-r--r-- | dev-lang/mercury/mercury-11.07.1.ebuild | 216 | ||||
-rw-r--r-- | dev-lang/mercury/mercury-11.07.2.ebuild | 216 | ||||
-rw-r--r-- | dev-lang/mercury/mercury-11.07.ebuild | 216 | ||||
-rw-r--r-- | dev-lang/mercury/mercury-13.05.1.ebuild | 197 | ||||
-rw-r--r-- | dev-lang/mercury/mercury-13.05.2.ebuild | 197 | ||||
-rw-r--r-- | dev-lang/mercury/mercury-13.05.ebuild | 196 | ||||
-rw-r--r-- | dev-lang/mercury/metadata.xml | 11 |
10 files changed, 1488 insertions, 0 deletions
diff --git a/dev-lang/mercury/Manifest b/dev-lang/mercury/Manifest new file mode 100644 index 000000000000..ee92806a6222 --- /dev/null +++ b/dev-lang/mercury/Manifest @@ -0,0 +1,18 @@ +DIST mercury-11.01-gentoo-patchset-1.tar.gz 7129 SHA256 43dbcb63add22b24da7515b7d42d8b4ad119d9923f80dbb29767d756436d0fa4 SHA512 0c6ca4d2705735ea2c60848223cccb68371dfb36ab1bfc124587b21231320e18b1fe287853a392604c2807caa126c422c34d8c6867539adc3f4411ff10a8c6f6 WHIRLPOOL b5c6668ac8b974caebc3a733565e6d3b23ba7b2a8fbe3ef5c0bf3376c14bbe1c7aa24cc11616dcb9e1ff9ab44659485c8156bcb6952ecb807a1ec855aa9ac32b +DIST mercury-11.07-gentoo-patchset-0.tar.gz 6889 SHA256 2fce2c95b6cb8b5819fb576de8ce184293a926c52f120027e3195d14f0552d78 SHA512 adb182f4d020052db715e5beb2da6fa86470414735430393253c14240782f6a94e86d50b181cc8c7a9bf09fad62091ea5d53903bc8ddf09df7a85a5f0de3f631 WHIRLPOOL 908846defe2681086ee5cc93ccc86456696826abc9b2b8cdf80896616df053f8f812fcb45fd7fffb4f0062dc478c1b183b87f3d1276581e3a89feb5b6ef2cb0d +DIST mercury-11.07.1-gentoo-patchset-4.tar.gz 7336 SHA256 477cde26b06650b96accdc32da4bb7edb382b8ad8a2ed3908a985d895070ad4a SHA512 1ae54d05cac374ac02f7368b19ba98567d7c513d471fc98e27f0d794137ff920d42acf7105e6652e6610b4ffec74c3f5b282e81668735a626f8d762d8192d1c4 WHIRLPOOL 529f6e4675b0437dffa83f6cdc5daf4d8c7e9a59e81dc0f6c54cc35be7255fca0ddb6afca4257bc960ded245b50b80cbeaf80c9d2b589fc92564845884f218c5 +DIST mercury-11.07.2-gentoo-patchset-0.tar.gz 7265 SHA256 d400e40ae62c5cb8e777c2409d70eee7f71f231733a95fd6549f82c6c2933500 SHA512 110e0aacd1ef274d9c7154b359267ec0277e680fe2bb9ec4942dfc167c4f02dfef85fbd205120875e485f1b186432157814891ea9f1d0d55f0cdf236b0a80257 WHIRLPOOL 9002362cc04943558399dc4350a9368d12ce6d9717afe42e7c150ad55c8b2fe326697bdea6e457c1b3611d448ecdf7b171219e23a123aec2d0e70f14ab443afa +DIST mercury-13.05-gentoo-patchset-0.tar.gz 5947 SHA256 8af2076b571215e403079fab840bf4a769ff67ec1ebfdf7b92bf203a503acb99 SHA512 0662126b9802fe9cd6156b204dc28b4e02a7d55fc5f88e97717c7aeb764014ed537822c5a2d2a5520a6b78c092d2fe25b603f05e1e6d19821b7b2905aad53d0c WHIRLPOOL 56a10ac2503fe87099f29294d44a58902192c18a95d438908fbb31969050289ecd8461fc3188368309d1693bd89e1380c140e58d165d02bf5d8f10e4ccbf30e5 +DIST mercury-13.05.1-gentoo-patchset-0.tar.gz 6013 SHA256 d9cfe7017f234d361f51e0dad1a0f6cdcbf82bf841c312660ffd76d6cdada71a SHA512 8f0a8cd4bf814c8d6903843b4e264da4708cf352439116766a63d5d68ef1043543d53b5729f38e5fef0272c006913b3e6c839c37f1e3486fc6f8d382b280aaee WHIRLPOOL a89cf3170498af1f3ffbd5d56db216932f9c96109b4f2c1c267b51e3f81f1f9e0fe7e755a8d86e8a0cc7eb6c4487918ea2ae9738377a7dd4d369f328b3f7d208 +DIST mercury-13.05.2-gentoo-patchset-0.tar.gz 5155 SHA256 647fb5931a76b86a003063e7f17f929866bb2f2791c98a444a1e9765e70ab4c4 SHA512 8c7305be8c97eebb2107f9ec9debdb572e19b77dbc2e9b5879387322acf06bb0a0a200583d1f01f892640991817c3f17d7c723825c6c1a94d365415cf1d648c6 WHIRLPOOL ce41a9eb302416125816dc09df87b97daeb39253b6ef686ef7ae783366a15e387390b03d63a5ee582a1ddd0244bd109e9da4c6ebbfaa8ad8ee574c87b286a91f +DIST mercury-compiler-11.01.tar.gz 25122699 SHA256 2d12dc9bfaed46b1b30689b0592177bc871b21cf8852c8326c86371258bb18b0 SHA512 628eb95cc647a3334ed6cc9cdb19256dece544cac34600db2a495815215b494db74b1f196e3c48ba1cbb37b51404158d5a583caa20fd3e53488111927615b666 WHIRLPOOL 6720586514dfa954e8e777986d7b62fd2fb10ce1a309034bdc4e40431762c834cba98e93b129e69ba5a78451cd0f776fe916bce2b15996d1621cab59215481a6 +DIST mercury-compiler-11.07.1.tar.gz 25308185 SHA256 f3f1d4f0fb34567a69aaa9fb6f4ecff52b97a66ab6c8a868c4e284eb61d3dc11 SHA512 c102a1f2c2ed4384919685e3e11ba3b7da0152f6fe8899c2124e9bbb056ab81a5e2fc1dbb07934ca011ed96e7c6af168308c64eb4901db7d247fffd2ff226c4f WHIRLPOOL 6df5a68a9c0adc6d5ae490bd909951d8330db2c4e0bb704ab9be0fe8cdf7177093cd0943256fcbea8d666793d3d53c20b8c703deca43121114d89f1a508f32d5 +DIST mercury-compiler-11.07.2.tar.gz 25311504 SHA256 8afee5732d6d52343fbba8d6b9dd3f87b819673743a408a564eede17956ea659 SHA512 144f496cdfbdb88e15a18b3c295d326ebb1054055c42cb1a5fd634b79797c8dbd46ef5d1731f4c4cb1add02795e9b7d1d72e0426c39e672e208f10068e65df8b WHIRLPOOL a443bad02d714737aa2e1875205915db78bc776cf75f01f98e99efab992a5a542c86772615e9a4066b1143977e354441f07a033ef81a2d8f464226004f5de198 +DIST mercury-compiler-11.07.tar.gz 25298643 SHA256 77940d03834a3967e4505c4a92253c19aaea0fed4650ee94e772078abd6be6a2 SHA512 671bebb67ceca8af0844c2ba0d9db538564d3b324a913141be29c7632adb7a343b93fe771533173d5460ac34d5a69fd18b3ef7f55b26c0d0ee70b7cc2e35f10d WHIRLPOOL 992f5f52292066b775b264401f25b5e8ef246ced9b79c0ec06701f715e22e068ad81a17dea49f62bd72bc9cc0539b2ef7beb9be1401391209e2ab1e3876d0bfc +DIST mercury-srcdist-13.05.1.tar.gz 54558577 SHA256 a90de00fc5905a8421675b04dc3c9d5eda54bedaf8b2ebcefae4de551fbcfd2c SHA512 784069af3ba470e9618e5b7917873e8ad7f4e9dc27eb54afa74eb6d6e659dcfab7007ae93163937412f9eb1b997a327d4378dcd868810c08880d4fa4542dfade WHIRLPOOL ec7281a6e01523b296dcfce595189cb96ad693c9b36ab60cbc6b61672333f5c8d7d9def10cc3c5bba876fddf0eefea3e9c22c1b98ee577d1b6d6aab6d1267915 +DIST mercury-srcdist-13.05.2.tar.gz 53847394 SHA256 8491cf419b996a315bf8664154dd91aed940274ded98e3aded733dbe1939f95f SHA512 2298804d3a04bca6be4bd3046643c7c0d0b22c447423017869cd9bf3a4fb6ec9fd29b5d8e1a386d5d52d07be5cad73608f1fcacf46732a7add93a01dcd199c08 WHIRLPOOL 2a81bebfd4b97b9bb1b0e174025e6050149c8e5f812cd97cbdc41818faa18c15f9494925f1f320682087cc45264bc00db07bef6862afef12317f77cc169a7f86 +DIST mercury-srcdist-13.05.tar.gz 54533409 SHA256 71f1f97484eaecf2c2f91f6731e23afc5cee966e149b61a7525b2bd9a2712d55 SHA512 d76fd3a0c487b2c65168b19ec6a5ea6b792c96692e029afe0589f93132422fc39e0aec856ae02e676cc30dc83780f9c4d4e0ea5f71681442279b900146b58c47 WHIRLPOOL b2cc0f1b074d980701c6d364f30f8bb2dd2556cbc23dca5a982b7c16b71c6834d7c81ea76bfcea25e369f32d606698b77eea168e3b25d4850f924dfa4f6929f4 +DIST mercury-tests-11.01.tar.gz 1351134 SHA256 862b70a589eb2d36c9fd82dbd2e0490dc4556f6edff604a54dfd6fc0ad6cccad SHA512 7cd0c2a5f3ef2b05ea32ea8867f788c583a9da96b6e3b4ed9c2ec5705fc7384c0811da782ed50b6d7f60963680036e116684b5bcc3f5f72cf6f0b319480ad997 WHIRLPOOL 298a898b970da20f64530cf736b5f901cc61ef028117f2434135b9efc77223e120a71e97373d494cdb89b422ef9bbf02ef51db4be3c383ffd6facaabb2018c6a +DIST mercury-tests-11.07.1.tar.gz 1648437 SHA256 01558a6ddd28d2f832d88da8bbf38fec542d091fc53b5adf92fac5e2564c2057 SHA512 1b8f3749091e6a3cd8d3f07ca7ff87c20d9c90761c6dbf35253f68f4cb4ccb42310d66ebc98742508a4e1f6fb4d6497e7e34f10b2601ffec73694702f1b363b5 WHIRLPOOL 66cd530de280d34a037cc191818abb6f11bf4ea8f6f3143629883ff2d885350bdd8841215b6076d5b6ea2102d6ef913a9324d997fd287af12eed0cbe708692b2 +DIST mercury-tests-11.07.2.tar.gz 1573648 SHA256 039b5ecf25412b7f867b4b41aa1e27fa8e381533b5641fe5520cca8ba782d78c SHA512 247fd2521257d1eed8d5a00efdaf85c1b30d5ec430ed09b605bb7596295775ed1b62c1274caca6fba66b28b51c92380f42f003bffab4054bfd755fbaa2c16888 WHIRLPOOL 5213e51dc95a35345e5005c03741bf90f35106f4974f7e25e9277e945a3b88411a561769cc6be80f84e9ac0b7cf7b5c8f32b17d9c22785991995fbe3fdf53002 +DIST mercury-tests-11.07.tar.gz 1647435 SHA256 9206c7ffaace2357367bb6f8c3efe9aeb05ccac6a02946f6579c6001f953501b SHA512 889c6dc4810fbe9cb55b32b0676b7f15ce0b92d1fd8b605e9576e6d69bcb7f02fefc40a504a47b49b3c3afd6abe57b405c81aac21a9ac7adb594dfcb4f740c85 WHIRLPOOL 096a54bb3d28a177ae7b31b4fbb9ff4b77abb434e8fcd9174aec486d8a0d2bceff4f5d4e81d0b8d4fbeed7fd9dbce1400ec48dcd677b6bf1ed561f0c41ce4cae diff --git a/dev-lang/mercury/files/50mercury-gentoo.el b/dev-lang/mercury/files/50mercury-gentoo.el new file mode 100644 index 000000000000..2ab3ddbc59f1 --- /dev/null +++ b/dev-lang/mercury/files/50mercury-gentoo.el @@ -0,0 +1,5 @@ + +;;; mercury site-lisp configuration + +(add-to-list 'load-path "@SITELISP@") +(autoload 'mdb "gud" "Invoke the Mercury debugger" t) diff --git a/dev-lang/mercury/mercury-11.01.ebuild b/dev-lang/mercury/mercury-11.01.ebuild new file mode 100644 index 000000000000..bb7c875926c4 --- /dev/null +++ b/dev-lang/mercury/mercury-11.01.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib + +PATCHSET_VER="1" +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="http://www.mercury.csse.unimelb.edu.au/download/files/${MY_P}.tar.gz + mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz + test? ( http://www.mercury.csse.unimelb.edu.au/download/files/mercury-tests-${PV}.tar.gz )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" + +IUSE="debug emacs erlang examples java minimal readline test threads" + +DEPEND="!dev-libs/mpatrol + !dev-util/mono-debugger + readline? ( sys-libs/readline ) + erlang? ( dev-lang/erlang ) + java? ( >=virtual/jdk-1.5 )" + +RDEPEND="${DEPEND} + emacs? ( virtual/emacs )" + +S="${WORKDIR}"/${MY_P} +TESTDIR="${WORKDIR}"/${PN}-tests-${PV} + +SITEFILE=50${PN}-gentoo.el + +src_prepare() { + cd "${WORKDIR}" + EPATCH_FORCE=yes + EPATCH_SUFFIX=patch + epatch "${WORKDIR}"/${PV} + + sed -i -e "s/@libdir@/$(get_libdir)/" \ + "${S}"/scripts/Mmake.vars.in \ + || die "sed libdir failed" + + if use test; then + epatch "${WORKDIR}"/${PV}-tests + fi + + cd "${S}" + eautoconf +} + +src_configure() { + strip-flags + + local myconf + myconf="--libdir=/usr/$(get_libdir) \ + --disable-gcc-back-end \ + --disable-deep-profiler \ + --disable-dotnet-grades \ + $(use_enable erlang erlang-grade) \ + $(use_enable java java-grade) \ + $(use_enable debug debug-grades) \ + $(use_enable threads par-grades) \ + $(use_enable !minimal most-grades) \ + $(use_with readline)" + + econf ${myconf} +} + +src_compile() { + # 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 \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + 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 + + sed -i -e "s/@libdir@/$(get_libdir)/" \ + "${S}"/compiler/file_util.m \ + "${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 \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_LD_LIBFLAGS="${LDFLAGS}" \ + 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 \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_LD_LIBFLAGS="${LDFLAGS}" \ + MERCURY_COMPILER="${S}"/compiler/mercury_compile \ + default_grade || die "emake default_grade failed" +} + +src_test() { + TEST_GRADE=`scripts/ml --print-grade` + 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 \ + || die "sed WORKSPACE failed" + + # Mercury tests must be run in C locale since Mercury output is + # compared to hard-coded warnings/errors + LC_ALL="C" \ + PATH="${TWS}"/scripts:"${TWS}"/util:"${TWS}"/slice:"${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} \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_LD_LIBFLAGS="${LDFLAGS}" \ + 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 || die + + if use erlang; then + dodoc README.Erlang || die + fi + + if use java; then + dodoc README.Java || die + fi + + if use examples; then + insinto /usr/share/doc/${PF}/samples + doins samples/{*.m,README,Mmakefile} || die + doins -r samples/c_interface \ + samples/diff \ + samples/muz \ + samples/rot13 \ + samples/solutions \ + samples/solver_types || die + + if use java; then + doins -r samples/java_interface || die + fi + + rm -rf $(find "${D}"/usr/share/doc/${PF}/samples \ + -name CVS -o -name .cvsignore) + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-lang/mercury/mercury-11.07.1.ebuild b/dev-lang/mercury/mercury-11.07.1.ebuild new file mode 100644 index 000000000000..fbc3732e2913 --- /dev/null +++ b/dev-lang/mercury/mercury-11.07.1.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib + +PATCHSET_VER="4" +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="http://www.mercury.csse.unimelb.edu.au/download/files/${MY_P}.tar.gz + mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz + test? ( http://www.mercury.csse.unimelb.edu.au/download/files/mercury-tests-${PV}.tar.gz )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="debug emacs erlang examples java minimal readline test threads" + +DEPEND="!dev-libs/mpatrol + !dev-util/mono-debugger + readline? ( sys-libs/readline ) + erlang? ( dev-lang/erlang ) + java? ( >=virtual/jdk-1.5 )" + +RDEPEND="${DEPEND} + emacs? ( virtual/emacs )" + +S="${WORKDIR}"/${MY_P} +TESTDIR="${WORKDIR}"/${PN}-tests-${PV} + +SITEFILE=50${PN}-gentoo.el + +src_prepare() { + cd "${WORKDIR}" + EPATCH_FORCE=yes + EPATCH_SUFFIX=patch + epatch "${WORKDIR}"/${PV} + + sed -i -e "s/@libdir@/$(get_libdir)/" \ + "${S}"/scripts/Mmake.vars.in \ + || die "sed libdir failed" + + if use test; then + epatch "${WORKDIR}"/${PV}-tests + fi + + cd "${S}" + eautoconf +} + +src_configure() { + strip-flags + + local myconf + myconf="--libdir=/usr/$(get_libdir) \ + --disable-gcc-back-end \ + --disable-deep-profiler \ + --disable-dotnet-grades \ + $(use_enable erlang erlang-grade) \ + $(use_enable java java-grade) \ + $(use_enable debug debug-grades) \ + $(use_enable threads par-grades) \ + $(use_enable !minimal most-grades) \ + $(use_with readline)" + + econf ${myconf} +} + +src_compile() { + # 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 \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + 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 + + sed -i -e "s/@libdir@/$(get_libdir)/" \ + "${S}"/compiler/file_util.m \ + "${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 \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_LD_LIBFLAGS="${LDFLAGS}" \ + 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 \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_LD_LIBFLAGS="${LDFLAGS}" \ + MERCURY_COMPILER="${S}"/compiler/mercury_compile \ + default_grade || die "emake default_grade failed" +} + +src_test() { + TEST_GRADE=`scripts/ml --print-grade` + 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 \ + || die "sed WORKSPACE failed" + + # Mercury tests must be run in C locale since Mercury output is + # compared to hard-coded warnings/errors + LC_ALL="C" \ + PATH="${TWS}"/scripts:"${TWS}"/util:"${TWS}"/slice:"${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} \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_LD_LIBFLAGS="${LDFLAGS}" \ + 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 || die + + if use erlang; then + dodoc README.Erlang || die + fi + + if use java; then + dodoc README.Java || die + fi + + if use examples; then + insinto /usr/share/doc/${PF}/samples + doins samples/{*.m,README,Mmakefile} || die + doins -r samples/c_interface \ + samples/diff \ + samples/muz \ + samples/rot13 \ + samples/solutions \ + samples/solver_types || die + + if use java; then + doins -r samples/java_interface || die + fi + + rm -rf $(find "${D}"/usr/share/doc/${PF}/samples \ + -name CVS -o -name .cvsignore) + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-lang/mercury/mercury-11.07.2.ebuild b/dev-lang/mercury/mercury-11.07.2.ebuild new file mode 100644 index 000000000000..9d8b6487a7e2 --- /dev/null +++ b/dev-lang/mercury/mercury-11.07.2.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib + +PATCHSET_VER="0" +MY_P=${PN}-compiler-${PV} + +DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language" +HOMEPAGE="http://www.mercurylang.org/index.html" +SRC_URI="http://dl.mercurylang.org/release/${MY_P}.tar.gz + mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz + test? ( mirror://gentoo/mercury-tests-${PV}.tar.gz )" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="debug emacs erlang examples java minimal readline test threads" + +DEPEND="!dev-libs/mpatrol + !dev-util/mono-debugger + readline? ( sys-libs/readline ) + erlang? ( dev-lang/erlang ) + java? ( >=virtual/jdk-1.5 )" + +RDEPEND="${DEPEND} + emacs? ( virtual/emacs )" + +S="${WORKDIR}"/${MY_P} +TESTDIR="${WORKDIR}"/${PN}-tests-${PV} + +SITEFILE=50${PN}-gentoo.el + +src_prepare() { + cd "${WORKDIR}" + EPATCH_FORCE=yes + EPATCH_SUFFIX=patch + epatch "${WORKDIR}"/${PV} + + sed -i -e "s/@libdir@/$(get_libdir)/" \ + "${S}"/scripts/Mmake.vars.in \ + || die "sed libdir failed" + + if use test; then + epatch "${WORKDIR}"/${PV}-tests + fi + + cd "${S}" + eautoconf +} + +src_configure() { + strip-flags + + local myconf + myconf="--libdir=/usr/$(get_libdir) \ + --disable-gcc-back-end \ + --disable-deep-profiler \ + --disable-dotnet-grades \ + $(use_enable erlang erlang-grade) \ + $(use_enable java java-grade) \ + $(use_enable debug debug-grades) \ + $(use_enable threads par-grades) \ + $(use_enable !minimal most-grades) \ + $(use_with readline)" + + econf ${myconf} +} + +src_compile() { + # 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 \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + 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 + + sed -i -e "s/@libdir@/$(get_libdir)/" \ + "${S}"/compiler/file_util.m \ + "${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 \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_LD_LIBFLAGS="${LDFLAGS}" \ + 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 \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_LD_LIBFLAGS="${LDFLAGS}" \ + MERCURY_COMPILER="${S}"/compiler/mercury_compile \ + default_grade || die "emake default_grade failed" +} + +src_test() { + TEST_GRADE=`scripts/ml --print-grade` + 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 \ + || die "sed WORKSPACE failed" + + # Mercury tests must be run in C locale since Mercury output is + # compared to hard-coded warnings/errors + LC_ALL="C" \ + PATH="${TWS}"/scripts:"${TWS}"/util:"${TWS}"/slice:"${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} \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_LD_LIBFLAGS="${LDFLAGS}" \ + 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 || die + + if use erlang; then + dodoc README.Erlang || die + fi + + if use java; then + dodoc README.Java || die + fi + + if use examples; then + insinto /usr/share/doc/${PF}/samples + doins samples/{*.m,README,Mmakefile} || die + doins -r samples/c_interface \ + samples/diff \ + samples/muz \ + samples/rot13 \ + samples/solutions \ + samples/solver_types || die + + if use java; then + doins -r samples/java_interface || die + fi + + rm -rf $(find "${D}"/usr/share/doc/${PF}/samples \ + -name CVS -o -name .cvsignore) + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-lang/mercury/mercury-11.07.ebuild b/dev-lang/mercury/mercury-11.07.ebuild new file mode 100644 index 000000000000..2792e67fc652 --- /dev/null +++ b/dev-lang/mercury/mercury-11.07.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib + +PATCHSET_VER="0" +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="http://www.mercury.csse.unimelb.edu.au/download/files/${MY_P}.tar.gz + mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz + test? ( http://www.mercury.csse.unimelb.edu.au/download/files/mercury-tests-${PV}.tar.gz )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="debug emacs erlang examples java minimal readline test threads" + +DEPEND="!dev-libs/mpatrol + !dev-util/mono-debugger + readline? ( sys-libs/readline ) + erlang? ( dev-lang/erlang ) + java? ( >=virtual/jdk-1.5 )" + +RDEPEND="${DEPEND} + emacs? ( virtual/emacs )" + +S="${WORKDIR}"/${MY_P} +TESTDIR="${WORKDIR}"/${PN}-tests-${PV} + +SITEFILE=50${PN}-gentoo.el + +src_prepare() { + cd "${WORKDIR}" + EPATCH_FORCE=yes + EPATCH_SUFFIX=patch + epatch "${WORKDIR}"/${PV} + + sed -i -e "s/@libdir@/$(get_libdir)/" \ + "${S}"/scripts/Mmake.vars.in \ + || die "sed libdir failed" + + if use test; then + epatch "${WORKDIR}"/${PV}-tests + fi + + cd "${S}" + eautoconf +} + +src_configure() { + strip-flags + + local myconf + myconf="--libdir=/usr/$(get_libdir) \ + --disable-gcc-back-end \ + --disable-deep-profiler \ + --disable-dotnet-grades \ + $(use_enable erlang erlang-grade) \ + $(use_enable java java-grade) \ + $(use_enable debug debug-grades) \ + $(use_enable threads par-grades) \ + $(use_enable !minimal most-grades) \ + $(use_with readline)" + + econf ${myconf} +} + +src_compile() { + # 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 \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + 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 + + sed -i -e "s/@libdir@/$(get_libdir)/" \ + "${S}"/compiler/file_util.m \ + "${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 \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_LD_LIBFLAGS="${LDFLAGS}" \ + 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 \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_LD_LIBFLAGS="${LDFLAGS}" \ + MERCURY_COMPILER="${S}"/compiler/mercury_compile \ + default_grade || die "emake default_grade failed" +} + +src_test() { + TEST_GRADE=`scripts/ml --print-grade` + 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 \ + || die "sed WORKSPACE failed" + + # Mercury tests must be run in C locale since Mercury output is + # compared to hard-coded warnings/errors + LC_ALL="C" \ + PATH="${TWS}"/scripts:"${TWS}"/util:"${TWS}"/slice:"${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} \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_LD_LIBFLAGS="${LDFLAGS}" \ + 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 || die + + if use erlang; then + dodoc README.Erlang || die + fi + + if use java; then + dodoc README.Java || die + fi + + if use examples; then + insinto /usr/share/doc/${PF}/samples + doins samples/{*.m,README,Mmakefile} || die + doins -r samples/c_interface \ + samples/diff \ + samples/muz \ + samples/rot13 \ + samples/solutions \ + samples/solver_types || die + + if use java; then + doins -r samples/java_interface || die + fi + + rm -rf $(find "${D}"/usr/share/doc/${PF}/samples \ + -name CVS -o -name .cvsignore) + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-lang/mercury/mercury-13.05.1.ebuild b/dev-lang/mercury/mercury-13.05.1.ebuild new file mode 100644 index 000000000000..c0fcf9dd7b20 --- /dev/null +++ b/dev-lang/mercury/mercury-13.05.1.ebuild @@ -0,0 +1,197 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib + +PATCHSET_VER="0" +MY_P=${PN}-srcdist-${PV} + +DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language" +HOMEPAGE="http://www.mercurylang.org/index.html" +SRC_URI="http://dl.mercurylang.org/release/${MY_P}.tar.gz + mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="debug emacs erlang examples java minimal readline threads" + +DEPEND="!dev-libs/mpatrol + !dev-util/mono-debugger + readline? ( sys-libs/readline ) + erlang? ( dev-lang/erlang ) + java? ( >=virtual/jdk-1.5 )" + +RDEPEND="${DEPEND} + emacs? ( virtual/emacs )" + +S="${WORKDIR}"/${MY_P} + +SITEFILE=50${PN}-gentoo.el + +src_prepare() { + cd "${WORKDIR}" + EPATCH_FORCE=yes + EPATCH_SUFFIX=patch + epatch "${WORKDIR}"/${PV} + + sed -i -e "s/@libdir@/$(get_libdir)/" \ + "${S}"/scripts/Mmake.vars.in \ + || die "sed libdir failed" + + cd "${S}" + eautoconf +} + +src_configure() { + strip-flags + + local myconf + myconf="--libdir=/usr/$(get_libdir) \ + --disable-deep-profiler \ + --disable-dotnet-grades \ + --without-hwloc \ + $(use_enable erlang erlang-grade) \ + $(use_enable java java-grade) \ + $(use_enable debug debug-grades) \ + $(use_enable threads par-grades) \ + $(use_enable !minimal most-grades) \ + $(use_with readline)" + + econf ${myconf} +} + +src_compile() { + # Build Mercury using base llds grade + emake \ + PARALLEL=${MAKEOPTS} \ + MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \ + EXTRA_LDFLAGS='${LDFLAGS}' \ + 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 + + sed -i -e "s/@libdir@/$(get_libdir)/" \ + "${S}"/compiler/file_util.m \ + "${S}"/compiler/make.program_target.m \ + || die "sed libdir failed" + + # Rebuild Mercury compiler using the just built mercury_compiler + emake \ + PARALLEL=${MAKEOPTS} \ + MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \ + EXTRA_LDFLAGS='${LDFLAGS}' \ + EXTRA_LD_LIBFLAGS='${LDFLAGS}'" \ + 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} \ + MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \ + EXTRA_LDFLAGS='${LDFLAGS}' \ + EXTRA_LD_LIBFLAGS='${LDFLAGS}'" \ + MERCURY_COMPILER="${S}"/compiler/mercury_compile \ + default_grade || die "emake default_grade failed" +} + +src_test() { + TEST_GRADE=`scripts/ml --print-grade` + if [ -d "${S}"/install_grade_dir.${TEST_GRADE} ] ; then + TWS="${S}"/install_grade_dir.${TEST_GRADE} + cp runtime/mer_rt.init "${TWS}"/runtime/ + cp mdbcomp/mer_mdbcomp.init "${TWS}"/mdbcomp/ + cp browser/mer_browser.init "${TWS}"/browser/ + else + TWS="${S}" + fi + + cd "${S}"/tests + sed -e "s:@WORKSPACE@:${TWS}:" < WS_FLAGS.ws > WS_FLAGS \ + || die "sed WORKSPACE failed" + + # Mercury tests must be run in C locale since Mercury output is + # compared to hard-coded warnings/errors + LC_ALL="C" \ + PATH="${TWS}"/scripts:"${TWS}"/util:"${S}"/slice:"${PATH}" \ + TERM="" \ + WORKSPACE="${TWS}" \ + WORKSPACE_FLAGS=yes \ + MERCURY_COMPILER="${TWS}"/compiler/mercury_compile \ + MMAKE_DIR="${TWS}"/scripts \ + MERCURY_SUPPRESS_STACK_TRACE=yes \ + GRADE=${TEST_GRADE} \ + MERCURY_ALL_LOCAL_C_INCL_DIRS=" -I${TWS}/boehm_gc/include \ + -I${TWS}/runtime \ + -I${TWS}/library" \ + mmake || die "mmake test failed" +} + +src_install() { + emake \ + PARALLEL=${MAKEOPTS} \ + MMAKEFLAGS="EXTRA_LDFLAGS='${LDFLAGS}' \ + EXTRA_LD_LIBFLAGS='${LDFLAGS}'" \ + 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 "emake 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 || die + + if use erlang; then + dodoc README.Erlang || die + fi + + if use java; then + dodoc README.Java || die + fi + + if use examples; then + insinto /usr/share/doc/${PF}/samples + doins samples/{*.m,README,Mmakefile} || die + doins -r samples/c_interface \ + samples/diff \ + samples/muz \ + samples/rot13 \ + samples/solutions \ + samples/solver_types || die + + if use java; then + doins -r samples/java_interface || die + fi + + rm -rf $(find "${D}"/usr/share/doc/${PF}/samples \ + -name CVS -o -name .cvsignore) + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-lang/mercury/mercury-13.05.2.ebuild b/dev-lang/mercury/mercury-13.05.2.ebuild new file mode 100644 index 000000000000..c82ce14cb01c --- /dev/null +++ b/dev-lang/mercury/mercury-13.05.2.ebuild @@ -0,0 +1,197 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib + +PATCHSET_VER="0" +MY_P=${PN}-srcdist-${PV} + +DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language" +HOMEPAGE="http://www.mercurylang.org/index.html" +SRC_URI="http://dl.mercurylang.org/release/${MY_P}.tar.gz + mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="debug emacs erlang examples java minimal readline threads" + +DEPEND="!dev-libs/mpatrol + !dev-util/mono-debugger + readline? ( sys-libs/readline ) + erlang? ( dev-lang/erlang ) + java? ( >=virtual/jdk-1.5 )" + +RDEPEND="${DEPEND} + emacs? ( virtual/emacs )" + +S="${WORKDIR}"/${MY_P} + +SITEFILE=50${PN}-gentoo.el + +src_prepare() { + cd "${WORKDIR}" + EPATCH_FORCE=yes + EPATCH_SUFFIX=patch + epatch "${WORKDIR}"/${PV} + + sed -i -e "s/@libdir@/$(get_libdir)/" \ + "${S}"/scripts/Mmake.vars.in \ + || die "sed libdir failed" + + cd "${S}" + eautoconf +} + +src_configure() { + strip-flags + + local myconf + myconf="--libdir=/usr/$(get_libdir) \ + --disable-deep-profiler \ + --disable-dotnet-grades \ + --without-hwloc \ + $(use_enable erlang erlang-grade) \ + $(use_enable java java-grade) \ + $(use_enable debug debug-grades) \ + $(use_enable threads par-grades) \ + $(use_enable !minimal most-grades) \ + $(use_with readline)" + + econf ${myconf} +} + +src_compile() { + # Build Mercury using base llds grade + emake \ + PARALLEL=${MAKEOPTS} \ + MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \ + EXTRA_LDFLAGS='${LDFLAGS}' \ + 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 + + sed -i -e "s/@libdir@/$(get_libdir)/" \ + "${S}"/compiler/file_util.m \ + "${S}"/compiler/make.program_target.m \ + || die "sed libdir failed" + + # Rebuild Mercury compiler using the just built mercury_compiler + emake \ + PARALLEL=${MAKEOPTS} \ + MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \ + EXTRA_LDFLAGS='${LDFLAGS}' \ + EXTRA_LD_LIBFLAGS='${LDFLAGS}'" \ + 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} \ + MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \ + EXTRA_LDFLAGS='${LDFLAGS}' \ + EXTRA_LD_LIBFLAGS='${LDFLAGS}'" \ + MERCURY_COMPILER="${S}"/compiler/mercury_compile \ + default_grade || die "emake default_grade failed" +} + +src_test() { + TEST_GRADE=`scripts/ml --print-grade` + if [ -d "${S}"/install_grade_dir.${TEST_GRADE} ] ; then + TWS="${S}"/install_grade_dir.${TEST_GRADE} + cp runtime/mer_rt.init "${TWS}"/runtime/ + cp mdbcomp/mer_mdbcomp.init "${TWS}"/mdbcomp/ + cp browser/mer_browser.init "${TWS}"/browser/ + else + TWS="${S}" + fi + + cd "${S}"/tests + sed -e "s:@WORKSPACE@:${TWS}:" < WS_FLAGS.ws > WS_FLAGS \ + || die "sed WORKSPACE failed" + + # Mercury tests must be run in C locale since Mercury output is + # compared to hard-coded warnings/errors + LC_ALL="C" \ + PATH="${TWS}"/scripts:"${TWS}"/util:"${S}"/slice:"${PATH}" \ + TERM="" \ + WORKSPACE="${TWS}" \ + WORKSPACE_FLAGS=yes \ + MERCURY_COMPILER="${TWS}"/compiler/mercury_compile \ + MMAKE_DIR="${TWS}"/scripts \ + MERCURY_SUPPRESS_STACK_TRACE=yes \ + GRADE=${TEST_GRADE} \ + MERCURY_ALL_LOCAL_C_INCL_DIRS=" -I${TWS}/boehm_gc/include \ + -I${TWS}/runtime \ + -I${TWS}/library" \ + mmake || die "mmake test failed" +} + +src_install() { + emake \ + PARALLEL=${MAKEOPTS} \ + MMAKEFLAGS="EXTRA_LDFLAGS='${LDFLAGS}' \ + EXTRA_LD_LIBFLAGS='${LDFLAGS}'" \ + 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 "emake 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 || die + + if use erlang; then + dodoc README.Erlang || die + fi + + if use java; then + dodoc README.Java || die + fi + + if use examples; then + insinto /usr/share/doc/${PF}/samples + doins samples/{*.m,README,Mmakefile} || die + doins -r samples/c_interface \ + samples/diff \ + samples/muz \ + samples/rot13 \ + samples/solutions \ + samples/solver_types || die + + if use java; then + doins -r samples/java_interface || die + fi + + rm -rf $(find "${D}"/usr/share/doc/${PF}/samples \ + -name CVS -o -name .cvsignore) + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-lang/mercury/mercury-13.05.ebuild b/dev-lang/mercury/mercury-13.05.ebuild new file mode 100644 index 000000000000..3092ceb62089 --- /dev/null +++ b/dev-lang/mercury/mercury-13.05.ebuild @@ -0,0 +1,196 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib + +PATCHSET_VER="0" +MY_P=${PN}-srcdist-${PV} + +DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language" +HOMEPAGE="http://www.mercurylang.org/index.html" +SRC_URI="http://dl.mercurylang.org/release/${MY_P}.tar.gz + mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="debug emacs erlang examples java minimal readline threads" + +DEPEND="!dev-libs/mpatrol + !dev-util/mono-debugger + readline? ( sys-libs/readline ) + erlang? ( dev-lang/erlang ) + java? ( >=virtual/jdk-1.5 )" + +RDEPEND="${DEPEND} + emacs? ( virtual/emacs )" + +S="${WORKDIR}"/${MY_P} + +SITEFILE=50${PN}-gentoo.el + +src_prepare() { + cd "${WORKDIR}" + EPATCH_FORCE=yes + EPATCH_SUFFIX=patch + epatch "${WORKDIR}"/${PV} + + sed -i -e "s/@libdir@/$(get_libdir)/" \ + "${S}"/scripts/Mmake.vars.in \ + || die "sed libdir failed" + + cd "${S}" + eautoconf +} + +src_configure() { + strip-flags + + local myconf + myconf="--libdir=/usr/$(get_libdir) \ + --disable-deep-profiler \ + --disable-dotnet-grades \ + $(use_enable erlang erlang-grade) \ + $(use_enable java java-grade) \ + $(use_enable debug debug-grades) \ + $(use_enable threads par-grades) \ + $(use_enable !minimal most-grades) \ + $(use_with readline)" + + econf ${myconf} +} + +src_compile() { + # Build Mercury using base llds grade + emake \ + PARALLEL=${MAKEOPTS} \ + EXTRA_MLFLAGS=--no-strip \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + 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 + + sed -i -e "s/@libdir@/$(get_libdir)/" \ + "${S}"/compiler/file_util.m \ + "${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 \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_LD_LIBFLAGS="${LDFLAGS}" \ + 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 \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_LD_LIBFLAGS="${LDFLAGS}" \ + MERCURY_COMPILER="${S}"/compiler/mercury_compile \ + default_grade || die "emake default_grade failed" +} + +src_test() { + TEST_GRADE=`scripts/ml --print-grade` + if [ -d "${S}"/install_grade_dir.${TEST_GRADE} ] ; then + TWS="${S}"/install_grade_dir.${TEST_GRADE} + cp runtime/mer_rt.init "${TWS}"/runtime/ + cp mdbcomp/mer_mdbcomp.init "${TWS}"/mdbcomp/ + cp browser/mer_browser.init "${TWS}"/browser/ + else + TWS="${S}" + fi + + cd "${S}"/tests + sed -e "s:@WORKSPACE@:${TWS}:" < WS_FLAGS.ws > WS_FLAGS \ + || die "sed WORKSPACE failed" + + # Mercury tests must be run in C locale since Mercury output is + # compared to hard-coded warnings/errors + LC_ALL="C" \ + PATH="${TWS}"/scripts:"${TWS}"/util:"${S}"/slice:"${PATH}" \ + TERM="" \ + WORKSPACE="${TWS}" \ + WORKSPACE_FLAGS=yes \ + MERCURY_COMPILER="${TWS}"/compiler/mercury_compile \ + MMAKE_DIR="${TWS}"/scripts \ + MERCURY_SUPPRESS_STACK_TRACE=yes \ + GRADE=${TEST_GRADE} \ + MERCURY_ALL_LOCAL_C_INCL_DIRS=" -I${TWS}/boehm_gc/include \ + -I${TWS}/runtime \ + -I${TWS}/library" \ + mmake || die "mmake test failed" +} + +src_install() { + emake \ + PARALLEL=${MAKEOPTS} \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_LD_LIBFLAGS="${LDFLAGS}" \ + 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 || die + + if use erlang; then + dodoc README.Erlang || die + fi + + if use java; then + dodoc README.Java || die + fi + + if use examples; then + insinto /usr/share/doc/${PF}/samples + doins samples/{*.m,README,Mmakefile} || die + doins -r samples/c_interface \ + samples/diff \ + samples/muz \ + samples/rot13 \ + samples/solutions \ + samples/solver_types || die + + if use java; then + doins -r samples/java_interface || die + fi + + rm -rf $(find "${D}"/usr/share/doc/${PF}/samples \ + -name CVS -o -name .cvsignore) + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-lang/mercury/metadata.xml b/dev-lang/mercury/metadata.xml new file mode 100644 index 000000000000..1af61abf4524 --- /dev/null +++ b/dev-lang/mercury/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>keri@gentoo.org</email> + <name>Keri Harris</name> +</maintainer> +<use> + <flag name='erlang'>Support Mercury Erlang grade</flag> +</use> +</pkgmetadata> |