mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 13:32:50 +08:00
[minizip] support iOS/Android triplets (#16108)
* [minizip] support iOS triplets * DISABLE_INSTALL_TOOLS when VCPKG_TARGET_IS_IOS * [minizip] update git-tree SHA * [minizip] IOAPI_NO_64 in Android * add a patch to use standard C API * [minizip] update port SHA
This commit is contained in:
parent
3f2616bc64
commit
6ba281209f
49
ports/minizip/0003-no-io64.patch
Normal file
49
ports/minizip/0003-no-io64.patch
Normal file
@ -0,0 +1,49 @@
|
||||
diff --git a/contrib/minizip/ioapi.c b/contrib/minizip/ioapi.c
|
||||
index 7f5c191..d42e050 100644
|
||||
--- a/contrib/minizip/ioapi.c
|
||||
+++ b/contrib/minizip/ioapi.c
|
||||
@@ -17,8 +17,8 @@
|
||||
#if defined(__APPLE__) || defined(IOAPI_NO_64)
|
||||
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
|
||||
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
||||
-#define FTELLO_FUNC(stream) ftello(stream)
|
||||
-#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
|
||||
+#define FTELLO_FUNC(stream) ftell(stream)
|
||||
+#define FSEEKO_FUNC(stream, offset, origin) fseek(stream, offset, origin)
|
||||
#else
|
||||
#define FOPEN_FUNC(filename, mode) fopen64(filename, mode)
|
||||
#define FTELLO_FUNC(stream) ftello64(stream)
|
||||
diff --git a/contrib/minizip/miniunz.c b/contrib/minizip/miniunz.c
|
||||
index 3d65401..a1269ea 100644
|
||||
--- a/contrib/minizip/miniunz.c
|
||||
+++ b/contrib/minizip/miniunz.c
|
||||
@@ -33,9 +33,9 @@
|
||||
#define FTELLO_FUNC(stream) ftello(stream)
|
||||
#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
|
||||
#else
|
||||
-#define FOPEN_FUNC(filename, mode) fopen64(filename, mode)
|
||||
-#define FTELLO_FUNC(stream) ftello64(stream)
|
||||
-#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin)
|
||||
+#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
||||
+#define FTELLO_FUNC(stream) ftell(stream)
|
||||
+#define FSEEKO_FUNC(stream, offset, origin) fseek(stream, offset, origin)
|
||||
#endif
|
||||
|
||||
|
||||
diff --git a/contrib/minizip/minizip.c b/contrib/minizip/minizip.c
|
||||
index 4288962..02267fb 100644
|
||||
--- a/contrib/minizip/minizip.c
|
||||
+++ b/contrib/minizip/minizip.c
|
||||
@@ -34,9 +34,9 @@
|
||||
#define FTELLO_FUNC(stream) ftello(stream)
|
||||
#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
|
||||
#else
|
||||
-#define FOPEN_FUNC(filename, mode) fopen64(filename, mode)
|
||||
-#define FTELLO_FUNC(stream) ftello64(stream)
|
||||
-#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin)
|
||||
+#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
||||
+#define FTELLO_FUNC(stream) ftell(stream)
|
||||
+#define FSEEKO_FUNC(stream, offset, origin) fseek(stream, offset, origin)
|
||||
#endif
|
||||
|
||||
|
@ -56,16 +56,19 @@ if(ENABLE_BZIP2)
|
||||
target_link_libraries(minizip PRIVATE ${BZIP2_LIBRARIES})
|
||||
target_compile_definitions(minizip PRIVATE -DHAVE_BZIP2=1)
|
||||
endif()
|
||||
if(ANDROID)
|
||||
target_compile_definitions(minizip PRIVATE IOAPI_NO_64)
|
||||
endif()
|
||||
if(NOT DISABLE_INSTALL_TOOLS)
|
||||
add_executable(minizip_bin ${MIN_SRC}/minizip.c)
|
||||
add_executable(miniunz_bin ${MIN_SRC}/miniunz.c)
|
||||
|
||||
add_executable(minizip_bin ${MIN_SRC}/minizip.c)
|
||||
add_executable(miniunz_bin ${MIN_SRC}/miniunz.c)
|
||||
|
||||
target_link_libraries(minizip_bin minizip ${MINIZIP_LIBRARIES})
|
||||
target_link_libraries(miniunz_bin minizip ${MINIZIP_LIBRARIES})
|
||||
|
||||
set_target_properties(minizip_bin PROPERTIES OUTPUT_NAME minizip)
|
||||
set_target_properties(miniunz_bin PROPERTIES OUTPUT_NAME miniunz)
|
||||
target_link_libraries(minizip_bin minizip ${MINIZIP_LIBRARIES})
|
||||
target_link_libraries(miniunz_bin minizip ${MINIZIP_LIBRARIES})
|
||||
|
||||
set_target_properties(minizip_bin PROPERTIES OUTPUT_NAME minizip)
|
||||
set_target_properties(miniunz_bin PROPERTIES OUTPUT_NAME miniunz)
|
||||
endif()
|
||||
|
||||
install(
|
||||
TARGETS minizip
|
||||
|
@ -1,6 +1,6 @@
|
||||
Source: minizip
|
||||
Version: 1.2.11
|
||||
Port-Version: 7
|
||||
Port-Version: 8
|
||||
Build-Depends: zlib
|
||||
Homepage: https://github.com/madler/zlib
|
||||
Description: Zip compression library
|
||||
|
@ -10,6 +10,7 @@ vcpkg_from_github(
|
||||
PATCHES
|
||||
0001-remove-ifndef-NOUNCRYPT.patch
|
||||
0002-add-declaration-for-mkdir.patch
|
||||
0003-no-io64.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
@ -24,9 +25,9 @@ vcpkg_configure_cmake(
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DDISABLE_INSTALL_TOOLS=${VCPKG_TARGET_IS_IOS}
|
||||
OPTIONS_DEBUG
|
||||
-DDISABLE_INSTALL_HEADERS=ON
|
||||
-DDISABLE_INSTALL_TOOLS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
@ -3954,7 +3954,7 @@
|
||||
},
|
||||
"minizip": {
|
||||
"baseline": "1.2.11",
|
||||
"port-version": 7
|
||||
"port-version": 8
|
||||
},
|
||||
"minizip-ng": {
|
||||
"baseline": "3.0.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "4bf6a0d8bac1c47fa80e0c51188aa3d2ecb86414",
|
||||
"version-string": "1.2.11",
|
||||
"port-version": 8
|
||||
},
|
||||
{
|
||||
"git-tree": "4f7a0ceea0f626741858e2f2c0438aaba542fedc",
|
||||
"version-string": "1.2.11",
|
||||
|
Loading…
Reference in New Issue
Block a user