Skip to content

Commit f81e20e

Browse files
authored
Merge pull request #252143 from Homebrew/gcl
gcl 2.7.1 (new formula)
2 parents ea5e2be + d7660b8 commit f81e20e

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

Formula/g/gcl.rb

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
class Gcl < Formula
2+
desc "GNU Common Lisp"
3+
homepage "https://www.gnu.org/software/gcl/"
4+
url "https://ftpmirror.gnu.org/gcl/gcl-2.7.1.tar.gz"
5+
mirror "https://ftp.gnu.org/gnu/gcl/gcl-2.7.1.tar.gz"
6+
sha256 "79d0bb65b82df81c078bc55c4cda3fe4d766d87e3bfe10fde0b2f728204e1015"
7+
license all_of: [
8+
"LGPL-2.0-or-later",
9+
"GPL-1.0-or-later", # elisp/sshell.el
10+
"LOOP", # mod/gcl_loop.lsp
11+
]
12+
13+
bottle do
14+
sha256 cellar: :any_skip_relocation, arm64_linux: "dfa35d12b4ccf9fb802cbfef7fdc2e8300734a3d6eb375520db4070ef8b5428d"
15+
sha256 cellar: :any_skip_relocation, x86_64_linux: "28c991bd2a4fcde47e5ed5199c69d521406cfe75a1e84b9b9ac282b6c3bbe384"
16+
end
17+
18+
depends_on "gmp"
19+
depends_on "libtirpc"
20+
depends_on :linux
21+
22+
# Apply official errata for 2.7.1 release which include following commits
23+
# https://cgit.git.savannah.gnu.org/cgit/gcl.git/commit/gcl?id=7356875684eaf4fbedb5a660abefeb2b633105a0
24+
# https://cgit.git.savannah.gnu.org/cgit/gcl.git/commit/gcl?id=3f9d2eeda182741a0e6ddf05cad9aff0fcb84ca5
25+
# And backport fix needed for Homebrew's non-lowercase CC path
26+
# https://cgit.git.savannah.gnu.org/cgit/gcl.git/commit/gcl?id=fd8984c0fcdaa45ff4296ebfdf13eddd12c2362b
27+
patch :DATA
28+
29+
def install
30+
ENV.append "CPPFLAGS", "-I#{Formula["libtirpc"].opt_include}/tirpc"
31+
ENV["GCL_MULTIPROCESS_MEMORY_POOL"] = buildpath
32+
33+
system "./configure", "--disable-silent-rules", "--with-lispdir=#{elisp}", *std_configure_args
34+
system "make", "install"
35+
end
36+
37+
test do
38+
(testpath/"main.lisp").write <<~LISP
39+
#!#{bin}/gcl -f
40+
(format t "Hello, World!")
41+
LISP
42+
assert_equal "Hello, World!", shell_output("#{bin}/gcl -f main.lisp").chomp
43+
end
44+
end
45+
46+
__END__
47+
--- a/git.tag
48+
+++ b/git.tag
49+
@@ -1,2 +1,2 @@
50+
-"Version_2_7_0"
51+
+"Version_2_7_1"
52+
53+
--- a/o/alloc.c
54+
+++ b/o/alloc.c
55+
@@ -707,6 +707,7 @@ empty_relblock(void) {
56+
for (;!rb_emptyp();) {
57+
tm_table[t_relocatable].tm_adjgbccnt--;
58+
expand_contblock_index_space();
59+
+ expand_contblock_array();
60+
GBC(t_relocatable);
61+
}
62+
sSAleaf_collection_thresholdA->s.s_dbind=o;
63+
--- a/lsp/gcl_directory.lsp
64+
+++ b/lsp/gcl_directory.lsp
65+
@@ -75,8 +75,7 @@
66+
(let ((r (with-open-file (s (apply 'string-concatenate "|" #-winnt "command -v "
67+
#+winnt "for %i in (" s #+winnt ".exe) do @echo.%~$PATH:i" nil))
68+
(read-line s nil 'eof))))
69+
- (unless (eq r 'eof)
70+
- (string-downcase r))))
71+
+ (unless (eq r 'eof) r)))
72+
73+
(defun get-path (s &aux
74+
(e (unless (minusp (string-match #v"([^\n\t\r ]+)([\n\t\r ]|$)" s))(match-end 1)))

0 commit comments

Comments
 (0)