summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeri Harris <keri@gentoo.org>2017-09-26 19:30:04 +0200
committerKeri Harris <keri@gentoo.org>2017-09-26 19:30:04 +0200
commitdd3f322614ac0b842ec82287afb4e0ab3d98f403 (patch)
treeb848db393783c9f0c8ef820350da9b26cea4f29d /dev-lang/mercury-extras
parentdev-lang/mercury: version bump (diff)
downloadgentoo-dd3f322614ac0b842ec82287afb4e0ab3d98f403.tar.gz
gentoo-dd3f322614ac0b842ec82287afb4e0ab3d98f403.tar.bz2
gentoo-dd3f322614ac0b842ec82287afb4e0ab3d98f403.zip
dev-lang/mercury-extras: version bump
Package-Manager: Portage-2.3.8, Repoman-2.3.1
Diffstat (limited to 'dev-lang/mercury-extras')
-rw-r--r--dev-lang/mercury-extras/Manifest2
-rw-r--r--dev-lang/mercury-extras/mercury-extras-14.01.ebuild193
2 files changed, 195 insertions, 0 deletions
diff --git a/dev-lang/mercury-extras/Manifest b/dev-lang/mercury-extras/Manifest
index db3f6b5f51ea..b4530c6965ed 100644
--- a/dev-lang/mercury-extras/Manifest
+++ b/dev-lang/mercury-extras/Manifest
@@ -1,2 +1,4 @@
DIST mercury-extras-13.05.2-gentoo-patchset-0.tar.gz 3434 SHA256 4c9d7bd5cd098a9e21981053d854307e8b27efcfd4ea86e4bc44532a1707a2c6 SHA512 7212bce048ac6cda4678bcf5f5046efab101c040324078ab01d5dea1436a495d19574c4d07810447795aec49d79b69a557f60a558e9b6837fe55ccaff80d3077 WHIRLPOOL 239461342b164209fd876f5925b7b03ff9082210cc1242c7fa897bad9029caa6dd6f457feb51e963bd2ce2839cba33146ee7c4daa45c204e6ef2a4f59fe3f7c2
+DIST mercury-extras-14.01-gentoo-patchset-0.tar.gz 2682 SHA256 87d7f4b7ffd8443628d3e3d519de396d6f13f6bfd54e76f1ee796adfb3c0bd19 SHA512 64d1efc45a0fea63c56f619063ff5d60f8db4d9b858eedc444c5dacf4b131bb0594fb1604d59840d4cdd7dc26b2c019a543d6ea49ece59abeb8cd3c248821cf6 WHIRLPOOL 2b199487e175c5d19e44c8875ef624b68644e6bd99e3ffc5e2c3963bc7e07c48870f29157fa15e0e05aa3c495dd92f6cd6e50bbad56fc2a74fdece1ac08cf63d
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-extras/mercury-extras-14.01.ebuild b/dev-lang/mercury-extras/mercury-extras-14.01.ebuild
new file mode 100644
index 000000000000..3b4938613efa
--- /dev/null
+++ b/dev-lang/mercury-extras/mercury-extras-14.01.ebuild
@@ -0,0 +1,193 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib
+
+PATCHSET_VER="0"
+MY_P=mercury-srcdist-${PV}
+
+DESCRIPTION="Additional libraries and tools that are not part of the Mercury standard library"
+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="X cairo examples glut iodbc ncurses odbc opengl ssl tcl tk xml"
+
+RDEPEND="~dev-lang/mercury-${PV}
+ cairo? ( >=x11-libs/cairo-1.10.0 )
+ glut? ( media-libs/freeglut )
+ odbc? ( dev-db/unixODBC )
+ iodbc? ( !odbc? ( dev-db/libiodbc ) )
+ ncurses? ( sys-libs/ncurses:= )
+ opengl? ( virtual/opengl )
+ tcl? ( tk? (
+ dev-lang/tcl:0
+ dev-lang/tk:0
+ x11-libs/libX11
+ x11-libs/libXmu ) )"
+
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${MY_P}/extras
+
+mercury_pkgs()
+{
+ echo "base64
+ cgi
+ complex_numbers
+ dynamic_linking
+ error
+ fixed
+ lex
+ moose
+ posix
+ solver_types/library
+ $(use ncurses && echo curs curses)
+ $(use glut && echo graphics/mercury_glut)
+ $(use opengl && echo graphics/mercury_opengl)
+ $(use tcl && use tk && echo graphics/mercury_tcltk)
+ $(use odbc && echo odbc || use iodbc && echo odbc)
+ $(has_version dev-lang/mercury[-minimal] && echo references)
+ $(usev xml)"
+}
+
+src_prepare() {
+ cd "${WORKDIR}"
+
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then
+ epatch "${WORKDIR}"/${PV}
+ fi
+
+ cd "${S}"
+ if use odbc; then
+ cp odbc/Mmakefile.odbc odbc/Mmakefile
+ elif use iodbc; then
+ cp odbc/Mmakefile.iodbc odbc/Mmakefile
+ fi
+}
+
+src_compile() {
+ local MERCURY_PKGS="$(mercury_pkgs)"
+
+ # Mercury dependency generation must be run single-threaded
+ mmake -j1 \
+ SUBDIRS="${MERCURY_PKGS}" \
+ depend || die "mmake depend failed"
+
+ # Compiling Mercury submodules is not thread-safe
+ mmake -j1 \
+ SUBDIRS="${MERCURY_PKGS}" \
+ EXTRA_MLFLAGS=--no-strip \
+ EXTRA_CFLAGS="${CFLAGS}" \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
+ || die "mmake failed"
+
+ if use cairo; then
+ cd "${S}"/graphics/mercury_cairo
+ mmc --make libmercury_cairo \
+ || die "mmc --make libmercury_cairo failed"
+ fi
+}
+
+src_install() {
+ local MERCURY_PKGS="$(mercury_pkgs)"
+
+ # Compiling Mercury submodules is not thread-safe
+ mmake -j1 \
+ SUBDIRS="${MERCURY_PKGS}" \
+ EXTRA_MLFLAGS=--no-strip \
+ EXTRA_CFLAGS="${CFLAGS}" \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
+ INSTALL_PREFIX="${D}"/usr \
+ install || die "mmake install failed"
+
+ if use cairo; then
+ cd "${S}"/graphics/mercury_cairo
+ INSTALL_PREFIX="${D}"/usr \
+ mmc --make libmercury_cairo.install \
+ || die "mmc --make libmercury_cairo.install failed"
+ fi
+
+ find "${D}"/usr/$(get_libdir)/mercury -type l | xargs rm
+
+ cd "${S}"
+ if use examples; then
+ insinto /usr/share/doc/${PF}/samples/base64
+ doins base64/*.m || die
+
+ insinto /usr/share/doc/${PF}/samples/complex_numbers
+ doins complex_numbers/samples/* || die
+
+ insinto /usr/share/doc/${PF}/samples/dynamic_linking
+ doins dynamic_linking/hello.m || die
+
+ insinto /usr/share/doc/${PF}/samples/error
+ doins error/* || die
+
+ insinto /usr/share/doc/${PF}/samples/fixed
+ doins fixed/*.m || die
+
+ insinto /usr/share/doc/${PF}/samples/gator
+ doins -r gator/* || die
+
+ insinto /usr/share/doc/${PF}/samples/lex
+ doins lex/samples/* || die
+
+ insinto /usr/share/doc/${PF}/samples/log4m
+ doins log4m/*.m || die
+
+ insinto /usr/share/doc/${PF}/samples/monte
+ doins monte/*.m || die
+
+ insinto /usr/share/doc/${PF}/samples/moose
+ doins moose/samples/* || die
+
+ insinto /usr/share/doc/${PF}/samples/net
+ doins net/*.m || die
+
+ if use ncurses; then
+ insinto /usr/share/doc/${PF}/samples/curs
+ doins curs/samples/* || die
+
+ insinto /usr/share/doc/${PF}/samples/curses
+ doins curses/sample/* || die
+ fi
+
+ if use X; then
+ insinto /usr/share/doc/${PF}/samples/graphics
+ doins graphics/easyx/samples/*.m || die
+ fi
+
+ if use glut && use opengl; then
+ insinto /usr/share/doc/${PF}/samples/graphics
+ doins graphics/samples/calc/* || die
+ doins graphics/samples/gears/* || die
+ doins graphics/samples/maze/* || die
+ doins graphics/samples/pent/* || die
+ fi
+
+ if use opengl && use tcl && use tk; then
+ insinto /usr/share/doc/${PF}/samples/graphics
+ doins graphics/samples/pent/*.m || die
+ fi
+
+ if use ssl; then
+ insinto /usr/share/doc/${PF}/samples/mopenssl
+ doins mopenssl/*.m || die
+ fi
+
+ ecvs_clean
+ fi
+
+ dodoc README || die
+}