public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Florian Schmaus" <flow@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/OpenNI/
Date: Sat, 01 Feb 2025 10:51:23 +0000 (UTC)	[thread overview]
Message-ID: <1738407045.eaec3cd47b054a268f01405fe25f0fe4b4258a57.flow@gentoo> (raw)

commit:     eaec3cd47b054a268f01405fe25f0fe4b4258a57
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  1 10:25:31 2025 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sat Feb  1 10:50:45 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eaec3cd4

dev-libs/OpenNI: improve ebuild: add missing die, use bash test builtin, …

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 dev-libs/OpenNI/OpenNI-1.5.7.10-r4.ebuild | 28 +++++++++++++---------------
 dev-libs/OpenNI/OpenNI-9999.ebuild        | 29 ++++++++++++++---------------
 2 files changed, 27 insertions(+), 30 deletions(-)

diff --git a/dev-libs/OpenNI/OpenNI-1.5.7.10-r4.ebuild b/dev-libs/OpenNI/OpenNI-1.5.7.10-r4.ebuild
index 953a8814d8d8..5bfdd8618663 100644
--- a/dev-libs/OpenNI/OpenNI-1.5.7.10-r4.ebuild
+++ b/dev-libs/OpenNI/OpenNI-1.5.7.10-r4.ebuild
@@ -3,17 +3,14 @@
 
 EAPI=8
 
-SCM=""
-if [ "${PV#9999}" != "${PV}" ] ; then
-	SCM="git-r3"
+if [[ ${PV} == 9999 ]]; then
+	inherit git-r3
 	EGIT_REPO_URI="https://github.com/OpenNI/OpenNI"
 fi
 
-inherit ${SCM} eapi9-pipestatus flag-o-matic java-pkg-opt-2 toolchain-funcs
+inherit eapi9-pipestatus flag-o-matic java-pkg-opt-2 toolchain-funcs
 
-if [ "${PV#9999}" != "${PV}" ] ; then
-	SRC_URI=""
-else
+if [[ ${PV} != 9999 ]]; then
 	KEYWORDS="amd64 ~arm"
 	SRC_URI="https://github.com/OpenNI/OpenNI/archive/Stable-${PV}.tar.gz -> ${P}.tar.gz"
 	S="${WORKDIR}/${PN}-Stable-${PV}"
