Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[avcpp] Add new port #17716

Merged
merged 4 commits into from
May 18, 2021
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
14 changes: 14 additions & 0 deletions ports/avcpp/0001-remove-problematic-compound-literal.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/src/avutils.h b/src/avutils.h
index 29c4ae0..3bfaf82 100644
--- a/src/avutils.h
+++ b/src/avutils.h
@@ -42,7 +42,7 @@ namespace av {
// Basic FFmpeg constants
constexpr auto NoPts = static_cast<int64_t>(AV_NOPTS_VALUE);
constexpr auto TimeBase = static_cast<int>(AV_TIME_BASE);
-constexpr auto TimeBaseQ = static_cast<AVRational>(AV_TIME_BASE_Q);
+constexpr auto TimeBaseQ = AVRational{1, AV_TIME_BASE};


template<typename R, typename T>

34 changes: 34 additions & 0 deletions ports/avcpp/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# avcpp doesn't export any symbols
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO h4tr3d/avcpp
REF d1a39cf6e1ccfe78ababe5a65d02d57f1e65bea1
SHA512 48eb3bdd8729c9f61c53b152f0bb7283b40d2c8f043a1d6bb4fb1fadb0ceebf754822eeb7fa85edcacbca267eea0999dd9e78e378b04984db6dc25f9a6fab7d0
HEAD_REF master
PATCHES
0001-remove-problematic-compound-literal.patch
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" AVCPP_ENABLE_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" AVCPP_ENABLE_SHARED)

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DAV_ENABLE_STATIC=${AVCPP_ENABLE_STATIC}
-DAV_ENABLE_SHARED=${AVCPP_ENABLE_SHARED}
-DAV_BUILD_EXAMPLES=OFF
-DBUILD_TESTING=OFF
)
vcpkg_cmake_install()

vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

vcpkg_copy_pdbs()
28 changes: 28 additions & 0 deletions ports/avcpp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "avcpp",
"version-date": "2021-05-06",
"description": "Wrapper for the FFmpeg that simplify usage it from C++ projects.",
"homepage": "https://github.com/h4tr3d/avcpp",
"dependencies": [
{
"name": "ffmpeg",
"default-features": false,
"features": [
"avcodec",
"avdevice",
"avfilter",
"avformat",
"swresample",
"swscale"
]
},
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
9 changes: 9 additions & 0 deletions versions/a-/avcpp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "aa82b322b6c59cf758147d78664f3d7ce66a77dc",
"version-date": "2021-05-06",
"port-version": 0
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@
"baseline": "20.8.1",
"port-version": 0
},
"avcpp": {
"baseline": "2021-05-06",
"port-version": 0
},
"avisynthplus": {
"baseline": "3.7.0",
"port-version": 0
Expand Down