Bug 287370 - devel/aws-sdk-cpp: Add PULSEAUDIO option
Summary: devel/aws-sdk-cpp: Add PULSEAUDIO option
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Nuno Teixeira
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-08 00:40 UTC by Pat Maddox
Modified: 2025-06-14 09:34 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (eduardo)


Attachments
Add PULSEAUDIO option (1.04 KB, patch)
2025-06-08 01:12 UTC, Pat Maddox
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Pat Maddox 2025-06-08 01:12:01 UTC
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.
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2025-06-08 02:01:21 UTC
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?
Comment 3 Pat Maddox 2025-06-08 03:13:54 UTC
(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?
Comment 4 Nuno Teixeira freebsd_committer freebsd_triage 2025-06-08 11:08:00 UTC
(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.
Comment 5 Nuno Teixeira freebsd_committer freebsd_triage 2025-06-08 20:24:07 UTC
(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
Comment 6 Jimmy Olgeni freebsd_committer freebsd_triage 2025-06-14 09:34:58 UTC
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.