aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias C. M. Troffaes <matthias.troffaes@gmail.com>2020-12-29 23:43:54 +0000
committerGitHub <noreply@github.com>2020-12-29 15:43:54 -0800
commitba1c3aa63e17e15b59e17d53cf8fde9a2a9080ac (patch)
tree29c0f93e870e9e61a34fca55e644652c85727700
parent8f8f7168ee0a524d4f71e632fd5cf2936d96469c (diff)
downloadvcpkg-ba1c3aa63e17e15b59e17d53cf8fde9a2a9080ac.tar.gz
vcpkg-ba1c3aa63e17e15b59e17d53cf8fde9a2a9080ac.zip
[libvpx] switch from yasm to nasm (#14545)
* [libvpx] switch from yasm to nasm * [vcpkg] install nasm on azure for osx * Revert "[vcpkg] install nasm on azure for osx" This reverts commit f65ad1bdadb7b7b3a3b056186665f102b4f9aded. * [VMSS] Install nasm on OSX * [libvpx] bump port version * [libvpx] Add --as=nasm for non-MSVC triplets * [libvpx] Fix nasm debug format flag * Back out nasm change applied in https://github.com/microsoft/vcpkg/pull/15258 Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Long Nguyen <nguyen.long.908132@gmail.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
-rw-r--r--ports/libvpx/0001-vcxproj-nasm.patch22
-rw-r--r--ports/libvpx/0002-Fix-nasm-debug-format-flag.patch21
-rw-r--r--ports/libvpx/CONTROL3
-rw-r--r--ports/libvpx/portfile.cmake11
4 files changed, 53 insertions, 4 deletions
diff --git a/ports/libvpx/0001-vcxproj-nasm.patch b/ports/libvpx/0001-vcxproj-nasm.patch
new file mode 100644
index 000000000..eb6333c81
--- /dev/null
+++ b/ports/libvpx/0001-vcxproj-nasm.patch
@@ -0,0 +1,22 @@
+diff --git a/build/make/gen_msvs_vcxproj.sh b/build/make/gen_msvs_vcxproj.sh
+index bb1c31d23..b634b0609 100755
+--- a/build/make/gen_msvs_vcxproj.sh
++++ b/build/make/gen_msvs_vcxproj.sh
+@@ -247,13 +247,13 @@ libs=${libs// /;}
+ case "$target" in
+ x86_64*)
+ platforms[0]="x64"
+- asm_Debug_cmdline="yasm -Xvc -g cv8 -f win64 ${yasmincs} &quot;%(FullPath)&quot;"
+- asm_Release_cmdline="yasm -Xvc -f win64 ${yasmincs} &quot;%(FullPath)&quot;"
++ asm_Debug_cmdline="nasm -Xvc -gcv8 -f win64 ${yasmincs} &quot;%(FullPath)&quot;"
++ asm_Release_cmdline="nasm -Xvc -f win64 ${yasmincs} &quot;%(FullPath)&quot;"
+ ;;
+ x86*)
+ platforms[0]="Win32"
+- asm_Debug_cmdline="yasm -Xvc -g cv8 -f win32 ${yasmincs} &quot;%(FullPath)&quot;"
+- asm_Release_cmdline="yasm -Xvc -f win32 ${yasmincs} &quot;%(FullPath)&quot;"
++ asm_Debug_cmdline="nasm -Xvc -gcv8 -f win32 ${yasmincs} &quot;%(FullPath)&quot;"
++ asm_Release_cmdline="nasm -Xvc -f win32 ${yasmincs} &quot;%(FullPath)&quot;"
+ ;;
+ arm64*)
+ platforms[0]="ARM64"
diff --git a/ports/libvpx/0002-Fix-nasm-debug-format-flag.patch b/ports/libvpx/0002-Fix-nasm-debug-format-flag.patch
new file mode 100644
index 000000000..92f1bbac5
--- /dev/null
+++ b/ports/libvpx/0002-Fix-nasm-debug-format-flag.patch
@@ -0,0 +1,21 @@
+diff --git a/build/make/configure.sh b/build/make/configure.sh
+index 206b54f..49cd13e 100644
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -1361,12 +1361,14 @@ EOF
+ case ${tgt_os} in
+ win32)
+ add_asflags -f win32
+- enabled debug && add_asflags -g cv8
++ enabled debug && [ "${AS}" = yasm ] && add_asflags -g cv8
++ enabled debug && [ "${AS}" = nasm ] && add_asflags -gcv8
+ EXE_SFX=.exe
+ ;;
+ win64)
+ add_asflags -f win64
+- enabled debug && add_asflags -g cv8
++ enabled debug && [ "${AS}" = yasm ] && add_asflags -g cv8
++ enabled debug && [ "${AS}" = nasm ] && add_asflags -gcv8
+ EXE_SFX=.exe
+ ;;
+ linux*|solaris*|android*)
diff --git a/ports/libvpx/CONTROL b/ports/libvpx/CONTROL
index 1b171c91a..484cd3bbe 100644
--- a/ports/libvpx/CONTROL
+++ b/ports/libvpx/CONTROL
@@ -1,7 +1,6 @@
Source: libvpx
Version: 1.9.0
-Port-Version: 4
+Port-Version: 5
Homepage: https://github.com/webmproject/libvpx
Description: The reference software implementation for the video coding formats VP8 and VP9.
Supports: !(uwp&arm)
-Build-Depends: yasm-tool-helper
diff --git a/ports/libvpx/portfile.cmake b/ports/libvpx/portfile.cmake
index fb6a161ed..706b68b94 100644
--- a/ports/libvpx/portfile.cmake
+++ b/ports/libvpx/portfile.cmake
@@ -8,6 +8,9 @@ vcpkg_from_github(
REF v${LIBVPX_VERSION}
SHA512 8d544552b35000ea5712aec220b78bb5f7dc210704b2f609365214cb95a4f5a0e343b362723d829cb4a9ac203b10d5443700ba84b28fd6b2fefbabb40663e298
HEAD_REF master
+ PATCHES
+ 0001-vcxproj-nasm.patch
+ 0002-Fix-nasm-debug-format-flag.patch
)
vcpkg_find_acquire_program(PERL)
@@ -23,8 +26,9 @@ else()
set(ENV{PATH} "${MSYS_ROOT}/usr/bin:$ENV{PATH}:${PERL_EXE_PATH}")
endif()
-include(${CURRENT_INSTALLED_DIR}/share/yasm-tool-helper/yasm-tool-helper.cmake)
-yasm_tool_helper(PREPEND_TO_PATH OUT_VAR ENV{AS})
+vcpkg_find_acquire_program(NASM)
+get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
+vcpkg_add_to_path(${NASM_EXE_PATH})
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
@@ -64,6 +68,7 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
--disable-examples
--disable-tools
--disable-docs
+ --as=nasm
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}"
LOGNAME configure-${TARGET_TRIPLET})
@@ -164,6 +169,7 @@ else()
--target=${LIBVPX_TARGET}
${OPTIONS}
${OPTIONS_RELEASE}
+ --as=nasm
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel"
LOGNAME configure-${TARGET_TRIPLET}-rel)
@@ -196,6 +202,7 @@ else()
--target=${LIBVPX_TARGET}
${OPTIONS}
${OPTIONS_DEBUG}
+ --as=nasm
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
LOGNAME configure-${TARGET_TRIPLET}-dbg)