From 472b159dab5517de53a7f943fb054d1958654eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Ga=C3=9Fmann?= Date: Sat, 28 Mar 2020 04:04:02 +0100 Subject: [PATCH] [lodepng] Update to commit e34ac0@2020-03-15 (#10427) * [lodepng] Add cmake import configs * [lodepng] Update to commit e34ac0@2020-03-15 * [lodepng] Modernize port - Remove calls to deprecated vcpkg functions. - Remove commented out pngdetail tool project definitions. * [lodepng] Remove osx failure from ci.baseline --- ports/lodepng/CMakeLists.txt | 30 ++++++++---------------------- ports/lodepng/CONTROL | 2 +- ports/lodepng/algorithm.patch | 12 ------------ ports/lodepng/portfile.cmake | 12 +++++------- scripts/ci.baseline.txt | 1 - 5 files changed, 14 insertions(+), 43 deletions(-) delete mode 100644 ports/lodepng/algorithm.patch diff --git a/ports/lodepng/CMakeLists.txt b/ports/lodepng/CMakeLists.txt index 5da3aed3d6..1cf1865c06 100644 --- a/ports/lodepng/CMakeLists.txt +++ b/ports/lodepng/CMakeLists.txt @@ -1,31 +1,17 @@ cmake_minimum_required(VERSION 3.8.0) project(lodepng) -if(MSVC) - add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) -endif() - -include_directories(".") - add_library(lodepng lodepng.cpp lodepng_util.cpp) - -# add_executable(pngdetail pngdetail.cpp) - -# target_link_libraries(pngdetail lodepng) - -install( - TARGETS lodepng - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib +target_include_directories(lodepng PUBLIC + $ ) -# if(NOT DISABLE_INSTALL_TOOLS) -# install ( -# TARGETS pngdetail -# RUNTIME DESTINATION tools/lodepng -# ) -# endif() +file(WRITE "${CMAKE_BINARY_DIR}/lodepng-config.cmake" "include(\"\${CMAKE_CURRENT_LIST_DIR}/lodepng-targets.cmake\")") +install(FILES "${CMAKE_BINARY_DIR}/lodepng-config.cmake" DESTINATION "share/lodepng/") + +install(TARGETS lodepng EXPORT lodepng-targets) + +install(EXPORT lodepng-targets DESTINATION share/lodepng/) if(NOT DDISABLE_INSTALL_EXAMPLES) install(DIRECTORY examples DESTINATION share/lodepng/) diff --git a/ports/lodepng/CONTROL b/ports/lodepng/CONTROL index 16d0cb7943..b9238548f9 100644 --- a/ports/lodepng/CONTROL +++ b/ports/lodepng/CONTROL @@ -1,4 +1,4 @@ Source: lodepng -Version: 2018-09-18-2 +Version: 2020-03-15 Homepage: https://github.com/lvandeve/lodepng Description: PNG encoder and decoder in C and C++ diff --git a/ports/lodepng/algorithm.patch b/ports/lodepng/algorithm.patch deleted file mode 100644 index 796bdfc66c..0000000000 --- a/ports/lodepng/algorithm.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/lodepng_util.cpp b/lodepng_util.cpp -index 4b571bb..58ba81a 100644 ---- a/lodepng_util.cpp -+++ b/lodepng_util.cpp -@@ -26,6 +26,7 @@ freely, subject to the following restrictions: - #include "lodepng_util.h" - #include - #include "math.h" -+#include - - namespace lodepng - { diff --git a/ports/lodepng/portfile.cmake b/ports/lodepng/portfile.cmake index 83df5a5e01..680c04d718 100644 --- a/ports/lodepng/portfile.cmake +++ b/ports/lodepng/portfile.cmake @@ -1,14 +1,12 @@ -include(vcpkg_common_functions) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lvandeve/lodepng - REF ceb6b482b5a16d2bb3d6b3c735ca2b16322780d5 - SHA512 5293f6c629ff006410c9180cabac5f4de7643f04ec6c3d7ff46c1b09317ff9156d28ed4344a46db0b3a06937349590aa8958722ba0432178a347da58736cbf41 + REF e34ac04553e51a6982ae234d98ce6b76dd57a6a1 + SHA512 ab79fb2c6403e5d7bdf0b94a3f93f6513889eda8e6b74fb2b569fbc6f95fb79474654818cb0e71eff88214ca7c42ebd7c95f734a2faa77259fe06bfddcb6967a HEAD_REF master - PATCHES algorithm.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -25,7 +23,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/lodepng) +# Moves all .cmake files from /debug/share/lodepng/ to /share/lodepng/ +vcpkg_fixup_cmake_targets() - -file(INSTALL ${SOURCE_PATH}/lodepng.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/lodepng RENAME copyright) +file(INSTALL ${SOURCE_PATH}/lodepng.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 985196ba3c..1f0b6b9f6a 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1009,7 +1009,6 @@ llvm:x64-osx=ignore lmdb:arm64-windows=fail lmdb:arm-uwp=fail lmdb:x64-uwp=fail -lodepng:x64-osx=fail log4cplus:arm-uwp=fail log4cplus:x64-uwp=fail log4cpp:arm-uwp=fail