diff options
| author | Stefano Sinigardi <stesinigardi@hotmail.com> | 2021-04-15 22:55:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-15 13:55:28 -0700 |
| commit | a267ab118c09f56f3dae96c9a4b3410820ad2f0b (patch) | |
| tree | 0e68de32a62a9ee771e02e516d43ee268ac0673d /ports | |
| parent | 2bdc34f664583c138c617dc54729097840414735 (diff) | |
| download | vcpkg-a267ab118c09f56f3dae96c9a4b3410820ad2f0b.tar.gz vcpkg-a267ab118c09f56f3dae96c9a4b3410820ad2f0b.zip | |
[ffmpeg] add -fPIC (#17298)
* [ffmpeg] enable position-independent-code
* [ffmpeg] update version refs
* [ffmpeg] fix regressions
* [ffmpeg] fix refs
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/ffmpeg/CONTROL | 2 | ||||
| -rw-r--r-- | ports/ffmpeg/portfile.cmake | 20 |
2 files changed, 16 insertions, 6 deletions
diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index 6c0b0ca21..dc4c2d215 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,6 +1,6 @@ Source: ffmpeg Version: 4.3.2 -Port-Version: 3 +Port-Version: 4 Homepage: https://ffmpeg.org 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/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 23769742a..ca1ac781d 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -46,7 +46,17 @@ else() set(LIB_PATH_VAR "LIBRARY_PATH") endif() -set(OPTIONS "--enable-asm --enable-x86asm --disable-doc --enable-debug --enable-runtime-cpudetect") +set(OPTIONS "--enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect") + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(OPTIONS "${OPTIONS} --disable-asm --disable-x86asm") +endif() +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(OPTIONS "${OPTIONS} --enable-asm --disable-x86asm") +endif() +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(OPTIONS "${OPTIONS} --enable-asm --enable-x86asm") +endif() if(VCPKG_TARGET_IS_WINDOWS) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") @@ -575,7 +585,7 @@ endif() if(VCPKG_TARGET_IS_WINDOWS) file(GLOB DEF_FILES ${CURRENT_PACKAGES_DIR}/lib/*.def ${CURRENT_PACKAGES_DIR}/debug/lib/*.def) - + if(NOT VCPKG_TARGET_IS_MINGW) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") set(LIB_MACHINE_ARG /machine:ARM) @@ -603,7 +613,7 @@ if(VCPKG_TARGET_IS_WINDOWS) ) endforeach() endif() - + file(GLOB EXP_FILES ${CURRENT_PACKAGES_DIR}/lib/*.exp ${CURRENT_PACKAGES_DIR}/debug/lib/*.exp) file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) if(VCPKG_TARGET_IS_MINGW) @@ -636,7 +646,7 @@ vcpkg_copy_pdbs() if (VCPKG_TARGET_IS_WINDOWS) # Translate cygpath to local path set(CYGPATH_CMD "${MSYS_ROOT}/usr/bin/cygpath.exe" -w) - + foreach(PKGCONFIG_PATH "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig") file(GLOB PKGCONFIG_FILES "${PKGCONFIG_PATH}/*.pc") foreach(PKGCONFIG_FILE IN LISTS PKGCONFIG_FILES) @@ -665,7 +675,7 @@ if (VCPKG_TARGET_IS_WINDOWS) ) string(REPLACE "\n" "" FIXED_INCLUDE_PATH "${FIXED_INCLUDE_PATH}") file(TO_CMAKE_PATH ${FIXED_INCLUDE_PATH} FIXED_INCLUDE_PATH) - + vcpkg_replace_string("${PKGCONFIG_FILE}" "${prefix_cygpath}" "${FIXED_PREFIX_PATH}") vcpkg_replace_string("${PKGCONFIG_FILE}" "${libdir_cygpath}" "${FIXED_LIBDIR_PATH}") vcpkg_replace_string("${PKGCONFIG_FILE}" "${includedir_cygpath}" "${FIXED_INCLUDE_PATH}") |
