quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

commit d73941e871260f40ed2b6b67b93097e5276a8a10
parent f8b8ff713359dd017b07aec7c28a13314dd60377
Author: Iván Ávalos <avalos@disroot.org>
Date:   Tue, 19 Aug 2025 21:07:02 +0200

add missing curl files

Diffstat:
Asubprojects/curl/CMake/FindCares.cmake | 97+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asubprojects/curl/CMake/FindLibpsl.cmake | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asubprojects/curl/CMake/FindLibssh2.cmake | 83+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Asubprojects/curl/CMake/FindQuiche.cmake | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 334 insertions(+), 0 deletions(-)

diff --git a/subprojects/curl/CMake/FindCares.cmake b/subprojects/curl/CMake/FindCares.cmake @@ -0,0 +1,97 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +# SPDX-License-Identifier: curl +# +########################################################################### +# Find the c-ares library +# +# Input variables: +# +# - `CARES_INCLUDE_DIR`: The c-ares include directory. +# - `CARES_LIBRARY`: Path to `cares` library. +# +# Result variables: +# +# - `CARES_FOUND`: System has c-ares. +# - `CARES_INCLUDE_DIRS`: The c-ares include directories. +# - `CARES_LIBRARIES`: The c-ares library names. +# - `CARES_LIBRARY_DIRS`: The c-ares library directories. +# - `CARES_PC_REQUIRES`: The c-ares pkg-config packages. +# - `CARES_CFLAGS`: Required compiler flags. +# - `CARES_VERSION`: Version of c-ares. + +set(CARES_PC_REQUIRES "libcares") + +if(CURL_USE_PKGCONFIG AND + NOT DEFINED CARES_INCLUDE_DIR AND + NOT DEFINED CARES_LIBRARY) + find_package(PkgConfig QUIET) + pkg_check_modules(CARES ${CARES_PC_REQUIRES}) +endif() + +if(CARES_FOUND) + set(Cares_FOUND TRUE) + string(REPLACE ";" " " CARES_CFLAGS "${CARES_CFLAGS}") + message(STATUS "Found Cares (via pkg-config): ${CARES_INCLUDE_DIRS} (found version \"${CARES_VERSION}\")") +else() + find_path(CARES_INCLUDE_DIR NAMES "ares.h") + find_library(CARES_LIBRARY NAMES ${CARES_NAMES} "cares") + + unset(CARES_VERSION CACHE) + if(CARES_INCLUDE_DIR AND EXISTS "${CARES_INCLUDE_DIR}/ares_version.h") + set(_version_regex1 "#[\t ]*define[\t ]+ARES_VERSION_MAJOR[\t ]+([0-9]+).*") + set(_version_regex2 "#[\t ]*define[\t ]+ARES_VERSION_MINOR[\t ]+([0-9]+).*") + set(_version_regex3 "#[\t ]*define[\t ]+ARES_VERSION_PATCH[\t ]+([0-9]+).*") + file(STRINGS "${CARES_INCLUDE_DIR}/ares_version.h" _version_str1 REGEX "${_version_regex1}") + file(STRINGS "${CARES_INCLUDE_DIR}/ares_version.h" _version_str2 REGEX "${_version_regex2}") + file(STRINGS "${CARES_INCLUDE_DIR}/ares_version.h" _version_str3 REGEX "${_version_regex3}") + string(REGEX REPLACE "${_version_regex1}" "\\1" _version_str1 "${_version_str1}") + string(REGEX REPLACE "${_version_regex2}" "\\1" _version_str2 "${_version_str2}") + string(REGEX REPLACE "${_version_regex3}" "\\1" _version_str3 "${_version_str3}") + set(CARES_VERSION "${_version_str1}.${_version_str2}.${_version_str3}") + unset(_version_regex1) + unset(_version_regex2) + unset(_version_regex3) + unset(_version_str1) + unset(_version_str2) + unset(_version_str3) + endif() + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Cares + REQUIRED_VARS + CARES_INCLUDE_DIR + CARES_LIBRARY + VERSION_VAR + CARES_VERSION + ) + + if(CARES_FOUND) + set(CARES_INCLUDE_DIRS ${CARES_INCLUDE_DIR}) + set(CARES_LIBRARIES ${CARES_LIBRARY}) + endif() + + mark_as_advanced(CARES_INCLUDE_DIR CARES_LIBRARY) +endif() + +if(CARES_FOUND AND WIN32) + list(APPEND CARES_LIBRARIES "iphlpapi") # for if_indextoname and others +endif() diff --git a/subprojects/curl/CMake/FindLibpsl.cmake b/subprojects/curl/CMake/FindLibpsl.cmake @@ -0,0 +1,83 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +# SPDX-License-Identifier: curl +# +########################################################################### +# Find the libpsl library +# +# Input variables: +# +# - `LIBPSL_INCLUDE_DIR`: The libpsl include directory. +# - `LIBPSL_LIBRARY`: Path to `libpsl` library. +# +# Result variables: +# +# - `LIBPSL_FOUND`: System has libpsl. +# - `LIBPSL_INCLUDE_DIRS`: The libpsl include directories. +# - `LIBPSL_LIBRARIES`: The libpsl library names. +# - `LIBPSL_LIBRARY_DIRS`: The libpsl library directories. +# - `LIBPSL_PC_REQUIRES`: The libpsl pkg-config packages. +# - `LIBPSL_CFLAGS`: Required compiler flags. +# - `LIBPSL_VERSION`: Version of libpsl. + +set(LIBPSL_PC_REQUIRES "libpsl") + +if(CURL_USE_PKGCONFIG AND + NOT DEFINED LIBPSL_INCLUDE_DIR AND + NOT DEFINED LIBPSL_LIBRARY) + find_package(PkgConfig QUIET) + pkg_check_modules(LIBPSL ${LIBPSL_PC_REQUIRES}) +endif() + +if(LIBPSL_FOUND AND LIBPSL_INCLUDE_DIRS) + set(Libpsl_FOUND TRUE) + string(REPLACE ";" " " LIBPSL_CFLAGS "${LIBPSL_CFLAGS}") + message(STATUS "Found Libpsl (via pkg-config): ${LIBPSL_INCLUDE_DIRS} (found version \"${LIBPSL_VERSION}\")") +else() + find_path(LIBPSL_INCLUDE_DIR NAMES "libpsl.h") + find_library(LIBPSL_LIBRARY NAMES "psl" "libpsl") + + unset(LIBPSL_VERSION CACHE) + if(LIBPSL_INCLUDE_DIR AND EXISTS "${LIBPSL_INCLUDE_DIR}/libpsl.h") + set(_version_regex "#[\t ]*define[\t ]+PSL_VERSION[\t ]+\"([^\"]*)\"") + file(STRINGS "${LIBPSL_INCLUDE_DIR}/libpsl.h" _version_str REGEX "${_version_regex}") + string(REGEX REPLACE "${_version_regex}" "\\1" _version_str "${_version_str}") + set(LIBPSL_VERSION "${_version_str}") + unset(_version_regex) + unset(_version_str) + endif() + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Libpsl + REQUIRED_VARS + LIBPSL_INCLUDE_DIR + LIBPSL_LIBRARY + VERSION_VAR + LIBPSL_VERSION + ) + + if(LIBPSL_FOUND) + set(LIBPSL_INCLUDE_DIRS ${LIBPSL_INCLUDE_DIR}) + set(LIBPSL_LIBRARIES ${LIBPSL_LIBRARY}) + endif() + + mark_as_advanced(LIBPSL_INCLUDE_DIR LIBPSL_LIBRARY) +endif() diff --git a/subprojects/curl/CMake/FindLibssh2.cmake b/subprojects/curl/CMake/FindLibssh2.cmake @@ -0,0 +1,83 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +# SPDX-License-Identifier: curl +# +########################################################################### +# Find the libssh2 library +# +# Input variables: +# +# - `LIBSSH2_INCLUDE_DIR`: The libssh2 include directory. +# - `LIBSSH2_LIBRARY`: Path to `libssh2` library. +# +# Result variables: +# +# - `LIBSSH2_FOUND`: System has libssh2. +# - `LIBSSH2_INCLUDE_DIRS`: The libssh2 include directories. +# - `LIBSSH2_LIBRARIES`: The libssh2 library names. +# - `LIBSSH2_LIBRARY_DIRS`: The libssh2 library directories. +# - `LIBSSH2_PC_REQUIRES`: The libssh2 pkg-config packages. +# - `LIBSSH2_CFLAGS`: Required compiler flags. +# - `LIBSSH2_VERSION`: Version of libssh2. + +set(LIBSSH2_PC_REQUIRES "libssh2") + +if(CURL_USE_PKGCONFIG AND + NOT DEFINED LIBSSH2_INCLUDE_DIR AND + NOT DEFINED LIBSSH2_LIBRARY) + find_package(PkgConfig QUIET) + pkg_check_modules(LIBSSH2 ${LIBSSH2_PC_REQUIRES}) +endif() + +if(LIBSSH2_FOUND AND LIBSSH2_INCLUDE_DIRS) + set(Libssh2_FOUND TRUE) + string(REPLACE ";" " " LIBSSH2_CFLAGS "${LIBSSH2_CFLAGS}") + message(STATUS "Found Libssh2 (via pkg-config): ${LIBSSH2_INCLUDE_DIRS} (found version \"${LIBSSH2_VERSION}\")") +else() + find_path(LIBSSH2_INCLUDE_DIR NAMES "libssh2.h") + find_library(LIBSSH2_LIBRARY NAMES "ssh2" "libssh2") + + unset(LIBSSH2_VERSION CACHE) + if(LIBSSH2_INCLUDE_DIR AND EXISTS "${LIBSSH2_INCLUDE_DIR}/libssh2.h") + set(_version_regex "#[\t ]*define[\t ]+LIBSSH2_VERSION[\t ]+\"([^\"]*)\"") + file(STRINGS "${LIBSSH2_INCLUDE_DIR}/libssh2.h" _version_str REGEX "${_version_regex}") + string(REGEX REPLACE "${_version_regex}" "\\1" _version_str "${_version_str}") + set(LIBSSH2_VERSION "${_version_str}") + unset(_version_regex) + unset(_version_str) + endif() + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Libssh2 + REQUIRED_VARS + LIBSSH2_INCLUDE_DIR + LIBSSH2_LIBRARY + VERSION_VAR + LIBSSH2_VERSION + ) + + if(LIBSSH2_FOUND) + set(LIBSSH2_INCLUDE_DIRS ${LIBSSH2_INCLUDE_DIR}) + set(LIBSSH2_LIBRARIES ${LIBSSH2_LIBRARY}) + endif() + + mark_as_advanced(LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY) +endif() diff --git a/subprojects/curl/CMake/FindQuiche.cmake b/subprojects/curl/CMake/FindQuiche.cmake @@ -0,0 +1,71 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +# SPDX-License-Identifier: curl +# +########################################################################### +# Find the quiche library +# +# Input variables: +# +# - `QUICHE_INCLUDE_DIR`: The quiche include directory. +# - `QUICHE_LIBRARY`: Path to `quiche` library. +# +# Result variables: +# +# - `QUICHE_FOUND`: System has quiche. +# - `QUICHE_INCLUDE_DIRS`: The quiche include directories. +# - `QUICHE_LIBRARIES`: The quiche library names. +# - `QUICHE_LIBRARY_DIRS`: The quiche library directories. +# - `QUICHE_PC_REQUIRES`: The quiche pkg-config packages. +# - `QUICHE_CFLAGS`: Required compiler flags. +# - `QUICHE_VERSION`: Version of quiche. + +set(QUICHE_PC_REQUIRES "quiche") + +if(CURL_USE_PKGCONFIG AND + NOT DEFINED QUICHE_INCLUDE_DIR AND + NOT DEFINED QUICHE_LIBRARY) + find_package(PkgConfig QUIET) + pkg_check_modules(QUICHE ${QUICHE_PC_REQUIRES}) +endif() + +if(QUICHE_FOUND) + set(Quiche_FOUND TRUE) + string(REPLACE ";" " " QUICHE_CFLAGS "${QUICHE_CFLAGS}") + message(STATUS "Found Quiche (via pkg-config): ${QUICHE_INCLUDE_DIRS} (found version \"${QUICHE_VERSION}\")") +else() + find_path(QUICHE_INCLUDE_DIR NAMES "quiche.h") + find_library(QUICHE_LIBRARY NAMES "quiche") + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Quiche + REQUIRED_VARS + QUICHE_INCLUDE_DIR + QUICHE_LIBRARY + ) + + if(QUICHE_FOUND) + set(QUICHE_INCLUDE_DIRS ${QUICHE_INCLUDE_DIR}) + set(QUICHE_LIBRARIES ${QUICHE_LIBRARY}) + endif() + + mark_as_advanced(QUICHE_INCLUDE_DIR QUICHE_LIBRARY) +endif()