polyml-5.5.1.ebuild 1.8 KB

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