]> git.pld-linux.org Git - packages/OpenNI.git/commitdiff
- added c++ patch (fix define conflict with C++ standard library)
authorJakub Bogusz <qboosh@pld-linux.org>
Wed, 29 Nov 2017 15:59:47 +0000 (16:59 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Wed, 29 Nov 2017 15:59:47 +0000 (16:59 +0100)
- added mono patch (use mcs instead of gmcs as C# compiler)

OpenNI-c++.patch [new file with mode: 0644]
OpenNI-mono.patch [new file with mode: 0644]
OpenNI.spec

diff --git a/OpenNI-c++.patch b/OpenNI-c++.patch
new file mode 100644 (file)
index 0000000..3f98f0e
--- /dev/null
@@ -0,0 +1,70 @@
+--- OpenNI-OpenNI-1e9524f/Samples/NiViewer/glh/glh_linear.h.orig       2013-11-12 17:30:03.000000000 +0100
++++ OpenNI-OpenNI-1e9524f/Samples/NiViewer/glh/glh_linear.h    2017-11-29 16:09:12.957112371 +0100
+@@ -77,7 +77,7 @@
+ #define     GLH_EPSILON         GLH_REAL(10e-6)\r
+ #define     GLH_PI              GLH_REAL(3.1415926535897932384626433832795)    \r
\r
+-#define     equivalent(a,b)     (((a < b + GLH_EPSILON) && (a > b - GLH_EPSILON)) ? true : false)\r
++#define     glh_equivalent(a,b)     (((a < b + GLH_EPSILON) && (a > b - GLH_EPSILON)) ? true : false)\r
\r
+ namespace glh\r
+ {\r
+@@ -1093,7 +1093,7 @@
\r
+         real norm = q[0] * q[0] + q[1] * q[1] + q[2] * q[2] + q[3] * q[3];\r
\r
+-        s = (equivalent(norm,GLH_ZERO)) ? GLH_ZERO : ( GLH_TWO / norm );\r
++        s = (glh_equivalent(norm,GLH_ZERO)) ? GLH_ZERO : ( GLH_TWO / norm );\r
\r
+         xs = q[0] * s;\r
+         ys = q[1] * s;\r
+@@ -1194,7 +1194,7 @@
+             theta *= real(0.5);\r
+             real sin_theta = real(sin(theta));\r
\r
+-            if (!equivalent(sqnorm,GLH_ONE)) \r
++            if (!glh_equivalent(sqnorm,GLH_ONE)) \r
+               sin_theta /= real(sqrt(sqnorm));\r
+             x = sin_theta * axis.v[0];\r
+             y = sin_theta * axis.v[1];\r
+@@ -1216,14 +1216,14 @@
\r
+         alpha = p1.dot(p2);\r
\r
+-        if(equivalent(alpha,GLH_ONE))\r
++        if(glh_equivalent(alpha,GLH_ONE))\r
+         { \r
+             *this = identity(); \r
+             return *this; \r
+         }\r
\r
+         // ensures that the anti-parallel case leads to a positive dot\r
+-        if(equivalent(alpha,-GLH_ONE))\r
++        if(glh_equivalent(alpha,-GLH_ONE))\r
+         {\r
+             vec3 v;\r
\r
+@@ -1280,7 +1280,7 @@
+     void normalize()\r
+     {\r
+         real rnorm = GLH_ONE / real(sqrt(w * w + x * x + y * y + z * z));\r
+-        if (equivalent(rnorm, GLH_ZERO))\r
++        if (glh_equivalent(rnorm, GLH_ZERO))\r
+             return;\r
+         x *= rnorm;\r
+         y *= rnorm;\r
+@@ -1439,10 +1439,10 @@
+     inline\r
+     bool operator == ( const quaternion & q1, const quaternion & q2 )\r
+     {\r
+-        return (equivalent(q1.x, q2.x) &&\r
+-                      equivalent(q1.y, q2.y) &&\r
+-                      equivalent(q1.z, q2.z) &&\r
+-                      equivalent(q1.w, q2.w) );\r
++        return (glh_equivalent(q1.x, q2.x) &&\r
++                      glh_equivalent(q1.y, q2.y) &&\r
++                      glh_equivalent(q1.z, q2.z) &&\r
++                      glh_equivalent(q1.w, q2.w) );\r
+     }\r
\r
+     inline\r
diff --git a/OpenNI-mono.patch b/OpenNI-mono.patch
new file mode 100644 (file)
index 0000000..901e53c
--- /dev/null
@@ -0,0 +1,11 @@
+--- OpenNI-OpenNI-1e9524f/Platform/Linux/Build/Common/CommonCSMakefile.orig    2013-11-12 17:30:03.000000000 +0100
++++ OpenNI-OpenNI-1e9524f/Platform/Linux/Build/Common/CommonCSMakefile 2017-11-29 16:54:33.678880973 +0100
+@@ -45,7 +45,7 @@
+       TARGET = winexe
+ endif
+-OUTPUT_COMMAND = gmcs -out:$(OUTPUT_FILE) -target:$(TARGET) $(CSFLAGS) $(USED_NETLIBS_OPTION) $(SRC_FILES)
++OUTPUT_COMMAND = mcs -out:$(OUTPUT_FILE) -target:$(TARGET) $(CSFLAGS) $(USED_NETLIBS_OPTION) $(SRC_FILES)
+ #############################################################################
+ # Targets
index 3577b1e2c8da083140ff293a55085fd5189fa125..8397e8518e39e5006777e2b40f52fabb3e238cac 100644 (file)
@@ -25,7 +25,9 @@ Source0:      https://github.com/OpenNI/OpenNI/tarball/Stable-%{version}/%{name}-%{ve
 Source1:       libopenni.pc
 Patch0:                %{name}-system-libs.patch
 Patch1:                %{name}-nosse.patch
-URL:           http://openni.org/
+Patch2:                %{name}-c++.patch
+Patch3:                %{name}-mono.patch
+URL:           https://github.com/OpenNI/OpenNI/
 BuildRequires: OpenGL-devel
 # for examples
 BuildRequires: OpenGL-glut-devel >= 3
@@ -149,6 +151,8 @@ Interfejs .NET do OpenNI.
 %undos Platform/Linux/Build/Samples/NiUserTracker/Makefile
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 %{__make} -C Platform/Linux/Build clean
@@ -159,7 +163,8 @@ export CFLAGS="%{rpmcflags}"
        HOSTPLATFORM=%{openni_platform} \
        SSE_GENERATION=%{?with_sse3:3}%{!?with_sse3:%{?with_sse2:2}} \
        %{?with_ssse3:SSSE3_ENABLED=1} \
-       %{!?with_java:ALL_JAVA_PROJS= JAVA_SAMPLES=}
+       %{!?with_java:ALL_JAVA_PROJS= JAVA_SAMPLES=} \
+       MONO_INSTALLED=%{?with_mono:1}
 
 %if %{with apidocs}
 cd Source/DoxyGen
This page took 0.077975 seconds and 4 git commands to generate.