class Doxygen < Formula desc "Generate documentation for several programming languages" homepage "http://www.doxygen.org/" url "https://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.13.src.tar.gz" sha256 "af667887bd7a87dc0dbf9ac8d86c96b552dfb8ca9c790ed1cbffaa6131573f6b" head "https://github.com/doxygen/doxygen.git" bottle do cellar :any_skip_relocation sha256 "1a5065ab4f03154643aa0b3988ef460833898c459c1af3ba2a6e9206891e51d7" => :sierra sha256 "5614c88dc28e4c3f54645e02366646a19b3dad6ff0a3fc9f9525f5495dca467d" => :el_capitan sha256 "d1bd29b70a813314c2e7308d2d8e2593d22913c9a59b3a289885dfe08eba9096" => :yosemite end option "with-graphviz", "Build with dot command support from Graphviz." option "with-qt5", "Build GUI frontend with Qt support." option "with-llvm", "Build with libclang support." deprecated_option "with-dot" => "with-graphviz" deprecated_option "with-doxywizard" => "with-qt5" deprecated_option "with-libclang" => "with-llvm" depends_on "cmake" => :build depends_on "graphviz" => :optional depends_on "qt5" => :optional depends_on "llvm" => :optional def install args = std_cmake_args << "-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=#{MacOS.version}" args << "-Dbuild_wizard=ON" if build.with? "qt5" 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