Skip to content

Commit

Permalink
[libvpx] Fix libvpx compilation (install process) (#17287)
Browse files Browse the repository at this point in the history
* Fix libvpx compilation (install process)

* [libvpx] Remove library and pdb suffixes.

* [ffmpeg] Remove fix for libvpx

* update version record

* Update ports/ffmpeg/CONTROL

* Update versions/f-/ffmpeg.json

* version

Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
  • Loading branch information
3 people committed Apr 19, 2021
1 parent 68fc55c commit 3ec41f5
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 78 deletions.
53 changes: 0 additions & 53 deletions ports/ffmpeg/0005-fix-libvpx-linking.patch

This file was deleted.

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: 4
Port-Version: 5
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
1 change: 0 additions & 1 deletion ports/ffmpeg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ vcpkg_from_github(
0001-create-lib-libraries.patch
0003-fix-windowsinclude.patch
0004-fix-debug-build.patch
0005-fix-libvpx-linking.patch
0006-fix-StaticFeatures.patch
0007-fix-lib-naming.patch
0008-Fix-wavpack-detection.patch
Expand Down
13 changes: 13 additions & 0 deletions ports/libvpx/0004-remove-library-suffixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/build/make/gen_msvs_vcxproj.sh b/build/make/gen_msvs_vcxproj.sh
index bb1c31d..9a0827e 100644
--- a/build/make/gen_msvs_vcxproj.sh
+++ b/build/make/gen_msvs_vcxproj.sh
@@ -377,7 +377,7 @@ generate_vcxproj() {
else
config_suffix=""
fi
- tag_content TargetName "${name}${lib_sfx}${config_suffix}"
+ tag_content TargetName "${name}"
fi
close_tag PropertyGroup
done
5 changes: 0 additions & 5 deletions ports/libvpx/CONTROL

This file was deleted.

19 changes: 5 additions & 14 deletions ports/libvpx/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ vcpkg_from_github(
0001-vcxproj-nasm.patch
0002-Fix-nasm-debug-format-flag.patch
0003-add-uwp-and-v142-support.patch
0004-remove-library-suffixes.patch
)

vcpkg_find_acquire_program(PERL)
Expand Down Expand Up @@ -99,23 +100,13 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)

# note: pdb file names are hardcoded in the lib file, cannot rename
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpxmd.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
else()
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpxmt.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
endif()
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpx.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
endif()

if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpxmdd.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
else()
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpxmtd.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
endif()
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpx.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
endif()

if (VCPKG_TARGET_ARCHITECTURE STREQUAL arm64)
Expand Down
4 changes: 2 additions & 2 deletions ports/libvpx/unofficial-libvpx-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if(NOT TARGET unofficial::libvpx::libvpx)
list(APPEND _IMPORT_CHECK_FILES "${_IMPORT_PREFIX}/include/vpx/vpx_codec.h")

# Add release configuration properties.
find_library(_LIBFILE_RELEASE NAMES vpx vpx@LIBVPX_CRT_SUFFIX@ PATHS "${_IMPORT_PREFIX}/lib/" NO_DEFAULT_PATH)
find_library(_LIBFILE_RELEASE NAMES vpx PATHS "${_IMPORT_PREFIX}/lib/" NO_DEFAULT_PATH)
set_property(TARGET unofficial::libvpx::libvpx
APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(unofficial::libvpx::libvpx PROPERTIES
Expand All @@ -25,7 +25,7 @@ if(NOT TARGET unofficial::libvpx::libvpx)

# Add debug configuration properties.
if(@LIBVPX_CONFIG_DEBUG@)
find_library(_LIBFILE_DEBUG NAMES vpx vpx@LIBVPX_CRT_SUFFIX@d PATHS "${_IMPORT_PREFIX}/debug/lib/" NO_DEFAULT_PATH)
find_library(_LIBFILE_DEBUG NAMES vpx PATHS "${_IMPORT_PREFIX}/debug/lib/" NO_DEFAULT_PATH)
set_property(TARGET unofficial::libvpx::libvpx
APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(unofficial::libvpx::libvpx PROPERTIES
Expand Down
7 changes: 7 additions & 0 deletions ports/libvpx/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "libvpx",
"version-semver": "1.9.0",
"port-version": 8,
"description": "The reference software implementation for the video coding formats VP8 and VP9.",
"homepage": "https://github.com/webmproject/libvpx"
}
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,7 @@
},
"ffmpeg": {
"baseline": "4.3.2",
"port-version": 4
"port-version": 5
},
"ffnvcodec": {
"baseline": "10.0.26.0",
Expand Down Expand Up @@ -3602,7 +3602,7 @@
},
"libvpx": {
"baseline": "1.9.0",
"port-version": 7
"port-version": 8
},
"libwandio": {
"baseline": "4.2.1",
Expand Down
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": "68f6d071ba23bf8ad28a12a507c8089a47a76d73",
"version-string": "4.3.2",
"port-version": 5
},
{
"git-tree": "993a1a305ccef12934ba4b72648ba205498841f7",
"version-string": "4.3.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libvpx.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b3c25e1e8a48e31e14fb824fd7b8b618266093b9",
"version-semver": "1.9.0",
"port-version": 8
},
{
"git-tree": "09c64743d3dc62d2fa0ef55ef52b7bdad45cea0c",
"version-string": "1.9.0",
Expand Down

0 comments on commit 3ec41f5

Please sign in to comment.