Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Apr 2016 04:30:59 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r414327 - head/graphics/inventor/files
Message-ID:  <201604300430.u3U4Uxqv063295@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Sat Apr 30 04:30:58 2016
New Revision: 414327
URL: https://svnweb.freebsd.org/changeset/ports/414327

Log:
  graphics/inventor: Fix build with libc++ 3.8.0
  
  PR:		208845
  Submitted by:	dim
  Approved by:	c47g@gmx.at (maintainer timeout)

Added:
  head/graphics/inventor/files/patch-arc.c++   (contents, props changed)
  head/graphics/inventor/files/patch-arctess.c++   (contents, props changed)
  head/graphics/inventor/files/patch-ccw.c++   (contents, props changed)
  head/graphics/inventor/files/patch-simplemath.h   (contents, props changed)
  head/graphics/inventor/files/patch-softsurfeval.c++   (contents, props changed)

Added: head/graphics/inventor/files/patch-arc.c++
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inventor/files/patch-arc.c++	Sat Apr 30 04:30:58 2016	(r414327)
@@ -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;
+ }
+ 
+ 

Added: head/graphics/inventor/files/patch-arctess.c++
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inventor/files/patch-arctess.c++	Sat Apr 30 04:30:58 2016	(r414327)
@@ -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;
+ 

Added: head/graphics/inventor/files/patch-ccw.c++
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inventor/files/patch-ccw.c++	Sat Apr 30 04:30:58 2016	(r414327)
@@ -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;
+ }

Added: head/graphics/inventor/files/patch-simplemath.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inventor/files/patch-simplemath.h	Sat Apr 30 04:30:58 2016	(r414327)
@@ -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_ */

Added: head/graphics/inventor/files/patch-softsurfeval.c++
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/inventor/files/patch-softsurfeval.c++	Sat Apr 30 04:30:58 2016	(r414327)
@@ -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() 
+ { 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604300430.u3U4Uxqv063295>