Skip to content
Commits on Source (2)
......@@ -5,6 +5,9 @@ sfcgal (1.3.2-1) UNRELEASED; urgency=medium
* Require at least libcgal-dev 4.10.1.
* Change priority from extra to optional.
* Bump Standards-Version to 4.1.0, changes: priority.
* Add patch by Pierre-Eric Pelloux-Prayer to fix FTBFS with CGAL 4.11.
(closes: #876521)
* Update copyright-format URL to use HTTPS.
-- Bas Couwenberg <sebastic@debian.org> Fri, 15 Sep 2017 20:49:16 +0200
......
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: SFCGAL
Upstream-Contact: infos@oslandia.com
Source: http://www.sfcgal.org/
......
Description: Fix FTBFS with CGAL 4.11.
Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@oslandia.com>
Bug-Debian: https://bugs.debian.org/876521
Bug: https://github.com/Oslandia/SFCGAL/issues/145
--- 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
+ return Kernel::FT( ::mpq_class(
+ SFCGAL::round( v.exact() * _scaleFactor ),
+ _scaleFactor
+ ) ) ;
+ #else
return Kernel::FT( CGAL::Gmpq(
SFCGAL::round( v.exact() * _scaleFactor ),
_scaleFactor
) ) ;
+ #endif
}
};
--- 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
no-matching-function-call.patch