homebrew-core/Formula/gtk-doc.rb

61 lines
2.1 KiB
Ruby

class GtkDoc < Formula
desc "GTK+ documentation tool"
homepage "https://gitlab.gnome.org/GNOME/gtk-doc"
url "https://download.gnome.org/sources/gtk-doc/1.32/gtk-doc-1.32.tar.xz"
sha256 "de0ef034fb17cb21ab0c635ec730d19746bce52984a6706e7bbec6fb5e0b907c"
revision 1
# We use a common regex because gtk-doc doesn't use GNOME's "even-numbered
# minor is stable" version scheme.
livecheck do
url :stable
regex(/gtk-doc[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
cellar :any_skip_relocation
sha256 "2e0c508a1f6fe8ab48a03ab83f8471c3153ce937099437dad6bbbd1dd36a42ce" => :catalina
sha256 "2e0c508a1f6fe8ab48a03ab83f8471c3153ce937099437dad6bbbd1dd36a42ce" => :mojave
sha256 "2e0c508a1f6fe8ab48a03ab83f8471c3153ce937099437dad6bbbd1dd36a42ce" => :high_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@3.8"
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 Formula["python@3.8"].opt_bin/"python3"
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages"
resource("Pygments").stage do
system Formula["python@3.8"].opt_bin/"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