summaryrefslogtreecommitdiff
path: root/cad
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2016-02-25 22:21:37 +0000
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2016-02-25 22:21:37 +0000
commit36d06b0a1ffb3f9fd4636d3ad44a883acd82a049 (patch)
tree860aa7848b6aff5e22473d30b91d412b5fdf0885 /cad
parentAdd a patch to fix hardlink installation (diff)
Add patches to fix the build on FreeBSD 11 with libc++.
OpenVSP does something like this: using namespace std; class array { ... }; Which causes the build to fail with HEAD's libc++. Even though the port does not use -std=c++11, libc++ still declares an array class that conflicts with the one OpenVSP has. Enclose OpenVSP's array declaration in a namespace to avoid these conflicts. PR: 207253 Approved by: fernando.apesteguia@gmail.com (maintainer)
Notes
Notes: svn path=/head/; revision=409563
Diffstat (limited to 'cad')
-rw-r--r--cad/openvsp/files/patch-src_util__code_array.h25
-rw-r--r--cad/openvsp/files/patch-src_vsp_af.cpp13
-rw-r--r--cad/openvsp/files/patch-src_vsp_havoc__geom.cpp13
-rw-r--r--cad/openvsp/files/patch-src_vsp_havoc__geom.h21
4 files changed, 72 insertions, 0 deletions
diff --git a/cad/openvsp/files/patch-src_util__code_array.h b/cad/openvsp/files/patch-src_util__code_array.h
new file mode 100644
index 000000000000..135ff61dd3c5
--- /dev/null
+++ b/cad/openvsp/files/patch-src_util__code_array.h
@@ -0,0 +1,25 @@
+Workaround for libc++, which declares std::array even if not in C++11 mode (see
+ports/207253 for a bigger discussion).
+--- src/util_code/array.h.orig 2016-02-25 10:29:49 UTC
++++ src/util_code/array.h
+@@ -20,11 +20,12 @@
+ #include <iostream>
+ using namespace std;
+
++namespace openvsp {
++
+ // Define Error Flags //
+ #define BELOW_BOUNDS 0
+ #define ABOVE_BOUNDS 1
+
+-
+ template<class Item_type>
+
+ class array
+@@ -328,5 +331,6 @@ void array<Item_type>::print_error_messa
+
+ }
+
++} // namespace openvsp
+
+ #endif
diff --git a/cad/openvsp/files/patch-src_vsp_af.cpp b/cad/openvsp/files/patch-src_vsp_af.cpp
new file mode 100644
index 000000000000..e2df8a6fc1f3
--- /dev/null
+++ b/cad/openvsp/files/patch-src_vsp_af.cpp
@@ -0,0 +1,13 @@
+Workaround for libc++, which declares std::array even if not in C++11 mode (see
+ports/207253 for a bigger discussion).
+--- src/vsp/af.cpp.orig 2016-02-25 10:34:17 UTC
++++ src/vsp/af.cpp
+@@ -1744,7 +1744,7 @@ vec3d Af::get_rounded_end_cap(int index)
+ void Af::invert_airfoil()
+ {
+ int i;
+- array <double> z;
++ openvsp::array <double> z;
+ z.init(num_pnts);
+
+ //===== Switch Upper and Lower Z values =====
diff --git a/cad/openvsp/files/patch-src_vsp_havoc__geom.cpp b/cad/openvsp/files/patch-src_vsp_havoc__geom.cpp
new file mode 100644
index 000000000000..7d61a1a593fc
--- /dev/null
+++ b/cad/openvsp/files/patch-src_vsp_havoc__geom.cpp
@@ -0,0 +1,13 @@
+Workaround for libc++, which declares std::array even if not in C++11 mode (see
+ports/207253 for a bigger discussion).
+--- src/vsp/havoc_geom.cpp.orig 2016-02-25 10:35:42 UTC
++++ src/vsp/havoc_geom.cpp
+@@ -428,7 +428,7 @@ void Havoc_geom::generate_planform_curve
+
+ //==== Find Xsec Locations ====//
+ int num_xsecs = havoc_num_xsecs - 3;
+- array< double > tmp_x;
++ openvsp::array< double > tmp_x;
+ tmp_x.init ( num_xsecs );
+
+ for ( i = 0 ; i < num_xsecs ; i++ )
diff --git a/cad/openvsp/files/patch-src_vsp_havoc__geom.h b/cad/openvsp/files/patch-src_vsp_havoc__geom.h
new file mode 100644
index 000000000000..1baf616a1936
--- /dev/null
+++ b/cad/openvsp/files/patch-src_vsp_havoc__geom.h
@@ -0,0 +1,21 @@
+Workaround for libc++, which declares std::array even if not in C++11 mode (see
+ports/207253 for a bigger discussion).
+--- src/vsp/havoc_geom.h.orig 2016-02-25 10:33:52 UTC
++++ src/vsp/havoc_geom.h
+@@ -88,11 +88,11 @@ class Havoc_geom : public Geom
+ int havoc_num_xsecs;
+ int havoc_num_pnts;
+
+- array< double > x_locs;
+- array< double > left;
+- array< double > right;
+- array< double > upper;
+- array< double > lower;
++ openvsp::array< double > x_locs;
++ openvsp::array< double > left;
++ openvsp::array< double > right;
++ openvsp::array< double > upper;
++ openvsp::array< double > lower;
+
+ Parm length;
+