aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Huang <alberthdev@users.noreply.github.com>2018-12-14 01:40:18 +0000
committerRobert Schumacher <roschuma@microsoft.com>2018-12-13 17:40:18 -0800
commita05cbffe55eedf928b1da2fb82290a75722d381b (patch)
tree0d73a6a3e029362f91878a0723c73b8142592eea
parent648809dee679535790e2fc3dc82ea1b958587b31 (diff)
downloadvcpkg-a05cbffe55eedf928b1da2fb82290a75722d381b.tar.gz
vcpkg-a05cbffe55eedf928b1da2fb82290a75722d381b.zip
Update libpng-apng to match libpng ports changes + update to 1.6.36 (#4944)
* Update libpng-apng to match libpng ports changes + update to 1.6.36 * Delete CONTROL.bak * Delete portfile.cmake.bak * Delete use-abort-on-all-platforms.patch.bak
-rw-r--r--ports/libpng-apng/CONTROL2
-rw-r--r--ports/libpng-apng/portfile.cmake22
-rw-r--r--ports/libpng-apng/skip-install-symlink.patch22
-rw-r--r--ports/libpng-apng/use-abort-on-all-platforms.patch2
-rw-r--r--ports/libpng-apng/vcpkg-cmake-wrapper.cmake6
5 files changed, 46 insertions, 8 deletions
diff --git a/ports/libpng-apng/CONTROL b/ports/libpng-apng/CONTROL
index f4ea530fe..81db06eee 100644
--- a/ports/libpng-apng/CONTROL
+++ b/ports/libpng-apng/CONTROL
@@ -1,4 +1,4 @@
Source: libpng-apng
-Version: 1.6.34-2
+Version: 1.6.36-1
Build-Depends: zlib
Description: libpng-apng is a library implementing an interface for reading and writing (A)PNG ((Animated) Portable Network Graphics) format files. This is backward compatible with the regular libpng, both in library usage and format.
diff --git a/ports/libpng-apng/portfile.cmake b/ports/libpng-apng/portfile.cmake
index b1ec137a8..948b0a2f3 100644
--- a/ports/libpng-apng/portfile.cmake
+++ b/ports/libpng-apng/portfile.cmake
@@ -1,19 +1,19 @@
include(vcpkg_common_functions)
-set(LIBPNG_APNG_VERSION 1.6.34)
+set(LIBPNG_APNG_VERSION 1.6.36)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO glennrp/libpng
REF v${LIBPNG_APNG_VERSION}
- SHA512 23b6112a1d16a34c8037d5c5812944d4385fc96ed819a22172776bdd5acd3a34e55f073b46087b77d1c12cecc68f9e8ba7754c86b5ab6ed3016063e1c795de7a
+ SHA512 aeb00b48347c9e84d31995b3fe7e40580029734aa8103d774eee5745f5ca1fd1fd91a15f32d492277ab94346e4e7f731ee9bfea1783f930094f9f87eb3d9397d
HEAD_REF master
)
vcpkg_download_distfile(LIBPNG_APNG_PATCH_ARCHIVE
URLS "https://downloads.sourceforge.net/project/libpng-apng/libpng16/${LIBPNG_APNG_VERSION}/libpng-${LIBPNG_APNG_VERSION}-apng.patch.gz"
FILENAME "libpng-${LIBPNG_APNG_VERSION}-apng.patch.gz"
- SHA512 0777b8e55aeee207ee92479f2258ef1f60f16d7951fdbc6d89a80ef533b86dadecd1ef659d6fe7602d8ea3a8e711a096b0f77ee09b993799b73dfffddfe5dd3c
+ SHA512 8fa213204768b058459ffd5eae6b3661c3f185d3baf1913da4337e7b7855e567f2525e7f67411c32fa8cb177a5f93d538c3d0ce17a94d4aa71bd9cffabe8b311
)
vcpkg_find_acquire_program(7Z)
@@ -35,6 +35,7 @@ vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch
+ ${CMAKE_CURRENT_LIST_DIR}/skip-install-symlink.patch
${CURRENT_BUILDTREES_DIR}/src/libpng-${LIBPNG_APNG_VERSION}-apng.patch
)
@@ -57,15 +58,20 @@ vcpkg_configure_cmake(
-DSKIP_INSTALL_PROGRAMS=ON
-DSKIP_INSTALL_EXECUTABLES=ON
-DSKIP_INSTALL_FILES=ON
+ -DSKIP_INSTALL_SYMLINK=ON
OPTIONS_DEBUG
-DSKIP_INSTALL_HEADERS=ON
)
vcpkg_install_cmake()
-if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
- file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib ${CURRENT_PACKAGES_DIR}/lib/libpng16.lib)
- file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16d.lib)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib ${CURRENT_PACKAGES_DIR}/lib/libpng16.lib)
+ endif()
+ if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16d.lib)
+ endif()
endif()
# Remove CMake config files as they are incorrectly generated and everyone uses built-in FindPNG anyway.
@@ -76,3 +82,7 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/libpng-apng/LICENSE ${CURRENT_PACKAGES
vcpkg_copy_pdbs()
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
+
+if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/png)
+endif()
diff --git a/ports/libpng-apng/skip-install-symlink.patch b/ports/libpng-apng/skip-install-symlink.patch
new file mode 100644
index 000000000..c25075941
--- /dev/null
+++ b/ports/libpng-apng/skip-install-symlink.patch
@@ -0,0 +1,22 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 48c6fa2..589e5f9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -853,7 +853,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+- if(PNG_SHARED)
++ if(PNG_SHARED AND NOT SKIP_INSTALL_SYMLINK)
+ # Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin
+ if(CYGWIN OR MINGW)
+ create_symlink(libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} TARGET png)
+@@ -868,7 +868,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
+ endif()
+ endif()
+
+- if(PNG_STATIC)
++ if(PNG_STATIC AND NOT SKIP_INSTALL_SYMLINK)
+ if(NOT WIN32 OR CYGWIN OR MINGW)
+ create_symlink(libpng${CMAKE_STATIC_LIBRARY_SUFFIX} TARGET png_static)
+ install(FILES $<TARGET_LINKER_FILE_DIR:png_static>/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
diff --git a/ports/libpng-apng/use-abort-on-all-platforms.patch b/ports/libpng-apng/use-abort-on-all-platforms.patch
index 0a629e059..ef21211c6 100644
--- a/ports/libpng-apng/use-abort-on-all-platforms.patch
+++ b/ports/libpng-apng/use-abort-on-all-platforms.patch
@@ -2,7 +2,7 @@ diff --git a/pngpriv.h b/pngpriv.h
index fe3355d..5a049b5 100644
--- a/pngpriv.h
+++ b/pngpriv.h
-@@ -457,11 +457,7 @@
+@@ -556,11 +556,7 @@
/* Memory model/platform independent fns */
#ifndef PNG_ABORT
diff --git a/ports/libpng-apng/vcpkg-cmake-wrapper.cmake b/ports/libpng-apng/vcpkg-cmake-wrapper.cmake
new file mode 100644
index 000000000..cb9c74f32
--- /dev/null
+++ b/ports/libpng-apng/vcpkg-cmake-wrapper.cmake
@@ -0,0 +1,6 @@
+if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16.a")
+ set(PNG_LIBRARY_RELEASE "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16.a" CACHE FILEPATH "")
+elseif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16${CMAKE_SHARED_LIBRARY_SUFFIX}")
+ set(PNG_LIBRARY_RELEASE "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE FILEPATH "")
+endif()
+_find_package(${ARGS})