[Git][debian-gis-team/sfcgal][upstream] New upstream version 1.3.3

Bas Couwenberg gitlab at salsa.debian.org
Fri Apr 6 14:35:59 UTC 2018


Bas Couwenberg pushed to branch upstream at Debian GIS Project / sfcgal


Commits:
7b959a32 by Bas Couwenberg at 2018-04-06T14:01:03+02:00
New upstream version 1.3.3
- - - - -


22 changed files:

- .travis.yml
- CMakeLists.txt
- NEWS
- − cmake/Modules/FindCGAL.cmake
- src/Coordinate.cpp
- src/detail/io/Serialization.cpp
- src/detail/io/Serialization.h
- src/detail/io/WktReader.cpp
- src/detail/io/WktWriter.cpp
- src/detail/tools/InputStreamReader.h
- src/numeric.cpp
- src/numeric.h
- test/garden/CMakeLists.txt
- test/regress/convex_hull/CMakeLists.txt
- test/regress/polygon_triangulator/CMakeLists.txt
- test/regress/standalone/CMakeLists.txt
- test/unit/CMakeLists.txt
- test/unit/SFCGAL/KernelTest.cpp
- test/unit/SFCGAL/algorithm/ConvexHullTest.cpp
- test/unit/SFCGAL/io/WktReaderTest.cpp
- travis/linux/before_install.sh
- travis/linux/install_cgal.sh


Changes:

=====================================
.travis.yml
=====================================
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,6 @@
-language: cpp
+language: cpp 
+dist: trusty 
+sudo: required 
 
 # os:
 #  - linux
@@ -9,14 +11,14 @@ compiler:
   - clang
 
 env:
-  - CGAL_VERSION=4.3
-  - CGAL_VERSION=4.7
+  - CGAL_VERSION=4.10.2
+  - CGAL_VERSION=4.11.1
 
 before_install:
   - ./travis/${TRAVIS_OS_NAME}/before_install.sh $CGAL_VERSION
 
 before_script:
-  - cmake -DSFCGAL_BUILD_TESTS=ON
+  - CGAL_DIR=/usr/local/lib/CGAL cmake -DSFCGAL_BUILD_TESTS=ON
 
 script:
   - make


=====================================
CMakeLists.txt
=====================================
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,7 +25,7 @@ set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules;${CMAKE_MODULE_PATH}" 
 
 set( SFCGAL_VERSION_MAJOR 1 )
 set( SFCGAL_VERSION_MINOR 3 )
-set( SFCGAL_VERSION_PATCH 2 )
+set( SFCGAL_VERSION_PATCH 1 )
 
 set( SFCGAL_VERSION "${SFCGAL_VERSION_MAJOR}.${SFCGAL_VERSION_MINOR}.${SFCGAL_VERSION_PATCH}" )
 


=====================================
NEWS
=====================================
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,3 @@
-1.3.2 (2017-09-13):
-    * Fix compilation with CGAL 4.10. CGAL 4.10.1 is needed
 1.3.1 (2017-05-29):
     * Add a SFCGAL-osg library for OSG specific functions
     * Fix C API geometry_is_planar


