homebrew-core/Formula/xplanetfx.rb
blogabe b8198ce6e9 xplanet, xplanetfx, cspice: use sha256.
Closes Homebrew/homebrew#37643.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-03-12 15:48:41 +00:00

53 lines
2 KiB
Ruby

require "formula"
class Xplanetfx < Formula
homepage "http://mein-neues-blog.de/xplanetFX/"
url "http://repository.mein-neues-blog.de:9000/archive/xplanetfx-2.6.4_all.tar.gz"
sha256 "0c7ea5783103f00867eecc1603e598b89fd52bd19954fd2976e3aa89390813ca"
version "2.6.4"
bottle do
cellar :any
sha256 "9d369a95ea8b1ea8421f9e63041ede5f452fb04418bd684ef58f6db49794a86e" => :yosemite
sha256 "85fffdc38d701f4d4739aa9bc0043f0c2cfcaa2998483e4b0e8321ebbfec7853" => :mavericks
sha256 "9c803d55555e7d4bceb6f5296fd53d83c44ea40014030f1f4e2922f5f96fc583" => :mountain_lion
end
option "without-gui", "Build to run xplanetFX from the command-line only"
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
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"
path = "#{Formula["coreutils"].opt_libexec}/gnubin"
path += ":#{Formula["gnu-sed"].opt_libexec}/gnubin" if build.with?("gnu-sed")
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
bin.env_script_all_files(libexec+'bin', :PATH => "#{path}:$PATH", :PYTHONPATH => ENV["PYTHONPATH"], :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