@@ -58,7 +55,7 @@ src_prepare() {
 
 	rm -rf External/{LibJPEG,TinyXml}
 	for i in Platform/Linux/Build/Common/Platform.* Externals/PSCommon/Linux/Build/Platform.* ; do
-		echo "" > ${i}
+		echo "" > ${i} || die
 	done
 
 	local status
@@ -82,22 +79,23 @@ src_compile() {
 		MONO_FORMS_SAMPLES=""
 
 	if use doc ; then
-		cd "${S}/Source/DoxyGen"
+		cd Source/DoxyGen || die
 		doxygen || die
 	fi
 }
 
 src_install() {
-	dolib.so "${S}/Platform/Linux/Bin/"*Release/*.so
+	dolib.so Platform/Linux/Bin/*Release/*.so
 
 	insinto /usr/include/openni
 	doins -r Include/*
 
-	dobin "${S}/Platform/Linux/Bin/"*Release/{ni*,Ni*,Sample-*}
+	dobin 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
+		java-pkg_dojar Platform/Linux/Bin/*Release/*.jar
+		echo "java -jar ${JAVA_PKG_JARDEST}/org.openni.Samples.SimpleViewer.jar" \
+			 > org.openni.Samples.SimpleViewer || die
 		dobin org.openni.Samples.SimpleViewer
 	fi
 
@@ -108,7 +106,7 @@ src_install() {
 
 	if use doc ; then
 		docinto html
-		dodoc -r "${S}/Source/DoxyGen/html/"*
+		dodoc -r Source/DoxyGen/html/*
 		dodoc Source/DoxyGen/Text/*.txt
 	fi
 
@@ -116,7 +114,7 @@ src_install() {
 }
 
 pkg_postinst() {
-	if [ "${ROOT:-/}" = "/" ] ; then
+	if [[ "${ROOT:-/}" = "/" ]]; then
 		for i in "${EROOR}/usr/$(get_libdir)"/libnim*.so ; do
 			einfo "Registering module ${i}"
 			niReg -r "${i}"

diff --git a/dev-libs/OpenNI/OpenNI-9999.ebuild b/dev-libs/OpenNI/OpenNI-9999.ebuild
index 49cb5d355e76..df0ce9a54b7a 100644
--- a/dev-libs/OpenNI/OpenNI-9999.ebuild
+++ b/dev-libs/OpenNI/OpenNI-9999.ebuild
@@ -3,17 +3,14 @@
 
 EAPI=8
 
-SCM=""
-if [ "${PV#9999}" != "${PV}" ] ; then
-	SCM="git-r3"
+if [[ ${PV} == 9999 ]]; then
+	inherit git-r3
 	EGIT_REPO_URI="https://github.com/OpenNI/OpenNI"
 fi
 
-inherit ${SCM} eapi9-pipestatus flag-o-matic java-pkg-opt-2 toolchain-funcs
+inherit eapi9-pipestatus flag-o-matic java-pkg-opt-2 toolchain-funcs
 
-if [ "${PV#9999}" != "${PV}" ] ; then
-	SRC_URI=""
-else
+if [[ ${PV} != 9999 ]]; then
 	KEYWORDS="~amd64 ~arm"
 	SRC_URI="https://github.com/OpenNI/OpenNI/archive/Stable-${PV}.tar.gz -> ${P}.tar.gz"
 	S="${WORKDIR}/${PN}-Stable-${PV}"
@@ -57,9 +54,10 @@ src_prepare() {
 
 	rm -rf External/{LibJPEG,TinyXml}
 	for i in Platform/Linux/Build/Common/Platform.* Externals/PSCommon/Linux/Build/Platform.* ; do
-		echo "" > ${i}
+		echo "" > ${i} || die
 	done
 
+	local status
 	find . -type f -print0 |
 		xargs -0 sed -i "s:\".*/SamplesConfig.xml:\"${EPREFIX}/usr/share/${PN}/SamplesConfig.xml:"
 	status=$(pipestatus -v) || die "fails to sed SamplesConfig, (PIPESTATUS: ${status})"
@@ -80,22 +78,23 @@ src_compile() {
 		MONO_FORMS_SAMPLES=""
 
 	if use doc ; then
-		cd "${S}/Source/DoxyGen"
+		cd Source/DoxyGen || die
 		doxygen || die
 	fi
 }
 
 src_install() {
-	dolib.so "${S}/Platform/Linux/Bin/"*Release/*.so
+	dolib.so Platform/Linux/Bin/*Release/*.so
 
 	insinto /usr/include/openni
 	doins -r Include/*
 
-	dobin "${S}/Platform/Linux/Bin/"*Release/{ni*,Ni*,Sample-*}
+	dobin 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
+		java-pkg_dojar Platform/Linux/Bin/*Release/*.jar
+		echo "java -jar ${JAVA_PKG_JARDEST}/org.openni.Samples.SimpleViewer.jar" \
+			 > org.openni.Samples.SimpleViewer || die
 		dobin org.openni.Samples.SimpleViewer
 	fi
 
@@ -106,7 +105,7 @@ src_install() {
 
 	if use doc ; then
 		docinto html
-		dodoc -r "${S}/Source/DoxyGen/html/"*
+		dodoc -r Source/DoxyGen/html/*
 		dodoc Source/DoxyGen/Text/*.txt
 	fi
 
@@ -114,7 +113,7 @@ src_install() {
 }
 
 pkg_postinst() {
-	if [ "${ROOT:-/}" = "/" ] ; then
+	if [[ "${ROOT:-/}" = "/" ]]; then
 		for i in "${EROOR}/usr/$(get_libdir)"/libnim*.so ; do
 			einfo "Registering module ${i}"
 			niReg -r "${i}"


             reply	other threads:[~2025-02-01 10:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-01 10:51 Florian Schmaus [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-01 10:51 [gentoo-commits] repo/gentoo:master commit in: dev-libs/OpenNI/ Florian Schmaus
2025-02-01 10:51 Florian Schmaus
2022-07-17 15:39 Sam James
2022-05-19 12:12 Joonas Niilola
2021-07-08 10:42 Joonas Niilola
2021-07-08 10:42 Joonas Niilola
2019-09-25 17:31 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1738407045.eaec3cd47b054a268f01405fe25f0fe4b4258a57.flow@gentoo \
    --to=flow@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox