2013-02-08 13:54:10 +00:00
|
|
|
class Coin < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Retained-mode toolkit for 3D graphics development"
|
2015-08-03 12:55:31 +00:00
|
|
|
homepage "https://bitbucket.org/Coin3D/coin/wiki/Home"
|
|
|
|
url "https://bitbucket.org/Coin3D/coin/downloads/Coin-3.1.3.tar.gz"
|
|
|
|
sha256 "583478c581317862aa03a19f14c527c3888478a06284b9a46a0155fa5886d417"
|
2013-02-08 13:54:10 +00:00
|
|
|
|
2016-04-09 13:46:15 +00:00
|
|
|
bottle do
|
|
|
|
sha256 "f0f93e3c4a2b485866c9ec3a18931da88e86119854073c4e1c54ce93847f7f08" => :el_capitan
|
|
|
|
sha256 "1b3e64aab7fe177f944b2ffcaccc3a068c992ebdd5f3047c15be513812797394" => :yosemite
|
|
|
|
sha256 "db9f40c702a1b6955f23582988dcefd5866fa4d06589e4e16ec50ec11e64e87d" => :mavericks
|
|
|
|
end
|
|
|
|
|
2014-01-23 07:11:48 +00:00
|
|
|
option "without-soqt", "Build without SoQt"
|
|
|
|
|
|
|
|
if build.with? "soqt"
|
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "qt"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "soqt" do
|
|
|
|
url "https://bitbucket.org/Coin3D/coin/downloads/SoQt-1.5.0.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "f6a34b4c19e536c00f21aead298cdd274a7a0b03a31826fbe38fc96f3d82ab91"
|
2014-01-23 07:11:48 +00:00
|
|
|
end
|
|
|
|
|
2014-03-17 00:35:06 +00:00
|
|
|
# https://bitbucket.org/Coin3D/coin/pull-request/3/missing-include/diff
|
|
|
|
patch do
|
|
|
|
url "https://bitbucket.org/cbuehler/coin/commits/e146a6a93a6b807c28c3d73b3baba80fa41bc5f6/raw"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "6ecbd868ed574339b7fec3882e5fdccd40a60094800f9b5c081899091fdc3ab5"
|
2014-01-23 07:11:48 +00:00
|
|
|
end
|
|
|
|
|
2013-02-08 13:54:10 +00:00
|
|
|
def install
|
2014-01-11 05:54:18 +00:00
|
|
|
# https://bitbucket.org/Coin3D/coin/issue/47 (fix misspelled test flag)
|
2015-08-03 12:55:31 +00:00
|
|
|
inreplace "configure", "-fno-for-scoping", "-fno-for-scope"
|
2014-01-11 05:54:18 +00:00
|
|
|
|
|
|
|
# https://bitbucket.org/Coin3D/coin/issue/45 (suppress math-undefs)
|
|
|
|
# http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/graphics/Coin/patches/patch-include_Inventor_C_base_math-undefs.h
|
|
|
|
inreplace "include/Inventor/C/base/math-undefs.h", "#ifndef COIN_MATH_UNDEFS_H", "#if false"
|
|
|
|
|
2013-02-08 13:54:10 +00:00
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
2014-01-23 07:11:48 +00:00
|
|
|
"--with-framework-prefix=#{frameworks}"
|
2015-08-03 12:55:31 +00:00
|
|
|
system "make", "install"
|
2014-01-23 07:11:48 +00:00
|
|
|
|
|
|
|
if build.with? "soqt"
|
|
|
|
resource("soqt").stage do
|
|
|
|
ENV.deparallelize
|
|
|
|
|
|
|
|
# https://bitbucket.org/Coin3D/coin/issue/40#comment-7888751
|
|
|
|
inreplace "configure", /^(LIBS=\$sim_ac_uniqued_list)$/, "# \\1"
|
|
|
|
|
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--with-framework-prefix=#{frameworks}",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
end
|
2013-02-08 13:54:10 +00:00
|
|
|
end
|
|
|
|
end
|