Skip to content

Commit

Permalink
itstool: add 2.0.7_1 bottle.
Browse files Browse the repository at this point in the history
  • Loading branch information
gromgit committed Jan 18, 2023
1 parent 7643be8 commit 58e20c2
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions Formula/itstool.rb
Original file line number Diff line number Diff line change
@@ -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["[email protected]"].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["[email protected]"].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
Expand Down

0 comments on commit 58e20c2

Please sign in to comment.