summaryrefslogtreecommitdiff
path: root/media-libs/cubeb/cubeb-0.2_p20231121.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-11-28 16:53:39 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-11-28 16:53:39 +0000
commitb35600c999baee29d87c2748f7207ce79ca87067 (patch)
treec2724e0a74f5c08fb608a856be4b111e2a380c2d /media-libs/cubeb/cubeb-0.2_p20231121.ebuild
parent3e690338421a6b64f6f44aa03db7416d75e0633a (diff)
gentoo auto-resync : 28:11:2023 - 16:53:39
Diffstat (limited to 'media-libs/cubeb/cubeb-0.2_p20231121.ebuild')
-rw-r--r--media-libs/cubeb/cubeb-0.2_p20231121.ebuild83
1 files changed, 83 insertions, 0 deletions
diff --git a/media-libs/cubeb/cubeb-0.2_p20231121.ebuild b/media-libs/cubeb/cubeb-0.2_p20231121.ebuild
new file mode 100644
index 000000000000..f743f23e580c
--- /dev/null
+++ b/media-libs/cubeb/cubeb-0.2_p20231121.ebuild
@@ -0,0 +1,83 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+HASH_CUBEB=54217bca3f3e0cd53c073690a23dd25d83557909
+
+DESCRIPTION="Cross-platform audio library"
+HOMEPAGE="https://github.com/mozilla/cubeb/"
+SRC_URI="
+ https://github.com/mozilla/cubeb/archive/${HASH_CUBEB}.tar.gz
+ -> ${P}.tar.gz
+"
+S=${WORKDIR}/${PN}-${HASH_CUBEB}
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="alsa doc jack pulseaudio sndio test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ media-libs/speexdsp
+ alsa? ( media-libs/alsa-lib )
+ jack? ( virtual/jack )
+ pulseaudio? ( media-libs/libpulse )
+ sndio? ( media-sound/sndio:= )
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-cpp/gtest )
+"
+BDEPEND="doc? ( app-doc/doxygen )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.2_p20231121-automagic.patch
+)
+
+CMAKE_SKIP_TESTS=(
+ # need access to real audio devices, and without sandbox
+ audio
+ callback_ret
+ devices
+ latency
+ sanity
+ tone
+ # fragile unless all backends are enabled
+ device_changed_callback
+ duplex
+ record
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ # test currently does not build unless use static libs
+ sed -i '/cubeb_add_test(logging)/d' CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_RUST_LIBS=no # leaving out unless becomes really needed
+ -DBUILD_TESTS=$(usex test)
+ -DBUILD_TOOLS=no # semi-broken without most backends and not needed
+ -DCHECK_ALSA=$(usex alsa)
+ -DCHECK_JACK=$(usex jack)
+ -DCHECK_PULSE=$(usex pulseaudio)
+ -DCHECK_SNDIO=$(usex sndio)
+ -DLAZY_LOAD_LIBS=no
+ -DUSE_SANITIZERS=no
+ $(cmake_use_find_package doc Doxygen)
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+
+ use doc && dodoc -r "${BUILD_DIR}"/docs/html
+}