blob: a485eea0c792aea691f3b35fd9fac2fb0a317ac3 (
plain)
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
|
require "formula"
class Xplanet < Formula
homepage "http://xplanet.sourceforge.net/"
url "https://downloads.sourceforge.net/project/xplanet/xplanet/1.3.0/xplanet-1.3.0.tar.gz"
sha256 "44fb742bb93e5661ea8b11ccabcc12896693e051f3dd5083c9227224c416b442"
bottle do
revision 2
sha1 "f4494377cd80ce1332e9a171b914f9fa316406fb" => :mavericks
sha1 "bb5488ef9be45bb605560c0af8d85b5e297984fc" => :mountain_lion
sha1 "39f3137787a1f753d4fb083aaa05157368705fbd" => :lion
end
revision 1
option "with-x11", "Build for X11 instead of Aqua"
option "with-all", "Build with default Xplanet configuration dependencies"
option "with-pango", "Build Xplanet to support Internationalized text library"
option "with-netpbm", "Build Xplanet with PNM graphic support"
option "with-cspice", "Build Xplanet with JPLs SPICE toolkit support"
depends_on "pkg-config" => :build
depends_on "giflib" => :recommended
depends_on "jpeg" => :recommended
depends_on "libpng" => :recommended
depends_on "libtiff" => :recommended
if build.with?("all")
depends_on "netpbm"
depends_on "pango"
depends_on "cspice"
end
depends_on "netpbm" => :optional
depends_on "pango" => :optional
depends_on "cspice" => :optional
depends_on "freetype"
depends_on :x11 => :optional
def install
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
--without-cygwin
]
if build.without?("all")
args << "--without-gif" if build.without?("giflib")
args << "--without-jpeg" if build.without?("jpeg")
args << "--without-libpng" if build.without?("libpng")
args << "--without-libtiff" if build.without?("libtiff")
args << "--without-pnm" if build.without?("netpbm")
args << "--without-pango" if build.without?("pango")
args << "--without-cspice" if build.without?("cspice")
end
if build.with?("x11")
args << "--with-x" << "--with-xscreensaver" << "--without-aqua"
else
args << "--with-aqua" << "--without-x" << "--without-xscreensaver"
end
if build.with?("netpbm") || build.with?("all")
netpbm = Formula["netpbm"].opt_prefix
ENV.append "CPPFLAGS", "-I#{netpbm}/include/netpbm"
ENV.append "LDFLAGS", "-L#{netpbm}/lib"
end
system "./configure", *args
system "make", "install"
end
end
|