gnu: guile-static: Adapt guile-relocatable.patch to guile-2.0.12.

* gnu/packages/patches/guile-relocatable.patch: Adapt to guile-2.0.12.
This commit is contained in:
Mark H Weaver 2016-08-21 06:01:14 -04:00
parent 1a93d0941e
commit 0bd865101d
No known key found for this signature in database
GPG Key ID: 7CEF29847562C516
1 changed files with 6 additions and 8 deletions

View File

@ -1,8 +1,6 @@
This patch changes Guile to use a default search path relative to the This patch changes Guile to use a default search path relative to the
location of the `guile' binary, allowing it to be relocated. location of the `guile' binary, allowing it to be relocated.
diff --git a/libguile/load.c b/libguile/load.c
index af2ca45..19dd338 100644
--- a/libguile/load.c --- a/libguile/load.c
+++ b/libguile/load.c +++ b/libguile/load.c
@@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
@ -12,8 +10,8 @@ index af2ca45..19dd338 100644
+#include <libgen.h> +#include <libgen.h>
#include "libguile/_scm.h" #include "libguile/_scm.h"
#include "libguile/private-gc.h" /* scm_getenv_int */ #include "libguile/alist.h"
@@ -255,6 +256,32 @@ scm_init_load_path () @@ -325,6 +326,32 @@
SCM cpath = SCM_EOL; SCM cpath = SCM_EOL;
#ifdef SCM_LIBRARY_DIR #ifdef SCM_LIBRARY_DIR
@ -43,10 +41,10 @@ index af2ca45..19dd338 100644
+ strcpy (ccache_dir, prefix); + strcpy (ccache_dir, prefix);
+ strcat (ccache_dir, "/lib/guile/2.0/ccache"); + strcat (ccache_dir, "/lib/guile/2.0/ccache");
+ +
env = getenv ("GUILE_SYSTEM_PATH"); env = scm_i_mirror_backslashes (getenv ("GUILE_SYSTEM_PATH"));
if (env && strcmp (env, "") == 0) if (env && strcmp (env, "") == 0)
/* special-case interpret system-path=="" as meaning no system path instead /* special-case interpret system-path=="" as meaning no system path instead
@@ -263,10 +290,7 @@ scm_init_load_path () @@ -333,10 +360,7 @@
else if (env) else if (env)
path = scm_parse_path (scm_from_locale_string (env), path); path = scm_parse_path (scm_from_locale_string (env), path);
else else
@ -56,9 +54,9 @@ index af2ca45..19dd338 100644
- scm_from_locale_string (SCM_PKGDATA_DIR)); - scm_from_locale_string (SCM_PKGDATA_DIR));
+ path = scm_list_1 (scm_from_locale_string (module_dir)); + path = scm_list_1 (scm_from_locale_string (module_dir));
env = getenv ("GUILE_SYSTEM_COMPILED_PATH"); env = scm_i_mirror_backslashes (getenv ("GUILE_SYSTEM_COMPILED_PATH"));
if (env && strcmp (env, "") == 0) if (env && strcmp (env, "") == 0)
@@ -276,8 +300,7 @@ scm_init_load_path () @@ -346,8 +370,7 @@
cpath = scm_parse_path (scm_from_locale_string (env), cpath); cpath = scm_parse_path (scm_from_locale_string (env), cpath);
else else
{ {