polyml,polyml{56,57}: fix build (#372200)

This commit is contained in:
Sandro
2025-01-23 14:07:47 +01:00
committed by GitHub
3 changed files with 51 additions and 20 deletions
+12 -4
View File
@@ -14,9 +14,17 @@ stdenv.mkDerivation {
pname = "polyml";
inherit version;
prePatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace configure.ac --replace stdc++ c++
'';
postPatch =
''
substituteInPlace configure.ac \
--replace-fail 'AC_FUNC_ALLOCA' "AC_FUNC_ALLOCA
AH_TEMPLATE([_Static_assert])
AC_DEFINE([_Static_assert], [static_assert])
"
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace configure.ac --replace-fail stdc++ c++
'';
patches = [
# glibc 2.34 compat
@@ -26,7 +34,7 @@ stdenv.mkDerivation {
})
];
nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin autoreconfHook;
nativeBuildInputs = [ autoreconfHook ];
src = fetchurl {
url = "mirror://sourceforge/polyml/polyml.${version}.tar.gz";
+12 -4
View File
@@ -12,9 +12,17 @@ stdenv.mkDerivation rec {
pname = "polyml";
version = "5.7.1";
prePatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace configure.ac --replace stdc++ c++
'';
postPatch =
''
substituteInPlace configure.ac \
--replace-fail 'AC_FUNC_ALLOCA' "AC_FUNC_ALLOCA
AH_TEMPLATE([_Static_assert])
AC_DEFINE([_Static_assert], [static_assert])
"
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace configure.ac --replace-fail stdc++ c++
'';
patches = [
./5.7-new-libffi-FFI_SYSV.patch
@@ -31,7 +39,7 @@ stdenv.mkDerivation rec {
gmp
];
nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin autoreconfHook;
nativeBuildInputs = [ autoreconfHook ];
configureFlags = [
"--enable-shared"
+27 -12
View File
@@ -1,9 +1,10 @@
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, gmp
, libffi
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
gmp,
libffi,
}:
stdenv.mkDerivation rec {
@@ -17,13 +18,24 @@ stdenv.mkDerivation rec {
sha256 = "sha256-72wm8dt+Id59A5058mVE5P9TkXW5/LZRthZoxUustVA=";
};
prePatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace configure.ac --replace stdc++ c++
'';
postPatch =
''
substituteInPlace configure.ac \
--replace-fail 'AC_FUNC_ALLOCA' "AC_FUNC_ALLOCA
AH_TEMPLATE([_Static_assert])
AC_DEFINE([_Static_assert], [static_assert])
"
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace configure.ac --replace-fail stdc++ c++
'';
buildInputs = [ libffi gmp ];
buildInputs = [
libffi
gmp
];
nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin autoreconfHook;
nativeBuildInputs = [ autoreconfHook ];
configureFlags = [
"--enable-shared"
@@ -47,6 +59,9 @@ stdenv.mkDerivation rec {
homepage = "https://www.polyml.org/";
license = licenses.lgpl21;
platforms = with platforms; (linux ++ darwin);
maintainers = with maintainers; [ maggesi kovirobi ];
maintainers = with maintainers; [
maggesi
kovirobi
];
};
}