diff options
author | Sam James <sam@gentoo.org> | 2023-01-15 21:47:00 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-01-15 21:49:57 +0000 |
commit | a7713d3db8cfaf20ad059849f859785bb91e2584 (patch) | |
tree | a4c6fffb4c354d6fc92019b73d36f1ceade06d5e /dev-libs/OpenNI2 | |
parent | games-roguelike/stone-soup: explain why so many slots are maintained (diff) | |
download | gentoo-a7713d3db8cfaf20ad059849f859785bb91e2584.tar.gz gentoo-a7713d3db8cfaf20ad059849f859785bb91e2584.tar.bz2 gentoo-a7713d3db8cfaf20ad059849f859785bb91e2584.zip |
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@gentoo.org>
Diffstat (limited to 'dev-libs/OpenNI2')
-rw-r--r-- | dev-libs/OpenNI2/OpenNI2-2.2_beta2-r1.ebuild | 10 | ||||
-rw-r--r-- | 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)" \ |