media-sound/pulseaudio-modules-bt: add USE flags
authorPablo Cholaky <waltercool@slash.cl>
Mon, 23 Mar 2020 05:17:28 +0000 (01:17 -0400)
committerJason A. Donenfeld <zx2c4@gentoo.org>
Wed, 1 Apr 2020 05:33:17 +0000 (23:33 -0600)
Closes: https://bugs.gentoo.org/713878
Signed-off-by: Pablo Cholaky <waltercool@slash.cl>
Signed-off-by: Jason A. Donenfeld <zx2c4@gentoo.org>
media-sound/pulseaudio-modules-bt/metadata.xml
media-sound/pulseaudio-modules-bt/pulseaudio-modules-bt-1.3-r1.ebuild [moved from media-sound/pulseaudio-modules-bt/pulseaudio-modules-bt-1.3.ebuild with 76% similarity]
media-sound/pulseaudio-modules-bt/pulseaudio-modules-bt-9999.ebuild

index c6a40a7b9cb48187159f6bcf75487b8ca2e01c03..ecdf5fddd6d76528f47601235496320f2c285324 100644 (file)
@@ -1,10 +1,27 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-<maintainer type="person">
-       <email>zx2c4@gentoo.org</email>
-</maintainer>
-<maintainer type="person">
-       <email>pacho@gentoo.org</email>
-</maintainer>
+       <maintainer type="person">
+               <email>zx2c4@gentoo.org</email>
+       </maintainer>
+       <maintainer type="person">
+               <email>pacho@gentoo.org</email>
+       </maintainer>
+       <use>
+               <flag name="fdk">
+               AAC encoding support using media-libs/fdk-aac
+               </flag>
+               <flag name="ffmpeg">
+               APTX, APTX-HD encoding support
+               </flag>
+               <flag name="ldac">
+               LDAC encoding support, using media-libs/libldac
+               </flag>
+               <flag name="native-headset">
+               Build with native HSP (Headset Profile) headset for bluez 5
+               </flag>
+               <flag name="ofono-headset">
+               Build with oFono HFP (Hands Free Profile) headset for bluez 5, requires net-misc/ofono.
+               </flag>
+       </use>
 </pkgmetadata>
similarity index 76%
rename from media-sound/pulseaudio-modules-bt/pulseaudio-modules-bt-1.3.ebuild
rename to media-sound/pulseaudio-modules-bt/pulseaudio-modules-bt-1.3-r1.ebuild
index 72132d0bcd33d9c4c92ad96da12b76e30f47522a..22faf22ec86d754013597325c860d8ae35603e94 100644 (file)
@@ -16,16 +16,16 @@ SRC_URI="
 LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS="~amd64"
-IUSE=""
+IUSE="fdk +ffmpeg +ldac +native-headset ofono-headset"
 
 DEPEND="
-       media-libs/fdk-aac:0=
-       virtual/ffmpeg
+       fdk? ( media-libs/fdk-aac:0= )
+       ffmpeg? ( virtual/ffmpeg )
        media-libs/sbc
-       media-libs/libldac
+       ldac? ( media-libs/libldac )
        >=net-wireless/bluez-5
        >=sys-apps/dbus-1.0.0
-       >=net-misc/ofono-1.13
+       ofono-headset? ( >=net-misc/ofono-1.13 )
        >=media-sound/pulseaudio-${PULSE_VER}[-bluetooth]
 "
 # Ordinarily media-libs/libldac should be in DEPEND too, but for now upstream repo is using a ldac submodule instead.
@@ -53,6 +53,18 @@ load-module module-bluetooth-discover
 .endif
 "
 
+src_configure() {
+       local mycmakeargs=(
+               -DCODEC_AAC_FDK=$(usex fdk "ON" "OFF")
+               -DCODEC_APTX_FF=$(usex ffmpeg "ON" "OFF")
+               -DCODEC_APTX_HD_FF=$(usex ffmpeg "ON" "OFF")
+               -DCODEC_LDAC=$(usex ldac "ON" "OFF")
+               -DNATIVE_HEADSET=$(usex native-headset "ON" "OFF")
+               -DOFONO_HEADSET=$(usex ofono-headset "ON" "OFF")
+       )
+       cmake-utils_src_configure
+}
+
 src_prepare() {
        cmake-utils_src_prepare
 
index 4dbb99143961c12753bde31b6ff66bf78a0ae5c9..8b8e74ca04f789474253678f4c02922eed0f78ee 100644 (file)
@@ -17,16 +17,16 @@ EGIT_OVERRIDE_COMMIT_PULSEAUDIO_PULSEAUDIO="v13.0"
 LICENSE="GPL-3"
 SLOT="0"
 KEYWORDS=""
-IUSE=""
+IUSE="fdk +ffmpeg +ldac +native-headset ofono-headset"
 
 DEPEND="
-       media-libs/fdk-aac:0=
-       virtual/ffmpeg
+       fdk? ( media-libs/fdk-aac:0= )
+       ffmpeg? ( virtual/ffmpeg )
        media-libs/sbc
-       media-libs/libldac
+       ldac? ( media-libs/libldac )
        >=net-wireless/bluez-5
        >=sys-apps/dbus-1.0.0
-       >=net-misc/ofono-1.13
+       ofono-headset? ( >=net-misc/ofono-1.13 )
        >=media-sound/pulseaudio-13[-bluetooth]
 "
 # Ordinarily media-libs/libldac should be in DEPEND too, but for now upstream repo is using a ldac submodule instead.
@@ -55,6 +55,18 @@ load-module module-bluetooth-discover
 .endif
 "
 
+src_configure() {
+       local mycmakeargs=(
+               -DCODEC_AAC_FDK=$(usex fdk "ON" "OFF")
+               -DCODEC_APTX_FF=$(usex ffmpeg "ON" "OFF")
+               -DCODEC_APTX_HD_FF=$(usex ffmpeg "ON" "OFF")
+               -DCODEC_LDAC=$(usex ldac "ON" "OFF")
+               -DNATIVE_HEADSET=$(usex native-headset "ON" "OFF")
+               -DOFONO_HEADSET=$(usex ofono-headset "ON" "OFF")
+       )
+       cmake-utils_src_configure
+}
+
 src_install() {
        cmake-utils_src_install
        readme.gentoo_create_doc