File: Backport-from-upstream-compile-fixes-for-CGAL-5.4.patch

package info (click to toggle)
openscad 2021.01-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 36,096 kB
  • sloc: cpp: 53,199; sh: 4,384; ansic: 4,382; python: 1,813; yacc: 853; javascript: 762; lex: 417; lisp: 163; xml: 127; makefile: 118
file content (40 lines) | stat: -rw-r--r-- 1,627 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From: Kristian Nielsen <knielsen@knielsen-hq.org>
Date: Sun, 13 Feb 2022 11:03:31 +0100
Subject: Backport from upstream compile fixes for CGAL 5.4.

Origin: https://github.com/openscad/openscad/commit/71f2831c0484c3f35cbf44e1d1dc2c857384100b
Origin: https://github.com/openscad/openscad/commit/3a81c1fb9b663ebbedd6eb044e7276357b1f30a1
Bug-Debian: https://bugs.debian.org/1005499
Forwarded: not-needed
---
 src/cgalutils-tess.cc | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/cgalutils-tess.cc b/src/cgalutils-tess.cc
index ec1cc1e..37f8cf0 100644
--- a/src/cgalutils-tess.cc
+++ b/src/cgalutils-tess.cc
@@ -6,10 +6,12 @@
 #pragma push_macro("NDEBUG")
 #undef NDEBUG
 #include <CGAL/Constrained_Delaunay_triangulation_2.h>
-#if CGAL_VERSION_NR >= CGAL_VERSION_NUMBER(4,11,0)
-  #include <CGAL/Triangulation_2_projection_traits_3.h>
+#if CGAL_VERSION_NR < 1050401000
+#include <CGAL/Triangulation_2_projection_traits_3.h>
+typedef CGAL::Triangulation_2_filtered_projection_traits_3<K> Projection;
 #else
-  #include <CGAL/Triangulation_2_filtered_projection_traits_3.h>
+#include <CGAL/Projection_traits_3.h>
+typedef CGAL::Filtered_projection_traits_3<K> Projection;
 #endif
 #include <CGAL/Triangulation_face_base_with_info_2.h>
 #pragma pop_macro("NDEBUG")
@@ -19,7 +21,6 @@ struct FaceInfo {
   bool in_domain() { return nesting_level%2 == 1; }
 };
 
-typedef CGAL::Triangulation_2_filtered_projection_traits_3<K> Projection;
 typedef CGAL::Triangulation_face_base_with_info_2<FaceInfo, K> Fbb;
 typedef CGAL::Triangulation_data_structure_2<
 	CGAL::Triangulation_vertex_base_2<Projection>,