mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 12:57:59 +08:00
[opencolorio] Fix minizip-ng related errors (#33335)
* Generate Imath.pc * update version * add dependency imath minizip-ng * updata version * update version * Fix minizip-ng related errors * update version * delete option * update version * Modify the license copy method * update version * shrink patch * update version * shrink patch * update version
This commit is contained in:
parent
147d18663c
commit
42cc786992
18
ports/minizip-ng/fix_find_zstd.patch
Normal file
18
ports/minizip-ng/fix_find_zstd.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 6f6c6bc..1856944 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -334,12 +334,8 @@ endif()
|
||||
if(MZ_ZSTD)
|
||||
# Check if zstd is present
|
||||
if(NOT MZ_FORCE_FETCH_LIBS)
|
||||
- find_package(PkgConfig QUIET)
|
||||
- if(PKGCONFIG_FOUND)
|
||||
- pkg_check_modules(ZSTD libzstd)
|
||||
- endif()
|
||||
if(NOT ZSTD_FOUND)
|
||||
- find_package(ZSTD QUIET)
|
||||
+ find_package(ZSTD NAMES zstd REQUIRED)
|
||||
if(ZSTD_FOUND)
|
||||
if(TARGET zstd::libzstd_static)
|
||||
list(APPEND ZSTD_LIBRARIES zstd::libzstd_static)
|
@ -8,6 +8,8 @@ vcpkg_from_github(
|
||||
REF "${VERSION}"
|
||||
SHA512 be3a9e9580847d595abbd200ec89a97e38086cab5b34d3a4db1507247ed04f9209290945989b200225ea412ee0e37fb9f1947404d1631d2dfeb5c6dc55ce3d05
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix_find_zstd.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "minizip-ng",
|
||||
"version": "4.0.0",
|
||||
"port-version": 2,
|
||||
"port-version": 3,
|
||||
"description": "minizip-ng is a zip manipulation library written in C that is supported on Windows, macOS, and Linux.",
|
||||
"homepage": "https://github.com/zlib-ng/minizip-ng",
|
||||
"license": "Zlib",
|
||||
|
@ -46,17 +46,19 @@ index 5455a08..3b9530e 100644
|
||||
|
||||
if(OCIO_BUILD_OPENFX)
|
||||
diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in
|
||||
index 6a4932a..b8298f0 100644
|
||||
index 6a4932a..2a08f5a 100644
|
||||
--- a/src/cmake/Config.cmake.in
|
||||
+++ b/src/cmake/Config.cmake.in
|
||||
@@ -1,6 +1,10 @@
|
||||
@@ -1,6 +1,12 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
+find_dependency(expat CONFIG)
|
||||
+find_dependency(Imath CONFIG)
|
||||
+find_dependency(pystring CONFIG)
|
||||
+find_dependency(yaml-cpp CONFIG)
|
||||
|
||||
+find_dependency(minizip-ng CONFIG)
|
||||
+find_dependency(lcms2 CONFIG)
|
||||
|
||||
if (NOT @BUILD_SHARED_LIBS@) # NOT @BUILD_SHARED_LIBS@
|
||||
if (APPLE)
|
||||
|
@ -1,54 +1,5 @@
|
||||
diff --git a/src/OpenColorIO/OCIOZArchive.cpp b/src/OpenColorIO/OCIOZArchive.cpp
|
||||
index 85fc7bb..e07ed23 100644
|
||||
--- a/src/OpenColorIO/OCIOZArchive.cpp
|
||||
+++ b/src/OpenColorIO/OCIOZArchive.cpp
|
||||
@@ -225,7 +225,7 @@ void archiveConfig(std::ostream & ostream, const Config & config, const char * c
|
||||
std::string configStr = ss.str();
|
||||
|
||||
// Write zip to memory stream.
|
||||
- mz_stream_mem_create(&write_mem_stream);
|
||||
+ mz_stream_mem_create();
|
||||
mz_stream_mem_set_grow_size(write_mem_stream, 128 * 1024);
|
||||
mz_stream_open(write_mem_stream, NULL, MZ_OPEN_MODE_CREATE);
|
||||
|
||||
@@ -237,7 +237,7 @@ void archiveConfig(std::ostream & ostream, const Config & config, const char * c
|
||||
options.compress_level = ArchiveCompressionLevels::BEST;
|
||||
|
||||
// Create the writer handle.
|
||||
- mz_zip_writer_create(&archiver);
|
||||
+ mz_zip_writer_create();
|
||||
|
||||
// Archive options.
|
||||
// Compression method
|
||||
@@ -332,7 +332,7 @@ void ExtractOCIOZArchive(const char * archivePath, const char * destination)
|
||||
std::string outputDestination = pystring::os::path::normpath(destination);
|
||||
|
||||
// Create zip reader.
|
||||
- mz_zip_reader_create(&extracter);
|
||||
+ mz_zip_reader_create();
|
||||
|
||||
MinizipNgHandlerGuard extracterGuard(extracter, false, false);
|
||||
|
||||
@@ -450,7 +450,7 @@ std::vector<uint8_t> getFileStringFromArchiveFile(const std::string & filepath,
|
||||
std::vector<uint8_t> buffer;
|
||||
|
||||
// Create the reader object.
|
||||
- mz_zip_reader_create(&reader);
|
||||
+ mz_zip_reader_create();
|
||||
|
||||
MinizipNgHandlerGuard extracterGuard(reader, false, true);
|
||||
|
||||
@@ -510,7 +510,7 @@ void getEntriesMappingFromArchiveFile(const std::string & archivePath,
|
||||
void *reader = NULL;
|
||||
|
||||
// Create the reader object.
|
||||
- mz_zip_reader_create(&reader);
|
||||
+ mz_zip_reader_create();
|
||||
|
||||
MinizipNgHandlerGuard extracterGuard(reader, false, false);
|
||||
|
||||
diff --git a/src/OpenColorIO/OCIOZArchive.cpp b/src/OpenColorIO/OCIOZArchive.cpp
|
||||
index 85fc7bb..45416cd 100644
|
||||
index 85fc7bb..aa90943 100644
|
||||
--- a/src/OpenColorIO/OCIOZArchive.cpp
|
||||
+++ b/src/OpenColorIO/OCIOZArchive.cpp
|
||||
@@ -24,9 +24,11 @@
|
||||
@ -61,6 +12,82 @@ index 85fc7bb..45416cd 100644
|
||||
+#ifndef __APPLE__
|
||||
+#include "mz_strm_zlib.h"
|
||||
+#endif
|
||||
|
||||
|
||||
namespace OCIO_NAMESPACE
|
||||
{
|
||||
@@ -225,7 +227,11 @@ void archiveConfig(std::ostream & ostream, const Config & config, const char * c
|
||||
std::string configStr = ss.str();
|
||||
|
||||
// Write zip to memory stream.
|
||||
+#if MZ_VERSION_BUILD >= 040000
|
||||
+ write_mem_stream = mz_stream_mem_create();
|
||||
+#else
|
||||
mz_stream_mem_create(&write_mem_stream);
|
||||
+#endif
|
||||
mz_stream_mem_set_grow_size(write_mem_stream, 128 * 1024);
|
||||
mz_stream_open(write_mem_stream, NULL, MZ_OPEN_MODE_CREATE);
|
||||
|
||||
@@ -237,7 +243,11 @@ void archiveConfig(std::ostream & ostream, const Config & config, const char * c
|
||||
options.compress_level = ArchiveCompressionLevels::BEST;
|
||||
|
||||
// Create the writer handle.
|
||||
+#if MZ_VERSION_BUILD >= 040000
|
||||
+ archiver = mz_zip_writer_create();
|
||||
+#else
|
||||
mz_zip_writer_create(&archiver);
|
||||
+#endif
|
||||
|
||||
// Archive options.
|
||||
// Compression method
|
||||
@@ -332,7 +342,11 @@ void ExtractOCIOZArchive(const char * archivePath, const char * destination)
|
||||
std::string outputDestination = pystring::os::path::normpath(destination);
|
||||
|
||||
// Create zip reader.
|
||||
+#if MZ_VERSION_BUILD >= 040000
|
||||
+ extracter = mz_zip_reader_create();
|
||||
+#else
|
||||
mz_zip_reader_create(&extracter);
|
||||
+#endif
|
||||
|
||||
MinizipNgHandlerGuard extracterGuard(extracter, false, false);
|
||||
|
||||
@@ -450,7 +464,11 @@ std::vector<uint8_t> getFileStringFromArchiveFile(const std::string & filepath,
|
||||
std::vector<uint8_t> buffer;
|
||||
|
||||
// Create the reader object.
|
||||
+#if MZ_VERSION_BUILD >= 040000
|
||||
+ reader = mz_zip_reader_create();
|
||||
+#else
|
||||
mz_zip_reader_create(&reader);
|
||||
+#endif
|
||||
|
||||
MinizipNgHandlerGuard extracterGuard(reader, false, true);
|
||||
|
||||
@@ -510,7 +528,11 @@ void getEntriesMappingFromArchiveFile(const std::string & archivePath,
|
||||
void *reader = NULL;
|
||||
|
||||
// Create the reader object.
|
||||
+#if MZ_VERSION_BUILD >= 040000
|
||||
+ reader = mz_zip_reader_create();
|
||||
+#else
|
||||
mz_zip_reader_create(&reader);
|
||||
+#endif
|
||||
|
||||
MinizipNgHandlerGuard extracterGuard(reader, false, false);
|
||||
|
||||
diff --git a/src/apps/ocioarchive/main.cpp b/src/apps/ocioarchive/main.cpp
|
||||
index 190cade..68054a6 100644
|
||||
--- a/src/apps/ocioarchive/main.cpp
|
||||
+++ b/src/apps/ocioarchive/main.cpp
|
||||
@@ -235,7 +235,11 @@ int main(int argc, const char **argv)
|
||||
}
|
||||
|
||||
std::string path = args[0];
|
||||
+#if MZ_VERSION_BUILD >= 040000
|
||||
+ reader = mz_zip_reader_create();
|
||||
+#else
|
||||
mz_zip_reader_create(&reader);
|
||||
+#endif
|
||||
struct tm tmu_date;
|
||||
|
||||
err = mz_zip_reader_open_file(reader, path.c_str());
|
||||
|
@ -7,7 +7,7 @@ vcpkg_from_github(
|
||||
PATCHES
|
||||
fix-dependency.patch
|
||||
fix-del-install-file.patch
|
||||
fix-func-param.patch
|
||||
fix-func-param.patch #https://github.com/AcademySoftwareFoundation/OpenColorIO/pull/1806
|
||||
fix-pkgconfig.patch
|
||||
)
|
||||
|
||||
@ -60,11 +60,11 @@ file(REMOVE_RECURSE
|
||||
)
|
||||
if(OCIO_BUILD_APPS)
|
||||
vcpkg_copy_tools(
|
||||
TOOL_NAMES ociowrite ociomakeclf ociochecklut ociocheck ociobakelut
|
||||
TOOL_NAMES ociowrite ociomakeclf ociochecklut ociocheck ociobakelut ocioarchive ocioconvert ociolutimage ocioperf
|
||||
AUTO_CLEAN
|
||||
)
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "opencolorio",
|
||||
"version-semver": "2.2.1",
|
||||
"port-version": 1,
|
||||
"description": "OpenColorIO (OCIO) is a complete color management solution geared towards motion picture production with an emphasis on visual effects and computer animation. OCIO provides a straightforward and consistent user experience across all supporting applications while allowing for sophisticated back-end configuration options suitable for high-end production usage. OCIO is compatible with the Academy Color Encoding Specification (ACES) and is LUT-format agnostic, supporting many popular formats.",
|
||||
"homepage": "https://opencolorio.org/",
|
||||
"license": "BSD-3-Clause",
|
||||
@ -25,7 +26,8 @@
|
||||
"description": "Installs tools",
|
||||
"dependencies": [
|
||||
"glew",
|
||||
"lcms"
|
||||
"lcms",
|
||||
"openexr"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -5402,7 +5402,7 @@
|
||||
},
|
||||
"minizip-ng": {
|
||||
"baseline": "4.0.0",
|
||||
"port-version": 2
|
||||
"port-version": 3
|
||||
},
|
||||
"mio": {
|
||||
"baseline": "2023-03-03",
|
||||
@ -5990,7 +5990,7 @@
|
||||
},
|
||||
"opencolorio": {
|
||||
"baseline": "2.2.1",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"opencolorio-tools": {
|
||||
"baseline": "1.1.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "1483ef1293bbd3eea5edd9b5051bb4457eebfa2e",
|
||||
"version": "4.0.0",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "89c9968274d731d513a3eadc259c73c95cfe058c",
|
||||
"version": "4.0.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "661b43b1d2c452e40476bbb64bb6e68dfc437c7b",
|
||||
"version-semver": "2.2.1",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "d5c69dc2c181e658e67ba57e3836a548c469477a",
|
||||
"version-semver": "2.2.1",
|
||||
|
Loading…
x
Reference in New Issue
Block a user