mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-31 03:12:02 +08:00
Restore PNG patching for APPLE
This commit is contained in:
parent
38217b0adc
commit
fe22004818
9
deps/+PNG/PNG.cmake
vendored
9
deps/+PNG/PNG.cmake
vendored
@ -5,10 +5,17 @@ else ()
|
||||
set(_disable_neon_extension "")
|
||||
endif ()
|
||||
|
||||
set(_patch_cmd PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/genout.cmake.in scripts/genout.cmake.in)
|
||||
|
||||
if (APPLE)
|
||||
set(_patch_cmd ${_patch_cmd} && ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/PNG.patch)
|
||||
endif ()
|
||||
|
||||
add_cmake_project(PNG
|
||||
URL https://github.com/glennrp/libpng/archive/refs/tags/v1.6.40.zip
|
||||
URL_HASH SHA256=ab3f88779f0661bbb07c60e778fda782216bff70355d86848fbf6a327084563a
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/genout.cmake.in scripts/genout.cmake.in
|
||||
#PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/genout.cmake.in scripts/genout.cmake.in
|
||||
PATCH_COMMAND "${_patch_cmd}"
|
||||
# SOURCE_DIR /home/quarky/Workspace/prusa3d/PrusaSlicer/prusaslicer-src-master/deps/build-default/dep_PNG-prefix/src/dep_PNG/
|
||||
CMAKE_ARGS
|
||||
-DPNG_SHARED=OFF
|
||||
|
26
deps/+PNG/PNG.patch
vendored
Normal file
26
deps/+PNG/PNG.patch
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
Common subdirectories: ../libpng-1.6.35-orig/arm and ./arm
|
||||
Common subdirectories: ../libpng-1.6.35-orig/contrib and ./contrib
|
||||
Common subdirectories: ../libpng-1.6.35-orig/intel and ./intel
|
||||
Common subdirectories: ../libpng-1.6.35-orig/mips and ./mips
|
||||
Only in ./: PNG.patch
|
||||
diff -u ../libpng-1.6.35-orig/pngrutil.c ./pngrutil.c
|
||||
--- ../libpng-1.6.35-orig/pngrutil.c 2018-07-15 20:58:00.000000000 +0200
|
||||
+++ ./pngrutil.c 2021-03-24 15:59:38.687108444 +0100
|
||||
@@ -422,13 +422,6 @@
|
||||
png_ptr->flags |= PNG_FLAG_ZSTREAM_INITIALIZED;
|
||||
}
|
||||
|
||||
-#if ZLIB_VERNUM >= 0x1290 && \
|
||||
- defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_IGNORE_ADLER32)
|
||||
- if (((png_ptr->options >> PNG_IGNORE_ADLER32) & 3) == PNG_OPTION_ON)
|
||||
- /* Turn off validation of the ADLER32 checksum in IDAT chunks */
|
||||
- ret = inflateValidate(&png_ptr->zstream, 0);
|
||||
-#endif
|
||||
-
|
||||
if (ret == Z_OK)
|
||||
png_ptr->zowner = owner;
|
||||
|
||||
Common subdirectories: ../libpng-1.6.35-orig/powerpc and ./powerpc
|
||||
Common subdirectories: ../libpng-1.6.35-orig/projects and ./projects
|
||||
Common subdirectories: ../libpng-1.6.35-orig/scripts and ./scripts
|
||||
Common subdirectories: ../libpng-1.6.35-orig/tests and ./tests
|
Loading…
x
Reference in New Issue
Block a user