Split/x264 overlay workaround#1137
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a Linux-only vcpkg overlay port for x264 and wires it into the top-level CMake configuration so Linux builds use the overlay while other platforms can continue using the upstream vcpkg port.
Changes:
- Add a Linux-guarded
VCPKG_OVERLAY_PORTSentry in the rootCMakeLists.txt. - Add a full
x264overlay port under.github/overlays/linux/x264(portfile, manifest, and patches). - Patch
x264build/version scripts via vcpkg patches to address the targeted workaround(s).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| CMakeLists.txt | Adds conditional configuration to enable the Linux overlay port directory. |
| .github/overlays/linux/x264/portfile.cmake | Defines the overlay x264 port build logic and applies patches. |
| .github/overlays/linux/x264/vcpkg.json | Declares the overlay port metadata, features, and dependencies. |
| .github/overlays/linux/x264/version.diff.in | Template patch to adjust x264 version string in vcpkg builds. |
| .github/overlays/linux/x264/configure.patch | Adjusts configure behavior (shell/env + flags handling + Android guard). |
| .github/overlays/linux/x264/srcpath-relative-path.patch | Fixes relative path computation in configure for certain layouts. |
| .github/overlays/linux/x264/parallel-install.patch | Adjusts install target generation to support parallel installs. |
| .github/overlays/linux/x264/allow-clang-cl.patch | Expands compiler detection to accept clang-cl. |
| .github/overlays/linux/x264/uwp-cflags.patch | Tweaks WinRT/UWP-specific flags in configure. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") | ||
| # Keep the x264 workaround Linux-only so Windows continues to use the | ||
| # upstream vcpkg port unchanged. | ||
| list(APPEND VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_SOURCE_DIR}/.github/overlays/linux") | ||
| endif() |
There was a problem hiding this comment.
The Linux-only gating uses CMAKE_HOST_SYSTEM_NAME, so a cross-compile configured on a Linux host (e.g., targeting Windows via a toolchain/triplet) would still pick up this x264 overlay. That contradicts the intent stated in the comment (keeping Windows on the upstream vcpkg port). Consider gating on the target platform instead (e.g., CMAKE_SYSTEM_NAME STREQUAL "Linux" when defined, with a fallback to host only when CMAKE_SYSTEM_NAME is unset), or gate on the vcpkg target triplet once available.
| # The pc file exports "0.164.<N>" where is the number of commits. | ||
| # The binary releases on https://artifacts.videolan.org/x264/ are named x264-r<N>-<COMMIT>. | ||
| # With a git clone, this can be determined by running `versions.sh`. | ||
| # With vcpkg_from_gitlab, we modify `versions.sh` accordingly. |
There was a problem hiding this comment.
Spelling/accuracy in the versioning note: the script is version.sh (not versions.sh), and the sentence "exports "0.164." where is the number of commits" is missing a word (e.g., "where N is..."). Updating these comments will prevent confusion when maintaining this overlay.
| # The pc file exports "0.164.<N>" where is the number of commits. | |
| # The binary releases on https://artifacts.videolan.org/x264/ are named x264-r<N>-<COMMIT>. | |
| # With a git clone, this can be determined by running `versions.sh`. | |
| # With vcpkg_from_gitlab, we modify `versions.sh` accordingly. | |
| # The pc file exports "0.164.<N>" where N is the number of commits. | |
| # The binary releases on https://artifacts.videolan.org/x264/ are named x264-r<N>-<COMMIT>. | |
| # With a git clone, this can be determined by running `version.sh`. | |
| # With vcpkg_from_gitlab, we modify `version.sh` accordingly. |
|
See my comment #1128 (comment) |
|
@selimsandal, can you check the previous comment. Thanks (: |
|
@MrNeRF @shadygm i’ve checked the upstream for x264, seems like they host on a private git server and the account I tried to register with 2 weeks ago is still not verified by the administrators of videolan so I cannot send a patch to that repo. If you are in contact with videolan maybe we can ask directly? |
No description provided.