Several ports depend on x264 solely for libx264 and do not need the command-line application itself. This results in a circular dependency with multimedia/ffmpeg since x264 gains an implicit dependency on it if built while ffmpeg installed - x264 detects the presence of the libav* libraries and build against them to provide lavf support.
Fix: This patch unifies the work done to update x264 to core 140 and the work required to build the library and application as separate ports, thereby breaking ffmpeg's dependency on x264, instead making it dependent on the new libx264 port. Other ports dependent on the library have also been updated to use it as a dependency instead of x264. x264 now has an explicit dependency on ffmpeg for lavf support (which is an option and is enabled by default). The X11_SUPPORT option has been removed since it is no longer supported upstream. Finally, the application now supports showing the git revision in its help message.
Patch attached with submission follows:
Over to maintainer (via the GNATS Auto Assign Tool)
Ping. Have not forgotten :)
Pong. You had mentioned you had a version of my patch with your own changes; how does it differ (other than things like PORTREVISION bumps) and what is its status?
I was unaware of this commit until today:
However, all that this does is completely prevent x264 from using ffmpeg. ffmpeg provides libavformat, which x264 can use to mux/demux and decode video from convenient formats rather than being restricted to raw video.
I get the feeling that no one but me cares, though. Should I even bother finishing an updated patch that applies to a recent version of the ports tree and updates x264 to 0.142.2455?
Created attachment 148770 [details]
Updated patch for r371677 with some fixes and upstream update to 0.142.2455
What this patch accomplishes:
- Allows x264 to use lavf and friends from ffmpeg for decoding and demuxing while preventing a circular dependency between the two. This is done by splitting x264 into two ports - the CLI application (x264) and the library (libx264). x264 can depend on ffmpeg, but ffmpeg will depend on libx264 rather than x264.
- Provides a long overdue update to x264 (and includes fixes to local patches so that they can apply to the new upstream files).
- Provides the git revision and other version information to the build environment, allowing the CLI binary to display this information (like the Windows builds).
- Removes unsupported build options (X11_OUTPUT) and ensures that the library and CLI ports each have the appropriate options.
- Adds the LAVF option to the CLI port, making the dependency on ffmpeg optional.
- Adds notes for future contributors who wish to update the ports.
- Bumps PORTREVISION for all dependent ports.
This patch definitely does NOT come from a desire to separate applications and libraries in general.
Thanks to koobs for his help with version.sh and the git info, and with getting some information on splitting the lib, and to the helpful people in #x264dev on freenode for their help with version.sh and the configure script.
CC'ing multimedia@ since this affects many multimedia ports.
Created attachment 148773 [details]
Updated patch for r371677 with some fixes and upstream update to 0.142.2455 (fixed)
Other patch had a couple things that didn't belong.
Created attachment 149375 [details]
Updated patch for r372519
Created attachment 149378 [details]
Updated patch for r372519 (fixed x264-patch-Makefile)
My changes to the x264 Makefile patch got mangled in the update.
A commit references this bug:
Date: Sat Nov 22 16:23:42 UTC 2014
New revision: 373073
multimedia/x264: General overhaul
- Split x264 into two ports: the CLI application (x264), and the library
(libx264). This will allow x264 to use lavf and friends from ffmpeg for
decoding and demuxing while preventing a circular dependency between the
two: x264 can depend on ffmpeg, but ffmpeg will depend on libx264 rather
- Add the LAVF option to the CLI port, making the dependency on ffmpeg
- Update to 0.142.2455.
- Amend fixes to local patches so that they can apply to the new upstream
- Provide the git revision and other version information to the build
environment, allowing the CLI binary to display this information (like the
- Remove unsupported build options (X11_OUTPUT).
- Ensure that the library and CLI ports each have the appropriate options.
- Add notes for future contributors who wish to update the ports.
- Bump PORTREVISION for all dependent ports.
Differential Revision: https://reviews.freebsd.org/D1159
Submitted by: Andrew Berg <firstname.lastname@example.org>
Approved by: koobs (maintainer, mentor)