chicken: 4.10.0 -> 4.11.0
This commit is contained in:
committed by
Moritz Ulrich
parent
58e732978f
commit
cd01aab444
@@ -1,6 +1,6 @@
|
|||||||
From 752dff853186dc334c519a86fa92f087795fea02 Mon Sep 17 00:00:00 2001
|
From 2877f33747e3871c3a682b3a0c812b8ba2e4da5a Mon Sep 17 00:00:00 2001
|
||||||
From: Moritz Heidkamp <moritz.heidkamp@bevuta.com>
|
From: Caolan McMahon <caolan@caolanmcmahon.com>
|
||||||
Date: Wed, 1 Oct 2014 22:41:30 +0200
|
Date: Sat, 25 Jun 2016 11:52:28 +0100
|
||||||
Subject: [PATCH] Introduce CHICKEN_REPOSITORY_EXTRA
|
Subject: [PATCH] Introduce CHICKEN_REPOSITORY_EXTRA
|
||||||
|
|
||||||
This environment variable works like CHICKEN_REPOSITORY but supports
|
This environment variable works like CHICKEN_REPOSITORY but supports
|
||||||
@@ -8,47 +8,74 @@ multiple paths separated by `:'. Those paths are searched after
|
|||||||
CHICKEN_REPOSITORY when loading extensions via `require-library' and
|
CHICKEN_REPOSITORY when loading extensions via `require-library' and
|
||||||
friends. It can be accessed and changed at runtime via the new procedure
|
friends. It can be accessed and changed at runtime via the new procedure
|
||||||
`repository-extra-paths' which is analog to `repository-path'.
|
`repository-extra-paths' which is analog to `repository-path'.
|
||||||
|
|
||||||
|
Original patch by Moritz Heidkamp.
|
||||||
|
Updated by Caolan McMahon for CHICKEN 4.11.0
|
||||||
---
|
---
|
||||||
chicken-install.scm | 11 +++++++----
|
chicken-install.scm | 29 ++++++++++++++++++++++++-----
|
||||||
chicken.import.scm | 1 +
|
chicken.import.scm | 1 +
|
||||||
eval.scm | 37 +++++++++++++++++++++++++++++++------
|
eval.scm | 37 +++++++++++++++++++++++++++++++------
|
||||||
3 files changed, 39 insertions(+), 10 deletions(-)
|
3 files changed, 56 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
diff --git a/chicken-install.scm b/chicken-install.scm
|
diff --git a/chicken-install.scm b/chicken-install.scm
|
||||||
index 2ef6ef4..b5c6bf8 100644
|
index 7bc6041..f557793 100644
|
||||||
--- a/chicken-install.scm
|
--- a/chicken-install.scm
|
||||||
+++ b/chicken-install.scm
|
+++ b/chicken-install.scm
|
||||||
@@ -109,10 +109,10 @@
|
@@ -120,6 +120,19 @@
|
||||||
(define *show-foreign-depends* #f)
|
(sprintf "lib/chicken/~a" (##sys#fudge 42)))
|
||||||
(define *hacks* '())
|
(repository-path)))))
|
||||||
|
|
||||||
- (define (repo-path)
|
|
||||||
+ (define (repo-paths)
|
+ (define (repo-paths)
|
||||||
(if (and *cross-chicken* (not *host-extension*))
|
+ (if *deploy*
|
||||||
- (make-pathname C_TARGET_LIB_HOME (sprintf "chicken/~a" C_BINARY_VERSION))
|
+ *prefix*
|
||||||
- (repository-path)))
|
+ (if (and *cross-chicken* (not *host-extension*))
|
||||||
+ (list (make-pathname C_TARGET_LIB_HOME (sprintf "chicken/~a" C_BINARY_VERSION)))
|
+ (list (make-pathname C_TARGET_LIB_HOME (sprintf "chicken/~a" C_BINARY_VERSION)))
|
||||||
+ (cons (repository-path) (repository-extra-paths))))
|
+ (cons
|
||||||
|
+ (if *prefix*
|
||||||
|
+ (make-pathname
|
||||||
|
+ *prefix*
|
||||||
|
+ (sprintf "lib/chicken/~a" (##sys#fudge 42)))
|
||||||
|
+ (repository-path))
|
||||||
|
+ (repository-extra-paths)))))
|
||||||
|
+
|
||||||
(define (get-prefix #!optional runtime)
|
(define (get-prefix #!optional runtime)
|
||||||
(cond ((and *cross-chicken*
|
(cond ((and *cross-chicken*
|
||||||
@@ -757,7 +757,10 @@
|
(not *host-extension*))
|
||||||
|
@@ -226,10 +239,13 @@
|
||||||
|
(chicken-version) )
|
||||||
|
;; Duplication of (extension-information) to get custom
|
||||||
|
;; prefix. This should be fixed.
|
||||||
|
- ((let* ((ep (##sys#canonicalize-extension-path x 'ext-version))
|
||||||
|
- (sf (make-pathname (repo-path) ep "setup-info")))
|
||||||
|
- (and (file-exists? sf)
|
||||||
|
- (with-input-from-file sf read))) =>
|
||||||
|
+ ((let ((ep (##sys#canonicalize-extension-path x 'ext-version)))
|
||||||
|
+ (let loop ((paths (repo-paths)))
|
||||||
|
+ (cond ((null? paths) #f)
|
||||||
|
+ ((let ((sf (make-pathname (car paths) ep "setup-info")))
|
||||||
|
+ (and (file-exists? sf)
|
||||||
|
+ (with-input-from-file sf read))))
|
||||||
|
+ (else (loop (cdr paths)))))) =>
|
||||||
|
(lambda (info)
|
||||||
|
(let ((a (assq 'version info)))
|
||||||
|
(if a
|
||||||
|
@@ -776,7 +792,10 @@
|
||||||
"installed extension has no information about which egg it belongs to"
|
"installed extension has no information about which egg it belongs to"
|
||||||
(pathname-file sf))
|
(pathname-file sf))
|
||||||
#f))))
|
#f))))
|
||||||
- (glob (make-pathname (repo-path) "*" "setup-info")))
|
- (glob (make-pathname (repo-path) "*" "setup-info")))
|
||||||
+ (append-map
|
+ (append-map
|
||||||
+ (lambda (path)
|
+ (lambda (path)
|
||||||
+ (glob (make-pathname path "*" "setup-info")))
|
+ (glob (make-pathname path "*" "setup-info")))
|
||||||
+ (repo-paths)))
|
+ (repo-paths)))
|
||||||
equal?))
|
equal?))
|
||||||
|
|
||||||
(define (list-available-extensions trans locn)
|
(define (list-available-extensions trans locn)
|
||||||
diff --git a/chicken.import.scm b/chicken.import.scm
|
diff --git a/chicken.import.scm b/chicken.import.scm
|
||||||
index baa7316..2839b16 100644
|
index f6e3a19..be1637c 100644
|
||||||
--- a/chicken.import.scm
|
--- a/chicken.import.scm
|
||||||
+++ b/chicken.import.scm
|
+++ b/chicken.import.scm
|
||||||
@@ -201,6 +201,7 @@
|
@@ -200,6 +200,7 @@
|
||||||
repl
|
repl
|
||||||
repl-prompt
|
repl-prompt
|
||||||
repository-path
|
repository-path
|
||||||
@@ -57,7 +84,7 @@ index baa7316..2839b16 100644
|
|||||||
reset
|
reset
|
||||||
reset-handler
|
reset-handler
|
||||||
diff --git a/eval.scm b/eval.scm
|
diff --git a/eval.scm b/eval.scm
|
||||||
index bbcd86c..838588d 100644
|
index 6242f62..f7d76d4 100644
|
||||||
--- a/eval.scm
|
--- a/eval.scm
|
||||||
+++ b/eval.scm
|
+++ b/eval.scm
|
||||||
@@ -81,6 +81,7 @@
|
@@ -81,6 +81,7 @@
|
||||||
@@ -68,9 +95,9 @@ index bbcd86c..838588d 100644
|
|||||||
(define-constant prefix-environment-variable "CHICKEN_PREFIX")
|
(define-constant prefix-environment-variable "CHICKEN_PREFIX")
|
||||||
|
|
||||||
; these are actually in unit extras, but that is used by default
|
; these are actually in unit extras, but that is used by default
|
||||||
@@ -1180,6 +1181,25 @@
|
@@ -1176,6 +1177,25 @@
|
||||||
|
|
||||||
(define repository-path ##sys#repository-path)
|
(define ##sys#repository-path repository-path)
|
||||||
|
|
||||||
+(define ##sys#repository-extra-paths
|
+(define ##sys#repository-extra-paths
|
||||||
+ (let* ((repaths (get-environment-variable repository-extra-environment-variable))
|
+ (let* ((repaths (get-environment-variable repository-extra-environment-variable))
|
||||||
@@ -94,7 +121,7 @@ index bbcd86c..838588d 100644
|
|||||||
(define ##sys#setup-mode #f)
|
(define ##sys#setup-mode #f)
|
||||||
|
|
||||||
(define ##sys#find-extension
|
(define ##sys#find-extension
|
||||||
@@ -1197,6 +1217,7 @@
|
@@ -1193,6 +1213,7 @@
|
||||||
(let loop ((paths (##sys#append
|
(let loop ((paths (##sys#append
|
||||||
(if ##sys#setup-mode '(".") '())
|
(if ##sys#setup-mode '(".") '())
|
||||||
(if rp (list rp) '())
|
(if rp (list rp) '())
|
||||||
@@ -102,7 +129,7 @@ index bbcd86c..838588d 100644
|
|||||||
(if inc? ##sys#include-pathnames '())
|
(if inc? ##sys#include-pathnames '())
|
||||||
(if ##sys#setup-mode '() '("."))) ))
|
(if ##sys#setup-mode '() '("."))) ))
|
||||||
(and (pair? paths)
|
(and (pair? paths)
|
||||||
@@ -1256,12 +1277,16 @@
|
@@ -1252,12 +1273,16 @@
|
||||||
[string-append string-append]
|
[string-append string-append]
|
||||||
[read read] )
|
[read read] )
|
||||||
(lambda (id loc)
|
(lambda (id loc)
|
||||||
@@ -126,5 +153,5 @@ index bbcd86c..838588d 100644
|
|||||||
(define (extension-information ext)
|
(define (extension-information ext)
|
||||||
(##sys#extension-information ext 'extension-information) )
|
(##sys#extension-information ext 'extension-information) )
|
||||||
--
|
--
|
||||||
2.1.0
|
2.1.4
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ stdenv, fetchurl, makeWrapper, bootstrap-chicken ? null }:
|
{ stdenv, fetchurl, makeWrapper, bootstrap-chicken ? null }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "4.10.0";
|
version = "4.11.0";
|
||||||
platform = with stdenv;
|
platform = with stdenv;
|
||||||
if isDarwin then "macosx"
|
if isDarwin then "macosx"
|
||||||
else if isCygwin then "cygwin"
|
else if isCygwin then "cygwin"
|
||||||
@@ -13,15 +13,15 @@ in
|
|||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "chicken-${version}";
|
name = "chicken-${version}";
|
||||||
|
|
||||||
binaryVersion = 7;
|
binaryVersion = 8;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://code.call-cc.org/releases/4.10.0/chicken-${version}.tar.gz";
|
url = "http://code.call-cc.org/releases/${version}/chicken-${version}.tar.gz";
|
||||||
sha256 = "16w96jrhb6qf62fgznk53f55yhfv81damghdjn31k5hirnmza1qf";
|
sha256 = "12ddyiikqknpr8h6llsxbg2fz75xnayvcnsvr1cwv8xnjn7jpp73";
|
||||||
};
|
};
|
||||||
|
|
||||||
setupHook = lib.ifEnable (bootstrap-chicken != null) ./setup-hook.sh;
|
setupHook = lib.ifEnable (bootstrap-chicken != null) ./setup-hook.sh;
|
||||||
|
|
||||||
buildFlags = "PLATFORM=${platform} PREFIX=$(out) VARDIR=$(out)/var/lib";
|
buildFlags = "PLATFORM=${platform} PREFIX=$(out) VARDIR=$(out)/var/lib";
|
||||||
installFlags = "PLATFORM=${platform} PREFIX=$(out) VARDIR=$(out)/var/lib";
|
installFlags = "PLATFORM=${platform} PREFIX=$(out) VARDIR=$(out)/var/lib";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
addChickenRepositoryPath() {
|
addChickenRepositoryPath() {
|
||||||
addToSearchPathWithCustomDelimiter : CHICKEN_REPOSITORY_EXTRA "$1/lib/chicken/7/"
|
addToSearchPathWithCustomDelimiter : CHICKEN_REPOSITORY_EXTRA "$1/lib/chicken/8/"
|
||||||
# addToSearchPathWithCustomDelimiter \; CHICKEN_INCLUDE_PATH "$1/share/"
|
# addToSearchPathWithCustomDelimiter \; CHICKEN_INCLUDE_PATH "$1/share/"
|
||||||
export CHICKEN_INCLUDE_PATH="$1/share;$CHICKEN_INCLUDE_PATH"
|
export CHICKEN_INCLUDE_PATH="$1/share;$CHICKEN_INCLUDE_PATH"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user