2014-04-28 00:55:22 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class Xplanetfx < Formula
|
|
|
|
homepage "http://mein-neues-blog.de/xplanetFX/"
|
2014-06-20 14:56:00 +00:00
|
|
|
url "http://repository.mein-neues-blog.de:9000/archive/xplanetfx-2.5.29_all.tar.gz"
|
|
|
|
sha1 "13d1ec98567623fce92c3536cb015c4c63ba4b11"
|
|
|
|
version "2.5.29"
|
2014-04-28 00:55:22 +00:00
|
|
|
|
2014-05-05 06:01:33 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-06-21 16:45:01 +00:00
|
|
|
sha1 "896bb5909553b0b4bd3429ecfb71e543f72ed1c0" => :mavericks
|
|
|
|
sha1 "f6c65e63627c3ab04978b95dc614d723cb8f7809" => :mountain_lion
|
|
|
|
sha1 "7853a1a73196d16e64bdbaa7751efcb3d114af56" => :lion
|
2014-05-05 06:01:33 +00:00
|
|
|
end
|
|
|
|
|
2014-04-28 00:55:22 +00:00
|
|
|
option "without-perlmagick", "Build without PerlMagick support - used to check cloud map downloads"
|
2014-05-23 19:20:13 +00:00
|
|
|
option "without-gui", "Build to run xplanetFX from the command-line only"
|
2014-04-28 00:55:22 +00:00
|
|
|
option "with-gnu-sed", "Build to use GNU sed instead of OS X sed"
|
|
|
|
|
|
|
|
depends_on "xplanet"
|
|
|
|
depends_on "imagemagick"
|
|
|
|
depends_on "wget"
|
|
|
|
depends_on "coreutils"
|
|
|
|
depends_on "gnu-sed" => :optional
|
|
|
|
depends_on "perlmagick" => :recommended
|
|
|
|
|
|
|
|
if build.with? "gui"
|
|
|
|
depends_on "librsvg"
|
|
|
|
depends_on "pygtk" => "with-libglade"
|
|
|
|
end
|
|
|
|
|
|
|
|
skip_clean "share/xplanetFX"
|
|
|
|
|
|
|
|
def install
|
|
|
|
inreplace "bin/xplanetFX", "WORKDIR=/usr/share/xplanetFX", "WORKDIR=#{HOMEBREW_PREFIX}/share/xplanetFX"
|
|
|
|
|
|
|
|
prefix.install "bin", "share"
|
|
|
|
|
|
|
|
sPATH = "#{Formula["coreutils"].opt_prefix}/libexec/gnubin"
|
|
|
|
sPATH += ":#{Formula["gnu-sed"].opt_prefix}/libexec/gnubin" if build.with?("gnu-sed")
|
|
|
|
ENV.prepend_create_path "PERL5LIB", "#{HOMEBREW_PREFIX}/lib/perl5/site_perl/5.16.2" if build.with?("perlmagick")
|
2014-05-23 19:20:13 +00:00
|
|
|
if build.with?("gui")
|
|
|
|
ENV.prepend_create_path "PYTHONPATH", "#{HOMEBREW_PREFIX}/lib/python2.7/site-packages/gtk-2.0"
|
|
|
|
ENV.prepend_create_path "GDK_PIXBUF_MODULEDIR", "#{HOMEBREW_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders"
|
|
|
|
end
|
2014-04-28 00:55:22 +00:00
|
|
|
bin.env_script_all_files(libexec+'bin', :PATH => "#{sPATH}:$PATH", :PYTHONPATH => ENV["PYTHONPATH"], :PERL5LIB => ENV["PERL5LIB"], :GDK_PIXBUF_MODULEDIR => ENV["GDK_PIXBUF_MODULEDIR"])
|
|
|
|
end
|
|
|
|
|
|
|
|
def post_install
|
|
|
|
if build.with?("gui")
|
|
|
|
# Change the version directory below with any future update
|
|
|
|
ENV["GDK_PIXBUF_MODULEDIR"]="#{HOMEBREW_PREFIX}/lib/gdk-pixbuf-2.0/2.10.0/loaders"
|
|
|
|
system "#{HOMEBREW_PREFIX}/bin/gdk-pixbuf-query-loaders", "--update-cache"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|