cgal4: Fix build problem for dependents (#30547)

* cgal4: Fix build problem for dependents

Backport a compile fix from CGAL 5.5.5 to CGAL 4.14, which fixes a build problem for dependent ports.
Fixes "error: no member named 'base' in 'Halfedge_around_source_iterator

Closes https://trac.macports.org/ticket/73166
This commit is contained in:
Dave Allured
2026-01-07 05:19:35 -07:00
committed by GitHub
parent 524ca6a35c
commit db13acaa9a
2 changed files with 71 additions and 4 deletions
+8 -4
View File
@@ -16,10 +16,8 @@ long_description The goal of the ${description} is to provide easy access to\
molecular biology, medical imaging, robotics and\
motion planning, mesh generation, numerical methods...
platforms darwin
github.setup CGAL cgal 4.14.3 releases/CGAL-
revision 2
revision 3
checksums rmd160 c297a51c63a8161000d91128628d8c20ffdbf487 \
sha256 5bafe7abe8435beca17a1082062d363368ec1e3f0d6581bb0da8b010fb389fe4 \
size 15618196
@@ -33,7 +31,13 @@ maintainers {vince @Veence}
use_xz yes
distname CGAL-${version}
homepage http://www.cgal.org/
homepage https://www.cgal.org
# Backport a compile fix from CGAL 5.5.5 to CGAL 4.14
# https://trac.macports.org/ticket/73166
# https://github.com/CGAL/cgal/issues/8313
patchfiles-append patch-CGAL_4_14_3_boost_graph_iterator_h.diff
patch.pre_args -p1
boost.version 1.76
@@ -0,0 +1,63 @@
# Backport a compile fix from CGAL 5.5.5 to CGAL 4.14
# https://trac.macports.org/ticket/73166
# https://github.com/CGAL/cgal/issues/8313
--- CGAL-4.14.3/include/CGAL/boost/graph/iterator.h.orig 2020-02-22 13:04:12
+++ CGAL-4.14.3/include/CGAL/boost/graph/iterator.h 2025-12-23 12:28:16
@@ -222,18 +222,6 @@
{}
#ifndef DOXYGEN_RUNNING
- // design patter: "safe bool"
- // will be replaced by explicit operator bool with C++11
- typedef void (Halfedge_around_source_iterator::*bool_type)() const;
-
- void this_type_does_not_support_comparisons() const {}
-
- operator bool_type() const
- {
- return (! (this->base() == NULL)) ?
- &Halfedge_around_source_iterator::this_type_does_not_support_comparisons : 0;
- }
-
bool operator==( const Self& i) const {
CGAL_assertion( anchor == anchor);
return ( g == i.g) && ( pos == i.pos) && ( winding == i.winding);
@@ -322,18 +310,6 @@
{}
#ifndef DOXYGEN_RUNNING
- // design patter: "safe bool"
- // will be replaced by explicit operator bool with C++11
- typedef void (Halfedge_around_target_iterator::*bool_type)() const;
-
- void this_type_does_not_support_comparisons() const {}
-
- operator bool_type() const
- {
- return (! (this->base() == NULL)) ?
- &Halfedge_around_target_iterator::this_type_does_not_support_comparisons : 0;
- }
-
bool operator==( const Self& i) const {
CGAL_assertion( anchor == anchor);
return ( g == i.g) && ( pos == i.pos) && ( winding == i.winding);
@@ -421,18 +397,6 @@
pointer operator -> ( ) { return &pos; }
const value_type* operator -> ( ) const { return &pos; }
- // design patter: "safe bool"
- // will be replaced by explicit operator bool with C++11
- typedef void (Halfedge_around_face_iterator::*bool_type)() const;
-
- void this_type_does_not_support_comparisons() const {}
-
- operator bool_type() const
- {
- return (! (this->base() == NULL)) ?
- &Halfedge_around_face_iterator::this_type_does_not_support_comparisons : 0;
- }
-
bool operator==( const Self& i) const {
CGAL_assertion( anchor == anchor);
return ( g == i.g) && ( pos == i.pos) && ( winding == i.winding);