aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAbe Rajab2014-03-10 22:11:42 -0700
committerMike McQuaid2014-03-11 12:51:50 +0000
commitb8bcca9221a078ee0c4e6bf9fe2137f9fa08769b (patch)
treebb77cc88b8e3f7ac7acc11ddd0c859db030a1e13 /Library
parentf1614c140c3e438b01b304e5e2aa0070eba700de (diff)
downloadhomebrew-b8bcca9221a078ee0c4e6bf9fe2137f9fa08769b.tar.bz2
xplanet: adding with-all dependency option
Adding a "with-all" option so that the necessary dependencies installed with Xplanet match Xplanet's default configuration options, namely: PNM support via netpbm, TrueType support via freetype, and PANGOFT2 support via pango. This will not include JPLs CSPICE library since that is not a current formula. Assuming the user has followed the instructions to install and link CSPICE in Homebrew, this updated formula will include support for that as well. Closes #27403. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/xplanet.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Formula/xplanet.rb b/Library/Formula/xplanet.rb
index 5b6f603f9..ac9c72390 100644
--- a/Library/Formula/xplanet.rb
+++ b/Library/Formula/xplanet.rb
@@ -6,13 +6,21 @@ class Xplanet < Formula
sha1 '7c5208b501b441a0184cbb334a5658d0309d7dac'
option "with-x", "Build for X11 instead of Aqua"
+ option "with-all", "Build with default Xplanet configuration dependencies except JPL CSPICE (manual install)"
depends_on 'pkg-config' => :build
+ depends_on "libpng"
depends_on 'jpeg'
depends_on 'giflib'
depends_on 'libtiff'
depends_on :x11
+ if build.with? "all"
+ depends_on "netpbm"
+ depends_on "freetype"
+ depends_on "pango"
+ end
+
def install
args = %W[
--disable-dependency-tracking
@@ -24,6 +32,12 @@ class Xplanet < Formula
args << "--with-aqua" << "--without-x"
end
+ if 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