From e1f761e9969a39190177fda48d60f42d63423ab7 Mon Sep 17 00:00:00 2001 From: Efraim Flashner
Date: Thu, 13 Feb 2020 08:30:13 +0100 Subject: [PATCH] gnu: Use guile-2.0 for make-bootstrap. * gnu/packages/make-bootstrap.scm (%guile-static): Inherit from guile-2.0. [source]: Update patch set. (%guile-static-stripped): Adjust for guile-2.0. * gnu/packages/patches/guile-2.0-relocatable.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/make-bootstrap.scm | 30 ++++---- .../patches/guile-2.0-relocatable.patch | 68 +++++++++++++++++++ 3 files changed, 84 insertions(+), 15 deletions(-) create mode 100644 gnu/packages/patches/guile-2.0-relocatable.patch diff --git a/gnu/local.mk b/gnu/local.mk index 3f8fa2ed7b..2cd799dca4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -980,6 +980,7 @@ dist_patch_DATA = \ %D%/packages/patches/guile-finalization-crash.patch \ %D%/packages/patches/guile-linux-syscalls.patch \ %D%/packages/patches/guile-present-coding.patch \ + %D%/packages/patches/guile-2.0-relocatable.patch \ %D%/packages/patches/guile-relocatable.patch \ %D%/packages/patches/guile-rsvg-pkgconfig.patch \ %D%/packages/patches/guile-emacs-fix-configure.patch \ diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index b8d1b2af3e..2c08e31a97 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -699,14 +699,14 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ;; A statically-linked Guile that is relocatable--i.e., it can search ;; .scm and .go files relative to its installation directory, rather ;; than in hard-coded configure-time paths. - (let* ((patches (cons* (search-patch "guile-relocatable.patch") - (search-patch "guile-2.2-default-utf8.patch") + (let* ((patches (cons* (search-patch "guile-2.0-relocatable.patch") + (search-patch "guile-default-utf8.patch") (search-patch "guile-linux-syscalls.patch") - (origin-patches (package-source guile-2.2)))) - (source (origin (inherit (package-source guile-2.2)) + (origin-patches (package-source guile-2.0)))) + (source (origin (inherit (package-source guile-2.0)) (patches patches))) - (guile (package (inherit guile-2.2) - (name (string-append (package-name guile-2.2) "-static")) + (guile (package (inherit guile-2.0) + (name (string-append (package-name guile-2.0) "-static")) (source source) (synopsis "Statically-linked and relocatable Guile") @@ -715,14 +715,14 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (inputs `(("libunistring:static" ,libunistring "static") - ,@(package-inputs guile-2.2))) + ,@(package-inputs guile-2.0))) (propagated-inputs `(("bdw-gc" ,libgc) ,@(alist-delete "bdw-gc" - (package-propagated-inputs guile-2.2)))) + (package-propagated-inputs guile-2.0)))) (arguments - (substitute-keyword-arguments (package-arguments guile-2.2) + (substitute-keyword-arguments (package-arguments guile-2.0) ((#:configure-flags flags '()) ;; When `configure' checks for ltdl availability, it ;; doesn't try to link using libtool, and thus fails @@ -777,13 +777,13 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (out (assoc-ref %outputs "out")) (guile1 (string-append in "/bin/guile")) (guile2 (string-append out "/bin/guile"))) - (mkdir-p (string-append out "/share/guile/2.2")) - (copy-recursively (string-append in "/share/guile/2.2") - (string-append out "/share/guile/2.2")) + (mkdir-p (string-append out "/share/guile/2.0")) + (copy-recursively (string-append in "/share/guile/2.0") + (string-append out "/share/guile/2.0")) - (mkdir-p (string-append out "/lib/guile/2.2/ccache")) - (copy-recursively (string-append in "/lib/guile/2.2/ccache") - (string-append out "/lib/guile/2.2/ccache")) + (mkdir-p (string-append out "/lib/guile/2.0/ccache")) + (copy-recursively (string-append in "/lib/guile/2.0/ccache") + (string-append out "/lib/guile/2.0/ccache")) (mkdir (string-append out "/bin")) (copy-file guile1 guile2) diff --git a/gnu/packages/patches/guile-2.0-relocatable.patch b/gnu/packages/patches/guile-2.0-relocatable.patch new file mode 100644 index 0000000000..95bddcce88 --- /dev/null +++ b/gnu/packages/patches/guile-2.0-relocatable.patch @@ -0,0 +1,68 @@ +This patch changes Guile to use a default search path relative to the +location of the `guile' binary, allowing it to be relocated. + +--- a/libguile/load.c ++++ b/libguile/load.c +@@ -26,6 +26,7 @@ + + #include