=====================================
cmake/Modules/FindCGAL.cmake deleted
=====================================
--- a/cmake/Modules/FindCGAL.cmake
+++ /dev/null
@@ -1,93 +0,0 @@
-find_path(CGAL_INCLUDE_DIRS CGAL/gmp.h
-    HINTS $ENV{CGAL_DIR}/include ${CGAL_DIR}/include ${CGAL_INCLUDE_DIRS}
-    PATH_SUFFIXES CGAL
-)
-
-if( MSVC10)
-	set( CGAL_LIBRARY_POSTFIX "-vc100-mt-${CGAL_VERSION}" )
-	set( CGAL_LIBRARY_POSTFIX_DEBUG "-vc100-mt-gd-${CGAL_VERSION}" )
-else()
-	set( CGAL_LIBRARY_POSTFIX "")
-	set( CGAL_LIBRARY_POSTFIX_DEBUG "d")
-endif()
-
-#-- incidates if debug version are found
-set( CGAL_DEBUG_FOUND ON )
-
-
-#-- find CGAL library
-find_library( CGAL_LIBRARY "CGAL${CGAL_LIBRARY_POSTFIX}" ${CGAL_LIBRARY}
-	HINTS ${CGAL_LIBRARY_DIRS} $ENV{CGAL_DIR}/lib
-)
-if( CGAL_LIBRARY )
-	get_filename_component(CGAL_LIBRARY_DIRS ${CGAL_LIBRARY} PATH)
-endif()
-
-if(CGAL_FIND_VERSION)
-    message("CGAL_DIR ${CGAL_DIR}")
-    find_file(version_file version.h HINTS $ENV{CGAL_DIR}/include ${CGAL_DIR}/include ${CGAL_INCLUDE_DIRS} PATH_SUFFIXES CGAL)
-    file(STRINGS ${version_file} version_str REGEX "# *define +CGAL_VERSION +")
-    string( REGEX REPLACE "# *define +CGAL_VERSION +" "" CGAL_VERSION ${version_str})
-    if("${CGAL_VERSION}" VERSION_LESS "${CGAL_FIND_VERSION}")
-        message(FATAL_ERROR "CGAL " ${CGAL_FIND_VERSION} " is required (found " ${CGAL_VERSION} " in ${version_file})" )
-    endif()
-
-endif()
-
-find_library( CGAL_LIBRARY_DEBUG "CGAL${CGAL_LIBRARY_POSTFIX_DEBUG}" ${CGAL_LIBRARY_DEBUG}
-	HINTS ${CGAL_LIBRARY_DIRS}
-)
-if( NOT CGAL_LIBRARY_DEBUG )
-	set( CGAL_DEBUG_FOUND OFF )
-endif()
-
-#-- CGAL components (Core, ImageIO)
-foreach( CGAL_COMPONENT ${CGAL_FIND_COMPONENTS} )
-	#-- find release
-	find_library( CGAL_${CGAL_COMPONENT}_LIBRARY "CGAL_${CGAL_COMPONENT}${CGAL_LIBRARY_POSTFIX}" "${CGAL_${CGAL_COMPONENT}_LIBRARY}"
-		HINTS ${CGAL_LIBRARY_DIRS} $ENV{CGAL_DIR}/lib
-	)
-	#-- find debug
-	find_library( CGAL_${CGAL_COMPONENT}_LIBRARY_DEBUG "CGAL_${CGAL_COMPONENT}${CGAL_LIBRARY_POSTFIX_DEBUG}" "${CGAL_${CGAL_COMPONENT}_LIBRARY_DEBUG}"
-		HINTS ${CGAL_LIBRARY_DIRS} $ENV{CGAL_DIR}/lib
-	)
-	
-	if( NOT CGAL_${CGAL_COMPONENT}_LIBRARY_DEBUG )
-		set( CGAL_DEBUG_FOUND OFF )
-	endif()
-endforeach()
- 
-
-#-- build variable CGAL_LIBRARIES
-
-set( CGAL_LIBRARIES "" )
-if( ${CGAL_DEBUG_FOUND} )
-	list( APPEND CGAL_LIBRARIES optimized ${CGAL_LIBRARY} debug ${CGAL_LIBRARY_DEBUG} )
-	foreach( CGAL_COMPONENT ${CGAL_FIND_COMPONENTS} )
-		list( APPEND CGAL_LIBRARIES optimized "${CGAL_${CGAL_COMPONENT}_LIBRARY}" debug "${CGAL_${CGAL_COMPONENT}_LIBRARY_DEBUG}" )
-	endforeach()
-else()
-	list( APPEND CGAL_LIBRARIES ${CGAL_LIBRARY} )
-	foreach( CGAL_COMPONENT ${CGAL_FIND_COMPONENTS} )
-		list( APPEND CGAL_LIBRARIES ${CGAL_${CGAL_COMPONENT}_LIBRARY} )
-	endforeach()
-endif()
-
-#-- report/validate
-set( CGAL_COMPONENT_LIBRARIES "" )
-set( CGAL_COMPONENT_LIBRARIES_DEBUG "" )
-foreach( CGAL_COMPONENT ${CGAL_FIND_COMPONENTS} )
-	list( APPEND CGAL_COMPONENT_LIBRARIES CGAL_${CGAL_COMPONENT}_LIBRARY )
-	list( APPEND CGAL_COMPONENT_LIBRARIES_DEBUG CGAL_${CGAL_COMPONENT}_LIBRARY_DEBUG )
-endforeach()
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(
-	CGAL DEFAULT_MSG
-	CGAL_INCLUDE_DIRS CGAL_LIBRARIES ${CGAL_COMPONENT_LIBRARIES}
-)
-
-mark_as_advanced( CGAL_LIBRARY_DIRS CGAL_LIBRARY_DEBUG ${CGAL_COMPONENT_LIBRARIES_DEBUG} )
-
-
-


