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)" \