summaryrefslogtreecommitdiff
path: root/Build/source/libs/libpng/libpng-src
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/libpng/libpng-src')
-rw-r--r--Build/source/libs/libpng/libpng-src/ANNOUNCE59
-rw-r--r--Build/source/libs/libpng/libpng-src/CHANGES22
-rw-r--r--Build/source/libs/libpng/libpng-src/CMakeLists.txt85
-rw-r--r--Build/source/libs/libpng/libpng-src/Makefile.am2
-rw-r--r--Build/source/libs/libpng/libpng-src/README2
-rw-r--r--Build/source/libs/libpng/libpng-src/arm/filter_neon.S266
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/android/ci_env.aarch64-linux-android.sh16
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/android/ci_env.armv7a-linux-androideabi.sh16
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/android/ci_env.i686-linux-android.sh16
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/android/ci_env.x86_64-linux-android.sh16
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/cygwin/ci_env.i686-pc-cygwin.sh18
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/cygwin/ci_env.x86_64-pc-cygwin.sh18
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/darwin/ci_env.arm64-apple-darwin.sh15
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/darwin/ci_env.x86_64-apple-darwin.sh15
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/freebsd/ci_env.aarch64-unknown-freebsd.sh14
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/freebsd/ci_env.i686-unknown-freebsd.sh14
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/freebsd/ci_env.riscv64-unknown-freebsd.sh14
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/freebsd/ci_env.x86_64-unknown-freebsd.sh14
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.aarch64-linux-gnu.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.arm-linux-gnueabi.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.arm-linux-gnueabihf.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.i686-linux-gnu.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mips-linux-gnu.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mips64-linux-gnuabi64.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mips64el-linux-gnuabi64.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsel-linux-gnu.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsisa32r6-linux-gnu.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsisa32r6el-linux-gnu.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsisa64r6-linux-gnuabi64.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsisa64r6el-linux-gnuabi64.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.powerpc-linux-gnu.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.powerpc64-linux-gnu.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.powerpc64le-linux-gnu.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.riscv64-linux-gnu.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.x86_64-linux-gnu.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/msdos/ci_env.i386-pc-msdoswatcom.sh18
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/msdos/ci_env.i586-pc-msdosdjgpp.sh18
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/msdos/ci_env.i86-pc-msdoswatcom.sh19
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.aarch64-windows-llvm.sh18
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.i686-w64-mingw32.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.i686-windows-llvm.sh18
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.x86_64-w64-mingw32.sh21
-rw-r--r--Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.x86_64-windows-llvm.sh18
-rw-r--r--Build/source/libs/libpng/libpng-src/configure.ac8
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/Dockerfile15
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/README.txt4
-rwxr-xr-xBuild/source/libs/libpng/libpng-src/contrib/oss-fuzz/build.sh31
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/libpng_read_fuzzer.cc16
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/tools/chkfmt.sh157
-rw-r--r--Build/source/libs/libpng/libpng-src/libpng-manual.txt2
-rw-r--r--Build/source/libs/libpng/libpng-src/libpng.36
-rw-r--r--Build/source/libs/libpng/libpng-src/libpngpf.34
-rw-r--r--Build/source/libs/libpng/libpng-src/png.52
-rw-r--r--Build/source/libs/libpng/libpng-src/png.c101
-rw-r--r--Build/source/libs/libpng/libpng-src/png.h26
-rw-r--r--Build/source/libs/libpng/libpng-src/pngconf.h8
-rw-r--r--Build/source/libs/libpng/libpng-src/pngerror.c9
-rw-r--r--Build/source/libs/libpng/libpng-src/pnglibconf.h2
-rw-r--r--Build/source/libs/libpng/libpng-src/pngpriv.h41
-rw-r--r--Build/source/libs/libpng/libpng-src/pngtest.c18
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/cmake/AUTHORS.md2
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/cmake/PNGConfig.cmake15
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/cmake/README.md1
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/cmake/genout.cmake.in5
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/dfn.awk16
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/libpng-config-head.in2
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/libpng.pc.in2
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt2
68 files changed, 1012 insertions, 613 deletions
diff --git a/Build/source/libs/libpng/libpng-src/ANNOUNCE b/Build/source/libs/libpng/libpng-src/ANNOUNCE
index bc147adb78b..a2a7ac363a4 100644
--- a/Build/source/libs/libpng/libpng-src/ANNOUNCE
+++ b/Build/source/libs/libpng/libpng-src/ANNOUNCE
@@ -1,5 +1,5 @@
-libpng 1.6.43 - February 23, 2024
-=================================
+libpng 1.6.44 - September 12, 2024
+==================================
This is a public release of libpng, intended for use in production code.
@@ -9,13 +9,13 @@ Files available for download
Source files with LF line endings (for Unix/Linux):
- * libpng-1.6.43.tar.xz (LZMA-compressed, recommended)
- * libpng-1.6.43.tar.gz (deflate-compressed)
+ * libpng-1.6.44.tar.xz (LZMA-compressed, recommended)
+ * libpng-1.6.44.tar.gz (deflate-compressed)
Source files with CRLF line endings (for Windows):
- * lpng1643.7z (LZMA-compressed, recommended)
- * lpng1643.zip (deflate-compressed)
+ * lpng1644.7z (LZMA-compressed, recommended)
+ * lpng1644.zip (deflate-compressed)
Other information:
@@ -25,36 +25,29 @@ Other information:
* TRADEMARK.md
-Changes from version 1.6.42 to version 1.6.43
+Changes from version 1.6.43 to version 1.6.44
---------------------------------------------
- * Fixed the row width check in png_check_IHDR().
- This corrected a bug that was specific to the 16-bit platforms,
- and removed a spurious compiler warning from the 64-bit builds.
- (Reported by Jacek Caban; fixed by John Bowler)
- * Added eXIf chunk support to the push-mode reader in pngpread.c.
- (Contributed by Chris Blume)
- * Added contrib/pngexif for the benefit of the users who would like
- to inspect the content of eXIf chunks.
- * Added contrib/conftest/basic.dfa, a basic build-time configuration.
+ * Hardened calculations in chroma handling to prevent overflows, and
+ relaxed a constraint in cHRM validation to accomodate the standard
+ ACES AP1 set of color primaries.
(Contributed by John Bowler)
- * Fixed a preprocessor condition in pngread.c that broke build-time
- configurations like contrib/conftest/pngcp.dfa.
- (Contributed by John Bowler)
- * Added CMake build support for LoongArch LSX.
- (Contributed by GuXiWei)
- * Fixed a CMake build error that occurred under a peculiar state of the
- dependency tree. This was a regression introduced in libpng-1.6.41.
- (Contributed by Dan Rosser)
- * Marked the installed libpng headers as system headers in CMake.
- (Contributed by Benjamin Buch)
- * Updated the build support for RISCOS.
- (Contributed by Cameron Cawley)
- * Updated the makefiles to allow cross-platform builds to initialize
- conventional make variables like AR and ARFLAGS.
- * Added various improvements to the CI scripts in areas like version
- consistency verification and text linting.
- * Added version consistency verification to pngtest.c also.
+ * Removed the ASM implementation of ARM Neon optimizations and updated
+ the build accordingly. Only the remaining C implementation shall be
+ used from now on, thus ensuring the support of the PAC/BTI security
+ features on ARM64.
+ (Contributed by Ross Burton and John Bowler)
+ * Fixed the pickup of the PNG_HARDWARE_OPTIMIZATIONS option in the
+ CMake build on FreeBSD/amd64. This is an important performance fix
+ on this platform.
+ * Applied various fixes and improvements to the CMake build.
+ (Contributed by Eric Riff, Benjamin Buch and Erik Scholz)
+ * Added fuzzing targets for the simplified read API.
+ (Contributed by Mikhail Khachayants)
+ * Fixed a build error involving pngtest.c under a custom config.
+ This was a regression introduced in a code cleanup in libpng-1.6.43.
+ (Contributed by Ben Wagner)
+ * Fixed and improved the config files for AppVeyor CI and Travis CI.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
diff --git a/Build/source/libs/libpng/libpng-src/CHANGES b/Build/source/libs/libpng/libpng-src/CHANGES
index 441b57ecf1a..724ccca2d65 100644
--- a/Build/source/libs/libpng/libpng-src/CHANGES
+++ b/Build/source/libs/libpng/libpng-src/CHANGES
@@ -6196,6 +6196,28 @@ Version 1.6.43 [February 23, 2024]
consistency verification and text linting.
Added version consistency verification to pngtest.c also.
+Version 1.6.44 [September 12, 2024]
+ Hardened calculations in chroma handling to prevent overflows, and
+ relaxed a constraint in cHRM validation to accomodate the standard
+ ACES AP1 set of color primaries.
+ (Contributed by John Bowler)
+ Removed the ASM implementation of ARM Neon optimizations and updated
+ the build accordingly. Only the remaining C implementation shall be
+ used from now on, thus ensuring the support of the PAC/BTI security
+ features on ARM64.
+ (Contributed by Ross Burton and John Bowler)
+ Fixed the pickup of the PNG_HARDWARE_OPTIMIZATIONS option in the
+ CMake build on FreeBSD/amd64. This is an important performance fix
+ on this platform.
+ Applied various fixes and improvements to the CMake build.
+ (Contributed by Eric Riff, Benjamin Buch and Erik Scholz)
+ Added fuzzing targets for the simplified read API.
+ (Contributed by Mikhail Khachayants)
+ Fixed a build error involving pngtest.c under a custom config.
+ This was a regression introduced in a code cleanup in libpng-1.6.43.
+ (Contributed by Ben Wagner)
+ Fixed and improved the config files for AppVeyor CI and Travis CI.
+
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
Subscription is required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
diff --git a/Build/source/libs/libpng/libpng-src/CMakeLists.txt b/Build/source/libs/libpng/libpng-src/CMakeLists.txt
index ad3f2427dc1..16cc2617df4 100644
--- a/Build/source/libs/libpng/libpng-src/CMakeLists.txt
+++ b/Build/source/libs/libpng/libpng-src/CMakeLists.txt
@@ -19,7 +19,7 @@ cmake_minimum_required(VERSION 3.6)
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 6)
-set(PNGLIB_REVISION 43)
+set(PNGLIB_REVISION 44)
set(PNGLIB_SUBREVISION 0)
#set(PNGLIB_SUBREVISION "git")
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_REVISION})
@@ -90,6 +90,21 @@ endif()
option(PNG_DEBUG "Enable debug output" OFF)
option(PNG_HARDWARE_OPTIMIZATIONS "Enable hardware optimizations" ON)
+# Initialize and show the target architecture variable PNG_TARGET_ARCHITECTURE.
+#
+# NOTE:
+# On macOS, CMake sets CMAKE_SYSTEM_PROCESSOR to either "x86_64" or "arm64",
+# based upon the OS architecture, not the target architecture. As such, we need
+# to check CMAKE_OSX_ARCHITECTURES to identify which hardware-specific flags to
+# enable. Note that this will fail if you attempt to build a universal binary
+# in a single CMake invocation.
+if (APPLE AND CMAKE_OSX_ARCHITECTURES)
+ string(TOLOWER "${CMAKE_OSX_ARCHITECTURES}" PNG_TARGET_ARCHITECTURE)
+else()
+ string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" PNG_TARGET_ARCHITECTURE)
+endif()
+message(STATUS "Building for target architecture: ${PNG_TARGET_ARCHITECTURE}")
+
# Allow the users to specify a custom location of zlib.
# This option is deprecated, and no longer needed with CMake 3.12 and newer.
# Under the CMake policy CMP0074, if zlib is being built alongside libpng as a
@@ -119,22 +134,11 @@ else()
# libm is not available or not needed.
endif()
-# CMake currently sets CMAKE_SYSTEM_PROCESSOR to one of x86_64 or arm64 on macOS,
-# based upon the OS architecture, not the target architecture. As such, we need
-# to check CMAKE_OSX_ARCHITECTURES to identify which hardware-specific flags to
-# enable. Note that this will fail if you attempt to build a universal binary in
-# a single CMake invocation.
-if (APPLE AND CMAKE_OSX_ARCHITECTURES)
- set(TARGET_ARCH ${CMAKE_OSX_ARCHITECTURES})
-else()
- set(TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR})
-endif()
-
if(PNG_HARDWARE_OPTIMIZATIONS)
# Set definitions and sources for ARM.
-if(TARGET_ARCH MATCHES "^(ARM|arm|aarch)")
- if(TARGET_ARCH MATCHES "^(ARM64|arm64|aarch64)")
+if(PNG_TARGET_ARCHITECTURE MATCHES "^(arm|aarch)")
+ if(PNG_TARGET_ARCHITECTURE MATCHES "^(arm64|aarch64)")
set(PNG_ARM_NEON_POSSIBLE_VALUES on off)
set(PNG_ARM_NEON "on"
CACHE STRING "Enable ARM NEON optimizations: on|off; on is default")
@@ -153,9 +157,6 @@ if(TARGET_ARCH MATCHES "^(ARM|arm|aarch)")
arm/arm_init.c
arm/filter_neon_intrinsics.c
arm/palette_neon_intrinsics.c)
- if(NOT MSVC)
- list(APPEND libpng_arm_sources arm/filter_neon.S)
- endif()
if(PNG_ARM_NEON STREQUAL "on")
add_definitions(-DPNG_ARM_NEON_OPT=2)
elseif(PNG_ARM_NEON STREQUAL "check")
@@ -167,7 +168,7 @@ if(TARGET_ARCH MATCHES "^(ARM|arm|aarch)")
endif()
# Set definitions and sources for PowerPC.
-if(TARGET_ARCH MATCHES "^(powerpc|ppc64)")
+if(PNG_TARGET_ARCHITECTURE MATCHES "^(powerpc|ppc64)")
set(PNG_POWERPC_VSX_POSSIBLE_VALUES on off)
set(PNG_POWERPC_VSX "on"
CACHE STRING "Enable POWERPC VSX optimizations: on|off; on is default")
@@ -189,7 +190,7 @@ if(TARGET_ARCH MATCHES "^(powerpc|ppc64)")
endif()
# Set definitions and sources for Intel.
-if(TARGET_ARCH MATCHES "^(i[3-6]86|x86|AMD64)")
+if(PNG_TARGET_ARCHITECTURE MATCHES "^(i[3-6]86|x86|amd64)")
set(PNG_INTEL_SSE_POSSIBLE_VALUES on off)
set(PNG_INTEL_SSE "on"
CACHE STRING "Enable INTEL_SSE optimizations: on|off; on is default")
@@ -211,7 +212,7 @@ if(TARGET_ARCH MATCHES "^(i[3-6]86|x86|AMD64)")
endif()
# Set definitions and sources for MIPS.
-if(TARGET_ARCH MATCHES "^(mipsel|mips64el)")
+if(PNG_TARGET_ARCHITECTURE MATCHES "^(mipsel|mips64el)")
set(PNG_MIPS_MSA_POSSIBLE_VALUES on off)
set(PNG_MIPS_MSA "on"
CACHE STRING "Enable MIPS_MSA optimizations: on|off; on is default")
@@ -258,7 +259,7 @@ if(TARGET_ARCH MATCHES "^(mipsel|mips64el)")
endif()
# Set definitions and sources for LoongArch.
-if(TARGET_ARCH MATCHES "^(loongarch)")
+if(PNG_TARGET_ARCHITECTURE MATCHES "^(loongarch)")
include(CheckCCompilerFlag)
set(PNG_LOONGARCH_LSX_POSSIBLE_VALUES on off)
set(PNG_LOONGARCH_LSX "on"
@@ -289,27 +290,27 @@ endif()
else(PNG_HARDWARE_OPTIMIZATIONS)
# Set definitions and sources for ARM.
-if(TARGET_ARCH MATCHES "^(ARM|arm|aarch)")
+if(PNG_TARGET_ARCHITECTURE MATCHES "^(arm|aarch)")
add_definitions(-DPNG_ARM_NEON_OPT=0)
endif()
# Set definitions and sources for PowerPC.
-if(TARGET_ARCH MATCHES "^(powerpc|ppc64)")
+if(PNG_TARGET_ARCHITECTURE MATCHES "^(powerpc|ppc64)")
add_definitions(-DPNG_POWERPC_VSX_OPT=0)
endif()
# Set definitions and sources for Intel.
-if(TARGET_ARCH MATCHES "^(i[3-6]86|x86|AMD64)")
+if(PNG_TARGET_ARCHITECTURE MATCHES "^(i[3-6]86|x86|amd64)")
add_definitions(-DPNG_INTEL_SSE_OPT=0)
endif()
# Set definitions and sources for MIPS.
-if(TARGET_ARCH MATCHES "^(mipsel|mips64el)")
+if(PNG_TARGET_ARCHITECTURE MATCHES "^(mipsel|mips64el)")
add_definitions(-DPNG_MIPS_MSA_OPT=0)
endif()
# Set definitions and sources for LoongArch.
-if(TARGET_ARCH MATCHES "^(loongarch)")
+if(PNG_TARGET_ARCHITECTURE MATCHES "^(loongarch)")
add_definitions(-DPNG_LOONGARCH_LSX_OPT=0)
endif()
@@ -362,8 +363,6 @@ else()
message(STATUS "Could not find an AWK-compatible program")
endif()
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-
if(NOT AWK OR ANDROID OR IOS)
# No awk available to generate sources; use pre-built pnglibconf.h
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt
@@ -714,6 +713,8 @@ if(PNG_SHARED)
endif()
target_include_directories(png_shared
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
+ target_include_directories(png_shared
+ PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
target_include_directories(png_shared SYSTEM
INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/libpng${PNGLIB_ABI_VERSION}>)
target_link_libraries(png_shared PUBLIC ZLIB::ZLIB ${M_LIBRARY})
@@ -728,6 +729,8 @@ if(PNG_STATIC)
DEBUG_POSTFIX "${PNG_DEBUG_POSTFIX}")
target_include_directories(png_static
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
+ target_include_directories(png_static
+ PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
target_include_directories(png_static SYSTEM
INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/libpng${PNGLIB_ABI_VERSION}>)
target_link_libraries(png_static PUBLIC ZLIB::ZLIB ${M_LIBRARY})
@@ -757,6 +760,8 @@ if(PNG_FRAMEWORK)
set_target_properties(png_framework PROPERTIES DEFINE_SYMBOL "")
target_include_directories(png_framework
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
+ target_include_directories(png_framework
+ PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
target_include_directories(png_framework SYSTEM
INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/libpng${PNGLIB_ABI_VERSION}>)
target_link_libraries(png_framework PUBLIC ZLIB::ZLIB ${M_LIBRARY})
@@ -1128,6 +1133,30 @@ if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL)
FILE libpng${PNGLIB_ABI_VERSION}.cmake)
endif()
+# Create a CMake Config File that can be used via find_package(PNG CONFIG)
+if(NOT SKIP_INSTALL_CONFIG_FILE AND NOT SKIP_INSTALL_ALL)
+ install(TARGETS ${PNG_LIBRARY_TARGETS}
+ EXPORT PNGTargets
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+ include(CMakePackageConfigHelpers)
+ write_basic_package_version_file(PNGConfigVersion.cmake
+ VERSION ${PNGLIB_VERSION}
+ COMPATIBILITY SameMinorVersion)
+
+ install(EXPORT PNGTargets
+ FILE PNGTargets.cmake
+ NAMESPACE PNG::
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/PNG)
+
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/scripts/cmake/PNGConfig.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/PNGConfigVersion.cmake
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/PNG)
+endif()
+
# TODO: Create MSVC import lib for MinGW-compiled shared lib.
# pexports libpng.dll > libpng.def
# lib /def:libpng.def /machine:x86
diff --git a/Build/source/libs/libpng/libpng-src/Makefile.am b/Build/source/libs/libpng/libpng-src/Makefile.am
index 1f06c703a18..eed986c2b8d 100644
--- a/Build/source/libs/libpng/libpng-src/Makefile.am
+++ b/Build/source/libs/libpng/libpng-src/Makefile.am
@@ -108,7 +108,7 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\
if PNG_ARM_NEON
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/arm_init.c\
- arm/filter_neon.S arm/filter_neon_intrinsics.c \
+ arm/filter_neon_intrinsics.c \
arm/palette_neon_intrinsics.c
endif
diff --git a/Build/source/libs/libpng/libpng-src/README b/Build/source/libs/libpng/libpng-src/README
index a6ca3ae9f94..3af606889b9 100644
--- a/Build/source/libs/libpng/libpng-src/README
+++ b/Build/source/libs/libpng/libpng-src/README
@@ -1,4 +1,4 @@
-README for libpng version 1.6.43
+README for libpng version 1.6.44
================================
See the note about version numbers near the top of `png.h`.
diff --git a/Build/source/libs/libpng/libpng-src/arm/filter_neon.S b/Build/source/libs/libpng/libpng-src/arm/filter_neon.S
index 2308aad13e6..fc3c7a29645 100644
--- a/Build/source/libs/libpng/libpng-src/arm/filter_neon.S
+++ b/Build/source/libs/libpng/libpng-src/arm/filter_neon.S
@@ -1,253 +1,61 @@
-/* filter_neon.S - NEON optimised filter functions
+/* filter_neon.S - placeholder file
*
- * Copyright (c) 2018 Cosmin Truta
- * Copyright (c) 2014,2017 Glenn Randers-Pehrson
- * Written by Mans Rullgard, 2011.
+ * Copyright (c) 2024 Cosmin Truta
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*/
+/* IMPORTANT NOTE:
+ *
+ * Historically, the hand-coded assembler implementation of Neon optimizations
+ * in this module had not been in sync with the intrinsics-based implementation
+ * in filter_neon_intrinsics.c and palette_neon_intrinsics.c, at least since
+ * the introduction of riffled palette optimizations. Moreover, the assembler
+ * code used to work on 32-bit ARM only, and it caused problems, even if empty,
+ * on 64-bit ARM.
+ *
+ * All references to this module from our internal build scripts and projects
+ * have been removed.
+ *
+ * For the external projects that might still expect this module to be present,
+ * we leave this stub in place, for the remaining lifetime of libpng-1.6.x.
+ * Everything should continue to function normally, as long as there are no
+ * deliberate attempts to use the old hand-made assembler code. A build error
+ * will be raised otherwise.
+ */
+
/* This is required to get the symbol renames, which are #defines, and the
* definitions (or not) of PNG_ARM_NEON_OPT and PNG_ARM_NEON_IMPLEMENTATION.
*/
#define PNG_VERSION_INFO_ONLY
#include "../pngpriv.h"
-#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__)
-.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
-#endif
-
#ifdef PNG_READ_SUPPORTED
-
-/* Assembler NEON support - only works for 32-bit ARM (i.e. it does not work for
- * ARM64). The code in arm/filter_neon_intrinsics.c supports ARM64, however it
- * only works if -mfpu=neon is specified on the GCC command line. See pngpriv.h
- * for the logic which sets PNG_USE_ARM_NEON_ASM:
- */
#if PNG_ARM_NEON_IMPLEMENTATION == 2 /* hand-coded assembler */
-
#if PNG_ARM_NEON_OPT > 0
-#ifdef __ELF__
-# define ELF
+#if defined(__clang__)
+#define GNUC_VERSION 0 /* not gcc, although it might pretend to be */
+#elif defined(__GNUC__)
+#define GNUC_MAJOR (__GNUC__ + 0)
+#define GNUC_MINOR (__GNUC_MINOR__ + 0)
+#define GNUC_PATCHLEVEL (__GNUC_PATCHLEVEL__ + 0)
+#define GNUC_VERSION (GNUC_MAJOR * 10000 + GNUC_MINOR * 100 + GNUC_PATCHLEVEL)
#else
-# define ELF @
+#define GNUC_VERSION 0 /* not gcc */
#endif
- .arch armv7-a
- .fpu neon
-
-.macro func name, export=0
- .macro endfunc
-ELF .size \name, . - \name
- .endfunc
- .purgem endfunc
- .endm
- .text
-
- /* Explicitly specifying alignment here because some versions of
- * GAS don't align code correctly. This is harmless in correctly
- * written versions of GAS.
- */
- .align 2
-
- .if \export
- .global \name
- .endif
-ELF .type \name, STT_FUNC
- .func \name
-\name:
-.endm
-
-func png_read_filter_row_sub4_neon, export=1
- ldr r3, [r0, #4] @ rowbytes
- vmov.i8 d3, #0
-1:
- vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
- vadd.u8 d0, d3, d4
- vadd.u8 d1, d0, d5
- vadd.u8 d2, d1, d6
- vadd.u8 d3, d2, d7
- vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
- subs r3, r3, #16
- bgt 1b
-
- bx lr
-endfunc
-
-func png_read_filter_row_sub3_neon, export=1
- ldr r3, [r0, #4] @ rowbytes
- vmov.i8 d3, #0
- mov r0, r1
- mov r2, #3
- mov r12, #12
- vld1.8 {q11}, [r0], r12
-1:
- vext.8 d5, d22, d23, #3
- vadd.u8 d0, d3, d22
- vext.8 d6, d22, d23, #6
- vadd.u8 d1, d0, d5
- vext.8 d7, d23, d23, #1
- vld1.8 {q11}, [r0], r12
- vst1.32 {d0[0]}, [r1,:32], r2
- vadd.u8 d2, d1, d6
- vst1.32 {d1[0]}, [r1], r2
- vadd.u8 d3, d2, d7
- vst1.32 {d2[0]}, [r1], r2
- vst1.32 {d3[0]}, [r1], r2
- subs r3, r3, #12
- bgt 1b
-
- bx lr
-endfunc
-
-func png_read_filter_row_up_neon, export=1
- ldr r3, [r0, #4] @ rowbytes
-1:
- vld1.8 {q0}, [r1,:128]
- vld1.8 {q1}, [r2,:128]!
- vadd.u8 q0, q0, q1
- vst1.8 {q0}, [r1,:128]!
- subs r3, r3, #16
- bgt 1b
-
- bx lr
-endfunc
-
-func png_read_filter_row_avg4_neon, export=1
- ldr r12, [r0, #4] @ rowbytes
- vmov.i8 d3, #0
-1:
- vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
- vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]!
- vhadd.u8 d0, d3, d16
- vadd.u8 d0, d0, d4
- vhadd.u8 d1, d0, d17
- vadd.u8 d1, d1, d5
- vhadd.u8 d2, d1, d18
- vadd.u8 d2, d2, d6
- vhadd.u8 d3, d2, d19
- vadd.u8 d3, d3, d7
- vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
- subs r12, r12, #16
- bgt 1b
-
- bx lr
-endfunc
-
-func png_read_filter_row_avg3_neon, export=1
- push {r4,lr}
- ldr r12, [r0, #4] @ rowbytes
- vmov.i8 d3, #0
- mov r0, r1
- mov r4, #3
- mov lr, #12
- vld1.8 {q11}, [r0], lr
-1:
- vld1.8 {q10}, [r2], lr
- vext.8 d5, d22, d23, #3
- vhadd.u8 d0, d3, d20
- vext.8 d17, d20, d21, #3
- vadd.u8 d0, d0, d22
- vext.8 d6, d22, d23, #6
- vhadd.u8 d1, d0, d17
- vext.8 d18, d20, d21, #6
- vadd.u8 d1, d1, d5
- vext.8 d7, d23, d23, #1
- vld1.8 {q11}, [r0], lr
- vst1.32 {d0[0]}, [r1,:32], r4
- vhadd.u8 d2, d1, d18
- vst1.32 {d1[0]}, [r1], r4
- vext.8 d19, d21, d21, #1
- vadd.u8 d2, d2, d6
- vhadd.u8 d3, d2, d19
- vst1.32 {d2[0]}, [r1], r4
- vadd.u8 d3, d3, d7
- vst1.32 {d3[0]}, [r1], r4
- subs r12, r12, #12
- bgt 1b
-
- pop {r4,pc}
-endfunc
-
-.macro paeth rx, ra, rb, rc
- vaddl.u8 q12, \ra, \rb @ a + b
- vaddl.u8 q15, \rc, \rc @ 2*c
- vabdl.u8 q13, \rb, \rc @ pa
- vabdl.u8 q14, \ra, \rc @ pb
- vabd.u16 q15, q12, q15 @ pc
- vcle.u16 q12, q13, q14 @ pa <= pb
- vcle.u16 q13, q13, q15 @ pa <= pc
- vcle.u16 q14, q14, q15 @ pb <= pc
- vand q12, q12, q13 @ pa <= pb && pa <= pc
- vmovn.u16 d28, q14
- vmovn.u16 \rx, q12
- vbsl d28, \rb, \rc
- vbsl \rx, \ra, d28
-.endm
-
-func png_read_filter_row_paeth4_neon, export=1
- ldr r12, [r0, #4] @ rowbytes
- vmov.i8 d3, #0
- vmov.i8 d20, #0
-1:
- vld4.32 {d4[],d5[],d6[],d7[]}, [r1,:128]
- vld4.32 {d16[],d17[],d18[],d19[]},[r2,:128]!
- paeth d0, d3, d16, d20
- vadd.u8 d0, d0, d4
- paeth d1, d0, d17, d16
- vadd.u8 d1, d1, d5
- paeth d2, d1, d18, d17
- vadd.u8 d2, d2, d6
- paeth d3, d2, d19, d18
- vmov d20, d19
- vadd.u8 d3, d3, d7
- vst4.32 {d0[0],d1[0],d2[0],d3[0]},[r1,:128]!
- subs r12, r12, #16
- bgt 1b
-
- bx lr
-endfunc
-
-func png_read_filter_row_paeth3_neon, export=1
- push {r4,lr}
- ldr r12, [r0, #4] @ rowbytes
- vmov.i8 d3, #0
- vmov.i8 d4, #0
- mov r0, r1
- mov r4, #3
- mov lr, #12
- vld1.8 {q11}, [r0], lr
-1:
- vld1.8 {q10}, [r2], lr
- paeth d0, d3, d20, d4
- vext.8 d5, d22, d23, #3
- vadd.u8 d0, d0, d22
- vext.8 d17, d20, d21, #3
- paeth d1, d0, d17, d20
- vst1.32 {d0[0]}, [r1,:32], r4
- vext.8 d6, d22, d23, #6
- vadd.u8 d1, d1, d5
- vext.8 d18, d20, d21, #6
- paeth d2, d1, d18, d17
- vext.8 d7, d23, d23, #1
- vld1.8 {q11}, [r0], lr
- vst1.32 {d1[0]}, [r1], r4
- vadd.u8 d2, d2, d6
- vext.8 d19, d21, d21, #1
- paeth d3, d2, d19, d18
- vst1.32 {d2[0]}, [r1], r4
- vmov d4, d19
- vadd.u8 d3, d3, d7
- vst1.32 {d3[0]}, [r1], r4
- subs r12, r12, #12
- bgt 1b
+#if (GNUC_VERSION > 0) && (GNUC_VERSION < 40300)
+#error "PNG_ARM_NEON is not supported with gcc versions earlier than 4.3.0"
+#elif GNUC_VERSION == 40504
+#error "PNG_ARM_NEON is not supported with gcc version 4.5.4"
+#else
+#error "Please use 'arm/*_neon_intrinsics.c' for PNG_ARM_NEON support"
+#endif
- pop {r4,pc}
-endfunc
#endif /* PNG_ARM_NEON_OPT > 0 */
-#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 (assembler) */
+#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 */
#endif /* READ */
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/android/ci_env.aarch64-linux-android.sh b/Build/source/libs/libpng/libpng-src/ci/targets/android/ci_env.aarch64-linux-android.sh
new file mode 100644
index 00000000000..fef0ef138fa
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/android/ci_env.aarch64-linux-android.sh
@@ -0,0 +1,16 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=aarch64
+export CI_TARGET_ARCHVER=aarch64
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=android
+export CI_TARGET_ABIVER=android29
+
+export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang"
+export CI_AR="llvm-ar"
+export CI_RANLIB="llvm-ranlib"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/android/ci_env.armv7a-linux-androideabi.sh b/Build/source/libs/libpng/libpng-src/ci/targets/android/ci_env.armv7a-linux-androideabi.sh
new file mode 100644
index 00000000000..c27bd121ebc
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/android/ci_env.armv7a-linux-androideabi.sh
@@ -0,0 +1,16 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=arm
+export CI_TARGET_ARCHVER=armv7a
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=androideabi
+export CI_TARGET_ABIVER=androideabi29
+
+export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang"
+export CI_AR="llvm-ar"
+export CI_RANLIB="llvm-ranlib"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/android/ci_env.i686-linux-android.sh b/Build/source/libs/libpng/libpng-src/ci/targets/android/ci_env.i686-linux-android.sh
new file mode 100644
index 00000000000..88e36908241
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/android/ci_env.i686-linux-android.sh
@@ -0,0 +1,16 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i686
+export CI_TARGET_ARCHVER=i686
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=android
+export CI_TARGET_ABIVER=android29
+
+export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang"
+export CI_AR="llvm-ar"
+export CI_RANLIB="llvm-ranlib"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/android/ci_env.x86_64-linux-android.sh b/Build/source/libs/libpng/libpng-src/ci/targets/android/ci_env.x86_64-linux-android.sh
new file mode 100644
index 00000000000..87460c88853
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/android/ci_env.x86_64-linux-android.sh
@@ -0,0 +1,16 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=x86_64
+export CI_TARGET_ARCHVER=x86_64
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=android
+export CI_TARGET_ABIVER=android29
+
+export CI_CC="$CI_TARGET_ARCHVER-$CI_TARGET_SYSTEM-$CI_TARGET_ABIVER-clang"
+export CI_AR="llvm-ar"
+export CI_RANLIB="llvm-ranlib"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/cygwin/ci_env.i686-pc-cygwin.sh b/Build/source/libs/libpng/libpng-src/ci/targets/cygwin/ci_env.i686-pc-cygwin.sh
new file mode 100644
index 00000000000..66b99997b9a
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/cygwin/ci_env.i686-pc-cygwin.sh
@@ -0,0 +1,18 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i686
+export CI_TARGET_SYSTEM=cygwin
+
+export CI_CC="$CI_TARGET_ARCH-pc-$CI_TARGET_SYSTEM-gcc"
+export CI_AR="$CI_CC-ar"
+export CI_RANLIB="$CI_CC-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=CYGWIN
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/cygwin/ci_env.x86_64-pc-cygwin.sh b/Build/source/libs/libpng/libpng-src/ci/targets/cygwin/ci_env.x86_64-pc-cygwin.sh
new file mode 100644
index 00000000000..78f8c25ff8d
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/cygwin/ci_env.x86_64-pc-cygwin.sh
@@ -0,0 +1,18 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=x86_64
+export CI_TARGET_SYSTEM=cygwin
+
+export CI_CC="$CI_TARGET_ARCH-pc-$CI_TARGET_SYSTEM-gcc"
+export CI_AR="$CI_CC-ar"
+export CI_RANLIB="$CI_CC-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=CYGWIN
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/darwin/ci_env.arm64-apple-darwin.sh b/Build/source/libs/libpng/libpng-src/ci/targets/darwin/ci_env.arm64-apple-darwin.sh
new file mode 100644
index 00000000000..c54d8c7605f
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/darwin/ci_env.arm64-apple-darwin.sh
@@ -0,0 +1,15 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=arm64
+export CI_TARGET_SYSTEM=darwin
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Darwin
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+ -DCMAKE_OSX_ARCHITECTURES=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/darwin/ci_env.x86_64-apple-darwin.sh b/Build/source/libs/libpng/libpng-src/ci/targets/darwin/ci_env.x86_64-apple-darwin.sh
new file mode 100644
index 00000000000..ee87711d547
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/darwin/ci_env.x86_64-apple-darwin.sh
@@ -0,0 +1,15 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=x86_64
+export CI_TARGET_SYSTEM=darwin
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Darwin
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+ -DCMAKE_OSX_ARCHITECTURES=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/freebsd/ci_env.aarch64-unknown-freebsd.sh b/Build/source/libs/libpng/libpng-src/ci/targets/freebsd/ci_env.aarch64-unknown-freebsd.sh
new file mode 100644
index 00000000000..42235de7d0d
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/freebsd/ci_env.aarch64-unknown-freebsd.sh
@@ -0,0 +1,14 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=aarch64
+export CI_TARGET_SYSTEM=freebsd
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=FreeBSD
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/freebsd/ci_env.i686-unknown-freebsd.sh b/Build/source/libs/libpng/libpng-src/ci/targets/freebsd/ci_env.i686-unknown-freebsd.sh
new file mode 100644
index 00000000000..3d188f8da19
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/freebsd/ci_env.i686-unknown-freebsd.sh
@@ -0,0 +1,14 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i686
+export CI_TARGET_SYSTEM=freebsd
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=FreeBSD
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/freebsd/ci_env.riscv64-unknown-freebsd.sh b/Build/source/libs/libpng/libpng-src/ci/targets/freebsd/ci_env.riscv64-unknown-freebsd.sh
new file mode 100644
index 00000000000..0a02cde4f60
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/freebsd/ci_env.riscv64-unknown-freebsd.sh
@@ -0,0 +1,14 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=riscv64
+export CI_TARGET_SYSTEM=freebsd
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=FreeBSD
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/freebsd/ci_env.x86_64-unknown-freebsd.sh b/Build/source/libs/libpng/libpng-src/ci/targets/freebsd/ci_env.x86_64-unknown-freebsd.sh
new file mode 100644
index 00000000000..c77ace53bae
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/freebsd/ci_env.x86_64-unknown-freebsd.sh
@@ -0,0 +1,14 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=x86_64
+export CI_TARGET_SYSTEM=freebsd
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=FreeBSD
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.aarch64-linux-gnu.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.aarch64-linux-gnu.sh
new file mode 100644
index 00000000000..cb85bc6d8bd
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.aarch64-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=aarch64
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.arm-linux-gnueabi.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.arm-linux-gnueabi.sh
new file mode 100644
index 00000000000..45504dfcd58
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.arm-linux-gnueabi.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=arm
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnueabi
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.arm-linux-gnueabihf.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.arm-linux-gnueabihf.sh
new file mode 100644
index 00000000000..3eb9d1892d2
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.arm-linux-gnueabihf.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=arm
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnueabihf
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.i686-linux-gnu.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.i686-linux-gnu.sh
new file mode 100644
index 00000000000..a5efd9f7fec
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.i686-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i686
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mips-linux-gnu.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mips-linux-gnu.sh
new file mode 100644
index 00000000000..532c93c04c7
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mips-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=mips
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mips64-linux-gnuabi64.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mips64-linux-gnuabi64.sh
new file mode 100644
index 00000000000..348d2b80065
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mips64-linux-gnuabi64.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=mips64
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnuabi64
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mips64el-linux-gnuabi64.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mips64el-linux-gnuabi64.sh
new file mode 100644
index 00000000000..e264913d8e2
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mips64el-linux-gnuabi64.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=mips64el
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnuabi64
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsel-linux-gnu.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsel-linux-gnu.sh
new file mode 100644
index 00000000000..f99050f10e1
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsel-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=mipsel
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsisa32r6-linux-gnu.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsisa32r6-linux-gnu.sh
new file mode 100644
index 00000000000..0a32867f632
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsisa32r6-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=mipsisa32r6
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsisa32r6el-linux-gnu.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsisa32r6el-linux-gnu.sh
new file mode 100644
index 00000000000..ca060093002
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsisa32r6el-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=mipsisa32r6el
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsisa64r6-linux-gnuabi64.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsisa64r6-linux-gnuabi64.sh
new file mode 100644
index 00000000000..6c1138fe62c
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsisa64r6-linux-gnuabi64.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=mipsisa64r6
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnuabi64
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsisa64r6el-linux-gnuabi64.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsisa64r6el-linux-gnuabi64.sh
new file mode 100644
index 00000000000..f64f2fcf442
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.mipsisa64r6el-linux-gnuabi64.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=mipsisa64r6el
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnuabi64
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.powerpc-linux-gnu.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.powerpc-linux-gnu.sh
new file mode 100644
index 00000000000..e50d9b502a3
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.powerpc-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=powerpc
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.powerpc64-linux-gnu.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.powerpc64-linux-gnu.sh
new file mode 100644
index 00000000000..15e60adf27e
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.powerpc64-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=powerpc64
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.powerpc64le-linux-gnu.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.powerpc64le-linux-gnu.sh
new file mode 100644
index 00000000000..be0e2ca69cc
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.powerpc64le-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=powerpc64le
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.riscv64-linux-gnu.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.riscv64-linux-gnu.sh
new file mode 100644
index 00000000000..d8518d97fec
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.riscv64-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=riscv64
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.x86_64-linux-gnu.sh b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.x86_64-linux-gnu.sh
new file mode 100644
index 00000000000..3263fbff8ab
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/linux/ci_env.x86_64-linux-gnu.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=x86_64
+export CI_TARGET_SYSTEM=linux
+export CI_TARGET_ABI=gnu
+
+export CI_GCC="${CI_GCC-gcc}"
+
+export CI_CC="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-$CI_GCC"
+export CI_AR="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ar"
+export CI_RANLIB="$CI_TARGET_ARCH-$CI_TARGET_SYSTEM-$CI_TARGET_ABI-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Linux
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/msdos/ci_env.i386-pc-msdoswatcom.sh b/Build/source/libs/libpng/libpng-src/ci/targets/msdos/ci_env.i386-pc-msdoswatcom.sh
new file mode 100644
index 00000000000..59f3bd58fd1
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/msdos/ci_env.i386-pc-msdoswatcom.sh
@@ -0,0 +1,18 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i386
+export CI_TARGET_SYSTEM=msdoswatcom
+
+export CI_CC="wcl386"
+
+# Open Watcom V2 CMake build
+# https://github.com/open-watcom/open-watcom-v2/discussions/716
+export CI_CMAKE_GENERATOR="Watcom WMake"
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=DOS
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/msdos/ci_env.i586-pc-msdosdjgpp.sh b/Build/source/libs/libpng/libpng-src/ci/targets/msdos/ci_env.i586-pc-msdosdjgpp.sh
new file mode 100644
index 00000000000..63e6d067670
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/msdos/ci_env.i586-pc-msdosdjgpp.sh
@@ -0,0 +1,18 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i586
+export CI_TARGET_SYSTEM=msdosdjgpp
+
+export CI_CC="$CI_TARGET_ARCH-pc-$CI_TARGET_SYSTEM-gcc"
+export CI_AR="$CI_CC-ar"
+export CI_RANLIB="$CI_CC-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Generic
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/msdos/ci_env.i86-pc-msdoswatcom.sh b/Build/source/libs/libpng/libpng-src/ci/targets/msdos/ci_env.i86-pc-msdoswatcom.sh
new file mode 100644
index 00000000000..3059f183566
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/msdos/ci_env.i86-pc-msdoswatcom.sh
@@ -0,0 +1,19 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i86
+export CI_TARGET_SYSTEM=msdoswatcom
+
+export CI_CC="wcl"
+
+# Open Watcom V2 CMake build
+# https://github.com/open-watcom/open-watcom-v2/discussions/716
+export CI_CMAKE_GENERATOR="Watcom WMake"
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=DOS
+ -DCMAKE_SYSTEM_PROCESSOR=I86
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.aarch64-windows-llvm.sh b/Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.aarch64-windows-llvm.sh
new file mode 100644
index 00000000000..80244172a34
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.aarch64-windows-llvm.sh
@@ -0,0 +1,18 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=aarch64
+export CI_TARGET_SYSTEM=windows
+
+export CI_CC="clang"
+export CI_AR="llvm-ar"
+export CI_RANLIB="llvm-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Windows
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.i686-w64-mingw32.sh b/Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.i686-w64-mingw32.sh
new file mode 100644
index 00000000000..8c83d0f2c64
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.i686-w64-mingw32.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i686
+export CI_TARGET_SYSTEM=mingw32
+
+# The output of `uname -s` on MSYS2 is understandable, and so is
+# CI_TARGET_SYSTEM above, in simplified form. (See also Cygwin.)
+# But aside from that, the Mingw-w64 nomenclature is rather messy.
+export CI_CC="$CI_TARGET_ARCH-w64-mingw32-gcc"
+export CI_AR="$CI_CC-ar"
+export CI_RANLIB="$CI_CC-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Windows
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.i686-windows-llvm.sh b/Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.i686-windows-llvm.sh
new file mode 100644
index 00000000000..3d29f6d558e
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.i686-windows-llvm.sh
@@ -0,0 +1,18 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=i686
+export CI_TARGET_SYSTEM=windows
+
+export CI_CC="clang"
+export CI_AR="llvm-ar"
+export CI_RANLIB="llvm-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Windows
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.x86_64-w64-mingw32.sh b/Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.x86_64-w64-mingw32.sh
new file mode 100644
index 00000000000..67d83557bde
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.x86_64-w64-mingw32.sh
@@ -0,0 +1,21 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=x86_64
+export CI_TARGET_SYSTEM=mingw64
+
+# The output of `uname -s` on MSYS2 is understandable, and so is
+# CI_TARGET_SYSTEM above, in simplified form. (See also Cygwin.)
+# But aside from that, the Mingw-w64 nomenclature is rather messy.
+export CI_CC="$CI_TARGET_ARCH-w64-mingw32-gcc"
+export CI_AR="$CI_CC-ar"
+export CI_RANLIB="$CI_CC-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Windows
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.x86_64-windows-llvm.sh b/Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.x86_64-windows-llvm.sh
new file mode 100644
index 00000000000..747f99b2148
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/ci/targets/windows/ci_env.x86_64-windows-llvm.sh
@@ -0,0 +1,18 @@
+# Copyright (c) 2023-2024 Cosmin Truta.
+#
+# Use, modification and distribution are subject to the MIT License.
+# Please see the accompanying file LICENSE_MIT.txt
+#
+# SPDX-License-Identifier: MIT
+
+export CI_TARGET_ARCH=x86_64
+export CI_TARGET_SYSTEM=windows
+
+export CI_CC="clang"
+export CI_AR="llvm-ar"
+export CI_RANLIB="llvm-ranlib"
+
+export CI_CMAKE_VARS="
+ -DCMAKE_SYSTEM_NAME=Windows
+ -DCMAKE_SYSTEM_PROCESSOR=$CI_TARGET_ARCH
+"
diff --git a/Build/source/libs/libpng/libpng-src/configure.ac b/Build/source/libs/libpng/libpng-src/configure.ac
index 505d72ff60d..22113b265c7 100644
--- a/Build/source/libs/libpng/libpng-src/configure.ac
+++ b/Build/source/libs/libpng/libpng-src/configure.ac
@@ -25,7 +25,7 @@ AC_PREREQ([2.68])
dnl Version number stuff here:
-AC_INIT([libpng],[1.6.43],[png-mng-implement@lists.sourceforge.net])
+AC_INIT([libpng],[1.6.44],[png-mng-implement@lists.sourceforge.net])
AC_CONFIG_MACRO_DIR([scripts/autoconf])
# libpng does not follow GNU file name conventions (hence 'foreign')
@@ -46,17 +46,17 @@ dnl automake, so the following is not necessary (and is not defined anyway):
dnl AM_PREREQ([1.11.2])
dnl stop configure from automagically running automake
-PNGLIB_VERSION=1.6.43
+PNGLIB_VERSION=1.6.44
PNGLIB_MAJOR=1
PNGLIB_MINOR=6
-PNGLIB_RELEASE=43
+PNGLIB_RELEASE=44
dnl End of version number stuff
AC_CONFIG_SRCDIR([pngget.c])
AC_CONFIG_HEADERS([config.h])
-# Check for basic programs.
+# Check the basic programs.
AC_LANG([C])
AC_PROG_CC
AM_PROG_AS
diff --git a/Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/Dockerfile b/Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/Dockerfile
index f5bc1a985d3..c9bc4145e06 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/Dockerfile
+++ b/Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/Dockerfile
@@ -1,3 +1,5 @@
+# Copyright 2024 Cosmin Truta
+# Copyright 2017 Glenn Randers-Pehrson
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,11 +17,12 @@
################################################################################
FROM gcr.io/oss-fuzz-base/base-builder
-MAINTAINER glennrp@gmail.com
+
RUN apt-get update && \
- apt-get install -y make autoconf automake libtool
+ apt-get install -y make autoconf automake libtool zlib1g-dev
+
+RUN git clone --depth=1 https://github.com/pnggroup/libpng.git && \
+ git clone --depth=1 https://github.com/madler/zlib.git && \
+ cp libpng/contrib/oss-fuzz/build.sh $SRC
-RUN git clone --depth 1 https://github.com/madler/zlib.git
-RUN git clone --depth 1 https://github.com/glennrp/libpng.git
-RUN cp libpng/contrib/oss-fuzz/build.sh $SRC
-WORKDIR libpng
+WORKDIR /home/libpng
diff --git a/Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/README.txt b/Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/README.txt
index 66d5242c574..b01af52accc 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/README.txt
+++ b/Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/README.txt
@@ -1,3 +1,7 @@
+libpng additions to oss-fuzz
+============================
+
+Copyright (c) 2024 Cosmin Truta
Copyright (c) 2017 Glenn Randers-Pehrson
This code is released under the libpng license.
diff --git a/Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/build.sh b/Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/build.sh
index 7b8f0263972..1970f9c06c5 100755
--- a/Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/build.sh
+++ b/Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/build.sh
@@ -1,6 +1,8 @@
-#!/bin/bash -eu
+#!/usr/bin/env bash
+set -eu
-# Copyright 2017-2018 Glenn Randers-Pehrson
+# Copyright 2024 Cosmin Truta
+# Copyright 2017 Glenn Randers-Pehrson
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,36 +17,31 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# Revisions by Glenn Randers-Pehrson, 2017:
-# 1. Build only the library, not the tools (changed "make -j$(nproc) all" to
-# "make -j$(nproc) libpng16.la").
-# 2. Disabled WARNING and WRITE options in pnglibconf.dfa.
-# 3. Build zlib alongside libpng
################################################################################
# Disable logging via library build configuration control.
-cat scripts/pnglibconf.dfa | \
- sed -e "s/option STDIO/option STDIO disabled/" \
- -e "s/option WARNING /option WARNING disabled/" \
- -e "s/option WRITE enables WRITE_INT_FUNCTIONS/option WRITE disabled/" \
-> scripts/pnglibconf.dfa.temp
-mv scripts/pnglibconf.dfa.temp scripts/pnglibconf.dfa
+sed -e "s/option STDIO/option STDIO disabled/" \
+ -e "s/option WARNING /option WARNING disabled/" \
+ -e "s/option WRITE enables WRITE_INT_FUNCTIONS/option WRITE disabled/" \
+ scripts/pnglibconf.dfa >scripts/pnglibconf.dfa.tmp
+mv -f scripts/pnglibconf.dfa.tmp scripts/pnglibconf.dfa
-# build the libpng library.
+# Build the libpng library ("libpng16.la"), excluding the auxiliary tools.
autoreconf -f -i
./configure --with-libpng-prefix=OSS_FUZZ_
make -j$(nproc) clean
make -j$(nproc) libpng16.la
-# build libpng_read_fuzzer.
+# Build libpng_read_fuzzer.
$CXX $CXXFLAGS -std=c++11 -I. \
$SRC/libpng/contrib/oss-fuzz/libpng_read_fuzzer.cc \
-o $OUT/libpng_read_fuzzer \
-lFuzzingEngine .libs/libpng16.a -lz
-# add seed corpus.
+# Add seed corpus.
find $SRC/libpng -name "*.png" | grep -v crashers | \
xargs zip $OUT/libpng_read_fuzzer_seed_corpus.zip
cp $SRC/libpng/contrib/oss-fuzz/*.dict \
- $SRC/libpng/contrib/oss-fuzz/*.options $OUT/
+ $SRC/libpng/contrib/oss-fuzz/*.options \
+ $OUT/
diff --git a/Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/libpng_read_fuzzer.cc b/Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/libpng_read_fuzzer.cc
index 0190cf7865d..ad9f9adc6a3 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/libpng_read_fuzzer.cc
+++ b/Build/source/libs/libpng/libpng-src/contrib/oss-fuzz/libpng_read_fuzzer.cc
@@ -204,5 +204,21 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
png_read_end(png_handler.png_ptr, png_handler.end_info_ptr);
PNG_CLEANUP
+
+#ifdef PNG_SIMPLIFIED_READ_SUPPORTED
+ // Simplified READ API
+ png_image image;
+ memset(&image, 0, (sizeof image));
+ image.version = PNG_IMAGE_VERSION;
+
+ if (!png_image_begin_read_from_memory(&image, data, size)) {
+ return 0;
+ }
+
+ image.format = PNG_FORMAT_RGBA;
+ std::vector<png_byte> buffer(PNG_IMAGE_SIZE(image));
+ png_image_finish_read(&image, NULL, buffer.data(), 0, NULL);
+#endif
+
return 0;
}
diff --git a/Build/source/libs/libpng/libpng-src/contrib/tools/chkfmt.sh b/Build/source/libs/libpng/libpng-src/contrib/tools/chkfmt.sh
deleted file mode 100644
index 8810aa7b5db..00000000000
--- a/Build/source/libs/libpng/libpng-src/contrib/tools/chkfmt.sh
+++ /dev/null
@@ -1,157 +0,0 @@
-#!/bin/sh
-
-# chkfmt.sh
-#
-# COPYRIGHT:
-# Written by John Cunningham Bowler, 2010.
-# Revised by Cosmin Truta, 2022.
-# To the extent possible under law, the author has waived all copyright and
-# related or neighboring rights to this work. The author published this work
-# from the United States.
-#
-# Check the format of the source files in the current directory:
-#
-# * The lines should not exceed a predefined maximum length.
-# * Tab characters should appear only where necessary (e.g. in makefiles).
-#
-# Optionally arguments are files or directories to check.
-#
-# -v: output the long lines (makes fixing them easier)
-# -e: spawn an editor for each file that needs a change ($EDITOR must be
-# defined). When using -e the script MUST be run from an interactive
-# command line.
-
-script_name=`basename "$0"`
-
-verbose=
-edit=
-vers=
-test "$1" = "-v" && {
- shift
- verbose=yes
-}
-test "$1" = "-e" && {
- shift
- if test -n "$EDITOR"
- then
- edit=yes
-
- # Copy the standard streams for the editor
- exec 3>&0 4>&1 5>&2
- else
- echo "$script_name -e: EDITOR must be defined" >&2
- exit 1
- fi
-}
-
-# Function to edit a single file - if the file isn't changed ask the user
-# whether or not to continue. This stuff only works if the script is run
-# from the command line (otherwise, don't specify -e or you will be sorry).
-doed(){
- cp "$file" "$file".orig
- "$EDITOR" "$file" 0>&3 1>&4 2>&5 3>&- 4>&- 5>&- || exit 1
- if cmp -s "$file".orig "$file"
- then
- rm "$file".orig
- echo -n "$file: file not changed, type anything to continue: " >&5
- read ans 0>&3
- test -n "$ans" || return 1
- fi
- return 0
-}
-
-# In beta versions, the version string which appears in files can be a little
-# long and cause spuriously overlong lines. To avoid this, substitute the
-# version string with a placeholder string "a.b.cc" before checking for long
-# lines.
-# (Starting from libpng version 1.6.36, we switched to a conventional Git
-# workflow, and we are no longer publishing beta versions.)
-if test -r png.h
-then
- vers="`sed -n -e \
- 's/^#define PNG_LIBPNG_VER_STRING .\([0-9]\.[0-9]\.[0-9][0-9a-z]*\).$/\1/p' \
- png.h`"
- echo "$script_name: checking version $vers"
-fi
-if test -z "$vers"
-then
- echo "$script_name: png.h not found, ignoring version number" >&2
-fi
-
-test -n "$1" || set -- .
-find "$@" \( -type d \( -name '.git' -o -name '.libs' -o -name 'projects' \) \
- -prune \) -o \( -type f \
- ! -name '*.[oa]' ! -name '*.l[oa]' ! -name '*.png' ! -name '*.out' \
- ! -name '*.jpg' ! -name '*.patch' ! -name '*.obj' ! -name '*.exe' \
- ! -name '*.com' ! -name '*.tar.*' ! -name '*.zip' ! -name '*.ico' \
- ! -name '*.res' ! -name '*.rc' ! -name '*.mms' ! -name '*.rej' \
- ! -name '*.dsp' ! -name '*.orig' ! -name '*.dfn' ! -name '*.swp' \
- ! -name '~*' ! -name '*.3' \
- ! -name 'missing' ! -name 'mkinstalldirs' ! -name 'depcomp' \
- ! -name 'aclocal.m4' ! -name 'install-sh' ! -name 'Makefile.in' \
- ! -name 'ltmain.sh' ! -name 'config*' -print \) | {
- st=0
- while read file
- do
- case "$file" in
- *.mak|*[Mm]akefile.*|*[Mm]akefile)
- # Makefiles require tabs, dependency lines can be this long.
- check_tabs=
- line_length=100;;
- *.awk)
- # Allow literal tabs.
- check_tabs=
- # Mainframe line printer, anyone?
- line_length=132;;
- */ci_*.sh)
- check_tabs=yes
- line_length=100;;
- *contrib/*/*.[ch])
- check_tabs=yes
- line_length=100;;
- *)
- check_tabs=yes
- line_length=80;;
- esac
-
- # Note that vers can only contain 0-9, . and a-z
- if test -n "$vers"
- then
- sed -e "s/$vers/a.b.cc/g" "$file" >"$file".$$
- else
- cp "$file" "$file".$$
- fi
- splt="`fold -$line_length "$file".$$ | diff -c "$file".$$ -`"
- rm "$file".$$
-
- if test -n "$splt"
- then
- echo "$file: lines too long"
- st=1
- if test -n "$EDITOR" -a -n "$edit"
- then
- doed "$file" || exit 1
- elif test -n "$verbose"
- then
- echo "$splt"
- fi
- fi
- if test -n "$check_tabs"
- then
- tab="`tr -c -d '\t' <"$file"`"
- if test -n "$tab"
- then
- echo "$file: file contains tab characters"
- st=1
- if test -n "$EDITOR" -a -n "$edit"
- then
- doed "$file" || exit 1
- elif test -n "$verbose"
- then
- echo "$splt"
- fi
- fi
- fi
- done
- exit $st
-}
diff --git a/Build/source/libs/libpng/libpng-src/libpng-manual.txt b/Build/source/libs/libpng/libpng-src/libpng-manual.txt
index 79880575994..2ce366d679f 100644
--- a/Build/source/libs/libpng/libpng-src/libpng-manual.txt
+++ b/Build/source/libs/libpng/libpng-src/libpng-manual.txt
@@ -9,7 +9,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
- libpng version 1.6.36, December 2018, through 1.6.43 - February 2024
+ libpng version 1.6.36, December 2018, through 1.6.44 - September 2024
Updated and distributed by Cosmin Truta
Copyright (c) 2018-2024 Cosmin Truta
diff --git a/Build/source/libs/libpng/libpng-src/libpng.3 b/Build/source/libs/libpng/libpng-src/libpng.3
index 45e76e4837c..5a3c89cb9c9 100644
--- a/Build/source/libs/libpng/libpng-src/libpng.3
+++ b/Build/source/libs/libpng/libpng-src/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "February 23, 2024"
+.TH LIBPNG 3 "September 12, 2024"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.6.43
+libpng \- Portable Network Graphics (PNG) Reference Library 1.6.44
.SH SYNOPSIS
\fB#include <png.h>\fP
@@ -528,7 +528,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
- libpng version 1.6.36, December 2018, through 1.6.43 - February 2024
+ libpng version 1.6.36, December 2018, through 1.6.44 - September 2024
Updated and distributed by Cosmin Truta
Copyright (c) 2018-2024 Cosmin Truta
diff --git a/Build/source/libs/libpng/libpng-src/libpngpf.3 b/Build/source/libs/libpng/libpng-src/libpngpf.3
index 0abec74a2dd..b7557ca27ee 100644
--- a/Build/source/libs/libpng/libpng-src/libpngpf.3
+++ b/Build/source/libs/libpng/libpng-src/libpngpf.3
@@ -1,6 +1,6 @@
-.TH LIBPNGPF 3 "February 23, 2024"
+.TH LIBPNGPF 3 "September 12, 2024"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.6.43
+libpng \- Portable Network Graphics (PNG) Reference Library 1.6.44
(private functions)
.SH SYNOPSIS
diff --git a/Build/source/libs/libpng/libpng-src/png.5 b/Build/source/libs/libpng/libpng-src/png.5
index a8a681813ff..14a3c432bff 100644
--- a/Build/source/libs/libpng/libpng-src/png.5
+++ b/Build/source/libs/libpng/libpng-src/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "February 23, 2024"
+.TH PNG 5 "September 12, 2024"
.SH NAME
png \- Portable Network Graphics (PNG) format
diff --git a/Build/source/libs/libpng/libpng-src/png.c b/Build/source/libs/libpng/libpng-src/png.c
index 9ed31570092..9a9fb23d942 100644
--- a/Build/source/libs/libpng/libpng-src/png.c
+++ b/Build/source/libs/libpng/libpng-src/png.c
@@ -14,7 +14,7 @@
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_6_43 Your_png_h_is_not_version_1_6_43;
+typedef png_libpng_version_1_6_44 Your_png_h_is_not_version_1_6_44;
/* Tells libpng that we have already handled the first "num_bytes" bytes
* of the PNG file signature. If the PNG data is embedded into another
@@ -794,7 +794,7 @@ png_get_copyright(png_const_structrp png_ptr)
return PNG_STRING_COPYRIGHT
#else
return PNG_STRING_NEWLINE \
- "libpng version 1.6.43" PNG_STRING_NEWLINE \
+ "libpng version 1.6.44" PNG_STRING_NEWLINE \
"Copyright (c) 2018-2024 Cosmin Truta" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
PNG_STRING_NEWLINE \
@@ -1203,6 +1203,24 @@ png_colorspace_sync(png_const_structrp png_ptr, png_inforp info_ptr)
#endif /* GAMMA */
#ifdef PNG_COLORSPACE_SUPPORTED
+static int
+png_safe_add(png_int_32 *addend0_and_result, png_int_32 addend1,
+ png_int_32 addend2) {
+ /* Safely add three integers. Returns 0 on success, 1 on overlow.
+ * IMPLEMENTATION NOTE: ANSI requires signed overflow not to occur, therefore
+ * relying on addition of two positive values producing a negative one is not
+ * safe.
+ */
+ int addend0 = *addend0_and_result;
+ if (0x7fffffff - addend0 < addend1)
+ return 1;
+ addend0 += addend1;
+ if (0x7fffffff - addend1 < addend2)
+ return 1;
+ *addend0_and_result = addend0 + addend2;
+ return 0;
+}
+
/* Added at libpng-1.5.5 to support read and write of true CIEXYZ values for
* cHRM, as opposed to using chromaticities. These internal APIs return
* non-zero on a parameter error. The X, Y and Z values are required to be
@@ -1211,38 +1229,52 @@ png_colorspace_sync(png_const_structrp png_ptr, png_inforp info_ptr)
static int
png_xy_from_XYZ(png_xy *xy, const png_XYZ *XYZ)
{
- png_int_32 d, dwhite, whiteX, whiteY;
+ png_int_32 d, dred, dgreen, dwhite, whiteX, whiteY;
- d = XYZ->red_X + XYZ->red_Y + XYZ->red_Z;
+ /* 'd' in each of the blocks below is just X+Y+Z for each component,
+ * x, y and z are X,Y,Z/(X+Y+Z).
+ */
+ d = XYZ->red_X;
+ if (png_safe_add(&d, XYZ->red_Y, XYZ->red_Z))
+ return 1;
if (png_muldiv(&xy->redx, XYZ->red_X, PNG_FP_1, d) == 0)
return 1;
if (png_muldiv(&xy->redy, XYZ->red_Y, PNG_FP_1, d) == 0)
return 1;
- dwhite = d;
+ dred = d;
whiteX = XYZ->red_X;
whiteY = XYZ->red_Y;
- d = XYZ->green_X + XYZ->green_Y + XYZ->green_Z;
+ d = XYZ->green_X;
+ if (png_safe_add(&d, XYZ->green_Y, XYZ->green_Z))
+ return 1;
if (png_muldiv(&xy->greenx, XYZ->green_X, PNG_FP_1, d) == 0)
return 1;
if (png_muldiv(&xy->greeny, XYZ->green_Y, PNG_FP_1, d) == 0)
return 1;
- dwhite += d;
+ dgreen = d;
whiteX += XYZ->green_X;
whiteY += XYZ->green_Y;
- d = XYZ->blue_X + XYZ->blue_Y + XYZ->blue_Z;
+ d = XYZ->blue_X;
+ if (png_safe_add(&d, XYZ->blue_Y, XYZ->blue_Z))
+ return 1;
if (png_muldiv(&xy->bluex, XYZ->blue_X, PNG_FP_1, d) == 0)
return 1;
if (png_muldiv(&xy->bluey, XYZ->blue_Y, PNG_FP_1, d) == 0)
return 1;
- dwhite += d;
whiteX += XYZ->blue_X;
whiteY += XYZ->blue_Y;
- /* The reference white is simply the sum of the end-point (X,Y,Z) vectors,
- * thus:
+ /* The reference white is simply the sum of the end-point (X,Y,Z) vectors so
+ * the fillowing calculates (X+Y+Z) of the reference white (media white,
+ * encoding white) itself:
*/
+ if (png_safe_add(&d, dred, dgreen))
+ return 1;
+
+ dwhite = d;
+
if (png_muldiv(&xy->whitex, whiteX, PNG_FP_1, dwhite) == 0)
return 1;
if (png_muldiv(&xy->whitey, whiteY, PNG_FP_1, dwhite) == 0)
@@ -1257,20 +1289,6 @@ png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy)
png_fixed_point red_inverse, green_inverse, blue_scale;
png_fixed_point left, right, denominator;
- /* Check xy and, implicitly, z. Note that wide gamut color spaces typically
- * have end points with 0 tristimulus values (these are impossible end
- * points, but they are used to cover the possible colors). We check
- * xy->whitey against 5, not 0, to avoid a possible integer overflow.
- */
- if (xy->redx < 0 || xy->redx > PNG_FP_1) return 1;
- if (xy->redy < 0 || xy->redy > PNG_FP_1-xy->redx) return 1;
- if (xy->greenx < 0 || xy->greenx > PNG_FP_1) return 1;
- if (xy->greeny < 0 || xy->greeny > PNG_FP_1-xy->greenx) return 1;
- if (xy->bluex < 0 || xy->bluex > PNG_FP_1) return 1;
- if (xy->bluey < 0 || xy->bluey > PNG_FP_1-xy->bluex) return 1;
- if (xy->whitex < 0 || xy->whitex > PNG_FP_1) return 1;
- if (xy->whitey < 5 || xy->whitey > PNG_FP_1-xy->whitex) return 1;
-
/* The reverse calculation is more difficult because the original tristimulus
* value had 9 independent values (red,green,blue)x(X,Y,Z) however only 8
* derived values were recorded in the cHRM chunk;
@@ -1451,16 +1469,16 @@ png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy)
* value of 2 indicates an internal error to the caller.
*/
if (png_muldiv(&left, xy->greenx-xy->bluex, xy->redy - xy->bluey, 7) == 0)
- return 2;
+ return 1;
if (png_muldiv(&right, xy->greeny-xy->bluey, xy->redx - xy->bluex, 7) == 0)
- return 2;
+ return 1;
denominator = left - right;
/* Now find the red numerator. */
if (png_muldiv(&left, xy->greenx-xy->bluex, xy->whitey-xy->bluey, 7) == 0)
- return 2;
+ return 1;
if (png_muldiv(&right, xy->greeny-xy->bluey, xy->whitex-xy->bluex, 7) == 0)
- return 2;
+ return 1;
/* Overflow is possible here and it indicates an extreme set of PNG cHRM
* chunk values. This calculation actually returns the reciprocal of the
@@ -1473,9 +1491,9 @@ png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy)
/* Similarly for green_inverse: */
if (png_muldiv(&left, xy->redy-xy->bluey, xy->whitex-xy->bluex, 7) == 0)
- return 2;
+ return 1;
if (png_muldiv(&right, xy->redx-xy->bluex, xy->whitey-xy->bluey, 7) == 0)
- return 2;
+ return 1;
if (png_muldiv(&green_inverse, xy->whitey, denominator, left-right) == 0 ||
green_inverse <= xy->whitey)
return 1;
@@ -1520,25 +1538,14 @@ png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy)
static int
png_XYZ_normalize(png_XYZ *XYZ)
{
- png_int_32 Y;
+ png_int_32 Y, Ytemp;
- if (XYZ->red_Y < 0 || XYZ->green_Y < 0 || XYZ->blue_Y < 0 ||
- XYZ->red_X < 0 || XYZ->green_X < 0 || XYZ->blue_X < 0 ||
- XYZ->red_Z < 0 || XYZ->green_Z < 0 || XYZ->blue_Z < 0)
+ /* Normalize by scaling so the sum of the end-point Y values is PNG_FP_1. */
+ Ytemp = XYZ->red_Y;
+ if (png_safe_add(&Ytemp, XYZ->green_Y, XYZ->blue_Y))
return 1;
- /* Normalize by scaling so the sum of the end-point Y values is PNG_FP_1.
- * IMPLEMENTATION NOTE: ANSI requires signed overflow not to occur, therefore
- * relying on addition of two positive values producing a negative one is not
- * safe.
- */
- Y = XYZ->red_Y;
- if (0x7fffffff - Y < XYZ->green_X)
- return 1;
- Y += XYZ->green_Y;
- if (0x7fffffff - Y < XYZ->blue_X)
- return 1;
- Y += XYZ->blue_Y;
+ Y = Ytemp;
if (Y != PNG_FP_1)
{
diff --git a/Build/source/libs/libpng/libpng-src/png.h b/Build/source/libs/libpng/libpng-src/png.h
index 83d39031260..04a233f393e 100644
--- a/Build/source/libs/libpng/libpng-src/png.h
+++ b/Build/source/libs/libpng/libpng-src/png.h
@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
- * libpng version 1.6.43
+ * libpng version 1.6.44
*
* Copyright (c) 2018-2024 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
@@ -15,7 +15,7 @@
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.6.35, July 2018:
* Glenn Randers-Pehrson
- * libpng versions 1.6.36, December 2018, through 1.6.43, February 2024:
+ * libpng versions 1.6.36, December 2018, through 1.6.44, September 2024:
* Cosmin Truta
* See also "Contributing Authors", below.
*/
@@ -239,7 +239,7 @@
* ...
* 1.5.30 15 10530 15.so.15.30[.0]
* ...
- * 1.6.43 16 10643 16.so.16.43[.0]
+ * 1.6.44 16 10644 16.so.16.44[.0]
*
* Henceforth the source version will match the shared-library major and
* minor numbers; the shared-library major version number will be used for
@@ -275,7 +275,7 @@
*/
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.6.43"
+#define PNG_LIBPNG_VER_STRING "1.6.44"
#define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n"
/* The versions of shared library builds should stay in sync, going forward */
@@ -286,18 +286,18 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 6
-#define PNG_LIBPNG_VER_RELEASE 43
+#define PNG_LIBPNG_VER_RELEASE 44
/* This should be zero for a public release, or non-zero for a
* development version.
*/
-#define PNG_LIBPNG_VER_BUILD 0
+#define PNG_LIBPNG_VER_BUILD 0
/* Release Status */
-#define PNG_LIBPNG_BUILD_ALPHA 1
-#define PNG_LIBPNG_BUILD_BETA 2
-#define PNG_LIBPNG_BUILD_RC 3
-#define PNG_LIBPNG_BUILD_STABLE 4
+#define PNG_LIBPNG_BUILD_ALPHA 1
+#define PNG_LIBPNG_BUILD_BETA 2
+#define PNG_LIBPNG_BUILD_RC 3
+#define PNG_LIBPNG_BUILD_STABLE 4
#define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7
/* Release-Specific Flags */
@@ -317,7 +317,7 @@
* From version 1.0.1 it is:
* XXYYZZ, where XX=major, YY=minor, ZZ=release
*/
-#define PNG_LIBPNG_VER 10643 /* 1.6.43 */
+#define PNG_LIBPNG_VER 10644 /* 1.6.44 */
/* Library configuration: these options cannot be changed after
* the library has been built.
@@ -427,7 +427,7 @@ extern "C" {
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
-typedef char* png_libpng_version_1_6_43;
+typedef char* png_libpng_version_1_6_44;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
*
@@ -824,7 +824,7 @@ typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp,
* your compiler. This may be very difficult - try using a different compiler
* to build the library!
*/
-PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef);
+PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), (jmp_buf, int), typedef);
#endif
/* Transform masks for the high-level interface */
diff --git a/Build/source/libs/libpng/libpng-src/pngconf.h b/Build/source/libs/libpng/libpng-src/pngconf.h
index 000d7b1a8a6..4a4b58ac81e 100644
--- a/Build/source/libs/libpng/libpng-src/pngconf.h
+++ b/Build/source/libs/libpng/libpng-src/pngconf.h
@@ -1,7 +1,7 @@
/* pngconf.h - machine-configurable file for libpng
*
- * libpng version 1.6.43
+ * libpng version 1.6.44
*
* Copyright (c) 2018-2024 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
@@ -88,7 +88,7 @@
/* The PNGARG macro was used in versions of libpng prior to 1.6.0 to protect
* against legacy (pre ISOC90) compilers that did not understand function
- * prototypes. It is not required for modern C compilers.
+ * prototypes. [Deprecated.]
*/
#ifndef PNGARG
# define PNGARG(arglist) arglist
@@ -298,7 +298,7 @@
#ifndef PNG_EXPORTA
# define PNG_EXPORTA(ordinal, type, name, args, attributes) \
- PNG_FUNCTION(PNG_EXPORT_TYPE(type), (PNGAPI name), PNGARG(args), \
+ PNG_FUNCTION(PNG_EXPORT_TYPE(type), (PNGAPI name), args, \
PNG_LINKAGE_API attributes)
#endif
@@ -316,7 +316,7 @@
#endif
#ifndef PNG_CALLBACK
-# define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) PNGARG(args)
+# define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) args
#endif
/* Support for compiler specific function attributes. These are used
diff --git a/Build/source/libs/libpng/libpng-src/pngerror.c b/Build/source/libs/libpng/libpng-src/pngerror.c
index 29ebda79437..1babf9f8d24 100644
--- a/Build/source/libs/libpng/libpng-src/pngerror.c
+++ b/Build/source/libs/libpng/libpng-src/pngerror.c
@@ -20,13 +20,14 @@
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
-static PNG_FUNCTION(void, png_default_error,PNGARG((png_const_structrp png_ptr,
- png_const_charp error_message)),PNG_NORETURN);
+static PNG_FUNCTION(void /* PRIVATE */,
+png_default_error,(png_const_structrp png_ptr, png_const_charp error_message),
+ PNG_NORETURN);
#ifdef PNG_WARNINGS_SUPPORTED
static void /* PRIVATE */
-png_default_warning PNGARG((png_const_structrp png_ptr,
- png_const_charp warning_message));
+png_default_warning(png_const_structrp png_ptr,
+ png_const_charp warning_message);
#endif /* WARNINGS */
/* This function is called whenever there is a fatal error. This function
diff --git a/Build/source/libs/libpng/libpng-src/pnglibconf.h b/Build/source/libs/libpng/libpng-src/pnglibconf.h
index 83f09fbe773..f5ce441ecb9 100644
--- a/Build/source/libs/libpng/libpng-src/pnglibconf.h
+++ b/Build/source/libs/libpng/libpng-src/pnglibconf.h
@@ -1,6 +1,6 @@
/* pnglibconf.h - library build configuration */
-/* libpng version 1.6.43 */
+/* libpng version 1.6.44 */
/* Copyright (c) 2018-2024 Cosmin Truta */
/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */
diff --git a/Build/source/libs/libpng/libpng-src/pngpriv.h b/Build/source/libs/libpng/libpng-src/pngpriv.h
index 9bfdb713421..b59084e7eb9 100644
--- a/Build/source/libs/libpng/libpng-src/pngpriv.h
+++ b/Build/source/libs/libpng/libpng-src/pngpriv.h
@@ -140,47 +140,6 @@
* callbacks to do this.
*/
# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_neon
-
- /* By default the 'intrinsics' code in arm/filter_neon_intrinsics.c is used
- * if possible - if __ARM_NEON__ is set and the compiler version is not known
- * to be broken. This is controlled by PNG_ARM_NEON_IMPLEMENTATION which can
- * be:
- *
- * 1 The intrinsics code (the default with __ARM_NEON__)
- * 2 The hand coded assembler (the default without __ARM_NEON__)
- *
- * It is possible to set PNG_ARM_NEON_IMPLEMENTATION in CPPFLAGS, however
- * this is *NOT* supported and may cease to work even after a minor revision
- * to libpng. It *is* valid to do this for testing purposes, e.g. speed
- * testing or a new compiler, but the results should be communicated to the
- * libpng implementation list for incorporation in the next minor release.
- */
-# ifndef PNG_ARM_NEON_IMPLEMENTATION
-# if defined(__ARM_NEON__) || defined(__ARM_NEON)
-# if defined(__clang__)
- /* At present it is unknown by the libpng developers which versions
- * of clang support the intrinsics, however some or perhaps all
- * versions do not work with the assembler so this may be
- * irrelevant, so just use the default (do nothing here.)
- */
-# elif defined(__GNUC__)
- /* GCC 4.5.4 NEON support is known to be broken. 4.6.3 is known to
- * work, so if this *is* GCC, or G++, look for a version >4.5
- */
-# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6)
-# define PNG_ARM_NEON_IMPLEMENTATION 2
-# endif /* no GNUC support */
-# endif /* __GNUC__ */
-# else /* !defined __ARM_NEON__ */
- /* The 'intrinsics' code simply won't compile without this -mfpu=neon:
- */
-# if !defined(__aarch64__) && !defined(_M_ARM64)
- /* The assembler code currently does not work on ARM64 */
-# define PNG_ARM_NEON_IMPLEMENTATION 2
-# endif /* __aarch64__ */
-# endif /* __ARM_NEON__ */
-# endif /* !PNG_ARM_NEON_IMPLEMENTATION */
-
# ifndef PNG_ARM_NEON_IMPLEMENTATION
/* Use the intrinsics code by default. */
# define PNG_ARM_NEON_IMPLEMENTATION 1
diff --git a/Build/source/libs/libpng/libpng-src/pngtest.c b/Build/source/libs/libpng/libpng-src/pngtest.c
index 45ef66a7015..5969f503103 100644
--- a/Build/source/libs/libpng/libpng-src/pngtest.c
+++ b/Build/source/libs/libpng/libpng-src/pngtest.c
@@ -45,8 +45,13 @@
#include "png.h"
+/* This hack was introduced for historical reasons, and we are
+ * still keeping it in libpng-1.6.x for compatibility reasons.
+ */
+#define STDERR stdout
+
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_6_43 Your_png_h_is_not_version_1_6_43;
+typedef png_libpng_version_1_6_44 Your_png_h_is_not_version_1_6_44;
/* Ensure that all version numbers in png.h are consistent with one another. */
#if (PNG_LIBPNG_VER != PNG_LIBPNG_VER_MAJOR * 10000 + \
@@ -103,11 +108,6 @@ typedef png_libpng_version_1_6_43 Your_png_h_is_not_version_1_6_43;
typedef FILE * png_FILE_p;
#endif
-/* This hack was introduced for historical reasons, and we are
- * still keeping it in libpng-1.6.x for compatibility reasons.
- */
-#define STDERR stdout
-
#ifndef PNG_DEBUG
# define PNG_DEBUG 0
#endif
@@ -518,9 +518,9 @@ static int maximum_allocation = 0;
static int total_allocation = 0;
static int num_allocations = 0;
-png_voidp PNGCBAPI png_debug_malloc PNGARG((png_structp png_ptr,
- png_alloc_size_t size));
-void PNGCBAPI png_debug_free PNGARG((png_structp png_ptr, png_voidp ptr));
+png_voidp PNGCBAPI png_debug_malloc(png_structp png_ptr,
+ png_alloc_size_t size);
+void PNGCBAPI png_debug_free(png_structp png_ptr, png_voidp ptr);
png_voidp
PNGCBAPI png_debug_malloc(png_structp png_ptr, png_alloc_size_t size)
diff --git a/Build/source/libs/libpng/libpng-src/scripts/cmake/AUTHORS.md b/Build/source/libs/libpng/libpng-src/scripts/cmake/AUTHORS.md
index 641dde265f3..c0982178650 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/cmake/AUTHORS.md
+++ b/Build/source/libs/libpng/libpng-src/scripts/cmake/AUTHORS.md
@@ -20,6 +20,8 @@ Author List
* Cosmin Truta
* Dan Rosser
* David Callu
+ * Eric Riff
+ * Erik Scholz
* Gianfranco Costamagna
* Gleb Mazovetskiy
* Glenn Randers-Pehrson
diff --git a/Build/source/libs/libpng/libpng-src/scripts/cmake/PNGConfig.cmake b/Build/source/libs/libpng/libpng-src/scripts/cmake/PNGConfig.cmake
new file mode 100644
index 00000000000..3b6f646de7b
--- /dev/null
+++ b/Build/source/libs/libpng/libpng-src/scripts/cmake/PNGConfig.cmake
@@ -0,0 +1,15 @@
+include(CMakeFindDependencyMacro)
+
+find_dependency(ZLIB REQUIRED)
+
+include("${CMAKE_CURRENT_LIST_DIR}/PNGTargets.cmake")
+
+if(NOT TARGET PNG::PNG)
+ if(TARGET PNG::png_shared)
+ add_library(PNG::PNG INTERFACE IMPORTED)
+ target_link_libraries(PNG::PNG INTERFACE PNG::png_shared)
+ elseif(TARGET PNG::png_static)
+ add_library(PNG::PNG INTERFACE IMPORTED)
+ target_link_libraries(PNG::PNG INTERFACE PNG::png_static)
+ endif()
+endif()
diff --git a/Build/source/libs/libpng/libpng-src/scripts/cmake/README.md b/Build/source/libs/libpng/libpng-src/scripts/cmake/README.md
index ca418893a95..18e71071751 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/cmake/README.md
+++ b/Build/source/libs/libpng/libpng-src/scripts/cmake/README.md
@@ -20,6 +20,7 @@ File List
CMakeLists.txt ==> The main CMake lists file
scripts/cmake/AUTHORS.md ==> The Authors file
scripts/cmake/README.md ==> This file
+ scripts/cmake/PNGConfig.cmake ==> Config file for FindPNG
scripts/cmake/genchk.cmake.in ==> Template for genchk.cmake
scripts/cmake/genout.cmake.in ==> Template for genout.cmake
scripts/cmake/gensrc.cmake.in ==> Template for gensrc.cmake
diff --git a/Build/source/libs/libpng/libpng-src/scripts/cmake/genout.cmake.in b/Build/source/libs/libpng/libpng-src/scripts/cmake/genout.cmake.in
index ab828596899..d4a333282fc 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/cmake/genout.cmake.in
+++ b/Build/source/libs/libpng/libpng-src/scripts/cmake/genout.cmake.in
@@ -19,6 +19,7 @@ set(BINDIR "@CMAKE_CURRENT_BINARY_DIR@")
set(AWK "@AWK@")
set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@")
set(CMAKE_C_FLAGS @CMAKE_C_FLAGS@)
+set(CMAKE_SYSROOT @CMAKE_SYSROOT@)
set(INCDIR "@CMAKE_CURRENT_BINARY_DIR@")
set(PNG_PREFIX "@PNG_PREFIX@")
set(PNGLIB_MAJOR "@PNGLIB_MAJOR@")
@@ -38,6 +39,10 @@ if(APPLE)
endif()
endif()
+if(CMAKE_SYSROOT)
+ set(PLATFORM_C_FLAGS ${PLATFORM_C_FLAGS} "--sysroot=${CMAKE_SYSROOT}")
+endif()
+
get_filename_component(INPUTEXT "${INPUT}" EXT)
get_filename_component(OUTPUTEXT "${OUTPUT}" EXT)
get_filename_component(INPUTBASE "${INPUT}" NAME_WE)
diff --git a/Build/source/libs/libpng/libpng-src/scripts/dfn.awk b/Build/source/libs/libpng/libpng-src/scripts/dfn.awk
index 0b25c8a3728..0b970e00618 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/dfn.awk
+++ b/Build/source/libs/libpng/libpng-src/scripts/dfn.awk
@@ -75,12 +75,12 @@ $1 ~ /^PNG_DFN_END_SORT/{
if (lineno == "") lineno=NR
if (sub(/^[^"]*PNG_DFN *"/,"",line) != 1) {
- print "line", lineno ": processing failed:"
- print orig
- err=1
- next
+ print "line", lineno ": processing failed:"
+ print orig
+ err=1
+ next
} else {
- ++out_count
+ ++out_count
}
# Now examine quotes within the value:
@@ -94,7 +94,7 @@ $1 ~ /^PNG_DFN_END_SORT/{
# #define first_name John
# #define last_name Smith
#
- # PNG_DFN"#define name @'@" first_name "@ @" last_name "@@'"
+ # PNG_DFN"#define name @'@" first_name "@ @" last_name "@@'"
#
# Might get C preprocessed to:
#
@@ -102,7 +102,7 @@ $1 ~ /^PNG_DFN_END_SORT/{
#
# Which this script reduces to:
#
- # #define name "John Smith"
+ # #define name "John Smith"
#
while (1) {
# While there is an @" remove it and the next "@
@@ -195,7 +195,7 @@ $1 ~ /^PNG_DFN_END_SORT/{
END{
if (out_count > 0 || err > 0)
- exit err
+ exit err
print "no definition lines found"
exit 1
diff --git a/Build/source/libs/libpng/libpng-src/scripts/libpng-config-head.in b/Build/source/libs/libpng/libpng-src/scripts/libpng-config-head.in
index 37577f4134f..3d26a0a6a22 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/libpng-config-head.in
+++ b/Build/source/libs/libpng/libpng-src/scripts/libpng-config-head.in
@@ -11,7 +11,7 @@
# Modeled after libxml-config.
-version=1.6.43
+version=1.6.44
prefix=""
libdir=""
libs=""
diff --git a/Build/source/libs/libpng/libpng-src/scripts/libpng.pc.in b/Build/source/libs/libpng/libpng-src/scripts/libpng.pc.in
index 6a581d1a481..fc3f6f67fb2 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/libpng.pc.in
+++ b/Build/source/libs/libpng/libpng-src/scripts/libpng.pc.in
@@ -5,6 +5,6 @@ includedir=@includedir@/libpng16
Name: libpng
Description: Loads and saves PNG files
-Version: 1.6.43
+Version: 1.6.44
Libs: -L${libdir} -lpng16
Cflags: -I${includedir}
diff --git a/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt b/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt
index 83f09fbe773..f5ce441ecb9 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt
+++ b/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt
@@ -1,6 +1,6 @@
/* pnglibconf.h - library build configuration */
-/* libpng version 1.6.43 */
+/* libpng version 1.6.44 */
/* Copyright (c) 2018-2024 Cosmin Truta */
/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */