SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,64 @@
fix build with reentrant qhull
https://salsa.debian.org/science-team/plplot/-/blob/master/debian/patches/reentrant-qhull.patch
Index: lib/nn/delaunay.c
--- lib/nn/delaunay.c.orig
+++ lib/nn/delaunay.c
@@ -34,12 +34,8 @@
#include <limits.h>
#include <float.h>
#ifdef USE_QHULL
-#ifdef HAS_LIBQHULL_INCLUDE
-#include <libqhull/qhull_a.h>
+#include <libqhull_r/qhull_ra.h>
#else
-#include <qhull/qhull_a.h>
-#endif
-#else
#include "triangle.h"
#endif
#include "istack.h"
@@ -388,7 +384,10 @@ delaunay* delaunay_build( int np, point points[], int
// climax
//
- exitcode = qh_new_qhull( dim, np, qpoints, ismalloc,
+ qhT context = { 0 };
+ qhT* qh = &context;
+
+ exitcode = qh_new_qhull( qh, dim, np, qpoints, ismalloc,
flags, outfile, errfile );
if ( !exitcode )
@@ -433,8 +432,8 @@ delaunay* delaunay_build( int np, point points[], int
}
}
- qh_findgood_all( qh facet_list );
- qh_countfacets( qh facet_list, NULL, !qh_ALL, &numfacets,
+ qh_findgood_all( qh, qh->facet_list );
+ qh_countfacets( qh, qh->facet_list, NULL, !qh_ALL, &numfacets,
&numsimplicial, &totneighbors, &numridges,
&numcoplanars, &numtricoplanars );
@@ -462,7 +461,7 @@ delaunay* delaunay_build( int np, point points[], int
j = 0;
FOREACHvertex_( facet->vertices )
- t->vids[j++] = qh_pointid( vertex->point );
+ t->vids[j++] = qh_pointid( qh, vertex->point );
j = 0;
FOREACHneighbor_( facet )
@@ -548,8 +547,8 @@ delaunay* delaunay_build( int np, point points[], int
}
free( qpoints );
- qh_freeqhull( !qh_ALL ); // free long memory
- qh_memfreeshort( &curlong, &totlong ); // free short memory and memory allocator
+ qh_freeqhull( qh, !qh_ALL ); // free long memory
+ qh_memfreeshort( qh, &curlong, &totlong ); // free short memory and memory allocator
if ( curlong || totlong )
fprintf( errfile,
"qhull: did not free %d bytes of long memory (%d pieces)\n",