aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorGordon Tillman2012-12-06 12:13:48 -0600
committerAdam Vandenberg2013-01-06 18:21:25 -0800
commit4a82c0d1c33535e836f48c12fc8f48f8d7c7f410 (patch)
treee7c73bddd3f1adc831e42c0926faf80f19e90239 /Library/Formula
parentc517295ac2aea89eee9299e1b8b2069ce93ffc09 (diff)
downloadhomebrew-4a82c0d1c33535e836f48c12fc8f48f8d7c7f410.tar.bz2
newlisp: patch newlisp-edit.lsp to fix paths
There were several problems with paths in the newlisp-edit command file. This commit updates them to be compatible with a homebrew installation. Closes #16445. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/newlisp.rb43
1 files changed, 43 insertions, 0 deletions
diff --git a/Library/Formula/newlisp.rb b/Library/Formula/newlisp.rb
index f8fc311fe..4bdb42e8f 100644
--- a/Library/Formula/newlisp.rb
+++ b/Library/Formula/newlisp.rb
@@ -7,6 +7,12 @@ class Newlisp < Formula
depends_on 'readline'
+ # Patch newlisp-edit to work with Homebrew installation.
+ # Can be removed in 10.4.6
+ def patches
+ DATA
+ end
+
def install
# Required to use our configuration
ENV.append_to_cflags "-DNEWCONFIG -c"
@@ -28,3 +34,40 @@ class Newlisp < Formula
system "#{bin}/newlisp-edit"
end
end
+
+__END__
+
+--- a/guiserver/newlisp-edit.lsp
++++ b/Users/gordy/tmp/newlisp-edit
+@@ -1,4 +1,4 @@
+-#!/usr/bin/newlisp
++#!/usr/bin/env newlisp
+
+ ; newlisp-edit.lsp - multiple tab LISP editor and support for running code from the editor
+ ; needs 9.9.2 version minimum to run
+@@ -17,7 +17,7 @@
+ (set 'newlispDir (env "NEWLISPDIR"))
+
+ (set 'newlispDoc (if (= ostype "Win32")
+- newlispDir (replace "newlisp" (copy newlispDir) "doc/newlisp")))
++ newlispDir (join (reverse (cons "doc/newlisp" (rest (reverse (parse newlispDir "/"))))) "/")))
+
+ (load (string newlispDir "/guiserver.lsp"))
+
+@@ -155,7 +155,7 @@
+ (write-file file (base64-dec text)))
+ (if (= ostype "Win32")
+ (catch (exec (string {newlisp.exe "} currentScriptFile {" } file " > " (string file "out"))) 'result)
+- (catch (exec (string "/usr/bin/newlisp " currentScriptFile " " file)) 'result)
++ (catch (exec (string "HOMEBREW_PREFIX/bin/newlisp " currentScriptFile " " file)) 'result)
+ )
+ (if (list? result)
+ (begin
+@@ -223,7 +223,7 @@
+ (gs:run-shell 'OutputArea
+ (string newlispDir "/newlisp.exe " currentExtension " -C -w \"" $HOME "\""))
+ (gs:run-shell 'OutputArea
+- (string "/usr/bin/newlisp " currentExtension " -C -w " $HOME))
++ (string "HOMEBREW_PREFIX/bin/newlisp " currentExtension " -C -w " $HOME))
+ )
+ )