From dc7968ad4d03e5c28726309462dd9b1b14df1239 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Apr 18 2016 01:41:28 +0000 Subject: Add patch for building with gcc6 --- diff --git a/openni-1.5.7.10-rename-equivalent-for-gcc6.patch b/openni-1.5.7.10-rename-equivalent-for-gcc6.patch new file mode 100644 index 0000000..175d770 --- /dev/null +++ b/openni-1.5.7.10-rename-equivalent-for-gcc6.patch @@ -0,0 +1,81 @@ +From: Jochen Sprickerhof +Date: Sat, 23 Jan 2016 15:22:26 +0100 +Subject: Rename equivalent to fix compilation on gcc6 + +Closes: #811848 +--- + Samples/NiViewer/glh/glh_linear.h | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/Samples/NiViewer/glh/glh_linear.h b/Samples/NiViewer/glh/glh_linear.h +index 422c05f..207adc5 100644 +--- a/Samples/NiViewer/glh/glh_linear.h ++++ b/Samples/NiViewer/glh/glh_linear.h +@@ -77,7 +77,7 @@ glh_linear.h + #define GLH_EPSILON GLH_REAL(10e-6) + #define GLH_PI GLH_REAL(3.1415926535897932384626433832795) + +-#define equivalent(a,b) (((a < b + GLH_EPSILON) && (a > b - GLH_EPSILON)) ? true : false) ++#define glh_equivalent(a,b) (((a < b + GLH_EPSILON) && (a > b - GLH_EPSILON)) ? true : false) + + namespace glh + { +@@ -1093,7 +1093,7 @@ namespace glh + + real norm = q[0] * q[0] + q[1] * q[1] + q[2] * q[2] + q[3] * q[3]; + +- s = (equivalent(norm,GLH_ZERO)) ? GLH_ZERO : ( GLH_TWO / norm ); ++ s = (glh_equivalent(norm,GLH_ZERO)) ? GLH_ZERO : ( GLH_TWO / norm ); + + xs = q[0] * s; + ys = q[1] * s; +@@ -1194,7 +1194,7 @@ namespace glh + theta *= real(0.5); + real sin_theta = real(sin(theta)); + +- if (!equivalent(sqnorm,GLH_ONE)) ++ if (!glh_equivalent(sqnorm,GLH_ONE)) + sin_theta /= real(sqrt(sqnorm)); + x = sin_theta * axis.v[0]; + y = sin_theta * axis.v[1]; +@@ -1216,14 +1216,14 @@ namespace glh + + alpha = p1.dot(p2); + +- if(equivalent(alpha,GLH_ONE)) ++ if(glh_equivalent(alpha,GLH_ONE)) + { + *this = identity(); + return *this; + } + + // ensures that the anti-parallel case leads to a positive dot +- if(equivalent(alpha,-GLH_ONE)) ++ if(glh_equivalent(alpha,-GLH_ONE)) + { + vec3 v; + +@@ -1280,7 +1280,7 @@ namespace glh + void normalize() + { + real rnorm = GLH_ONE / real(sqrt(w * w + x * x + y * y + z * z)); +- if (equivalent(rnorm, GLH_ZERO)) ++ if (glh_equivalent(rnorm, GLH_ZERO)) + return; + x *= rnorm; + y *= rnorm; +@@ -1439,10 +1439,10 @@ namespace glh + inline + bool operator == ( const quaternion & q1, const quaternion & q2 ) + { +- return (equivalent(q1.x, q2.x) && +- equivalent(q1.y, q2.y) && +- equivalent(q1.z, q2.z) && +- equivalent(q1.w, q2.w) ); ++ return (glh_equivalent(q1.x, q2.x) && ++ glh_equivalent(q1.y, q2.y) && ++ glh_equivalent(q1.z, q2.z) && ++ glh_equivalent(q1.w, q2.w) ); + } + + inline diff --git a/openni.spec b/openni.spec index 1834f07..1b480d2 100644 --- a/openni.spec +++ b/openni.spec @@ -13,7 +13,7 @@ Name: openni Version: 1.5.7.10 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Library for human-machine Natural Interaction Group: System Environment/Libraries @@ -35,6 +35,7 @@ Patch3: openni-1.3.2.1-silence-assert.patch Patch4: openni-1.3.2.1-fedora-java.patch Patch5: openni-1.5.2.23-disable-softfloat.patch Patch6: openni-1.5.2.23-armsamples.patch +Patch7: openni-1.5.7.10-rename-equivalent-for-gcc6.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExclusiveArch: %{ix86} x86_64 %{arm} @@ -103,6 +104,7 @@ The %{name}-examples package contains example programs for OpenNI. %patch4 -p1 -b .fedora-java %patch5 -p1 -b .disable-softfloat %patch6 -p1 -b .armsamples +%patch7 -p1 -b .rename-equivalent-for-gcc6 rm -rf Source/External rm -rf Platform/Linux/Build/Prerequisites/* find Samples -name GL -prune -exec rm -rf {} \; @@ -223,6 +225,9 @@ fi %changelog +* Sun Apr 17 2016 Scott K Logan - 1.5.7.10-8 +- Add patch for building with gcc6 + * Thu Feb 04 2016 Fedora Release Engineering - 1.5.7.10-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild