From 58e20c263507958084c1b9c3dd0148a2e940ec9f Mon Sep 17 00:00:00 2001 From: Adrian Ho Date: Thu, 19 Jan 2023 01:10:18 +0800 Subject: [PATCH] itstool: add 2.0.7_1 bottle. --- Formula/itstool.rb | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/Formula/itstool.rb b/Formula/itstool.rb index 5dbb38eb512..bb1ac89650d 100644 --- a/Formula/itstool.rb +++ b/Formula/itstool.rb @@ -1,31 +1,36 @@ class Itstool < Formula desc "Make XML documents translatable through PO files" homepage "http://itstool.org/" - url "https://github.com/itstool/itstool/archive/2.0.7.tar.gz" - sha256 "fba78a37dc3535e4686c7f57407b97d03c676e3a57beac5fb2315162b0cc3176" - license "GPL-3.0" - head "https://github.com/itstool/itstool.git" + url "http://files.itstool.org/itstool/itstool-2.0.7.tar.bz2" + sha256 "6b9a7cd29a12bb95598f5750e8763cee78836a1a207f85b74d8b3275b27e87ca" + license "GPL-3.0-or-later" + revision 1 bottle do root_url "https://github.com/gromgit/homebrew-core-aarch64_linux/releases/download/itstool" - sha256 cellar: :any_skip_relocation, aarch64_linux: "c3d96982a5d156192eb5c0b0aa651ccc163967e745a536a2b6a3f74f011d376b" + sha256 cellar: :any_skip_relocation, aarch64_linux: "ec1e4a3c9e3208e80ae3ef92f054c4fd4bc52a66087ed9ec31d995751c9b5d37" + end + + head do + url "https://github.com/itstool/itstool.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build end - depends_on "autoconf" => :build - depends_on "automake" => :build depends_on "libxml2" - depends_on "python@3.10" + depends_on "python@3.11" def install - xy = Language::Python.major_minor_version Formula["python@3.9"].opt_bin/"python3" - ENV.append_path "PYTHONPATH", "#{Formula["libxml2"].opt_lib}/python#{xy}/site-packages" + python3 = "python3.11" + ENV.append_path "PYTHONPATH", Formula["libxml2"].opt_prefix/Language::Python.site_packages(python3) - system "./autogen.sh", "--prefix=#{libexec}", - "PYTHON=#{Formula["python@3.10"].opt_bin}/python3" + configure = build.head? ? "./autogen.sh" : "./configure" + system configure, "--prefix=#{libexec}", "PYTHON=#{which(python3)}" system "make", "install" - bin.install Dir["#{libexec}/bin/*"] - bin.env_script_all_files(libexec/"bin", PYTHONPATH: ENV["PYTHONPATH"]) + bin.install Dir[libexec/"bin/*"] + bin.env_script_all_files libexec/"bin", PYTHONPATH: ENV["PYTHONPATH"] pkgshare.install_symlink libexec/"share/itstool/its" man1.install_symlink libexec/"share/man/man1/itstool.1" end