Skip to content

Commit

Permalink
Merge pull request #298 from aconchillo/guile-git_0.5.2_3
Browse files Browse the repository at this point in the history
guile-git: revision 3 (sonoma runner)
  • Loading branch information
aconchillo authored Mar 5, 2024
2 parents ffc24bc + 87e42ed commit 0a3037a
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions Formula/guile-git.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
class GuileGit < Formula
desc "GNU Guile library providing bindings to libgit2"
homepage "https://gitlab.com/guile-git/guile-git"
url "https://gitlab.com/guile-git/guile-git/uploads/6450f3991aa524484038cdcea3fb248d/guile-git-0.5.2.tar.gz"
sha256 "949755a211ad6e905ecdebe66ca35bfaab638d985b9fadc928ad2538d8f5cc95"

bottle do
root_url "https://github.com/aconchillo/homebrew-guile/releases/download/guile-git-0.5.2_2"
sha256 cellar: :any_skip_relocation, big_sur: "de100ac6aefed86383b415f6e7d5453851d733cc3832a69d0e36d1991037a8f3"
sha256 cellar: :any_skip_relocation, x86_64_linux: "263d075ede376a0f3438acac685979d67fcd0a2b02e30e213a2bc314ada26374"
end

depends_on "pkg-config" => :build
depends_on "texinfo" => :build
depends_on "guile"
depends_on "guile-bytestructures"
depends_on "libgit2"

def install
ENV["GUILE_AUTO_COMPILE"] = "0"

# We need this so we can find other modules.
ENV["GUILE_LOAD_PATH"] = HOMEBREW_PREFIX/"share/guile/site/3.0"
ENV["GUILE_LOAD_COMPILED_PATH"] = HOMEBREW_PREFIX/"lib/guile/3.0/site-ccache"
ENV["GUILE_SYSTEM_EXTENSIONS_PATH"] = HOMEBREW_PREFIX/"lib/guile/3.0/extensions"

system "./configure", "--prefix=#{prefix}"
system "make", "install"
end

def caveats
<<~EOS
Remember to add the following to your .bashrc or equivalent in order to use this module:
export GUILE_LOAD_PATH="#{HOMEBREW_PREFIX}/share/guile/site/3.0"
export GUILE_LOAD_COMPILED_PATH="#{HOMEBREW_PREFIX}/lib/guile/3.0/site-ccache"
export GUILE_SYSTEM_EXTENSIONS_PATH="#{HOMEBREW_PREFIX}/lib/guile/3.0/extensions"
EOS
end

test do
git = testpath/"git.scm"
git.write <<~EOS
(use-modules (git))
EOS

ENV["GUILE_AUTO_COMPILE"] = "0"
ENV["GUILE_LOAD_PATH"] = HOMEBREW_PREFIX/"share/guile/site/3.0"
ENV["GUILE_LOAD_COMPILED_PATH"] = HOMEBREW_PREFIX/"lib/guile/3.0/site-ccache"
ENV["GUILE_SYSTEM_EXTENSIONS_PATH"] = HOMEBREW_PREFIX/"lib/guile/3.0/extensions"

system "guile", git
end
end

0 comments on commit 0a3037a

Please sign in to comment.