Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/ffmpeg/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: ffmpeg
Version: 4.3.2
Port-Version: 2
Port-Version: 3
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.
Expand Down
18 changes: 9 additions & 9 deletions ports/ffmpeg/FindFFMPEG.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function(find_platform_dependent_optional_libraries)
set(FFMPEG_PLATFORM_DEPENDENT_LIBS ${FFMPEG_PLATFORM_DEPENDENT_LIBS} PARENT_SCOPE)
endfunction()

set(FFMPEG_VERSION "4.3.2")
set(FFMPEG_VERSION "@FFMPEG_VERSION@")

find_dependency(Threads)
if(UNIX)
Expand Down Expand Up @@ -409,28 +409,28 @@ FFMPEG_FIND(libavutil avutil avutil.h)
if (FFMPEG_libavutil_FOUND)
list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS)
list(REMOVE_DUPLICATES FFMPEG_LIBRARY_DIRS)
set(FFMPEG_libavutil_VERSION "56.51.100" CACHE STRING "")
set(FFMPEG_libavutil_VERSION "@LIBAVUTIL_VERSION@" CACHE STRING "")

if(FFMPEG_libavcodec_FOUND)
set(FFMPEG_libavcodec_VERSION "58.91.100" CACHE STRING "")
set(FFMPEG_libavcodec_VERSION "@LIBAVCODEC_VERSION@" CACHE STRING "")
endif()
if(FFMPEG_libavdevice_FOUND)
set(FFMPEG_libavdevice_VERSION "58.10.100" CACHE STRING "")
set(FFMPEG_libavdevice_VERSION "@LIBAVDEVICE_VERSION@" CACHE STRING "")
endif()
if(FFMPEG_libavfilter_FOUND)
set(FFMPEG_libavfilter_VERSION "7.85.100" CACHE STRING "")
set(FFMPEG_libavfilter_VERSION "@LIBAVFILTER_VERSION@" CACHE STRING "")
endif()
if(FFMPEG_libavformat_FOUND)
set(FFMPEG_libavformat_VERSION "58.45.100" CACHE STRING "")
set(FFMPEG_libavformat_VERSION "@LIBAVFORMAT_VERSION@" CACHE STRING "")
endif()
if(FFMPEG_libavresample_FOUND)
set(FFMPEG_libavresample_VERSION "4.0.0" CACHE STRING "")
set(FFMPEG_libavresample_VERSION "@LIBAVRESAMPLE_VERSION@" CACHE STRING "")
endif()
if(FFMPEG_libswresample_FOUND)
set(FFMPEG_libswresample_VERSION "3.7.100" CACHE STRING "")
set(FFMPEG_libswresample_VERSION "@LIBSWRESAMPLE_VERSION@" CACHE STRING "")
endif()
if(FFMPEG_libswscale_FOUND)
set(FFMPEG_libswscale_VERSION "5.7.100" CACHE STRING "")
set(FFMPEG_libswscale_VERSION "@LIBSWSCALE_VERSION@" CACHE STRING "")
endif()

list(APPEND FFMPEG_LIBRARIES
Expand Down
56 changes: 56 additions & 0 deletions ports/ffmpeg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,62 @@ endif()

vcpkg_fixup_pkgconfig()

# Handle version strings

function(extract_regex_from_file out)
cmake_parse_arguments(PARSE_ARGV 1 "arg" "" "FILE;REGEX" "")
file(READ "${arg_FILE}" contents)
if (contents MATCHES "${arg_REGEX}")
if(NOT CMAKE_MATCH_COUNT EQUAL 1)
message(FATAL_ERROR "Could not identify match group in regular expression \"${arg_REGEX}\"")
endif()
else()
message(FATAL_ERROR "Could not find line matching \"${arg_REGEX}\" in file \"${arg_FILE}\"")
endif()
set("${out}" "${CMAKE_MATCH_1}" PARENT_SCOPE)
endfunction()

function(extract_version_from_component out)
cmake_parse_arguments(PARSE_ARGV 1 "arg" "" "COMPONENT" "")
string(TOLOWER "${arg_COMPONENT}" component_lower)
string(TOUPPER "${arg_COMPONENT}" component_upper)
extract_regex_from_file(major_version
FILE "${SOURCE_PATH}/${component_lower}/version.h"
REGEX "#define ${component_upper}_VERSION_MAJOR[ ]+([0-9]+)"
)
extract_regex_from_file(minor_version
FILE "${SOURCE_PATH}/${component_lower}/version.h"
REGEX "#define ${component_upper}_VERSION_MINOR[ ]+([0-9]+)"
)
extract_regex_from_file(micro_version
FILE "${SOURCE_PATH}/${component_lower}/version.h"
REGEX "#define ${component_upper}_VERSION_MICRO[ ]+([0-9]+)"
)
set("${out}" "${major_version}.${minor_version}.${micro_version}" PARENT_SCOPE)
endfunction()

extract_regex_from_file(FFMPEG_VERSION
FILE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libavutil/ffversion.h"
REGEX "#define FFMPEG_VERSION[ ]+\"(.+)\""
)

extract_version_from_component(LIBAVUTIL_VERSION
COMPONENT libavutil)
extract_version_from_component(LIBAVCODEC_VERSION
COMPONENT libavcodec)
extract_version_from_component(LIBAVDEVICE_VERSION
COMPONENT libavdevice)
extract_version_from_component(LIBAVFILTER_VERSION
COMPONENT libavfilter)
extract_version_from_component( LIBAVFORMAT_VERSION
COMPONENT libavformat)
extract_version_from_component(LIBAVRESAMPLE_VERSION
COMPONENT libavresample)
extract_version_from_component(LIBSWRESAMPLE_VERSION
COMPONENT libswresample)
extract_version_from_component(LIBSWSCALE_VERSION
COMPONENT libswscale)

# Handle 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")
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1942,7 +1942,7 @@
},
"ffmpeg": {
"baseline": "4.3.2",
"port-version": 2
"port-version": 3
},
"ffnvcodec": {
"baseline": "10.0.26.0",
Expand Down Expand Up @@ -6613,4 +6613,4 @@
"port-version": 1
}
}
}
}
5 changes: 5 additions & 0 deletions versions/f-/ffmpeg.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d70a90e893854dbcb0efbe740f286baf47adafef",
"version-string": "4.3.2",
"port-version": 3
},
{
"git-tree": "95a584d785f17bb9158d505bedfda26aa1c52db1",
"version-string": "4.3.2",
Expand Down