forked from Ensembl/homebrew-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
graphviz.rb
132 lines (114 loc) · 4.32 KB
/
graphviz.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
class Graphviz < Formula
desc "Graph visualization software from AT&T and Bell Labs"
homepage "https://graphviz.org/"
# versioned URLs are missing upstream as of 16 Dec 2017
url "https://www.mirrorservice.org/sites/distfiles.macports.org/graphviz/graphviz-2.40.1.tar.gz"
mirror "https://fossies.org/linux/misc/graphviz-2.40.1.tar.gz"
sha256 "ca5218fade0204d59947126c38439f432853543b0818d9d728c589dfe7f3a421"
version_scheme 1
bottle do
rebuild 1
sha256 "b592ce51c2a929c3da82e96ec856571ebfc54cf4dac90c2924cd3845078d7082" => :high_sierra
sha256 "41b5811054f03978db12525919540fe41e073fb2c20e899247ed9c2a191f7a66" => :sierra
sha256 "cab27f92a59d543e2f2c1494c28c7563a4c2d7e0dce4c4fbc22587db91cafc5b" => :el_capitan
sha256 "6bd4c01e724cfc965871e1aad9a4fb2a6afef90a1e254d81e2fe33a997f50aaa" => :yosemite
sha256 "4713489ba984e5f76ee886ba0c1d0c891945516fe42159dc05787ab705165127" => :x86_64_linux # glibc 2.19
end
patch :p1, :DATA
head do
url "https://github.com/ellson/graphviz.git"
depends_on "automake" => :build
depends_on "autoconf" => :build
depends_on "libtool" => :build
end
option "with-bindings", "Build Perl/Python/Ruby/etc. bindings"
option "with-pango", "Build with Pango/Cairo for alternate PDF output"
option "with-app", "Build GraphViz.app (requires full XCode install)"
option "with-gts", "Build with GNU GTS support (required by prism)"
deprecated_option "with-x" => "with-x11"
deprecated_option "with-pangocairo" => "with-pango"
depends_on "pkg-config" => :build
depends_on :xcode => :build if build.with? "app"
depends_on "libtool"
depends_on "pango" => :optional
depends_on "gts" => :optional
depends_on "librsvg" => :optional
depends_on "freetype" => :optional
depends_on :x11 => :optional
depends_on "gd"
depends_on "libpng"
if build.with? "bindings"
depends_on "swig" => :build
depends_on :python
depends_on :java
depends_on "ruby"
end
def install
# Only needed when using superenv, which causes qfrexp and qldexp to be
# falsely detected as available. The problem is triggered by
# args << "-#{ENV["HOMEBREW_OPTIMIZATION_LEVEL"]}"
# during argument refurbishment of cflags.
# https://github.com/Homebrew/brew/blob/ab060c9/Library/Homebrew/shims/super/cc#L241
# https://github.com/Homebrew/legacy-homebrew/issues/14566
# Alternative fixes include using stdenv or using "xcrun make"
inreplace "lib/sfio/features/sfio", "lib qfrexp\nlib qldexp\n", ""
if build.with? "bindings"
# the ruby pkg-config file is version specific
inreplace "configure" do |s|
s.gsub! "ruby-1.9", "ruby-#{Formula["ruby"].stable.version.to_f}"
s.gsub! "if test `$SWIG -php7 2>&1", "if test `$SWIG -php0 2>&1"
end
end
args = %W[
--disable-debug
--disable-dependency-tracking
--prefix=#{prefix}
--without-qt
--with-quartz
--disable-php
--with-sysroot=#{HOMEBREW_PREFIX}
--with-expatlibdir=#{lib}
--with-expatincludedir=#{include}
]
args << "--with-gts" if build.with? "gts"
args << "--disable-swig" if build.without? "bindings"
args << "--without-pangocairo" if build.without? "pango"
args << "--without-freetype2" if build.without? "freetype"
args << "--without-x" if build.without? "x11"
args << "--without-rsvg" if build.without? "librsvg"
if build.head?
system "./autogen.sh", *args
else
system "./configure", *args
end
system "make", "install"
if build.with? "app"
cd "macosx" do
xcodebuild "SDKROOT=#{MacOS.sdk_path}", "-configuration", "Release", "SYMROOT=build", "PREFIX=#{prefix}",
"ONLY_ACTIVE_ARCH=YES", "MACOSX_DEPLOYMENT_TARGET=#{MacOS.version}"
end
prefix.install "macosx/build/Release/Graphviz.app"
end
(bin/"gvmap.sh").unlink
end
test do
(testpath/"sample.dot").write <<~EOS
digraph G {
a -> b
}
EOS
system "#{bin}/dot", "-Tpng", "-o", "sample.png", "sample.dot"
end
end
__END__
diff --git a/lib/vmalloc/features/vmalloc b/lib/vmalloc/features/vmalloc
index 10d62a8..aba7b51 100644
--- a/lib/vmalloc/features/vmalloc
+++ b/lib/vmalloc/features/vmalloc
@@ -13,7 +13,6 @@ typ ssize_t
hdr malloc
lib mallopt
lib mallinfo
-lib mstats
hdr dlfcn
std malloc note{ stuck with standard malloc }end noexecute{