I believe pulseaudio should be optional: https://github.com/aws/aws-sdk-cpp/blob/bba3cfc14d4fc148aeee7a8ff7822dd7a9a0f4d3/src/aws-cpp-sdk-text-to-speech/CMakeLists.txt#L22
Created attachment 261076 [details] Add PULSEAUDIO option I have tested with default options, which maintains pulseaudio dependency as expected. I've also tested it with PULSEAUDIO unset, which disables the pulseaudio dependency. Does PORTREVISION need to be updated? At first I thought no, because the default behavior is unchanged. However, anyone with a global OPTIONS_UNSET=PULSEAUDIO may actually want this to be rebuilt automatically.
PULSEAUDIO_VARS= LIB_DEPENDS+=libpulse.so:audio/pulseaudio Why not: PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio ? Also I see "silent grab" here: what if audio/pulseaudio is installed on host, but build with option off?
(In reply to Vladimir Druzenko from comment #2) > PULSEAUDIO_VARS= LIB_DEPENDS+=libpulse.so:audio/pulseaudio > Why not: > PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio Because I wasn't aware of LIB_DEPENDS until now. > Also I see "silent grab" here: what if audio/pulseaudio is installed on host, but build with option off? Good point. I am using this in a poudriere context and so hadn't considered that. I'm unfamiliar with CMake, and it's unclear to me how to explicitly disable this option. As you point out, it appears to be pulled in automatically by the mere presense of pulseaudio. Any ideas?
(In reply to Pat Maddox from comment #0) ``` else() ... If you are providing your own audio implementation or you will not be using the text-to-speech library, this is fine. However, if you are not providing your own implementation and you want to use text-to-speech, you need to install the dev files for pulseAudio. ``` Also port permits build specific modules too, e.g.: `make BUILD_ONLY=\"s3;ec2;route53\` We need to check if it works that way too.
(In reply to Pat Maddox from comment #3) > I'm unfamiliar with CMake, and it's unclear to me how to explicitly disable > this option. As you point out, it appears to be pulled in automatically by the > mere presense of pulseaudio. Any ideas? https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html#cmake-disable-find-package-packagename
Adding a reference to https://reviews.freebsd.org/D50827 as the SDK will autodetect pulseaudio if present on the system, so I had to make a quick patch.