cgal 4.8.1

use QT5 instead of QT4
This commit is contained in:
Alex Dunn 2016-08-28 03:29:39 -07:00 committed by ilovezfs
parent 5349d3dbd3
commit 1a80ecf46b

View file

@ -1,8 +1,8 @@
class Cgal < Formula
desc "CGAL: Computational Geometry Algorithm Library"
homepage "https://www.cgal.org/"
url "https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.7/CGAL-4.7.tar.gz"
sha256 "1be058fe9fc4d8331b48daf8beb114a049fd4970220d8a570ff709b7789dacae"
url "https://github.com/CGAL/cgal/releases/download/releases/CGAL-4.8.1/CGAL-4.8.1.tar.xz"
sha256 "fa2036e0a53cc54eee3dffe4763028e9aec831672c8259fa376d3c29e8f781b0"
bottle do
cellar :any
@ -11,15 +11,18 @@ class Cgal < Formula
sha256 "ba56ab4ee49f038a1cadf7dd8e3c03b0ecd1cd1a531d608ae360adfb03d0410a" => :mavericks
end
option :cxx11
deprecated_option "imaging" => "with-imaging"
option :cxx11
option "with-imaging", "Build ImageIO and QT compoments of CGAL"
option "with-eigen3", "Build with Eigen3 support"
option "with-lapack", "Build with LAPACK support"
depends_on "cmake" => :build
depends_on "mpfr"
depends_on "qt5" if build.with? "imaging"
depends_on "eigen" if build.with? "eigen3"
if build.cxx11?
depends_on "boost" => "c++11"
depends_on "gmp" => "c++11"
@ -27,13 +30,6 @@ class Cgal < Formula
depends_on "boost"
depends_on "gmp"
end
depends_on "mpfr"
depends_on "qt" if build.with? "imaging"
depends_on "eigen" if build.with? "eigen3"
# Allows to compile with clang 425: https://goo.gl/y9Dg2y
patch :DATA
def install
ENV.cxx11 if build.cxx11?
@ -54,20 +50,29 @@ class Cgal < Formula
system "cmake", *args
system "make", "install"
end
end
__END__
diff --git a/src/CGAL/File_header_extended_OFF.cpp b/src/CGAL/File_header_extended_OFF.cpp
index 3f709ff..f0e5bd3 100644
--- a/src/CGAL/File_header_extended_OFF.cpp
+++ b/src/CGAL/File_header_extended_OFF.cpp
@@ -186,7 +186,8 @@ std::istream& operator>>( std::istream& in, File_header_extended_OFF& h) {
}
in >> keyword;
}
- in >> skip_until_EOL >> skip_comment_OFF;
+ skip_until_EOL(in);
+ skip_comment_OFF(in);
return in;
}
#undef CGAL_IN
test do
# http://doc.cgal.org/latest/Algebraic_foundations/Algebraic_foundations_2interoperable_8cpp-example.html
(testpath/"surprise.cpp").write <<-EOS.undent
#include <CGAL/basic.h>
#include <CGAL/Coercion_traits.h>
#include <CGAL/IO/io.h>
template <typename A, typename B>
typename CGAL::Coercion_traits<A,B>::Type
binary_func(const A& a , const B& b){
typedef CGAL::Coercion_traits<A,B> CT;
CGAL_static_assertion((CT::Are_explicit_interoperable::value));
typename CT::Cast cast;
return cast(a)*cast(b);
}
int main(){
std::cout<< binary_func(double(3), int(5)) << std::endl;
std::cout<< binary_func(int(3), double(5)) << std::endl;
return 0;
}
EOS
system ENV.cxx, "-I#{include}", "-L#{lib}", "-lCGAL",
"surprise.cpp", "-o", "test"
assert_equal "15\n15", shell_output("./test").chomp
end
end