From 9b9dbc2a7d430d2e32f37816fadc402dc9340e50 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Jun 2026 09:56:32 +0000 Subject: [PATCH 1/8] fix: x264 mirror and libass Android/macOS build failures - x264: switch from code.videolan.org (returning HTTP 502) to ibaoger/x264 GitHub mirror; same commit and same SHA512 since both tarballs unpack to an identically-named top-level directory - libass: add overlay port (version 0.17.4#1) with two fixes: 1. Android/non-desktop cross-compile: add -Dfontconfig=disabled alongside -Drequire-system-font-provider=false so meson does not try to compile ass_fontconfig.c (fontconfig headers are absent on Android) 2. macOS: promote fontconfig from linux-only to linux|osx vcpkg dependency so vcpkg builds its own fontconfig (NLS disabled, no -lintl), avoiding the Homebrew fontconfig 2.18.0 -lintl linker error on arm64 --- overlays/ports/libass/arm64-windows-asm.patch | 59 +++++++++++++++++++ overlays/ports/libass/portfile.cmake | 57 ++++++++++++++++++ overlays/ports/libass/vcpkg.json | 21 +++++++ overlays/ports/x264/portfile.cmake | 7 +-- 4 files changed, 140 insertions(+), 4 deletions(-) create mode 100644 overlays/ports/libass/arm64-windows-asm.patch create mode 100644 overlays/ports/libass/portfile.cmake create mode 100644 overlays/ports/libass/vcpkg.json diff --git a/overlays/ports/libass/arm64-windows-asm.patch b/overlays/ports/libass/arm64-windows-asm.patch new file mode 100644 index 0000000..8828f8d --- /dev/null +++ b/overlays/ports/libass/arm64-windows-asm.patch @@ -0,0 +1,59 @@ +diff --git a/libass/meson.build b/libass/meson.build +index 5251c2f..a3429bb 100644 +--- a/libass/meson.build ++++ b/libass/meson.build +@@ -70,6 +70,28 @@ if enable_asm + + if asm_is_nasm + libass_src += asm_sources ++ elif asm_is_clang ++ clang = find_program('clang') ++ foreach asm_source : asm_sources ++ asm_output = fs.stem(asm_source.full_path()) + '.obj' ++ libass_src += custom_target( ++ asm_output, ++ input: asm_source, ++ output: asm_output, ++ depends: config_h, ++ command: [ ++ clang, ++ ] + asm_clang_args + [ ++ '-I' + meson.project_build_root(), ++ '-I' + meson.current_source_dir(), ++ ] + asm_args + [ ++ '-c', ++ '@INPUT@', ++ '-o', ++ '@OUTPUT@', ++ ], ++ ) ++ endforeach + else + asm_lib = static_library( + 'libass_asm', +diff --git a/meson.build b/meson.build +index 4b1c24e..b82233e 100644 +--- a/meson.build ++++ b/meson.build +@@ -207,7 +207,9 @@ endif + enable_asm = false + # used in libass/meson.build + asm_is_nasm = false ++asm_is_clang = false + asm_args = [] ++asm_clang_args = [] + + # ASM architecture variables + asm_option = get_option('asm') +@@ -276,6 +278,10 @@ if not asm_option.disabled() + enable_asm = true + conf.set('ARCH_AARCH64', 1) + if host_system == 'darwin' + asm_args += '-DPREFIX' ++ elif host_system == 'windows' and cc.get_argument_syntax() == 'msvc' and cc.get_id() != 'clang-cl' ++ # MSVC cannot compile GNU-style AArch64 .S sources. ++ asm_is_clang = true ++ asm_clang_args += '--target=arm64-pc-windows-msvc' + endif + else + warning( diff --git a/overlays/ports/libass/portfile.cmake b/overlays/ports/libass/portfile.cmake new file mode 100644 index 0000000..3b12a38 --- /dev/null +++ b/overlays/ports/libass/portfile.cmake @@ -0,0 +1,57 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libass/libass + REF ${VERSION} + SHA512 08762623dd09e3034699ba9d11b70d1f6cc6b2e3b38aa897b07efef1364e76141df484e70ed27888cf3595b77d072cdb5e8abbbfa560e33ca21f87872e24df8d + HEAD_REF master + PATCHES + arm64-windows-asm.patch +) + +vcpkg_find_acquire_program(PKGCONFIG) +get_filename_component(PKGCONFIG_EXE_PATH ${PKGCONFIG} DIRECTORY) +vcpkg_add_to_path(${PKGCONFIG_EXE_PATH}) + +list(APPEND options + -Dcheckasm=disabled + -Dcompare=disabled + -Dfuzz=disabled + -Dprofile=disabled + -Dtest=disabled +) + +if(NOT VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_OSX AND NOT VCPKG_TARGET_IS_LINUX) + list(APPEND options -Drequire-system-font-provider=false -Dfontconfig=disabled) +endif() + +set(asm_option disabled) +set(additional_binaries "") +if(VCPKG_TARGET_ARCHITECTURE MATCHES "^(x86|x64|arm64)$") + set(asm_option enabled) + if(VCPKG_TARGET_ARCHITECTURE MATCHES "^(x86|x64)$") + vcpkg_find_acquire_program(NASM) + get_filename_component(NASM_EXE_PATH "${NASM}" DIRECTORY) + vcpkg_add_to_path("${NASM_EXE_PATH}") + elseif(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + vcpkg_find_acquire_program(CLANG) + list(APPEND additional_binaries "clang = ['${CLANG}']") + endif() +else() + message(WARNING "Assembly optimizations are not supported on ${VCPKG_TARGET_ARCHITECTURE}; disabling assembly optimizations.") +endif() +list(APPEND options -Dasm=${asm_option}) + +vcpkg_configure_meson( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${options} + ADDITIONAL_BINARIES + ${additional_binaries} +) + +vcpkg_install_meson() +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +# Handle copyright +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") diff --git a/overlays/ports/libass/vcpkg.json b/overlays/ports/libass/vcpkg.json new file mode 100644 index 0000000..8ffa242 --- /dev/null +++ b/overlays/ports/libass/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "libass", + "version": "0.17.4", + "port-version": 1, + "description": "libass is a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format", + "homepage": "https://github.com/libass/libass", + "license": "ISC", + "dependencies": [ + { + "name": "fontconfig", + "platform": "linux | osx" + }, + "freetype", + "fribidi", + "harfbuzz", + { + "name": "vcpkg-tool-meson", + "host": true + } + ] +} diff --git a/overlays/ports/x264/portfile.cmake b/overlays/ports/x264/portfile.cmake index 8cc09d8..0f765d3 100644 --- a/overlays/ports/x264/portfile.cmake +++ b/overlays/ports/x264/portfile.cmake @@ -11,13 +11,12 @@ string(REGEX MATCH "^......." short_ref "${ref}") string(REGEX MATCH "[0-9]+\$" revision "${VERSION}") configure_file("${CURRENT_PORT_DIR}/version.diff.in" "${CURRENT_BUILDTREES_DIR}/src/version-${VERSION}.diff" @ONLY) -vcpkg_from_gitlab( - GITLAB_URL https://code.videolan.org/ +vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO videolan/x264 + REPO ibaoger/x264 REF "${ref}" SHA512 707ff486677a1b5502d6d8faa588e7a03b0dee45491c5cba89341be4be23d3f2e48272c3b11d54cfc7be1b8bf4a3dfc3c3bb6d9643a6b5a2ed77539c85ecf294 - HEAD_REF master + HEAD_REF stable PATCHES "${CURRENT_BUILDTREES_DIR}/src/version-${VERSION}.diff" uwp-cflags.patch From 0a735b44d2ba9f558947321c0f7a2aa0730142dc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Jun 2026 09:57:41 +0000 Subject: [PATCH 2/8] fix: add explanatory comments per code review feedback --- overlays/ports/libass/portfile.cmake | 4 ++++ overlays/ports/x264/portfile.cmake | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/overlays/ports/libass/portfile.cmake b/overlays/ports/libass/portfile.cmake index 3b12a38..a913a58 100644 --- a/overlays/ports/libass/portfile.cmake +++ b/overlays/ports/libass/portfile.cmake @@ -21,6 +21,10 @@ list(APPEND options ) if(NOT VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_OSX AND NOT VCPKG_TARGET_IS_LINUX) + # On non-desktop targets (e.g. Android, iOS, Emscripten) there is no + # system font provider and fontconfig headers are not available, so + # disable both the system-font-provider requirement and the fontconfig + # integration to prevent meson from compiling ass_fontconfig.c. list(APPEND options -Drequire-system-font-provider=false -Dfontconfig=disabled) endif() diff --git a/overlays/ports/x264/portfile.cmake b/overlays/ports/x264/portfile.cmake index 0f765d3..7030730 100644 --- a/overlays/ports/x264/portfile.cmake +++ b/overlays/ports/x264/portfile.cmake @@ -11,6 +11,11 @@ string(REGEX MATCH "^......." short_ref "${ref}") string(REGEX MATCH "[0-9]+\$" revision "${VERSION}") configure_file("${CURRENT_PORT_DIR}/version.diff.in" "${CURRENT_BUILDTREES_DIR}/src/version-${VERSION}.diff" @ONLY) +# Using a GitHub mirror instead of code.videolan.org because the official +# GitLab instance intermittently returns HTTP 502 for archive downloads. +# ibaoger/x264 is a mirror of the official repository; the tarball unpacks +# to the same top-level directory name ("x264-"), so the SHA512 is +# identical to the original code.videolan.org archive. vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ibaoger/x264 From 2943db91585eb08a35b493dfffa217bb774114ba Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Jun 2026 10:30:39 +0000 Subject: [PATCH 3/8] revert x264 overlay to official code.videolan.org source --- overlays/ports/x264/portfile.cmake | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/overlays/ports/x264/portfile.cmake b/overlays/ports/x264/portfile.cmake index 7030730..c46811a 100644 --- a/overlays/ports/x264/portfile.cmake +++ b/overlays/ports/x264/portfile.cmake @@ -11,14 +11,13 @@ string(REGEX MATCH "^......." short_ref "${ref}") string(REGEX MATCH "[0-9]+\$" revision "${VERSION}") configure_file("${CURRENT_PORT_DIR}/version.diff.in" "${CURRENT_BUILDTREES_DIR}/src/version-${VERSION}.diff" @ONLY) -# Using a GitHub mirror instead of code.videolan.org because the official -# GitLab instance intermittently returns HTTP 502 for archive downloads. -# ibaoger/x264 is a mirror of the official repository; the tarball unpacks -# to the same top-level directory name ("x264-"), so the SHA512 is -# identical to the original code.videolan.org archive. -vcpkg_from_github( +# The official GitLab instance (code.videolan.org) intermittently returns +# HTTP 502 for archive downloads; vcpkg retries failed downloads automatically, +# so transient errors are handled without falling back to a third-party mirror. +vcpkg_from_gitlab( + GITLAB_URL https://code.videolan.org/ OUT_SOURCE_PATH SOURCE_PATH - REPO ibaoger/x264 + REPO videolan/x264 REF "${ref}" SHA512 707ff486677a1b5502d6d8faa588e7a03b0dee45491c5cba89341be4be23d3f2e48272c3b11d54cfc7be1b8bf4a3dfc3c3bb6d9643a6b5a2ed77539c85ecf294 HEAD_REF stable From 6b6ce2a49af64bed278722e32a98956da415b07d Mon Sep 17 00:00:00 2001 From: Oleksii Holub <1935960+Tyrrrz@users.noreply.github.com> Date: Mon, 1 Jun 2026 13:32:28 +0300 Subject: [PATCH 4/8] Update portfile.cmake --- overlays/ports/x264/portfile.cmake | 3 --- 1 file changed, 3 deletions(-) diff --git a/overlays/ports/x264/portfile.cmake b/overlays/ports/x264/portfile.cmake index c46811a..78a62ca 100644 --- a/overlays/ports/x264/portfile.cmake +++ b/overlays/ports/x264/portfile.cmake @@ -11,9 +11,6 @@ string(REGEX MATCH "^......." short_ref "${ref}") string(REGEX MATCH "[0-9]+\$" revision "${VERSION}") configure_file("${CURRENT_PORT_DIR}/version.diff.in" "${CURRENT_BUILDTREES_DIR}/src/version-${VERSION}.diff" @ONLY) -# The official GitLab instance (code.videolan.org) intermittently returns -# HTTP 502 for archive downloads; vcpkg retries failed downloads automatically, -# so transient errors are handled without falling back to a third-party mirror. vcpkg_from_gitlab( GITLAB_URL https://code.videolan.org/ OUT_SOURCE_PATH SOURCE_PATH From d2058d58d9e5837d6b10d791a3269f84ae56d667 Mon Sep 17 00:00:00 2001 From: Oleksii Holub <1935960+Tyrrrz@users.noreply.github.com> Date: Mon, 1 Jun 2026 13:33:06 +0300 Subject: [PATCH 5/8] Update portfile.cmake --- overlays/ports/x264/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlays/ports/x264/portfile.cmake b/overlays/ports/x264/portfile.cmake index 78a62ca..8cc09d8 100644 --- a/overlays/ports/x264/portfile.cmake +++ b/overlays/ports/x264/portfile.cmake @@ -17,7 +17,7 @@ vcpkg_from_gitlab( REPO videolan/x264 REF "${ref}" SHA512 707ff486677a1b5502d6d8faa588e7a03b0dee45491c5cba89341be4be23d3f2e48272c3b11d54cfc7be1b8bf4a3dfc3c3bb6d9643a6b5a2ed77539c85ecf294 - HEAD_REF stable + HEAD_REF master PATCHES "${CURRENT_BUILDTREES_DIR}/src/version-${VERSION}.diff" uwp-cflags.patch From 20ffe8a9fbcf7836cae28e2eb765b3c9495a8518 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Jun 2026 10:50:29 +0000 Subject: [PATCH 6/8] fix HEAD_REF back to stable in x264 overlay --- overlays/ports/x264/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlays/ports/x264/portfile.cmake b/overlays/ports/x264/portfile.cmake index 8cc09d8..78a62ca 100644 --- a/overlays/ports/x264/portfile.cmake +++ b/overlays/ports/x264/portfile.cmake @@ -17,7 +17,7 @@ vcpkg_from_gitlab( REPO videolan/x264 REF "${ref}" SHA512 707ff486677a1b5502d6d8faa588e7a03b0dee45491c5cba89341be4be23d3f2e48272c3b11d54cfc7be1b8bf4a3dfc3c3bb6d9643a6b5a2ed77539c85ecf294 - HEAD_REF master + HEAD_REF stable PATCHES "${CURRENT_BUILDTREES_DIR}/src/version-${VERSION}.diff" uwp-cflags.patch From c42064c4e479e0e95e6361e9c7dcfca3d45fce35 Mon Sep 17 00:00:00 2001 From: Oleksii Holub <1935960+Tyrrrz@users.noreply.github.com> Date: Mon, 1 Jun 2026 14:17:29 +0300 Subject: [PATCH 7/8] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- overlays/ports/libass/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/overlays/ports/libass/portfile.cmake b/overlays/ports/libass/portfile.cmake index a913a58..4ac9259 100644 --- a/overlays/ports/libass/portfile.cmake +++ b/overlays/ports/libass/portfile.cmake @@ -9,8 +9,8 @@ vcpkg_from_github( ) vcpkg_find_acquire_program(PKGCONFIG) -get_filename_component(PKGCONFIG_EXE_PATH ${PKGCONFIG} DIRECTORY) -vcpkg_add_to_path(${PKGCONFIG_EXE_PATH}) +get_filename_component(PKGCONFIG_EXE_PATH "${PKGCONFIG}" DIRECTORY) +vcpkg_add_to_path("${PKGCONFIG_EXE_PATH}") list(APPEND options -Dcheckasm=disabled From b8392692f407f257ccf9730739a0bebb137bb48b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Jun 2026 11:19:38 +0000 Subject: [PATCH 8/8] Set x264 HEAD_REF back to master --- overlays/ports/x264/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlays/ports/x264/portfile.cmake b/overlays/ports/x264/portfile.cmake index 78a62ca..8cc09d8 100644 --- a/overlays/ports/x264/portfile.cmake +++ b/overlays/ports/x264/portfile.cmake @@ -17,7 +17,7 @@ vcpkg_from_gitlab( REPO videolan/x264 REF "${ref}" SHA512 707ff486677a1b5502d6d8faa588e7a03b0dee45491c5cba89341be4be23d3f2e48272c3b11d54cfc7be1b8bf4a3dfc3c3bb6d9643a6b5a2ed77539c85ecf294 - HEAD_REF stable + HEAD_REF master PATCHES "${CURRENT_BUILDTREES_DIR}/src/version-${VERSION}.diff" uwp-cflags.patch