diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2021-06-24 17:13:10 +0200 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2021-07-08 13:42:18 +0300 |
commit | 1aa58ef166e215fabe14931238a80bfc3a728ff0 (patch) | |
tree | 6e6109d579e7b04b536190f47cf81ae1af6c216e /dev-libs/OpenNI | |
parent | dev-python/graph-tool: drop 2.41 (diff) | |
download | gentoo-1aa58ef166e215fabe14931238a80bfc3a728ff0.tar.gz gentoo-1aa58ef166e215fabe14931238a80bfc3a728ff0.tar.bz2 gentoo-1aa58ef166e215fabe14931238a80bfc3a728ff0.zip |
dev-libs/OpenNI: min java 1.8:*
Bug: https://bugs.gentoo.org/787359
Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-libs/OpenNI')
-rw-r--r-- | dev-libs/OpenNI/OpenNI-1.5.7.10-r2.ebuild | 111 | ||||
-rw-r--r-- | dev-libs/OpenNI/OpenNI-9999.ebuild | 24 |
2 files changed, 125 insertions, 10 deletions
diff --git a/dev-libs/OpenNI/OpenNI-1.5.7.10-r2.ebuild b/dev-libs/OpenNI/OpenNI-1.5.7.10-r2.ebuild new file mode 100644 index 000000000000..fcd54b00b17a --- /dev/null +++ b/dev-libs/OpenNI/OpenNI-1.5.7.10-r2.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +SCM="" +if [ "${PV#9999}" != "${PV}" ] ; then + SCM="git-r3" + EGIT_REPO_URI="https://github.com/OpenNI/OpenNI" +fi + +inherit ${SCM} toolchain-funcs multilib java-pkg-opt-2 + +if [ "${PV#9999}" != "${PV}" ] ; then + 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.8 ) +" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen ) + java? ( virtual/jdk:1.8 )" + +PATCHES=( + "${FILESDIR}/tinyxml.patch" + "${FILESDIR}/jpeg.patch" + "${FILESDIR}/soname.patch" + "${FILESDIR}/${P}-gcc6.patch" + "${FILESDIR}/betterdefines.patch" +) + +src_prepare() { + default + + 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 + docinto html + dodoc -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 index aef879f68ea5..0febb7dba0b7 100644 --- a/dev-libs/OpenNI/OpenNI-9999.ebuild +++ b/dev-libs/OpenNI/OpenNI-9999.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 SCM="" if [ "${PV#9999}" != "${PV}" ] ; then @@ -9,7 +9,7 @@ if [ "${PV#9999}" != "${PV}" ] ; then EGIT_REPO_URI="https://github.com/OpenNI/OpenNI" fi -inherit ${SCM} toolchain-funcs epatch multilib java-pkg-opt-2 +inherit ${SCM} toolchain-funcs multilib java-pkg-opt-2 if [ "${PV#9999}" != "${PV}" ] ; then SRC_URI="" @@ -31,18 +31,21 @@ RDEPEND=" virtual/jpeg:0 dev-libs/tinyxml opengl? ( media-libs/freeglut !dev-libs/OpenNI2[opengl] ) - java? ( >=virtual/jre-1.5 ) + java? ( virtual/jre:1.8 ) " DEPEND="${RDEPEND} doc? ( app-doc/doxygen ) - java? ( >=virtual/jdk-1.5 )" + java? ( virtual/jdk:1.8 )" + +PATCHES=( + "${FILESDIR}/tinyxml.patch" + "${FILESDIR}/jpeg.patch" + "${FILESDIR}/soname.patch" + "${FILESDIR}/${PN}-1.5.7.10-gcc6.patch" +) src_prepare() { - epatch \ - "${FILESDIR}/tinyxml.patch" \ - "${FILESDIR}/jpeg.patch" \ - "${FILESDIR}/soname.patch" \ - "${FILESDIR}/${PN}-1.5.7.10-gcc6.patch" + default rm -rf External/{LibJPEG,TinyXml} for i in Platform/Linux/Build/Common/Platform.* Externals/PSCommon/Linux/Build/Platform.* ; do @@ -89,7 +92,8 @@ src_install() { dodoc Documentation/OpenNI_UserGuide.pdf CHANGES NOTICE README if use doc ; then - dohtml -r "${S}/Source/DoxyGen/html/"* + docinto html + dodoc -r "${S}/Source/DoxyGen/html/"* dodoc Source/DoxyGen/Text/*.txt fi |