diff options
author | Keri Harris <keri@gentoo.org> | 2017-09-30 13:32:16 +0200 |
---|---|---|
committer | Keri Harris <keri@gentoo.org> | 2017-09-30 13:32:16 +0200 |
commit | 940d71899dc80882ebdaeab62fd79e647e851dce (patch) | |
tree | 1009513450327ee0cce2aa5fb04671c55c5bd7b4 /dev-lang | |
parent | x11-misc/rofi: Version bump. (diff) | |
download | gentoo-940d71899dc80882ebdaeab62fd79e647e851dce.tar.gz gentoo-940d71899dc80882ebdaeab62fd79e647e851dce.tar.bz2 gentoo-940d71899dc80882ebdaeab62fd79e647e851dce.zip |
dev-lang/mercury: version bump
Package-Manager: Portage-2.3.8, Repoman-2.3.1
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/mercury/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/mercury/mercury-14.01.1.ebuild | 203 | ||||
-rw-r--r-- | dev-lang/mercury/metadata.xml | 1 |
3 files changed, 206 insertions, 0 deletions
diff --git a/dev-lang/mercury/Manifest b/dev-lang/mercury/Manifest index 4a3d2f1b85f8..760f43cd5a03 100644 --- a/dev-lang/mercury/Manifest +++ b/dev-lang/mercury/Manifest @@ -1,4 +1,6 @@ DIST mercury-13.05.2-gentoo-patchset-1.tar.gz 5622 SHA256 5a6559c207c0161beef2eb3bce6f890eadab7dd8fbc5909dc720085498c51777 SHA512 387956a120b2bbb7da1913e89cf33e7bdb8f205fe207701a33d19ccb667d1ae73a342955642120822448621bdba349ab628290d78fdef35c08b9ccbadda4177f WHIRLPOOL 9da5ec0cc6dba6f0ed98c77583213852bc94014c584eae22705c282cbdc137ee30efd83401f8e28c6320a4909c9abbc6d0cf8e79e953c2ce4cfd504156267c82 DIST mercury-14.01-gentoo-patchset-0.tar.gz 5728 SHA256 43fc8145e784b9e09561fd2b7268cfd37151b134203785b9256b4b7fd87e3d13 SHA512 f1e375ac192e478a82863aa7b8e28c1044a490c41bb63f7842b16b12b7cfa9c85938eacad4c3eacf348aafd42dfaa0dea5324b734d0d2a7454e3e9334369658e WHIRLPOOL eaad62d89285404518e3dca7f98065eea5aaa2f8b46d8ff0f01a0a6b6f886db51800faab81b4e1cd89cd61b771d65562a75f28c399aef053e730d7975ac8f8b6 +DIST mercury-14.01.1-gentoo-patchset-0.tar.gz 4701 SHA256 f85eafed1ba9276986d37aa6fd0e1792037c9a6e42009626791cb1bc8a07c8a9 SHA512 5b9afda5361ce68b3c39e15764bfd066eff032b9e1a67d3a53f438b60c92841f304456c0ae7bfe04a7dec35c1c00a3bdd88afc62392814eea5565c1e1c90b129 WHIRLPOOL ab6c8746d5f4ffc0edac7623c6deecc65629fa09a5b8e02f101f65fa8cd54702a9a450c999bfd90f5a3177864f85648814604adf540e2344ff79711c828d6b61 DIST mercury-srcdist-13.05.2.tar.gz 53847394 SHA256 8491cf419b996a315bf8664154dd91aed940274ded98e3aded733dbe1939f95f SHA512 2298804d3a04bca6be4bd3046643c7c0d0b22c447423017869cd9bf3a4fb6ec9fd29b5d8e1a386d5d52d07be5cad73608f1fcacf46732a7add93a01dcd199c08 WHIRLPOOL 2a81bebfd4b97b9bb1b0e174025e6050149c8e5f812cd97cbdc41818faa18c15f9494925f1f320682087cc45264bc00db07bef6862afef12317f77cc169a7f86 +DIST mercury-srcdist-14.01.1.tar.gz 52658945 SHA256 98f7cbde7a7425365400feef3e69f1d6a848b25dc56ba959050523d546c4e88b SHA512 a128ef0fd4955abadea32019ec59297ffe32537415f32e9e948cbc1c3439bb40eb09de77569690fb18dd7d6969a2b1141b3ae5baeb87f2627eaa65ad93add92c WHIRLPOOL 7b859eb5c7c1194d63c0aeeeeac3686c57436100b5618ae31a901119a33443363acb80a908a15dfdfa8b61fd9ccb4e552cbb972a3cc735b7a768ee7c9b1b6091 DIST mercury-srcdist-14.01.tar.gz 52683989 SHA256 4446b7b4eafd35540495ef90ce93b71cb88efa2d744628aee80f76a694aefcc1 SHA512 77f61df64fc150e08f191860f285b97d11a71a52eabc95f660b3c90d88f8ee71d1227f7ab4b8be78be9d4aa3d62a260a874020023e4795da4cfd2e6fefa9965f WHIRLPOOL a7123063590e39ae15222eb59a2c3681ae37bea211967c857eb8725090d342f0aba7a55446529f8608afb9895746581943527b1b3c313c5cbb96f638a3377404 diff --git a/dev-lang/mercury/mercury-14.01.1.ebuild b/dev-lang/mercury/mercury-14.01.1.ebuild new file mode 100644 index 000000000000..d500a59e1798 --- /dev/null +++ b/dev-lang/mercury/mercury-14.01.1.ebuild @@ -0,0 +1,203 @@ +# 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 mono profile readline threads trail" + +DEPEND="!dev-libs/mpatrol + !dev-util/mono-debugger + readline? ( sys-libs/readline:= ) + erlang? ( dev-lang/erlang ) + java? ( >=virtual/jdk-1.6:= ) + mono? ( dev-lang/mono )" + +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) \ + $(use_enable mono csharp-grade) \ + $(use_enable erlang erlang-grade) \ + $(use_enable java java-grade) \ + $(use_enable debug debug-grades) \ + $(use_enable profile prof-grades) \ + $(use_enable threads par-grades) \ + $(use_enable trail trail-grades) \ + $(use_with readline)" + + econf ${myconf} +} + +src_compile() { + # Build Mercury using bootstrap grade + emake \ + PARALLEL="${MAKEOPTS}" \ + EXTRA_CFLAGS="${CFLAGS}" \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_MLFLAGS="--no-strip" \ + || 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}" \ + EXTRA_CFLAGS="${CFLAGS}" \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_MLFLAGS="--no-strip" \ + MERCURY_COMPILER="${S}"/compiler/mercury_compile \ + compiler || die "emake compiler failed" + + # The default Mercury grade may not be the same as the bootstrap + # grade. Since src_test() is run before src_install() we compile + # the default grade now + emake \ + PARALLEL="${MAKEOPTS}" \ + EXTRA_CFLAGS="${CFLAGS}" \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_MLFLAGS="--no-strip" \ + 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}" \ + EXTRA_CFLAGS="${CFLAGS}" \ + EXTRA_LDFLAGS="${LDFLAGS}" \ + EXTRA_MLFLAGS="--no-strip" \ + MERCURY_COMPILER="${S}"/compiler/mercury_compile \ + DESTDIR="${D}" \ + 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 +} diff --git a/dev-lang/mercury/metadata.xml b/dev-lang/mercury/metadata.xml index 8db223fdceb6..9ecd0bc6506f 100644 --- a/dev-lang/mercury/metadata.xml +++ b/dev-lang/mercury/metadata.xml @@ -7,5 +7,6 @@ </maintainer> <use> <flag name="erlang">Support Mercury Erlang grade</flag> + <flag name="trail">Support Mercury trail grades</flag> </use> </pkgmetadata> |