FreeBSD Bugzilla – Attachment 254030 Details for
Bug 281880
math/cgal: fix headers for use with clang 19
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
math/cgal: fix headers for use with clang 19
math__cgal-fix-headers-clang19-1.diff (text/plain), 5.05 KB, created by
Dimitry Andric
on 2024-10-05 22:59:50 UTC
(
hide
)
Description:
math/cgal: fix headers for use with clang 19
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2024-10-05 22:59:50 UTC
Size:
5.05 KB
patch
obsolete
>commit 776dd53eef4267caaef0ccb03d8452a04915cd56 >Author: Dimitry Andric <dim@FreeBSD.org> >Date: 2024-10-06T00:59:13+02:00 > > math/cgal: fix headers for use with clang 19 > > Clang 19 has become more strict about errors in member functions, which > results in errors building ports that use headers from math/cgal, such > as cad/csxcad: > > In file included from /wrkdirs/usr/ports/cad/csxcad/work/CSXCAD-0.6.3/src/CSPrimPolyhedron.cpp:25: > In file included from /wrkdirs/usr/ports/cad/csxcad/work/CSXCAD-0.6.3/src/CSPrimPolyhedron_p.h:6: > In file included from /usr/local/include/CGAL/Polyhedron_3.h:25: > In file included from /usr/local/include/CGAL/HalfedgeDS_default.h:23: > In file included from /usr/local/include/CGAL/boost/graph/graph_traits_HalfedgeDS_default.h:15: > In file included from /usr/local/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h:29: > /usr/local/include/CGAL/boost/graph/iterator.h:224:22: error: no member named 'base' in 'Halfedge_around_source_iterator<Graph>' > 224 | return (! (this->base() == nullptr)) ? > | ~~~~ ^ > /usr/local/include/CGAL/boost/graph/iterator.h:324:22: error: no member named 'base' in 'Halfedge_around_target_iterator<Graph>' > 324 | return (! (this->base() == nullptr)) ? > | ~~~~ ^ > /usr/local/include/CGAL/boost/graph/iterator.h:423:22: error: no member named 'base' in 'Halfedge_around_face_iterator<Graph>' > 423 | return (! (this->base() == nullptr)) ? > | ~~~~ ^ > > The problem is that the `base()` member function is only available when > an iterator is derived from `boost::iterator_adaptor`, but the three > iterators mentioned above, `Halfedge_around_source_iterator`, > `Halfedge_around_target_iterator` and `Halfedge_around_face_iterator` > are not. > > Upstream CGAL has done a bit more refactoring in this particular area, > but is enough to cherry-pick the changes that remove the `operator > bool_type() const` member functions, which reference the non-existing > `base()` member function. > > Bump PORTREVISION to ensure dependent ports build against the fixed > headers. > > PR: 281880 > MFH: 2024Q3 > >diff --git a/math/cgal/Makefile b/math/cgal/Makefile >index a06e69bc8721..c25dd21e17a8 100644 >--- a/math/cgal/Makefile >+++ b/math/cgal/Makefile >@@ -1,6 +1,6 @@ > PORTNAME= cgal > PORTVERSION= 5.5.1 >-PORTREVISION= 3 >+PORTREVISION= 4 > CATEGORIES= math > MASTER_SITES= https://github.com/${PORTNAME:tu}/${PORTNAME}/releases/download/v${PORTVERSION}/ > DISTNAME= ${PORTNAME:tu}-${PORTVERSION} >diff --git a/math/cgal/files/patch-include_CGAL_boost_graph_iterator.h b/math/cgal/files/patch-include_CGAL_boost_graph_iterator.h >new file mode 100644 >index 000000000000..20f360c1f045 >--- /dev/null >+++ b/math/cgal/files/patch-include_CGAL_boost_graph_iterator.h >@@ -0,0 +1,59 @@ >+--- include/CGAL/boost/graph/iterator.h.orig 2022-10-07 19:04:41 UTC >++++ include/CGAL/boost/graph/iterator.h >+@@ -213,18 +213,7 @@ class Halfedge_around_source_iterator { (public) >+ {} >+ >+ #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() == nullptr)) ? >+- &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); >+@@ -313,18 +302,7 @@ class Halfedge_around_target_iterator { (public) >+ {} >+ >+ #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() == nullptr)) ? >+- &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); >+@@ -411,18 +389,6 @@ class Halfedge_around_face_iterator { (public) >+ const value_type& operator * ( ) const { return pos; } >+ 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() == nullptr)) ? >+- &Halfedge_around_face_iterator::this_type_does_not_support_comparisons : 0; >+- } >+ >+ bool operator==( const Self& i) const { >+ CGAL_assertion( anchor == anchor);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 281880
: 254030