diff options
| author | driver1998 <driver1998.ms@outlook.com> | 2019-06-07 07:04:28 +0800 |
|---|---|---|
| committer | Curtis J Bezault <curtbezault@gmail.com> | 2019-06-06 16:04:27 -0700 |
| commit | a85359f7d30cd7caf60671916e2e1f178d329b52 (patch) | |
| tree | 5135d46b0c26b112a594baf794b0536bfb62e38d | |
| parent | 99825d9ebfb3880be8782a898026c33e15fb2d28 (diff) | |
| download | vcpkg-a85359f7d30cd7caf60671916e2e1f178d329b52.tar.gz vcpkg-a85359f7d30cd7caf60671916e2e1f178d329b52.zip | |
ffmpeg: enable arm/arm64 windows support (#6590)
* ffmpeg: enable arm/arm64 windows support
* ffmpeg: fix x64-uwp
* ffmpeg: remove outdated patch
* ffmpeg: remove outdated patch
| -rw-r--r-- | ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-1.patch | 4 | ||||
| -rw-r--r-- | ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-2.patch | 4 | ||||
| -rw-r--r-- | ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-3.patch | 19 | ||||
| -rw-r--r-- | ports/ffmpeg/portfile.cmake | 36 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_find_acquire_program.cmake | 4 |
5 files changed, 27 insertions, 40 deletions
diff --git a/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-1.patch b/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-1.patch index 345061c3f..09ee1219f 100644 --- a/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-1.patch +++ b/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-1.patch @@ -1,5 +1,5 @@ ---- a/cmdutils.c 2017-07-29 19:49:29.000000000 +0200 -+++ b/cmdutils.c 2018-09-02 20:31:42.509408400 +0200 +--- a/fftools/cmdutils.c 2017-07-29 19:49:29.000000000 +0200 ++++ b/fftools/cmdutils.c 2018-09-02 20:31:42.509408400 +0200 @@ -62,6 +62,8 @@ #include <sys/resource.h> #endif diff --git a/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-2.patch b/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-2.patch index fc63f1486..69d725e2a 100644 --- a/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-2.patch +++ b/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-2.patch @@ -1,5 +1,5 @@ ---- a/ffmpeg.c 2017-07-29 19:49:29.000000000 +0200 -+++ b/ffmpeg.c 2018-09-02 20:32:27.666725200 +0200 +--- a/fftools/ffmpeg.c 2017-07-29 19:49:29.000000000 +0200 ++++ b/fftools/ffmpeg.c 2018-09-02 20:32:27.666725200 +0200 @@ -23,6 +23,11 @@ * multimedia converter based on the FFmpeg libraries */ diff --git a/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-3.patch b/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-3.patch deleted file mode 100644 index 78aa3d2d0..000000000 --- a/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-3.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/ffmpeg_dxva2.c 2017-07-29 19:49:29.000000000 +0200 -+++ b/ffmpeg_dxva2.c 2018-09-02 20:33:48.248716100 +0200 -@@ -16,12 +16,14 @@ - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - --#include <windows.h> -- - #ifdef _WIN32_WINNT - #undef _WIN32_WINNT - #endif - #define _WIN32_WINNT 0x0600 -+#define WIN32_LEAN_AND_MEAN -+ -+#include <windows.h> -+ - #define DXVA2API_USE_BITFIELDS - #define COBJMACROS - diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index af67764e6..c87da38c0 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -15,7 +15,6 @@ vcpkg_extract_source_archive_ex( configure_opencv.patch fix_windowsinclude-in-ffmpegexe-1.patch fix_windowsinclude-in-ffmpegexe-2.patch - fix_windowsinclude-in-ffmpegexe-3.patch ) if (${SOURCE_PATH} MATCHES " ") @@ -41,7 +40,7 @@ if (WIN32) set(BUILD_SCRIPT ${CMAKE_CURRENT_LIST_DIR}\\build.sh) - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") vcpkg_acquire_msys(MSYS_ROOT PACKAGES perl gcc diffutils make) else() vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils make) @@ -119,27 +118,32 @@ else() set(OPTIONS "${OPTIONS} --disable-bzlib") endif() +set(OPTIONS_CROSS "") + +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(OPTIONS_CROSS " --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") + vcpkg_find_acquire_program(GASPREPROCESSOR) + foreach(GAS_PATH ${GASPREPROCESSOR}) + get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY) + set(ENV{PATH} "$ENV{PATH};${GAS_ITEM_PATH}") + endforeach(GAS_PATH) +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") +else() + message(FATAL_ERROR "Unsupported architecture") +endif() + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") 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\\") - set(OPTIONS "${OPTIONS} --disable-programs --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") + set(OPTIONS "${OPTIONS} --disable-programs") set(OPTIONS "${OPTIONS} --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00") - - if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - vcpkg_find_acquire_program(GASPREPROCESSOR) - foreach(GAS_PATH ${GASPREPROCESSOR}) - get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY) - set(ENV{PATH} "$ENV{PATH};${GAS_ITEM_PATH}") - endforeach(GAS_PATH) - elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - else() - message(FATAL_ERROR "Unsupported architecture") - endif() + set(OPTIONS_CROSS " --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") endif() set(OPTIONS_DEBUG "") # Note: --disable-optimizations can't be used due to http://ffmpeg.org/pipermail/libav-user/2013-March/003945.html set(OPTIONS_RELEASE "") +set(OPTIONS "${OPTIONS} ${OPTIONS_CROSS}") set(OPTIONS "${OPTIONS} --extra-cflags=-DHAVE_UNISTD_H=0") if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") @@ -194,6 +198,8 @@ file(GLOB DEF_FILES ${CURRENT_PACKAGES_DIR}/lib/*.def ${CURRENT_PACKAGES_DIR}/de if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") set(LIB_MACHINE_ARG /machine:ARM) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(LIB_MACHINE_ARG /machine:ARM64) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(LIB_MACHINE_ARG /machine:x86) elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 1e14ae175..4a77b4b8e 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -202,9 +202,9 @@ function(vcpkg_find_acquire_program VAR) set(REQUIRED_INTERPRETER PERL) set(SCRIPTNAME "gas-preprocessor.pl") set(PATHS ${DOWNLOADS}/tools/gas-preprocessor) - set(URL "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/36bacb4cba27003c572e5bf7a9c4dfe3c9a8d40d/gas-preprocessor.pl") + set(URL "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/cbe88474ec196370161032a3863ec65050f70ba4/gas-preprocessor.pl") set(ARCHIVE "gas-preprocessor.pl") - set(HASH a25caadccd1457a0fd2abb5a0da9aca1713b2c351d76daf87a4141e52021f51aa09e95a62942c6f0764f79cc1fa65bf71584955b09e62ee7da067b5c82baf6b3) + set(HASH f6965875608bf2a3ee337e00c3f16e06cd9b5d10013da600d2a70887e47a7b4668af87b3524acf73dd122475712af831495a613a2128c1adb5fe0b4a11d96cd3) elseif(VAR MATCHES "DARK") set(PROGNAME dark) set(SUBDIR "wix311-binaries") |
