[libpng] Update to 1.6.43, fix libm linkage (#36953)

This commit is contained in:
Kai Pastor 2024-02-27 09:17:51 +01:00 committed by GitHub
parent 28a5a28b2e
commit 89efa21f94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 40 additions and 32 deletions

View File

@ -1,10 +1,10 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
index e355e4d..3e2f346 100644 index eaba327..dbd31d7 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -1053,6 +1053,12 @@ if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL) @@ -1126,6 +1126,12 @@ if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL)
install(EXPORT libpng install(EXPORT libpng
DESTINATION lib/libpng DESTINATION ${CMAKE_INSTALL_LIBDIR}/libpng
FILE libpng${PNGLIB_ABI_VERSION}.cmake) FILE libpng${PNGLIB_ABI_VERSION}.cmake)
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libpng-config.cmake" " + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libpng-config.cmake" "
+ include(CMakeFindDependencyMacro) + include(CMakeFindDependencyMacro)

View File

@ -1,11 +1,11 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
index e355e4d..990e32a 100644 index 3857b82..4c68989 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -188,8 +188,8 @@ endif() @@ -221,8 +221,8 @@ endif()
# Set definitions and sources for MIPS. # Set definitions and sources for MIPS.
if(TARGET_ARCH MATCHES "mipsel*" OR if(TARGET_ARCH MATCHES "^(mipsel|mips64el)")
TARGET_ARCH MATCHES "mips64el*")
- set(PNG_MIPS_MSA_POSSIBLE_VALUES on off) - set(PNG_MIPS_MSA_POSSIBLE_VALUES on off)
- set(PNG_MIPS_MSA "on" - set(PNG_MIPS_MSA "on"
+ set(PNG_MIPS_MSA_POSSIBLE_VALUES on off check) + set(PNG_MIPS_MSA_POSSIBLE_VALUES on off check)
@ -13,12 +13,16 @@ index e355e4d..990e32a 100644
CACHE STRING "Enable MIPS_MSA optimizations: on|off; on is default") CACHE STRING "Enable MIPS_MSA optimizations: on|off; on is default")
set_property(CACHE PNG_MIPS_MSA set_property(CACHE PNG_MIPS_MSA
PROPERTY STRINGS ${PNG_MIPS_MSA_POSSIBLE_VALUES}) PROPERTY STRINGS ${PNG_MIPS_MSA_POSSIBLE_VALUES})
@@ -202,6 +202,8 @@ if(TARGET_ARCH MATCHES "mipsel*" OR @@ -254,6 +254,12 @@ if(TARGET_ARCH MATCHES "^(mipsel|mips64el)")
mips/filter_msa_intrinsics.c) mips/filter_msa_intrinsics.c)
if(${PNG_MIPS_MSA} STREQUAL "on") add_definitions(-DPNG_MIPS_MSA_OPT=2)
add_definitions(-DPNG_MIPS_MSA_OPT=2) add_definitions(-DPNG_MIPS_MMI_OPT=0)
+ else() + elseif(PNG_MIPS_MSA STREQUAL "check")
+ add_definitions(-DPNG_MIPS_MSA_CHECK_SUPPORTED) + set(libpng_mips_sources
endif() + mips/mips_init.c
else() + mips/filter_msa_intrinsics.c)
add_definitions(-DPNG_MIPS_MSA_OPT=0) + add_definitions(-DPNG_MIPS_MSA_CHECK_SUPPORTED)
+ add_definitions(-DPNG_MIPS_MMI_CHECK_SUPPORTED)
elseif(PNG_MIPS_MMI STREQUAL "on")
set(libpng_mips_sources
mips/mips_init.c

View File

@ -1,17 +1,17 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
index 958b1d6..21c8941 100644 index dbd31d7..7deb6c2 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -84,6 +84,12 @@ endif() @@ -109,6 +109,12 @@ elseif(POLICY CMP0074)
endif()
if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU AND NOT EMSCRIPTEN) if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU AND NOT EMSCRIPTEN)
find_library(M_LIBRARY m) + block(SCOPE_FOR VARIABLES)
+ if(NOT M_LIBRARY) + if(VCPKG_CRT_LINKAGE STREQUAL "static")
+ find_library(M_LIBRARY m PATHS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES} NO_DEFAULT_PATH) + list(PREPEND CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_STATIC_LIBRARY_SUFFIX}")
+ if(M_LIBRARY)
+ set(M_LIBRARY m)
+ endif() + endif()
+ endif() + find_library(M_LIBRARY m PATHS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
if(NOT M_LIBRARY) + endblock()
set(M_LIBRARY "") find_library(M_LIBRARY m)
endif() if(M_LIBRARY)
set(M_LIBRARY m)

View File

@ -13,7 +13,7 @@ if ("apng" IN_LIST FEATURES)
vcpkg_download_distfile(LIBPNG_APNG_PATCH_ARCHIVE vcpkg_download_distfile(LIBPNG_APNG_PATCH_ARCHIVE
URLS "https://downloads.sourceforge.net/project/libpng-apng/libpng16/${VERSION}/${LIBPNG_APNG_PATCH_NAME}.gz" URLS "https://downloads.sourceforge.net/project/libpng-apng/libpng16/${VERSION}/${LIBPNG_APNG_PATCH_NAME}.gz"
FILENAME "${LIBPNG_APNG_PATCH_NAME}.gz" FILENAME "${LIBPNG_APNG_PATCH_NAME}.gz"
SHA512 373cc9f0df15f7c77c0a59ddaac22374cfae37174b63a642e68e3a17a6d0bb1015399d771998c7eb6b356b634f157f0009743f4cc659f3b8e480a9533010ef9c SHA512 a724f7de486920cb119818f7172fb589bc2c3c1cc1f81bb5c4da0609ab108ef9ef7406cf689a20bc4e8da69647847f550ed497b3fa99a10539e9a0abf492c053
) )
set(LIBPNG_APNG_PATCH_PATH "${CURRENT_BUILDTREES_DIR}/src/${LIBPNG_APNG_PATCH_NAME}") set(LIBPNG_APNG_PATCH_PATH "${CURRENT_BUILDTREES_DIR}/src/${LIBPNG_APNG_PATCH_NAME}")
if (NOT EXISTS "${LIBPNG_APNG_PATCH_PATH}") if (NOT EXISTS "${LIBPNG_APNG_PATCH_PATH}")
@ -32,7 +32,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO glennrp/libpng REPO glennrp/libpng
REF v${VERSION} REF v${VERSION}
SHA512 5f36a145c7d41f1c417d5f4e03be0155dae3499d72e67170acaad92c1af418c0bb6bc508e9b4b27ef4206bf0074cbf74978bade3bff28bc291867b8f8c2a38cf SHA512 3bb2a7b73113be42b09c2116e6c6f5a7ddb4e2ab06e0b13e10b7314acdccc4bb624ff602e16140c0484f6cde80efa190296226be3da195c6926819f07c723c12
HEAD_REF master HEAD_REF master
PATCHES PATCHES
"${LIBPNG_APNG_PATCH_PATH}" "${LIBPNG_APNG_PATCH_PATH}"

View File

@ -1,7 +1,6 @@
{ {
"name": "libpng", "name": "libpng",
"version": "1.6.40", "version": "1.6.43",
"port-version": 1,
"description": "libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files", "description": "libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files",
"homepage": "https://github.com/glennrp/libpng", "homepage": "https://github.com/glennrp/libpng",
"license": "libpng-2.0", "license": "libpng-2.0",

View File

@ -4737,8 +4737,8 @@
"port-version": 1 "port-version": 1
}, },
"libpng": { "libpng": {
"baseline": "1.6.40", "baseline": "1.6.43",
"port-version": 1 "port-version": 0
}, },
"libpopt": { "libpopt": {
"baseline": "1.16", "baseline": "1.16",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "8673cfd41804628ce52c499b8d23c5696104ec47",
"version": "1.6.43",
"port-version": 0
},
{ {
"git-tree": "8b6d2c1150541a94c0ca5b2f060eb21eed4a40b2", "git-tree": "8b6d2c1150541a94c0ca5b2f060eb21eed4a40b2",
"version": "1.6.40", "version": "1.6.40",