=====================================
src/Coordinate.cpp
=====================================
--- a/src/Coordinate.cpp
+++ b/src/Coordinate.cpp
@@ -266,10 +266,17 @@ private:
 
 
     Kernel::FT _roundFT( const Kernel::FT& v ) const {
+        #ifdef CGAL_USE_GMPXX
+        ::mpq_class q( SFCGAL::round( v.exact() * _scaleFactor ),
+                                    _scaleFactor) ;
+        q.canonicalize();
+        return Kernel::FT(q);
+        #else
         return Kernel::FT( CGAL::Gmpq(
                                SFCGAL::round( v.exact() * _scaleFactor ),
                                _scaleFactor
                            ) ) ;
+        #endif
     }
 
 };


=====================================
src/detail/io/Serialization.cpp
=====================================
--- a/src/detail/io/Serialization.cpp
+++ b/src/detail/io/Serialization.cpp
@@ -169,5 +169,53 @@ void load( boost::archive::binary_iarchive& ar, CGAL::Gmpz& z, const unsigned in
     }
 }
 
+#ifdef CGAL_USE_GMPXX
+void save( boost::archive::text_oarchive& ar, const mpz_class& z, const unsigned int /*version*/ )
+{
+    std::ostringstream ostr;
+    ostr << z;
+    std::string str = ostr.str();
+    ar << str;
+}
+
+// specialization for binary archives
+void save ( boost::archive::binary_oarchive& ar, const mpz_class& z, const unsigned int/* version*/ )
+{
+    mpz_srcptr mpz = z.get_mpz_t();
+    int32_t size = mpz->_mp_size;
+    ar& size;
+    uint32_t rsize = size >= 0 ? size : -size;
+
+    for ( uint32_t i = 0; i < rsize; ++i ) {
+        ar& mpz->_mp_d[i];
+    }
+}
+
+
+void load( boost::archive::text_iarchive& ar, mpz_class& z, const unsigned int /*version*/ )
+{
+    std::string line;
+    ar >> line;
+    std::istringstream istr( line );
+    istr >> z;
+}
+
+void load( boost::archive::binary_iarchive& ar, mpz_class& z, const unsigned int /*version*/ )
+{
+    int32_t size;
+    uint32_t rsize;
+    mpz_ptr mpz = z.get_mpz_t();
+    ar& size;
+    rsize = size >= 0 ? size : -size;
+    mpz->_mp_size = size;
+    _mpz_realloc( mpz, rsize );
+    uint32_t i;
+
+    for ( i = 0; i < rsize; ++i ) {
+        ar& mpz->_mp_d[i];
+    }
+}
+#endif
+
 }
 }


=====================================
src/detail/io/Serialization.h
=====================================
--- a/src/detail/io/Serialization.h
+++ b/src/detail/io/Serialization.h
@@ -34,6 +34,10 @@
 #include <boost/archive/binary_iarchive.hpp>
 #include <boost/archive/text_oarchive.hpp>
 #include <boost/archive/text_iarchive.hpp>
