72 lines
2.3 KiB
Ruby
72 lines
2.3 KiB
Ruby
class Povray < Formula
|
|
desc "Persistence Of Vision RAYtracer (POVRAY)"
|
|
homepage "https://www.povray.org/"
|
|
url "https://github.com/POV-Ray/povray/archive/v3.7.0.10.tar.gz"
|
|
sha256 "7bee83d9296b98b7956eb94210cf30aa5c1bbeada8ef6b93bb52228bbc83abff"
|
|
license "AGPL-3.0-or-later"
|
|
revision 1
|
|
head "https://github.com/POV-Ray/povray.git", branch: "master"
|
|
|
|
livecheck do
|
|
url :stable
|
|
regex(/^v?(\d+(?:\.\d+)+\.\d{1,4})$/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 arm64_monterey: "86cff67d1cc28d4da2cf009ccaa095338cc361a83a8e77533e241a0a9483b171"
|
|
sha256 arm64_big_sur: "323a45aa39fc07851a6ff9e0c5c52df5e79db3885ffa5a92e9848a7aa0b1cd6a"
|
|
sha256 monterey: "42aff4310d6e07f5992311c44666ee751c75907ec2cc8def1e78b5d4f7794bf0"
|
|
sha256 big_sur: "411a4d7227b73cc564ab110bc223b53f29bd6bd29a05127fbd02bfdd5cf468b9"
|
|
sha256 catalina: "78e8ed7577c8d5640365d09edc79ad55e43deccb5c181fc8a537ad0f31685954"
|
|
sha256 x86_64_linux: "3c721140cae7a89f1e0517b9241610ab8b981627c326a7801e68d9754f66fdf6"
|
|
end
|
|
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "boost"
|
|
depends_on "imath"
|
|
depends_on "jpeg"
|
|
depends_on "libpng"
|
|
depends_on "libtiff"
|
|
depends_on "openexr"
|
|
|
|
def install
|
|
ENV.cxx11
|
|
|
|
args = %W[
|
|
COMPILED_BY=homebrew
|
|
--disable-debug
|
|
--disable-dependency-tracking
|
|
--prefix=#{prefix}
|
|
--mandir=#{man}
|
|
--with-boost=#{Formula["boost"].opt_prefix}
|
|
--with-openexr=#{Formula["openexr"].opt_prefix}
|
|
--without-libsdl
|
|
--without-x
|
|
]
|
|
|
|
# Adjust some scripts to search for `etc` in HOMEBREW_PREFIX.
|
|
%w[allanim allscene portfolio].each do |script|
|
|
inreplace "unix/scripts/#{script}.sh",
|
|
/^DEFAULT_DIR=.*$/, "DEFAULT_DIR=#{HOMEBREW_PREFIX}"
|
|
end
|
|
|
|
cd "unix" do
|
|
system "./prebuild.sh"
|
|
end
|
|
|
|
system "./configure", *args
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
# Condensed version of `share/povray-3.7/scripts/allscene.sh` that only
|
|
# renders variants of the famous Utah teapot as a quick smoke test.
|
|
scenes = Dir["#{share}/povray-3.7/scenes/advanced/teapot/*.pov"]
|
|
assert !scenes.empty?, "Failed to find test scenes."
|
|
scenes.each do |scene|
|
|
system "#{share}/povray-3.7/scripts/render_scene.sh", ".", scene
|
|
end
|
|
end
|
|
end
|