diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/OpenNI/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/OpenNI/files')
-rw-r--r-- | dev-libs/OpenNI/files/OpenNI-1.5.7.10-gcc6.patch | 145 | ||||
-rw-r--r-- | dev-libs/OpenNI/files/jpeg.patch | 23 | ||||
-rw-r--r-- | dev-libs/OpenNI/files/soname.patch | 13 | ||||
-rw-r--r-- | dev-libs/OpenNI/files/tinyxml.patch | 29 |
4 files changed, 210 insertions, 0 deletions
diff --git a/dev-libs/OpenNI/files/OpenNI-1.5.7.10-gcc6.patch b/dev-libs/OpenNI/files/OpenNI-1.5.7.10-gcc6.patch new file mode 100644 index 000000000000..2b93d8c642b9 --- /dev/null +++ b/dev-libs/OpenNI/files/OpenNI-1.5.7.10-gcc6.patch @@ -0,0 +1,145 @@ +Bug: https://bugs.gentoo.org/594988 +Upstream PR: https://github.com/OpenNI/OpenNI/pull/122 + +diff -Naur a/Samples/NiUserSelection/glh/glh_linear.h b/Samples/NiUserSelection/glh/glh_linear.h +--- a/Samples/NiUserSelection/glh/glh_linear.h 2013-11-12 11:30:03.000000000 -0500 ++++ b/Samples/NiUserSelection/glh/glh_linear.h 2017-06-22 18:43:34.470107723 -0400 +@@ -77,7 +77,7 @@ + #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 is_equivalent(a,b) (((a < b + GLH_EPSILON) && (a > b - GLH_EPSILON)) ? true : false)
+
+ namespace glh
+ {
+@@ -1093,7 +1093,7 @@ +
+ 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 = (is_equivalent(norm,GLH_ZERO)) ? GLH_ZERO : ( GLH_TWO / norm );
+
+ xs = q[0] * s;
+ ys = q[1] * s;
+@@ -1194,7 +1194,7 @@ + theta *= real(0.5);
+ real sin_theta = real(sin(theta));
+
+- if (!equivalent(sqnorm,GLH_ONE))
++ if (!is_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 @@ +
+ alpha = p1.dot(p2);
+
+- if(equivalent(alpha,GLH_ONE))
++ if(is_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(is_equivalent(alpha,-GLH_ONE))
+ {
+ vec3 v;
+
+@@ -1280,7 +1280,7 @@ + void normalize()
+ {
+ real rnorm = GLH_ONE / real(sqrt(w * w + x * x + y * y + z * z));
+- if (equivalent(rnorm, GLH_ZERO))
++ if (is_equivalent(rnorm, GLH_ZERO))
+ return;
+ x *= rnorm;
+ y *= rnorm;
+@@ -1439,10 +1439,10 @@ + 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 (is_equivalent(q1.x, q2.x) &&
++ is_equivalent(q1.y, q2.y) &&
++ is_equivalent(q1.z, q2.z) &&
++ is_equivalent(q1.w, q2.w) );
+ }
+
+ inline
+diff -Naur a/Samples/NiViewer/glh/glh_linear.h b/Samples/NiViewer/glh/glh_linear.h +--- a/Samples/NiViewer/glh/glh_linear.h 2013-11-12 11:30:03.000000000 -0500 ++++ b/Samples/NiViewer/glh/glh_linear.h 2017-06-22 18:43:34.470107723 -0400 +@@ -77,7 +77,7 @@ + #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 is_equivalent(a,b) (((a < b + GLH_EPSILON) && (a > b - GLH_EPSILON)) ? true : false)
+
+ namespace glh
+ {
+@@ -1093,7 +1093,7 @@ +
+ 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 = (is_equivalent(norm,GLH_ZERO)) ? GLH_ZERO : ( GLH_TWO / norm );
+
+ xs = q[0] * s;
+ ys = q[1] * s;
+@@ -1194,7 +1194,7 @@ + theta *= real(0.5);
+ real sin_theta = real(sin(theta));
+
+- if (!equivalent(sqnorm,GLH_ONE))
++ if (!is_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 @@ +
+ alpha = p1.dot(p2);
+
+- if(equivalent(alpha,GLH_ONE))
++ if(is_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(is_equivalent(alpha,-GLH_ONE))
+ {
+ vec3 v;
+
+@@ -1280,7 +1280,7 @@ + void normalize()
+ {
+ real rnorm = GLH_ONE / real(sqrt(w * w + x * x + y * y + z * z));
+- if (equivalent(rnorm, GLH_ZERO))
++ if (is_equivalent(rnorm, GLH_ZERO))
+ return;
+ x *= rnorm;
+ y *= rnorm;
+@@ -1439,10 +1439,10 @@ + 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 (is_equivalent(q1.x, q2.x) &&
++ is_equivalent(q1.y, q2.y) &&
++ is_equivalent(q1.z, q2.z) &&
++ is_equivalent(q1.w, q2.w) );
+ }
+
+ inline
diff --git a/dev-libs/OpenNI/files/jpeg.patch b/dev-libs/OpenNI/files/jpeg.patch new file mode 100644 index 000000000000..46f5dfd3d873 --- /dev/null +++ b/dev-libs/OpenNI/files/jpeg.patch @@ -0,0 +1,23 @@ +Index: OpenNI-9999/Platform/Linux/Build/Modules/nimCodecs/Makefile +=================================================================== +--- OpenNI-9999.orig/Platform/Linux/Build/Modules/nimCodecs/Makefile ++++ OpenNI-9999/Platform/Linux/Build/Modules/nimCodecs/Makefile +@@ -2,15 +2,13 @@ BIN_DIR = ../../../Bin + + INC_DIRS = \ + ../../../../../Include \ +- ../../../../../Source \ +- ../../../../../Externals/LibJPEG ++ ../../../../../Source + + SRC_FILES = \ +- ../../../../../Source/Modules/nimCodecs/*.cpp \ +- ../../../../../Externals/LibJPEG/*.c ++ ../../../../../Source/Modules/nimCodecs/*.cpp + + LIB_NAME = nimCodecs +-USED_LIBS = OpenNI ++USED_LIBS = OpenNI jpeg + + include ../../Common/CommonCppMakefile + diff --git a/dev-libs/OpenNI/files/soname.patch b/dev-libs/OpenNI/files/soname.patch new file mode 100644 index 000000000000..b12a1e892e0f --- /dev/null +++ b/dev-libs/OpenNI/files/soname.patch @@ -0,0 +1,13 @@ +Index: OpenNI-9999/Platform/Linux/Build/Common/CommonCppMakefile +=================================================================== +--- OpenNI-9999.orig/Platform/Linux/Build/Common/CommonCppMakefile ++++ OpenNI-9999/Platform/Linux/Build/Common/CommonCppMakefile +@@ -78,7 +78,7 @@ ifneq "$(LIB_NAME)" "" + ifneq ("$(OSTYPE)","Darwin") + LDFLAGS += -Wl,--no-undefined + OUTPUT_NAME = lib$(LIB_NAME).so +- OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) $(LDFLAGS) -shared ++ OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) -Wl,-soname,$(notdir $(OUTPUT_FILE)) $(LDFLAGS) -shared + else + LDFLAGS += -undefined error + OUTPUT_NAME = lib$(LIB_NAME).dylib diff --git a/dev-libs/OpenNI/files/tinyxml.patch b/dev-libs/OpenNI/files/tinyxml.patch new file mode 100644 index 000000000000..801cabbd7708 --- /dev/null +++ b/dev-libs/OpenNI/files/tinyxml.patch @@ -0,0 +1,29 @@ +Index: OpenNI-9999/Platform/Linux/Build/OpenNI/Makefile +=================================================================== +--- OpenNI-9999.orig/Platform/Linux/Build/OpenNI/Makefile ++++ OpenNI-9999/Platform/Linux/Build/OpenNI/Makefile +@@ -4,13 +4,11 @@ BIN_DIR = ../../Bin + + INC_DIRS = \ + ../../../../Include \ +- ../../../../Source \ +- ../../../../Externals/TinyXml ++ ../../../../Source + + SRC_FILES = \ + ../../../../Source/OpenNI/*.cpp \ +- ../../../../Source/OpenNI/Linux/*.cpp \ +- ../../../../Externals/TinyXml/*.cpp ++ ../../../../Source/OpenNI/Linux/*.cpp + + ifeq ("$(OSTYPE)","Darwin") + INC_DIRS += /opt/local/include +@@ -19,7 +17,7 @@ ifeq ("$(OSTYPE)","Darwin") + endif + + LIB_NAME = OpenNI +-USED_LIBS = usb-1.0 dl pthread ++USED_LIBS = usb-1.0 dl pthread tinyxml + ifneq ("$(OSTYPE)","Darwin") + USED_LIBS += rt + endif |