commit:     6b1862ce8b0615c257bfefc1f564ce36449aca97
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Tue Sep 16 23:51:51 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Sep 17 21:30:33 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b1862ce

media-sound/apulse: add 0.1.14

Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Part-of: https://github.com/gentoo/gentoo/pull/43822
Closes: https://github.com/gentoo/gentoo/pull/43822
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-sound/apulse/Manifest               |   1 +
 media-sound/apulse/apulse-0.1.14.ebuild   |  66 +++++++++++++++++++
 media-sound/apulse/files/sdk-0.1.14.patch | 102 ++++++++++++++++++++++++++++++
 3 files changed, 169 insertions(+)

diff --git a/media-sound/apulse/Manifest b/media-sound/apulse/Manifest
index a66d0db1ba25..753382d4acd9 100644
--- a/media-sound/apulse/Manifest
+++ b/media-sound/apulse/Manifest
@@ -1 +1,2 @@
 DIST apulse-0.1.13.tar.gz 117369 BLAKE2B 
8cf527daf21420a72e46968a3b07ab61029f404a2b6574ac1f08dd40528f3e6e4baf7e38f5914b0c89252e16eec5e8f3722be51e5a61b6a71c683e994740b4bf
 SHA512 
366385ae2304f7ff697ba70951d0753a5b1630310922e3763fd0813a73e0b4088b715135295aa2fa9111b8edcf91d82849dc31346b292b2e9db598bcdd47b007
+DIST apulse-0.1.14.tar.gz 117483 BLAKE2B 
821abf271b58aeda9cdf387bb08db35b565767d50f21695d904cfd5af7d30815f95ce5516a760a34f0e0b3e86405c2bf0d640cc3ea0e9554b3f912e64ebd22d3
 SHA512 
7084145c89fb1728a3d041ce66386ab06decc7fd4a721ca8cc3e713b548daba0b2c076d2a5be64dc749cb0250270e8045aee1dc7193bc5e76268ba76fa359f09

