53 lines
2 KiB
Ruby
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.5_all.tar.gz"
|
|
sha256 "12a36f07ab41fcf2b860904f6958c2efc925e3d6eaf20f713cddcce39fb0f250"
|
|
version "2.6.5"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "67af906a0435ae77661c6aa1d61ec7db8d18cc312c0b687f943d1ab545911b81" => :yosemite
|
|
sha256 "59702f286c81cbc1a6303f3e39a96989b845c066a1702034ade37fcb345b97cc" => :mavericks
|
|
sha256 "6a448172bf334bd3bb86e448cd52bb7c41b0057328ccd411de31eda0ecaa4053" => :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
|