diff options
| author | Yuri Valentini <yuroller@gmail.com> | 2019-05-09 22:06:36 +0200 |
|---|---|---|
| committer | Victor Romero <romerosanchezv@gmail.com> | 2019-05-09 13:06:36 -0700 |
| commit | 7c6ff87f5737b57b7b2363ea8951a481e6397734 (patch) | |
| tree | 87e2e4ea08e3c6ca0ae2029cb5bf715266b519da | |
| parent | f54e96af6fec5b9085b7b649d7d78811cd352693 (diff) | |
| download | vcpkg-7c6ff87f5737b57b7b2363ea8951a481e6397734.tar.gz vcpkg-7c6ff87f5737b57b7b2363ea8951a481e6397734.zip | |
[x264] build with asm on x64 x86 (#3269)
* [x264] build with asm on x64 x86
* [x264] build with asm on x64 x86
* [x264] Use Linux-style line endings in patch file
| -rw-r--r-- | ports/x264/CONTROL | 2 | ||||
| -rw-r--r-- | ports/x264/portfile.cmake | 20 | ||||
| -rw-r--r-- | ports/x264/uwp-cflags.patch | 24 |
3 files changed, 26 insertions, 20 deletions
diff --git a/ports/x264/CONTROL b/ports/x264/CONTROL index 66fda9bee..0d6d6a56d 100644 --- a/ports/x264/CONTROL +++ b/ports/x264/CONTROL @@ -1,3 +1,3 @@ Source: x264 -Version: 157-303c484ec828ed0-1 +Version: 157-303c484ec828ed0-2 Description: x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format diff --git a/ports/x264/portfile.cmake b/ports/x264/portfile.cmake index 67d7ab087..4dfb43683 100644 --- a/ports/x264/portfile.cmake +++ b/ports/x264/portfile.cmake @@ -8,17 +8,19 @@ vcpkg_from_github( REF 303c484ec828ed0d8bfe743500e70314d026c3bd SHA512 faf210a3f9543028ed882c8348b243dd7ae6638e7b3ef43bec1326b717f23370f57c13d0ddb5e1ae94411088a2e33031a137b68ae9f64c18f8f33f601a0da54d HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/uwp-cflags.patch + PATCHES + "uwp-cflags.patch" ) # Acquire tools vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86 OR VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + vcpkg_find_acquire_program(NASM) + get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) + set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") +endif() + # Insert msys into the path between the compiler toolset and windows system32. This prevents masking of "link.exe" but DOES mask "find.exe". string(REPLACE ";$ENV{SystemRoot}\\system32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}") set(ENV{PATH} "${NEWPATH}") @@ -27,7 +29,11 @@ set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) set(AUTOMAKE_DIR ${MSYS_ROOT}/usr/share/automake-1.15) #file(COPY ${AUTOMAKE_DIR}/config.guess ${AUTOMAKE_DIR}/config.sub DESTINATION ${SOURCE_PATH}/source) -set(CONFIGURE_OPTIONS "--host=i686-pc-mingw32 --enable-strip --disable-lavf --disable-swscale --disable-asm --disable-avs --disable-ffms --disable-gpac --disable-lsmash") +set(CONFIGURE_OPTIONS "--host=i686-pc-mingw32 --enable-strip --disable-lavf --disable-swscale --disable-avs --disable-ffms --disable-gpac --disable-lsmash") + +if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x86 AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --disable-asm") +endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --enable-shared") diff --git a/ports/x264/uwp-cflags.patch b/ports/x264/uwp-cflags.patch index fd04755bc..792e99927 100644 --- a/ports/x264/uwp-cflags.patch +++ b/ports/x264/uwp-cflags.patch @@ -1,12 +1,12 @@ -diff --git a/configure b/configure
-index f7b14d9..2c92b2a 100644
---- a/configure
-+++ b/configure
-@@ -821,7 +821,6 @@ if [ $SYS = WINDOWS ]; then
- if cpp_check "winapifamily.h" "" "!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)" ; then
- [ $compiler = CL ] || die "WinRT requires MSVC"
- define HAVE_WINRT
-- CFLAGS="$CFLAGS -MD"
- LDFLAGS="$LDFLAGS -appcontainer"
- if ! cpp_check "" "" "defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0603" ; then
- die "_WIN32_WINNT must be defined to at least 0x0603 (Windows 8.1) for WinRT"
+diff --git a/configure b/configure +index f7b14d9..2c92b2a 100644 +--- a/configure ++++ b/configure +@@ -821,7 +821,6 @@ if [ $SYS = WINDOWS ]; then + if cpp_check "winapifamily.h" "" "!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)" ; then + [ $compiler = CL ] || die "WinRT requires MSVC" + define HAVE_WINRT +- CFLAGS="$CFLAGS -MD" + LDFLAGS="$LDFLAGS -appcontainer" + if ! cpp_check "" "" "defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0603" ; then + die "_WIN32_WINNT must be defined to at least 0x0603 (Windows 8.1) for WinRT" |
