Bug 297173 - audio/sox: Fails to package if no sound options are set
Summary: audio/sox: Fails to package if no sound options are set
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Craig Leres
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-07-30 18:23 UTC by Craig Leres
Modified: 2026-07-30 22:55 UTC (History)
2 users (show)

See Also:
dnelson_1901: maintainer-feedback+


Attachments
patch (1.14 KB, patch)
2026-07-30 18:24 UTC, Craig Leres
no flags Details | Diff
revised patch (1.15 KB, patch)
2026-07-30 20:29 UTC, Craig Leres
no flags Details | Diff
revised patch #2 (1.15 KB, text/plain)
2026-07-30 20:32 UTC, Craig Leres
dnelson: maintainer-approval+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Leres freebsd_committer freebsd_triage 2026-07-30 18:23:49 UTC
When SYMLINK is enable "install" only creates the play and rec symlinks if no audio devices are selected:

    case ${enable_symlinks:=yes} in #(
      yes) :

        SYMLINKS=soxi
        if test -n "$sox_devices"
    then :
      SYMLINKS="$SYMLINKS play rec"
    fi ;; #(
      *) :
         ;;
    esac

While this might be an odd configuration, the sox build setup allows it so the port should as well.

Here's a quick patch.
Comment 1 Craig Leres freebsd_committer freebsd_triage 2026-07-30 18:24:45 UTC
Created attachment 273321 [details]
patch
Comment 2 Dan Nelson 2026-07-30 18:56:46 UTC
That looks reasonable, except I'm not sure about using a # symbol to remove a line in the plist.  The documented way is to set the variable to "@comment " .
Comment 3 Craig Leres freebsd_committer freebsd_triage 2026-07-30 20:29:38 UTC
Created attachment 273328 [details]
revised patch

Of course you're right; here's an updated patch that uses @comment.
Comment 4 Craig Leres freebsd_committer freebsd_triage 2026-07-30 20:32:49 UTC
Created attachment 273329 [details]
revised patch #2

Oops, looking at existing ports I guess a blank needs to follow @comment.
Comment 5 Dan Nelson 2026-07-30 20:36:20 UTC
Yep, was just going to mention that.  The latest patch looks good.
Comment 6 Craig Leres freebsd_committer freebsd_triage 2026-07-30 21:47:18 UTC
I can commit this with maintainer approve '+' on the patch.
Comment 7 commit-hook freebsd_committer freebsd_triage 2026-07-30 22:54:24 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e7207ceba5ffb809b6deb48f895fdea8daf80acc

commit e7207ceba5ffb809b6deb48f895fdea8daf80acc
Author:     Craig Leres <leres@FreeBSD.org>
AuthorDate: 2026-07-30 22:53:10 +0000
Commit:     Craig Leres <leres@FreeBSD.org>
CommitDate: 2026-07-30 22:53:10 +0000

    audio/sox: Unbreak build when no audio devices are selected

    Upstream allows this configuration so the port should as well.

    PR:             297173
    Approved by:    Dan Nelson (maintainer)

 audio/sox/Makefile  | 13 ++++++++++++-
 audio/sox/pkg-plist |  4 ++--
 2 files changed, 14 insertions(+), 3 deletions(-)
Comment 8 Craig Leres freebsd_committer freebsd_triage 2026-07-30 22:55:10 UTC
Thanks for checking my patch (and the quick approval).