Skip to content

Commit

Permalink
setup-mac-brew: fix latest ffmpeg install failure
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Nov 21, 2023
1 parent 939cf32 commit 07b5b16
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions commands/setup-mac-brew
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@ function setup_mac_brew() (
chromaprint
lescanauxdiscrets/tap/zvbi
)
local HOMEBREW_ENCODING_REMOVE_OPTIONS=(
# Resolved: https://github.com/homebrew-ffmpeg/homebrew-ffmpeg/issues/81#issuecomment-828722622
# Fails: https://github.com/homebrew-ffmpeg/homebrew-ffmpeg/issues/96#issuecomment-1398315717
--with-librsvg
# Fails: https://github.com/homebrew-ffmpeg/homebrew-ffmpeg/issues/92
--with-decklink
# Fails: https://github.com/homebrew-ffmpeg/homebrew-ffmpeg/issues/37#issuecomment-958018136
--with-game-music-emu
# Fails: Error: An exception occurred within a child process: FormulaUnavailableError: No available formula with the name "zvbi".
--with-libzvbi
# Fails: ERROR: libflite not found
--with-libflite
# Fails: Unknown option "--enable-openvino".
--enable-openvino
--with-openvino
)
# Deprecated configurations:
local SETUP_UTILS=() # for configuration adjustments
local HOMEBREW_INSTALL_ENCODING='' # deprecated, replaced by HOMEBREW_ENCODING_INSTALL
Expand Down Expand Up @@ -271,21 +287,13 @@ function setup_mac_brew() (
echo-segment --h2="Install ffmpeg with options"

# fetch all the build options for ffmpeg
local ffmpeg_opts
local ffmpeg_opts bad_option
ffmpeg_opts="$(brew options homebrew-ffmpeg/ffmpeg/ffmpeg --compact)"
# Remove options that break ffmpeg
# Resolved: https://github.com/homebrew-ffmpeg/homebrew-ffmpeg/issues/81#issuecomment-828722622
# Fails: https://github.com/homebrew-ffmpeg/homebrew-ffmpeg/issues/96#issuecomment-1398315717
ffmpeg_opts="${ffmpeg_opts/--with-librsvg /}"
# Fails: https://github.com/homebrew-ffmpeg/homebrew-ffmpeg/issues/92
ffmpeg_opts="${ffmpeg_opts/--with-decklink /}"
# Fails: https://github.com/homebrew-ffmpeg/homebrew-ffmpeg/issues/37#issuecomment-958018136
ffmpeg_opts="${ffmpeg_opts/--with-game-music-emu /}"
# Fails: Error: An exception occurred within a child process: FormulaUnavailableError: No available formula with the name "zvbi".
ffmpeg_opts="${ffmpeg_opts/--with-libzvbi /}"
# Fails: ERROR: libflite not found
ffmpeg_opts="${ffmpeg_opts/--with-libflite /}"
# space seperated array
# remove options that break ffmpeg
for bad_option in "${HOMEBREW_ENCODING_REMOVE_OPTIONS[@]}"; do
ffmpeg_opts="${ffmpeg_opts/$bad_option /}"
done
# parse the space seperated options into an array
mapfile -t ffmpeg_opts < <(echo-split ' ' -- "$ffmpeg_opts")

# install with the build options
Expand Down

0 comments on commit 07b5b16

Please sign in to comment.