commit: cd9c4fdf1c6ee549c5a19c43bea65aca7d1c5dec Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org> AuthorDate: Thu Apr 17 22:19:38 2025 +0000 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> CommitDate: Sat Apr 19 15:47:35 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd9c4fdf
media-sound/apulse: fix build with cmake 4 Closes: https://bugs.gentoo.org/953973 Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org> Closes: https://github.com/gentoo/gentoo/pull/41637 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> media-sound/apulse/apulse-0.1.13-r4.ebuild | 68 ++++++++++++++++++++++ .../apulse/files/apulse-0.1.13-cmakever.patch | 11 ++++ 2 files changed, 79 insertions(+) diff --git a/media-sound/apulse/apulse-0.1.13-r4.ebuild b/media-sound/apulse/apulse-0.1.13-r4.ebuild new file mode 100644 index 000000000000..21429f6aed09 --- /dev/null +++ b/media-sound/apulse/apulse-0.1.13-r4.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib multiprocessing + +DESCRIPTION="PulseAudio emulation for ALSA" +HOMEPAGE="https://github.com/i-rinat/apulse" +SRC_URI="https://github.com/i-rinat/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~x86" + +IUSE="debug sdk test" +RESTRICT="!test? ( test )" + +DEPEND="dev-libs/glib:2[${MULTILIB_USEDEP}] + media-libs/alsa-lib[${MULTILIB_USEDEP}] + sdk? ( !media-libs/libpulse !media-sound/pulseaudio ) " +RDEPEND="${DEPEND} + !media-plugins/alsa-plugins[pulseaudio]" + +PATCHES=( + "${FILESDIR}/sdk.patch" + "${FILESDIR}/check-key-before-remove.patch" + "${FILESDIR}/man.patch" + "${FILESDIR}/apulse-0.1.13-libgen.patch" + "${FILESDIR}/apulse-0.1.13-cmakever.patch" +) + +src_prepare() { + cmake_src_prepare + + if ! use sdk; then + # Ensure all relevant libdirs are added, to support all ABIs + DIRS= + _add_dir() { DIRS="${EPREFIX}/usr/$(get_libdir)/apulse${DIRS:+:${DIRS}}"; } + multilib_foreach_abi _add_dir + sed -e "s#@@DIRS@@#${DIRS}#g" "${FILESDIR}"/apulse > "${T}"/apulse || die + fi +} + +multilib_src_configure() { + local mycmakeargs=( + "-DINSTALL_SDK=$(usex sdk)" + "-DLOG_TO_STDERR=$(usex debug)" + "-DWITH_TRACE=$(usex debug)" + ) + cmake_src_configure +} + +multilib_src_test() { + _test() { + cmake --build . --target check + } + multilib_foreach_abi _test +} + +multilib_src_install_all() { + if ! use sdk; then + _install_wrapper() { newbin "${BUILD_DIR}/apulse" "${CHOST}-apulse"; } + multilib_foreach_abi _install_wrapper + dobin "${T}/apulse" + fi + einstalldocs +} diff --git a/media-sound/apulse/files/apulse-0.1.13-cmakever.patch b/media-sound/apulse/files/apulse-0.1.13-cmakever.patch new file mode 100644 index 000000000000..57adf2cdc12b --- /dev/null +++ b/media-sound/apulse/files/apulse-0.1.13-cmakever.patch @@ -0,0 +1,11 @@ +https://github.com/i-rinat/apulse/pull/128 +https://bugs.gentoo.org/953973 + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ + project(apulse) +-cmake_minimum_required (VERSION 2.8) ++cmake_minimum_required (VERSION 2.8...4.0) + + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -fPIC -fvisibility=hidden")
