mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-03 04:37:06 -08:00
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
109 lines
2.4 KiB
Bash
109 lines
2.4 KiB
Bash
# Copyright 1999-2015 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Id$
|
|
|
|
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"
|
|
|
|
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
|
|
}
|