blob: 0ceb98cb5d9c7221289acdea852f9edecd8bf8dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
inherit base autotools pax-utils
MY_P="${PN}.${PV}"
DESCRIPTION="Poly/ML is a full implementation of Standard ML"
HOMEPAGE="https://www.polyml.org"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86"
IUSE="X elibc_glibc +gmp portable test +threads"
RESTRICT="!test? ( test )"
RDEPEND="X? ( x11-libs/motif:0 )
gmp? ( >=dev-libs/gmp-5 )
elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) )
virtual/libffi"
DEPEND="${RDEPEND}"
S=${WORKDIR}/${MY_P}
PATCHES=(
# Bug 256679 - patch the assembler code. The remaining executable stacks in ./.libs/poly
# comes from the polyml generated ./polyexport.o file.
"${FILESDIR}/${PN}-5.5.0-asm.patch"
# https://sourceforge.net/p/polyml/code/1875/ for isabelle-2013.2
"${FILESDIR}/${PN}-5.5.1-inputN-return-for-zero-chars.patch"
# https://sourceforge.net/p/polyml/code/1869/
# Adds Test146.ML that fails, applying it anyway as it is required by
# sci-mathematics/isabelle-2013.2
"${FILESDIR}/${PN}-5.5.1-optimize-closure.patch"
)
src_prepare() {
base_src_prepare
eautoreconf
if [ -f "${S}/Tests/Succeed/Test146.ML" ]; then
mv "${S}/Tests/Succeed/Test146.ML" "${S}/Tests/Succeed/Test146.ML.disable-test-as-it-fails"
fi
}
src_configure() {
econf \
--enable-shared \
--disable-static \
--with-system-libffi \
$(use_with X x) \
$(use_with gmp) \
$(use_with portable) \
$(use_with threads)
}
src_compile() {
# Bug 453146 - dev-lang/polyml-5.5.0: fails to build (pax kernel?)
pushd libpolyml || die "Could not cd to libpolyml"
emake
popd
emake polyimport
pax-mark m "${S}/.libs/polyimport"
emake
pax-mark m "${S}/.libs/poly"
}
src_test() {
emake tests
}
|