1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit base autotools pax-utils
10 DESCRIPTION="Poly/ML is a full implementation of Standard ML"
11 HOMEPAGE="https://www.polyml.org"
12 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="X elibc_glibc +gmp portable test +threads"
18 RESTRICT="!test? ( test )"
20 RDEPEND="X? ( x11-libs/motif:0 )
21 gmp? ( >=dev-libs/gmp-5 )
22 elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) )
29 # Bug 256679 - patch the assembler code. The remaining executable stacks in ./.libs/poly
30 # comes from the polyml generated ./polyexport.o file.
31 "${FILESDIR}/${PN}-5.5.0-asm.patch"
32 # https://sourceforge.net/p/polyml/code/1875/ for isabelle-2013.2
33 "${FILESDIR}/${PN}-5.5.1-inputN-return-for-zero-chars.patch"
34 # https://sourceforge.net/p/polyml/code/1869/
35 # Adds Test146.ML that fails, applying it anyway as it is required by
36 # sci-mathematics/isabelle-2013.2
37 "${FILESDIR}/${PN}-5.5.1-optimize-closure.patch"
43 if [ -f "${S}/Tests/Succeed/Test146.ML" ]; then
44 mv "${S}/Tests/Succeed/Test146.ML" "${S}/Tests/Succeed/Test146.ML.disable-test-as-it-fails"
52 --with-system-libffi \
55 $(use_with portable) \
60 # Bug 453146 - dev-lang/polyml-5.5.0: fails to build (pax kernel?)
61 pushd libpolyml || die "Could not cd to libpolyml"
65 pax-mark m "${S}/.libs/polyimport"
67 pax-mark m "${S}/.libs/poly"
71 emake tests || die "tests failed"