Github messages for voidlinux
 help / color / mirror / Atom feed
From: leahneukirchen <leahneukirchen@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] guile: update to 3.0.10.
Date: Wed, 31 Jul 2024 18:36:08 +0200	[thread overview]
Message-ID: <20240731163608.184AC26B11@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-51554@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

There is an updated pull request by leahneukirchen against master on the void-packages repository

https://github.com/leahneukirchen/void-packages guile3
https://github.com/void-linux/void-packages/pull/51554

guile: update to 3.0.10.
Patch everything forward, drop 2.2.

A patch file from https://github.com/void-linux/void-packages/pull/51554.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-guile3-51554.patch --]
[-- Type: text/x-diff, Size: 25595 bytes --]

From 28ab9cecc1f8c03489e86dd3e8145b5f0b9d7b6b Mon Sep 17 00:00:00 2001
From: Anjandev Momi <anjan@momi.ca>
Date: Tue, 26 May 2020 20:01:03 -0700
Subject: [PATCH 01/11] guile: update to 3.0.10.

Co-authored-by: Anjandev Momi <anjan@momi.ca>
Co-authored-by: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
---
 common/shlibs                   |  2 +-
 srcpkgs/guile/patches/zfs.patch | 22 ++++++++++++++++++++++
 srcpkgs/guile/template          | 28 ++++++++--------------------
 3 files changed, 31 insertions(+), 21 deletions(-)
 create mode 100644 srcpkgs/guile/patches/zfs.patch

diff --git a/common/shlibs b/common/shlibs
index 5cfafa2be55b75..829a15403160d0 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1408,7 +1408,7 @@ libgda-xslt-5.0.so.4 libgda-5.2.9_4
 libamtk-5.so.0 amtk-5.0.0_1
 libdevhelp-3.so.6 devhelp-libs-3.30.0_1
 libunistring.so.2 libunistring-0.9.4_1
-libguile-2.2.so.1 libguile-2.2.7_1
+libguile-3.0.so.1 libguile-3.0.10_1
 libopts.so.25 libopts-5.18.4_6
 libanjuta-3.so.0 anjuta-3.8.4_1
 libgmlib.so.1 gmtk-1.0.8_1