+#ifdef CGAL_USE_GMPXX
+#include <CGAL/mpz_class.h>
+#include <CGAL/mpq_class.h>
+#endif
 
 namespace SFCGAL {
 
@@ -132,6 +136,63 @@ void serialize( Archive& ar, CGAL::Gmpq& q, const unsigned int version )
     split_free( ar, q, version );
 }
 
+#ifdef CGAL_USE_GMPXX
+/**
+ * Serialization of mpz_class for text archives
+ */
+SFCGAL_API void save( boost::archive::text_oarchive& ar, const mpz_class& z, const unsigned int version );
+
+/**
+ * Serialization of mpz_class for binary archives
+ */
+SFCGAL_API void save ( boost::archive::binary_oarchive& ar, const mpz_class& z, const unsigned int version );
+
+/**
+ * Unserialization of mpz_class for text archives
+ */
+SFCGAL_API void load( boost::archive::text_iarchive& ar, mpz_class& z, const unsigned int version );
+
+/**
+ * Unserialization of mpz_class for binary archives
+ */
+SFCGAL_API void load( boost::archive::binary_iarchive& ar, mpz_class& z, const unsigned int version );
+
+template<class Archive>
+void serialize( Archive& ar, mpz_class& z, const unsigned int version )
+{
+    split_free( ar, z, version );
+}
+
+/**
+ * Serializer of mpq_class
+ */
+template<class Archive>
+void save( Archive& ar, const mpq_class& q, const unsigned int /*version*/ )
+{
+    mpz_class n = q.get_num();
+    mpz_class d = q.get_den();
+    ar& n;
+    ar& d;
+}
+
+/**
+ * Unserializer of mpq_class
+ */
+template<class Archive>
+void load( Archive& ar, mpq_class& q, const unsigned int /*version*/ )
+{
+    mpz_class n;
+    mpz_class d;
+    ar& n;
+    ar& d;
+    q = mpq_class( n, d );
+}
+template<class Archive>
+void serialize( Archive& ar, mpq_class& q, const unsigned int version )
+{
+    split_free( ar, q, version );
+}
+#endif
 
 /**
  * Serializer of Kernel::FT


=====================================
src/detail/io/WktReader.cpp
=====================================
--- a/src/detail/io/WktReader.cpp
+++ b/src/detail/io/WktReader.cpp
@@ -647,7 +647,7 @@ bool WktReader::readPointCoordinate( Point& p )
         }
 
         p = Point( coordinates[0], coordinates[1], coordinates[2] );
-        p.setM( coordinates[3].to_double() );
+        p.setM( CGAL::to_double(coordinates[3]) );
     }
     else if ( _isMeasured && ! _is3D ) {
         // XYM
@@ -656,7 +656,7 @@ bool WktReader::readPointCoordinate( Point& p )
         }
 
         p = Point( coordinates[0], coordinates[1] );
-        p.setM( coordinates[2].to_double() );
+        p.setM( CGAL::to_double(coordinates[2]) );
     }
     else if ( coordinates.size() == 3 ) {
         // XYZ


=====================================
src/detail/io/WktWriter.cpp
=====================================
--- a/src/detail/io/WktWriter.cpp
+++ b/src/detail/io/WktWriter.cpp
@@ -40,6 +40,22 @@ namespace SFCGAL {
 namespace detail {
 namespace io {
 
+namespace impl {
+std::ostream& writeFT(std::ostream& s, const CGAL::Gmpq& ft)
+{
+  s << ft;
+  return s;
+}
+
+#ifdef CGAL_USE_GMPXX
+std::ostream& writeFT(std::ostream& s, const mpq_class& ft)
+{
+  s << ft.get_num() << "/" << ft.get_den();
+  return s;
+}
+#endif
+} //end of impl namespace
+
 ///
 ///
 ///
@@ -135,10 +151,12 @@ void WktWriter::writeCoordinateType( const Geometry& g )
 void WktWriter::writeCoordinate( const Point& g )
 {
     if ( _exactWrite ) {
-        _s << CGAL::exact( g.x() ) << " " << CGAL::exact( g.y() );
+        impl::writeFT(_s, CGAL::exact( g.x() )) << " ";
+        impl::writeFT(_s, CGAL::exact( g.y() ));
 
         if ( g.is3D() ) {
-            _s << " " << CGAL::exact( g.z() );
+            _s << " ";
+            impl::writeFT(_s, CGAL::exact( g.z() ));
         }
     }
     else {


=====================================
src/detail/tools/InputStreamReader.h
=====================================
--- a/src/detail/tools/InputStreamReader.h
+++ b/src/detail/tools/InputStreamReader.h
@@ -150,7 +150,7 @@ public:
             skipWhiteSpaces();
         }
 
-        if ( _s >> value ) {
+        if( _s >> CGAL::iformat(value) ) {
             commit();
             return true ;
         }


=====================================
src/numeric.cpp
=====================================
--- a/src/numeric.cpp
+++ b/src/numeric.cpp
@@ -58,6 +58,48 @@ CGAL::Gmpz round( const CGAL::Gmpq& v )
     }
 }
 
+#ifdef CGAL_USE_GMPXX
+///
+///
+///
+mpz_class floor( const mpq_class& v )
+{
+    return v.get_num() / v.get_den() ;
+}
+
+///
+///
+///
+mpz_class ceil( const mpq_class& v )
+{
+    mpz_class result( 0 ) ;
+    mpz_cdiv_q( result.get_mpz_t(), v.get_num().get_mpz_t(), v.get_den().get_mpz_t() ) ;
+    return result ;
+}
+
+///
+///
+///
+mpz_class round( const mpq_class& v )
+{
+    if ( v < 0 ) {
+        //ceil( v - 0.5 ) ;
+        mpq_class tmp = v - mpq_class( 1,2 );
+        return ceil( tmp );
+    }
+    else if ( v == 0 ) {
+        return 0 ;
+    }
+    else {
+        //floor( v + 0.5 ) ;
+        mpq_class tmp = v + mpq_class( 1,2 );
+        return floor( tmp );
+    }
+}
+#endif
+
+
+
 }//SFCGAL
 
 


=====================================
src/numeric.h
=====================================
--- a/src/numeric.h
+++ b/src/numeric.h
@@ -57,6 +57,20 @@ inline double round( const double& v )
     }
 }
 
+#ifdef CGAL_USE_GMPXX
+/**
+ * @brief floor a rational to an integer
+ */
+SFCGAL_API ::mpz_class floor( const ::mpq_class& v ) ;
+/**
+ * @brief ceil a rational to an integer
+ */
+SFCGAL_API ::mpz_class ceil( const ::mpq_class& v ) ;
+/**
+ * @brief round a rational to an integer
+ */
+SFCGAL_API ::mpz_class round( const ::mpq_class& v ) ;
+#endif
 
 /**
  * @brief floor a rational to an integer


=====================================
test/garden/CMakeLists.txt
=====================================
--- a/test/garden/CMakeLists.txt
+++ b/test/garden/CMakeLists.txt
@@ -6,12 +6,10 @@ add_executable( ${REGRESS_NAME} ${SFCGAL_REGRESS_GARDEN_TEST_SOURCES} )
 
 target_link_libraries( ${REGRESS_NAME}
 	SFCGAL
-	${Boost_LIBRARIES}
-	${CGAL_LIBRARIES}
+        CGAL::CGAL
+        CGAL::CGAL_Core
 )
-if( ${SFCGAL_WITH_MPFR} )
-  target_link_libraries( ${REGRESS_NAME} ${MPFR_LIBRARIES} )
-endif( ${SFCGAL_WITH_MPFR} )
+target_link_libraries( ${REGRESS_NAME} ${CGAL_3RD_PARTY_LIBRARIES} )
 
 set_target_properties( ${REGRESS_NAME} PROPERTIES DEBUG_POSTFIX "d" )
 install( TARGETS ${REGRESS_NAME} DESTINATION bin )


=====================================
test/regress/convex_hull/CMakeLists.txt
=====================================
--- a/test/regress/convex_hull/CMakeLists.txt
+++ b/test/regress/convex_hull/CMakeLists.txt
@@ -6,12 +6,11 @@ add_executable( ${REGRESS_NAME} ${SFCGAL_REGRESS_CONVEX_HULL_TEST_SOURCES} )
 
 target_link_libraries( ${REGRESS_NAME}
 	SFCGAL
-	${Boost_LIBRARIES}
-	${CGAL_LIBRARIES}
+        CGAL::CGAL
+        CGAL::CGAL_Core
 )
-if( ${SFCGAL_WITH_MPFR} )
-  target_link_libraries( ${REGRESS_NAME} ${MPFR_LIBRARIES} )
-endif( ${SFCGAL_WITH_MPFR} )
+
+target_link_libraries( ${REGRESS_NAME} ${CGAL_3RD_PARTY_LIBRARIES} )
 
 set_target_properties( ${REGRESS_NAME} PROPERTIES DEBUG_POSTFIX "d" )
 install( TARGETS ${REGRESS_NAME} DESTINATION bin )


=====================================
test/regress/polygon_triangulator/CMakeLists.txt
=====================================
--- a/test/regress/polygon_triangulator/CMakeLists.txt
+++ b/test/regress/polygon_triangulator/CMakeLists.txt
@@ -6,12 +6,11 @@ add_executable( ${REGRESS_NAME} ${SFCGAL_REGRESS_POLYGON_TRIANGULATOR_TEST_SOURC
 
 target_link_libraries( ${REGRESS_NAME}
 	SFCGAL
-	${Boost_LIBRARIES}
-	${CGAL_LIBRARIES}
+        CGAL::CGAL
+        CGAL::CGAL_Core
 )
-if( ${SFCGAL_WITH_MPFR} )
-  target_link_libraries( ${REGRESS_NAME} ${MPFR_LIBRARIES} )
-endif( ${SFCGAL_WITH_MPFR} )
+target_link_libraries( ${REGRESS_NAME} ${CGAL_3RD_PARTY_LIBRARIES})
+
 
 set_target_properties( ${REGRESS_NAME} PROPERTIES DEBUG_POSTFIX "d" )
 install( TARGETS ${REGRESS_NAME} DESTINATION bin )


=====================================
test/regress/standalone/CMakeLists.txt
=====================================
--- a/test/regress/standalone/CMakeLists.txt
+++ b/test/regress/standalone/CMakeLists.txt
@@ -4,12 +4,11 @@ add_executable( standalone-regress-test-SFCGAL ${SFCGAL_REGRESS_STANDALONE_TEST_
 
 target_link_libraries( standalone-regress-test-SFCGAL 
 	SFCGAL
-	${Boost_LIBRARIES}
-	${CGAL_LIBRARIES}
+        CGAL::CGAL
+        CGAL::CGAL_Core
 )
-if( ${SFCGAL_WITH_MPFR} )
-  target_link_libraries( standalone-regress-test-SFCGAL ${MPFR_LIBRARIES} )
-endif( ${SFCGAL_WITH_MPFR} )
+target_link_libraries( standalone-regress-test-SFCGAL ${CGAL_3RD_PARTY_LIBRARIES} )
+
 
 set_target_properties( standalone-regress-test-SFCGAL PROPERTIES DEBUG_POSTFIX "d" )
 install( TARGETS standalone-regress-test-SFCGAL DESTINATION bin )


=====================================
test/unit/CMakeLists.txt
=====================================
--- a/test/unit/CMakeLists.txt
+++ b/test/unit/CMakeLists.txt
@@ -3,13 +3,10 @@ file( GLOB_RECURSE SFCGAL_UNIT_TEST_SOURCES *.cpp )
 add_executable( unit-test-SFCGAL ${SFCGAL_UNIT_TEST_SOURCES} )
 target_link_libraries( unit-test-SFCGAL 
 	SFCGAL
-	${Boost_LIBRARIES}
-	${CGAL_LIBRARIES}
+        CGAL::CGAL
+        CGAL::CGAL_Core
 )
-if( ${SFCGAL_WITH_MPFR} )
-  target_link_libraries( unit-test-SFCGAL ${MPFR_LIBRARIES} ${GMP_LIBRARIES} )
-endif( ${SFCGAL_WITH_MPFR} )
-
+target_link_libraries(unit-test-SFCGAL ${CGAL_3RD_PARTY_LIBRARIES})
 
 #include( PrecompiledHeader )
 #if(PCHSupport_FOUND)


=====================================
test/unit/SFCGAL/KernelTest.cpp
=====================================
--- a/test/unit/SFCGAL/KernelTest.cpp
+++ b/test/unit/SFCGAL/KernelTest.cpp
@@ -22,6 +22,7 @@
 #include <boost/test/unit_test.hpp>
 
 #include <SFCGAL/Kernel.h>
+#include <CGAL/mpq_class.h>
 #include <SFCGAL/Coordinate.h>
 #include <SFCGAL/LineString.h>
 
@@ -61,10 +62,11 @@ BOOST_AUTO_TEST_CASE( testSerializeDeserialize )
     Kernel::FT a = 1 ;
     a /= 3 ;
 
-    std::ostringstream oss ;
-    oss << CGAL::exact( a ) ;
+    std::stringstream ss ;
+    ss << CGAL::exact( a ) ;
 
-    Kernel::FT b( oss.str() );
+    Kernel::FT b;
+    ss >> b;
     BOOST_CHECK_EQUAL( a, b ) ;
 }
 


=====================================
test/unit/SFCGAL/algorithm/ConvexHullTest.cpp
=====================================
--- a/test/unit/SFCGAL/algorithm/ConvexHullTest.cpp
+++ b/test/unit/SFCGAL/algorithm/ConvexHullTest.cpp
@@ -148,7 +148,7 @@ BOOST_AUTO_TEST_CASE( testConvexHull3D_LineStringCoplanar )
     LineString lineString( points ) ;
     std::auto_ptr< Geometry > hull( algorithm::convexHull3D( lineString ) );
     BOOST_CHECK( hull->is< PolyhedralSurface >() );
-    BOOST_CHECK_EQUAL( hull->as< PolyhedralSurface >().numPolygons(), 1U );
+    BOOST_CHECK_EQUAL( hull->as< PolyhedralSurface >().numPolygons(), 2U );
 }
 
 


=====================================
test/unit/SFCGAL/io/WktReaderTest.cpp
=====================================
--- a/test/unit/SFCGAL/io/WktReaderTest.cpp
+++ b/test/unit/SFCGAL/io/WktReaderTest.cpp
@@ -246,10 +246,16 @@ BOOST_AUTO_TEST_CASE( wkt_exactTest )
     BOOST_REQUIRE_EQUAL( g->as< LineString >().numPoints(), 2U );
     Kernel::Exact_kernel::FT x = CGAL::exact( g->as<LineString>().pointN( 0 ).x() );
     Kernel::Exact_kernel::FT y = CGAL::exact( g->as<LineString>().pointN( 0 ).y() );
-    BOOST_CHECK_EQUAL( x.numerator(), 2 );
-    BOOST_CHECK_EQUAL( x.denominator(), 3 );
-    BOOST_CHECK_EQUAL( y.numerator(), 3 );
-    BOOST_CHECK_EQUAL( y.denominator(), 2 );
+
+    CGAL::Fraction_traits<Kernel::Exact_kernel::FT>::Numerator_type xn, xd, yn, yd;
+    CGAL::Fraction_traits<Kernel::Exact_kernel::FT>::Decompose decomp;
+    decomp(x, xn, xd);
+    decomp(y, yn, yd);
+
+    BOOST_CHECK_EQUAL( xn, 2 );
+    BOOST_CHECK_EQUAL( xd, 3 );
+    BOOST_CHECK_EQUAL( yn, 3 );
+    BOOST_CHECK_EQUAL( yd, 2 );
 }
 
 BOOST_AUTO_TEST_CASE( charArrayRead )


=====================================
travis/linux/before_install.sh
=====================================
--- a/travis/linux/before_install.sh
+++ b/travis/linux/before_install.sh
@@ -1,24 +1,17 @@
 export DEBIAN_FRONTEND=noninteractive
-sudo add-apt-repository ppa:apokluda/boost1.53 --yes
-sudo add-apt-repository ppa:kalakris/cmake --yes # CMAKE 2.8.11
+sudo -E apt-add-repository -y "ppa:ppsspp/cmake"
 sudo apt-get update -qq
 sudo apt-get install --force-yes \
-    cmake libboost-chrono1.53-dev libboost-program-options1.53-dev libboost-filesystem1.53-dev libboost-timer1.53-dev \
-    libboost-test1.53-dev libboost-date-time1.53-dev libboost-thread1.53-dev \
-    libboost-system1.53-dev libboost-serialization1.53-dev \
+    cmake libboost-chrono1.55-dev libboost-program-options1.55-dev libboost-filesystem1.55-dev libboost-timer1.55-dev \
+    libboost-test1.55-dev libboost-date-time1.55-dev libboost-thread1.55-dev \
+    libboost-system1.55-dev libboost-serialization1.55-dev \
     libmpfr-dev libgmp-dev \
     cmake
 #CGAL
-if [ "$1" = "4.3" ]; then
-    wget https://gforge.inria.fr/frs/download.php/file/32994/CGAL-4.3.tar.gz
-    tar xzf CGAL-4.3.tar.gz
-    cd CGAL-4.3 && cmake . && make && sudo make install && cd ..
-elif [ "$1" = "4.7" ]; then
-    wget https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.7/CGAL-4.7.tar.gz
-    tar xzf CGAL-4.7.tar.gz
-    cd CGAL-4.7 && cmake . && make && sudo make install && cd ..
-fi
 
+wget https://github.com/CGAL/cgal/archive/releases/CGAL-"$1".tar.gz
+tar xzf CGAL-"$1".tar.gz
+cd cgal-releases-CGAL-"$1" && cmake . && make && sudo make install && cd ..
 
 cmake --version
 clang --version


=====================================
travis/linux/install_cgal.sh
=====================================
--- a/travis/linux/install_cgal.sh
+++ b/travis/linux/install_cgal.sh
@@ -1,14 +1,8 @@
 #CGAL
-if [ "$1" = "4.3" ]; then
-    wget https://gforge.inria.fr/frs/download.php/file/32994/CGAL-4.3.tar.gz
-    tar xzf CGAL-4.3.tar.gz
-    cd CGAL-4.3 && cmake -DCMAKE_INSTALL_PREFIX=$HOME/CGAL-4.3 . && make && make install && cd ..
-elif [ "$1" = "4.7" ]; then
-    wget https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.7/CGAL-4.7.tar.gz
-    tar xzf CGAL-4.7.tar.gz
-    cd CGAL-4.7 && cmake -DCMAKE_INSTALL_PREFIX=$HOME/CGAL-4.7 . && make && make install && cd ..
-fi
 
+wget https://github.com/CGAL/cgal/archive/releases/CGAL-"$1".tar.gz
+tar xzf CGAL-"$1".tar.gz
+cd CGAL-"$1" && cmake -DCMAKE_INSTALL_PREFIX=$HOME/CGAL-"$1" . && make && make install && cd ..
 
 cmake --version
 clang --version



View it on GitLab: https://salsa.debian.org/debian-gis-team/sfcgal/commit/7b959a325068f8d7ba64aca5b77a64bb179ee453

---
View it on GitLab: https://salsa.debian.org/debian-gis-team/sfcgal/commit/7b959a325068f8d7ba64aca5b77a64bb179ee453
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20180406/f710bc9f/attachment-0001.html>


More information about the Pkg-grass-devel mailing list