Skip to content

Commit

Permalink
Update Homebrew Formula for 0.18.1 (#1075)
Browse files Browse the repository at this point in the history
Points to the previous commit that _should_ be near 0.18.1.
  • Loading branch information
drewc authored Dec 6, 2023
1 parent 0917172 commit e3284b8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 30 deletions.
40 changes: 23 additions & 17 deletions homebrew/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Homebrew uses [[#RubyIsms][Ruby]] for its DSL. That means =GerbilScheme= is a su

#+begin_src ruby
class GerbilScheme < Formula
# This .rb file is tangled (AKA generated) from README.org
# This .rb file is tangled (AKA generated) from README.org
#+end_src

There's some meta-info that's nice to have.
Expand All @@ -157,11 +157,11 @@ There's some meta-info that's nice to have.
Now where it will install from, and how it gets it. The tag is the version.

#+begin_src ruby
url "https://github.com/mighty-gerbils/gerbil.git", using: :git,
revision: "8ca36a928bc9345f9d28e5f2dfcb55ca558e85f9"
head "https://github.com/mighty-gerbils/gerbil.git", using: :git
version "0.18"
revision 1
url "https://github.com/mighty-gerbils/gerbil.git", using: :git,
revision: "0917172a519d28c7833886b445938fd250717b2a"
head "https://github.com/mighty-gerbils/gerbil.git", using: :git
version "0.18.1"
revision 1
#+end_src

Now the things it depends on.
Expand All @@ -181,11 +181,12 @@ Now the dirt. The install process is as it should be! ~./configure && make && ma


#+begin_src ruby
def install
system "./configure", "--prefix=#{prefix}"
system "make"
ENV.deparallelize
system "make", "install"
def install
system "./configure", "--prefix=#{prefix}"
system "make"
ENV.deparallelize
system "make", "install"

#+end_src


Expand All @@ -196,13 +197,13 @@ way we can choose what files actually go in the global bin.

#+begin_src ruby

rm prefix/"bin"
mkdir prefix/"bin"
rm prefix/"bin"
mkdir prefix/"bin"

cd prefix/"current/bin" do
ln "gerbil", prefix/"bin", verbose: true
cp %w(gxc gxensemble gxi gxpkg gxprof gxtags gxtest), prefix/"bin"
end
cd prefix/"current/bin" do
ln "gerbil", prefix/"bin", verbose: true
cp %w(gxc gxensemble gxi gxpkg gxprof gxtags gxtest), prefix/"bin"
end
end

#+end_src
Expand All @@ -221,3 +222,8 @@ That's that!
#+begin_src ruby
end
#+end_src


# Local Variables:
# org-src-preserve-indentation: t
# End:
21 changes: 8 additions & 13 deletions homebrew/gerbil-scheme.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ class GerbilScheme < Formula
homepage "https://cons.io"
license any_of: ["LGPL-2.1-or-later", "Apache-2.0"]
url "https://github.com/mighty-gerbils/gerbil.git", using: :git,
revision: "8ca36a928bc9345f9d28e5f2dfcb55ca558e85f9"
revision: "0917172a519d28c7833886b445938fd250717b2a"
head "https://github.com/mighty-gerbils/gerbil.git", using: :git
version "0.18"
version "0.18.1"
revision 1
depends_on "openssl@3"
depends_on "sqlite"
Expand All @@ -16,25 +16,20 @@ class GerbilScheme < Formula
fails_with :clang do
cause "gerbil-scheme is built with GCC"
end


def install
system "./configure", "--prefix=#{prefix}"
system "make"
ENV.deparallelize
system "make", "install"

rm prefix/"bin"
mkdir prefix/"bin"

cd prefix/"current/bin" do
ln "gerbil", prefix/"bin", verbose: true
cp %w(gxc gxensemble gxi gxpkg gxprof gxtags gxtest), prefix/"bin"
end
ln "gerbil", prefix/"bin", verbose: true
cp %w(gxc gxensemble gxi gxpkg gxprof gxtags gxtest), prefix/"bin"
end
end

test do
assert_equal "0123456789", shell_output("#{bin}/gxi -e \"(for-each write '(0 1 2 3 4 5 6 7 8 9))\"")
end

test do
assert_equal "0123456789", shell_output("#{bin}/gxi -e \"(for-each write '(0 1 2 3 4 5 6 7 8 9))\"")
end
end

0 comments on commit e3284b8

Please sign in to comment.