From ea6126637792e76ab9125a98788c121c334f61db Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Sat, 22 Jun 2024 16:36:50 +0100 Subject: [PATCH 01/23] original cmake file --- ports/libxml2/CMakeLists.txt | 672 +++++++++++++++++++++++++++++++++++ 1 file changed, 672 insertions(+) create mode 100644 ports/libxml2/CMakeLists.txt diff --git a/ports/libxml2/CMakeLists.txt b/ports/libxml2/CMakeLists.txt new file mode 100644 index 00000000000000..39e96ee44590a5 --- /dev/null +++ b/ports/libxml2/CMakeLists.txt @@ -0,0 +1,672 @@ +cmake_minimum_required(VERSION 3.18) + +file(STRINGS "configure.ac" CONFIGURE_AC_LINES) +foreach(line ${CONFIGURE_AC_LINES}) + if(line MATCHES [[^m4_define\(\[(MAJOR_VERSION|MINOR_VERSION|MICRO_VERSION)\],[ \t]*([0-9]+)\)$]]) + set(LIBXML_${CMAKE_MATCH_1} ${CMAKE_MATCH_2}) + elseif(line MATCHES "^(LIBXML_MAJOR_VERSION|LIBXML_MINOR_VERSION|LIBXML_MICRO_VERSION)=([0-9]+)$") + set(${CMAKE_MATCH_1} ${CMAKE_MATCH_2}) + endif() +endforeach() +set(VERSION "${LIBXML_MAJOR_VERSION}.${LIBXML_MINOR_VERSION}.${LIBXML_MICRO_VERSION}") + +project(libxml2 VERSION ${VERSION} LANGUAGES C) + +include(CheckCSourceCompiles) +include(CheckFunctionExists) +include(CheckIncludeFiles) +include(CheckLibraryExists) +include(CheckLinkerFlag) +include(CheckStructHasMember) +include(CheckSymbolExists) +include(CMakePackageConfigHelpers) +include(GNUInstallDirs) + +option(BUILD_SHARED_LIBS "Build shared libraries" ON) +set(LIBXML2_WITH_AUTOMATA ON) +option(LIBXML2_WITH_C14N "Add the Canonicalization support" ON) +option(LIBXML2_WITH_CATALOG "Add the Catalog support" ON) +option(LIBXML2_WITH_DEBUG "Add the debugging module" ON) +set(LIBXML2_WITH_EXPR ON) +option(LIBXML2_WITH_FTP "Add the FTP support" OFF) +option(LIBXML2_WITH_HTML "Add the HTML support" ON) +option(LIBXML2_WITH_HTTP "Add the HTTP support" ON) +option(LIBXML2_WITH_ICONV "Add ICONV support" ON) +option(LIBXML2_WITH_ICU "Add ICU support" OFF) +option(LIBXML2_WITH_ISO8859X "Add ISO8859X support if no iconv" ON) +option(LIBXML2_WITH_LEGACY "Add deprecated APIs for compatibility" OFF) +option(LIBXML2_WITH_LZMA "Use liblzma" ON) +option(LIBXML2_WITH_MEM_DEBUG "Add the memory debugging module" OFF) +option(LIBXML2_WITH_MODULES "Add the dynamic modules support" ON) +option(LIBXML2_WITH_OUTPUT "Add the serialization support" ON) +option(LIBXML2_WITH_PATTERN "Add the xmlPattern selection interface" ON) +option(LIBXML2_WITH_PROGRAMS "Build programs" ON) +option(LIBXML2_WITH_PUSH "Add the PUSH parser interfaces" ON) +option(LIBXML2_WITH_PYTHON "Build Python bindings" ON) +option(LIBXML2_WITH_READER "Add the xmlReader parsing interface" ON) +option(LIBXML2_WITH_REGEXPS "Add Regular Expressions support" ON) +option(LIBXML2_WITH_SAX1 "Add the older SAX1 interface" ON) +option(LIBXML2_WITH_SCHEMAS "Add Relax-NG and Schemas support" ON) +option(LIBXML2_WITH_SCHEMATRON "Add Schematron support" ON) +option(LIBXML2_WITH_TESTS "Build tests" ON) +option(LIBXML2_WITH_THREADS "Add multithread support" ON) +option(LIBXML2_WITH_THREAD_ALLOC "Add per-thread memory" OFF) +option(LIBXML2_WITH_TREE "Add the DOM like tree manipulation APIs" ON) +set(LIBXML2_WITH_TRIO OFF) +set(LIBXML2_WITH_UNICODE ON) +option(LIBXML2_WITH_VALID "Add the DTD validation support" ON) +option(LIBXML2_WITH_WRITER "Add the xmlWriter saving interface" ON) +option(LIBXML2_WITH_XINCLUDE "Add the XInclude support" ON) +option(LIBXML2_WITH_XPATH "Add the XPATH support" ON) +option(LIBXML2_WITH_XPTR "Add the XPointer support" ON) +option(LIBXML2_WITH_XPTR_LOCS "Add support for XPointer locations" OFF) +option(LIBXML2_WITH_ZLIB "Use libz" ON) +set(LIBXML2_XMLCONF_WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Working directory for XML Conformance Test Suite") + +if(LIBXML2_WITH_ICONV) + find_package(Iconv REQUIRED) +endif() + +if(LIBXML2_WITH_ICU) + find_package(ICU REQUIRED COMPONENTS data i18n uc) +endif() + +if(LIBXML2_WITH_LZMA) + find_package(LibLZMA REQUIRED) +endif() + +if(LIBXML2_WITH_PYTHON) + check_include_files(unistd.h HAVE_UNISTD_H) + check_symbol_exists(F_GETFL fcntl.h HAVE_F_GETFL) + find_package(Python COMPONENTS Interpreter Development REQUIRED) + #set(LIBXML2_PYTHON_INSTALL_DIR ${Python_SITEARCH} CACHE PATH "Python bindings install directory") + set(LIBXML2_PYTHON_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/python" + CACHE PATH "Python bindings install directory") +endif() + +if(LIBXML2_WITH_THREADS) + find_package(Threads REQUIRED) +endif() + +if(LIBXML2_WITH_ZLIB) + find_package(ZLIB REQUIRED) +endif() + +foreach(VARIABLE IN ITEMS WITH_AUTOMATA WITH_C14N WITH_CATALOG WITH_DEBUG WITH_EXPR WITH_FTP WITH_HTML WITH_HTTP WITH_ICONV WITH_ICU WITH_ISO8859X WITH_LEGACY WITH_LZMA WITH_MEM_DEBUG WITH_MODULES WITH_OUTPUT WITH_PATTERN WITH_PUSH WITH_READER WITH_REGEXPS WITH_SAX1 WITH_SCHEMAS WITH_SCHEMATRON WITH_THREADS WITH_THREAD_ALLOC WITH_TREE WITH_TRIO WITH_UNICODE WITH_VALID WITH_WRITER WITH_XINCLUDE WITH_XPATH WITH_XPTR WITH_XPTR_LOCS WITH_ZLIB) + if(LIBXML2_${VARIABLE}) + set(${VARIABLE} 1) + else() + set(${VARIABLE} 0) + endif() +endforeach() + +set(LIBXML_VERSION ${VERSION}) +set(LIBXML_VERSION_EXTRA "") +math(EXPR LIBXML_VERSION_NUMBER " + ${LIBXML_MAJOR_VERSION} * 10000 + + ${LIBXML_MINOR_VERSION} * 100 + + ${LIBXML_MICRO_VERSION} +") + +set(MODULE_EXTENSION "${CMAKE_SHARED_LIBRARY_SUFFIX}") + +set(PACKAGE "libxml2") +set(PACKAGE_BUGREPORT "xml@gnome.org") +set(PACKAGE_NAME "libxml2") +set(PACKAGE_STRING "libxml2 ${VERSION}") +set(PACKAGE_TARNAME "libxml2") +set(PACKAGE_URL "https://gitlab.gnome.org/GNOME/libxml2") +set(PACKAGE_VERSION ${VERSION}) + +if(LIBLZMA_FOUND) + list(APPEND CMAKE_REQUIRED_LIBRARIES LibLZMA::LibLZMA) +endif() + +if(Threads_FOUND) + list(APPEND CMAKE_REQUIRED_LIBRARIES Threads::Threads) +endif() + +if(ZLIB_FOUND) + list(APPEND CMAKE_REQUIRED_LIBRARIES ZLIB::ZLIB) +endif() + +if (NOT MSVC) + check_c_source_compiles(" + void __attribute__((destructor)) + f(void) {} + int main(void) { return 0; } + " HAVE_ATTRIBUTE_DESTRUCTOR) + if(HAVE_ATTRIBUTE_DESTRUCTOR) + set(ATTRIBUTE_DESTRUCTOR "__attribute__((destructor))") + endif() + check_include_files(arpa/inet.h HAVE_ARPA_INET_H) + check_function_exists(class HAVE_CLASS) + check_include_files(dlfcn.h HAVE_DLFCN_H) + check_library_exists(dl dlopen "" HAVE_DLOPEN) + check_include_files(dl.h HAVE_DL_H) + check_include_files(fcntl.h HAVE_FCNTL_H) + check_function_exists(fpclass HAVE_FPCLASS) + check_function_exists(ftime HAVE_FTIME) + check_function_exists(gettimeofday HAVE_GETTIMEOFDAY) + check_include_files(inttypes.h HAVE_INTTYPES_H) + check_function_exists(isascii HAVE_ISASCII) + check_library_exists(history append_history "" HAVE_LIBHISTORY) + check_library_exists(readline readline "" HAVE_LIBREADLINE) + check_function_exists(mmap HAVE_MMAP) + check_function_exists(munmap HAVE_MUNMAP) + check_include_files(netdb.h HAVE_NETDB_H) + check_include_files(netinet/in.h HAVE_NETINET_IN_H) + check_include_files(poll.h HAVE_POLL_H) + check_function_exists(putenv HAVE_PUTENV) + check_function_exists(rand_r HAVE_RAND_R) + check_library_exists(dld shl_load "" HAVE_SHLLOAD) + check_function_exists(stat HAVE_STAT) + check_include_files(stdint.h HAVE_STDINT_H) + check_include_files(sys/mman.h HAVE_SYS_MMAN_H) + check_include_files(sys/select.h HAVE_SYS_SELECT_H) + check_include_files(sys/socket.h HAVE_SYS_SOCKET_H) + check_include_files(sys/stat.h HAVE_SYS_STAT_H) + check_include_files(sys/timeb.h HAVE_SYS_TIMEB_H) + check_include_files(sys/time.h HAVE_SYS_TIME_H) + check_include_files(unistd.h HAVE_UNISTD_H) + check_symbol_exists(va_copy stdarg.h HAVE_VA_COPY) + check_symbol_exists(__va_copy stdarg.h HAVE___VA_COPY) + set(LT_OBJDIR ".libs/") + check_c_source_compiles(" + #include + void a(va_list* ap) {}; + int main() { va_list ap1, ap2; a(&ap1); ap2 = (va_list) ap1; return 0; } + " VA_LIST_IS_ARRAY_TEST) + if(VA_LIST_IS_ARRAY_TEST) + set(VA_LIST_IS_ARRAY FALSE) + else() + set(VA_LIST_IS_ARRAY TRUE) + endif() + check_c_source_compiles(" + #include + #include + int main() { (void) getsockopt(1, 1, 1, NULL, (socklen_t*) NULL); return 0; } + " XML_SOCKLEN_T_SOCKLEN_T) + if(XML_SOCKLEN_T_SOCKLEN_T) + set(XML_SOCKLEN_T socklen_t) + else() + check_c_source_compiles(" + #include + #include + int main() { (void) getsockopt(1, 1, 1, NULL, (size_t*) NULL); return 0; } + " XML_SOCKLEN_T_SIZE_T) + if(XML_SOCKLEN_T_SIZE_T) + set(XML_SOCKLEN_T size_t) + else() + check_c_source_compiles(" + #include + #include + int main() { (void) getsockopt (1, 1, 1, NULL, (int*) NULL); return 0; } + " XML_SOCKLEN_T_INT) + set(XML_SOCKLEN_T int) + endif() + endif() +endif() + +set( + LIBXML2_HDRS + include/libxml/c14n.h + include/libxml/catalog.h + include/libxml/chvalid.h + include/libxml/debugXML.h + include/libxml/dict.h + include/libxml/encoding.h + include/libxml/entities.h + include/libxml/globals.h + include/libxml/hash.h + include/libxml/HTMLparser.h + include/libxml/HTMLtree.h + include/libxml/list.h + include/libxml/nanoftp.h + include/libxml/nanohttp.h + include/libxml/parser.h + include/libxml/parserInternals.h + include/libxml/pattern.h + include/libxml/relaxng.h + include/libxml/SAX.h + include/libxml/SAX2.h + include/libxml/schemasInternals.h + include/libxml/schematron.h + include/libxml/threads.h + include/libxml/tree.h + include/libxml/uri.h + include/libxml/valid.h + include/libxml/xinclude.h + include/libxml/xlink.h + include/libxml/xmlIO.h + include/libxml/xmlautomata.h + include/libxml/xmlerror.h + include/libxml/xmlexports.h + include/libxml/xmlmemory.h + include/libxml/xmlmodule.h + include/libxml/xmlreader.h + include/libxml/xmlregexp.h + include/libxml/xmlsave.h + include/libxml/xmlschemas.h + include/libxml/xmlschemastypes.h + include/libxml/xmlstring.h + include/libxml/xmlunicode.h + include/libxml/xmlwriter.h + include/libxml/xpath.h + include/libxml/xpathInternals.h + include/libxml/xpointer.h +) + +set( + LIBXML2_SRCS + buf.c + c14n.c + catalog.c + chvalid.c + debugXML.c + dict.c + encoding.c + entities.c + error.c + globals.c + hash.c + HTMLparser.c + HTMLtree.c + legacy.c + list.c + nanoftp.c + nanohttp.c + parser.c + parserInternals.c + pattern.c + relaxng.c + SAX.c + SAX2.c + schematron.c + threads.c + tree.c + uri.c + valid.c + xinclude.c + xlink.c + xmlIO.c + xmlmemory.c + xmlmodule.c + xmlreader.c + xmlregexp.c + xmlsave.c + xmlschemas.c + xmlschemastypes.c + xmlstring.c + xmlunicode.c + xmlwriter.c + xpath.c + xpointer.c + xzlib.c +) + +if(WIN32) + list(APPEND LIBXML2_SRCS win32/libxml2.rc) + file( + WRITE + ${CMAKE_CURRENT_BINARY_DIR}/rcVersion.h + "#define LIBXML_MAJOR_VERSION ${LIBXML_MAJOR_VERSION}\n" + "#define LIBXML_MINOR_VERSION ${LIBXML_MINOR_VERSION}\n" + "#define LIBXML_MICRO_VERSION ${LIBXML_MICRO_VERSION}\n" + "#define LIBXML_DOTTED_VERSION \"${VERSION}\"\n" + ) +endif() + +if(LIBXML2_WITH_TRIO) + list(APPEND LIBXML2_SRCS trio.c triostr.c) +endif() + +add_library(LibXml2 ${LIBXML2_HDRS} ${LIBXML2_SRCS}) +add_library(LibXml2::LibXml2 ALIAS LibXml2) + +target_compile_definitions(LibXml2 PRIVATE SYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}") + +if(NOT BUILD_SHARED_LIBS) + target_compile_definitions(LibXml2 PUBLIC LIBXML_STATIC) + set(XML_CFLAGS "-DLIBXML_STATIC") +endif() + +if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "GNU") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Wextra -Wshadow \ +-Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return \ +-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \ +-Wredundant-decls -Wno-long-long -Wno-format-extra-args") + + if(BUILD_SHARED_LIBS AND UNIX AND NOT APPLE) + check_linker_flag(C "LINKER:--undefined-version" FLAG_UNDEFINED_VERSION) + if (FLAG_UNDEFINED_VERSION) + target_link_options(LibXml2 PRIVATE "LINKER:--undefined-version") + endif() + target_link_options(LibXml2 PRIVATE "LINKER:--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libxml2.syms") + endif() +endif() + +if(LIBXML2_WITH_THREADS) + target_compile_definitions(LibXml2 PRIVATE _REENTRANT) + if(NOT WIN32) + check_include_files(pthread.h HAVE_PTHREAD_H) + endif() +endif() + +target_include_directories( + LibXml2 + PUBLIC + $ + $ + $/${CMAKE_INSTALL_INCLUDEDIR}/libxml2> +) + +if(LIBXML2_WITH_MODULES) + if(HAVE_DLOPEN) + target_link_libraries(LibXml2 PRIVATE dl) + set(MODULE_PLATFORM_LIBS "-ldl") + endif() + + if(HAVE_SHLLOAD) + target_link_libraries(LibXml2 PRIVATE dld) + set(MODULE_PLATFORM_LIBS "-ldld") + endif() +endif() + +if(UNIX) + target_link_libraries(LibXml2 PRIVATE m) + set(LIBM "-lm") +endif() + +if(WIN32) + target_link_libraries(LibXml2 PRIVATE ws2_32) + set(WINSOCK_LIBS "-lws2_32") +endif() + +if(LIBXML2_WITH_ICONV) + target_link_libraries(LibXml2 PUBLIC Iconv::Iconv) + if(NOT Iconv_IS_BUILT_IN) + set(ICONV_LIBS "-liconv") + endif() +endif() + +if(LIBXML2_WITH_ICU) + target_link_libraries(LibXml2 PRIVATE ICU::data ICU::i18n ICU::uc) + if(WIN32) + set(ICU_LIBS "icu-i18n") + else() + set(ICU_LIBS "icu-i18n") + endif() +endif() + +if(LIBXML2_WITH_LZMA) + target_link_libraries(LibXml2 PRIVATE LibLZMA::LibLZMA) + set(LZMA_LIBS "liblzma") +endif() + +if(LIBXML2_WITH_THREADS) + target_link_libraries(LibXml2 PRIVATE Threads::Threads) + set(THREAD_LIBS ${CMAKE_THREAD_LIBS_INIT}) +endif() + +if(LIBXML2_WITH_ZLIB) + target_link_libraries(LibXml2 PRIVATE ZLIB::ZLIB) + set(Z_LIBS "zlib") +endif() + +set_target_properties( + LibXml2 + PROPERTIES + IMPORT_PREFIX lib + OUTPUT_NAME xml2 + POSITION_INDEPENDENT_CODE ON + PREFIX lib + VERSION ${PROJECT_VERSION} + SOVERSION ${LIBXML_MAJOR_VERSION} +) + +set(XML_LIB_NAME xml2) +if(MSVC) + set(XML_LIB_NAME libxml2) +endif() + +install(FILES ${LIBXML2_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libxml2/libxml COMPONENT development) + +install( + TARGETS LibXml2 + EXPORT LibXml2 + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT development + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime NAMELINK_COMPONENT development + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime +) + +if(MSVC AND BUILD_SHARED_LIBS) + install(FILES $ DESTINATION ${CMAKE_INSTALL_BINDIR} CONFIGURATIONS Debug RelWithDebInfo COMPONENT debug) +endif() + +if(LIBXML2_WITH_PROGRAMS) + set( + PROGRAMS + xmlcatalog + xmllint + ) + foreach(PROGRAM ${PROGRAMS}) + add_executable(${PROGRAM} ${PROGRAM}.c) + add_executable(LibXml2::${PROGRAM} ALIAS ${PROGRAM}) + target_compile_definitions(${PROGRAM} PRIVATE SYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}") + target_link_libraries(${PROGRAM} LibXml2) + if(HAVE_LIBHISTORY) + target_link_libraries(${PROGRAM} history) + endif() + if(HAVE_LIBREADLINE) + target_link_libraries(${PROGRAM} readline) + endif() + install(TARGETS ${PROGRAM} EXPORT LibXml2 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT programs) + endforeach() +endif() + +if(LIBXML2_WITH_TESTS) + enable_testing() + set( + TESTS + runtest + runxmlconf + runsuite + testapi + testchar + testdict + testModule + testlimits + testrecurse + testThreads + ) + foreach(TEST ${TESTS}) + add_executable(${TEST} ${TEST}.c) + target_compile_definitions(${TEST} PRIVATE SYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}") + target_link_libraries(${TEST} LibXml2) + endforeach() + if(Threads_FOUND) + foreach(TEST runtest testThreads) + target_link_libraries(${TEST} Threads::Threads) + endforeach() + endif() + add_test(NAME runtest COMMAND runtest --out ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + add_test(NAME runsuite COMMAND runsuite WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + if(EXISTS ${LIBXML2_XMLCONF_WORKING_DIR}/xmlconf/xmlconf.xml) + add_test(NAME runxmlconf COMMAND runxmlconf WORKING_DIRECTORY ${LIBXML2_XMLCONF_WORKING_DIR}) + endif() + if(NOT WIN32) + add_test(NAME testapi COMMAND testapi) + endif() + add_test(NAME testchar COMMAND testchar) + add_test(NAME testdict COMMAND testdict) + add_test(NAME testrecurse COMMAND testrecurse WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + add_test(NAME testThreads COMMAND testThreads WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) +endif() + +if(LIBXML2_WITH_PYTHON) + execute_process( + COMMAND + ${Python_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/python/generator.py + ${CMAKE_CURRENT_SOURCE_DIR}/doc/libxml2-api.xml + ${CMAKE_CURRENT_SOURCE_DIR}/python/libxml2-python-api.xml + WORKING_DIRECTORY + ${CMAKE_CURRENT_BINARY_DIR} + ) + file(READ python/libxml.py LIBXML_PY) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/libxml2.py.in "${LIBXML_PY}") + file(READ ${CMAKE_CURRENT_BINARY_DIR}/libxml2class.py LIBXML2CLASS_PY) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libxml2.py.in "${LIBXML2CLASS_PY}") + configure_file(${CMAKE_CURRENT_BINARY_DIR}/libxml2.py.in libxml2.py COPYONLY) + add_library( + LibXml2Mod + libxml2-py.c + libxml2-py.h + python/libxml.c + python/libxml_wrap.h + python/types.c + ) + target_include_directories( + LibXml2Mod + PUBLIC + $ + ) + target_link_libraries(LibXml2Mod LibXml2 Python::Python) + set_target_properties( + LibXml2Mod + PROPERTIES + IMPORT_PREFIX lib + OUTPUT_NAME xml2mod + PREFIX lib + VERSION ${PROJECT_VERSION} + ) + if (WIN32) + set_target_properties(LibXml2Mod PROPERTIES SUFFIX ".pyd") + endif() + install( + TARGETS LibXml2Mod + ARCHIVE DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} COMPONENT development + LIBRARY DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} COMPONENT runtime NAMELINK_COMPONENT development + RUNTIME DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} COMPONENT runtime + ) + if(MSVC AND BUILD_SHARED_LIBS) + install(FILES $ DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} CONFIGURATIONS Debug RelWithDebInfo COMPONENT debug) + endif() + install(FILES python/drv_libxml2.py DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} COMPONENT runtime) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml2.py DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} COMPONENT runtime) +endif() + + +configure_package_config_file( + libxml2-config.cmake.cmake.in libxml2-config.cmake + INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 +) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 + COMPONENT development +) + +write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-version.cmake + VERSION ${PROJECT_VERSION} + COMPATIBILITY SameMinorVersion +) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-version.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 + COMPONENT development +) + +install( + EXPORT LibXml2 + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 + NAMESPACE LibXml2:: + FILE libxml2-export.cmake + COMPONENT development +) + +if(MSVC) + configure_file(include/win32config.h config.h COPYONLY) +else() + configure_file(config.h.cmake.in config.h) +endif() +configure_file(include/libxml/xmlversion.h.in libxml/xmlversion.h) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml/xmlversion.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libxml2/libxml COMPONENT development) + +if(LIBXML2_WITH_PYTHON) + set(prefix "${CMAKE_INSTALL_PREFIX}") + configure_file(python/setup.py.in setup.py @ONLY) +endif() + +set(XML_INCLUDEDIR "-I\${includedir}/libxml2") +set(XML_LIBDIR "-L\${libdir}") +set(XML_LIBS "-lxml2") +set(XML_PRIVATE_LIBS "${Z_LIBS} ${LZMA_LIBS} ${THREAD_LIBS} ${ICONV_LIBS} ${ICU_LIBS} ${LIBM} ${WINSOCK_LIBS}") + +file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig" "${CMAKE_INSTALL_PREFIX}") +string(REGEX REPLACE "/$" "" PACKAGE_RELATIVE_PATH "${PACKAGE_RELATIVE_PATH}") + +if(WIN32) + set(prefix "\${pcfiledir}/${PACKAGE_RELATIVE_PATH}") +else() + set(prefix "${CMAKE_INSTALL_PREFIX}") +endif() +set(exec_prefix "\${prefix}") +set(libdir "\${prefix}/${CMAKE_INSTALL_LIBDIR}") +set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") +configure_file(libxml-2.0.pc.in libxml-2.0.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml-2.0.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT development) + +set(prefix "\$(cd \"\$(dirname \"\$0\")\"; pwd -P)/..") +configure_file(xml2-config.in xml2-config @ONLY) +install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/xml2-config DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT development) + +if(UNIX) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/libxml.m4 DESTINATION ${CMAKE_INSTALL_DATADIR}/aclocal) +endif() + +set(XML_INCLUDEDIR "-I${CMAKE_INSTALL_FULL_INCLUDEDIR}/libxml2") +set(XML_LIBDIR "-L${CMAKE_INSTALL_FULL_LIBDIR}") + +set(CPACK_COMPONENT_DEVELOPMENT_DEPENDS runtime) +set(CPACK_COMPONENT_PROGRAMS_DEPENDS runtime) +set(CPACK_DEB_COMPONENT_INSTALL ON) +set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "${PACKAGE_TARNAME}") +set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_NAME "${PACKAGE_TARNAME}-dev") +set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_SECTION "libdevel") +set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${PACKAGE_URL}) +set(CPACK_DEBIAN_PACKAGE_NAME ${PACKAGE_TARNAME}) +set(CPACK_DEBIAN_PACKAGE_SECTION "devel") +set(CPACK_DEBIAN_PROGRAMS_PACKAGE_DEPENDS "${PACKAGE_TARNAME}") +set(CPACK_DEBIAN_PROGRAMS_PACKAGE_NAME "${PACKAGE_TARNAME}-utils") +set(CPACK_DEBIAN_PROGRAMS_PACKAGE_SECTION "utils") +set(CPACK_DEBIAN_RUNTIME_PACKAGE_NAME ${PACKAGE_TARNAME}) +set(CPACK_DEBIAN_RUNTIME_PACKAGE_RECOMMENDS "${PACKAGE_TARNAME}-utils") +set(CPACK_DEBIAN_RUNTIME_PACKAGE_SECTION "libs") +set(CPACK_NSIS_PACKAGE_NAME ${PACKAGE_STRING}) +set(CPACK_NSIS_URL_INFO_ABOUT ${PACKAGE_URL}) +set(CPACK_PACKAGE_CONTACT ${PACKAGE_BUGREPORT}) +set(CPACK_PACKAGE_DISPLAY_NAME ${PACKAGE_STRING}) +set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PACKAGE_TARNAME}-${PACKAGE_VERSION}") +set(CPACK_PACKAGE_NAME ${PACKAGE_TARNAME}) +set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION}) +set(CPACK_PACKAGE_VERSION_MAJOR ${LIBXML_MAJOR_VERSION}) +set(CPACK_PACKAGE_VERSION_MINOR ${LIBXML_MINOR_VERSION}) +set(CPACK_PACKAGE_VERSION_PATCH ${LIBXML_MICRO_VERSION}) +set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/Copyright) +set(CPACK_RPM_COMPONENT_INSTALL ON) +set(CPACK_RPM_development_PACKAGE_NAME "${PACKAGE_NAME}-devel") +set(CPACK_RPM_development_PACKAGE_REQUIRES "${PACKAGE_NAME}") +set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries") +set(CPACK_RPM_PACKAGE_NAME ${PACKAGE_TARNAME}) +set(CPACK_RPM_PACKAGE_URL ${PACKAGE_URL}) +set(CPACK_RPM_programs_PACKAGE_NAME "${PACKAGE_NAME}-utils") +set(CPACK_RPM_programs_PACKAGE_REQUIRES "${PACKAGE_NAME}") +set(CPACK_RPM_runtime_PACKAGE_NAME "${PACKAGE_NAME}") +set(CPACK_RPM_runtime_PACKAGE_SUGGESTS "${PACKAGE_NAME}-utils") + +include(CPack) From 047220454e83a07580522d73e2e386184105a0ab Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Tue, 24 Sep 2024 14:39:24 +0100 Subject: [PATCH 02/23] version database --- ports/openxlsx/portfile.cmake | 23 +++++++++++++++++++++++ ports/openxlsx/vcpkg.json | 17 +++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 ports/openxlsx/portfile.cmake create mode 100644 ports/openxlsx/vcpkg.json diff --git a/ports/openxlsx/portfile.cmake b/ports/openxlsx/portfile.cmake new file mode 100644 index 00000000000000..17f3bb82c2c4af --- /dev/null +++ b/ports/openxlsx/portfile.cmake @@ -0,0 +1,23 @@ +# Header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO troldal/OpenXLSX + REF master + SHA512 e3d27b6e21dcb727398ec1c78cdde4adfb9d5d354380e22217f63c46dc63a1dcdfde54733b70ac9b7e5fa7f6bc47028b311f03fdccc980ed9132ac0a23a23ed4 + HEAD_REF master +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOPENXLSX_BUILD_TESTS=OFF +) +vcpkg_install_cmake() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/OpenXLSX) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +# file(INSTALL "${SOURCE_PATH}/include/boost/sml.hpp" +# DESTINATION "${CURRENT_PACKAGES_DIR}/include/boost" +# ) + +# Handle copyright +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md") diff --git a/ports/openxlsx/vcpkg.json b/ports/openxlsx/vcpkg.json new file mode 100644 index 00000000000000..e78912fa5303b8 --- /dev/null +++ b/ports/openxlsx/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "openxlsx", + "version": "1.4.0", + "description": "OpenXLSX is a C++ library for reading, writing, creating and modifying Microsoft Excel® files, with the .xlsx format.", + "homepage": "https://github.com/troldal/OpenXLSX", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "license": "BSD-3-Clause" +} From 55563e94ccdd591105bd335591b1275d8b2d7322 Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Tue, 24 Sep 2024 15:32:41 +0100 Subject: [PATCH 03/23] remove unnecessary lines --- ports/openxlsx/portfile.cmake | 4 +--- ports/openxlsx/vcpkg.json | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ports/openxlsx/portfile.cmake b/ports/openxlsx/portfile.cmake index 17f3bb82c2c4af..dd55429859c843 100644 --- a/ports/openxlsx/portfile.cmake +++ b/ports/openxlsx/portfile.cmake @@ -15,9 +15,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/OpenXLSX) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -# file(INSTALL "${SOURCE_PATH}/include/boost/sml.hpp" -# DESTINATION "${CURRENT_PACKAGES_DIR}/include/boost" -# ) + # Handle copyright vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md") diff --git a/ports/openxlsx/vcpkg.json b/ports/openxlsx/vcpkg.json index e78912fa5303b8..6a02d2c6578026 100644 --- a/ports/openxlsx/vcpkg.json +++ b/ports/openxlsx/vcpkg.json @@ -3,6 +3,7 @@ "version": "1.4.0", "description": "OpenXLSX is a C++ library for reading, writing, creating and modifying Microsoft Excel® files, with the .xlsx format.", "homepage": "https://github.com/troldal/OpenXLSX", + "license": "BSD-3-Clause", "dependencies": [ { "name": "vcpkg-cmake", @@ -12,6 +13,5 @@ "name": "vcpkg-cmake-config", "host": true } - ], - "license": "BSD-3-Clause" + ] } From e43fb14414c18e19d4ee9306196077117e311ba7 Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Tue, 24 Sep 2024 15:38:57 +0100 Subject: [PATCH 04/23] necessary updates --- ports/openxlsx/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/openxlsx/portfile.cmake b/ports/openxlsx/portfile.cmake index dd55429859c843..a9df7ed12d381f 100644 --- a/ports/openxlsx/portfile.cmake +++ b/ports/openxlsx/portfile.cmake @@ -15,6 +15,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/OpenXLSX) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +vcpkg_copy_pdbs() # Handle copyright From dd2833da984a36983f259fe8d531cb698a54b848 Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Tue, 24 Sep 2024 15:45:14 +0100 Subject: [PATCH 05/23] add usage file --- ports/openxlsx/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/openxlsx/portfile.cmake b/ports/openxlsx/portfile.cmake index a9df7ed12d381f..965b05bdba91dc 100644 --- a/ports/openxlsx/portfile.cmake +++ b/ports/openxlsx/portfile.cmake @@ -20,3 +20,4 @@ vcpkg_copy_pdbs() # Handle copyright vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") From 1e24e15bc02a067d572b05ab05b5b9566bfba59c Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Tue, 24 Sep 2024 15:45:48 +0100 Subject: [PATCH 06/23] add usage file --- ports/openxlsx/usage | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 ports/openxlsx/usage diff --git a/ports/openxlsx/usage b/ports/openxlsx/usage new file mode 100644 index 00000000000000..4de5584919dc6c --- /dev/null +++ b/ports/openxlsx/usage @@ -0,0 +1,2 @@ + find_package(OpenXLSX CONFIG REQUIRED) + target_link_libraries(main PRIVATE OpenXLSX::OpenXLSX) \ No newline at end of file From 4340fa54fb64c60e32e565cadcbb5d0b3efcb46c Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Thu, 26 Sep 2024 20:22:07 +0100 Subject: [PATCH 07/23] Revert "original cmake file" This reverts commit ea6126637792e76ab9125a98788c121c334f61db. --- ports/libxml2/CMakeLists.txt | 672 ----------------------------------- 1 file changed, 672 deletions(-) delete mode 100644 ports/libxml2/CMakeLists.txt diff --git a/ports/libxml2/CMakeLists.txt b/ports/libxml2/CMakeLists.txt deleted file mode 100644 index 39e96ee44590a5..00000000000000 --- a/ports/libxml2/CMakeLists.txt +++ /dev/null @@ -1,672 +0,0 @@ -cmake_minimum_required(VERSION 3.18) - -file(STRINGS "configure.ac" CONFIGURE_AC_LINES) -foreach(line ${CONFIGURE_AC_LINES}) - if(line MATCHES [[^m4_define\(\[(MAJOR_VERSION|MINOR_VERSION|MICRO_VERSION)\],[ \t]*([0-9]+)\)$]]) - set(LIBXML_${CMAKE_MATCH_1} ${CMAKE_MATCH_2}) - elseif(line MATCHES "^(LIBXML_MAJOR_VERSION|LIBXML_MINOR_VERSION|LIBXML_MICRO_VERSION)=([0-9]+)$") - set(${CMAKE_MATCH_1} ${CMAKE_MATCH_2}) - endif() -endforeach() -set(VERSION "${LIBXML_MAJOR_VERSION}.${LIBXML_MINOR_VERSION}.${LIBXML_MICRO_VERSION}") - -project(libxml2 VERSION ${VERSION} LANGUAGES C) - -include(CheckCSourceCompiles) -include(CheckFunctionExists) -include(CheckIncludeFiles) -include(CheckLibraryExists) -include(CheckLinkerFlag) -include(CheckStructHasMember) -include(CheckSymbolExists) -include(CMakePackageConfigHelpers) -include(GNUInstallDirs) - -option(BUILD_SHARED_LIBS "Build shared libraries" ON) -set(LIBXML2_WITH_AUTOMATA ON) -option(LIBXML2_WITH_C14N "Add the Canonicalization support" ON) -option(LIBXML2_WITH_CATALOG "Add the Catalog support" ON) -option(LIBXML2_WITH_DEBUG "Add the debugging module" ON) -set(LIBXML2_WITH_EXPR ON) -option(LIBXML2_WITH_FTP "Add the FTP support" OFF) -option(LIBXML2_WITH_HTML "Add the HTML support" ON) -option(LIBXML2_WITH_HTTP "Add the HTTP support" ON) -option(LIBXML2_WITH_ICONV "Add ICONV support" ON) -option(LIBXML2_WITH_ICU "Add ICU support" OFF) -option(LIBXML2_WITH_ISO8859X "Add ISO8859X support if no iconv" ON) -option(LIBXML2_WITH_LEGACY "Add deprecated APIs for compatibility" OFF) -option(LIBXML2_WITH_LZMA "Use liblzma" ON) -option(LIBXML2_WITH_MEM_DEBUG "Add the memory debugging module" OFF) -option(LIBXML2_WITH_MODULES "Add the dynamic modules support" ON) -option(LIBXML2_WITH_OUTPUT "Add the serialization support" ON) -option(LIBXML2_WITH_PATTERN "Add the xmlPattern selection interface" ON) -option(LIBXML2_WITH_PROGRAMS "Build programs" ON) -option(LIBXML2_WITH_PUSH "Add the PUSH parser interfaces" ON) -option(LIBXML2_WITH_PYTHON "Build Python bindings" ON) -option(LIBXML2_WITH_READER "Add the xmlReader parsing interface" ON) -option(LIBXML2_WITH_REGEXPS "Add Regular Expressions support" ON) -option(LIBXML2_WITH_SAX1 "Add the older SAX1 interface" ON) -option(LIBXML2_WITH_SCHEMAS "Add Relax-NG and Schemas support" ON) -option(LIBXML2_WITH_SCHEMATRON "Add Schematron support" ON) -option(LIBXML2_WITH_TESTS "Build tests" ON) -option(LIBXML2_WITH_THREADS "Add multithread support" ON) -option(LIBXML2_WITH_THREAD_ALLOC "Add per-thread memory" OFF) -option(LIBXML2_WITH_TREE "Add the DOM like tree manipulation APIs" ON) -set(LIBXML2_WITH_TRIO OFF) -set(LIBXML2_WITH_UNICODE ON) -option(LIBXML2_WITH_VALID "Add the DTD validation support" ON) -option(LIBXML2_WITH_WRITER "Add the xmlWriter saving interface" ON) -option(LIBXML2_WITH_XINCLUDE "Add the XInclude support" ON) -option(LIBXML2_WITH_XPATH "Add the XPATH support" ON) -option(LIBXML2_WITH_XPTR "Add the XPointer support" ON) -option(LIBXML2_WITH_XPTR_LOCS "Add support for XPointer locations" OFF) -option(LIBXML2_WITH_ZLIB "Use libz" ON) -set(LIBXML2_XMLCONF_WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Working directory for XML Conformance Test Suite") - -if(LIBXML2_WITH_ICONV) - find_package(Iconv REQUIRED) -endif() - -if(LIBXML2_WITH_ICU) - find_package(ICU REQUIRED COMPONENTS data i18n uc) -endif() - -if(LIBXML2_WITH_LZMA) - find_package(LibLZMA REQUIRED) -endif() - -if(LIBXML2_WITH_PYTHON) - check_include_files(unistd.h HAVE_UNISTD_H) - check_symbol_exists(F_GETFL fcntl.h HAVE_F_GETFL) - find_package(Python COMPONENTS Interpreter Development REQUIRED) - #set(LIBXML2_PYTHON_INSTALL_DIR ${Python_SITEARCH} CACHE PATH "Python bindings install directory") - set(LIBXML2_PYTHON_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/python" - CACHE PATH "Python bindings install directory") -endif() - -if(LIBXML2_WITH_THREADS) - find_package(Threads REQUIRED) -endif() - -if(LIBXML2_WITH_ZLIB) - find_package(ZLIB REQUIRED) -endif() - -foreach(VARIABLE IN ITEMS WITH_AUTOMATA WITH_C14N WITH_CATALOG WITH_DEBUG WITH_EXPR WITH_FTP WITH_HTML WITH_HTTP WITH_ICONV WITH_ICU WITH_ISO8859X WITH_LEGACY WITH_LZMA WITH_MEM_DEBUG WITH_MODULES WITH_OUTPUT WITH_PATTERN WITH_PUSH WITH_READER WITH_REGEXPS WITH_SAX1 WITH_SCHEMAS WITH_SCHEMATRON WITH_THREADS WITH_THREAD_ALLOC WITH_TREE WITH_TRIO WITH_UNICODE WITH_VALID WITH_WRITER WITH_XINCLUDE WITH_XPATH WITH_XPTR WITH_XPTR_LOCS WITH_ZLIB) - if(LIBXML2_${VARIABLE}) - set(${VARIABLE} 1) - else() - set(${VARIABLE} 0) - endif() -endforeach() - -set(LIBXML_VERSION ${VERSION}) -set(LIBXML_VERSION_EXTRA "") -math(EXPR LIBXML_VERSION_NUMBER " - ${LIBXML_MAJOR_VERSION} * 10000 + - ${LIBXML_MINOR_VERSION} * 100 + - ${LIBXML_MICRO_VERSION} -") - -set(MODULE_EXTENSION "${CMAKE_SHARED_LIBRARY_SUFFIX}") - -set(PACKAGE "libxml2") -set(PACKAGE_BUGREPORT "xml@gnome.org") -set(PACKAGE_NAME "libxml2") -set(PACKAGE_STRING "libxml2 ${VERSION}") -set(PACKAGE_TARNAME "libxml2") -set(PACKAGE_URL "https://gitlab.gnome.org/GNOME/libxml2") -set(PACKAGE_VERSION ${VERSION}) - -if(LIBLZMA_FOUND) - list(APPEND CMAKE_REQUIRED_LIBRARIES LibLZMA::LibLZMA) -endif() - -if(Threads_FOUND) - list(APPEND CMAKE_REQUIRED_LIBRARIES Threads::Threads) -endif() - -if(ZLIB_FOUND) - list(APPEND CMAKE_REQUIRED_LIBRARIES ZLIB::ZLIB) -endif() - -if (NOT MSVC) - check_c_source_compiles(" - void __attribute__((destructor)) - f(void) {} - int main(void) { return 0; } - " HAVE_ATTRIBUTE_DESTRUCTOR) - if(HAVE_ATTRIBUTE_DESTRUCTOR) - set(ATTRIBUTE_DESTRUCTOR "__attribute__((destructor))") - endif() - check_include_files(arpa/inet.h HAVE_ARPA_INET_H) - check_function_exists(class HAVE_CLASS) - check_include_files(dlfcn.h HAVE_DLFCN_H) - check_library_exists(dl dlopen "" HAVE_DLOPEN) - check_include_files(dl.h HAVE_DL_H) - check_include_files(fcntl.h HAVE_FCNTL_H) - check_function_exists(fpclass HAVE_FPCLASS) - check_function_exists(ftime HAVE_FTIME) - check_function_exists(gettimeofday HAVE_GETTIMEOFDAY) - check_include_files(inttypes.h HAVE_INTTYPES_H) - check_function_exists(isascii HAVE_ISASCII) - check_library_exists(history append_history "" HAVE_LIBHISTORY) - check_library_exists(readline readline "" HAVE_LIBREADLINE) - check_function_exists(mmap HAVE_MMAP) - check_function_exists(munmap HAVE_MUNMAP) - check_include_files(netdb.h HAVE_NETDB_H) - check_include_files(netinet/in.h HAVE_NETINET_IN_H) - check_include_files(poll.h HAVE_POLL_H) - check_function_exists(putenv HAVE_PUTENV) - check_function_exists(rand_r HAVE_RAND_R) - check_library_exists(dld shl_load "" HAVE_SHLLOAD) - check_function_exists(stat HAVE_STAT) - check_include_files(stdint.h HAVE_STDINT_H) - check_include_files(sys/mman.h HAVE_SYS_MMAN_H) - check_include_files(sys/select.h HAVE_SYS_SELECT_H) - check_include_files(sys/socket.h HAVE_SYS_SOCKET_H) - check_include_files(sys/stat.h HAVE_SYS_STAT_H) - check_include_files(sys/timeb.h HAVE_SYS_TIMEB_H) - check_include_files(sys/time.h HAVE_SYS_TIME_H) - check_include_files(unistd.h HAVE_UNISTD_H) - check_symbol_exists(va_copy stdarg.h HAVE_VA_COPY) - check_symbol_exists(__va_copy stdarg.h HAVE___VA_COPY) - set(LT_OBJDIR ".libs/") - check_c_source_compiles(" - #include - void a(va_list* ap) {}; - int main() { va_list ap1, ap2; a(&ap1); ap2 = (va_list) ap1; return 0; } - " VA_LIST_IS_ARRAY_TEST) - if(VA_LIST_IS_ARRAY_TEST) - set(VA_LIST_IS_ARRAY FALSE) - else() - set(VA_LIST_IS_ARRAY TRUE) - endif() - check_c_source_compiles(" - #include - #include - int main() { (void) getsockopt(1, 1, 1, NULL, (socklen_t*) NULL); return 0; } - " XML_SOCKLEN_T_SOCKLEN_T) - if(XML_SOCKLEN_T_SOCKLEN_T) - set(XML_SOCKLEN_T socklen_t) - else() - check_c_source_compiles(" - #include - #include - int main() { (void) getsockopt(1, 1, 1, NULL, (size_t*) NULL); return 0; } - " XML_SOCKLEN_T_SIZE_T) - if(XML_SOCKLEN_T_SIZE_T) - set(XML_SOCKLEN_T size_t) - else() - check_c_source_compiles(" - #include - #include - int main() { (void) getsockopt (1, 1, 1, NULL, (int*) NULL); return 0; } - " XML_SOCKLEN_T_INT) - set(XML_SOCKLEN_T int) - endif() - endif() -endif() - -set( - LIBXML2_HDRS - include/libxml/c14n.h - include/libxml/catalog.h - include/libxml/chvalid.h - include/libxml/debugXML.h - include/libxml/dict.h - include/libxml/encoding.h - include/libxml/entities.h - include/libxml/globals.h - include/libxml/hash.h - include/libxml/HTMLparser.h - include/libxml/HTMLtree.h - include/libxml/list.h - include/libxml/nanoftp.h - include/libxml/nanohttp.h - include/libxml/parser.h - include/libxml/parserInternals.h - include/libxml/pattern.h - include/libxml/relaxng.h - include/libxml/SAX.h - include/libxml/SAX2.h - include/libxml/schemasInternals.h - include/libxml/schematron.h - include/libxml/threads.h - include/libxml/tree.h - include/libxml/uri.h - include/libxml/valid.h - include/libxml/xinclude.h - include/libxml/xlink.h - include/libxml/xmlIO.h - include/libxml/xmlautomata.h - include/libxml/xmlerror.h - include/libxml/xmlexports.h - include/libxml/xmlmemory.h - include/libxml/xmlmodule.h - include/libxml/xmlreader.h - include/libxml/xmlregexp.h - include/libxml/xmlsave.h - include/libxml/xmlschemas.h - include/libxml/xmlschemastypes.h - include/libxml/xmlstring.h - include/libxml/xmlunicode.h - include/libxml/xmlwriter.h - include/libxml/xpath.h - include/libxml/xpathInternals.h - include/libxml/xpointer.h -) - -set( - LIBXML2_SRCS - buf.c - c14n.c - catalog.c - chvalid.c - debugXML.c - dict.c - encoding.c - entities.c - error.c - globals.c - hash.c - HTMLparser.c - HTMLtree.c - legacy.c - list.c - nanoftp.c - nanohttp.c - parser.c - parserInternals.c - pattern.c - relaxng.c - SAX.c - SAX2.c - schematron.c - threads.c - tree.c - uri.c - valid.c - xinclude.c - xlink.c - xmlIO.c - xmlmemory.c - xmlmodule.c - xmlreader.c - xmlregexp.c - xmlsave.c - xmlschemas.c - xmlschemastypes.c - xmlstring.c - xmlunicode.c - xmlwriter.c - xpath.c - xpointer.c - xzlib.c -) - -if(WIN32) - list(APPEND LIBXML2_SRCS win32/libxml2.rc) - file( - WRITE - ${CMAKE_CURRENT_BINARY_DIR}/rcVersion.h - "#define LIBXML_MAJOR_VERSION ${LIBXML_MAJOR_VERSION}\n" - "#define LIBXML_MINOR_VERSION ${LIBXML_MINOR_VERSION}\n" - "#define LIBXML_MICRO_VERSION ${LIBXML_MICRO_VERSION}\n" - "#define LIBXML_DOTTED_VERSION \"${VERSION}\"\n" - ) -endif() - -if(LIBXML2_WITH_TRIO) - list(APPEND LIBXML2_SRCS trio.c triostr.c) -endif() - -add_library(LibXml2 ${LIBXML2_HDRS} ${LIBXML2_SRCS}) -add_library(LibXml2::LibXml2 ALIAS LibXml2) - -target_compile_definitions(LibXml2 PRIVATE SYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}") - -if(NOT BUILD_SHARED_LIBS) - target_compile_definitions(LibXml2 PUBLIC LIBXML_STATIC) - set(XML_CFLAGS "-DLIBXML_STATIC") -endif() - -if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "GNU") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Wextra -Wshadow \ --Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return \ --Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \ --Wredundant-decls -Wno-long-long -Wno-format-extra-args") - - if(BUILD_SHARED_LIBS AND UNIX AND NOT APPLE) - check_linker_flag(C "LINKER:--undefined-version" FLAG_UNDEFINED_VERSION) - if (FLAG_UNDEFINED_VERSION) - target_link_options(LibXml2 PRIVATE "LINKER:--undefined-version") - endif() - target_link_options(LibXml2 PRIVATE "LINKER:--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libxml2.syms") - endif() -endif() - -if(LIBXML2_WITH_THREADS) - target_compile_definitions(LibXml2 PRIVATE _REENTRANT) - if(NOT WIN32) - check_include_files(pthread.h HAVE_PTHREAD_H) - endif() -endif() - -target_include_directories( - LibXml2 - PUBLIC - $ - $ - $/${CMAKE_INSTALL_INCLUDEDIR}/libxml2> -) - -if(LIBXML2_WITH_MODULES) - if(HAVE_DLOPEN) - target_link_libraries(LibXml2 PRIVATE dl) - set(MODULE_PLATFORM_LIBS "-ldl") - endif() - - if(HAVE_SHLLOAD) - target_link_libraries(LibXml2 PRIVATE dld) - set(MODULE_PLATFORM_LIBS "-ldld") - endif() -endif() - -if(UNIX) - target_link_libraries(LibXml2 PRIVATE m) - set(LIBM "-lm") -endif() - -if(WIN32) - target_link_libraries(LibXml2 PRIVATE ws2_32) - set(WINSOCK_LIBS "-lws2_32") -endif() - -if(LIBXML2_WITH_ICONV) - target_link_libraries(LibXml2 PUBLIC Iconv::Iconv) - if(NOT Iconv_IS_BUILT_IN) - set(ICONV_LIBS "-liconv") - endif() -endif() - -if(LIBXML2_WITH_ICU) - target_link_libraries(LibXml2 PRIVATE ICU::data ICU::i18n ICU::uc) - if(WIN32) - set(ICU_LIBS "icu-i18n") - else() - set(ICU_LIBS "icu-i18n") - endif() -endif() - -if(LIBXML2_WITH_LZMA) - target_link_libraries(LibXml2 PRIVATE LibLZMA::LibLZMA) - set(LZMA_LIBS "liblzma") -endif() - -if(LIBXML2_WITH_THREADS) - target_link_libraries(LibXml2 PRIVATE Threads::Threads) - set(THREAD_LIBS ${CMAKE_THREAD_LIBS_INIT}) -endif() - -if(LIBXML2_WITH_ZLIB) - target_link_libraries(LibXml2 PRIVATE ZLIB::ZLIB) - set(Z_LIBS "zlib") -endif() - -set_target_properties( - LibXml2 - PROPERTIES - IMPORT_PREFIX lib - OUTPUT_NAME xml2 - POSITION_INDEPENDENT_CODE ON - PREFIX lib - VERSION ${PROJECT_VERSION} - SOVERSION ${LIBXML_MAJOR_VERSION} -) - -set(XML_LIB_NAME xml2) -if(MSVC) - set(XML_LIB_NAME libxml2) -endif() - -install(FILES ${LIBXML2_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libxml2/libxml COMPONENT development) - -install( - TARGETS LibXml2 - EXPORT LibXml2 - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT development - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime NAMELINK_COMPONENT development - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime -) - -if(MSVC AND BUILD_SHARED_LIBS) - install(FILES $ DESTINATION ${CMAKE_INSTALL_BINDIR} CONFIGURATIONS Debug RelWithDebInfo COMPONENT debug) -endif() - -if(LIBXML2_WITH_PROGRAMS) - set( - PROGRAMS - xmlcatalog - xmllint - ) - foreach(PROGRAM ${PROGRAMS}) - add_executable(${PROGRAM} ${PROGRAM}.c) - add_executable(LibXml2::${PROGRAM} ALIAS ${PROGRAM}) - target_compile_definitions(${PROGRAM} PRIVATE SYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}") - target_link_libraries(${PROGRAM} LibXml2) - if(HAVE_LIBHISTORY) - target_link_libraries(${PROGRAM} history) - endif() - if(HAVE_LIBREADLINE) - target_link_libraries(${PROGRAM} readline) - endif() - install(TARGETS ${PROGRAM} EXPORT LibXml2 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT programs) - endforeach() -endif() - -if(LIBXML2_WITH_TESTS) - enable_testing() - set( - TESTS - runtest - runxmlconf - runsuite - testapi - testchar - testdict - testModule - testlimits - testrecurse - testThreads - ) - foreach(TEST ${TESTS}) - add_executable(${TEST} ${TEST}.c) - target_compile_definitions(${TEST} PRIVATE SYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}") - target_link_libraries(${TEST} LibXml2) - endforeach() - if(Threads_FOUND) - foreach(TEST runtest testThreads) - target_link_libraries(${TEST} Threads::Threads) - endforeach() - endif() - add_test(NAME runtest COMMAND runtest --out ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - add_test(NAME runsuite COMMAND runsuite WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - if(EXISTS ${LIBXML2_XMLCONF_WORKING_DIR}/xmlconf/xmlconf.xml) - add_test(NAME runxmlconf COMMAND runxmlconf WORKING_DIRECTORY ${LIBXML2_XMLCONF_WORKING_DIR}) - endif() - if(NOT WIN32) - add_test(NAME testapi COMMAND testapi) - endif() - add_test(NAME testchar COMMAND testchar) - add_test(NAME testdict COMMAND testdict) - add_test(NAME testrecurse COMMAND testrecurse WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - add_test(NAME testThreads COMMAND testThreads WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) -endif() - -if(LIBXML2_WITH_PYTHON) - execute_process( - COMMAND - ${Python_EXECUTABLE} - ${CMAKE_CURRENT_SOURCE_DIR}/python/generator.py - ${CMAKE_CURRENT_SOURCE_DIR}/doc/libxml2-api.xml - ${CMAKE_CURRENT_SOURCE_DIR}/python/libxml2-python-api.xml - WORKING_DIRECTORY - ${CMAKE_CURRENT_BINARY_DIR} - ) - file(READ python/libxml.py LIBXML_PY) - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/libxml2.py.in "${LIBXML_PY}") - file(READ ${CMAKE_CURRENT_BINARY_DIR}/libxml2class.py LIBXML2CLASS_PY) - file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libxml2.py.in "${LIBXML2CLASS_PY}") - configure_file(${CMAKE_CURRENT_BINARY_DIR}/libxml2.py.in libxml2.py COPYONLY) - add_library( - LibXml2Mod - libxml2-py.c - libxml2-py.h - python/libxml.c - python/libxml_wrap.h - python/types.c - ) - target_include_directories( - LibXml2Mod - PUBLIC - $ - ) - target_link_libraries(LibXml2Mod LibXml2 Python::Python) - set_target_properties( - LibXml2Mod - PROPERTIES - IMPORT_PREFIX lib - OUTPUT_NAME xml2mod - PREFIX lib - VERSION ${PROJECT_VERSION} - ) - if (WIN32) - set_target_properties(LibXml2Mod PROPERTIES SUFFIX ".pyd") - endif() - install( - TARGETS LibXml2Mod - ARCHIVE DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} COMPONENT development - LIBRARY DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} COMPONENT runtime NAMELINK_COMPONENT development - RUNTIME DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} COMPONENT runtime - ) - if(MSVC AND BUILD_SHARED_LIBS) - install(FILES $ DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} CONFIGURATIONS Debug RelWithDebInfo COMPONENT debug) - endif() - install(FILES python/drv_libxml2.py DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} COMPONENT runtime) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml2.py DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} COMPONENT runtime) -endif() - - -configure_package_config_file( - libxml2-config.cmake.cmake.in libxml2-config.cmake - INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 -) - -install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 - COMPONENT development -) - -write_basic_package_version_file( - ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-version.cmake - VERSION ${PROJECT_VERSION} - COMPATIBILITY SameMinorVersion -) - -install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-version.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 - COMPONENT development -) - -install( - EXPORT LibXml2 - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2 - NAMESPACE LibXml2:: - FILE libxml2-export.cmake - COMPONENT development -) - -if(MSVC) - configure_file(include/win32config.h config.h COPYONLY) -else() - configure_file(config.h.cmake.in config.h) -endif() -configure_file(include/libxml/xmlversion.h.in libxml/xmlversion.h) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml/xmlversion.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libxml2/libxml COMPONENT development) - -if(LIBXML2_WITH_PYTHON) - set(prefix "${CMAKE_INSTALL_PREFIX}") - configure_file(python/setup.py.in setup.py @ONLY) -endif() - -set(XML_INCLUDEDIR "-I\${includedir}/libxml2") -set(XML_LIBDIR "-L\${libdir}") -set(XML_LIBS "-lxml2") -set(XML_PRIVATE_LIBS "${Z_LIBS} ${LZMA_LIBS} ${THREAD_LIBS} ${ICONV_LIBS} ${ICU_LIBS} ${LIBM} ${WINSOCK_LIBS}") - -file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig" "${CMAKE_INSTALL_PREFIX}") -string(REGEX REPLACE "/$" "" PACKAGE_RELATIVE_PATH "${PACKAGE_RELATIVE_PATH}") - -if(WIN32) - set(prefix "\${pcfiledir}/${PACKAGE_RELATIVE_PATH}") -else() - set(prefix "${CMAKE_INSTALL_PREFIX}") -endif() -set(exec_prefix "\${prefix}") -set(libdir "\${prefix}/${CMAKE_INSTALL_LIBDIR}") -set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") -configure_file(libxml-2.0.pc.in libxml-2.0.pc @ONLY) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml-2.0.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT development) - -set(prefix "\$(cd \"\$(dirname \"\$0\")\"; pwd -P)/..") -configure_file(xml2-config.in xml2-config @ONLY) -install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/xml2-config DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT development) - -if(UNIX) - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/libxml.m4 DESTINATION ${CMAKE_INSTALL_DATADIR}/aclocal) -endif() - -set(XML_INCLUDEDIR "-I${CMAKE_INSTALL_FULL_INCLUDEDIR}/libxml2") -set(XML_LIBDIR "-L${CMAKE_INSTALL_FULL_LIBDIR}") - -set(CPACK_COMPONENT_DEVELOPMENT_DEPENDS runtime) -set(CPACK_COMPONENT_PROGRAMS_DEPENDS runtime) -set(CPACK_DEB_COMPONENT_INSTALL ON) -set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS "${PACKAGE_TARNAME}") -set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_NAME "${PACKAGE_TARNAME}-dev") -set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_SECTION "libdevel") -set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${PACKAGE_URL}) -set(CPACK_DEBIAN_PACKAGE_NAME ${PACKAGE_TARNAME}) -set(CPACK_DEBIAN_PACKAGE_SECTION "devel") -set(CPACK_DEBIAN_PROGRAMS_PACKAGE_DEPENDS "${PACKAGE_TARNAME}") -set(CPACK_DEBIAN_PROGRAMS_PACKAGE_NAME "${PACKAGE_TARNAME}-utils") -set(CPACK_DEBIAN_PROGRAMS_PACKAGE_SECTION "utils") -set(CPACK_DEBIAN_RUNTIME_PACKAGE_NAME ${PACKAGE_TARNAME}) -set(CPACK_DEBIAN_RUNTIME_PACKAGE_RECOMMENDS "${PACKAGE_TARNAME}-utils") -set(CPACK_DEBIAN_RUNTIME_PACKAGE_SECTION "libs") -set(CPACK_NSIS_PACKAGE_NAME ${PACKAGE_STRING}) -set(CPACK_NSIS_URL_INFO_ABOUT ${PACKAGE_URL}) -set(CPACK_PACKAGE_CONTACT ${PACKAGE_BUGREPORT}) -set(CPACK_PACKAGE_DISPLAY_NAME ${PACKAGE_STRING}) -set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PACKAGE_TARNAME}-${PACKAGE_VERSION}") -set(CPACK_PACKAGE_NAME ${PACKAGE_TARNAME}) -set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION}) -set(CPACK_PACKAGE_VERSION_MAJOR ${LIBXML_MAJOR_VERSION}) -set(CPACK_PACKAGE_VERSION_MINOR ${LIBXML_MINOR_VERSION}) -set(CPACK_PACKAGE_VERSION_PATCH ${LIBXML_MICRO_VERSION}) -set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/Copyright) -set(CPACK_RPM_COMPONENT_INSTALL ON) -set(CPACK_RPM_development_PACKAGE_NAME "${PACKAGE_NAME}-devel") -set(CPACK_RPM_development_PACKAGE_REQUIRES "${PACKAGE_NAME}") -set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries") -set(CPACK_RPM_PACKAGE_NAME ${PACKAGE_TARNAME}) -set(CPACK_RPM_PACKAGE_URL ${PACKAGE_URL}) -set(CPACK_RPM_programs_PACKAGE_NAME "${PACKAGE_NAME}-utils") -set(CPACK_RPM_programs_PACKAGE_REQUIRES "${PACKAGE_NAME}") -set(CPACK_RPM_runtime_PACKAGE_NAME "${PACKAGE_NAME}") -set(CPACK_RPM_runtime_PACKAGE_SUGGESTS "${PACKAGE_NAME}-utils") - -include(CPack) From 35c16e7c3d565a99a8324d2eed096a010d43875e Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Thu, 26 Sep 2024 20:54:44 +0100 Subject: [PATCH 08/23] respond to comments --- ports/openxlsx/portfile.cmake | 4 ++-- ports/openxlsx/usage | 3 ++- ports/openxlsx/vcpkg.json | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ports/openxlsx/portfile.cmake b/ports/openxlsx/portfile.cmake index 965b05bdba91dc..dac86802d1c96f 100644 --- a/ports/openxlsx/portfile.cmake +++ b/ports/openxlsx/portfile.cmake @@ -6,13 +6,13 @@ vcpkg_from_github( SHA512 e3d27b6e21dcb727398ec1c78cdde4adfb9d5d354380e22217f63c46dc63a1dcdfde54733b70ac9b7e5fa7f6bc47028b311f03fdccc980ed9132ac0a23a23ed4 HEAD_REF master ) -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DOPENXLSX_BUILD_TESTS=OFF ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/OpenXLSX) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") vcpkg_copy_pdbs() diff --git a/ports/openxlsx/usage b/ports/openxlsx/usage index 4de5584919dc6c..ce484c8d8723df 100644 --- a/ports/openxlsx/usage +++ b/ports/openxlsx/usage @@ -1,2 +1,3 @@ find_package(OpenXLSX CONFIG REQUIRED) - target_link_libraries(main PRIVATE OpenXLSX::OpenXLSX) \ No newline at end of file + target_link_libraries(main PRIVATE OpenXLSX::OpenXLSX) + \ No newline at end of file diff --git a/ports/openxlsx/vcpkg.json b/ports/openxlsx/vcpkg.json index 6a02d2c6578026..7c3835fad08fb5 100644 --- a/ports/openxlsx/vcpkg.json +++ b/ports/openxlsx/vcpkg.json @@ -1,6 +1,6 @@ { "name": "openxlsx", - "version": "1.4.0", + "version": "0.4.1", "description": "OpenXLSX is a C++ library for reading, writing, creating and modifying Microsoft Excel® files, with the .xlsx format.", "homepage": "https://github.com/troldal/OpenXLSX", "license": "BSD-3-Clause", From 47fee1dc68f1be893c6d7da33316e9bbc2cdc49e Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Fri, 27 Sep 2024 11:55:57 +0100 Subject: [PATCH 09/23] add a version file and update the baseline.json --- versions/baseline.json | 4 ++++ versions/o-/openxlsx.json | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 versions/o-/openxlsx.json diff --git a/versions/baseline.json b/versions/baseline.json index 14daf524c97dd7..88fdb3b8954d91 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6732,6 +6732,10 @@ "baseline": "2.5.1", "port-version": 0 }, + "openxlsx": { + "baseline": "0.4.1", + "port-version": 0 + }, "openxr-loader": { "baseline": "1.0.31", "port-version": 0 diff --git a/versions/o-/openxlsx.json b/versions/o-/openxlsx.json new file mode 100644 index 00000000000000..38a88cc100dc51 --- /dev/null +++ b/versions/o-/openxlsx.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "282da9ab0630c7ab62937842fb7ba169b5951b6f", + "version": "0.4.1", + "port-version": 0 + } + ] +} From b250091b6b9d58ed3f574862508929d0690ab9b3 Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Fri, 27 Sep 2024 12:00:57 +0100 Subject: [PATCH 10/23] change to 0.3.2 --- ports/openxlsx/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/openxlsx/vcpkg.json b/ports/openxlsx/vcpkg.json index 7c3835fad08fb5..82856c7a0a6cf1 100644 --- a/ports/openxlsx/vcpkg.json +++ b/ports/openxlsx/vcpkg.json @@ -1,6 +1,6 @@ { "name": "openxlsx", - "version": "0.4.1", + "version": "0.3.2", "description": "OpenXLSX is a C++ library for reading, writing, creating and modifying Microsoft Excel® files, with the .xlsx format.", "homepage": "https://github.com/troldal/OpenXLSX", "license": "BSD-3-Clause", From 0de260ffa1ea7a2fb02ac3d2c8885c1a7f9afbba Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Fri, 27 Sep 2024 12:02:35 +0100 Subject: [PATCH 11/23] add the versions changes and baseline --- versions/baseline.json | 2 +- versions/o-/openxlsx.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index 88fdb3b8954d91..57b1dbfbeef95e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6733,7 +6733,7 @@ "port-version": 0 }, "openxlsx": { - "baseline": "0.4.1", + "baseline": "0.3.2", "port-version": 0 }, "openxr-loader": { diff --git a/versions/o-/openxlsx.json b/versions/o-/openxlsx.json index 38a88cc100dc51..9aecc1fcdc709a 100644 --- a/versions/o-/openxlsx.json +++ b/versions/o-/openxlsx.json @@ -1,8 +1,8 @@ { "versions": [ { - "git-tree": "282da9ab0630c7ab62937842fb7ba169b5951b6f", - "version": "0.4.1", + "git-tree": "fec0b77e7b174435eb3b15c10e973bdb6a6dd604", + "version": "0.3.2", "port-version": 0 } ] From 2e33e06d050465bf57da184b7ce178e5f649be60 Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Sun, 29 Sep 2024 20:07:38 +0100 Subject: [PATCH 12/23] fix missing dependencies --- ports/openxlsx/portfile.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/openxlsx/portfile.cmake b/ports/openxlsx/portfile.cmake index dac86802d1c96f..af16d91cac39af 100644 --- a/ports/openxlsx/portfile.cmake +++ b/ports/openxlsx/portfile.cmake @@ -3,7 +3,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO troldal/OpenXLSX REF master - SHA512 e3d27b6e21dcb727398ec1c78cdde4adfb9d5d354380e22217f63c46dc63a1dcdfde54733b70ac9b7e5fa7f6bc47028b311f03fdccc980ed9132ac0a23a23ed4 + SHA512 429215a961cfcfe8fcb49ee48970dd10dccad09a5c80db2eea2413120a51a2529c9a650584a079756c3b463d53f1fcdec46fdc158ffbc680592896867f60d3ea HEAD_REF master ) vcpkg_cmake_configure( @@ -15,6 +15,10 @@ vcpkg_cmake_configure( vcpkg_cmake_install() vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/OpenXLSX) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(COPY "${SOURCE_PATH}/OpenXLSX/external" DESTINATION "${CURRENT_PACKAGES_DIR}/include") +file(COPY "${SOURCE_PATH}/OpenXLSX/headers/XLException.hpp" DESTINATION "${CURRENT_PACKAGES_DIR}/include") + + vcpkg_copy_pdbs() From 8cd999c00ec268a3d7d5d7fcc3977c02462823b0 Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Mon, 30 Sep 2024 16:52:13 +0100 Subject: [PATCH 13/23] add the patch file --- ports/openxlsx/compilation_fix.patch | 119 +++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 ports/openxlsx/compilation_fix.patch diff --git a/ports/openxlsx/compilation_fix.patch b/ports/openxlsx/compilation_fix.patch new file mode 100644 index 00000000000000..49525f97409fe0 --- /dev/null +++ b/ports/openxlsx/compilation_fix.patch @@ -0,0 +1,119 @@ +diff --git a/OpenXLSX/headers/XLSheet.hpp b/OpenXLSX/headers/XLSheet.hpp +index 2f33dd4..0024408 100644 +--- a/OpenXLSX/headers/XLSheet.hpp ++++ b/OpenXLSX/headers/XLSheet.hpp +@@ -137,8 +137,8 @@ namespace OpenXLSX + XLSheetState visibility() const + { + XLQuery query(XLQueryType::QuerySheetVisibility); +- query.template setParam("sheetID", relationshipID()); +- auto state = parentDoc().execQuery(query).template result(); ++ query.setParam("sheetID", relationshipID()); ++ auto state = parentDoc().execQuery(query).result(); + auto result = XLSheetState::Visible; + + if (state == "visible" || state.empty()) { +@@ -185,19 +185,13 @@ namespace OpenXLSX + * @return + * @todo To be implemented. + */ +- XLColor color() const +- { +- return XLColor(); +- } ++ XLColor color() const { return XLColor(); } + + /** + * @brief + * @param color + */ +- void setColor(const XLColor& color) +- { +- static_cast(*this).setColor_impl(color); +- } ++ void setColor(const XLColor& color) { static_cast(*this).setColor_impl(color); } + + /** + * @brief +@@ -205,11 +199,12 @@ namespace OpenXLSX + */ + uint16_t index() const + { +-// return uint16_t(std::stoi(parentDoc().execQuery(R"({ "query": "QuerySheetIndex", "sheetID": ")" + relationshipID() + "\"}"))); ++ // return uint16_t(std::stoi(parentDoc().execQuery(R"({ "query": "QuerySheetIndex", "sheetID": ")" + relationshipID() ++ // + "\"}"))); + + XLQuery query(XLQueryType::QuerySheetIndex); +- query.template setParam("sheetID", relationshipID()); +- return uint16_t(std::stoi(parentDoc().execQuery(query).template result())); ++ query.setParam("sheetID", relationshipID()); ++ return uint16_t(std::stoi(parentDoc().execQuery(query).result())); + } + + /** +@@ -218,9 +213,8 @@ namespace OpenXLSX + */ + void setIndex(uint16_t index) + { +- parentDoc().execCommand(XLCommand(XLCommandType::SetSheetIndex) +- .setParam("sheetID", relationshipID()) +- .setParam("sheetIndex", index)); ++ parentDoc().execCommand( ++ XLCommand(XLCommandType::SetSheetIndex).setParam("sheetID", relationshipID()).setParam("sheetIndex", index)); + } + + /** +@@ -250,37 +244,25 @@ namespace OpenXLSX + * @brief + * @return + */ +- bool isSelected() const +- { +- return static_cast(*this).isSelected_impl(); +- } ++ bool isSelected() const { return static_cast(*this).isSelected_impl(); } + + /** + * @brief + * @param selected + */ +- void setSelected(bool selected) +- { +- static_cast(*this).setSelected_impl(selected); +- } ++ void setSelected(bool selected) { static_cast(*this).setSelected_impl(selected); } + + /** + * @brief + * @return + */ +- bool isActive() const +- { +- return static_cast(*this).isActive_impl(); +- } ++ bool isActive() const { return static_cast(*this).isActive_impl(); } + + /** + * @brief + * @param active + */ +- void setActive() +- { +- static_cast(*this).setActive_impl(); +- } ++ void setActive() { static_cast(*this).setActive_impl(); } + + /** + * @brief Method for cloning the sheet. +@@ -290,9 +272,8 @@ namespace OpenXLSX + */ + void clone(const std::string& newName) + { +- parentDoc().execCommand(XLCommand(XLCommandType::CloneSheet) +- .setParam("sheetID", relationshipID()) +- .setParam("cloneName", newName)); ++ parentDoc().execCommand( ++ XLCommand(XLCommandType::CloneSheet).setParam("sheetID", relationshipID()).setParam("cloneName", newName)); + } + }; + From 8a3debe91c14259eb7831fdbf1d5988541465be1 Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Mon, 30 Sep 2024 17:07:25 +0100 Subject: [PATCH 14/23] fix the version file --- versions/o-/openxlsx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/o-/openxlsx.json b/versions/o-/openxlsx.json index 9aecc1fcdc709a..977edf709f7579 100644 --- a/versions/o-/openxlsx.json +++ b/versions/o-/openxlsx.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "fec0b77e7b174435eb3b15c10e973bdb6a6dd604", + "git-tree": "4f8a34466c10ff2a6a4b991d3fe0fc3823073a49", "version": "0.3.2", "port-version": 0 } From a0ead3b1f3587b7dda7bb19f50a8d6cf57030c8b Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Tue, 1 Oct 2024 20:40:03 +0100 Subject: [PATCH 15/23] reply to comments --- ports/openxlsx/compilation_fix.patch | 109 ++------------------------- ports/openxlsx/portfile.cmake | 7 +- ports/openxlsx/usage | 4 +- 3 files changed, 11 insertions(+), 109 deletions(-) diff --git a/ports/openxlsx/compilation_fix.patch b/ports/openxlsx/compilation_fix.patch index 49525f97409fe0..fdcd1761fc3e8c 100644 --- a/ports/openxlsx/compilation_fix.patch +++ b/ports/openxlsx/compilation_fix.patch @@ -1,119 +1,22 @@ diff --git a/OpenXLSX/headers/XLSheet.hpp b/OpenXLSX/headers/XLSheet.hpp -index 2f33dd4..0024408 100644 +index 2f33dd4..23c11c9 100644 --- a/OpenXLSX/headers/XLSheet.hpp +++ b/OpenXLSX/headers/XLSheet.hpp -@@ -137,8 +137,8 @@ namespace OpenXLSX +@@ -137,7 +137,7 @@ namespace OpenXLSX XLSheetState visibility() const { XLQuery query(XLQueryType::QuerySheetVisibility); - query.template setParam("sheetID", relationshipID()); -- auto state = parentDoc().execQuery(query).template result(); + query.setParam("sheetID", relationshipID()); -+ auto state = parentDoc().execQuery(query).result(); + auto state = parentDoc().execQuery(query).template result(); auto result = XLSheetState::Visible; - if (state == "visible" || state.empty()) { -@@ -185,19 +185,13 @@ namespace OpenXLSX - * @return - * @todo To be implemented. - */ -- XLColor color() const -- { -- return XLColor(); -- } -+ XLColor color() const { return XLColor(); } - - /** - * @brief - * @param color - */ -- void setColor(const XLColor& color) -- { -- static_cast(*this).setColor_impl(color); -- } -+ void setColor(const XLColor& color) { static_cast(*this).setColor_impl(color); } - - /** - * @brief -@@ -205,11 +199,12 @@ namespace OpenXLSX - */ - uint16_t index() const - { --// return uint16_t(std::stoi(parentDoc().execQuery(R"({ "query": "QuerySheetIndex", "sheetID": ")" + relationshipID() + "\"}"))); -+ // return uint16_t(std::stoi(parentDoc().execQuery(R"({ "query": "QuerySheetIndex", "sheetID": ")" + relationshipID() -+ // + "\"}"))); +@@ -208,7 +208,7 @@ namespace OpenXLSX + // return uint16_t(std::stoi(parentDoc().execQuery(R"({ "query": "QuerySheetIndex", "sheetID": ")" + relationshipID() + "\"}"))); XLQuery query(XLQueryType::QuerySheetIndex); - query.template setParam("sheetID", relationshipID()); -- return uint16_t(std::stoi(parentDoc().execQuery(query).template result())); + query.setParam("sheetID", relationshipID()); -+ return uint16_t(std::stoi(parentDoc().execQuery(query).result())); - } - - /** -@@ -218,9 +213,8 @@ namespace OpenXLSX - */ - void setIndex(uint16_t index) - { -- parentDoc().execCommand(XLCommand(XLCommandType::SetSheetIndex) -- .setParam("sheetID", relationshipID()) -- .setParam("sheetIndex", index)); -+ parentDoc().execCommand( -+ XLCommand(XLCommandType::SetSheetIndex).setParam("sheetID", relationshipID()).setParam("sheetIndex", index)); - } - - /** -@@ -250,37 +244,25 @@ namespace OpenXLSX - * @brief - * @return - */ -- bool isSelected() const -- { -- return static_cast(*this).isSelected_impl(); -- } -+ bool isSelected() const { return static_cast(*this).isSelected_impl(); } - - /** - * @brief - * @param selected - */ -- void setSelected(bool selected) -- { -- static_cast(*this).setSelected_impl(selected); -- } -+ void setSelected(bool selected) { static_cast(*this).setSelected_impl(selected); } - - /** - * @brief - * @return - */ -- bool isActive() const -- { -- return static_cast(*this).isActive_impl(); -- } -+ bool isActive() const { return static_cast(*this).isActive_impl(); } - - /** - * @brief - * @param active - */ -- void setActive() -- { -- static_cast(*this).setActive_impl(); -- } -+ void setActive() { static_cast(*this).setActive_impl(); } - - /** - * @brief Method for cloning the sheet. -@@ -290,9 +272,8 @@ namespace OpenXLSX - */ - void clone(const std::string& newName) - { -- parentDoc().execCommand(XLCommand(XLCommandType::CloneSheet) -- .setParam("sheetID", relationshipID()) -- .setParam("cloneName", newName)); -+ parentDoc().execCommand( -+ XLCommand(XLCommandType::CloneSheet).setParam("sheetID", relationshipID()).setParam("cloneName", newName)); + return uint16_t(std::stoi(parentDoc().execQuery(query).template result())); } - }; diff --git a/ports/openxlsx/portfile.cmake b/ports/openxlsx/portfile.cmake index e0f7af9007947f..ad6d5525daae95 100644 --- a/ports/openxlsx/portfile.cmake +++ b/ports/openxlsx/portfile.cmake @@ -6,17 +6,16 @@ vcpkg_from_github( SHA512 52205b394383d45c0fb16599ab96453d8a5b9b5cd596096848cc888f47565b2713d9edded06b2ecd7b67736622badf136e4b1becc57bfa5bbdcb1e063a347084 HEAD_REF master PATCHES - compilation_fix.patch + compilation_fix.patch ) -set(CMAKE_CXX_STANDARD 17) vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA OPTIONS + -DCMAKE_CXX_STANDARD=17 -DOPENXLSX_BUILD_TESTS=OFF ) -vcpkg_cmake_install(DISABLE_PARALLEL) +vcpkg_cmake_install() vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/OpenXLSX) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(COPY "${SOURCE_PATH}/OpenXLSX/external" DESTINATION "${CURRENT_PACKAGES_DIR}/include") diff --git a/ports/openxlsx/usage b/ports/openxlsx/usage index ce484c8d8723df..f19688b4bdebc5 100644 --- a/ports/openxlsx/usage +++ b/ports/openxlsx/usage @@ -1,3 +1,3 @@ +openxlsx provides CMake targets: find_package(OpenXLSX CONFIG REQUIRED) - target_link_libraries(main PRIVATE OpenXLSX::OpenXLSX) - \ No newline at end of file + target_link_libraries(main PRIVATE OpenXLSX::OpenXLSX) \ No newline at end of file From 5052147e51cb124d34d3938569dfca019e76b4e3 Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Tue, 1 Oct 2024 20:53:17 +0100 Subject: [PATCH 16/23] fix the version file --- ports/openxlsx/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/openxlsx/portfile.cmake b/ports/openxlsx/portfile.cmake index ad6d5525daae95..def97be1407ea5 100644 --- a/ports/openxlsx/portfile.cmake +++ b/ports/openxlsx/portfile.cmake @@ -3,7 +3,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO troldal/OpenXLSX REF "v${VERSION}" - SHA512 52205b394383d45c0fb16599ab96453d8a5b9b5cd596096848cc888f47565b2713d9edded06b2ecd7b67736622badf136e4b1becc57bfa5bbdcb1e063a347084 + SHA512 76cc344af0c6d7547391c360743fa306b1b971bd HEAD_REF master PATCHES compilation_fix.patch From e7ebe60cb8f2d2161f52b34f0391895eb587ae18 Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Tue, 1 Oct 2024 20:58:09 +0100 Subject: [PATCH 17/23] fix the sha-512 and version file --- ports/openxlsx/portfile.cmake | 2 +- versions/o-/openxlsx.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/openxlsx/portfile.cmake b/ports/openxlsx/portfile.cmake index def97be1407ea5..ad6d5525daae95 100644 --- a/ports/openxlsx/portfile.cmake +++ b/ports/openxlsx/portfile.cmake @@ -3,7 +3,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO troldal/OpenXLSX REF "v${VERSION}" - SHA512 76cc344af0c6d7547391c360743fa306b1b971bd + SHA512 52205b394383d45c0fb16599ab96453d8a5b9b5cd596096848cc888f47565b2713d9edded06b2ecd7b67736622badf136e4b1becc57bfa5bbdcb1e063a347084 HEAD_REF master PATCHES compilation_fix.patch diff --git a/versions/o-/openxlsx.json b/versions/o-/openxlsx.json index 977edf709f7579..2a554fa6962219 100644 --- a/versions/o-/openxlsx.json +++ b/versions/o-/openxlsx.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "4f8a34466c10ff2a6a4b991d3fe0fc3823073a49", + "git-tree": "c3efde5ca801eaf611ca01e612e5095c63adef71", "version": "0.3.2", "port-version": 0 } From fba60978d41a5fe1c1ba70babb6978ede121b2ca Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Tue, 1 Oct 2024 21:10:53 +0100 Subject: [PATCH 18/23] fix the version file --- versions/o-/openxlsx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/o-/openxlsx.json b/versions/o-/openxlsx.json index 2a554fa6962219..08750b69991f70 100644 --- a/versions/o-/openxlsx.json +++ b/versions/o-/openxlsx.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c3efde5ca801eaf611ca01e612e5095c63adef71", + "git-tree": "76cc344af0c6d7547391c360743fa306b1b971bd", "version": "0.3.2", "port-version": 0 } From f9d16acd56ed8712de949da88d33aba1f154edf3 Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Wed, 2 Oct 2024 12:21:49 +0100 Subject: [PATCH 19/23] Update ports/openxlsx/usage Co-authored-by: Kai Pastor --- ports/openxlsx/usage | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/openxlsx/usage b/ports/openxlsx/usage index f19688b4bdebc5..a39f92398c804f 100644 --- a/ports/openxlsx/usage +++ b/ports/openxlsx/usage @@ -1,3 +1,5 @@ openxlsx provides CMake targets: +openxlsx provides CMake targets: + find_package(OpenXLSX CONFIG REQUIRED) target_link_libraries(main PRIVATE OpenXLSX::OpenXLSX) \ No newline at end of file From 57fe05aaae7844a10dedfaeb8d809b46e84da6d7 Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Wed, 2 Oct 2024 21:45:42 +0100 Subject: [PATCH 20/23] Update usage --- ports/openxlsx/usage | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ports/openxlsx/usage b/ports/openxlsx/usage index a39f92398c804f..cc740c81250fca 100644 --- a/ports/openxlsx/usage +++ b/ports/openxlsx/usage @@ -1,5 +1,4 @@ -openxlsx provides CMake targets: openxlsx provides CMake targets: find_package(OpenXLSX CONFIG REQUIRED) - target_link_libraries(main PRIVATE OpenXLSX::OpenXLSX) \ No newline at end of file + target_link_libraries(main PRIVATE OpenXLSX::OpenXLSX) From c3f63350aa145310ce6b1887d2e710a3d8dc6bb5 Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Wed, 2 Oct 2024 22:14:57 +0100 Subject: [PATCH 21/23] fix version file --- versions/o-/openxlsx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/o-/openxlsx.json b/versions/o-/openxlsx.json index 08750b69991f70..ebc7f70211016e 100644 --- a/versions/o-/openxlsx.json +++ b/versions/o-/openxlsx.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "76cc344af0c6d7547391c360743fa306b1b971bd", + "git-tree": "cfe04fbd49dba5d41bfbf4472c4d09b1d9532b22", "version": "0.3.2", "port-version": 0 } From 47e8d65fb55848374d6596c933595902a55e1ab4 Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Tue, 8 Oct 2024 22:46:06 +0100 Subject: [PATCH 22/23] Update ports/openxlsx/portfile.cmake Co-authored-by: Javier Matos Denizac --- ports/openxlsx/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/openxlsx/portfile.cmake b/ports/openxlsx/portfile.cmake index ad6d5525daae95..2b0ef21abd11b1 100644 --- a/ports/openxlsx/portfile.cmake +++ b/ports/openxlsx/portfile.cmake @@ -12,7 +12,6 @@ vcpkg_from_github( vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} OPTIONS - -DCMAKE_CXX_STANDARD=17 -DOPENXLSX_BUILD_TESTS=OFF ) vcpkg_cmake_install() From 10da30bf99ac7fce8c0c7e400e1fe799b020a59b Mon Sep 17 00:00:00 2001 From: motazmuhammad Date: Tue, 8 Oct 2024 22:46:19 +0100 Subject: [PATCH 23/23] Update ports/openxlsx/portfile.cmake Co-authored-by: Javier Matos Denizac --- ports/openxlsx/portfile.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/openxlsx/portfile.cmake b/ports/openxlsx/portfile.cmake index 2b0ef21abd11b1..0ecefc80544559 100644 --- a/ports/openxlsx/portfile.cmake +++ b/ports/openxlsx/portfile.cmake @@ -13,6 +13,9 @@ vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DOPENXLSX_BUILD_TESTS=OFF + -OPENXLSX_CREATE_DOCS=OFF + -OPENXLSX_BUILD_SAMPLES=OFF + -DOPENXLSX_BUILD_BENCHMARKS=OFF ) vcpkg_cmake_install() vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/OpenXLSX)