sagittarius-scheme: fix broken download link after recompiling, upgrade to 0.9.14 (#450515)

This commit is contained in:
Arne Keller
2026-07-01 16:41:52 +00:00
committed by GitHub
2 changed files with 49 additions and 4 deletions
@@ -0,0 +1,38 @@
diff --git a/src/bignum.c b/src/bignum.c
index 1a5553d5a..6bcdb5b6b 100644
--- a/src/bignum.c
+++ b/src/bignum.c
@@ -1949,6 +1949,7 @@ static SgObject small_bignum_to_string(SgBignum *b, int radix, int use_upper)
}
/* FIXME this is also in number.c */
+#if !defined(__GLIBC__) || !__GLIBC_PREREQ(2, 26)
static inline double roundeven(double v)
{
double r;
@@ -1966,6 +1967,7 @@ static inline double roundeven(double v)
}
return r;
}
+ #endif
/* this is used here */
static SgBignum * bignum_expt(SgBignum *b, long exponent);
diff --git a/src/roundeven.inc b/src/roundeven.inc
index 36d3c5535..1a29eefce 100644
--- a/src/roundeven.inc
+++ b/src/roundeven.inc
@@ -31,6 +31,7 @@
#include <math.h>
#include <float.h>
+#if !defined(__GLIBC__) || !__GLIBC_PREREQ(2, 26)
static inline double roundeven(double v)
{
double r;
@@ -50,3 +51,5 @@ static inline double roundeven(double v)
}
#endif
+
+#endif
+11 -4
View File
@@ -23,17 +23,23 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "sagittarius-scheme";
version = "0.9.12";
version = "0.9.14";
src = fetchurl {
url = "https://bitbucket.org/ktakashi/sagittarius-scheme/downloads/sagittarius-${finalAttrs.version}.tar.gz";
hash = "sha256-w6aQkC7/vKO8exvDpsSsLyLXrm4FSKh8XYGJgseEII0=";
url = "https://github.com/ktakashi/sagittarius-scheme/releases/download/v${finalAttrs.version}/sagittarius-${finalAttrs.version}.tar.gz";
hash = "sha256-L0ZKCiSbneWe1+czj83x+bCHPZw1uuYSdJwKHp4qTnk=";
};
patches = [
./fix-roundeven-declaration.patch
];
preBuild = ''
# since we lack rpath during build, need to explicitly add build path
# to LD_LIBRARY_PATH so we can load libsagittarius.so as required to
# build extensions
export ${platformLdLibraryPath}="$(pwd)/build"
'';
nativeBuildInputs = [
pkg-config
cmake
@@ -76,9 +82,10 @@ stdenv.mkDerivation (finalAttrs: {
- mostly works O(n)
- Replaceable reader
'';
homepage = "https://bitbucket.org/ktakashi/sagittarius-scheme";
homepage = "https://github.com/ktakashi/sagittarius-scheme";
license = lib.licenses.bsd2;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ abbe ];
broken = stdenv.hostPlatform.isDarwin;
};
})