diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL deleted file mode 100644 index acaecea106..0000000000 --- a/ports/libpng/CONTROL +++ /dev/null @@ -1,9 +0,0 @@ -Source: libpng -Version: 1.6.37 -Port-Version: 14 -Build-Depends: zlib -Homepage: https://github.com/glennrp/libpng -Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files. - -Feature: apng -Description: This is backward compatible with the regular libpng, both in library usage and format. diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index 6727fca2a9..7b50b1086f 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -55,24 +55,26 @@ else() endif() set(LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION ) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL iOS) - set(LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_HARDWARE_OPTIMIZATIONS=OFF") +if(VCPKG_TARGET_IS_IOS) + list(APPEND LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_HARDWARE_OPTIMIZATIONS=OFF") endif() set(LD_VERSION_SCRIPT_OPTION ) -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Android) +if(VCPKG_TARGET_IS_ANDROID) set(LD_VERSION_SCRIPT_OPTION "-Dld-version-script=OFF") + # for armeabi-v7a, check whether NEON is available + list(APPEND LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_ARM_NEON=check") +else() + list(APPEND LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_ARM_NEON=on") endif() -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS -DPNG_MAN_DIR=share/${PORT}/man ${LIBPNG_APNG_OPTION} ${LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION} ${LD_VERSION_SCRIPT_OPTION} - -DPNG_ARM_NEON=on -DPNG_STATIC=${PNG_STATIC_LIBS} -DPNG_SHARED=${PNG_SHARED_LIBS} -DPNG_TESTS=OFF @@ -82,9 +84,9 @@ vcpkg_configure_cmake( OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON ) -vcpkg_install_cmake() +vcpkg_cmake_install() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/libpng) +vcpkg_cmake_config_fixup(CONFIG_PATH lib/libpng) set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpng16.pc") if(EXISTS ${_file}) file(READ "${_file}" _contents) diff --git a/ports/libpng/vcpkg.json b/ports/libpng/vcpkg.json new file mode 100644 index 0000000000..78b76fb776 --- /dev/null +++ b/ports/libpng/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "libpng", + "version": "1.6.37", + "port-version": 15, + "description": "libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files", + "homepage": "https://github.com/glennrp/libpng", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "features": { + "apng": { + "description": "This is backward compatible with the regular libpng, both in library usage and format" + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index 413cea7ae6..a18c2b32f5 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3442,7 +3442,7 @@ }, "libpng": { "baseline": "1.6.37", - "port-version": 14 + "port-version": 15 }, "libpopt": { "baseline": "1.16-13", diff --git a/versions/l-/libpng.json b/versions/l-/libpng.json index aeec5e1ce1..8f35b026fb 100644 --- a/versions/l-/libpng.json +++ b/versions/l-/libpng.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "09cdb4f54e6cc8a6a1eebbbc4c9f786d0ee652b8", + "version": "1.6.37", + "port-version": 15 + }, { "git-tree": "67dd33a2c4a539e58ec4898b7b908baca3840063", "version-string": "1.6.37",