From 87e42ed9e69d093ddb77c74fc30d3c2661201e58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Tue, 5 Mar 2024 08:22:42 -0800 Subject: [PATCH] guile-git: new version 0.5.2 --- Formula/guile-git.rb | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Formula/guile-git.rb diff --git a/Formula/guile-git.rb b/Formula/guile-git.rb new file mode 100644 index 0000000..7e64cf8 --- /dev/null +++ b/Formula/guile-git.rb @@ -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