diff --git a/steps-guix/guile-avahi-0.4.1/pass1.sh b/steps-guix/guile-avahi-0.4.1/pass1.sh index 3e66653b..b02095dd 100755 --- a/steps-guix/guile-avahi-0.4.1/pass1.sh +++ b/steps-guix/guile-avahi-0.4.1/pass1.sh @@ -40,6 +40,7 @@ src_configure() { src_compile() { local pkg_config_path guile_cflags guile_static_libs avahi_cflags avahi_static_libs + local gnutls_static_libs guile_gnutls_static_lib pkg_config_path="${LIBDIR}/pkgconfig:${PREFIX}/lib/pkgconfig:${PREFIX}/share/pkgconfig" guile_cflags="$(PKG_CONFIG_LIBDIR="${pkg_config_path}" PKG_CONFIG_PATH="${pkg_config_path}" \ /usr/bin/pkg-config --cflags guile-3.0)" @@ -49,17 +50,23 @@ src_compile() { /usr/bin/pkg-config --cflags avahi-client)" avahi_static_libs="$(PKG_CONFIG_LIBDIR="${pkg_config_path}" PKG_CONFIG_PATH="${pkg_config_path}" \ /usr/bin/pkg-config --static --libs avahi-client)" + gnutls_static_libs="$(PKG_CONFIG_LIBDIR="${pkg_config_path}" PKG_CONFIG_PATH="${pkg_config_path}" \ + /usr/bin/pkg-config --static --libs gnutls)" + guile_gnutls_static_lib="${LIBDIR}/libguile-gnutls-static.a" CPPFLAGS="${guile_cflags} ${avahi_cflags} ${CPPFLAGS:-}" \ GUILE_CFLAGS="${guile_cflags}" \ GUILE_LDFLAGS="${guile_static_libs}" \ AVAHI_CFLAGS="${avahi_cflags}" \ AVAHI_LIBS="${avahi_static_libs}" \ + GNUTLS_LIBS="${gnutls_static_libs}" \ + GUILE_GNUTLS_STATIC_LIB="${guile_gnutls_static_lib}" \ default_src_compile } src_install() { local pkg_config_path guile_cflags guile_static_libs avahi_cflags avahi_static_libs + local gnutls_static_libs guile_gnutls_static_lib pkg_config_path="${LIBDIR}/pkgconfig:${PREFIX}/lib/pkgconfig:${PREFIX}/share/pkgconfig" guile_cflags="$(PKG_CONFIG_LIBDIR="${pkg_config_path}" PKG_CONFIG_PATH="${pkg_config_path}" \ /usr/bin/pkg-config --cflags guile-3.0)" @@ -69,12 +76,17 @@ src_install() { /usr/bin/pkg-config --cflags avahi-client)" avahi_static_libs="$(PKG_CONFIG_LIBDIR="${pkg_config_path}" PKG_CONFIG_PATH="${pkg_config_path}" \ /usr/bin/pkg-config --static --libs avahi-client)" + gnutls_static_libs="$(PKG_CONFIG_LIBDIR="${pkg_config_path}" PKG_CONFIG_PATH="${pkg_config_path}" \ + /usr/bin/pkg-config --static --libs gnutls)" + guile_gnutls_static_lib="${LIBDIR}/libguile-gnutls-static.a" CPPFLAGS="${guile_cflags} ${avahi_cflags} ${CPPFLAGS:-}" \ GUILE_CFLAGS="${guile_cflags}" \ GUILE_LDFLAGS="${guile_static_libs}" \ AVAHI_CFLAGS="${avahi_cflags}" \ AVAHI_LIBS="${avahi_static_libs}" \ + GNUTLS_LIBS="${gnutls_static_libs}" \ + GUILE_GNUTLS_STATIC_LIB="${guile_gnutls_static_lib}" \ default_src_install } @@ -98,5 +110,9 @@ src_postprocess() { GUILE_LOAD_COMPILED_PATH="${guile_site_ccache}:${guile_core_ccache}" \ GUILE_SYSTEM_PATH="${guile_site_path}:${guile_core_site}" \ GUILE_SYSTEM_COMPILED_PATH="${guile_site_ccache}:${guile_core_ccache}" \ - "${DESTDIR}${PREFIX}/bin/guile" -c '(use-modules (avahi) (avahi client)) (display "avahi-module-ok\n")' + "${DESTDIR}${PREFIX}/bin/guile" -c ' + (use-modules (avahi) (avahi client) (gnutls)) + (unless (session? (make-session connection-end/client)) + (error "gnutls session init failed")) + (display "avahi+gnutls-modules-ok\n")' } diff --git a/steps-guix/guile-avahi-0.4.1/patches/static-link-avahi-bindings.patch b/steps-guix/guile-avahi-0.4.1/patches/static-link-avahi-bindings.patch index 41d75fb7..e4c56006 100644 --- a/steps-guix/guile-avahi-0.4.1/patches/static-link-avahi-bindings.patch +++ b/steps-guix/guile-avahi-0.4.1/patches/static-link-avahi-bindings.patch @@ -21,7 +21,7 @@ diff -urN guile-avahi-0.4.1/Makefile.am guile-avahi-0.4.1/Makefile.am nobase_guileextension_LTLIBRARIES = guile-avahi-v-0.la # Use '-module' to build a "dlopenable module", in Libtool terms. -@@ -72,11 +78,28 @@ +@@ -72,11 +78,29 @@ src/utils.c src/errors.c src/watch.c \ src/common.c src/client.c \ src/publish.c src/lookup.c @@ -46,7 +46,8 @@ diff -urN guile-avahi-0.4.1/Makefile.am guile-avahi-0.4.1/Makefile.am +guile_CPPFLAGS = $(AM_CPPFLAGS) +guile_CFLAGS = $(guile_avahi_common_cflags) +guile_LDFLAGS = -static -+guile_LDADD = libguile-avahi-static.a $(GUILE_LDFLAGS) $(AVAHI_LIBS) $(LIBS) ++guile_LDADD = libguile-avahi-static.a $(GUILE_GNUTLS_STATIC_LIB) \ ++ $(GUILE_LDFLAGS) $(AVAHI_LIBS) $(GNUTLS_LIBS) $(LIBS) +endif + AM_CFLAGS = $(GCC_CFLAGS) @@ -141,9 +142,10 @@ diff -urN guile-avahi-0.4.1/modules/avahi/client.scm guile-avahi-0.4.1/modules/a diff -urN guile-avahi-0.4.1/src/guile-static-main.c guile-avahi-0.4.1/src/guile-static-main.c --- guile-avahi-0.4.1/src/guile-static-main.c 1969-12-31 19:00:00 +++ guile-avahi-0.4.1/src/guile-static-main.c 2026-03-08 10:22:35 -@@ -0,0 +1,24 @@ +@@ -0,0 +1,26 @@ +#include + ++void scm_init_gnutls(void); +void scm_avahi_common_init(void); +void scm_avahi_client_init(void); +void scm_avahi_lookup_init(void); @@ -153,6 +155,7 @@ diff -urN guile-avahi-0.4.1/src/guile-static-main.c guile-avahi-0.4.1/src/guile- +inner_main(void *closure, int argc, char **argv) +{ + (void) closure; ++ scm_init_gnutls(); + scm_avahi_common_init(); + scm_avahi_client_init(); + scm_avahi_lookup_init(); diff --git a/steps-guix/guile-gnutls-v5.0.1/pass1.sh b/steps-guix/guile-gnutls-v5.0.1/pass1.sh index 07331852..e1e767ae 100644 --- a/steps-guix/guile-gnutls-v5.0.1/pass1.sh +++ b/steps-guix/guile-gnutls-v5.0.1/pass1.sh @@ -77,10 +77,14 @@ src_postprocess() { guile_site_ccache="${DESTDIR}${LIBDIR}/guile/3.0/site-ccache:${LIBDIR}/guile/3.0/site-ccache" guile_core_ccache="${LIBDIR}/guile/3.0/ccache" - PATH="${PREFIX}/bin:/usr/bin:/bin" \ + PATH="${DESTDIR}${PREFIX}/bin:${PREFIX}/bin:/usr/bin:/bin" \ GUILE_LOAD_PATH="${guile_site_path}" \ GUILE_LOAD_COMPILED_PATH="${guile_site_ccache}:${guile_core_ccache}" \ GUILE_SYSTEM_PATH="${guile_site_path}" \ GUILE_SYSTEM_COMPILED_PATH="${guile_site_ccache}:${guile_core_ccache}" \ - "${DESTDIR}${PREFIX}/bin/guile" -c '(use-modules (gnutls)) (display "gnutls-module-ok\n")' + "${DESTDIR}${PREFIX}/bin/guile" -c ' + (use-modules (gnutls)) + (unless (session? (make-session connection-end/client)) + (error "gnutls session init failed")) + (display "gnutls-module-ok\n")' } diff --git a/steps-guix/guile-lzlib-0.3.0/pass1.sh b/steps-guix/guile-lzlib-0.3.0/pass1.sh index 0215e50f..53e79dc2 100644 --- a/steps-guix/guile-lzlib-0.3.0/pass1.sh +++ b/steps-guix/guile-lzlib-0.3.0/pass1.sh @@ -28,3 +28,21 @@ src_compile() { src_install() { default_src_install } + +src_postprocess() { + local guile_site_path guile_core_site guile_site_ccache guile_core_ccache + + default_src_postprocess + + guile_site_path="${DESTDIR}${PREFIX}/share/guile/site/3.0" + guile_core_site="${PREFIX}/share/guile/3.0" + guile_site_ccache="${DESTDIR}${LIBDIR}/guile/3.0/site-ccache" + guile_core_ccache="${LIBDIR}/guile/3.0/ccache" + + PATH="${DESTDIR}${PREFIX}/bin:${PREFIX}/bin:/usr/bin:/bin" \ + GUILE_LOAD_PATH="${guile_site_path}:${guile_core_site}" \ + GUILE_LOAD_COMPILED_PATH="${guile_site_ccache}:${guile_core_ccache}" \ + GUILE_SYSTEM_PATH="${guile_site_path}:${guile_core_site}" \ + GUILE_SYSTEM_COMPILED_PATH="${guile_site_ccache}:${guile_core_ccache}" \ + "${DESTDIR}${PREFIX}/bin/guile" -c '(use-modules (lzlib)) (display "lzlib-module-ok\n")' +} diff --git a/steps-guix/guile-lzlib-0.3.0/patches/static-guile-gc-register-allocation-fallback.patch b/steps-guix/guile-lzlib-0.3.0/patches/static-guile-gc-register-allocation-fallback.patch new file mode 100644 index 00000000..36174cc6 --- /dev/null +++ b/steps-guix/guile-lzlib-0.3.0/patches/static-guile-gc-register-allocation-fallback.patch @@ -0,0 +1,32 @@ +SPDX-License-Identifier: GPL-3.0-or-later + +Avoid requiring scm_gc_register_allocation to be exported from the +main Guile executable. Static Guile builds in this bootstrap do not +provide that symbol to dynamic-func, so fall back to a no-op. + +--- guile-lzlib/lzlib.scm ++++ guile-lzlib/lzlib.scm +@@ -56,10 +56,15 @@ + (define %liblz-handle + (delay (dynamic-link %liblz))) + +-(define register-allocation +- ;; Let the GC know that an unmanaged heap allocation took place. +- (pointer->procedure void +- (dynamic-func "scm_gc_register_allocation" +- (dynamic-link)) +- (list size_t))) ++(define register-allocation ++ ;; Let the GC know that an unmanaged heap allocation took place. ++ ;; Static Guile builds may not export this symbol from the main program. ++ (match (false-if-exception ++ (dynamic-func "scm_gc_register_allocation" ++ (dynamic-link))) ++ ((? pointer? proc) ++ (pointer->procedure void proc (list size_t))) ++ (#f ++ (lambda (_size) ++ #t)))) + + (define (lzlib-procedure ret name parameters) + "Return a procedure corresponding to C function NAME in liblz, or #f if diff --git a/steps-guix/lzlib-1.9/pass1.sh b/steps-guix/lzlib-1.9/pass1.sh new file mode 100644 index 00000000..9644dc19 --- /dev/null +++ b/steps-guix/lzlib-1.9/pass1.sh @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +src_prepare() { + default +} + +src_configure() { + PATH="${PREFIX}/bin:/usr/bin:/bin" \ + ./configure \ + --prefix="${PREFIX}" \ + --libdir="${LIBDIR}" \ + --includedir="${PREFIX}/include" \ + --enable-shared \ + --disable-ldconfig +} + +src_compile() { + default_src_compile +} + +src_install() { + default_src_install +} diff --git a/steps-guix/lzlib-1.9/sources b/steps-guix/lzlib-1.9/sources new file mode 100644 index 00000000..1a19b819 --- /dev/null +++ b/steps-guix/lzlib-1.9/sources @@ -0,0 +1 @@ +f https://download.savannah.nongnu.org/releases/lzip/lzlib/lzlib-1.9.tar.gz 2472f8d93830d0952b0c75f67e372d38c8f7c174dde2252369d5b20c87d3ba8e lzlib-1.9.tar.gz diff --git a/steps-guix/manifest b/steps-guix/manifest index 18a17023..da80eca4 100644 --- a/steps-guix/manifest +++ b/steps-guix/manifest @@ -31,6 +31,7 @@ build: sqlite-3510200 build: zlib-1.3.1-guix build: guile-sqlite3-0.1.3 build: guile-zlib-0.2.2 +build: lzlib-1.9 build: guile-lzlib-0.3.0 build: scheme-bytestructures-2.0.2 build: libevent-2.1.12