mirror of
https://github.com/Ponce/slackbuilds
synced 2024-10-22 22:27:28 +02:00
48 lines
1.4 KiB
Diff
48 lines
1.4 KiB
Diff
|
From http://code.call-cc.org/cgi-bin/gitweb.cgi?p=chicken-core.git;a=commit;h=58684f69572453acc6fed7326fa9df39be98760e
|
|||
|
--- chicken-4.8.0.3/setup-api.scm
|
|||
|
+++ chicken-4.8.0.3/setup-api.scm
|
|||
|
@@ -239,7 +239,7 @@
|
|||
|
(cond ((string=? prg "csc")
|
|||
|
(string-intersperse
|
|||
|
(cons*
|
|||
|
- (shellpath (find-program "csc"))
|
|||
|
+ (find-program "csc")
|
|||
|
"-feature" "compiling-extension"
|
|||
|
(if (or (deployment-mode)
|
|||
|
(and (feature? #:cross-chicken)
|
|||
|
--- chicken-4.8.0.3/utils.scm
|
|||
|
+++ chicken-4.8.0.3/utils.scm
|
|||
|
@@ -59,20 +59,18 @@
|
|||
|
;;; Quote string for shell
|
|||
|
|
|||
|
(define (qs str #!optional (platform (build-platform)))
|
|||
|
- (case platform
|
|||
|
- ((mingw32)
|
|||
|
- (string-append "\"" str "\""))
|
|||
|
- (else
|
|||
|
- (if (zero? (string-length str))
|
|||
|
- "''"
|
|||
|
- (string-concatenate
|
|||
|
- (map (lambda (c)
|
|||
|
- (if (or (char-whitespace? c)
|
|||
|
- (memq c '(#\# #\" #\' #\` #\<5C> #\~ #\& #\% #\$ #\! #\* #\;
|
|||
|
- #\< #\> #\\ #\( #\) #\[ #\] #\{ #\} #\?)))
|
|||
|
- (string #\\ c)
|
|||
|
- (string c)))
|
|||
|
- (string->list str)))))))
|
|||
|
+ (let ((delim (if (eq? platform 'mingw32) #\" #\'))
|
|||
|
+ (escaped (if (eq? platform 'mingw32) "\"\"" "'\\''")))
|
|||
|
+ (string-append
|
|||
|
+ (string delim)
|
|||
|
+ (string-concatenate
|
|||
|
+ (map (lambda (c)
|
|||
|
+ (cond
|
|||
|
+ ((char=? c delim) escaped)
|
|||
|
+ ((char=? c #\nul) (error 'qs "NUL character can not be represented in shell string" str))
|
|||
|
+ (else (string c))))
|
|||
|
+ (string->list str)))
|
|||
|
+ (string delim))))
|
|||
|
|
|||
|
|
|||
|
;;; Compile and load file
|