public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/OpenNI2/
Date: Sun, 15 Jan 2023 21:50:03 +0000 (UTC)	[thread overview]
Message-ID: <1673819397.a7713d3db8cfaf20ad059849f859785bb91e2584.sam@gentoo> (raw)

commit:     a7713d3db8cfaf20ad059849f859785bb91e2584
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 15 21:47:00 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 15 21:49:57 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7713d3d

dev-libs/OpenNI2: fix build w/ musl

Upstream don't do any sort of configure-time detection for functionality,
but conveniently, they do provide macros to let us disable use of <execinfo.h>
and glibc internals like __sched_param (ew).

(Use append-flags rather than cppflags because OpenNI2 is already on life-support
in my view and I don't really want to have to add even more patches to fix
the build system...)

Closes: https://bugs.gentoo.org/716346
Thanks-to: Waiting for the Rain
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/OpenNI2/OpenNI2-2.2_beta2-r1.ebuild | 10 ++++++++--
 dev-libs/OpenNI2/OpenNI2-9999.ebuild         |  8 +++++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/dev-libs/OpenNI2/OpenNI2-2.2_beta2-r1.ebuild b/dev-libs/OpenNI2/OpenNI2-2.2_beta2-r1.ebuild
index 13ddc4a27916..cb6ab6415daa 100644
--- a/dev-libs/OpenNI2/OpenNI2-2.2_beta2-r1.ebuild
+++ b/dev-libs/OpenNI2/OpenNI2-2.2_beta2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -9,7 +9,7 @@ if [ "${PV#9999}" != "${PV}" ] ; then
 	EGIT_REPO_URI="https://github.com/occipital/openni2"
 fi
 
-inherit ${SCM} toolchain-funcs java-pkg-opt-2
+inherit ${SCM} flag-o-matic toolchain-funcs java-pkg-opt-2
 
 if [ "${PV#9999}" != "${PV}" ] ; then
 	SRC_URI=""
@@ -54,6 +54,12 @@ src_prepare() {
 }
 
 src_compile() {
+	if use elibc_glibc ; then
+		# Build system doesn't respect CPPFLAGS.
+		# bug #716346
+		append-flags -DXN_PLATFORM_LINUX_NO_GLIBC -DXN_PLATFORM_HAS_NO_SCHED_PARAM
+	fi
+
 	use cpu_flags_arm_neon && export CFLAGS="${CFLAGS} -DXN_NEON"
 	emake \
 		CC="$(tc-getCC)" \

diff --git a/dev-libs/OpenNI2/OpenNI2-9999.ebuild b/dev-libs/OpenNI2/OpenNI2-9999.ebuild
index ffd87acd6445..dafb9834ae95 100644
--- a/dev-libs/OpenNI2/OpenNI2-9999.ebuild
+++ b/dev-libs/OpenNI2/OpenNI2-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -52,6 +52,12 @@ src_prepare() {
 }
 
 src_compile() {
+	if use elibc_glibc ; then
+		# Build system doesn't respect CPPFLAGS.
+		# bug #716346
+		append-flags -DXN_PLATFORM_LINUX_NO_GLIBC -DXN_PLATFORM_HAS_NO_SCHED_PARAM
+	fi
+
 	use cpu_flags_arm_neon && export CFLAGS="${CFLAGS} -DXN_NEON"
 	emake \
 		CC="$(tc-getCC)" \


             reply	other threads:[~2023-01-15 21:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-15 21:50 Sam James [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/OpenNI2/ Florian Schmaus
2025-02-01 10:51 Florian Schmaus
2025-02-01 10:51 Florian Schmaus
2023-01-15 21:51 Sam James
2022-07-15  7:58 David Seifert
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
2018-02-22 20:19 Alexis Ballier
2017-01-29  9:12 David Seifert

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=1673819397.a7713d3db8cfaf20ad059849f859785bb91e2584.sam@gentoo \
    --to=sam@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