-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwxwidgets.rb
73 lines (64 loc) · 2.04 KB
/
wxwidgets.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
class Wxwidgets < Formula
desc "Cross-platform C++ GUI toolkit"
homepage "https://www.wxwidgets.org"
url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.tar.bz2"
sha256 "d7b3666de33aa5c10ea41bb9405c40326e1aeb74ee725bb88f90f1d50270a224"
license "wxWindows"
head "https://github.com/wxWidgets/wxWidgets.git"
livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
depends_on "jpeg"
depends_on "libpng"
depends_on "libtiff"
on_linux do
depends_on "pkg-config" => :build
depends_on "gtk+3"
depends_on "libsm"
depends_on "mesa-glu"
end
def install
args = [
"--prefix=#{prefix}",
"--enable-clipboard",
"--enable-controls",
"--enable-dataviewctrl",
"--enable-display",
"--enable-dnd",
"--enable-graphics_ctx",
"--enable-std_string",
"--enable-svg",
"--enable-unicode",
"--enable-webviewwebkit",
"--with-expat",
"--with-libjpeg",
"--with-libpng",
"--with-libtiff",
"--with-opengl",
"--with-zlib",
"--disable-precomp-headers",
# This is the default option, but be explicit
"--disable-monolithic",
]
on_macos do
# Set with-macosx-version-min to avoid configure defaulting to 10.5
args << "--with-macosx-version-min=#{MacOS.version}"
args << "--with-osx_cocoa"
args << "--with-libiconv"
end
system "./configure", *args
system "make", "install"
# wx-config should reference the public prefix, not wxwidgets's keg
# this ensures that Python software trying to locate wxpython headers
# using wx-config can find both wxwidgets and wxpython headers,
# which are linked to the same place
inreplace "#{bin}/wx-config", prefix, HOMEBREW_PREFIX
# For consistency with the versioned wxwidgets formulae
bin.install_symlink "#{bin}/wx-config" => "wx-config-#{version.major_minor}"
(share/"wx"/version.major_minor).install share/"aclocal", share/"bakefile"
end
test do
system bin/"wx-config", "--libs"
end
end