-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ffmpeg: Add option to build without GPL. #18909
Conversation
Should help when using homebrew to build shared libraries as part of CI toolchains where GPL licensed FFMPEG shared libraries are unsuitable.
Formula/ffmpeg.rb
Outdated
--enable-version3 | ||
--enable-hardcoded-tables | ||
--enable-avresample | ||
--cc=#{ENV.cc} | ||
--host-cflags=#{ENV.cflags} | ||
--host-ldflags=#{ENV.ldflags} | ||
] | ||
|
||
|
||
args << "--enable-gpl" if not build.without? "gpl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
args << "--enable-gpl" if build.with? "gpl"
Is the preferred syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I was watching the Jenkins log output and saw the style check complaint. I've issued an update to the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix mistake, I don't normally write ruby.
|
Formula/ffmpeg.rb
Outdated
@@ -57,6 +57,7 @@ class Ffmpeg < Formula | |||
option "without-securetransport", "Disable use of SecureTransport" | |||
option "without-x264", "Disable H.264 encoder" | |||
option "without-xvid", "Disable Xvid MPEG-4 video encoder" | |||
option "without-gpl", "Disable building GPL Licensed parts of FFMPEG" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Licensed
shouldn't be capitalized.
It's FFmpeg
not FFMPEG
.
Looks like it passes the CI test now. I checked the console output and noticed the |
Thanks for your first contribution to Homebrew, @techdragon! Without people like you submitting PRs we couldn't run this project. You rock! |
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?Small change, it should help when using homebrew to build shared libraries as part of CI toolchains where GPL licensed FFMPEG shared libraries are unsuitable. With this change the existing behaviour of GPL builds should remain the default and continue to work unchanged. Its possible the build flags may need more sophistication regarding
without-gpl
and conflicting flags/options to do with GPL licensed components of FFMPEG, but exhaustively installing and uninstalling and reinstalling the combinations of options and flags to be sure is not something I really want to run by hand. (which is why I haven't done a local install with this option)Edit: checklist syntax