homebrew-core/Formula/zim.rb
2019-04-04 20:27:00 -04:00

44 lines
1.7 KiB
Ruby

class Zim < Formula
desc "Graphical text editor used to maintain a collection of wiki pages"
homepage "https://zim-wiki.org/"
url "https://github.com/jaap-karssenberg/zim-desktop-wiki/archive/0.70.tar.gz"
sha256 "3c828cf02c9ba7ca542e0a941e0a0b602e408e05453bcd4d5389f669d48bb764"
head "https://github.com/jaap-karssenberg/zim-desktop-wiki.git"
bottle do
cellar :any_skip_relocation
sha256 "29ac30fbab77422394e511fc31e0546deb7057883f675e8caa59b2183291633e" => :mojave
sha256 "29ac30fbab77422394e511fc31e0546deb7057883f675e8caa59b2183291633e" => :high_sierra
sha256 "5f31de4e3c2896f8e6a969ff0fee1e7aa653d8c556f23bc77a3a921f38d1a001" => :sierra
end
depends_on "pkg-config" => :build
depends_on "graphviz"
depends_on "gtk+3"
depends_on "pygobject3"
depends_on "pygtk"
depends_on "pygtksourceview"
depends_on "python"
resource "pyxdg" do
url "https://files.pythonhosted.org/packages/47/6e/311d5f22e2b76381719b5d0c6e9dc39cd33999adae67db71d7279a6d70f4/pyxdg-0.26.tar.gz"
sha256 "fe2928d3f532ed32b39c32a482b54136fe766d19936afc96c8f00645f9da1a06"
end
def install
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python3.7/site-packages"
resource("pyxdg").stage do
system "python", *Language::Python.setup_install_args(libexec/"vendor")
end
ENV["XDG_DATA_DIRS"] = libexec/"share"
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python3.7/site-packages"
system "python3", "./setup.py", "install", "--prefix=#{libexec}"
bin.install Dir[libexec/"bin/*"]
bin.env_script_all_files libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"], :XDG_DATA_DIRS => libexec/"share"
pkgshare.install "zim"
end
test do
system "#{bin}/zim", "--version"
end
end