forked from EOSIO/homebrew-eosio
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdoxygen.rb
46 lines (39 loc) · 1.73 KB
/
doxygen.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
class Doxygen < Formula
desc "PROTOCOL VERSION (no cmake): 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"
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 "qt" => :optional
# Fix build breakage for 1.8.15 and CMake 3.13
# https://github.com/Homebrew/homebrew-core/issues/35815
patch do
url "https://github.com/doxygen/doxygen/commit/889eab308b564c4deba4ef58a3f134a309e3e9d1.diff?full_index=1"
sha256 "ba4f9251e2057aa4da3ae025f8c5f97ea11bf26065a3f0e3b313b9acdad0b938"
end
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 "/Users/#{ENV['USER']}/bin/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