Bug 277754 - audio/sox: fixes to make options work properly
Summary: audio/sox: fixes to make options work properly
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 277803
  Show dependency treegraph
 
Reported: 2024-03-17 07:38 UTC by Tatsuki Makino
Modified: 2024-03-19 07:34 UTC (History)
2 users (show)

See Also:
dnelson_1901: maintainer-feedback+


Attachments
proposed patch for audio/sox (5.84 KB, patch)
2024-03-17 07:38 UTC, Tatsuki Makino
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tatsuki Makino 2024-03-17 07:38:48 UTC
Created attachment 249236 [details]
proposed patch for audio/sox

Changed AMR codecs to use opencore ones.

I was going to fix just that, but the other options were not working correctly, so I fixed those as well.
The following is a summary of the corrections.
Apply patch to ${WRKSRC}/m4/sox.m4 to correct listing of unrecognized options.
Removed options from CONFIGURE_ARGS that appeared to be unrecognized.
Sort the order of occurrence of variables to the point where portclippy (ports-mgmt/portfmt) is quietest.
LAME, MAD, and TWOLAME became MP3 groups.
SYMLINK option was added for reducing the range of conflicts.
Comment 1 Dan Nelson 2024-03-17 18:37:10 UTC
These changes look good.  Adding --disable-mp3 to CONFIGURE_ARGS and then adding --enable-mp3 later when needed to override it is interesting, but autoconf doesn't seem to complain, and I guess the alternative would be an .ifdef block.
Comment 2 Tatsuki Makino 2024-03-18 02:04:21 UTC
(In reply to Dan Nelson from comment #1)

This method has a maximum sequence of the following arguments
--disable-mp3 --with-lame --enable-mp3 --with-mad --enable-mp3 --with-twolame --enable-mp3
It then takes advantage of the fact that the last --{enable,disable}-mp3 is adopted from among them.

If that method is not adopted, the following part would be needed

.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MLAME} || ${PORT_OPTIONS:MMAD} || ${PORT_OPTIONS:MTWOLAME}
CONFIGURE_ARGS+= --enable-mp3
.else
CONFIGURE_ARGS+= --disable-mp3
.endif

These are better if the preferred method is adopted.