From c8e88da1b0ab4577de6ac18abc9e173ed6071e0e Mon Sep 17 00:00:00 2001 From: Andrew Savchenko Date: Mon, 24 Sep 2018 13:28:22 +0300 Subject: media-sound/apulse: fix the wrapper generation. - Fix the apulse wrapper generation. - Fix library paths inside apulse wrapper. - Fix typo in libpulse-simple.pc libdir. Closes: https://bugs.gentoo.org/666884 Signed-off-by: Andrew Savchenko Package-Manager: Portage-2.3.49, Repoman-2.3.10 --- media-sound/apulse/apulse-0.1.12-r2.ebuild | 60 ----------------------------- media-sound/apulse/apulse-0.1.12-r3.ebuild | 62 ++++++++++++++++++++++++++++++ media-sound/apulse/files/sdk.patch | 21 +++++----- 3 files changed, 73 insertions(+), 70 deletions(-) delete mode 100644 media-sound/apulse/apulse-0.1.12-r2.ebuild create mode 100644 media-sound/apulse/apulse-0.1.12-r3.ebuild diff --git a/media-sound/apulse/apulse-0.1.12-r2.ebuild b/media-sound/apulse/apulse-0.1.12-r2.ebuild deleted file mode 100644 index 4ecc9ab745bc..000000000000 --- a/media-sound/apulse/apulse-0.1.12-r2.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit multilib 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 ~x86" - -IUSE="debug sdk test" - -DEPEND="dev-libs/glib:2[${MULTILIB_USEDEP}] - media-libs/alsa-lib[${MULTILIB_USEDEP}] - sdk? ( !media-sound/pulseaudio ) " -RDEPEND="${DEPEND} - !!media-plugins/alsa-plugins[pulseaudio]" - -PATCHES=( "${FILESDIR}/sdk.patch" ) - -src_prepare() { - cmake-utils_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-utils_src_configure -} - -multilib_src_test() { - emake check -} - -multilib_src_install_all() { - cmake-utils_src_install - if ! use sdk; then - dobin "${T}"/apulse - export MULTILIB_CHOST_TOOLS=( /usr/bin/apulse ) - multilib_foreach_abi multilib_prepare_wrappers - multilib_install_wrappers - fi - einstalldocs -} diff --git a/media-sound/apulse/apulse-0.1.12-r3.ebuild b/media-sound/apulse/apulse-0.1.12-r3.ebuild new file mode 100644 index 000000000000..f934c4816be8 --- /dev/null +++ b/media-sound/apulse/apulse-0.1.12-r3.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit multilib 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 ~x86" + +IUSE="debug sdk test" + +DEPEND="dev-libs/glib:2[${MULTILIB_USEDEP}] + media-libs/alsa-lib[${MULTILIB_USEDEP}] + sdk? ( !media-sound/pulseaudio ) " +RDEPEND="${DEPEND} + !!media-plugins/alsa-plugins[pulseaudio]" + +PATCHES=( "${FILESDIR}/sdk.patch" ) + +src_prepare() { + cmake-utils_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-utils_src_configure +} + +multilib_src_test() { + emake check +} + +multilib_src_install() { + cmake-utils_src_install + if ! use sdk; then + export MULTILIB_CHOST_TOOLS=( /usr/bin/apulse ) + multilib_prepare_wrappers + fi +} + +multilib_src_install_all() { + use sdk || dobin "${T}/apulse" + einstalldocs +} diff --git a/media-sound/apulse/files/sdk.patch b/media-sound/apulse/files/sdk.patch index 90d3494344f3..bc12090b72e5 100644 --- a/media-sound/apulse/files/sdk.patch +++ b/media-sound/apulse/files/sdk.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 072f3b1..74fc184 100644 +index 072f3b1..5fe6bcd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,6 @@ @@ -18,17 +18,14 @@ index 072f3b1..74fc184 100644 link_directories(${REQ_LIBRARY_DIRS}) add_library(trace-helper STATIC -@@ -72,12 +75,31 @@ target_link_libraries(pulse-simple ${SYMBOLMAP} trace-helper ${REQ_LIBRARIES}) +@@ -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") +-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) - --install(FILES "${CMAKE_CURRENT_BINARY_DIR}/apulse" DESTINATION bin -- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +if (${INSTALL_SDK}) + set(APULSEPATH "${CMAKE_INSTALL_LIBDIR}" CACHE PATH "library installation directory") + @@ -40,13 +37,16 @@ index 072f3b1..74fc184 100644 + "${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) +-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) @@ -54,6 +54,7 @@ index 072f3b1..74fc184 100644 +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 @@ -72,11 +73,11 @@ index 0000000..957e3b2 +Requires: glib-2.0 diff --git a/pkgconfig/libpulse-simple.pc.in b/pkgconfig/libpulse-simple.pc.in new file mode 100644 -index 0000000..3809d50 +index 0000000..57d917f --- /dev/null +++ b/pkgconfig/libpulse-simple.pc.in @@ -0,0 +1,9 @@ -+libdir=@CMAKE_INSTALL_FULL__LIBDIR@ ++libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: libpulse-simple -- cgit v1.2.3-65-gdbad