diff options
| author | Sam James <sam@gentoo.org> | 2024-12-29 10:49:28 +0000 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2024-12-29 10:51:36 +0000 |
| commit | a4cda180db47d0ef76d223f4ea66296eb5f18179 (patch) | |
| tree | 6e804748e54bf8d4b06a3eb32ab22b4ad95605be /dev-scheme/guile-lib/files | |
| parent | 2d73b90eda2491958590bd7f73c4656c7c153a38 (diff) | |
| download | gentoo-a4cda180db47d0ef76d223f4ea66296eb5f18179.tar.gz gentoo-a4cda180db47d0ef76d223f4ea66296eb5f18179.tar.bz2 gentoo-a4cda180db47d0ef76d223f4ea66296eb5f18179.zip | |
dev-scheme/guile-lib: add 0.2.8.1
This includes Zack Weinberg's patch to fix tests w/ guile-3.0, which
I've only applied for 3.0.
But in the course of spending a while to get the ebuild working with
two impls and only patching one, I found that 2-2 was clearly not cared
for upstream anymore as I hit two different issues and one of them
had an unreplied-to patch on the ML, so I gave up. Just declare compat
w/ 3-0 and worry about older later for this version on the offchance
someone requests it.
Closes: https://bugs.gentoo.org/877785
Closes: https://bugs.gentoo.org/941404
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-scheme/guile-lib/files')
| -rw-r--r-- | dev-scheme/guile-lib/files/guile-lib-0.2.8.1-guile3-primes.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/dev-scheme/guile-lib/files/guile-lib-0.2.8.1-guile3-primes.patch b/dev-scheme/guile-lib/files/guile-lib-0.2.8.1-guile3-primes.patch new file mode 100644 index 000000000000..bca9dd1e80ca --- /dev/null +++ b/dev-scheme/guile-lib/files/guile-lib-0.2.8.1-guile3-primes.patch @@ -0,0 +1,26 @@ +# Note that this patch requires >=guile-3, so we apply it conditionally. +# https://lists.gnu.org/archive/html/guile-devel/2024-05/msg00012.html +# +# Fix compile and test failures due to bitvector API change. +# https://bugs.gentoo.org/877785 +--- a/src/math/primes.scm 2024-05-23 19:26:16.757865343 -0400 ++++ b/src/math/primes.scm 2024-05-23 19:28:20.797358650 -0400 +@@ -114,7 +114,7 @@ + (set! prime:prime-sqr (* nexp nexp)) + (set! prime:sieve (make-bitvector nexp #f)) + (for-each (lambda (prime) +- (bitvector-set! prime:sieve prime #t)) ++ (bitvector-set-bit! prime:sieve prime)) + primes) + (set! prime:products (reverse (cons comp comps)))) + (else +@@ -132,7 +132,7 @@ + There is a slight chance, @code{(expt 2 (- prime:trials))}, that a + composite will return @code{#t}." + (set! n (abs n)) +- (cond ((< n (bitvector-length prime:sieve)) (bitvector-ref prime:sieve n)) ++ (cond ((< n (bitvector-length prime:sieve)) (bitvector-bit-set? prime:sieve n)) + ((even? n) #f) + ((primes-gcd? n prime:products) #f) + ((< n prime:prime-sqr) #t) + |
