diff options
author | Keri Harris <keri@gentoo.org> | 2017-09-26 19:26:55 +0200 |
---|---|---|
committer | Keri Harris <keri@gentoo.org> | 2017-09-26 19:26:55 +0200 |
commit | 31ff53a17e4106d5b26287d047fd077f7ccbef7d (patch) | |
tree | 7a2e82de8b3709af1c743b10a6eef3a5a61735ae /dev-lang/mercury | |
parent | dev-perl/Starlet: Fix compile failure without '.' in @INC (diff) | |
download | gentoo-31ff53a17e4106d5b26287d047fd077f7ccbef7d.tar.gz gentoo-31ff53a17e4106d5b26287d047fd077f7ccbef7d.tar.bz2 gentoo-31ff53a17e4106d5b26287d047fd077f7ccbef7d.zip |
dev-lang/mercury: version bump
Package-Manager: Portage-2.3.8, Repoman-2.3.1
Diffstat (limited to 'dev-lang/mercury')
-rw-r--r-- | dev-lang/mercury/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/mercury/mercury-14.01.ebuild | 202 |
2 files changed, 204 insertions, 0 deletions
diff --git a/dev-lang/mercury/Manifest b/dev-lang/mercury/Manifest index 3d88bd891106..4ac655aaa956 100644 --- a/dev-lang/mercury/Manifest +++ b/dev-lang/mercury/Manifest @@ -1,2 +1,4 @@ DIST mercury-13.05.2-gentoo-patchset-0.tar.gz 5155 SHA256 647fb5931a76b86a003063e7f17f929866bb2f2791c98a444a1e9765e70ab4c4 SHA512 8c7305be8c97eebb2107f9ec9debdb572e19b77dbc2e9b5879387322acf06bb0a0a200583d1f01f892640991817c3f17d7c723825c6c1a94d365415cf1d648c6 WHIRLPOOL ce41a9eb302416125816dc09df87b97daeb39253b6ef686ef7ae783366a15e387390b03d63a5ee582a1ddd0244bd109e9da4c6ebbfaa8ad8ee574c87b286a91f +DIST mercury-14.01-gentoo-patchset-0.tar.gz 5728 SHA256 43fc8145e784b9e09561fd2b7268cfd37151b134203785b9256b4b7fd87e3d13 SHA512 f1e375ac192e478a82863aa7b8e28c1044a490c41bb63f7842b16b12b7cfa9c85938eacad4c3eacf348aafd42dfaa0dea5324b734d0d2a7454e3e9334369658e WHIRLPOOL eaad62d89285404518e3dca7f98065eea5aaa2f8b46d8ff0f01a0a6b6f886db51800faab81b4e1cd89cd61b771d65562a75f28c399aef053e730d7975ac8f8b6 DIST mercury-srcdist-13.05.2.tar.gz 53847394 SHA256 8491cf419b996a315bf8664154dd91aed940274ded98e3aded733dbe1939f95f SHA512 2298804d3a04bca6be4bd3046643c7c0d0b22c447423017869cd9bf3a4fb6ec9fd29b5d8e1a386d5d52d07be5cad73608f1fcacf46732a7add93a01dcd199c08 WHIRLPOOL 2a81bebfd4b97b9bb1b0e174025e6050149c8e5f812cd97cbdc41818faa18c15f9494925f1f320682087cc45264bc00db07bef6862afef12317f77cc169a7f86 +DIST mercury-srcdist-14.01.tar.gz 52683989 SHA256 4446b7b4eafd35540495ef90ce93b71cb88efa2d744628aee80f76a694aefcc1 SHA512 77f61df64fc150e08f191860f285b97d11a71a52eabc95f660b3c90d88f8ee71d1227f7ab4b8be78be9d4aa3d62a260a874020023e4795da4cfd2e6fefa9965f WHIRLPOOL a7123063590e39ae15222eb59a2c3681ae37bea211967c857eb8725090d342f0aba7a55446529f8608afb9895746581943527b1b3c313c5cbb96f638a3377404 diff --git a/dev-lang/mercury/mercury-14.01.ebuild b/dev-lang/mercury/mercury-14.01.ebuild new file mode 100644 index 000000000000..9dd9a6bf182c --- /dev/null +++ b/dev-lang/mercury/mercury-14.01.ebuild @@ -0,0 +1,202 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib xdg-utils + +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.6:= )" + +RDEPEND="${DEPEND} + emacs? ( virtual/emacs )" + +S="${WORKDIR}"/${MY_P} + +SITEFILE=50${PN}-gentoo.el + +src_prepare() { + cd "${WORKDIR}" || die + EPATCH_FORCE=yes + EPATCH_SUFFIX=patch + if [[ -d "${WORKDIR}"/${PV} ]] ; then + epatch "${WORKDIR}"/${PV} + fi + + sed -i -e "s/@libdir@/$(get_libdir)/" \ + "${S}"/scripts/Mmake.vars.in \ + || die "sed libdir failed" + + cd "${S}" || die + eautoconf + + xdg_environment_reset +} + +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_CFLAGS='${CFLAGS}' \ + EXTRA_LDFLAGS='${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 + if [[ -d "${WORKDIR}"/${PV}-mmc ]] ; then + epatch "${WORKDIR}"/${PV}-mmc + fi + + 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_CFLAGS='${CFLAGS}' \ + EXTRA_LDFLAGS='${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_CFLAGS='${CFLAGS}' \ + EXTRA_LDFLAGS='${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 || die + 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_MLFLAGS=--no-strip \ + EXTRA_CFLAGS='${CFLAGS}' \ + EXTRA_LDFLAGS='${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 + + ecvs_clean "${D}"/usr/share/doc/${PF}/samples + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |