aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authoroliver <oliver@FreeBSD.org>2014-03-23 17:45:39 +0800
committeroliver <oliver@FreeBSD.org>2014-03-23 17:45:39 +0800
commit8825234a70b6b6596e66e52f098156dcc7a95b96 (patch)
treee04b54636873016f1f09035447db08d52a52510d /math
parentb5d97c39dfe4377df94a09302c58a36c5d3d8fde (diff)
downloadfreebsd-ports-gnome-8825234a70b6b6596e66e52f098156dcc7a95b96.tar.gz
freebsd-ports-gnome-8825234a70b6b6596e66e52f098156dcc7a95b96.tar.zst
freebsd-ports-gnome-8825234a70b6b6596e66e52f098156dcc7a95b96.zip
switch from GCC to Clang
bump PORTREVISION
Diffstat (limited to 'math')
-rw-r--r--math/wfmath/Makefile5
-rw-r--r--math/wfmath/files/patch-wfmath-intersect.cpp244
-rw-r--r--math/wfmath/patch-wfmath-axisbox.h21
-rw-r--r--math/wfmath/patch-wfmath-rotbox.h21
4 files changed, 288 insertions, 3 deletions
diff --git a/math/wfmath/Makefile b/math/wfmath/Makefile
index 755e9abfed67..8367e5d968f1 100644
--- a/math/wfmath/Makefile
+++ b/math/wfmath/Makefile
@@ -3,16 +3,15 @@
PORTNAME= wfmath
PORTVERSION= 1.0.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= math
MASTER_SITES= SF/worldforge/${PORTNAME}%20%28math%20lib%29/${PORTVERSION}
MAINTAINER= oliver@FreeBSD.org
COMMENT= Worldforge math library
-USES= gmake pathfix pkgconfig
+USES= pathfix pkgconfig compiler:c++11-lib
USE_LDCONFIG= yes
-USE_GCC= yes
GNU_CONFIGURE= yes
.include <bsd.port.mk>
diff --git a/math/wfmath/files/patch-wfmath-intersect.cpp b/math/wfmath/files/patch-wfmath-intersect.cpp
new file mode 100644
index 000000000000..eb82b671e7d5
--- /dev/null
+++ b/math/wfmath/files/patch-wfmath-intersect.cpp
@@ -0,0 +1,244 @@
+--- wfmath/intersect.cpp.orig 2014-03-10 19:17:04.000000000 +0100
++++ wfmath/intersect.cpp 2014-03-10 19:18:00.000000000 +0100
+@@ -31,121 +31,6 @@
+
+ namespace WFMath {
+
+-// force a bunch of instantiations
+-
+-template bool Intersect<2>(const Point<2>&, const Point<2>&, bool);
+-template bool Intersect<3>(const Point<3>&, const Point<3>&, bool);
+-template bool Contains<2>(const Point<2>&, const Point<2>&, bool);
+-template bool Contains<3>(const Point<3>&, const Point<3>&, bool);
+-
+-template bool Intersect<Point<2>,AxisBox<2> >(const Point<2>&, const AxisBox<2>&, bool);
+-template bool Intersect<Point<3>,AxisBox<3> >(const Point<3>&, const AxisBox<3>&, bool);
+-template bool Contains<2>(const Point<2>&, const AxisBox<2>&, bool);
+-template bool Contains<3>(const Point<3>&, const AxisBox<3>&, bool);
+-template bool Intersect<2>(const AxisBox<2>&, const Point<2>&, bool);
+-template bool Intersect<3>(const AxisBox<3>&, const Point<3>&, bool);
+-template bool Contains<2>(const AxisBox<2>&, const Point<2>&, bool);
+-template bool Contains<3>(const AxisBox<3>&, const Point<3>&, bool);
+-
+-template bool Intersect<2>(const AxisBox<2>&, const AxisBox<2>&, bool);
+-template bool Intersect<3>(const AxisBox<3>&, const AxisBox<3>&, bool);
+-template bool Contains<2>(const AxisBox<2>&, const AxisBox<2>&, bool);
+-template bool Contains<3>(const AxisBox<3>&, const AxisBox<3>&, bool);
+-
+-template bool Intersect<Point<2>,Ball<2> >(const Point<2>&, const Ball<2>&, bool);
+-template bool Intersect<Point<3>,Ball<3> >(const Point<3>&, const Ball<3>&, bool);
+-template bool Contains<2>(const Point<2>&, const Ball<2>&, bool);
+-template bool Contains<3>(const Point<3>&, const Ball<3>&, bool);
+-template bool Intersect<2>(const Ball<2>&, const Point<2>&, bool);
+-template bool Intersect<3>(const Ball<3>&, const Point<3>&, bool);
+-template bool Contains<2>(const Ball<2>&, const Point<2>&, bool);
+-template bool Contains<3>(const Ball<3>&, const Point<3>&, bool);
+-
+-template bool Intersect<AxisBox<2>,Ball<2> >(const AxisBox<2>&, const Ball<2>&, bool);
+-template bool Intersect<AxisBox<3>,Ball<3> >(const AxisBox<3>&, const Ball<3>&, bool);
+-template bool Contains<2>(const AxisBox<2>&, const Ball<2>&, bool);
+-template bool Contains<3>(const AxisBox<3>&, const Ball<3>&, bool);
+-template bool Intersect<2>(const Ball<2>&, const AxisBox<2>&, bool);
+-template bool Intersect<3>(const Ball<3>&, const AxisBox<3>&, bool);
+-template bool Contains<2>(const Ball<2>&, const AxisBox<2>&, bool);
+-template bool Contains<3>(const Ball<3>&, const AxisBox<3>&, bool);
+-
+-template bool Intersect<2>(const Ball<2>&, const Ball<2>&, bool);
+-template bool Intersect<3>(const Ball<3>&, const Ball<3>&, bool);
+-template bool Contains<2>(const Ball<2>&, const Ball<2>&, bool);
+-template bool Contains<3>(const Ball<3>&, const Ball<3>&, bool);
+-
+-template bool Intersect<Point<2>,Segment<2> >(const Point<2>&, const Segment<2>&, bool);
+-template bool Intersect<Point<3>,Segment<3> >(const Point<3>&, const Segment<3>&, bool);
+-template bool Contains<2>(const Point<2>&, const Segment<2>&, bool);
+-template bool Contains<3>(const Point<3>&, const Segment<3>&, bool);
+-template bool Intersect<2>(const Segment<2>&, const Point<2>&, bool);
+-template bool Intersect<3>(const Segment<3>&, const Point<3>&, bool);
+-template bool Contains<2>(const Segment<2>&, const Point<2>&, bool);
+-template bool Contains<3>(const Segment<3>&, const Point<3>&, bool);
+-
+-template bool Intersect<AxisBox<2>,Segment<2> >(const AxisBox<2>&, const Segment<2>&, bool);
+-template bool Intersect<AxisBox<3>,Segment<3> >(const AxisBox<3>&, const Segment<3>&, bool);
+-template bool Contains<2>(const AxisBox<2>&, const Segment<2>&, bool);
+-template bool Contains<3>(const AxisBox<3>&, const Segment<3>&, bool);
+-template bool Intersect<2>(const Segment<2>&, const AxisBox<2>&, bool);
+-template bool Intersect<3>(const Segment<3>&, const AxisBox<3>&, bool);
+-template bool Contains<2>(const Segment<2>&, const AxisBox<2>&, bool);
+-template bool Contains<3>(const Segment<3>&, const AxisBox<3>&, bool);
+-
+-template bool Intersect<Ball<2>,Segment<2> >(const Ball<2>&, const Segment<2>&, bool);
+-template bool Intersect<Ball<3>,Segment<3> >(const Ball<3>&, const Segment<3>&, bool);
+-template bool Contains<2>(const Ball<2>&, const Segment<2>&, bool);
+-template bool Contains<3>(const Ball<3>&, const Segment<3>&, bool);
+-template bool Intersect<2>(const Segment<2>&, const Ball<2>&, bool);
+-template bool Intersect<3>(const Segment<3>&, const Ball<3>&, bool);
+-template bool Contains<2>(const Segment<2>&, const Ball<2>&, bool);
+-template bool Contains<3>(const Segment<3>&, const Ball<3>&, bool);
+-
+-template bool Intersect<2>(const Segment<2>&, const Segment<2>&, bool);
+-template bool Intersect<3>(const Segment<3>&, const Segment<3>&, bool);
+-template bool Contains<2>(const Segment<2>&, const Segment<2>&, bool);
+-template bool Contains<3>(const Segment<3>&, const Segment<3>&, bool);
+-
+-template bool Intersect<Point<2>,RotBox<2> >(const Point<2>&, const RotBox<2>&, bool);
+-template bool Intersect<Point<3>,RotBox<3> >(const Point<3>&, const RotBox<3>&, bool);
+-template bool Contains<2>(const Point<2>&, const RotBox<2>&, bool);
+-template bool Contains<3>(const Point<3>&, const RotBox<3>&, bool);
+-template bool Intersect<2>(const RotBox<2>&, const Point<2>&, bool);
+-template bool Intersect<3>(const RotBox<3>&, const Point<3>&, bool);
+-template bool Contains<2>(const RotBox<2>&, const Point<2>&, bool);
+-template bool Contains<3>(const RotBox<3>&, const Point<3>&, bool);
+-
+-template bool Intersect<AxisBox<2>,RotBox<2> >(const AxisBox<2>&, const RotBox<2>&, bool);
+-template bool Intersect<AxisBox<3>,RotBox<3> >(const AxisBox<3>&, const RotBox<3>&, bool);
+-template bool Contains<2>(const AxisBox<2>&, const RotBox<2>&, bool);
+-template bool Contains<3>(const AxisBox<3>&, const RotBox<3>&, bool);
+-template bool Contains<2>(const RotBox<2>&, const AxisBox<2>&, bool);
+-template bool Contains<3>(const RotBox<3>&, const AxisBox<3>&, bool);
+-
+-template bool Intersect<Ball<2>,RotBox<2> >(const Ball<2>&, const RotBox<2>&, bool);
+-template bool Intersect<Ball<3>,RotBox<3> >(const Ball<3>&, const RotBox<3>&, bool);
+-template bool Contains<2>(const Ball<2>&, const RotBox<2>&, bool);
+-template bool Contains<3>(const Ball<3>&, const RotBox<3>&, bool);
+-template bool Intersect<2>(const RotBox<2>&, const Ball<2>&, bool);
+-template bool Intersect<3>(const RotBox<3>&, const Ball<3>&, bool);
+-template bool Contains<2>(const RotBox<2>&, const Ball<2>&, bool);
+-template bool Contains<3>(const RotBox<3>&, const Ball<3>&, bool);
+-
+-template bool Intersect<Segment<2>,RotBox<2> >(const Segment<2>&, const RotBox<2>&, bool);
+-template bool Intersect<Segment<3>,RotBox<3> >(const Segment<3>&, const RotBox<3>&, bool);
+-template bool Contains<2>(const Segment<2>&, const RotBox<2>&, bool);
+-template bool Contains<3>(const Segment<3>&, const RotBox<3>&, bool);
+-template bool Intersect<2>(const RotBox<2>&, const Segment<2>&, bool);
+-template bool Intersect<3>(const RotBox<3>&, const Segment<3>&, bool);
+-template bool Contains<2>(const RotBox<2>&, const Segment<2>&, bool);
+-template bool Contains<3>(const RotBox<3>&, const Segment<3>&, bool);
+-
+-template bool Intersect<2>(const RotBox<2>&, const RotBox<2>&, bool);
+-template bool Intersect<3>(const RotBox<3>&, const RotBox<3>&, bool);
+-template bool Contains<2>(const RotBox<2>&, const RotBox<2>&, bool);
+-template bool Contains<3>(const RotBox<3>&, const RotBox<3>&, bool);
+-
+ // The 2d implementation was inspired as a simplification of the 3d.
+ // It used the fact that two not-similarly-oriented rectangles a and b
+ // intersect each other if and only if a's bounding box in b's coordinate
+@@ -359,4 +244,119 @@
+ return true;
+ }
+
++// force a bunch of instantiations
++
++template bool Intersect<2>(const Point<2>&, const Point<2>&, bool);
++template bool Intersect<3>(const Point<3>&, const Point<3>&, bool);
++template bool Contains<2>(const Point<2>&, const Point<2>&, bool);
++template bool Contains<3>(const Point<3>&, const Point<3>&, bool);
++
++template bool Intersect<Point<2>,AxisBox<2> >(const Point<2>&, const AxisBox<2>&, bool);
++template bool Intersect<Point<3>,AxisBox<3> >(const Point<3>&, const AxisBox<3>&, bool);
++template bool Contains<2>(const Point<2>&, const AxisBox<2>&, bool);
++template bool Contains<3>(const Point<3>&, const AxisBox<3>&, bool);
++template bool Intersect<2>(const AxisBox<2>&, const Point<2>&, bool);
++template bool Intersect<3>(const AxisBox<3>&, const Point<3>&, bool);
++template bool Contains<2>(const AxisBox<2>&, const Point<2>&, bool);
++template bool Contains<3>(const AxisBox<3>&, const Point<3>&, bool);
++
++template bool Intersect<2>(const AxisBox<2>&, const AxisBox<2>&, bool);
++template bool Intersect<3>(const AxisBox<3>&, const AxisBox<3>&, bool);
++template bool Contains<2>(const AxisBox<2>&, const AxisBox<2>&, bool);
++template bool Contains<3>(const AxisBox<3>&, const AxisBox<3>&, bool);
++
++template bool Intersect<Point<2>,Ball<2> >(const Point<2>&, const Ball<2>&, bool);
++template bool Intersect<Point<3>,Ball<3> >(const Point<3>&, const Ball<3>&, bool);
++template bool Contains<2>(const Point<2>&, const Ball<2>&, bool);
++template bool Contains<3>(const Point<3>&, const Ball<3>&, bool);
++template bool Intersect<2>(const Ball<2>&, const Point<2>&, bool);
++template bool Intersect<3>(const Ball<3>&, const Point<3>&, bool);
++template bool Contains<2>(const Ball<2>&, const Point<2>&, bool);
++template bool Contains<3>(const Ball<3>&, const Point<3>&, bool);
++
++template bool Intersect<AxisBox<2>,Ball<2> >(const AxisBox<2>&, const Ball<2>&, bool);
++template bool Intersect<AxisBox<3>,Ball<3> >(const AxisBox<3>&, const Ball<3>&, bool);
++template bool Contains<2>(const AxisBox<2>&, const Ball<2>&, bool);
++template bool Contains<3>(const AxisBox<3>&, const Ball<3>&, bool);
++template bool Intersect<2>(const Ball<2>&, const AxisBox<2>&, bool);
++template bool Intersect<3>(const Ball<3>&, const AxisBox<3>&, bool);
++template bool Contains<2>(const Ball<2>&, const AxisBox<2>&, bool);
++template bool Contains<3>(const Ball<3>&, const AxisBox<3>&, bool);
++
++template bool Intersect<2>(const Ball<2>&, const Ball<2>&, bool);
++template bool Intersect<3>(const Ball<3>&, const Ball<3>&, bool);
++template bool Contains<2>(const Ball<2>&, const Ball<2>&, bool);
++template bool Contains<3>(const Ball<3>&, const Ball<3>&, bool);
++
++template bool Intersect<Point<2>,Segment<2> >(const Point<2>&, const Segment<2>&, bool);
++template bool Intersect<Point<3>,Segment<3> >(const Point<3>&, const Segment<3>&, bool);
++template bool Contains<2>(const Point<2>&, const Segment<2>&, bool);
++template bool Contains<3>(const Point<3>&, const Segment<3>&, bool);
++template bool Intersect<2>(const Segment<2>&, const Point<2>&, bool);
++template bool Intersect<3>(const Segment<3>&, const Point<3>&, bool);
++template bool Contains<2>(const Segment<2>&, const Point<2>&, bool);
++template bool Contains<3>(const Segment<3>&, const Point<3>&, bool);
++
++template bool Intersect<AxisBox<2>,Segment<2> >(const AxisBox<2>&, const Segment<2>&, bool);
++template bool Intersect<AxisBox<3>,Segment<3> >(const AxisBox<3>&, const Segment<3>&, bool);
++template bool Contains<2>(const AxisBox<2>&, const Segment<2>&, bool);
++template bool Contains<3>(const AxisBox<3>&, const Segment<3>&, bool);
++template bool Intersect<2>(const Segment<2>&, const AxisBox<2>&, bool);
++template bool Intersect<3>(const Segment<3>&, const AxisBox<3>&, bool);
++template bool Contains<2>(const Segment<2>&, const AxisBox<2>&, bool);
++template bool Contains<3>(const Segment<3>&, const AxisBox<3>&, bool);
++
++template bool Intersect<Ball<2>,Segment<2> >(const Ball<2>&, const Segment<2>&, bool);
++template bool Intersect<Ball<3>,Segment<3> >(const Ball<3>&, const Segment<3>&, bool);
++template bool Contains<2>(const Ball<2>&, const Segment<2>&, bool);
++template bool Contains<3>(const Ball<3>&, const Segment<3>&, bool);
++template bool Intersect<2>(const Segment<2>&, const Ball<2>&, bool);
++template bool Intersect<3>(const Segment<3>&, const Ball<3>&, bool);
++template bool Contains<2>(const Segment<2>&, const Ball<2>&, bool);
++template bool Contains<3>(const Segment<3>&, const Ball<3>&, bool);
++
++template bool Intersect<2>(const Segment<2>&, const Segment<2>&, bool);
++template bool Intersect<3>(const Segment<3>&, const Segment<3>&, bool);
++template bool Contains<2>(const Segment<2>&, const Segment<2>&, bool);
++template bool Contains<3>(const Segment<3>&, const Segment<3>&, bool);
++
++template bool Intersect<Point<2>,RotBox<2> >(const Point<2>&, const RotBox<2>&, bool);
++template bool Intersect<Point<3>,RotBox<3> >(const Point<3>&, const RotBox<3>&, bool);
++template bool Contains<2>(const Point<2>&, const RotBox<2>&, bool);
++template bool Contains<3>(const Point<3>&, const RotBox<3>&, bool);
++template bool Intersect<2>(const RotBox<2>&, const Point<2>&, bool);
++template bool Intersect<3>(const RotBox<3>&, const Point<3>&, bool);
++template bool Contains<2>(const RotBox<2>&, const Point<2>&, bool);
++template bool Contains<3>(const RotBox<3>&, const Point<3>&, bool);
++
++template bool Intersect<AxisBox<2>,RotBox<2> >(const AxisBox<2>&, const RotBox<2>&, bool);
++template bool Intersect<AxisBox<3>,RotBox<3> >(const AxisBox<3>&, const RotBox<3>&, bool);
++template bool Contains<2>(const AxisBox<2>&, const RotBox<2>&, bool);
++template bool Contains<3>(const AxisBox<3>&, const RotBox<3>&, bool);
++template bool Contains<2>(const RotBox<2>&, const AxisBox<2>&, bool);
++template bool Contains<3>(const RotBox<3>&, const AxisBox<3>&, bool);
++
++template bool Intersect<Ball<2>,RotBox<2> >(const Ball<2>&, const RotBox<2>&, bool);
++template bool Intersect<Ball<3>,RotBox<3> >(const Ball<3>&, const RotBox<3>&, bool);
++template bool Contains<2>(const Ball<2>&, const RotBox<2>&, bool);
++template bool Contains<3>(const Ball<3>&, const RotBox<3>&, bool);
++template bool Intersect<2>(const RotBox<2>&, const Ball<2>&, bool);
++template bool Intersect<3>(const RotBox<3>&, const Ball<3>&, bool);
++template bool Contains<2>(const RotBox<2>&, const Ball<2>&, bool);
++template bool Contains<3>(const RotBox<3>&, const Ball<3>&, bool);
++
++template bool Intersect<Segment<2>,RotBox<2> >(const Segment<2>&, const RotBox<2>&, bool);
++template bool Intersect<Segment<3>,RotBox<3> >(const Segment<3>&, const RotBox<3>&, bool);
++template bool Contains<2>(const Segment<2>&, const RotBox<2>&, bool);
++template bool Contains<3>(const Segment<3>&, const RotBox<3>&, bool);
++template bool Intersect<2>(const RotBox<2>&, const Segment<2>&, bool);
++template bool Intersect<3>(const RotBox<3>&, const Segment<3>&, bool);
++template bool Contains<2>(const RotBox<2>&, const Segment<2>&, bool);
++template bool Contains<3>(const RotBox<3>&, const Segment<3>&, bool);
++
++template bool Intersect<2>(const RotBox<2>&, const RotBox<2>&, bool);
++template bool Intersect<3>(const RotBox<3>&, const RotBox<3>&, bool);
++template bool Contains<2>(const RotBox<2>&, const RotBox<2>&, bool);
++template bool Contains<3>(const RotBox<3>&, const RotBox<3>&, bool);
++
+ }
diff --git a/math/wfmath/patch-wfmath-axisbox.h b/math/wfmath/patch-wfmath-axisbox.h
new file mode 100644
index 000000000000..82d9bd95a493
--- /dev/null
+++ b/math/wfmath/patch-wfmath-axisbox.h
@@ -0,0 +1,21 @@
+--- wfmath/axisbox.h.orig 2014-03-10 19:19:47.000000000 +0100
++++ wfmath/axisbox.h 2014-03-10 19:20:00.000000000 +0100
+@@ -153,6 +153,9 @@
+ /// Get the minimal box that contains a1 and a2
+ friend AxisBox Union<dim>(const AxisBox& a1, const AxisBox& a2);
+
++ friend bool Intersect<2>(const RotBox<2>& r, const AxisBox<2>& b, bool proper);
++ friend bool Intersect<3>(const RotBox<3>& r, const AxisBox<3>& b, bool proper);
++
+ friend bool Intersect<dim>(const AxisBox& b, const Point<dim>& p, bool proper);
+ friend bool Contains<dim>(const Point<dim>& p, const AxisBox& b, bool proper);
+
+@@ -174,8 +177,6 @@
+ friend bool Contains<dim>(const Polygon<dim>& p, const AxisBox& b, bool proper);
+ friend bool Contains<dim>(const AxisBox& b, const Polygon<dim>& p, bool proper);
+
+- private:
+-
+ Point<dim> m_low, m_high;
+ };
+
diff --git a/math/wfmath/patch-wfmath-rotbox.h b/math/wfmath/patch-wfmath-rotbox.h
new file mode 100644
index 000000000000..d3dba9fa2978
--- /dev/null
+++ b/math/wfmath/patch-wfmath-rotbox.h
@@ -0,0 +1,21 @@
+--- wfmath/rotbox.h.orig 2014-03-10 19:19:38.000000000 +0100
++++ wfmath/rotbox.h 2014-03-10 19:19:56.000000000 +0100
+@@ -159,6 +159,9 @@
+ RotBox toParentCoords(const Point<dim>& origin, const Quaternion& rotation) const;
+ RotBox toLocalCoords(const Point<dim>& origin, const Quaternion& rotation) const;
+
++ friend bool Intersect<2>(const RotBox<2>& r, const AxisBox<2>& b, bool proper);
++ friend bool Intersect<3>(const RotBox<3>& r, const AxisBox<3>& b, bool proper);
++
+ friend bool Intersect<dim>(const RotBox& r, const Point<dim>& p, bool proper);
+ friend bool Contains<dim>(const Point<dim>& p, const RotBox& r, bool proper);
+
+@@ -181,8 +184,6 @@
+ friend bool Contains<dim>(const Polygon<dim>& p, const RotBox& r, bool proper);
+ friend bool Contains<dim>(const RotBox& r, const Polygon<dim>& p, bool proper);
+
+- private:
+-
+ Point<dim> m_corner0;
+ Vector<dim> m_size;
+ RotMatrix<dim> m_orient;