diff options
author | pi <pi@FreeBSD.org> | 2016-04-30 12:30:58 +0800 |
---|---|---|
committer | pi <pi@FreeBSD.org> | 2016-04-30 12:30:58 +0800 |
commit | 5be224d48419ea2cd78537489513ca9cd68a1828 (patch) | |
tree | b3b37e464294216f124f838d48beff0fc9714144 /graphics | |
parent | d8388cab3b5c25db67675dde7599feb5b8d0fcd4 (diff) | |
download | freebsd-ports-gnome-5be224d48419ea2cd78537489513ca9cd68a1828.tar.gz freebsd-ports-gnome-5be224d48419ea2cd78537489513ca9cd68a1828.tar.zst freebsd-ports-gnome-5be224d48419ea2cd78537489513ca9cd68a1828.zip |
graphics/inventor: Fix build with libc++ 3.8.0
PR: 208845
Submitted by: dim
Approved by: c47g@gmx.at (maintainer timeout)
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/inventor/files/patch-arc.c++ | 11 | ||||
-rw-r--r-- | graphics/inventor/files/patch-arctess.c++ | 35 | ||||
-rw-r--r-- | graphics/inventor/files/patch-ccw.c++ | 10 | ||||
-rw-r--r-- | graphics/inventor/files/patch-simplemath.h | 10 | ||||
-rw-r--r-- | graphics/inventor/files/patch-softsurfeval.c++ | 13 |
5 files changed, 79 insertions, 0 deletions
diff --git a/graphics/inventor/files/patch-arc.c++ b/graphics/inventor/files/patch-arc.c++ new file mode 100644 index 000000000000..e47ddf7b4cdf --- /dev/null +++ b/graphics/inventor/files/patch-arc.c++ @@ -0,0 +1,11 @@ +--- lib/database/src/so/nodes/nurbs/libnurbs/arc.c++.orig 2000-08-15 12:56:22 UTC ++++ lib/database/src/so/nodes/nurbs/libnurbs/arc.c++ +@@ -332,7 +332,7 @@ Arc::check( void ) + + inline long tooclose( REAL x, REAL y ) + { +- return (abs(x-y) < TOL) ? 1 : 0; ++ return (absr(x-y) < TOL) ? 1 : 0; + } + + diff --git a/graphics/inventor/files/patch-arctess.c++ b/graphics/inventor/files/patch-arctess.c++ new file mode 100644 index 000000000000..03449735dee6 --- /dev/null +++ b/graphics/inventor/files/patch-arctess.c++ @@ -0,0 +1,35 @@ +--- lib/database/src/so/nodes/nurbs/libnurbs/arctess.c++.orig 2000-08-15 12:56:22 UTC ++++ lib/database/src/so/nodes/nurbs/libnurbs/arctess.c++ +@@ -247,8 +247,8 @@ ArcTessellator::pwl( Arc *arc, REAL s1, + + /* if(rate <= 0.06) rate = 0.06;*/ + +- int snsteps = 1 + (int) (abs(s2 - s1) / rate ); +- int tnsteps = 1 + (int) (abs(t2 - t1) / rate ); ++ int snsteps = 1 + (int) (absr(s2 - s1) / rate ); ++ int tnsteps = 1 + (int) (absr(t2 - t1) / rate ); + int nsteps = max(1,max( snsteps, tnsteps )); + + REAL sstepsize = (s2 - s1) / (REAL) nsteps; +@@ -395,8 +395,8 @@ ArcTessellator::tessellateNonlinear( Arc + vert->param[0] = u/w; + vert->param[1] = v/w; + #ifndef NOELIMINATION +- REAL ds = abs(vert[0].param[0] - vert[-1].param[0]); +- REAL dt = abs(vert[0].param[1] - vert[-1].param[1]); ++ REAL ds = absr(vert[0].param[0] - vert[-1].param[0]); ++ REAL dt = absr(vert[0].param[1] - vert[-1].param[1]); + int canremove = (ds<geo_stepsize && dt<geo_stepsize) ? 1 : 0; + REAL ods=0.0, odt=0.0; + +@@ -454,8 +454,8 @@ ArcTessellator::tessellateNonlinear( Arc + vert->param[0] = u; + vert->param[1] = v; + #ifndef NOELIMINATION +- REAL ds = abs(vert[0].param[0] - vert[-1].param[0]); +- REAL dt = abs(vert[0].param[1] - vert[-1].param[1]); ++ REAL ds = absr(vert[0].param[0] - vert[-1].param[0]); ++ REAL dt = absr(vert[0].param[1] - vert[-1].param[1]); + int canremove = (ds<geo_stepsize && dt<geo_stepsize) ? 1 : 0; + REAL ods=0.0, odt=0.0; + diff --git a/graphics/inventor/files/patch-ccw.c++ b/graphics/inventor/files/patch-ccw.c++ new file mode 100644 index 000000000000..4ab1bbe6909b --- /dev/null +++ b/graphics/inventor/files/patch-ccw.c++ @@ -0,0 +1,10 @@ +--- lib/database/src/so/nodes/nurbs/libnurbs/ccw.c++.orig 2000-08-15 12:56:22 UTC ++++ lib/database/src/so/nodes/nurbs/libnurbs/ccw.c++ +@@ -508,6 +508,6 @@ int + Subdivider::ccw( TrimVertex *a, TrimVertex *b, TrimVertex *c ) + { + REAL d = det3( a, b, c ); +- if( abs(d) < 0.0001 ) return -1; ++ if( absr(d) < 0.0001 ) return -1; + return (d < 0.0) ? 0 : 1; + } diff --git a/graphics/inventor/files/patch-simplemath.h b/graphics/inventor/files/patch-simplemath.h new file mode 100644 index 000000000000..f63ed5d93e7d --- /dev/null +++ b/graphics/inventor/files/patch-simplemath.h @@ -0,0 +1,10 @@ +--- lib/database/src/so/nodes/nurbs/head/simplemath.h.orig 2000-08-15 12:56:22 UTC ++++ lib/database/src/so/nodes/nurbs/head/simplemath.h +@@ -54,6 +54,6 @@ inline int + absi( int x ) { return ( x < 0 ) ? -x : x; } + + inline REAL +-abs( REAL x ) { return ( x < 0.0 ) ? -x : x; } ++absr( REAL x ) { return ( x < 0.0 ) ? -x : x; } + + #endif /* __glusimplemath_h_ */ diff --git a/graphics/inventor/files/patch-softsurfeval.c++ b/graphics/inventor/files/patch-softsurfeval.c++ new file mode 100644 index 000000000000..f3d37d317f1d --- /dev/null +++ b/graphics/inventor/files/patch-softsurfeval.c++ @@ -0,0 +1,13 @@ +--- lib/database/src/so/nodes/nurbs/clients/softsurfeval.c++.orig 2000-08-15 12:56:22 UTC ++++ lib/database/src/so/nodes/nurbs/clients/softsurfeval.c++ +@@ -50,8 +50,8 @@ + #include "softsurfeval.h" + #include "nurbsconsts.h" + +-inline REAL abs( REAL x ) { return (x < 0.0) ? -x : x; } +-inline int equal( REAL x, REAL y ) { return (abs(x-y) < 1.0E-6) ? 1 : 0; } ++inline REAL absr( REAL x ) { return (x < 0.0) ? -x : x; } ++inline int equal( REAL x, REAL y ) { return (absr(x-y) < 1.0E-6) ? 1 : 0; } + + _SoNurbsSurfaceEvaluator::~_SoNurbsSurfaceEvaluator() + { |