summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2021-09-10 19:47:11 +0200
committerAndreas K. Hüttel <dilfridge@gentoo.org>2021-09-10 19:47:29 +0200
commita059ab8b138f7b4cc513b9fe30defe16ab71bf2d (patch)
treee41600b39ea5ff7a1872bc263f3069fe0238eb6f /dev-lang/polyml
parentnet-misc/iputils: make tests conditional (diff)
downloadgentoo-a059ab8b138f7b4cc513b9fe30defe16ab71bf2d.tar.gz
gentoo-a059ab8b138f7b4cc513b9fe30defe16ab71bf2d.tar.bz2
gentoo-a059ab8b138f7b4cc513b9fe30defe16ab71bf2d.zip
dev-lang/polyml: Version bump; fix glibc-2.34 build
Closes: https://bugs.gentoo.org/806350 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Andreas K. Huettel <dilfridge@gentoo.org>
Diffstat (limited to 'dev-lang/polyml')
-rw-r--r--dev-lang/polyml/Manifest1
-rw-r--r--dev-lang/polyml/files/polyml-5.8.2-configure.patch12
-rw-r--r--dev-lang/polyml/files/polyml-5.8.2-glibc234.patch30
-rw-r--r--dev-lang/polyml/polyml-5.8.2.ebuild56
4 files changed, 99 insertions, 0 deletions
diff --git a/dev-lang/polyml/Manifest b/dev-lang/polyml/Manifest
index 374920d949cf..ef526f69526c 100644
--- a/dev-lang/polyml/Manifest
+++ b/dev-lang/polyml/Manifest
@@ -1 +1,2 @@
+DIST polyml-5.8.2.tar.gz 8819392 BLAKE2B 28abec92f8372779ca2b431a069f43a38f0560056edc37b615d5ddc48a9d5b17f2d56c35de3e8f38a1449873d2a7cfc419f6305c790ab77590a8b785f7cfc092 SHA512 c1bac59b837762b500496eb8bf0294db76e3707b77984e5a31860b96a2fb2f406db610da5241c6ec2c00f623d76c16957e811cc808f60a3d220c15fa70440282
DIST polyml-5.8.tar.gz 9817105 BLAKE2B 93992c8baa78017bfda6c2151d1f48805829b77c0b7ed9bec87c951fc4a4236459ed59aab1eca88ed4a1d7aa10eb9734f93324583e012b18bb7d8cce84b5a35b SHA512 50baed79b50b14bd87acc637de93fd6d0f05e61fe0f03682a12a1d2c5f382313488d48f84b49ad915b01acc5a3a5769fb05fcaa7b24499c56402ddd3ba393930
diff --git a/dev-lang/polyml/files/polyml-5.8.2-configure.patch b/dev-lang/polyml/files/polyml-5.8.2-configure.patch
new file mode 100644
index 000000000000..5fd1c30dac75
--- /dev/null
+++ b/dev-lang/polyml/files/polyml-5.8.2-configure.patch
@@ -0,0 +1,12 @@
+diff -ruN polyml-5.8.2.orig/configure.ac polyml-5.8.2/configure.ac
+--- polyml-5.8.2.orig/configure.ac 2021-05-02 13:53:42.000000000 +0200
++++ polyml-5.8.2/configure.ac 2021-09-10 19:29:27.370699622 +0200
+@@ -198,7 +198,7 @@
+ # Solaris needs -lsocket, -lnsl and -lrt
+ AC_SEARCH_LIBS([gethostbyname], [nsl])
+ AC_SEARCH_LIBS([getsockopt], [socket])
+- AC_SEARCH_LIBS([sem_wait], [rt])
++ AC_SEARCH_LIBS([sem_wait], [rt] [pthread])
+
+ # Check for X and Motif headers and libraries
+ AC_PATH_X
diff --git a/dev-lang/polyml/files/polyml-5.8.2-glibc234.patch b/dev-lang/polyml/files/polyml-5.8.2-glibc234.patch
new file mode 100644
index 000000000000..9636cc61f245
--- /dev/null
+++ b/dev-lang/polyml/files/polyml-5.8.2-glibc234.patch
@@ -0,0 +1,30 @@
+From 3e27444bea771e25102430bfa632edf8d106c91c Mon Sep 17 00:00:00 2001
+From: Jerry James <loganjerry@gmail.com>
+Date: Mon, 9 Aug 2021 15:37:39 -0600
+Subject: [PATCH] Adapt to nonconstant PTHREAD_STACK_MIN in glibc 2.34+
+
+---
+ libpolyml/sighandler.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/libpolyml/sighandler.cpp b/libpolyml/sighandler.cpp
+index fd6f6e3e..5d22b000 100644
+--- a/libpolyml/sighandler.cpp
++++ b/libpolyml/sighandler.cpp
+@@ -547,11 +547,11 @@ void SigHandler::Init(void)
+ pthread_attr_t attrs;
+ pthread_attr_init(&attrs);
+ #ifdef PTHREAD_STACK_MIN
+-#if (PTHREAD_STACK_MIN < 4096)
+- pthread_attr_setstacksize(&attrs, 4096); // But not too small: FreeBSD makes it 2k
+-#else
+- pthread_attr_setstacksize(&attrs, PTHREAD_STACK_MIN); // Only small stack.
+-#endif
++ // In glibc 2.34 and later, PTHREAD_STACK_MIN may expand to a function call
++ size_t stacksize = PTHREAD_STACK_MIN; // Only small stack.
++ if (stacksize < 4096U) // But not too small: FreeBSD makes it 2k
++ stacksize = 4096U;
++ pthread_attr_setstacksize(&attrs, stacksize);
+ #endif
+ threadRunning = pthread_create(&detectionThreadId, &attrs, SignalDetectionThread, 0) == 0;
+ pthread_attr_destroy(&attrs);
diff --git a/dev-lang/polyml/polyml-5.8.2.ebuild b/dev-lang/polyml/polyml-5.8.2.ebuild
new file mode 100644
index 000000000000..2f9102e07372
--- /dev/null
+++ b/dev-lang/polyml/polyml-5.8.2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools pax-utils
+
+DESCRIPTION="Poly/ML is a full implementation of Standard ML"
+HOMEPAGE="https://www.polyml.org"
+SRC_URI="https://codeload.github.com/polyml/polyml/tar.gz/v${PV} -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="X elibc_glibc +gmp portable test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="X? ( x11-libs/motif:0 )
+ gmp? ( >=dev-libs/gmp-5 )
+ dev-libs/libffi:="
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.8.2-configure.patch
+ "${FILESDIR}"/${PN}-5.8.2-glibc234.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ --disable-static \
+ --with-pic=pic-only \
+ $(use_with X x) \
+ $(use_with gmp) \
+ $(use_enable !portable native-codegeneration)
+}
+
+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
+}