Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package coeurl for openSUSE:Factory checked in at 2026-10-14 18:48:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/coeurl (Old) and /work/SRC/openSUSE:Factory/.coeurl.new.3698736 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "coeurl" Wed Oct 14 18:48:00 2026 rev:6 rq:1384774 version:0.3.2 Changes: -------- --- /work/SRC/openSUSE:Factory/coeurl/coeurl.changes 2025-08-06 14:34:42.859607030 +0200 +++ /work/SRC/openSUSE:Factory/.coeurl.new.3698736/coeurl.changes 2026-10-14 18:48:08.200630663 +0200 @@ -1,0 +2,10 @@ +Mon Apr 20 15:02:19 UTC 2026 - Dominik Heidler <[email protected]> + +- Update to v0.3.2 + * Fix use after free of evbase + * Clean up meson files + * Upgrade wrap dependencies + * Fix missing zlib in hunter deps + * Bump hunter dependencies + +------------------------------------------------------------------- Old: ---- coeurl-v0.3.1.tar.gz New: ---- coeurl-v0.3.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ coeurl.spec ++++++ --- /var/tmp/diff_new_pack.yvcL0H/_old 2026-10-14 18:48:09.354678963 +0200 +++ /var/tmp/diff_new_pack.yvcL0H/_new 2026-10-14 18:48:09.356679047 +0200 @@ -1,9 +1,7 @@ # # spec file for package coeurl # -# Copyright (c) 2025 SUSE LLC and contributors -# Copyright (c) 2025 SUSE LLC and contributors -# Copyright (c) 2025 SUSE LLC and contributors +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,7 +18,7 @@ %global libname libcoeurl0_3 Name: coeurl -Version: 0.3.1 +Version: 0.3.2 Release: 0 Summary: A simple async wrapper around CURL for C++ License: MIT ++++++ coeurl-v0.3.1.tar.gz -> coeurl-v0.3.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coeurl-v0.3.1/.gitignore new/coeurl-v0.3.2/.gitignore --- old/coeurl-v0.3.1/.gitignore 2024-06-02 21:32:43.000000000 +0200 +++ new/coeurl-v0.3.2/.gitignore 2026-02-28 02:03:15.000000000 +0100 @@ -9,5 +9,6 @@ /subprojects/libevent-*/ /subprojects/spdlog-*/ /subprojects/curl-*/ +/subprojects/fmt-*/ /subprojects/packagecache/ /*.pem diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coeurl-v0.3.1/.gitlab-ci.yml new/coeurl-v0.3.2/.gitlab-ci.yml --- old/coeurl-v0.3.1/.gitlab-ci.yml 2024-06-02 21:32:43.000000000 +0200 +++ new/coeurl-v0.3.2/.gitlab-ci.yml 2026-02-28 02:03:15.000000000 +0100 @@ -63,6 +63,18 @@ - cmake -GNinja -S tests/ -B build -DHUNTER_ENABLED=ON - ninja -C build +build-windows: + stage: build + image: win10-base + tags: [libvirt,powershell] + script: + - meson setup builddir -Dtests=true -Dexamples=true --wrap-mode=forcefallback -Ddefault_library=static + - meson compile -C builddir + cache: + key: "$CI_JOB_NAME" + paths: + - subprojects/packagecache/ + test-pages: stage: build tags: [docker] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coeurl-v0.3.1/CHANGELOG.md new/coeurl-v0.3.2/CHANGELOG.md --- old/coeurl-v0.3.1/CHANGELOG.md 2024-06-02 21:32:43.000000000 +0200 +++ new/coeurl-v0.3.2/CHANGELOG.md 2026-02-28 02:03:15.000000000 +0100 @@ -1,6 +1,12 @@ CHANGELOG ========= +[0.3.2] - 2026-02-28 +-------------------- + +- Fix use after free during shutdown. +- Bump a lot of dependencies and clean up build files. + [0.3.1] - 2024-06-02 -------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coeurl-v0.3.1/CMakeLists.txt new/coeurl-v0.3.2/CMakeLists.txt --- old/coeurl-v0.3.1/CMakeLists.txt 2024-06-02 21:32:43.000000000 +0200 +++ new/coeurl-v0.3.2/CMakeLists.txt 2026-02-28 02:03:15.000000000 +0100 @@ -15,19 +15,21 @@ option(HUNTER_ENABLED "Enable Hunter package manager" OFF) include("cmake/HunterGate.cmake") HunterGate( - URL "https://github.com/cpp-pm/hunter/archive/v0.25.5.tar.gz" - SHA1 "a20151e4c0740ee7d0f9994476856d813cdead29" + URL "https://github.com/cpp-pm/hunter/archive/v0.26.6.tar.gz" + SHA1 "e70c29f878f5d5f5cdf1b9ccd628fb872e8624a8" + LOCAL ) option(USE_BUNDLED_SPDLOG "Use the bundled version of spdlog." ${HUNTER_ENABLED}) -option(USE_BUNDLED_LIBEVENT "Use the bundled version of spdlog." ${HUNTER_ENABLED}) -option(USE_BUNDLED_LIBCURL "Use the bundled version of spdlog." ${HUNTER_ENABLED}) -option(USE_BUNDLED_SPDLOG "Use the bundled version of spdlog." ${HUNTER_ENABLED}) +option(USE_BUNDLED_LIBEVENT "Use the bundled version of libevent." ${HUNTER_ENABLED}) +option(USE_BUNDLED_LIBCURL "Use the bundled version of curl." ${HUNTER_ENABLED}) +option(USE_BUNDLED_ZLIB "Use the bundled version of zlib (for curl)." ${HUNTER_ENABLED}) project(coeurl - VERSION 0.3.1 + VERSION 0.3.2 DESCRIPTION "Simple library to do http requests asynchronously via CURL in C++." - HOMEPAGE_URL "https://nheko.im/nheko-reborn/cocurl") + HOMEPAGE_URL "https://nheko.im/nheko-reborn/cocurl" + LANGUAGES CXX) if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) message(FATAL_ERROR "The CMake build for coeurl is not intended for installation or usage outside of FetchContent. Use meson instead.") @@ -46,14 +48,13 @@ # libevent if (USE_BUNDLED_LIBEVENT) hunter_add_package(Libevent) - find_package(Libevent CONFIG REQUIRED) - target_link_libraries(coeurl PUBLIC Libevent::event_core) - # Not needed with current hunter version - #if (WIN32) - # target_link_libraries(coeurl PUBLIC Libevent::event_windows) - #else() - # target_link_libraries(coeurl PUBLIC Libevent::event_pthreads) - #endif() + if (WIN32) + find_package(Libevent 2.2 REQUIRED COMPONENTS core) + target_link_libraries(coeurl PUBLIC libevent::core) + else() + find_package(Libevent 2.2 REQUIRED COMPONENTS core pthreads) + target_link_libraries(coeurl PUBLIC libevent::core libevent::pthreads) + endif() else() find_package(PkgConfig REQUIRED) pkg_check_modules(libevent_core REQUIRED IMPORTED_TARGET libevent_core) @@ -69,6 +70,9 @@ endif() # curl +if (USE_BUNDLED_ZLIB) + hunter_add_package(ZLIB) +endif() if (USE_BUNDLED_LIBCURL) hunter_add_package(CURL) find_package(CURL CONFIG REQUIRED) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coeurl-v0.3.1/cmake/Hunter/config.cmake new/coeurl-v0.3.2/cmake/Hunter/config.cmake --- old/coeurl-v0.3.1/cmake/Hunter/config.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/coeurl-v0.3.2/cmake/Hunter/config.cmake 2026-02-28 02:03:15.000000000 +0100 @@ -0,0 +1,94 @@ +hunter_config( + nlohmann_json + VERSION 3.11.2 + CMAKE_ARGS JSON_MultipleHeaders=ON +) + +if (WIN32) + hunter_config( + CURL + VERSION "8.18.0" + URL "https://github.com/curl/curl/releases/download/curl-8_18_0/curl-8.18.0.tar.gz" + SHA1 1a13070ccd2c5fe1d47cb34dd56138f69708f3f9 + CMAKE_ARGS + BUILD_CURL_TESTS=OFF + BUILD_CURL_EXE=OFF + CURL_USE_SCHANNEL=ON + CURL_USE_OPENSSL=OFF + CURL_USE_LIBSSH2=OFF + CURL_USE_LIBPSL=OFF + CURL_DISABLE_FTP=ON + CURL_DISABLE_FTP=ON + CURL_DISABLE_FILE=ON + CURL_DISABLE_TELNET=ON + CURL_DISABLE_LDAP=ON + CURL_DISABLE_DICT=ON + CURL_DISABLE_TFTP=ON + CURL_DISABLE_GOPHER=ON + CURL_DISABLE_POP3=ON + CURL_DISABLE_IMAP=ON + CURL_DISABLE_SMB=ON + CURL_DISABLE_SMTP=ON + CURL_DISABLE_RTSP=ON + CURL_USE_LIBRTMP=OFF + CURL_DISABLE_MQTT=ON + BUILD_TESTING=OFF + ) +else() + hunter_config( + CURL + VERSION "8.18.0" + URL "https://github.com/curl/curl/releases/download/curl-8_18_0/curl-8.18.0.tar.gz" + SHA1 1a13070ccd2c5fe1d47cb34dd56138f69708f3f9 + CMAKE_ARGS + BUILD_CURL_TESTS=OFF + BUILD_CURL_EXE=OFF + CURL_USE_SCHANNEL=OFF + CURL_USE_OPENSSL=ON + CURL_USE_LIBSSH2=OFF + CURL_USE_LIBPSL=OFF + CURL_DISABLE_FTP=ON + CURL_DISABLE_FTP=ON + CURL_DISABLE_FILE=ON + CURL_DISABLE_TELNET=ON + CURL_DISABLE_LDAP=ON + CURL_DISABLE_DICT=ON + CURL_DISABLE_TFTP=ON + CURL_DISABLE_GOPHER=ON + CURL_DISABLE_POP3=ON + CURL_DISABLE_IMAP=ON + CURL_DISABLE_SMB=ON + CURL_DISABLE_SMTP=ON + CURL_DISABLE_RTSP=ON + CURL_USE_LIBRTMP=OFF + CURL_DISABLE_MQTT=ON + BUILD_TESTING=OFF + ) +endif() + +hunter_config(ZLIB + URL "https://codeload.github.com/madler/zlib/zip/tags/v1.3.2" + VERSION "1.3.2-chromium" + SHA1 "40b515519dceca271d77e97c680ab4871f3a8556" + CMAKE_ARGS + ZLIB_BUILD_TESTING=OFF + ZLIB_BUILD_SHARED=ON + ZLIB_BUILD_STATIC=ON + ZLIB_BUILD_MINIZIP=OFF + ZLIB_INSTALL=ON + ZLIB_PREFIX=OFF +) + +hunter_config( + Libevent + VERSION "2.2.0-a994a52d5373d6284b27576efa617aff2baa7bd3" + URL "https://github.com/hunter-packages/libevent/archive/a994a52d5373d6284b27576efa617aff2baa7bd3.tar.gz" + SHA1 "a6f87f2b76465ccc1e5d75024475aae7d4c766a4" + CMAKE_ARGS + EVENT__DISABLE_TESTS=ON + EVENT__DISABLE_SAMPLES=ON + EVENT__DISABLE_REGRESS=ON + EVENT__DISABLE_BENCHMARK=ON + CMAKE_POLICY_VERSION_MINIMUM=3.20 + CMAKE_C_BYTE_ORDER=LITTLE_ENDIAN +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coeurl-v0.3.1/cmake/HunterGate.cmake new/coeurl-v0.3.2/cmake/HunterGate.cmake --- old/coeurl-v0.3.1/cmake/HunterGate.cmake 2024-06-02 21:32:43.000000000 +0200 +++ new/coeurl-v0.3.2/cmake/HunterGate.cmake 2026-02-28 02:03:15.000000000 +0100 @@ -25,7 +25,7 @@ # This is a gate file to Hunter package manager. # Include this file using `include` command and add package you need, example: # -# cmake_minimum_required(VERSION 3.2) +# cmake_minimum_required(VERSION 3.10) # # include("cmake/HunterGate.cmake") # HunterGate( @@ -39,16 +39,16 @@ # hunter_add_package(Boo COMPONENTS Bar Baz) # # Projects: -# * https://github.com/hunter-packages/gate/ -# * https://github.com/ruslo/hunter +# * https://github.com/cpp-pm/gate/ +# * https://github.com/cpp-pm/hunter option(HUNTER_ENABLED "Enable Hunter package manager support" ON) if(HUNTER_ENABLED) - if(CMAKE_VERSION VERSION_LESS "3.2") + if(CMAKE_VERSION VERSION_LESS "3.10") message( FATAL_ERROR - "At least CMake version 3.2 required for Hunter dependency management." + "At least CMake version 3.10 required for Hunter dependency management." " Update CMake or set HUNTER_ENABLED to OFF." ) endif() @@ -59,8 +59,9 @@ option(HUNTER_STATUS_PRINT "Print working status" ON) option(HUNTER_STATUS_DEBUG "Print a lot info" OFF) option(HUNTER_TLS_VERIFY "Enable/disable TLS certificate checking on downloads" ON) +set(HUNTER_ROOT "" CACHE FILEPATH "Override the HUNTER_ROOT.") -set(HUNTER_ERROR_PAGE "https://docs.hunter.sh/en/latest/reference/errors") +set(HUNTER_ERROR_PAGE "https://hunter.readthedocs.io/en/latest/reference/errors") function(hunter_gate_status_print) if(HUNTER_STATUS_PRINT OR HUNTER_STATUS_DEBUG) @@ -148,24 +149,21 @@ # Set HUNTER_GATE_ROOT cmake variable to suitable value. function(hunter_gate_detect_root) # Check CMake variable - string(COMPARE NOTEQUAL "${HUNTER_ROOT}" "" not_empty) - if(not_empty) + if(HUNTER_ROOT) set(HUNTER_GATE_ROOT "${HUNTER_ROOT}" PARENT_SCOPE) hunter_gate_status_debug("HUNTER_ROOT detected by cmake variable") return() endif() # Check environment variable - string(COMPARE NOTEQUAL "$ENV{HUNTER_ROOT}" "" not_empty) - if(not_empty) + if(DEFINED ENV{HUNTER_ROOT}) set(HUNTER_GATE_ROOT "$ENV{HUNTER_ROOT}" PARENT_SCOPE) hunter_gate_status_debug("HUNTER_ROOT detected by environment variable") return() endif() # Check HOME environment variable - string(COMPARE NOTEQUAL "$ENV{HOME}" "" result) - if(result) + if(DEFINED ENV{HOME}) set(HUNTER_GATE_ROOT "$ENV{HOME}/.hunter" PARENT_SCOPE) hunter_gate_status_debug("HUNTER_ROOT set using HOME environment variable") return() @@ -173,8 +171,7 @@ # Check SYSTEMDRIVE and USERPROFILE environment variable (windows only) if(WIN32) - string(COMPARE NOTEQUAL "$ENV{SYSTEMDRIVE}" "" result) - if(result) + if(DEFINED ENV{SYSTEMDRIVE}) set(HUNTER_GATE_ROOT "$ENV{SYSTEMDRIVE}/.hunter" PARENT_SCOPE) hunter_gate_status_debug( "HUNTER_ROOT set using SYSTEMDRIVE environment variable" @@ -182,8 +179,7 @@ return() endif() - string(COMPARE NOTEQUAL "$ENV{USERPROFILE}" "" result) - if(result) + if(DEFINED ENV{USERPROFILE}) set(HUNTER_GATE_ROOT "$ENV{USERPROFILE}/.hunter" PARENT_SCOPE) hunter_gate_status_debug( "HUNTER_ROOT set using USERPROFILE environment variable" @@ -257,7 +253,13 @@ file( WRITE "${cmakelists}" - "cmake_minimum_required(VERSION 3.2)\n" + "cmake_minimum_required(VERSION 3.10)\n" + "if(POLICY CMP0114)\n" + " cmake_policy(SET CMP0114 NEW)\n" + "endif()\n" + "if(POLICY CMP0135)\n" + " cmake_policy(SET CMP0135 NEW)\n" + "endif()\n" "project(HunterDownload LANGUAGES NONE)\n" "include(ExternalProject)\n" "ExternalProject_Add(\n" @@ -517,7 +519,9 @@ hunter_gate_internal_error("${_sha1_location} not found") endif() file(READ "${_sha1_location}" _sha1_value) - string(COMPARE EQUAL "${_sha1_value}" "${HUNTER_GATE_SHA1}" _is_equal) + string(TOLOWER "${_sha1_value}" _sha1_value_lower) + string(TOLOWER "${HUNTER_GATE_SHA1}" _HUNTER_GATE_SHA1_lower) + string(COMPARE EQUAL "${_sha1_value_lower}" "${_HUNTER_GATE_SHA1_lower}" _is_equal) if(NOT _is_equal) hunter_gate_internal_error( "Short SHA1 collision:" @@ -536,4 +540,4 @@ include("${_master_location}") set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES) endif() -endmacro() +endmacro() \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coeurl-v0.3.1/examples/meson.build new/coeurl-v0.3.2/examples/meson.build --- old/coeurl-v0.3.1/examples/meson.build 2024-06-02 21:32:43.000000000 +0200 +++ new/coeurl-v0.3.2/examples/meson.build 2026-02-28 02:03:15.000000000 +0100 @@ -1,3 +1,6 @@ -exe = executable('coeurl_example', ['coeurl.cpp'], - dependencies: coeurl_dep, - install : false) +exe = executable( + 'coeurl_example', + ['coeurl.cpp'], + dependencies: coeurl_dep, + install: false, +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coeurl-v0.3.1/lib/client.cpp new/coeurl-v0.3.2/lib/client.cpp --- old/coeurl-v0.3.1/lib/client.cpp 2024-06-02 21:32:43.000000000 +0200 +++ new/coeurl-v0.3.2/lib/client.cpp 2026-02-28 02:03:15.000000000 +0100 @@ -249,8 +249,10 @@ event_del(&this->add_request_timer); event_del(&this->stop_event); event_del(&this->cancel_requests_timer); - event_base_free(this->evbase); + curl_multi_cleanup(this->multi); + + event_base_free(this->evbase); } void Client::close(bool force) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coeurl-v0.3.1/meson.build new/coeurl-v0.3.2/meson.build --- old/coeurl-v0.3.1/meson.build 2024-06-02 21:32:43.000000000 +0200 +++ new/coeurl-v0.3.2/meson.build 2026-02-28 02:03:15.000000000 +0100 @@ -1,45 +1,86 @@ -project('coeurl', 'cpp', - version : '0.3.1', - license : 'MIT', - meson_version : '>=0.55', - default_options : ['warning_level=3', 'cpp_std=c++17'] - ) +project( + 'coeurl', + 'cpp', + version: '0.3.2', + license: 'MIT', + meson_version: '>=0.55', + default_options: [ + 'warning_level=3', + 'cpp_std=c++17', + 'curl:http=enabled', + 'curl:tool=disabled', + 'curl:tests=disabled', + 'curl:unittests=disabled', + 'curl:dict=disabled', + 'curl:file=disabled', + 'curl:ftp=disabled', + 'curl:gopher=disabled', + 'curl:imap=disabled', + 'curl:ipfs=disabled', + 'curl:ldap=disabled', + 'curl:ldaps=disabled', + 'curl:mqtt=disabled', + 'curl:pop3=disabled', + 'curl:rtmp=disabled', + 'curl:rtsp=disabled', + 'curl:smb=disabled', + 'curl:smtp=disabled', + 'curl:telnet=disabled', + 'curl:tftp=disabled', + ], +) deps = [ dependency('threads', required: true), - dependency('spdlog', required: true) - ] - -libcurl_dep = dependency('libcurl', required: get_option('wrap_mode') == 'nofallback') - -libevent_dep = dependency('libevent_core', required: get_option('wrap_mode') == 'nofallback',) -if target_machine.system() == 'windows' - libevent_threads_dep = dependency('libevent_windows', required: get_option('wrap_mode') == 'nofallback',) -else - libevent_threads_dep = dependency('libevent_pthreads', required: get_option('wrap_mode') == 'nofallback',) -endif - -if (not libevent_dep.found() - or not libevent_threads_dep.found() - or get_option('wrap_mode') == 'forcefallback' - or 'libevent' in get_option('force_fallback_for')) -cmake = import('cmake') -libevent_options = cmake.subproject_options() - libevent_options.add_cmake_defines({ - 'EVENT__LIBRARY_TYPE': 'STATIC', - 'BUILD_SHARED_LIBS': false, - 'BUILD_SHARED_AND_STATIC_LIBS': false, - 'EVENT__DISABLE_OPENSSL': true, - 'EVENT__DISABLE_BENCHMARK': true, - 'EVENT__DISABLE_TESTS': true, - 'EVENT__DISABLE_REGRESS': true, - 'EVENT__DISABLE_SAMPLES': true, - 'EVENT__MSVC_STATIC_RUNTIME': ['mt', 'mtd', 'static_from_buildtype'].contains(get_option('b_vscrt')), - }) + dependency('spdlog', required: true), + dependency('libcurl', required: true), +] + + +libevent_dep = dependency( + 'libevent_core', + required: get_option('wrap_mode') == 'nofallback', +) +if target_machine.system() != 'windows' + libevent_threads_dep = dependency( + 'libevent_pthreads', + required: get_option('wrap_mode') == 'nofallback', + ) +endif + +if ( + not libevent_dep.found() + or not libevent_threads_dep.found() + or get_option( + 'wrap_mode', + ) == 'forcefallback' + or 'libevent' in get_option( + 'force_fallback_for', + ) +) + cmake = import('cmake') + libevent_options = cmake.subproject_options() + libevent_options.add_cmake_defines( + { + 'EVENT__LIBRARY_TYPE': 'STATIC', + 'BUILD_SHARED_LIBS': false, + 'BUILD_SHARED_AND_STATIC_LIBS': false, + 'EVENT__DISABLE_OPENSSL': 'ON', + 'EVENT__DISABLE_BENCHMARK': true, + 'EVENT__DISABLE_TESTS': true, + 'EVENT__DISABLE_REGRESS': true, + 'EVENT__DISABLE_SAMPLES': true, + 'EVENT__MSVC_STATIC_RUNTIME': ['mt', 'mtd', 'static_from_buildtype'].contains( + get_option('b_vscrt'), + ), + }, + ) if target_machine.system() != 'windows' - libevent_options.add_cmake_defines({ - 'CMAKE_C_FLAGS': '-fPIC', - }) + libevent_options.add_cmake_defines( + { + 'CMAKE_C_FLAGS': '-fPIC', + }, + ) endif libevent_options.set_override_option('werror', 'false') libevent_options.set_override_option('warning_level', '0') @@ -47,84 +88,76 @@ libevent_dep = libevent_proj.dependency('event_core_static') if target_machine.system() == 'windows' - # the cmake project links the thread support into the library directly... - libevent_threads_dep = dependency('', required : false) + # the cmake project links the thread support into the library directly... + libevent_threads_dep = dependency('', required: false) else - libevent_threads_dep = libevent_proj.dependency('event_pthreads_static') + libevent_threads_dep = libevent_proj.dependency('event_pthreads_static') endif endif deps += [libevent_dep, libevent_threads_dep] -if (not libcurl_dep.found() - or get_option('wrap_mode') == 'forcefallback' - or 'libcurl' in get_option('force_fallback_for')) -cmake = import('cmake') -libcurl_options = cmake.subproject_options() - libcurl_options.add_cmake_defines({ - 'BUILD_SHARED_LIBS': false, - 'BUILD_SHARED_AND_STATIC_LIBS': false, - 'HTTP_ONLY': true, - 'CMAKE_USE_LIBSSH2': false, - }) - if target_machine.system() != 'windows' - libcurl_options.add_cmake_defines({ - 'CMAKE_C_FLAGS': '-fPIC', - }) - endif - libcurl_options.set_override_option('werror', 'false') - libcurl_options.set_override_option('warning_level', '0') - libcurl_proj = cmake.subproject('curl', options: libcurl_options) - libcurl_dep = libcurl_proj.dependency('libcurl') -endif - -deps += [libcurl_dep] include = include_directories('include') defines = [] if target_machine.system() == 'windows' - defines += ['-DNOMINMAX', '-DWIN32_LEAN_AND_MEAN'] + defines += ['-DNOMINMAX', '-DWIN32_LEAN_AND_MEAN'] endif if target_machine.system() == 'windows' - cc = meson.get_compiler('c') - deps += [ - cc.find_library('ws2_32', required: true), # socket functions - cc.find_library('iphlpapi', required: true) # if_nametoindex needed for libevent - ] + cc = meson.get_compiler('c') + deps += [ + cc.find_library('ws2_32', required: true), # socket functions + cc.find_library('iphlpapi', required: true), # if_nametoindex needed for libevent + ] endif version_parts = meson.project_version().split('.') soversion = version_parts.get(0) + '.' + version_parts.get(1) -lib = library('coeurl', ['lib/client.cpp', 'lib/request.cpp', 'lib/errors.cpp'], - include_directories: include, - cpp_args : defines, - dependencies: deps, - #version: meson.project_version(), - soversion: soversion, - install : true) - -install_headers('include/coeurl/headers.hpp', 'include/coeurl/client.hpp', 'include/coeurl/request.hpp', 'include/coeurl/errors.hpp', subdir : 'coeurl') - -coeurl_dep = declare_dependency(include_directories: include, link_with: lib, dependencies: deps) +lib = library( + 'coeurl', + ['lib/client.cpp', 'lib/request.cpp', 'lib/errors.cpp'], + include_directories: include, + cpp_args: defines, + dependencies: deps, + #version: meson.project_version(), + soversion: soversion, + install: true, +) + +install_headers( + 'include/coeurl/headers.hpp', + 'include/coeurl/client.hpp', + 'include/coeurl/request.hpp', + 'include/coeurl/errors.hpp', + subdir: 'coeurl', +) + +coeurl_dep = declare_dependency( + include_directories: include, + link_with: lib, + dependencies: deps, +) meson.override_dependency('coeurl', coeurl_dep) if get_option('examples') - subdir('examples') + subdir('examples') endif if get_option('tests') - subdir('tests') + subdir('tests') endif pkg = import('pkgconfig') -pkg.generate(lib, - libraries : [lib], - version : meson.project_version(), - filebase : meson.project_name(), - description : 'Simple library to do http requests asynchronously via CURL in C++.', - url : 'https://nheko.im/nheko-reborn/coeurl') +pkg.generate( + lib, + libraries: [lib], + version: meson.project_version(), + filebase: meson.project_name(), + description: 'Simple library to do http requests asynchronously via CURL in C++.', + url: 'https://nheko.im/nheko-reborn/coeurl', +) # No idea how to export working cmake config files, so don't do that for now #cmake = import('cmake') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coeurl-v0.3.1/subprojects/curl.wrap new/coeurl-v0.3.2/subprojects/curl.wrap --- old/coeurl-v0.3.1/subprojects/curl.wrap 2024-06-02 21:32:43.000000000 +0200 +++ new/coeurl-v0.3.2/subprojects/curl.wrap 2026-02-28 02:03:15.000000000 +0100 @@ -1,6 +1,13 @@ [wrap-file] -directory = curl-7.77.0 +directory = curl-8.12.1 +source_url = https://github.com/curl/curl/releases/download/curl-8_12_1/curl-8.12.1.tar.xz +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/curl_8.12.1-1/curl-8.12.1.tar.xz +source_filename = curl-8.12.1.tar.xz +source_hash = 0341f1ed97a26c811abaebd37d62b833956792b7607ea3f15d001613c76de202 +patch_filename = curl_8.12.1-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/curl_8.12.1-1/get_patch +patch_hash = e7e5c517773997d7801046ed95a500a7ad16fc42c5f47fb9cc7377d796ee750b +wrapdb_version = 8.12.1-1 -source_url = https://github.com/curl/curl/releases/download/curl-7_77_0/curl-7.77.0.tar.xz -source_filename = curl-7.77.0.tar.xz -source_hash = 0f64582c54282f31c0de9f0a1a596b182776bd4df9a4c4a2a41bbeb54f62594b +[provide] +dependency_names = libcurl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coeurl-v0.3.1/subprojects/fmt.wrap new/coeurl-v0.3.2/subprojects/fmt.wrap --- old/coeurl-v0.3.1/subprojects/fmt.wrap 1970-01-01 01:00:00.000000000 +0100 +++ new/coeurl-v0.3.2/subprojects/fmt.wrap 2026-02-28 02:03:15.000000000 +0100 @@ -0,0 +1,13 @@ +[wrap-file] +directory = fmt-12.0.0 +source_url = https://github.com/fmtlib/fmt/archive/12.0.0.tar.gz +source_filename = fmt-12.0.0.tar.gz +source_hash = aa3e8fbb6a0066c03454434add1f1fc23299e85758ceec0d7d2d974431481e40 +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/fmt_12.0.0-1/fmt-12.0.0.tar.gz +patch_filename = fmt_12.0.0-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/fmt_12.0.0-1/get_patch +patch_hash = 307f288ebf3850abf2f0c50ac1fb07de97df9538d39146d802f3c0d6cada8998 +wrapdb_version = 12.0.0-1 + +[provide] +dependency_names = fmt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coeurl-v0.3.1/subprojects/libevent.wrap new/coeurl-v0.3.2/subprojects/libevent.wrap --- old/coeurl-v0.3.1/subprojects/libevent.wrap 2024-06-02 21:32:43.000000000 +0200 +++ new/coeurl-v0.3.2/subprojects/libevent.wrap 2026-02-28 02:03:15.000000000 +0100 @@ -1,7 +1,7 @@ [wrap-file] -directory = libevent-2.1.12-stable +directory = libevent-a994a52d5373d6284b27576efa617aff2baa7bd3 -source_url = https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz -source_filename = libevent-2.1.12-stable.tar.gz -source_hash = 92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb +source_url = https://github.com/hunter-packages/libevent/archive/a994a52d5373d6284b27576efa617aff2baa7bd3.tar.gz +source_filename = libevent-2.2.0-a994a52d5373d6284b27576efa617aff2baa7bd3.tar.gz +source_hash = 114d2e4f030539b154ef0e7d2398c0ad40d0ba484a74833aac9486cc4088da13 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coeurl-v0.3.1/subprojects/spdlog.wrap new/coeurl-v0.3.2/subprojects/spdlog.wrap --- old/coeurl-v0.3.1/subprojects/spdlog.wrap 2024-06-02 21:32:43.000000000 +0200 +++ new/coeurl-v0.3.2/subprojects/spdlog.wrap 2026-02-28 02:03:15.000000000 +0100 @@ -1,13 +1,14 @@ [wrap-file] -directory = spdlog-1.14.1 -source_url = https://github.com/gabime/spdlog/archive/refs/tags/v1.14.1.tar.gz -source_filename = spdlog-1.14.1.tar.gz -source_hash = 1586508029a7d0670dfcb2d97575dcdc242d3868a259742b69f100801ab4e16b -patch_filename = spdlog_1.14.1-1_patch.zip -patch_url = https://wrapdb.mesonbuild.com/v2/spdlog_1.14.1-1/get_patch -patch_hash = ae878e732330ea1048f90d7e117c40c0cd2a6fb8ae5492c7955818ce3aaade6c -source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/spdlog_1.14.1-1/spdlog-1.14.1.tar.gz -wrapdb_version = 1.14.1-1 +directory = spdlog-1.17.0 +source_url = https://github.com/gabime/spdlog/archive/refs/tags/v1.17.0.tar.gz +source_filename = spdlog-1.17.0.tar.gz +source_hash = d8862955c6d74e5846b3f580b1605d2428b11d97a410d86e2fb13e857cd3a744 +source_fallback_url = https://wrapdb.mesonbuild.com/v2/spdlog_1.17.0-1/get_source/spdlog-1.17.0.tar.gz +patch_filename = spdlog_1.17.0-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/spdlog_1.17.0-1/get_patch +patch_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/spdlog_1.17.0-1/spdlog_1.17.0-1_patch.zip +patch_hash = 295bcca990facdca84256b60aaa86ba2e2320895cad30bee997d7a463a30b40c +wrapdb_version = 1.17.0-1 [provide] -spdlog = spdlog_dep +dependency_names = spdlog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coeurl-v0.3.1/tests/CMakeLists.txt new/coeurl-v0.3.2/tests/CMakeLists.txt --- old/coeurl-v0.3.1/tests/CMakeLists.txt 2024-06-02 21:32:43.000000000 +0200 +++ new/coeurl-v0.3.2/tests/CMakeLists.txt 2026-02-28 02:03:15.000000000 +0100 @@ -15,8 +15,9 @@ option(HUNTER_ENABLED "Enable Hunter package manager" OFF) include("../cmake/HunterGate.cmake") HunterGate( - URL "https://github.com/cpp-pm/hunter/archive/v0.24.8.tar.gz" - SHA1 "ca7838dded9a1811b04ffd56175f629e0af82d3d" + URL "https://github.com/cpp-pm/hunter/archive/v0.26.6.tar.gz" + SHA1 "e70c29f878f5d5f5cdf1b9ccd628fb872e8624a8" + LOCAL ) project(coeurl-cmake-buildtest) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coeurl-v0.3.1/tests/cmake/Hunter/config.cmake new/coeurl-v0.3.2/tests/cmake/Hunter/config.cmake --- old/coeurl-v0.3.1/tests/cmake/Hunter/config.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/coeurl-v0.3.2/tests/cmake/Hunter/config.cmake 2026-02-28 02:03:15.000000000 +0100 @@ -0,0 +1,94 @@ +hunter_config( + nlohmann_json + VERSION 3.11.2 + CMAKE_ARGS JSON_MultipleHeaders=ON +) + +if (WIN32) + hunter_config( + CURL + VERSION "8.18.0" + URL "https://github.com/curl/curl/releases/download/curl-8_18_0/curl-8.18.0.tar.gz" + SHA1 1a13070ccd2c5fe1d47cb34dd56138f69708f3f9 + CMAKE_ARGS + BUILD_CURL_TESTS=OFF + BUILD_CURL_EXE=OFF + CURL_USE_SCHANNEL=ON + CURL_USE_OPENSSL=OFF + CURL_USE_LIBSSH2=OFF + CURL_USE_LIBPSL=OFF + CURL_DISABLE_FTP=ON + CURL_DISABLE_FTP=ON + CURL_DISABLE_FILE=ON + CURL_DISABLE_TELNET=ON + CURL_DISABLE_LDAP=ON + CURL_DISABLE_DICT=ON + CURL_DISABLE_TFTP=ON + CURL_DISABLE_GOPHER=ON + CURL_DISABLE_POP3=ON + CURL_DISABLE_IMAP=ON + CURL_DISABLE_SMB=ON + CURL_DISABLE_SMTP=ON + CURL_DISABLE_RTSP=ON + CURL_USE_LIBRTMP=OFF + CURL_DISABLE_MQTT=ON + BUILD_TESTING=OFF + ) +else() + hunter_config( + CURL + VERSION "8.18.0" + URL "https://github.com/curl/curl/releases/download/curl-8_18_0/curl-8.18.0.tar.gz" + SHA1 1a13070ccd2c5fe1d47cb34dd56138f69708f3f9 + CMAKE_ARGS + BUILD_CURL_TESTS=OFF + BUILD_CURL_EXE=OFF + CURL_USE_SCHANNEL=OFF + CURL_USE_OPENSSL=ON + CURL_USE_LIBSSH2=OFF + CURL_USE_LIBPSL=OFF + CURL_DISABLE_FTP=ON + CURL_DISABLE_FTP=ON + CURL_DISABLE_FILE=ON + CURL_DISABLE_TELNET=ON + CURL_DISABLE_LDAP=ON + CURL_DISABLE_DICT=ON + CURL_DISABLE_TFTP=ON + CURL_DISABLE_GOPHER=ON + CURL_DISABLE_POP3=ON + CURL_DISABLE_IMAP=ON + CURL_DISABLE_SMB=ON + CURL_DISABLE_SMTP=ON + CURL_DISABLE_RTSP=ON + CURL_USE_LIBRTMP=OFF + CURL_DISABLE_MQTT=ON + BUILD_TESTING=OFF + ) +endif() + +hunter_config(ZLIB + URL "https://codeload.github.com/madler/zlib/zip/tags/v1.3.2" + VERSION "1.3.2-chromium" + SHA1 "40b515519dceca271d77e97c680ab4871f3a8556" + CMAKE_ARGS + ZLIB_BUILD_TESTING=OFF + ZLIB_BUILD_SHARED=ON + ZLIB_BUILD_STATIC=ON + ZLIB_BUILD_MINIZIP=OFF + ZLIB_INSTALL=ON + ZLIB_PREFIX=OFF +) + +hunter_config( + Libevent + VERSION "2.2.0-a994a52d5373d6284b27576efa617aff2baa7bd3" + URL "https://github.com/hunter-packages/libevent/archive/a994a52d5373d6284b27576efa617aff2baa7bd3.tar.gz" + SHA1 "a6f87f2b76465ccc1e5d75024475aae7d4c766a4" + CMAKE_ARGS + EVENT__DISABLE_TESTS=ON + EVENT__DISABLE_SAMPLES=ON + EVENT__DISABLE_REGRESS=ON + EVENT__DISABLE_BENCHMARK=ON + CMAKE_POLICY_VERSION_MINIMUM=3.20 + CMAKE_C_BYTE_ORDER=LITTLE_ENDIAN +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/coeurl-v0.3.1/tests/meson.build new/coeurl-v0.3.2/tests/meson.build --- old/coeurl-v0.3.1/tests/meson.build 2024-06-02 21:32:43.000000000 +0200 +++ new/coeurl-v0.3.2/tests/meson.build 2026-02-28 02:03:15.000000000 +0100 @@ -1,16 +1,22 @@ -doctest_dep = dependency('doctest', fallback : ['onqtam-doctest', 'doctest_dep']) +doctest_dep = dependency('doctest', fallback: ['onqtam-doctest', 'doctest_dep']) -requests = executable('requests', ['requests.cpp'], - cpp_args : '-DDOCTEST_CONFIG_IMPLEMENT_WITH_MAIN', - dependencies: [coeurl_dep, doctest_dep], - install : false) +requests = executable( + 'requests', + ['requests.cpp'], + cpp_args: '-DDOCTEST_CONFIG_IMPLEMENT_WITH_MAIN', + dependencies: [coeurl_dep, doctest_dep], + install: false, +) test('requests', requests) -requests_tls = executable('requests_tls', ['requests_tls.cpp'], - cpp_args : '-DDOCTEST_CONFIG_IMPLEMENT_WITH_MAIN', - dependencies: [coeurl_dep, doctest_dep], - install : false) +requests_tls = executable( + 'requests_tls', + ['requests_tls.cpp'], + cpp_args: '-DDOCTEST_CONFIG_IMPLEMENT_WITH_MAIN', + dependencies: [coeurl_dep, doctest_dep], + install: false, +) test('requests_tls', requests_tls)
