homebrew-core/Formula/gtk-doc.rb
2019-09-30 20:13:30 +02:00

52 lines
1.9 KiB
Ruby

class GtkDoc < Formula
desc "GTK+ documentation tool"
homepage "https://www.gtk.org/gtk-doc/"
url "https://download.gnome.org/sources/gtk-doc/1.32/gtk-doc-1.32.tar.xz"
sha256 "de0ef034fb17cb21ab0c635ec730d19746bce52984a6706e7bbec6fb5e0b907c"
bottle do
cellar :any_skip_relocation
sha256 "c2a37977def6cbd8225e422533ff471908c76a5cea619f8e92fa2c625e7d7cbf" => :catalina
sha256 "79d3ef58493e71bfa4782d7ac1a4a19500f085b2b3fc348880b5f5645a10fe7e" => :mojave
sha256 "79d3ef58493e71bfa4782d7ac1a4a19500f085b2b3fc348880b5f5645a10fe7e" => :high_sierra
sha256 "62a6648f580ec06ba130accd90bb5bf178780d84fc338b98f05acf59e67423e1" => :sierra
end
depends_on "itstool" => :build
depends_on "pkg-config" => :build
depends_on "docbook"
depends_on "docbook-xsl"
depends_on "gettext"
depends_on "libxml2"
depends_on "python"
depends_on "source-highlight"
uses_from_macos "libxslt"
resource "Pygments" do
url "https://files.pythonhosted.org/packages/7e/ae/26808275fc76bf2832deb10d3a3ed3107bc4de01b85dcccbe525f2cd6d1e/Pygments-2.4.2.tar.gz"
sha256 "881c4c157e45f30af185c1ffe8d549d48ac9127433f2c380c24b84572ad66297"
end
def install
xy = Language::Python.major_minor_version "python3"
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages"
resource("Pygments").stage do
system "python3", *Language::Python.setup_install_args(libexec/"vendor")
end
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--with-highlight=source-highlight",
"--with-xml-catalog=#{etc}/xml/catalog"
system "make"
system "make", "install"
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
end
test do
system bin/"gtkdoc-scan", "--module=test"
system bin/"gtkdoc-mkdb", "--module=test"
end
end