diff options
| author | Park DongHa <luncliff@gmail.com> | 2021-06-10 07:47:58 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-09 15:47:58 -0700 |
| commit | f6eb4c50ba6502c35b3ef70273c01ca7ddd955eb (patch) | |
| tree | de5209a5a220647b37bc378714ff6b0ee8904858 | |
| parent | bb941114248d8793359cfe10e90882a936801738 (diff) | |
| download | vcpkg-f6eb4c50ba6502c35b3ef70273c01ca7ddd955eb.tar.gz vcpkg-f6eb4c50ba6502c35b3ef70273c01ca7ddd955eb.zip | |
[libpng] fix Android ARM triplet build failure (#18115)
* [libpng] use check for PNG_ARM_NEON
* arm-android build keeps failing
* [libpng] add host dependency
* [libpng] update baseline
* [libpng] use 'version-string'
* Update ports/libpng/vcpkg.json
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
* [libpng] update baseline
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
| -rw-r--r-- | ports/libpng/CONTROL | 9 | ||||
| -rw-r--r-- | ports/libpng/portfile.cmake | 18 | ||||
| -rw-r--r-- | ports/libpng/vcpkg.json | 23 | ||||
| -rw-r--r-- | versions/baseline.json | 2 | ||||
| -rw-r--r-- | versions/l-/libpng.json | 5 |
5 files changed, 39 insertions, 18 deletions
diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL deleted file mode 100644 index acaecea10..000000000 --- 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 6727fca2a..7b50b1086 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 000000000..78b76fb77 --- /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 413cea7ae..a18c2b32f 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 aeec5e1ce..8f35b026f 100644 --- a/versions/l-/libpng.json +++ b/versions/l-/libpng.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "09cdb4f54e6cc8a6a1eebbbc4c9f786d0ee652b8", + "version": "1.6.37", + "port-version": 15 + }, + { "git-tree": "67dd33a2c4a539e58ec4898b7b908baca3840063", "version-string": "1.6.37", "port-version": 14 |
