diff options
| author | JackBoosY <yuzaiyang@beyondsoft.com> | 2020-01-13 23:55:59 -0800 |
|---|---|---|
| committer | JackBoosY <yuzaiyang@beyondsoft.com> | 2020-01-13 23:55:59 -0800 |
| commit | 2514481b42ebdeec28649582fc666955cf206c84 (patch) | |
| tree | 60c9809a5c3c8adbad240a40b1088a6f8e42c019 /ports/ffmpeg | |
| parent | b751326c91c9a307aaf5e340b61ab9f2d1ad45a4 (diff) | |
| parent | 28eee51adb36f2165be846e77ef7b3ee5b3f8789 (diff) | |
| download | vcpkg-2514481b42ebdeec28649582fc666955cf206c84.tar.gz vcpkg-2514481b42ebdeec28649582fc666955cf206c84.zip | |
Merge branch 'master' of https://github.com/Microsoft/vcpkg into dev/jack/upgrade_libi
Diffstat (limited to 'ports/ffmpeg')
| -rw-r--r-- | ports/ffmpeg/CONTROL | 5 | ||||
| -rw-r--r-- | ports/ffmpeg/portfile.cmake | 26 |
2 files changed, 26 insertions, 5 deletions
diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index e8f12f97e..faebf0d86 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,5 +1,5 @@ Source: ffmpeg -Version: 4.2-1 +Version: 4.2-2 Build-Depends: zlib 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. @@ -48,5 +48,8 @@ Description: allow nonfree and unredistributable libraries Feature: gpl Description: allow GPL licensed libraries +Feature: version3 +Description: upgrade (L)GPL to version 3 + Feature: avresample Description: Libav audio resampling library support in ffmpeg diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 71bea6e95..7adee3a8b 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -67,6 +67,10 @@ if("gpl" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} --enable-gpl") endif() +if("version3" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-version3") +endif() + if("openssl" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} --enable-openssl") else() @@ -178,9 +182,9 @@ set(ENV_LIB_PATH "$ENV{${LIB_PATH_VAR}}") message(STATUS "Building Options: ${OPTIONS}") -# Relase build +# Release build if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) - message(STATUS "Building Relase Options: ${OPTIONS_RELEASE}") + message(STATUS "Building Release Options: ${OPTIONS_RELEASE}") set(ENV{${LIB_PATH_VAR}} "${CURRENT_INSTALLED_DIR}/lib${SEP}${ENV_LIB_PATH}") set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE}") set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}") @@ -257,8 +261,22 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR vcpkg_copy_pdbs() # Handle copyright -# TODO: Examine build log and confirm that this license matches the build output -file(INSTALL ${SOURCE_PATH}/COPYING.LGPLv2.1 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(STRINGS ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-out.log LICENSE_STRING REGEX "License: .*" LIMIT_COUNT 1) +if(${LICENSE_STRING} STREQUAL "License: LGPL version 2.1 or later") + set(LICENSE_FILE "COPYING.LGPLv2.1") +elseif(${LICENSE_STRING} STREQUAL "License: LGPL version 3 or later") + set(LICENSE_FILE "COPYING.LGPLv3") +elseif(${LICENSE_STRING} STREQUAL "License: GPL version 2 or later") + set(LICENSE_FILE "COPYING.GPLv2") +elseif(${LICENSE_STRING} STREQUAL "License: GPL version 3 or later") + set(LICENSE_FILE "COPYING.GPLv3") +elseif(${LICENSE_STRING} STREQUAL "License: nonfree and unredistributable") + set(LICENSE_FILE "COPYING.NONFREE") + file(WRITE ${SOURCE_PATH}/${LICENSE_FILE} ${LICENSE_STRING}) +else() + message(FATAL_ERROR "Failed to identify license (${LICENSE_STRING})") +endif() +file(INSTALL ${SOURCE_PATH}/${LICENSE_FILE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) configure_file(${CMAKE_CURRENT_LIST_DIR}/FindFFMPEG.cmake.in ${CURRENT_PACKAGES_DIR}/share/${PORT}/FindFFMPEG.cmake @ONLY) file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) |
