Re: [Chicken-hackers] [PATCH] Make chicken-home consider CHICKEN_INSTALL_PREFIX

2019-06-26 Thread Evan Hanson
Hi there,

I finally got around to testing this one again, and it works fine on all
the Windows platforms without the conditional pathname separator (it
also solves the issue with spock when the prefix is overridden), so I've
pushed it that way.

Cheers,

Evan

___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers


Re: [Chicken-hackers] [PATCH] Make chicken-home consider CHICKEN_INSTALL_PREFIX

2019-05-27 Thread Evan Hanson
Hi folks,

I had a look at this one, and it seems OK to me (it's certainly correct
in concept, as this procedure should match whatever egg-compile.scm
does) and tests fine on Linux. But, I'm not convinced the conditional
path separator behaviour for Windows is necessary -- I think we can just
use "/" in all cases.

I'll have a go testing it on Windows later this week unless someone
beats me to it (or unless you're sure the special path separator logic
is necessary?).

Best,

Evan

___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers


[Chicken-hackers] [PATCH] Make chicken-home consider CHICKEN_INSTALL_PREFIX

2019-05-26 Thread Mario Domenech Goulart
Hi,

Attached is a patch to make chicken-home consider CHICKEN_INSTALL_PREFIX.

Currently spock's tests fail when spock is tested by salmonella.  That's
because spock installs files in chicken-home, which maps to
C_INSTALL_SHARE_HOME (i.e., the "host's" chicken-home, not salmonella's
test directory).

This change should fix the issue related to spock and to eggs that use
chicken-home.

All the best.
Mario
-- 
http://parenteses.org/mario
>From 33f797de9276e9899d41b468f8905f63df944319 Mon Sep 17 00:00:00 2001
From: Mario Domenech Goulart 
Date: Sun, 26 May 2019 18:29:33 +0200
Subject: [PATCH] Make chicken-home consider CHICKEN_INSTALL_PREFIX

Some eggs (e.g., spock) may rely on chicken-home to install files and
load code.

This change makes chicken-home take CHICKEN_INSTALL_PREFIX into
account, so that eggs get properly installed and executed by
salmonella.
---
 library.scm | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/library.scm b/library.scm
index 3716fe52..48b56867 100644
--- a/library.scm
+++ b/library.scm
@@ -6417,7 +6417,12 @@ static C_word C_fcall C_setenv(C_word x, C_word y) {
 (define-foreign-variable installation-home c-string "C_INSTALL_SHARE_HOME")
 (define-foreign-variable install-egg-home c-string "C_INSTALL_EGG_HOME")
 
-(define (chicken-home) installation-home)
+(define (chicken-home)
+  (or (and-let* ((prefix (get-environment-variable "CHICKEN_INSTALL_PREFIX")))
+(string-append prefix
+		   (if ##sys#windows-platform "\\" "/")
+		   "share"))
+  installation-home))
 
 (define path-list-separator
   (if ##sys#windows-platform #\; #\:))
-- 
2.11.0

___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers