aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/package
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-11-16 03:19:21 +0900
committerOphestra <cat@gensokyo.uk>2026-11-16 03:19:21 +0900
commit5ab57929655f2228a3780105027c3884410b3bcf (patch)
tree888f9c72d1ee128ee1d4e9707b50d2193d245dc0 /internal/rosa/package
parentc6b8e1fc03db8c256a2b3f3610f1d30bd0976293 (diff)
internal/rosa/package: guile
Required by autogen. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/package')
-rw-r--r--internal/rosa/package/guile/disable-broken-tests-musl.patch20
-rw-r--r--internal/rosa/package/guile/failing-encoding-test.patch27
-rw-r--r--internal/rosa/package/guile/failing-filesys-test.patch24
-rw-r--r--internal/rosa/package/guile/package.az67
4 files changed, 138 insertions, 0 deletions
diff --git a/internal/rosa/package/guile/disable-broken-tests-musl.patch b/internal/rosa/package/guile/disable-broken-tests-musl.patch
new file mode 100644
index 00000000..bf507f86
--- /dev/null
+++ b/internal/rosa/package/guile/disable-broken-tests-musl.patch
@@ -0,0 +1,20 @@
+diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am
+index 492214845..396f5e83e 100644
+--- a/test-suite/Makefile.am
++++ b/test-suite/Makefile.am
+@@ -69,7 +69,6 @@ SCM_TESTS = tests/00-initial-env.test \
+ tests/guardians.test \
+ tests/hash.test \
+ tests/hooks.test \
+- tests/i18n.test \
+ tests/iconv.test \
+ tests/import.test \
+ tests/interp.test \
+@@ -186,7 +185,6 @@ SCM_TESTS = tests/00-initial-env.test \
+ tests/texinfo.serialize.test \
+ tests/texinfo.string-utils.test \
+ tests/threads.test \
+- tests/time.test \
+ tests/tree-il.test \
+ tests/types.test \
+ tests/unicode.test \
diff --git a/internal/rosa/package/guile/failing-encoding-test.patch b/internal/rosa/package/guile/failing-encoding-test.patch
new file mode 100644
index 00000000..18645b7b
--- /dev/null
+++ b/internal/rosa/package/guile/failing-encoding-test.patch
@@ -0,0 +1,27 @@
+The set-port-encoding! procedure does not work properly on musl
+as musl only supports UTF-8 text encoding.
+
+diff -upr guile-3.0.8.orig/test-suite/tests/reader.test guile-3.0.8/test-suite/tests/reader.test
+--- guile-3.0.8.orig/test-suite/tests/reader.test 2022-07-22 17:32:35.731931222 +0200
++++ guile-3.0.8/test-suite/tests/reader.test 2022-07-22 17:33:06.671996144 +0200
+@@ -405,19 +405,6 @@
+ (string->list s2)
+ (list #\" #\\ #\b #\\ #\x #\1 #\8 #\; #\space #\0 #\@ #\"))))
+
+- (pass-if "display R6RS string escapes"
+- (string=?
+- (with-read-options '(r6rs-hex-escapes)
+- (lambda ()
+- (let ((pt (open-output-string))
+- (s1 (apply string (map integer->char
+- '(#xFF #x100 #xFFF #x1000 #xFFFF #x10000)))))
+- (set-port-encoding! pt "ASCII")
+- (set-port-conversion-strategy! pt 'escape)
+- (display s1 pt)
+- (get-output-string pt))))
+- "\\xff;\\x100;\\xfff;\\x1000;\\xffff;\\x10000;"))
+-
+ (pass-if "one-digit hex escape"
+ (eqv? (with-input-from-string "#\\xA" read)
+ (integer->char #x0A)))
+
diff --git a/internal/rosa/package/guile/failing-filesys-test.patch b/internal/rosa/package/guile/failing-filesys-test.patch
new file mode 100644
index 00000000..a64df5fe
--- /dev/null
+++ b/internal/rosa/package/guile/failing-filesys-test.patch
@@ -0,0 +1,24 @@
+diff --git a/test-suite/tests/filesys.test b/test-suite/tests/filesys.test
+index 45e77c8..a887109 100644
+--- a/test-suite/tests/filesys.test
++++ b/test-suite/tests/filesys.test
+@@ -457,19 +457,6 @@
+ (pass-if-equal "file name of symlink" (test-file)
+ (readlink (test-symlink)))
+
+- (pass-if-equal "port representing a symlink" (test-file)
+- (let ()
+- (unless (and (provided? 'readlink-port)
+- (defined? 'O_NOFOLLOW)
+- (defined? 'O_PATH)
+- (not (= 0 O_NOFOLLOW))
+- (not (= 0 O_PATH)))
+- (throw 'unsupported))
+- (define port (open (test-symlink) (logior O_NOFOLLOW O_PATH)))
+- (define points-to (false-if-exception (readlink port)))
+- (close-port port)
+- points-to))
+-
+ (pass-if-exception "not a port or file name" exception:wrong-type-arg
+ (readlink '(stuff)))))
+
diff --git a/internal/rosa/package/guile/package.az b/internal/rosa/package/guile/package.az
new file mode 100644
index 00000000..44d1679a
--- /dev/null
+++ b/internal/rosa/package/guile/package.az
@@ -0,0 +1,67 @@
+package guile {
+ description = "a programming language";
+ website = "https://www.gnu.org/software/guile";
+ anitya = 1277;
+
+ version# = "3.0.11";
+ source = remoteTar {
+ url = "https://codeberg.org/guile/guile/archive/v"+version+".tar.gz";
+ checksum = "Ta7GIA0MBn5_sG089hJJ8W5QFrHqv9UKXR3D5arIEndeRjGlWCCWj_nIwFyTXcQN";
+ compress = gzip;
+ };
+ patches = [
+ "failing-filesys-test.patch",
+ "failing-encoding-test.patch",
+ "disable-broken-tests-musl.patch",
+ ];
+
+ early = `
+echo '`+version+`' > .tarball-version
+`;
+
+ exec = make {
+ generate = "./autogen.sh";
+ _prefix# = prefix+"/"+arch+prefix;
+ configure = {
+ "with-libgmp-prefix": arch {
+ default = unset;
+ cross = _prefix;
+ };
+ "with-libunistring-prefix": arch {
+ default = unset;
+ cross = _prefix;
+ };
+ "with-libiconv-prefix": arch {
+ default = unset;
+ cross = _prefix;
+ };
+
+ "CFLAGS": arch {
+ default = unset;
+ riscv64 = `"${CFLAGS:-} -D__clear_cache=__builtin___clear_cache"`;
+ };
+ };
+ };
+
+ inputs = [
+ gmp,
+ libunistring,
+ libffi,
+ bdwgc,
+ libiconv,
+ ];
+
+ tools = [
+ automake,
+ libtool,
+ gettext,
+ gzip,
+ tar,
+ flex,
+ texinfo,
+ gperf,
+ pkgconf,
+ ];
+
+ native = [ guile ];
+}