diff --git a/ports/x264/portfile.cmake b/ports/x264/portfile.cmake index 33e6979ac0e776..91264d443d37c1 100644 --- a/ports/x264/portfile.cmake +++ b/ports/x264/portfile.cmake @@ -29,7 +29,23 @@ if(VCPKG_TARGET_IS_UWP) endif() if(VCPKG_TARGET_IS_LINUX) + list(APPEND OPTIONS --enable-pic) + + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + + vcpkg_cmake_get_vars(cmake_vars_file) + include("${cmake_vars_file}") + + if (VCPKG_DETECTED_CMAKE_CROSSCOMPILING) + # Attempt to determine the fully qualified prefix from VCPKG_DETECTED_CMAKE_C_COMPILER (using most common naming conventions for linux targets) + # and if valid, use it to initialize --cross-prefix build-option of x264 package. + if(VCPKG_DETECTED_CMAKE_C_COMPILER MATCHES "^(.*-)gcc\$") + list(APPEND OPTIONS "--cross-prefix=${CMAKE_MATCH_1}") + endif() + endif() + endif() + endif() vcpkg_configure_make( @@ -45,7 +61,6 @@ vcpkg_configure_make( --disable-gpac --disable-lsmash --enable-debug - ) vcpkg_install_make() diff --git a/ports/x264/vcpkg.json b/ports/x264/vcpkg.json index 436cf0b5efd276..f863b23582734b 100644 --- a/ports/x264/vcpkg.json +++ b/ports/x264/vcpkg.json @@ -1,14 +1,19 @@ { "name": "x264", - "version-string": "164-5db6aa6cab1b146", - "port-version": 4, + "version": "164-5db6aa6cab1b146", + "port-version": 5, "description": "x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format", "homepage": "https://github.com/mirror/x264", + "license": "GPL-2.0-or-later", "supports": "!(arm & windows)", "dependencies": [ { "name": "pthread", "platform": "linux & osx" + }, + { + "name": "vcpkg-cmake", + "host": true } ] } diff --git a/versions/baseline.json b/versions/baseline.json index c6782a4d05506f..63fcaa25e70d91 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7438,7 +7438,7 @@ }, "x264": { "baseline": "164-5db6aa6cab1b146", - "port-version": 4 + "port-version": 5 }, "x265": { "baseline": "3.4", diff --git a/versions/x-/x264.json b/versions/x-/x264.json index bd8a969ea8dad4..7e0436eaa58f76 100644 --- a/versions/x-/x264.json +++ b/versions/x-/x264.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "c41df96f5b563f5ca75a965b0efc19f1daf05671", + "version": "164-5db6aa6cab1b146", + "port-version": 5 + }, { "git-tree": "7eea109502309e62a578bcc69811ad0659e00f9d", "version-string": "164-5db6aa6cab1b146",