homebrew-core/Formula/doxygen.rb
2018-12-28 15:24:40 +08:00

47 lines
1.7 KiB
Ruby

class Doxygen < Formula
desc "Generate documentation for several programming languages"
homepage "http://www.doxygen.org/"
url "http://doxygen.nl/files/doxygen-1.8.15.src.tar.gz"
mirror "https://downloads.sourceforge.net/project/doxygen/rel-1.8.15/doxygen-1.8.15.src.tar.gz"
sha256 "bd9c0ec462b6a9b5b41ede97bede5458e0d7bb40d4cfa27f6f622eb33c59245d"
head "https://github.com/doxygen/doxygen.git"
bottle do
cellar :any_skip_relocation
sha256 "2ca215c26200d5e12735c306dead7fef458613d94857b28f7e425929f8dd65dd" => :mojave
sha256 "11c0ec6f8ad45c65904f085aea930f4ddc7c6d6a507610e63fed8ceb0c81735b" => :high_sierra
sha256 "ef99a58a814f6d022b19d34e4f1498ca9a12682ba8a7938147813888f4bbec45" => :sierra
end
option "with-graphviz", "Build with dot command support from Graphviz."
option "with-qt", "Build GUI frontend with Qt support."
option "with-llvm", "Build with libclang support."
deprecated_option "with-dot" => "with-graphviz"
deprecated_option "with-doxywizard" => "with-qt"
deprecated_option "with-libclang" => "with-llvm"
deprecated_option "with-qt5" => "with-qt"
depends_on "cmake" => :build
depends_on "graphviz" => :optional
depends_on "llvm" => :optional
depends_on "qt" => :optional
def install
args = std_cmake_args << "-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=#{MacOS.version}"
args << "-Dbuild_wizard=ON" if build.with? "qt"
args << "-Duse_libclang=ON -DLLVM_CONFIG=#{Formula["llvm"].opt_bin}/llvm-config" if build.with? "llvm"
mkdir "build" do
system "cmake", "..", *args
system "make"
end
bin.install Dir["build/bin/*"]
man1.install Dir["doc/*.1"]
end
test do
system "#{bin}/doxygen", "-g"
system "#{bin}/doxygen", "Doxyfile"
end
end