diff --git a/srcpkgs/guile/patches/zfs.patch b/srcpkgs/guile/patches/zfs.patch
new file mode 100644
index 00000000000000..114e1e8b47c8dc
--- /dev/null
+++ b/srcpkgs/guile/patches/zfs.patch
@@ -0,0 +1,22 @@
+These tests fail on ZFS, apparently.
+
+--- a/test-suite/tests/ports.test
++++ b/test-suite/tests/ports.test
+@@ -207,7 +207,7 @@
+                 (throw 'unresolved)))))
+         (throw 'unresolved)))
+ 
+-  (pass-if-equal "SEEK_DATA while in hole"
++  #;(pass-if-equal "SEEK_DATA while in hole"
+       4096
+     (if (defined? 'SEEK_DATA)
+         (call-with-input-file file
+@@ -219,7 +219,7 @@
+                 (throw 'unresolved)))))
+         (throw 'unresolved)))
+ 
+-  (pass-if-equal "SEEK_HOLE while in hole"
++  #;(pass-if-equal "SEEK_HOLE while in hole"
+       10
+     (if (defined? 'SEEK_HOLE)
+         (call-with-input-file file
diff --git a/srcpkgs/guile/template b/srcpkgs/guile/template
index 517b84e45bd2ec..5100d2d7273e73 100644
--- a/srcpkgs/guile/template
+++ b/srcpkgs/guile/template
@@ -1,42 +1,30 @@
 # Template file for 'guile'
 pkgname=guile
-version=2.2.7
-revision=3
+version=3.0.10
+revision=1
 build_style=gnu-configure
 configure_args="--disable-static --disable-error-on-warning"
 hostmakedepends="pkg-config texinfo"
 makedepends="gc-devel gmp-devel libatomic_ops-devel libffi-devel libltdl-devel
  libunistring-devel readline-devel"
 short_desc="Portable, embeddable Scheme implementation written in C"
-maintainer="Orphaned <orphan@voidlinux.org>"
+maintainer="Anjandev Momi <anjan@momi.ca>"
 license="GPL-3.0-or-later, LGPL-3.0-or-later"
 homepage="http://www.gnu.org/software/guile"
-distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
-checksum=44b4c5fbbe257ccdebea18420212c9b3e90c3c86a54920d8554039fc6769a007
-subpackages="libguile guile-devel"
-
-if [ "$XBPS_ENDIAN" != "$XBPS_TARGET_ENDIAN" ]; then
-	broken="opposite-endian host generates broken files"
-fi
-
-if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
-	makedepends+=" libxcrypt-devel"
-fi
+distfiles="${GNU_SITE}/guile/guile-${version}.tar.gz"
+checksum=2dbdbc97598b2faf31013564efb48e4fed44131d28e996c26abe8a5b23b56c2a
 
 if [ "$CROSS_BUILD" ]; then
 	# Need host guile to cross compile
+	export GUILE_FOR_BUILD=guile
 	hostmakedepends+=" guile"
 fi
 
-post_extract() {
-	# broken files causing crash
-	rm -rf prebuilt/32-bit-big-endian
-}
-
 libguile_package() {
 	short_desc+=" - runtime library"
 	pkg_install() {
 		vmove "usr/lib/*.so.*"
+		vmove "usr/lib/guile/3.0/extensions/guile-readline.so.*"
 		vmkdir usr/share/gdb/auto-load/usr/lib
 		mv ${PKGDESTDIR}/usr/lib/*.scm ${PKGDESTDIR}/usr/share/gdb/auto-load/usr/lib
 	}
@@ -44,7 +32,7 @@ libguile_package() {
 
 guile-devel_package() {
 	short_desc+=" - development files"
-	depends="gmp-devel gc-devel guile>=${version}_${revision} libatomic_ops-devel"
+	depends="gmp-devel gc-devel guile>=${version}_${revision}"
 	pkg_install() {
 		vmove usr/bin/guile-config
 		vmove usr/include

From 2dd8135f3e71ea4274ba20e7634474dcdc4b48d1 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Tue, 30 Jul 2024 20:38:51 +0200
Subject: [PATCH 02/11] trackballs: rebuild for guile-3.0.10_1.

---
 srcpkgs/trackballs/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/trackballs/template b/srcpkgs/trackballs/template
index f4131d3ca667ca..ecc3cb060a5a81 100644
--- a/srcpkgs/trackballs/template
+++ b/srcpkgs/trackballs/template
@@ -1,7 +1,7 @@
 # Template file for 'trackballs'
 pkgname=trackballs
 version=1.3.3
-revision=1
+revision=2
 build_style=cmake
 hostmakedepends="gettext guile pkg-config"
 makedepends="zlib-devel SDL2_image-devel SDL2_mixer-devel SDL2_ttf-devel guile-devel"

From 79fd1578d157fdec4cb859d9f248112d2fbd9f6c Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Tue, 30 Jul 2024 20:57:33 +0200
Subject: [PATCH 03/11] xbindkeys: patch for guile3.

---
 srcpkgs/xbindkeys/patches/guile3.patch | 25 +++++++++++++++++++++++++
 srcpkgs/xbindkeys/template             |  8 ++++++--
 2 files changed, 31 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/xbindkeys/patches/guile3.patch

diff --git a/srcpkgs/xbindkeys/patches/guile3.patch b/srcpkgs/xbindkeys/patches/guile3.patch
new file mode 100644
index 00000000000000..f14eec52ecb1d6
--- /dev/null
+++ b/srcpkgs/xbindkeys/patches/guile3.patch
@@ -0,0 +1,25 @@
+From 75909d99b18ddc76c78bf7b9e184de46d3d24468 Mon Sep 17 00:00:00 2001
+From: Evgeny Ratnikov <ratnikov.ev@gmail.com>
+Date: Sun, 14 Jun 2020 22:13:59 +0200
+Subject: add support for GNU Guile 3 to xbindkeys
+
+---
+ aclocal.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 6dfea6d..647b5fd 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -48,7 +48,7 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
+ #
+ AC_DEFUN([GUILE_PKG],
+  [PKG_PROG_PKG_CONFIG
+-  _guile_versions_to_search="m4_default([$1], [2.2 2.0 1.8])"
++  _guile_versions_to_search="m4_default([$1], [3.0 2.2 2.0 1.8])"
+   if test -n "$GUILE_EFFECTIVE_VERSION"; then
+     _guile_tmp=""
+     for v in $_guile_versions_to_search; do
+-- 
+cgit v1.1
+
diff --git a/srcpkgs/xbindkeys/template b/srcpkgs/xbindkeys/template
index 54486843942aab..87b2482ddac1af 100644
--- a/srcpkgs/xbindkeys/template
+++ b/srcpkgs/xbindkeys/template
@@ -1,9 +1,9 @@
 # Template file for 'xbindkeys'
 pkgname=xbindkeys
 version=1.8.7
-revision=2
+revision=3
 build_style=gnu-configure
-hostmakedepends="pkg-config"
+hostmakedepends="automake gettext-devel pkg-config"
 makedepends="libX11-devel guile-devel guile gc-devel"
 depends="guile"
 short_desc="Launch shell commands with your keyboard or your mouse under X"
@@ -12,3 +12,7 @@ license="GPL-2.0-or-later"
 homepage="http://www.nongnu.org/xbindkeys/xbindkeys.html"
 distfiles="http://www.nongnu.org/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum=a29b86a8ec91d4abc83b420e547da27470847d0efe808aa6e75147aa0adb82f2
+
+pre_configure() {
+	autoreconf -fi
+}

From 35e5c87c88d0169f429291e8a922bd822f21cabc Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Tue, 30 Jul 2024 21:01:24 +0200
Subject: [PATCH 04/11] autogen: patch for guile3.

---
 .../autogen/patches/autogen-guile-3.0.patch   | 50 +++++++++++++++++++
 srcpkgs/autogen/template                      |  8 ++-
 2 files changed, 56 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/autogen/patches/autogen-guile-3.0.patch

diff --git a/srcpkgs/autogen/patches/autogen-guile-3.0.patch b/srcpkgs/autogen/patches/autogen-guile-3.0.patch
new file mode 100644
index 00000000000000..0bc44c38c89250
--- /dev/null
+++ b/srcpkgs/autogen/patches/autogen-guile-3.0.patch
@@ -0,0 +1,50 @@
+https://sourceforge.net/p/autogen/bugs/_discuss/thread/9e39945a9c/1a10/attachment/autogen-guile-3.0.patch
+
+Index: autogen-5.18.16/agen5/guile-iface.h
+===================================================================
+--- autogen-5.18.16.orig/agen5/guile-iface.h
++++ autogen-5.18.16/agen5/guile-iface.h
+@@ -9,16 +9,13 @@
+ # error AutoGen does not work with this version of Guile
+   choke me.
+ 
+-#elif GUILE_VERSION < 203000
++#else
+ # define AG_SCM_IS_PROC(_p)           scm_is_true( scm_procedure_p(_p))
+ # define AG_SCM_LIST_P(_l)            scm_is_true( scm_list_p(_l))
+ # define AG_SCM_PAIR_P(_p)            scm_is_true( scm_pair_p(_p))
+ # define AG_SCM_TO_LONG(_v)           scm_to_long(_v)
+ # define AG_SCM_TO_ULONG(_v)          ((unsigned long)scm_to_ulong(_v))
+ 
+-#else
+-# error unknown GUILE_VERSION
+-  choke me.
+ #endif
+ 
+ #endif /* MUTATING_GUILE_IFACE_H_GUARD */
+Index: autogen-5.18.16/configure
+===================================================================
+--- autogen-5.18.16.orig/configure
++++ autogen-5.18.16/configure
+@@ -14798,7 +14798,7 @@ $as_echo "no" >&6; }
+ 		PKG_CONFIG=""
+ 	fi
+ fi
+-  _guile_versions_to_search="2.2 2.0 1.8"
++  _guile_versions_to_search="3.0 2.2 2.0 1.8"
+   if test -n "$GUILE_EFFECTIVE_VERSION"; then
+     _guile_tmp=""
+     for v in $_guile_versions_to_search; do
+Index: autogen-5.18.16/config/guile.m4
+===================================================================
+--- autogen-5.18.16.orig/config/guile.m4
++++ autogen-5.18.16/config/guile.m4
+@@ -61,7 +61,7 @@
+ #
+ AC_DEFUN([GUILE_PKG],
+  [PKG_PROG_PKG_CONFIG
+-  _guile_versions_to_search="m4_default([$1], [2.2 2.0 1.8])"
++  _guile_versions_to_search="m4_default([$1], [3.0 2.2 2.0 1.8])"
+   if test -n "$GUILE_EFFECTIVE_VERSION"; then
+     _guile_tmp=""
+     for v in $_guile_versions_to_search; do
diff --git a/srcpkgs/autogen/template b/srcpkgs/autogen/template
index 851d17e0c12866..9881398c025bce 100644
--- a/srcpkgs/autogen/template
+++ b/srcpkgs/autogen/template
@@ -1,10 +1,10 @@
 # Template file for 'autogen'
 pkgname=autogen
 version=5.18.16
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="--disable-static --disable-dependency-tracking --without-libregex"
-hostmakedepends="guile pkg-config perl tar which"
+hostmakedepends="automake guile libtool perl pkg-config tar which"
 makedepends="guile guile-devel libatomic_ops-devel libxml2-devel gc-devel"
 depends="guile perl"
 short_desc="Automated Program Generator"
@@ -22,6 +22,10 @@ if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" autogen guile-devel"
 fi
 
+pre_configure() {
+	autoreconf -fi
+}
+
 post_install() {
 	if [ "$SOURCE_DATE_EPOCH" ]; then
 		# repackaging libopts to apply correct mtimes

From f340b714a95e167a9fde70d66a6fd75c0a50e9a0 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Tue, 30 Jul 2024 21:15:15 +0200
Subject: [PATCH 05/11] lilypond: update to 2.24.4.

---
 srcpkgs/lilypond/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/lilypond/template b/srcpkgs/lilypond/template
index 622930eab4c3ee..e898d5d050b2c3 100644
--- a/srcpkgs/lilypond/template
+++ b/srcpkgs/lilypond/template
@@ -1,7 +1,7 @@
 # Template file for 'lilypond'
 # should be kept in sync with 'lilypond-doc'
 pkgname=lilypond
-version=2.24.3
+version=2.24.4
 revision=1
 build_wrksrc="build"
 build_style="gnu-configure"
@@ -18,7 +18,7 @@ maintainer="newbluemoon <blaumolch@mailbox.org>"
 license="GPL-3.0-or-later, GFDL-1.3-or-later"
 homepage="https://lilypond.org/"
 distfiles="https://lilypond.org/downloads/sources/v${version%.*}/lilypond-${version}.tar.gz"
-checksum=df005f76ef7af5a4cd74a10f8e7115278b7fa79f14018937b65c109498ec44be
+checksum=e96fa03571c79f20e1979653afabdbe4ee42765a3d9fd14953f0cd9eea51781c
 python_version=3
 make_check=ci-skip # ci sometimes fails, but all checks pass locally
 

From f7bc53cab9b7c6e63ee7e3d491a3a193a3176e6d Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Tue, 30 Jul 2024 21:21:09 +0200
Subject: [PATCH 06/11] lilypond-doc: update to 2.24.4.

---
 srcpkgs/lilypond-doc/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/lilypond-doc/template b/srcpkgs/lilypond-doc/template
index f439389079194a..523033b16cde06 100644
--- a/srcpkgs/lilypond-doc/template
+++ b/srcpkgs/lilypond-doc/template
@@ -1,14 +1,14 @@
 # Template file for 'lilypond-doc'
 # should be kept in sync with 'lilypond'
 pkgname=lilypond-doc
-version=2.24.3
+version=2.24.4
 revision=1
 short_desc="Documentation for the lilypond music engraving program"
 maintainer="newbluemoon <blaumolch@mailbox.org>"
 license="GPL-3.0-or-later, GFDL-1.3-or-later"
 homepage="https://lilypond.org/"
 distfiles="https://gitlab.com/lilypond/lilypond/-/releases/v${version}/downloads/lilypond-${version}-documentation.tar.xz"
-checksum=58e41af8f4691cf518d4204ad2b278abde9ff2139a54453d17bcb90a15d7e5b7
+checksum=b387da765df1e5907800ce99af66418f50c2100ddcfb6e50911b84b65d722b3b
 
 do_install() {
 	vmkdir usr/share

From a34b55c61e5123a1312edbee53510a7c2524f76d Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Tue, 30 Jul 2024 21:15:21 +0200
Subject: [PATCH 07/11] gnucash: rebuild for guile-3.0.10_1.

---
 srcpkgs/gnucash/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gnucash/template b/srcpkgs/gnucash/template
index 6a3641a8dd69ff..d7ddcbb49f1373 100644
--- a/srcpkgs/gnucash/template
+++ b/srcpkgs/gnucash/template
@@ -1,7 +1,7 @@
 # Template file for 'gnucash'
 pkgname=gnucash
 version=5.8
-revision=1
+revision=2
 build_style=cmake
 make_check_target=check
 configure_args="-DWITH_PYTHON=1 -DCOMPILE_GSCHEMAS=OFF"

From 31f97509d422354bde80cba157078674f9f158d2 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Tue, 30 Jul 2024 21:19:20 +0200
Subject: [PATCH 08/11] aisleriot: rebuild for guile-3.0.10_1.

---
 srcpkgs/aisleriot/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/aisleriot/template b/srcpkgs/aisleriot/template
index 57a7fdc8a06183..47159c6b0247da 100644
--- a/srcpkgs/aisleriot/template
+++ b/srcpkgs/aisleriot/template
@@ -1,7 +1,7 @@
 # Template file for 'aisleriot'
 pkgname=aisleriot
 version=3.22.33
-revision=1
+revision=2
 build_style=meson
 # build requires assertions to be turned on -> n_debug=false
 configure_args="-Dtheme_pysol_path=/usr/share/PySolFC/cardsets -Dtheme_pysol=true

From 1b7b880beb58015ba881ea1965696271e91feda1 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Tue, 30 Jul 2024 21:20:04 +0200
Subject: [PATCH 09/11] guile-wisp: update to 1.0.12.

---
 srcpkgs/guile-wisp/patches/escape.patch | 11 +++++++++++
 srcpkgs/guile-wisp/template             | 14 +++++++++-----
 2 files changed, 20 insertions(+), 5 deletions(-)
 create mode 100644 srcpkgs/guile-wisp/patches/escape.patch

diff --git a/srcpkgs/guile-wisp/patches/escape.patch b/srcpkgs/guile-wisp/patches/escape.patch
new file mode 100644
index 00000000000000..b70da5f4e40325
--- /dev/null
+++ b/srcpkgs/guile-wisp/patches/escape.patch
@@ -0,0 +1,11 @@
+--- a/wisp.py
++++ b/wisp.py
+@@ -101,7 +101,7 @@
+                 line = (i)*" " + line[i:]
+         # \_ escapes the underscore at the beginning of a line, so you
+         # can use identifiers which only consist of underscores.
+-        elif line.startswith("\_"):
++        elif line.startswith("\\_"):
+             line = "_" + line[2:]
+             
+         #: prefix to go around the outer bracket: '(, ,( or `(
diff --git a/srcpkgs/guile-wisp/template b/srcpkgs/guile-wisp/template
index 6616a05384b70d..0b47a7c1a7730f 100644
--- a/srcpkgs/guile-wisp/template
+++ b/srcpkgs/guile-wisp/template
@@ -1,15 +1,19 @@
 # Template file for 'guile-wisp'
 pkgname=guile-wisp
-version=1.0.2
+version=1.0.12
 revision=1
 build_style=gnu-configure
 configure_args="--datarootdir=/usr/share"
-hostmakedepends="guile pkg-config python3"
+hostmakedepends="automake guile pkg-config python3"
 makedepends="guile-devel"
-depends="guile>=2.0"
+depends="guile"
 short_desc="SRFI-119 (WISP, Whitespace Lisp) implementation for guile"
 maintainer="B. Wilson <x@wilsonb.com>"
 license="GPL-3.0-or-later"
 homepage="https://www.draketo.de/english/wisp"
-distfiles="https://bitbucket.org/ArneBab/wisp/downloads/wisp-${version}.tar.gz"
-checksum=c66d2bdf0ceffce7322783288ab40bb2a1aef0d1e55207ada7547999e43dff0e
+distfiles="https://hg.sr.ht/~arnebab/wisp/archive/v${version}.tar.gz"
+checksum=ad993295163ec64fef1a9ca69076caa4ecf338e7c90dd95d83c55e50d1984ac4
+
+pre_configure() {
+	autoreconf -fi
+}

From 35f1886f3f108bd1ca18ea8002d21e6b23489797 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 31 Jul 2024 14:49:19 +0200
Subject: [PATCH 10/11] guile: fix cross.

---
 srcpkgs/guile/patches/cross.patch | 45 +++++++++++++++++++++++++++++++
 srcpkgs/guile/template            |  9 ++++---
 2 files changed, 51 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/guile/patches/cross.patch

diff --git a/srcpkgs/guile/patches/cross.patch b/srcpkgs/guile/patches/cross.patch
new file mode 100644
index 00000000000000..ffc0f00d200056
--- /dev/null
+++ b/srcpkgs/guile/patches/cross.patch
@@ -0,0 +1,45 @@
+From c117f8edc471d3362043d88959d73c6a37e7e1e9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
+Date: Wed, 17 Jul 2024 00:00:00 +0200
+Subject: build: Fix in-tree cross-compilation build.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Commit 57a889b7282dab303c4cdc49cccbbe22f961bd1c fixed out-of-tree
+cross-compilation builds but broke in-tree cross-compilation builds.
+With this change, we should have both.
+
+* libguile/Makefile.am (gen-scmconfig.$(OBJEXT)): Use ‘-iquote’ instead
+of ‘-I’.
+---
+ libguile/Makefile.am | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/libguile/Makefile.am b/libguile/Makefile.am
+index 8d8fa27..ce97aba 100644
+--- a/libguile/Makefile.am
++++ b/libguile/Makefile.am
+@@ -62,15 +62,14 @@ gen_scmconfig_SOURCES = gen-scmconfig.c
+ ## Override default rule; this should be compiled for BUILD host.  Note
+ ## that we don't add $(AM_CPPFLAGS) here, as we need to run this
+ ## program, but $(top_srcdir)/lib has a gnulib configured for the
+-## target.  Instead we manually add $(top_builddir) and the current
+-## directory, in order to pick up the generated config.h and
+-## gen-scmconfig.h.  Nothing else from Guile is included by this code
+-## generator.
++## target.  Instead we manually add $(top_builddir) and $(builddir), in
++## order to pick up the generated config.h and gen-scmconfig.h.  Nothing
++## else from Guile is included by this code generator.
+ gen-scmconfig.$(OBJEXT): gen-scmconfig.c
+ 	$(AM_V_GEN) \
+ 	if [ "$(cross_compiling)" = "yes" ]; then \
+ 		$(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) -I$(top_builddir) \
+-		   -I. -c -o $@ $<; \
++		   -iquote$(builddir) -c -o $@ $<; \
+ 	else \
+ 		$(COMPILE) -c -o $@ $<; \
+ 	fi
+-- 
+cgit v1.1
+
diff --git a/srcpkgs/guile/template b/srcpkgs/guile/template
index 5100d2d7273e73..0e29d2c813f227 100644
--- a/srcpkgs/guile/template
+++ b/srcpkgs/guile/template
@@ -3,8 +3,11 @@ pkgname=guile
 version=3.0.10
 revision=1
 build_style=gnu-configure
-configure_args="--disable-static --disable-error-on-warning"
-hostmakedepends="pkg-config texinfo"
+configure_args="--disable-static --disable-error-on-warning
+ --with-libgmp-prefix=${XBPS_CROSS_BASE}/usr
+ --with-libunistring-prefix=${XBPS_CROSS_BASE}/usr
+ --with-libreadline-prefix=${XBPS_CROSS_BASE}/usr"
+hostmakedepends="automake pkg-config texinfo"
 makedepends="gc-devel gmp-devel libatomic_ops-devel libffi-devel libltdl-devel
  libunistring-devel readline-devel"
 short_desc="Portable, embeddable Scheme implementation written in C"
@@ -16,7 +19,7 @@ checksum=2dbdbc97598b2faf31013564efb48e4fed44131d28e996c26abe8a5b23b56c2a
 
 if [ "$CROSS_BUILD" ]; then
 	# Need host guile to cross compile
-	export GUILE_FOR_BUILD=guile
+	export GUILE_FOR_BUILD=/usr/bin/guile
 	hostmakedepends+=" guile"
 fi
 

From 0b827c33baa51ebdc14c4fc6117330e684fd2b63 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 31 Jul 2024 18:35:29 +0200
Subject: [PATCH 11/11] guile: fix 32-bit?

---
 srcpkgs/guile/patches/revert-logand.patch | 78 +++++++++++++++++++++++
 srcpkgs/guile/patches/test-hashing.patch  | 35 ++++++++++
 2 files changed, 113 insertions(+)
 create mode 100644 srcpkgs/guile/patches/revert-logand.patch
 create mode 100644 srcpkgs/guile/patches/test-hashing.patch

diff --git a/srcpkgs/guile/patches/revert-logand.patch b/srcpkgs/guile/patches/revert-logand.patch
new file mode 100644
index 00000000000000..1f7d80aef1bc03
--- /dev/null
+++ b/srcpkgs/guile/patches/revert-logand.patch
@@ -0,0 +1,78 @@
+Revert of https://git.savannah.gnu.org/cgit/guile.git/commit/?id=d579848cb5d65440af5afd9c8968628665554c22
+
+--- b/module/language/cps/specialize-numbers.scm
++++ a/module/language/cps/specialize-numbers.scm
+@@ -284,23 +284,18 @@
+ 
+ (define significant-bits-handlers (make-hash-table))
+ (define-syntax-rule (define-significant-bits-handler
++                      ((primop label types out def ...) arg ...)
+-                      ((primop label types out def ...) param arg ...)
+                       body ...)
+   (hashq-set! significant-bits-handlers 'primop
+               (lambda (label types out param args defs)
+                 (match args ((arg ...) (match defs ((def ...) body ...)))))))
+ 
++(define-significant-bits-handler ((logand label types out res) a b)
+-(define-significant-bits-handler ((logand label types out res) param a b)
+   (let ((sigbits (sigbits-intersect3 (inferred-sigbits types label a)
+                                      (inferred-sigbits types label b)
+                                      (intmap-ref out res (lambda (_) 0)))))
+     (intmap-add (intmap-add out a sigbits sigbits-union)
+                 b sigbits sigbits-union)))
+-(define-significant-bits-handler ((logand/immediate label types out res) param a)
+-  (let ((sigbits (sigbits-intersect3 (inferred-sigbits types label a)
+-                                     param
+-                                     (intmap-ref out res (lambda (_) 0)))))
+-    (intmap-add out a sigbits sigbits-union)))
+ 
+ (define (significant-bits-handler primop)
+   (hashq-ref significant-bits-handlers primop))
+@@ -561,11 +556,11 @@
+               (specialize-unop cps k src op param a
+                                (unbox-u64 a) (box-u64 result))))
+ 
++           (('logand/immediate (? u64-result? ) param a)
+-           (('logand/immediate (? u64-result? ) param (? u64-operand? a))
+             (specialize-unop cps k src 'ulogand/immediate
+                              (logand param (1- (ash 1 64)))
+                              a
++                             (unbox-u64/truncate a) (box-u64 result)))
+-                             (unbox-u64 a) (box-u64 result)))
+ 
+            (((or 'add/immediate 'sub/immediate 'mul/immediate)
+              (? s64-result?) (? s64-parameter?) (? s64-operand? a))
+--- b/module/language/cps/type-fold.scm
++++ a/module/language/cps/type-fold.scm
+@@ -692,9 +692,13 @@
+    ((and (eqv? type1 &fixnum) (eqv? min1 max1) (power-of-two? min1)
+          (<= 0 min0))
+     (with-cps cps
++      (letv mask)
++      (letk kmask
++            ($kargs ('mask) (mask)
++              ($continue k src
++                ($primcall 'logand #f (arg0 mask)))))
+       (build-term
++        ($continue kmask src ($const (1- min1))))))
+-        ($continue k src
+-          ($primcall 'logand/immediate (1- min1) (arg0))))))
+    (else
+     (with-cps cps #f))))
+ 
+@@ -706,9 +710,13 @@
+     (with-cps cps #f))
+    ((and (eqv? type1 &fixnum) (eqv? min1 max1) (power-of-two? min1))
+     (with-cps cps
++      (letv mask)
++      (letk kmask
++            ($kargs ('mask) (mask)
++              ($continue k src
++                ($primcall 'logand #f (arg0 mask)))))
+       (build-term
++        ($continue kmask src ($const (1- min1))))))
+-        ($continue k src
+-          ($primcall 'logand/immediate (1- min1) (arg0))))))
+    (else
+     (with-cps cps #f))))
+ 
diff --git a/srcpkgs/guile/patches/test-hashing.patch b/srcpkgs/guile/patches/test-hashing.patch
new file mode 100644
index 00000000000000..0e4c65cc640cac
--- /dev/null
+++ b/srcpkgs/guile/patches/test-hashing.patch
@@ -0,0 +1,35 @@
+From ad1f56675be58fbb7bfee6fab166ff5bf0b36a11 Mon Sep 17 00:00:00 2001
+From: Rob Browning <rlb@defaultvalue.org>
+Date: Mon, 1 Jul 2024 02:14:37 -0500
+Subject: test-hashing: support 32-bit
+
+* test-suite/standalone/test-hashing.c (test_hashing): add expected
+value for 32-bit architectures.
+---
+ test-suite/standalone/test-hashing.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/test-suite/standalone/test-hashing.c b/test-suite/standalone/test-hashing.c
+index 5982a0f..50e1329 100644
+--- a/test-suite/standalone/test-hashing.c
++++ b/test-suite/standalone/test-hashing.c
+@@ -38,9 +38,15 @@ test_hashing ()
+ 
+   // Value determined by calling wide_string_hash on {0x3A0, 0x3B5,
+   // 0x3C1, 0x3AF} via a temporary test program.
++#if SIZEOF_UNSIGNED_LONG == 8
+   const unsigned long expect = 4029223418961680680;
+-  const unsigned long actual = scm_to_ulong (scm_symbol_hash (sym));
++#elif SIZEOF_UNSIGNED_LONG == 4
++  const unsigned long expect = 938126682;
++#else
++#error "unsigned long not 4 or 8 bytes (need additonal test data)"
++#endif
+ 
++  const unsigned long actual = scm_to_ulong (scm_symbol_hash (sym));
+   if (actual != expect)
+     {
+       fprintf (stderr, "fail: unexpected utf-8 symbol hash (%lu != %lu)\n",
+-- 
+cgit v1.1
+

  parent reply	other threads:[~2024-07-31 16:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30 19:30 [PR PATCH] " leahneukirchen
2024-07-30 20:45 ` [PR PATCH] [Updated] " leahneukirchen
2024-07-31 16:36 ` leahneukirchen [this message]
2024-08-01 12:25 ` leahneukirchen
2024-08-02 13:36 ` leahneukirchen
2024-08-03 14:49 ` leahneukirchen
2024-08-03 16:12 ` leahneukirchen
2024-09-08 14:43 ` newbluemoon
2024-09-08 16:55 ` [PR PATCH] [Updated] " leahneukirchen
2024-09-08 18:25 ` [PR PATCH] [Merged]: " leahneukirchen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240731163608.184AC26B11@inbox.vuxu.org \
    --to=leahneukirchen@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).