From c81d7d9c10485804179ce7ee59b41c594d912c6b Mon Sep 17 00:00:00 2001 From: John McNamara Date: Thu, 2 Jan 2020 21:55:20 +0000 Subject: [PATCH] [libxlsxwriter] upgrade to 0.8.9 (#9410) Upgrade to the latest version of libxlsxwriter. Closes #9408 --- ...-error.patch => 0001-fix-cmake-file.patch} | 92 ++++++++++--------- ports/libxlsxwriter/0002-fix-uwp-build.patch | 14 --- .../libxlsxwriter/0003-fix-include-file.patch | 14 --- ports/libxlsxwriter/CONTROL | 2 +- ports/libxlsxwriter/portfile.cmake | 17 ++-- 5 files changed, 58 insertions(+), 81 deletions(-) rename ports/libxlsxwriter/{0001-fix-build-error.patch => 0001-fix-cmake-file.patch} (72%) delete mode 100644 ports/libxlsxwriter/0002-fix-uwp-build.patch delete mode 100644 ports/libxlsxwriter/0003-fix-include-file.patch diff --git a/ports/libxlsxwriter/0001-fix-build-error.patch b/ports/libxlsxwriter/0001-fix-cmake-file.patch similarity index 72% rename from ports/libxlsxwriter/0001-fix-build-error.patch rename to ports/libxlsxwriter/0001-fix-cmake-file.patch index 5e00c96deeb..4f86d2635f6 100644 --- a/ports/libxlsxwriter/0001-fix-build-error.patch +++ b/ports/libxlsxwriter/0001-fix-cmake-file.patch @@ -1,41 +1,51 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fe566fe..e76ed46 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -306,31 +306,11 @@ endif() - - include(GNUInstallDirs) - --if(MSVC) -- if(CMAKE_CL_64) -- set(MSVC_FOLDER_PREFIX x64) -- else() -- set(MSVC_FOLDER_PREFIX Win32) -- endif() -- -- install(TARGETS ${PROJECT_NAME} -- LIBRARY DESTINATION "lib/${MSVC_FOLDER_PREFIX}/\${CMAKE_INSTALL_CONFIG_NAME}" -- ARCHIVE DESTINATION "lib/${MSVC_FOLDER_PREFIX}/\${CMAKE_INSTALL_CONFIG_NAME}" -- RUNTIME DESTINATION "bin/${MSVC_FOLDER_PREFIX}/\${CMAKE_INSTALL_CONFIG_NAME}" -- ) -- if (NOT BUILD_SHARED_LIBS) -- install(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pdb -- DESTINATION "lib/${MSVC_FOLDER_PREFIX}/\${CMAKE_INSTALL_CONFIG_NAME}" -- ) -- endif() -- --else(MSVC) -- install(TARGETS ${PROJECT_NAME} -- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -- ) --endif(MSVC) -+install(TARGETS ${PROJECT_NAME} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+) - install(FILES include/xlsxwriter.h DESTINATION include) - install(DIRECTORY include/xlsxwriter - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f2eed91..f329996 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -224,6 +224,9 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE ${LXW_PRIVATE_COMPILE_DEFINIT + if(MSVC AND NOT (MSVC_VERSION LESS 1900)) + target_compile_options(${PROJECT_NAME} PRIVATE /utf-8) + endif() ++if (WINDOWSSTORE) ++ target_compile_definitions(${PROJECT_NAME} PRIVATE -DIOWIN32_USING_WINRT_API) ++endif() + target_include_directories(${PROJECT_NAME} + PRIVATE ${LXW_PRIVATE_INCLUDE_DIRS} + PUBLIC include include/xlsxwriter +@@ -319,31 +322,11 @@ endif() + + include(GNUInstallDirs) + +-if(MSVC) +- if(CMAKE_CL_64) +- set(MSVC_FOLDER_PREFIX x64) +- else() +- set(MSVC_FOLDER_PREFIX Win32) +- endif() +- +- install(TARGETS ${PROJECT_NAME} +- LIBRARY DESTINATION "lib/${MSVC_FOLDER_PREFIX}/\${CMAKE_INSTALL_CONFIG_NAME}" +- ARCHIVE DESTINATION "lib/${MSVC_FOLDER_PREFIX}/\${CMAKE_INSTALL_CONFIG_NAME}" +- RUNTIME DESTINATION "bin/${MSVC_FOLDER_PREFIX}/\${CMAKE_INSTALL_CONFIG_NAME}" +- ) +- if (NOT BUILD_SHARED_LIBS) +- install(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pdb +- DESTINATION "lib/${MSVC_FOLDER_PREFIX}/\${CMAKE_INSTALL_CONFIG_NAME}" +- ) +- endif() +- +-else(MSVC) +- install(TARGETS ${PROJECT_NAME} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +- ) +-endif(MSVC) ++install(TARGETS ${PROJECT_NAME} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++) + install(FILES include/xlsxwriter.h DESTINATION include) + install(DIRECTORY include/xlsxwriter + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} diff --git a/ports/libxlsxwriter/0002-fix-uwp-build.patch b/ports/libxlsxwriter/0002-fix-uwp-build.patch deleted file mode 100644 index b6ae2047934..00000000000 --- a/ports/libxlsxwriter/0002-fix-uwp-build.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e76ed46..32ffa04 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -211,6 +211,9 @@ target_sources(${PROJECT_NAME} - ) - target_link_libraries(${PROJECT_NAME} LINK_PUBLIC ${ZLIB_LIBRARIES} ${MINIZIP_LIBRARIES}) - target_compile_definitions(${PROJECT_NAME} PRIVATE ${LXW_PRIVATE_COMPILE_DEFINITIONS}) -+if (WINDOWSSTORE) -+ target_compile_definitions(${PROJECT_NAME} PRIVATE -DIOWIN32_USING_WINRT_API) -+endif() - target_include_directories(${PROJECT_NAME} - PRIVATE ${LXW_PRIVATE_INCLUDE_DIRS} - PUBLIC include include/xlsxwriter diff --git a/ports/libxlsxwriter/0003-fix-include-file.patch b/ports/libxlsxwriter/0003-fix-include-file.patch deleted file mode 100644 index faa0517b862..00000000000 --- a/ports/libxlsxwriter/0003-fix-include-file.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/include/xlsxwriter/utility.h b/include/xlsxwriter/utility.h -index 5b4b365..5f86335 100644 ---- a/include/xlsxwriter/utility.h -+++ b/include/xlsxwriter/utility.h -@@ -17,7 +17,9 @@ - #define __LXW_UTILITY_H__ - - #include -+#ifndef _MSC_VER - #include -+#endif - #include "common.h" - #include "xmlwriter.h" - diff --git a/ports/libxlsxwriter/CONTROL b/ports/libxlsxwriter/CONTROL index 8848ce5f9ea..0d7d2494b00 100644 --- a/ports/libxlsxwriter/CONTROL +++ b/ports/libxlsxwriter/CONTROL @@ -1,4 +1,4 @@ Source: libxlsxwriter -Version: 0.8.7-1 +Version: 0.8.9-1 Description: Libxlsxwriter is a C library that can be used to write text, numbers, formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file. Build-Depends: zlib diff --git a/ports/libxlsxwriter/portfile.cmake b/ports/libxlsxwriter/portfile.cmake index cf77a09e415..75062b4c520 100644 --- a/ports/libxlsxwriter/portfile.cmake +++ b/ports/libxlsxwriter/portfile.cmake @@ -1,18 +1,14 @@ -include(vcpkg_common_functions) - vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH + OUT_SOURCE_PATH SOURCE_PATH REPO jmcnamara/libxlsxwriter - REF RELEASE_0.8.7 - SHA512 20bf09f084808a8db00315848213c550fb809b587ea49ce3b25b310de981c176a44c518452507b6e00ca3f0a8e0056d88a6f575c031d54aa68791575cb9ab285 + REF RELEASE_0.8.9 + SHA512 0442323b8e55000aa78a689820f8e446b5e925b5077c6ed163ad181b5a8f0e19fe71cc12c4781f47f70f0c702faa27e49655e813f7e90a855ab73dd2bd9f5d66 HEAD_REF master PATCHES - 0001-fix-build-error.patch - 0002-fix-uwp-build.patch - 0003-fix-include-file.patch + 0001-fix-cmake-file.patch ) -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if (VCPKG_TARGET_IS_UWP) set(USE_WINDOWSSTORE ON) else() set(USE_WINDOWSSTORE OFF) @@ -30,5 +26,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() -file(COPY ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/License.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)