diff options
Diffstat (limited to 'dev-libs/OpenNI')
-rw-r--r-- | dev-libs/OpenNI/Manifest | 8 | ||||
-rw-r--r-- | dev-libs/OpenNI/OpenNI-1.5.7.10.ebuild | 108 | ||||
-rw-r--r-- | dev-libs/OpenNI/OpenNI-9999.ebuild | 108 | ||||
-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 | ||||
-rw-r--r-- | dev-libs/OpenNI/metadata.xml | 11 |
8 files changed, 445 insertions, 0 deletions
diff --git a/dev-libs/OpenNI/Manifest b/dev-libs/OpenNI/Manifest new file mode 100644 index 000000000000..2f2b1d28e03c --- /dev/null +++ b/dev-libs/OpenNI/Manifest @@ -0,0 +1,8 @@ +AUX OpenNI-1.5.7.10-gcc6.patch 5012 BLAKE2B e5cb8535a1df4a2f8f4c4d34955004ed6e2c3d32a8fb41ea452576715f146794697ecc8ae0377f68f551fd85f153ce10156d6dff42c0b290ef426c35da9ec53a SHA512 129eedc33941df3b3a126528f8d0503c2808930276aa0350c89af42b9b34642eafb8304610443699b839f0158c0412a38bf3a4722af7497534519ecf753e99ac +AUX jpeg.patch 704 BLAKE2B a3261b7834fec0134929782a8283840bf9a5c2483272f57598c93d635707a58c2ec14f57877032bab6bce2cc3c94a560fa99f29ab759fc51c406226535b987cc SHA512 4276584d5252fd2ce9f7fc7b4389d079276f3626fe140344bd7ba5083f7190455a82aee98742bbf3e8f527947c3128281f63e940c114e85f92be94f71819a117 +AUX soname.patch 670 BLAKE2B 2fa9843c9be26474a9ba7d5a45ce258ff97ac32ffd4e32c23d572de94f9b7b3722e8f6a61ec5f6ed7d96837eb7e423163536960f07a5b4ecb86c96835ef841b8 SHA512 422c90b220b9366320f2513798d00c2d8a17b0db0ccb87150038c2f237d22c7f0d28206e6d00a7c73b758b6b021886a666a8860586f27fe9b57ddb14094ba7f4 +AUX tinyxml.patch 828 BLAKE2B 33698417dada91b4dbefe81de4f41f0fb9990478a1b0db9e4cc6fea4bb6951c49f7bdf09830cce81c4faf87213318fd0137e8058a7f4dc83b5ed9d688ec2655e SHA512 97cdcbbcd1d4ab4990c7a96ce21c4da983347f73c8064959bbb66d49cc9cda5e293b0273f19d1595ef5b26a6c32267b54cdd45fd4a86b2d8881501a3cea5724a +DIST OpenNI-1.5.7.10.tar.gz 23378582 BLAKE2B c3532e3fb03bce9a30c94dc950591064d7b62d9eec8d5321c4dc65433be47652f9323a12401b8cbe4d3b81516120712720c1497ab51f220889b26fb33a4fcbc8 SHA512 f7b6106198c4314584cf327744e9d8b193ff9f2e8d416769aafb2aeeda0593ccbb37c3187ed75f1960d2ae8e80e8f30e0fced9ff82e20fe6f24c54246f77d512 +EBUILD OpenNI-1.5.7.10.ebuild 2493 BLAKE2B ae53d149b9a0fdff2a137a93c7f3b80325f3049580cb6cd282e59573a2c5f3ed5bb9389e29a0d4a689a1b84ef36e722d3ff620d89882743e56441b66da69582e SHA512 7c3a7fae1543ee80ee72f3d783d4089a5dcd572c7650aa393e273f219cabccc167ad2298efc7b8723787862f55ded18a85242ebf6c5c1d1ca3ce02726eadc32e +EBUILD OpenNI-9999.ebuild 2503 BLAKE2B a246fc2dcb574e9a9726a822b220a9258d4e7492eee1f512033b924b43556199ff5f9dff2336891e926f6bb91874a4bb0452b60849e4aa72bfa5a0b11dfb4c89 SHA512 c668a4786e46f12107a1452225bb9292af2c680ff9f7cadd9cc0bfd93afdbeab56cdadac57f4118bd289cc624c3af28f225cdba095ef5ca6c6e723758501cffd +MISC metadata.xml 337 BLAKE2B cd1617fea5ee8e8c5a39708ca2fe56342ac9bc77d7bd6a82ee1c2a3a81b16d5af8e4e90d916164fc9e998d523cfac65bdf5ea03e80e6e3f64c00a35bee310186 SHA512 31029665f81cf415898ab97a48804b3ddd5efae31f7800348a7b96dfd3a7faf1d4ae3275f039a8397040c6a3c83868252671ce1dcd35b6f1135d221b325ba5b8 diff --git a/dev-libs/OpenNI/OpenNI-1.5.7.10.ebuild b/dev-libs/OpenNI/OpenNI-1.5.7.10.ebuild new file mode 100644 index 000000000000..af12cd1ce875 --- /dev/null +++ b/dev-libs/OpenNI/OpenNI-1.5.7.10.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +SCM="" +if [ "${PV#9999}" != "${PV}" ] ; then + SCM="git-r3" + EGIT_REPO_URI="https://github.com/OpenNI/OpenNI" +fi + +inherit ${SCM} toolchain-funcs eutils multilib java-pkg-opt-2 + +if [ "${PV#9999}" != "${PV}" ] ; then + KEYWORDS="" + SRC_URI="" +else + KEYWORDS="~amd64 ~arm" + SRC_URI="https://github.com/OpenNI/OpenNI/archive/Stable-${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-Stable-${PV}" +fi + +DESCRIPTION="OpenNI SDK" +HOMEPAGE="https://github.com/OpenNI/OpenNI" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="doc java opengl" + +RDEPEND=" + virtual/libusb:1 + virtual/libudev + virtual/jpeg:0 + dev-libs/tinyxml + opengl? ( media-libs/freeglut !dev-libs/OpenNI2[opengl] ) + java? ( >=virtual/jre-1.5 ) +" +DEPEND="${RDEPEND} + dev-lang/python + doc? ( app-doc/doxygen ) + java? ( >=virtual/jdk-1.5 )" + +src_prepare() { + epatch \ + "${FILESDIR}/tinyxml.patch" \ + "${FILESDIR}/jpeg.patch" \ + "${FILESDIR}/soname.patch" \ + "${FILESDIR}/${P}-gcc6.patch" + + rm -rf External/{LibJPEG,TinyXml} + for i in Platform/Linux/Build/Common/Platform.* Externals/PSCommon/Linux/Build/Platform.* ; do + echo "" > ${i} + done + + find . -type f -print0 | xargs -0 sed -i "s:\".*/SamplesConfig.xml:\"${EPREFIX}/usr/share/${PN}/SamplesConfig.xml:" || die +} + +src_compile() { + emake -C "${S}/Platform/Linux/Build" \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + GLUT_SUPPORTED="$(usex opengl 1 0)" \ + $(usex java "" ALL_JAVA_PROJS="") \ + $(usex java "" JAVA_SAMPLES="") \ + ALL_MONO_PROJS="" \ + MONO_SAMPLES="" \ + MONO_FORMS_SAMPLES="" + + if use doc ; then + cd "${S}/Source/DoxyGen" + doxygen || die + fi +} + +src_install() { + dolib.so "${S}/Platform/Linux/Bin/"*Release/*.so + + insinto /usr/include/openni + doins -r Include/* + + dobin "${S}/Platform/Linux/Bin/"*Release/{ni*,Ni*,Sample-*} + + if use java ; then + java-pkg_dojar "${S}/Platform/Linux/Bin/"*Release/*.jar + echo "java -jar ${JAVA_PKG_JARDEST}/org.openni.Samples.SimpleViewer.jar" > org.openni.Samples.SimpleViewer + dobin org.openni.Samples.SimpleViewer + fi + + insinto /usr/share/${PN} + doins Data/* + + dodoc Documentation/OpenNI_UserGuide.pdf CHANGES NOTICE README + + if use doc ; then + dohtml -r "${S}/Source/DoxyGen/html/"* + dodoc Source/DoxyGen/Text/*.txt + fi + + keepdir /var/lib/ni +} + +pkg_postinst() { + if [ "${ROOT:-/}" = "/" ] ; then + for i in "${EROOR}/usr/$(get_libdir)"/libnim*.so ; do + einfo "Registering module ${i}" + niReg -r "${i}" + done + fi +} diff --git a/dev-libs/OpenNI/OpenNI-9999.ebuild b/dev-libs/OpenNI/OpenNI-9999.ebuild new file mode 100644 index 000000000000..79a0be764ee3 --- /dev/null +++ b/dev-libs/OpenNI/OpenNI-9999.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +SCM="" +if [ "${PV#9999}" != "${PV}" ] ; then + SCM="git-r3" + EGIT_REPO_URI="https://github.com/OpenNI/OpenNI" +fi + +inherit ${SCM} toolchain-funcs eutils multilib java-pkg-opt-2 + +if [ "${PV#9999}" != "${PV}" ] ; then + KEYWORDS="" + SRC_URI="" +else + KEYWORDS="~amd64 ~arm" + SRC_URI="https://github.com/OpenNI/OpenNI/archive/Stable-${PV}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-Stable-${PV}" +fi + +DESCRIPTION="OpenNI SDK" +HOMEPAGE="https://github.com/OpenNI/OpenNI" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="doc java opengl" + +RDEPEND=" + virtual/libusb:1 + virtual/libudev + virtual/jpeg:0 + dev-libs/tinyxml + opengl? ( media-libs/freeglut !dev-libs/OpenNI2[opengl] ) + java? ( >=virtual/jre-1.5 ) +" +DEPEND="${RDEPEND} + dev-lang/python + doc? ( app-doc/doxygen ) + java? ( >=virtual/jdk-1.5 )" + +src_prepare() { + epatch \ + "${FILESDIR}/tinyxml.patch" \ + "${FILESDIR}/jpeg.patch" \ + "${FILESDIR}/soname.patch" \ + "${FILESDIR}/${PN}-1.5.7.10-gcc6.patch" + + rm -rf External/{LibJPEG,TinyXml} + for i in Platform/Linux/Build/Common/Platform.* Externals/PSCommon/Linux/Build/Platform.* ; do + echo "" > ${i} + done + + find . -type f -print0 | xargs -0 sed -i "s:\".*/SamplesConfig.xml:\"${EPREFIX}/usr/share/${PN}/SamplesConfig.xml:" || die +} + +src_compile() { + emake -C "${S}/Platform/Linux/Build" \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + GLUT_SUPPORTED="$(usex opengl 1 0)" \ + $(usex java "" ALL_JAVA_PROJS="") \ + $(usex java "" JAVA_SAMPLES="") \ + ALL_MONO_PROJS="" \ + MONO_SAMPLES="" \ + MONO_FORMS_SAMPLES="" + + if use doc ; then + cd "${S}/Source/DoxyGen" + doxygen || die + fi +} + +src_install() { + dolib.so "${S}/Platform/Linux/Bin/"*Release/*.so + + insinto /usr/include/openni + doins -r Include/* + + dobin "${S}/Platform/Linux/Bin/"*Release/{ni*,Ni*,Sample-*} + + if use java ; then + java-pkg_dojar "${S}/Platform/Linux/Bin/"*Release/*.jar + echo "java -jar ${JAVA_PKG_JARDEST}/org.openni.Samples.SimpleViewer.jar" > org.openni.Samples.SimpleViewer + dobin org.openni.Samples.SimpleViewer + fi + + insinto /usr/share/${PN} + doins Data/* + + dodoc Documentation/OpenNI_UserGuide.pdf CHANGES NOTICE README + + if use doc ; then + dohtml -r "${S}/Source/DoxyGen/html/"* + dodoc Source/DoxyGen/Text/*.txt + fi + + keepdir /var/lib/ni +} + +pkg_postinst() { + if [ "${ROOT:-/}" = "/" ] ; then + for i in "${EROOR}/usr/$(get_libdir)"/libnim*.so ; do + einfo "Registering module ${i}" + niReg -r "${i}" + done + fi +} 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 diff --git a/dev-libs/OpenNI/metadata.xml b/dev-libs/OpenNI/metadata.xml new file mode 100644 index 000000000000..201349bea285 --- /dev/null +++ b/dev-libs/OpenNI/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>aballier@gentoo.org</email> + <name>Alexis Ballier</name> + </maintainer> + <upstream> + <remote-id type="github">OpenNI/OpenNI</remote-id> + </upstream> +</pkgmetadata> |