2013-02-08 13:54:10 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Coin < Formula
|
|
|
|
homepage 'https://bitbucket.org/Coin3D/coin/wiki/Home'
|
|
|
|
url 'https://bitbucket.org/Coin3D/coin/downloads/Coin-3.1.3.tar.gz'
|
|
|
|
sha1 '8e9f05628461963623686d3ec53102214e233dd1'
|
|
|
|
|
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"
|
|
|
|
sha1 "c64f00f8c219b69f10ddfffe6294fb02be73dd20"
|
|
|
|
end
|
|
|
|
|
|
|
|
def patches
|
|
|
|
# https://bitbucket.org/Coin3D/coin/pull-request/3/missing-include/diff
|
|
|
|
"https://bitbucket.org/cbuehler/coin/commits/e146a6a93a6b807c28c3d73b3baba80fa41bc5f6/raw"
|
|
|
|
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)
|
|
|
|
inreplace "configure", '-fno-for-scoping', '-fno-for-scope'
|
|
|
|
|
|
|
|
# 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}"
|
2013-02-08 13:54:10 +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
|