diff --git a/media-sound/apulse/apulse-0.1.14.ebuild 
b/media-sound/apulse/apulse-0.1.14.ebuild
new file mode 100644
index 000000000000..dd45ec5ef5cb
--- /dev/null
+++ b/media-sound/apulse/apulse-0.1.14.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib
+
+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-0.1.14.patch"
+       "${FILESDIR}/check-key-before-remove.patch"
+       "${FILESDIR}/man.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/sdk-0.1.14.patch 
b/media-sound/apulse/files/sdk-0.1.14.patch
new file mode 100644
index 000000000000..0152d1b6860a
--- /dev/null
+++ b/media-sound/apulse/files/sdk-0.1.14.patch
@@ -0,0 +1,102 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 072f3b1..5fe6bcd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,5 @@
+ project(apulse)
++include(GNUInstallDirs)
+ 
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -fPIC 
-fvisibility=hidden")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration")
+@@ -28,6 +29,8 @@ else()
+     include_directories(${PA_INCLUDE_DIRECTORIES})
+ endif()
+ 
++set(INSTALL_SDK 0 CACHE BOOLEAN "Install SDK files to build applications with 
apulse (Pulse Audio headers and pkg-config files) instead of system ones")
++
+ link_directories(${REQ_LIBRARY_DIRS})
+ 
+ add_library(trace-helper STATIC
+@@ -72,12 +75,30 @@ target_link_libraries(pulse-simple ${SYMBOLMAP} 
trace-helper ${REQ_LIBRARIES})
+ 
+ add_subdirectory(tests)
+ 
+-set(APULSEPATH "${CMAKE_INSTALL_PREFIX}/lib/apulse" CACHE PATH "library 
installation directory")
+-set(APULSE_SEARCH_PATHS "${APULSEPATH}" CACHE PATH "directory list for 
LD_LIBRARY_PATH")
+-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/apulse.template"
+-               "${CMAKE_CURRENT_BINARY_DIR}/apulse" @ONLY)
++if (${INSTALL_SDK})
++    set(APULSEPATH "${CMAKE_INSTALL_LIBDIR}" CACHE PATH "library installation 
directory")
++
++    configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig/libpulse.pc.in"
++                   "${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/libpulse.pc" @ONLY)
++    
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig/libpulse-simple.pc.in"
++                   "${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/libpulse-simple.pc" 
@ONLY)
++    
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig/libpulse-mainloop-glib.pc.in"
++                   
"${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/libpulse-mainloop-glib.pc" @ONLY)
++else()
++    set(APULSEPATH "${CMAKE_INSTALL_LIBDIR}/apulse" CACHE PATH "library 
installation directory")
++    set(APULSE_SEARCH_PATHS "${CMAKE_INSTALL_PREFIX}/${APULSEPATH}" CACHE 
PATH "directory list for LD_LIBRARY_PATH")
++
++    configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/apulse.template"
++                   "${CMAKE_CURRENT_BINARY_DIR}/apulse" @ONLY)
++endif()
+ 
+-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/apulse" DESTINATION bin
+-        PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ 
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+ install(TARGETS pulse-simple pulse pulse-mainloop-glib DESTINATION 
"${APULSEPATH}")
+-install(FILES "${CMAKE_SOURCE_DIR}/man/apulse.1" DESTINATION share/man/man1)
++
++if (${INSTALL_SDK})
++    install(DIRECTORY "${CMAKE_SOURCE_DIR}/3rdparty/pulseaudio-headers/pulse" 
DESTINATION include)
++    install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/pkgconfig" DESTINATION 
"${CMAKE_INSTALL_LIBDIR}")
++else()
++    install(FILES "${CMAKE_CURRENT_BINARY_DIR}/apulse" DESTINATION bin
++            PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ 
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
++    install(FILES "${CMAKE_SOURCE_DIR}/man/apulse.1" DESTINATION 
share/man/man1)
++endif()
+diff --git a/pkgconfig/libpulse-mainloop-glib.pc.in 
b/pkgconfig/libpulse-mainloop-glib.pc.in
+new file mode 100644
+index 0000000..957e3b2
+--- /dev/null
++++ b/pkgconfig/libpulse-mainloop-glib.pc.in
+@@ -0,0 +1,9 @@
++libdir=@CMAKE_INSTALL_FULL_LIBDIR@
++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
++
++Name: libpulse-mainloop-glib
++Description: PulseAudio GLib 2.0 Main Loop Wrapper (apulse)
++Version: 5.0
++Libs: -L${libdir} -lpulse-mainloop-glib -pthread
++Cflags: -I${includedir}
++Requires: glib-2.0
+diff --git a/pkgconfig/libpulse-simple.pc.in b/pkgconfig/libpulse-simple.pc.in
+new file mode 100644
+index 0000000..57d917f
+--- /dev/null
++++ b/pkgconfig/libpulse-simple.pc.in
+@@ -0,0 +1,9 @@
++libdir=@CMAKE_INSTALL_FULL_LIBDIR@
++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
++
++Name: libpulse-simple
++Description: PulseAudio Simplified Synchronous Client Interface (apulse)
++Version: 5.0
++Libs: -L${libdir} -lpulse-simple -pthread
++Cflags: -I${includedir}
++Requires: glib-2.0
+diff --git a/pkgconfig/libpulse.pc.in b/pkgconfig/libpulse.pc.in
+new file mode 100644
+index 0000000..edcbbd8
+--- /dev/null
++++ b/pkgconfig/libpulse.pc.in
+@@ -0,0 +1,9 @@
++libdir=@CMAKE_INSTALL_FULL_LIBDIR@
++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
++
++Name: libpulse
++Description: PulseAudio Client Interface (apulse)
++Version: 5.0
++Libs: -L${libdir} -lpulse -pthread
++Cflags: -I${includedir}
++Requires: glib-2.0 alsa

Reply via email to