diff --git a/ports/ffmpeg/0008-add-arm64ec-support.patch b/ports/ffmpeg/0008-add-arm64ec-support.patch new file mode 100644 index 00000000000000..00c47edf0749bf --- /dev/null +++ b/ports/ffmpeg/0008-add-arm64ec-support.patch @@ -0,0 +1,77 @@ +diff --git a/compat/windows/makedef b/compat/windows/makedef +index add8222d13..af42f08fd5 100755 +--- a/compat/windows/makedef ++++ b/compat/windows/makedef +@@ -48,7 +48,13 @@ trap 'rm -f -- $libname' EXIT + if [ -n "$AR" ]; then + $AR rcs ${libname} $@ >/dev/null + else +- lib.exe -out:${libname} $@ >/dev/null ++ machine_flag="" ++ case "$LDFLAGS" in ++ *"machine:arm64ec"*) ++ machine_flag="-machine:arm64ec" ++ ;; ++ esac ++ lib.exe ${machine_flag} -out:${libname} $@ >/dev/null + fi + if [ $? != 0 ]; then + echo "Could not create temporary library." >&2 +@@ -106,12 +112,21 @@ if [ -n "$NM" ]; then + grep -v : | + grep -v ^$ | + cut -d' ' -f3 | +- sed -e "s/^${prefix}//") ++ sed -e "s/^${prefix}//" -e "s/^#//" | ++ grep -v '\$entry_thunk' | ++ grep -v '\$exit_thunk') + else +- dump=$(dumpbin.exe -linkermember:1 ${libname} | +- sed -e '/public symbols/,$!d' -e '/^ \{1,\}Summary/,$d' -e "s/ \{1,\}${prefix}/ /" -e 's/ \{1,\}/ /g' | ++ member=1 ++ case "$LDFLAGS" in ++ *"machine:arm64ec"*) ++ member=32 ++ ;; ++ esac ++ dump=$(dumpbin.exe -linkermember:${member} ${libname} | ++ sed -e '/public symbols/,$!d' -e '/^ \{1,\}Summary/,$d' -e 's/^[[:space:]]*[0-9A-Fa-f]\{1,\}[[:space:]]\{1,\}//' -e "s/^${prefix}//" -e 's/^#//' | + tail -n +2 | +- cut -d' ' -f3) ++ grep -v '\$entry_thunk' | ++ grep -v '\$exit_thunk') + fi + + rm ${libname} +diff --git a/configure b/configure +index 98b582a5d5..589be1b1cf 100755 +--- a/configure ++++ b/configure +@@ -4623,7 +4623,7 @@ case "$toolchain" in + nm_default="dumpbin.exe -symbols" + ar_default="lib.exe" + case "${arch:-$arch_default}" in +- aarch64|arm64) ++ aarch64|arm64|arm64ec) + as_default="armasm64.exe" + ;; + arm*) +@@ -5250,7 +5250,7 @@ fi + + # Deal with common $arch aliases + case "$arch" in +- aarch64|arm64) ++ aarch64|arm64|arm64ec) + arch="aarch64" + ;; + arm*|iPad*|iPhone*) +@@ -5895,7 +5895,7 @@ case $target_os in + SLIBSUF=".dll" + SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)' + SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)' +- SLIB_CREATE_DEF_CMD='EXTERN_PREFIX="$(EXTERN_PREFIX)" $(SRC_PATH)/compat/windows/makedef $(SUBDIR)lib$(NAME).ver $(OBJS) > $$(@:$(SLIBSUF)=.def)' ++ SLIB_CREATE_DEF_CMD='LDFLAGS="$(LDFLAGS)" EXTERN_PREFIX="$(EXTERN_PREFIX)" $(SRC_PATH)/compat/windows/makedef $(SUBDIR)lib$(NAME).ver $(OBJS) > $$(@:$(SLIBSUF)=.def)' + SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)' + SLIB_INSTALL_LINKS= + SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)' + diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 673b19c6034714..934405b5537895 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_from_github( 0004-dependencies.patch 0005-fix-nasm.patch 0007-fix-lib-naming.patch + 0008-add-arm64ec-support.patch 0013-define-WINVER.patch 0020-fix-aarch64-libswscale.patch 0024-fix-osx-host-c11.patch @@ -122,8 +123,12 @@ if(VCPKG_DETECTED_CMAKE_AR) get_filename_component(AR_path "${VCPKG_DETECTED_CMAKE_AR}" DIRECTORY) get_filename_component(AR_filename "${VCPKG_DETECTED_CMAKE_AR}" NAME) if(AR_filename MATCHES [[^(llvm-)?lib\.exe$]]) - set(ENV{AR} "ar-lib ${AR_filename}") - string(APPEND OPTIONS " --ar='ar-lib ${AR_filename}'") + set(AR_MACHINE "") + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64ec") + set(AR_MACHINE " -machine:arm64ec") + endif() + set(ENV{AR} "ar-lib ${AR_filename}${AR_MACHINE}") + string(APPEND OPTIONS " --ar='ar-lib ${AR_filename}${AR_MACHINE}'") else() set(ENV{AR} "${AR_filename}") string(APPEND OPTIONS " --ar='${AR_filename}'") @@ -608,7 +613,7 @@ else() set(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE}) endif() -if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64ec") if(VCPKG_TARGET_IS_WINDOWS) vcpkg_find_acquire_program(GASPREPROCESSOR) foreach(GAS_PATH ${GASPREPROCESSOR}) @@ -618,6 +623,11 @@ if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQU endif() endif() +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64ec") + string(APPEND OPTIONS " --as=\"armasm64.exe -machine ARM64EC\"") + string(APPEND OPTIONS " --extra-ldflags=/machine:arm64ec") +endif() + if(VCPKG_TARGET_IS_UWP) set(ENV{LIBPATH} "$ENV{LIBPATH};$ENV{_WKITS10}references\\windows.foundation.foundationcontract\\2.0.0.0\\;$ENV{_WKITS10}references\\windows.foundation.universalapicontract\\3.0.0.0\\") string(APPEND OPTIONS " --disable-programs") @@ -813,6 +823,8 @@ if(VCPKG_TARGET_IS_WINDOWS) set(LIB_MACHINE_ARG /machine:ARM) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") set(LIB_MACHINE_ARG /machine:ARM64) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64ec") + set(LIB_MACHINE_ARG /machine:ARM64EC) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(LIB_MACHINE_ARG /machine:x86) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") diff --git a/ports/ffmpeg/vcpkg.json b/ports/ffmpeg/vcpkg.json index e9067abe3303e3..cb81a750fa4016 100644 --- a/ports/ffmpeg/vcpkg.json +++ b/ports/ffmpeg/vcpkg.json @@ -1,6 +1,7 @@ { "name": "ffmpeg", "version": "8.0.1", + "port-version": 1, "description": [ "A library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.", "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations." diff --git a/scripts/cmake/vcpkg_find_acquire_program(GASPREPROCESSOR).cmake b/scripts/cmake/vcpkg_find_acquire_program(GASPREPROCESSOR).cmake index b2008644709431..42e81a3a08b11a 100644 --- a/scripts/cmake/vcpkg_find_acquire_program(GASPREPROCESSOR).cmake +++ b/scripts/cmake/vcpkg_find_acquire_program(GASPREPROCESSOR).cmake @@ -4,8 +4,8 @@ set(interpreter PERL) set(search_names "gas-preprocessor.pl") set(paths_to_search "${DOWNLOADS}/tools/gas-preprocessor/${tool_subdirectory}") set(rename_binary_to "gas-preprocessor.pl") -set(commit_id 9309c67acb535ca6248f092e96131d8eb07eefc1) +set(commit_id b2745758d9eee37a5bc6ee3c4901edc995d9343c) set(download_urls "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/${commit_id}/gas-preprocessor.pl") string(SUBSTRING ${commit_id} 0 8 tool_subdirectory) set(download_filename "gas-preprocessor-${tool_subdirectory}.pl") -set(download_sha512 b4749cf8aa758e3f28d4b21803422a5c2588f5fc48cfd317564606b374f8d739c636067cf7a4956d7365d63b055bc6e7626c304857e6c9013d6b4a0db9d8ad4f) +set(download_sha512 1ccb21d0feb75452f95d280173be30be1a034ac9c4e2f4c4ee3fe3918b82c60694b2bd015d3f6059e24a71ca68d4748738347b1c69d25d01bb335f24951b7d96) diff --git a/versions/baseline.json b/versions/baseline.json index 29dbc1b01606f4..2c82b37f7b3526 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2930,7 +2930,7 @@ }, "ffmpeg": { "baseline": "8.0.1", - "port-version": 0 + "port-version": 1 }, "ffmpeg-bin2c": { "baseline": "8.0.1", diff --git a/versions/f-/ffmpeg.json b/versions/f-/ffmpeg.json index b229d7f8d16a89..314615efb68558 100644 --- a/versions/f-/ffmpeg.json +++ b/versions/f-/ffmpeg.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "0130b1a190072eb0a8d4445bc250c71f07379014", + "version": "8.0.1", + "port-version": 1 + }, { "git-tree": "109d41404a6701389e5fedf92ff1c903798aff54", "version": "8.0.1",