mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:01:48 +08:00
[libzen,libmediainfo] Updates, fix dependencies (#31141)
* [libzen] Update, fix pkgconfig * [libmediainfo] Update, fix dependencies * [libzen] Restore package name * [libmediainfo] Fix dependencies * Fix pkgconfig * [libmediainfo] Patch out local windows namespace * [libmediainfo] Update to 23.04
This commit is contained in:
parent
c1c3932f77
commit
cb1301e997
26
ports/libmediainfo/dependencies.diff
Normal file
26
ports/libmediainfo/dependencies.diff
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/Project/CMake/cmake/modules/FindTinyXML.cmake b/Project/CMake/cmake/modules/FindTinyXML.cmake
|
||||
index af97107..4667b65 100644
|
||||
--- a/Project/CMake/cmake/modules/FindTinyXML.cmake
|
||||
+++ b/Project/CMake/cmake/modules/FindTinyXML.cmake
|
||||
@@ -23,7 +23,7 @@ endif(PKG_CONFIG_FOUND)
|
||||
|
||||
set(TinyXML_INCLUDE_DIRS ${PC_TINYXML_INCLUDE_DIRS} CACHE PATH "TinyXML include directory" FORCE)
|
||||
set(TinyXML_LIBRARY_DIRS ${PC_TINYXML_LIBRARY_DIRS} CACHE PATH "TinyXML library directory" FORCE)
|
||||
-set(TinyXML_LIBRARIES ${PC_TINYXML_LIBRARIES} CACHE STRING "TinyXML libraries" FORCE)
|
||||
+set(TinyXML_LIBRARIES ${PC_TINYXML_LINK_LIBRARIES} CACHE STRING "TinyXML libraries" FORCE)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(TinyXML
|
||||
diff --git a/Project/CMake/libmediainfo.pc.in b/Project/CMake/libmediainfo.pc.in
|
||||
index 31e53fe..0829d71 100644
|
||||
--- a/Project/CMake/libmediainfo.pc.in
|
||||
+++ b/Project/CMake/libmediainfo.pc.in
|
||||
@@ -8,6 +8,6 @@ Name: libmediainfo
|
||||
Version: @MediaInfoLib_VERSION@
|
||||
Description: MediaInfoLib
|
||||
Requires: libzen
|
||||
-Requires.private:@CURL_PC@
|
||||
-Libs: -L${libdir} -lmediainfo -lz
|
||||
+Requires.private: libcurl tinyxml2 zlib
|
||||
+Libs: -L${libdir} -lmediainfo
|
||||
Cflags: -I${includedir}
|
25
ports/libmediainfo/msvc-arm.diff
Normal file
25
ports/libmediainfo/msvc-arm.diff
Normal file
@ -0,0 +1,25 @@
|
||||
diff --git a/Source/ThirdParty/aes-gladman/aesopt.h b/Source/ThirdParty/aes-gladman/aesopt.h
|
||||
index d3ac0f9..eeefa40 100644
|
||||
--- a/Source/ThirdParty/aes-gladman/aesopt.h
|
||||
+++ b/Source/ThirdParty/aes-gladman/aesopt.h
|
||||
@@ -183,7 +183,7 @@ Issue Date: 20/12/2007
|
||||
AES_REV_DKS must NOT be defined when such assembler files are
|
||||
built
|
||||
*/
|
||||
-#if 1 && defined( _WIN64 ) && defined( _MSC_VER )
|
||||
+#if 1 && defined( _WIN64 ) && defined( _MSC_VER ) && defined( _M_AMD64 )
|
||||
# define INTEL_AES_POSSIBLE
|
||||
#endif
|
||||
|
||||
diff --git a/Source/ThirdParty/aes-gladman/brg_endian.h b/Source/ThirdParty/aes-gladman/brg_endian.h
|
||||
index b44c5cb..6ba31c1 100644
|
||||
--- a/Source/ThirdParty/aes-gladman/brg_endian.h
|
||||
+++ b/Source/ThirdParty/aes-gladman/brg_endian.h
|
||||
@@ -101,6 +101,7 @@ Issue Date: 20/12/2007
|
||||
defined( __i386__ ) || defined( _M_I86 ) || defined( _M_IX86 ) || \
|
||||
defined( __OS2__ ) || defined( sun386 ) || defined( __TURBOC__ ) || \
|
||||
defined( vax ) || defined( vms ) || defined( VMS ) || \
|
||||
+ defined( _M_ARM64 ) || defined ( _M_ARM ) || \
|
||||
defined( __VMS ) || defined( _M_X64 )
|
||||
# define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN
|
||||
|
56
ports/libmediainfo/no-windows-namespace.diff
Normal file
56
ports/libmediainfo/no-windows-namespace.diff
Normal file
@ -0,0 +1,56 @@
|
||||
diff --git a/Source/MediaInfo/MediaInfo_Internal.cpp b/Source/MediaInfo/MediaInfo_Internal.cpp
|
||||
index 05e0d53..1da1ef5 100644
|
||||
--- a/Source/MediaInfo/MediaInfo_Internal.cpp
|
||||
+++ b/Source/MediaInfo/MediaInfo_Internal.cpp
|
||||
@@ -66,12 +66,14 @@
|
||||
#if MEDIAINFO_ADVANCED && defined(MEDIAINFO_FILE_YES)
|
||||
#include <limits>
|
||||
#ifdef WINDOWS
|
||||
- namespace WindowsNamespace
|
||||
- {
|
||||
+ #ifndef WIN32_LEAN_AND_MEAN
|
||||
+ #define WIN32_LEAN_AND_MEAN
|
||||
+ #endif
|
||||
+ #ifndef NOMINMAX
|
||||
+ #define NOMINMAX
|
||||
+ #endif
|
||||
#include <windows.h>
|
||||
#undef Yield
|
||||
- #undef max
|
||||
- }
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
@@ -973,7 +975,7 @@ static void CtrlC_Received()
|
||||
}
|
||||
|
||||
#ifdef WINDOWS
|
||||
-static WindowsNamespace::BOOL WINAPI SignalHandler(WindowsNamespace::DWORD SignalType)
|
||||
+static BOOL WINAPI SignalHandler(DWORD SignalType)
|
||||
{
|
||||
if (SignalType==CTRL_C_EVENT)
|
||||
{
|
||||
@@ -986,12 +988,12 @@ static WindowsNamespace::BOOL WINAPI SignalHandler(WindowsNamespace::DWORD Signa
|
||||
|
||||
static void CtrlC_Register()
|
||||
{
|
||||
- WindowsNamespace::SetConsoleCtrlHandler(SignalHandler, TRUE);
|
||||
+ SetConsoleCtrlHandler(SignalHandler, TRUE);
|
||||
}
|
||||
|
||||
static void CtrlC_Unregister()
|
||||
{
|
||||
- WindowsNamespace::SetConsoleCtrlHandler(SignalHandler, FALSE);
|
||||
+ SetConsoleCtrlHandler(SignalHandler, FALSE);
|
||||
}
|
||||
#else //WINDOWS
|
||||
static void SignalHandler(int SignalType)
|
||||
@@ -1445,7 +1447,7 @@ void MediaInfo_Internal::Entry()
|
||||
}
|
||||
|
||||
#ifdef WINDOWS
|
||||
- WindowsNamespace::Sleep(0);
|
||||
+ Sleep(0);
|
||||
#elif defined(_POSIX_PRIORITY_SCHEDULING)
|
||||
sched_yield();
|
||||
#endif //_POSIX_PRIORITY_SCHEDULING
|
@ -1,31 +1,34 @@
|
||||
string(REGEX REPLACE "^([0-9]+)[.]([1-9])\$" "\\1.0\\2" MEDIAINFO_VERSION "${VERSION}")
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO MediaArea/MediaInfoLib
|
||||
REF v21.03
|
||||
SHA512 1317b27dc3ac1ad224ef9b7ca7c08a8f55983ac6984b5e8daf6309fa33094fbad8a0a5fbe0cff086b7a5c9233b3e24e26995b037d16adf83f63877f2c753f811
|
||||
REF "v${MEDIAINFO_VERSION}"
|
||||
SHA512 6bc58f98ac1fc9637db0e8dd3a2e15b62036a2d33763e148cde425fceea798324f7c5f53cd51fc698d5b5b05fe1fc0fbfc4f391d2ec135eba6763eedfa5bd101
|
||||
HEAD_REF master
|
||||
PATCHES vcpkg_support_in_cmakelists.patch
|
||||
PATCHES
|
||||
msvc-arm.diff
|
||||
dependencies.diff
|
||||
no-windows-namespace.diff
|
||||
)
|
||||
|
||||
vcpkg_find_acquire_program(PKGCONFIG)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}/Project/CMake"
|
||||
OPTIONS
|
||||
-DBUILD_ZENLIB=0
|
||||
-DBUILD_ZLIB=0
|
||||
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
||||
-DCMAKE_REQUIRE_FIND_PACKAGE_PkgConfig=1
|
||||
-DCMAKE_REQUIRE_FIND_PACKAGE_TinyXML=1
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/share/mediainfolib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/share/mediainfolib" "${CURRENT_PACKAGES_DIR}/share/MediaInfoLib")
|
||||
endif()
|
||||
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/share/mediainfolib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/mediainfolib" "${CURRENT_PACKAGES_DIR}/debug/share/MediaInfoLib")
|
||||
endif()
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME MediaInfoLib CONFIG_PATH share/MediaInfoLib)
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME mediainfolib)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
if(NOT VCPKG_BUILD_TYPE AND VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libmediainfo.pc" " -lmediainfo" " -lmediainfod")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "libmediainfo",
|
||||
"version-string": "21.03",
|
||||
"port-version": 2,
|
||||
"version": "23.4",
|
||||
"description": "Get most relevant technical and tag data from video and audio files",
|
||||
"homepage": "https://github.com/MediaArea/MediaInfoLib",
|
||||
"dependencies": [
|
||||
|
@ -1,55 +0,0 @@
|
||||
diff --git a/Project/CMake/CMakeLists.txt b/Project/CMake/CMakeLists.txt
|
||||
index f983343..c6ba5ea 100644
|
||||
--- a/Project/CMake/CMakeLists.txt
|
||||
+++ b/Project/CMake/CMakeLists.txt
|
||||
@@ -88,7 +88,7 @@ endif()
|
||||
find_package(TinyXML)
|
||||
|
||||
# use system curl if is present
|
||||
-find_package(CURL)
|
||||
+find_package(CURL CONFIG REQUIRED)
|
||||
|
||||
include_directories(${MediaInfoLib_SOURCES_PATH})
|
||||
include_directories(${MediaInfoLib_SOURCES_PATH}/ThirdParty/md5/)
|
||||
@@ -400,13 +400,7 @@ endif()
|
||||
target_link_libraries(mediainfo ${ZenLib_LIBRARY} ${ZLIB_LIBRARIES})
|
||||
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
- get_target_property(LOCATION mediainfo LOCATION_DEBUG)
|
||||
- string(REGEX REPLACE "\\.[^.]*$" ".pdb" LOCATION "${LOCATION}")
|
||||
- install(FILES ${LOCATION} DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug)
|
||||
-
|
||||
- get_target_property(LOCATION mediainfo LOCATION_RELWITHDEBINFO)
|
||||
- string(REGEX REPLACE "\\.[^.]*$" ".pdb" LOCATION "${LOCATION}")
|
||||
- install(FILES ${LOCATION} DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo)
|
||||
+ install(FILES $<TARGET_PDB_FILE:mediainfo> DESTINATION ${BIN_INSTALL_DIR} OPTIONAL)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
diff --git a/Source/ThirdParty/aes-gladman/aesopt.h b/Source/ThirdParty/aes-gladman/aesopt.h
|
||||
index d3ac0f9..eeefa40 100644
|
||||
--- a/Source/ThirdParty/aes-gladman/aesopt.h
|
||||
+++ b/Source/ThirdParty/aes-gladman/aesopt.h
|
||||
@@ -183,7 +183,7 @@ Issue Date: 20/12/2007
|
||||
AES_REV_DKS must NOT be defined when such assembler files are
|
||||
built
|
||||
*/
|
||||
-#if 1 && defined( _WIN64 ) && defined( _MSC_VER )
|
||||
+#if 1 && defined( _WIN64 ) && defined( _MSC_VER ) && defined( _M_AMD64 )
|
||||
# define INTEL_AES_POSSIBLE
|
||||
#endif
|
||||
|
||||
diff --git a/Source/ThirdParty/aes-gladman/brg_endian.h b/Source/ThirdParty/aes-gladman/brg_endian.h
|
||||
index b44c5cb..8c34364 100644
|
||||
--- a/Source/ThirdParty/aes-gladman/brg_endian.h
|
||||
+++ b/Source/ThirdParty/aes-gladman/brg_endian.h
|
||||
@@ -110,7 +110,8 @@ Issue Date: 20/12/2007
|
||||
defined( __MRC__ ) || defined( __MVS__ ) || defined( __MWERKS__ ) || \
|
||||
defined( sparc ) || defined( __sparc) || defined( SYMANTEC_C ) || \
|
||||
defined( __VOS__ ) || defined( __TIGCC__ ) || defined( __TANDEM ) || \
|
||||
- defined( THINK_C ) || defined( __VMCMS__ ) || defined( _AIX )
|
||||
+ defined( THINK_C ) || defined( __VMCMS__ ) || defined( _AIX ) || \
|
||||
+ defined( _M_ARM64 ) || defined ( _M_ARM )
|
||||
# define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
|
||||
|
||||
#elif 0 /* **** EDIT HERE IF NECESSARY **** */
|
@ -1,23 +1,30 @@
|
||||
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO MediaArea/ZenLib
|
||||
REF ecb548043a6dbee15a07a43d4d3388509d849570 # v0.4.40
|
||||
SHA512 9be9dfa20f4bf7e1f450b2ab19391ea091a091d242e98797652aa74ae595365e25f44ccca915b8889bc46245abf523949d22a012805a2f4f55742ae3c0e8932d
|
||||
REF "v${VERSION}"
|
||||
SHA512 4232eb6e73e9b380f6fe2ce3cfeb9fe343936362a35ca8d088c783dc6277332df762d689efe023e3f1418c2e6d2629e0b82ac93df9cce3ae0ab346c2ed1911f1
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_find_acquire_program(PKGCONFIG)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}/Project/CMake"
|
||||
OPTIONS
|
||||
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
||||
-DCMAKE_REQUIRE_FIND_PACKAGE_PkgConfig=1
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME zenlib CONFIG_PATH share/zenlib)
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME zenlib)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
if(NOT VCPKG_BUILD_TYPE AND VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libzen.pc" " -lzen" " -lzend")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/License.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/License.txt")
|
||||
|
@ -1,7 +1,8 @@
|
||||
{
|
||||
"name": "libzen",
|
||||
"version": "0.4.40",
|
||||
"version": "0.4.41",
|
||||
"description": "ZenLib is a C++ utility library for easiest cross-platform development",
|
||||
"homepage": "https://github.com/MediaArea/ZenLib",
|
||||
"license": "Zlib",
|
||||
"dependencies": [
|
||||
{
|
||||
|
@ -4193,8 +4193,8 @@
|
||||
"port-version": 3
|
||||
},
|
||||
"libmediainfo": {
|
||||
"baseline": "21.03",
|
||||
"port-version": 2
|
||||
"baseline": "23.4",
|
||||
"port-version": 0
|
||||
},
|
||||
"libmesh": {
|
||||
"baseline": "1.5.0",
|
||||
@ -4801,7 +4801,7 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"libzen": {
|
||||
"baseline": "0.4.40",
|
||||
"baseline": "0.4.41",
|
||||
"port-version": 0
|
||||
},
|
||||
"libzip": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "a5adf3a515c6144124fe9bb1825505de0f234b8c",
|
||||
"version": "23.4",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "a6b640103a75b965e6527d10819d276c2193775d",
|
||||
"version-string": "21.03",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "ab92638577d4a71ffc7acd3bee65dc7d8c0e7bca",
|
||||
"version": "0.4.41",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "e3635609bd53140cc191a65b168d1a131f84366a",
|
||||
"version": "0.4.40",
|
||||
|
Loading…
Reference in New Issue
Block a user