From dc2e8a4c7ed12bd3d34e07beb93293a34738c2b1 Mon Sep 17 00:00:00 2001 From: c8ef Date: Fri, 10 Jan 2025 22:54:13 +0800 Subject: [PATCH 1/8] [libpng] update to 1.6.45 --- ports/libpng/portfile.cmake | 4 ++-- ports/libpng/vcpkg.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index f653b153d65ae1..7556f292e108fa 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -12,7 +12,7 @@ if ("apng" IN_LIST FEATURES) vcpkg_download_distfile(LIBPNG_APNG_PATCH_ARCHIVE URLS "https://downloads.sourceforge.net/project/libpng-apng/libpng16/${VERSION}/${LIBPNG_APNG_PATCH_NAME}.gz" FILENAME "${LIBPNG_APNG_PATCH_NAME}.gz" - SHA512 ea89018a02ed171b82af9644ec2ff658c8a288e99b5470c7a3fd142c6fa95bbe19cd34c4fae654bc8783b41c3eb3b2d15b486bda3b0307ec3090e99f34465e20 + SHA512 60a0b3072f4d1fddcce79eaa89f461d27c32e4c1a4cf3e6dc30ff1091aeceeb2fbfacf830bdb59bad98e39091fdd47458589411b59f94e2d4fc9c121b0545291 ) set(LIBPNG_APNG_PATCH_PATH "${CURRENT_BUILDTREES_DIR}/src/${LIBPNG_APNG_PATCH_NAME}") if (NOT EXISTS "${LIBPNG_APNG_PATCH_PATH}") @@ -30,7 +30,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO glennrp/libpng REF v${VERSION} - SHA512 c023bc7dcf3d0ea045a63204f2266b2c53b601b99d7c5f5a7b547bc9a48b205a277f699eefa47f136483f495175b226527097cd447d6b0fbceb029eb43638f63 + SHA512 b999c241ce5d95dfae5bb2c71e8b686a1c4af69b67262bda309a58c83967b5f3eacd7987d6990f71ebc16aa89f4f7a59c846857d56c80bca7e9ec657caff62c7 HEAD_REF master PATCHES "${LIBPNG_APNG_PATCH_PATH}" diff --git a/ports/libpng/vcpkg.json b/ports/libpng/vcpkg.json index 39f2b499510396..61743aeb73e923 100644 --- a/ports/libpng/vcpkg.json +++ b/ports/libpng/vcpkg.json @@ -1,6 +1,6 @@ { "name": "libpng", - "version": "1.6.44", + "version": "1.6.45", "description": "libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files", "homepage": "https://github.com/glennrp/libpng", "license": "libpng-2.0", From 25aace27219a3bd3799558a84a12510783afb8a9 Mon Sep 17 00:00:00 2001 From: c8ef Date: Fri, 10 Jan 2025 22:55:30 +0800 Subject: [PATCH 2/8] [libpng] update to 1.6.45 --- versions/baseline.json | 2 +- versions/l-/libpng.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index b975d993ce5078..91ec6748e22850 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4989,7 +4989,7 @@ "port-version": 1 }, "libpng": { - "baseline": "1.6.44", + "baseline": "1.6.45", "port-version": 0 }, "libpopt": { diff --git a/versions/l-/libpng.json b/versions/l-/libpng.json index 26a79377e51549..8a8ee4c0dea90a 100644 --- a/versions/l-/libpng.json +++ b/versions/l-/libpng.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "e97d7b0625076b35684f0be1775d1a14f23275da", + "version": "1.6.45", + "port-version": 0 + }, { "git-tree": "bda480fe3c3cef1113fe8bfdecda127a5b3b2a77", "version": "1.6.44", From 7a511f1b3d95499805d7e40db1ca9db74f2677f1 Mon Sep 17 00:00:00 2001 From: c8ef Date: Fri, 10 Jan 2025 23:20:15 +0800 Subject: [PATCH 3/8] [libpng] update to 1.6.45 --- ports/libpng/cmake.patch | 81 ++++++++++++++++++++- ports/libpng/fix-msa-support-for-mips.patch | 28 ------- ports/libpng/fix-tools-static.patch | 16 ---- ports/libpng/libm.patch | 17 ----- ports/libpng/pkgconfig.patch | 32 -------- ports/libpng/portfile.cmake | 6 +- ports/libpng/vcpkg.json | 2 +- 7 files changed, 81 insertions(+), 101 deletions(-) delete mode 100644 ports/libpng/fix-msa-support-for-mips.patch delete mode 100644 ports/libpng/fix-tools-static.patch delete mode 100644 ports/libpng/libm.patch delete mode 100644 ports/libpng/pkgconfig.patch diff --git a/ports/libpng/cmake.patch b/ports/libpng/cmake.patch index 66a3731160e069..120dea5aab64fe 100644 --- a/ports/libpng/cmake.patch +++ b/ports/libpng/cmake.patch @@ -1,8 +1,45 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index e355e4d..6dfe543 100644 +index f10f489..28ce98a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -632,7 +632,7 @@ else() +@@ -119,6 +119,12 @@ find_package(ZLIB REQUIRED) + if(UNIX + AND NOT (APPLE OR BEOS OR HAIKU) + AND NOT EMSCRIPTEN) ++ block(SCOPE_FOR VARIABLES) ++ if(VCPKG_CRT_LINKAGE STREQUAL "static") ++ list(PREPEND CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_STATIC_LIBRARY_SUFFIX}") ++ endif() ++ find_library(M_LIBRARY m PATHS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}) ++ endblock() + find_library(M_LIBRARY m) + if(M_LIBRARY) + set(M_LIBRARY m) +@@ -208,8 +214,8 @@ if(PNG_HARDWARE_OPTIMIZATIONS) + + # Set definitions and sources for MIPS. + if(PNG_TARGET_ARCHITECTURE MATCHES "^(mipsel|mips64el)") +- set(PNG_MIPS_MSA_POSSIBLE_VALUES on off) +- set(PNG_MIPS_MSA "on" ++ set(PNG_MIPS_MSA_POSSIBLE_VALUES on off check) ++ set(PNG_MIPS_MSA "check" + CACHE STRING "Enable MIPS_MSA optimizations: on|off; on is default") + set_property(CACHE PNG_MIPS_MSA + PROPERTY STRINGS ${PNG_MIPS_MSA_POSSIBLE_VALUES}) +@@ -241,6 +247,12 @@ if(PNG_HARDWARE_OPTIMIZATIONS) + mips/filter_msa_intrinsics.c) + add_definitions(-DPNG_MIPS_MSA_OPT=2) + add_definitions(-DPNG_MIPS_MMI_OPT=0) ++ elseif(PNG_MIPS_MSA STREQUAL "check") ++ set(libpng_mips_sources ++ mips/mips_init.c ++ mips/filter_msa_intrinsics.c) ++ 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 +@@ -594,7 +606,7 @@ else() # We also need to use a custom suffix, in order to distinguish between the # shared import library name and the static library name. set(PNG_SHARED_OUTPUT_NAME "libpng${PNGLIB_ABI_VERSION}") @@ -11,3 +48,43 @@ index e355e4d..6dfe543 100644 endif() if(PNG_SHARED) +@@ -858,9 +870,9 @@ if(PNG_TESTS AND PNG_SHARED) + FILES ${PNGSUITE_PNGS}) + endif() + +-if(PNG_SHARED AND PNG_TOOLS) ++if(PNG_TOOLS) + add_executable(pngfix ${pngfix_sources}) +- target_link_libraries(pngfix PRIVATE png_shared) ++ target_link_libraries(pngfix PRIVATE $ $) # in vcpkg there's only one + set(PNG_BIN_TARGETS pngfix) + + add_executable(png-fix-itxt ${png_fix_itxt_sources}) +@@ -944,12 +956,15 @@ endif() + # We use the same files like ./configure, so we have to set its vars. + # Only do this on Windows for Cygwin - the files don't make much sense + # outside of a UNIX look-alike. +-if(NOT WIN32 OR CYGWIN OR MINGW) ++if(1) + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(exec_prefix ${CMAKE_INSTALL_PREFIX}) + set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) + set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) +- set(LIBS "-lz -lm") ++ set(LIBS "") ++ if(M_LIBRARY) ++ string(APPEND LIBS "-lm") ++ endif() + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}.pc + @ONLY) +@@ -1008,6 +1023,9 @@ if(NOT SKIP_INSTALL_PROGRAMS AND NOT SKIP_INSTALL_ALL) + endif() + + if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}.pc ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +++elseif(0) + # Install the man pages. + install(FILES libpng.3 libpngpf.3 + DESTINATION ${CMAKE_INSTALL_MANDIR}/man3) diff --git a/ports/libpng/fix-msa-support-for-mips.patch b/ports/libpng/fix-msa-support-for-mips.patch deleted file mode 100644 index 7b6e6d18b66f64..00000000000000 --- a/ports/libpng/fix-msa-support-for-mips.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3857b82..4c68989 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -221,8 +221,8 @@ endif() - - # Set definitions and sources for MIPS. - if(PNG_TARGET_ARCHITECTURE MATCHES "^(mipsel|mips64el)") -- set(PNG_MIPS_MSA_POSSIBLE_VALUES on off) -- set(PNG_MIPS_MSA "on" -+ set(PNG_MIPS_MSA_POSSIBLE_VALUES on off check) -+ set(PNG_MIPS_MSA "check" - CACHE STRING "Enable MIPS_MSA optimizations: on|off; on is default") - set_property(CACHE PNG_MIPS_MSA - PROPERTY STRINGS ${PNG_MIPS_MSA_POSSIBLE_VALUES}) -@@ -254,6 +254,12 @@ if(TARGET_ARCH MATCHES "^(mipsel|mips64el)") - mips/filter_msa_intrinsics.c) - add_definitions(-DPNG_MIPS_MSA_OPT=2) - add_definitions(-DPNG_MIPS_MMI_OPT=0) -+ elseif(PNG_MIPS_MSA STREQUAL "check") -+ set(libpng_mips_sources -+ mips/mips_init.c -+ mips/filter_msa_intrinsics.c) -+ 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 diff --git a/ports/libpng/fix-tools-static.patch b/ports/libpng/fix-tools-static.patch deleted file mode 100644 index 74ff71dd7b8db5..00000000000000 --- a/ports/libpng/fix-tools-static.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3857b82..4c68989 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -963,9 +963,9 @@ - FILES ${PNGSUITE_PNGS}) - endif() - --if(PNG_SHARED AND PNG_TOOLS) -+if(PNG_TOOLS) - add_executable(pngfix ${pngfix_sources}) -- target_link_libraries(pngfix PRIVATE png_shared) -+ target_link_libraries(pngfix PRIVATE $ $) # in vcpkg there's only one - set(PNG_BIN_TARGETS pngfix) - - add_executable(png-fix-itxt ${png_fix_itxt_sources}) diff --git a/ports/libpng/libm.patch b/ports/libpng/libm.patch deleted file mode 100644 index 6960021905bc33..00000000000000 --- a/ports/libpng/libm.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index dbd31d7..7deb6c2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -109,6 +109,12 @@ elseif(POLICY CMP0074) - endif() - - if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU AND NOT EMSCRIPTEN) -+ block(SCOPE_FOR VARIABLES) -+ if(VCPKG_CRT_LINKAGE STREQUAL "static") -+ list(PREPEND CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_STATIC_LIBRARY_SUFFIX}") -+ endif() -+ find_library(M_LIBRARY m PATHS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}) -+ endblock() - find_library(M_LIBRARY m) - if(M_LIBRARY) - set(M_LIBRARY m) diff --git a/ports/libpng/pkgconfig.patch b/ports/libpng/pkgconfig.patch deleted file mode 100644 index ed92a94f1d4aee..00000000000000 --- a/ports/libpng/pkgconfig.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e355e4d..b5b9172 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -960,12 +960,15 @@ endif() - # We use the same files like ./configure, so we have to set its vars. - # Only do this on Windows for Cygwin - the files don't make much sense - # outside of a UNIX look-alike. --if(NOT WIN32 OR CYGWIN OR MINGW) -+if(1) - set(prefix ${CMAKE_INSTALL_PREFIX}) - set(exec_prefix ${CMAKE_INSTALL_PREFIX}) - set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) - set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) -- set(LIBS "-lz -lm") -+ set(LIBS "") -+ if(M_LIBRARY) -+ string(APPEND LIBS "-lm") -+ endif() - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in - ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}.pc - @ONLY) -@@ -1030,6 +1033,9 @@ if(NOT SKIP_INSTALL_PROGRAMS AND NOT SKIP_INSTALL_ALL) - endif() - - if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL) -+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}.pc -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -+elseif(0) - # Install the man pages. - install(FILES libpng.3 libpngpf.3 - DESTINATION ${CMAKE_INSTALL_MANDIR}/man3) diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index 7556f292e108fa..fc134d14540d56 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -28,17 +28,13 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO glennrp/libpng + REPO pnggroup/libpng REF v${VERSION} SHA512 b999c241ce5d95dfae5bb2c71e8b686a1c4af69b67262bda309a58c83967b5f3eacd7987d6990f71ebc16aa89f4f7a59c846857d56c80bca7e9ec657caff62c7 HEAD_REF master PATCHES "${LIBPNG_APNG_PATCH_PATH}" cmake.patch - libm.patch - pkgconfig.patch - fix-msa-support-for-mips.patch - fix-tools-static.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PNG_SHARED) diff --git a/ports/libpng/vcpkg.json b/ports/libpng/vcpkg.json index 61743aeb73e923..188352ff918e74 100644 --- a/ports/libpng/vcpkg.json +++ b/ports/libpng/vcpkg.json @@ -2,7 +2,7 @@ "name": "libpng", "version": "1.6.45", "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/pnggroup/libpng", "license": "libpng-2.0", "dependencies": [ { From 14d6d21353a9a90bb5f1813f775c94be23c87110 Mon Sep 17 00:00:00 2001 From: c8ef Date: Fri, 10 Jan 2025 23:20:24 +0800 Subject: [PATCH 4/8] [libpng] update to 1.6.45 --- versions/l-/libpng.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libpng.json b/versions/l-/libpng.json index 8a8ee4c0dea90a..7a17a2cfb2f819 100644 --- a/versions/l-/libpng.json +++ b/versions/l-/libpng.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "e97d7b0625076b35684f0be1775d1a14f23275da", + "git-tree": "abed5b777996c1dc7553827f4e8b06ca612b9f37", "version": "1.6.45", "port-version": 0 }, From 3a4719f4ff4c83230223a8bdea162d098a330eaf Mon Sep 17 00:00:00 2001 From: c8ef Date: Fri, 10 Jan 2025 23:28:24 +0800 Subject: [PATCH 5/8] [libpng] update to 1.6.45 --- ports/libpng/cmake.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libpng/cmake.patch b/ports/libpng/cmake.patch index 120dea5aab64fe..ae48b74d3219af 100644 --- a/ports/libpng/cmake.patch +++ b/ports/libpng/cmake.patch @@ -84,7 +84,7 @@ index f10f489..28ce98a 100644 if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng${PNGLIB_ABI_VERSION}.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -++elseif(0) ++elseif(0) # Install the man pages. install(FILES libpng.3 libpngpf.3 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3) From a17e71fa431fb922b86b99b7155a8842f33cd57c Mon Sep 17 00:00:00 2001 From: c8ef Date: Fri, 10 Jan 2025 23:28:30 +0800 Subject: [PATCH 6/8] [libpng] update to 1.6.45 --- versions/l-/libpng.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libpng.json b/versions/l-/libpng.json index 7a17a2cfb2f819..6e8bcc7d1f73ed 100644 --- a/versions/l-/libpng.json +++ b/versions/l-/libpng.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "abed5b777996c1dc7553827f4e8b06ca612b9f37", + "git-tree": "081166e70f56cd851b212f93a9ee5531d58fb9b9", "version": "1.6.45", "port-version": 0 }, From a1e490d4995e891dcf3aeafd1a464e0e1f3bcf5c Mon Sep 17 00:00:00 2001 From: c8ef Date: Sat, 11 Jan 2025 10:46:12 +0800 Subject: [PATCH 7/8] [libpng] update to 1.6.45 --- ports/libpng/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index fc134d14540d56..11605c341f4b4f 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -119,3 +119,4 @@ endif() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") + \ No newline at end of file From e3b3b75ae16700912b9b4723d3a813d7430d9801 Mon Sep 17 00:00:00 2001 From: c8ef Date: Sat, 11 Jan 2025 10:46:20 +0800 Subject: [PATCH 8/8] [libpng] update to 1.6.45 --- ports/libpng/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index 11605c341f4b4f..fc134d14540d56 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -119,4 +119,3 @@ endif() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") - \ No newline at end of file