Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,7 @@
"libcurl"
],
"versions": [
"8.12.1-2",
"8.12.1-1",
"8.10.1-1",
"8.10.0-1",
Expand Down
2 changes: 1 addition & 1 deletion subprojects/packagefiles/curl/lib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ pkg.generate(
extra_cflags: public_args,
name: 'libcurl',
unescaped_variables: (
# NOTE: variables with empty values are not allowed…
# NOTE: variables with empty values are not allowed…
(enabled_features.length() > 0 ? {
'supported_features': ' '.join(enabled_features),
} : {}) + (enabled_protocols.length() > 0 ? {
Expand Down
149 changes: 83 additions & 66 deletions subprojects/packagefiles/curl/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
'curl',
'c',
version: '8.12.1',
license: 'curl',
meson_version: '>=0.60.0',

Check failure on line 8 in subprojects/packagefiles/curl/meson.build

View workflow job for this annotation

GitHub Actions / Ubuntu (x86_64)

Minimum Meson version

Could not verify minimum Meson version
)

fs = import('fs')
Expand Down Expand Up @@ -256,9 +257,11 @@
endif
foreach _symbol : _symlist
_flag = 'HAVE_' + _symbol.underscorify().to_upper()
_available = (cdata.get(_flag, false)
or (_has_header and cc.has_header_symbol(_header, _symbol))
)
_available = (
cdata.get(_flag, false)
or (_has_header
and cc.has_header_symbol(_header, _symbol))
)
cdata.set(_flag, _available)
endforeach
endforeach
Expand All @@ -282,16 +285,16 @@
cdata.set('HAVE_LONGLONG', cc.has_type('long long'))

foreach _type, _prefix : {
'int' : check_prefix['stdinc'],
'short' : check_prefix['stdinc'],
'long' : check_prefix['stdinc'],
'long double' : check_prefix['stdinc'],
'__int64' : check_prefix['stdinc'],
'off_t' : check_prefix['stdinc'],
'size_t' : check_prefix['stdinc'],
'ssize_t' : check_prefix['stdinc'],
'time_t' : check_prefix['stdinc'],
'curl_off_t' : '#include"curl/system.h"',
'int': check_prefix['stdinc'],
'short': check_prefix['stdinc'],
'long': check_prefix['stdinc'],
'long double': check_prefix['stdinc'],
'__int64': check_prefix['stdinc'],
'off_t': check_prefix['stdinc'],
'size_t': check_prefix['stdinc'],
'ssize_t': check_prefix['stdinc'],
'time_t': check_prefix['stdinc'],
'curl_off_t': '#include"curl/system.h"',
'curl_socket_t': '#include"curl/curl.h"',
}
cdata.set(
Expand Down Expand Up @@ -355,11 +358,12 @@

# Windows. {{{

use_win32_crypto = (host_machine.system() == 'windows'
use_win32_crypto = (
host_machine.system() == 'windows'
and cc.has_header_symbol(
'wincrypt.h',
'CryptAcquireContext',
prefix: '#include<windows.h>',
'wincrypt.h',
'CryptAcquireContext',
prefix: '#include<windows.h>',
)
)

Expand All @@ -384,15 +388,17 @@
foreach _resolver : get_option('asynchdns-resolver')
if _resolver == 'pthread'
# Posix threaded resolver.
_dep = (asynchdns_opt.allowed()
and cdata.get('HAVE_PTHREAD_H') ? threads_dep : disabler()
)
_dep = (
asynchdns_opt.allowed()
and cdata.get('HAVE_PTHREAD_H') ? threads_dep : disabler()
)
_flag = 'USE_THREADS_POSIX'
elif _resolver == 'win32'
# Win32 threaded resolver.
_dep = (asynchdns_opt.allowed()
and host_machine.system() == 'windows' ? threads_dep : disabler()
)
_dep = (
asynchdns_opt.allowed()
and host_machine.system() == 'windows' ? threads_dep : disabler()
)
_flag = 'USE_THREADS_WIN32'
elif _resolver == 'ares'
# Library: c-ares.
Expand Down Expand Up @@ -458,10 +464,10 @@
# Large file. {{{

cdata.set('USE_WIN32_LARGE_FILES', host_machine.system() == 'windows')
largefile_opt = (cdata.get('USE_WIN32_LARGE_FILES')
largefile_opt = (
cdata.get('USE_WIN32_LARGE_FILES')
or (cdata.get('SIZEOF_CURL_OFF_T') > 4
and cdata.get('SIZEOF_OFF_T') > 4)
? ENABLED_OPT : DISABLED_OPT
and cdata.get('SIZEOF_OFF_T') > 4) ? ENABLED_OPT : DISABLED_OPT
)

# }}}
Expand Down Expand Up @@ -784,12 +790,13 @@
)
_flag = 'OPENLDAP'
elif _provider == 'win32'
_dep = (host_machine.system() == 'windows' ? cc.find_library(
'wldap32',
has_headers: 'winldap.h',
required: _required,
) : disabler()
)
_dep = (
host_machine.system() == 'windows' ? cc.find_library(
'wldap32',
has_headers: 'winldap.h',
required: _required,
) : disabler()
)
_flag = 'WIN32_LDAP'
else
error('invalid LDAP provider: ' + _provider)
Expand Down Expand Up @@ -929,12 +936,13 @@
endif
elif _provider == 'winidn'
# Windows IDN.
_dep = (host_vista_or_newer ? cc.find_library(
'normaliz',
disabler: true,
required: _required,
) : disabler()
)
_dep = (
host_vista_or_newer ? cc.find_library(
'normaliz',
disabler: true,
required: _required,
) : disabler()
)
if cc.has_function(
'IdnToUnicode',
dependencies: _dep,
Expand Down Expand Up @@ -1076,15 +1084,16 @@
endforeach
endif

threadsafe_opt = (host_vista_or_newer
or cdata.get('HAVE_STDATOMIC_H')
? ENABLED_OPT : DISABLED_OPT
threadsafe_opt = (
host_vista_or_newer
or cdata.get('HAVE_STDATOMIC_H') ? ENABLED_OPT : DISABLED_OPT
)

_have_clock_gettime = (cdata.get('HAVE_CLOCK_GETTIME')
_have_clock_gettime = (
cdata.get('HAVE_CLOCK_GETTIME')
and cc.has_function(
'clock_gettime',
dependencies: sys_deps,
'clock_gettime',
dependencies: sys_deps,
)
)
cdata.set(
Expand Down Expand Up @@ -1313,9 +1322,10 @@
_required = cdata.get('HAVE_GETHOSTNAME') ? true : disabler()
foreach _arg1 : ['char *', 'unsigned char *', 'void *']
foreach _arg2 : ['int', 'unsigned int', 'size_t']
if (_required
and cc.compiles(
_source_epilogue + '''
if (
_required
and cc.compiles(
_source_epilogue + '''
#ifdef HAVE_WINDOWS_H
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
Expand Down Expand Up @@ -1345,10 +1355,10 @@
return 0;
}
'''.format(_arg1, _arg2),
args: check_args,
name: 'gethostname(@0@, @1@)'.format(_arg1, _arg2),
)
)
args: check_args,
name: 'gethostname(@0@, @1@)'.format(_arg1, _arg2),
)
)
cdata.set('GETHOSTNAME_TYPE_ARG2', _arg2)
_required = disabler()
endif
Expand Down Expand Up @@ -1406,7 +1416,8 @@
# Compile flags. {{{

# Symbols visibility.
if (cc.has_argument('-fvisibility=hidden')
if (
cc.has_argument('-fvisibility=hidden')
and cc.has_function_attribute('visibility:default')
)
cdata.set('CURL_EXTERN_SYMBOL', '__attribute__ ((__visibility__ ("default")))')
Expand Down Expand Up @@ -1526,14 +1537,16 @@

# Features. {{{

kerberos_opt = (kerberos_auth_opt.allowed()
and (gss_api_opt.allowed() or sspi_opt.allowed())
? ENABLED_OPT : DISABLED_OPT
kerberos_opt = (
kerberos_auth_opt.allowed()
and (gss_api_opt.allowed()
or sspi_opt.allowed()) ? ENABLED_OPT : DISABLED_OPT
)

spnego_opt = (negotiate_auth_opt.allowed()
and (gss_api_opt.allowed() or sspi_opt.allowed())
? ENABLED_OPT : DISABLED_OPT
spnego_opt = (
negotiate_auth_opt.allowed()
and (gss_api_opt.allowed()
or sspi_opt.allowed()) ? ENABLED_OPT : DISABLED_OPT
)

# `CURL_DISABLE_ALTSVC` is used instead of `CURL_DISABLE_ALT_SVC`…
Expand Down Expand Up @@ -1675,10 +1688,11 @@
# Sanitize boolean flags.
_boolkeys = ['STDC_HEADERS']
foreach _key : cdata.keys()
if (_key.startswith('CURL_DISABLE_')
or _key.endswith('_ENABLED')
or _key.split('_')[0] in ['ENABLE', 'HAVE', 'NEED', 'USE']
)
if (
_key.startswith('CURL_DISABLE_')
or _key.endswith('_ENABLED')
or _key.split('_')[0] in ['ENABLE', 'HAVE', 'NEED', 'USE']
)
_boolkeys += _key
endif
endforeach
Expand Down Expand Up @@ -1748,8 +1762,11 @@
cdata.set('SUPPORT_PROTOCOLS', ' '.join(enabled_protocols))
cdata.set('SSL_BACKENDS', ' '.join(enabled_ssl_backends))

curl_config_cdata = configuration_data()
curl_config_cdata.merge_from(cdata)
curl_config_cdata.set('CURL_CA_BUNDLE', ca_bundle)
curl_config_script = configure_file(
configuration: cdata,
configuration: curl_config_cdata,
input: 'curl-config.in',
output: 'curl-config',
install: true,
Expand Down Expand Up @@ -1878,8 +1895,8 @@

summary(
{
'Path' : cdata.get('CURL_CA_PATH'),
'Bundle' : cdata.get('CURL_CA_BUNDLE'),
'Path': cdata.get('CURL_CA_PATH'),
'Bundle': cdata.get('CURL_CA_BUNDLE'),
'Fallback': cdata.get('CURL_CA_FALLBACK'),
},
bool_yn: true,
Expand All @@ -1889,7 +1906,7 @@
if get_option('debug')
summary(
{
'Track memory' : trackmemory_opt.allowed(),
'Track memory': trackmemory_opt.allowed(),
'Use libuv for events': libuv_opt.allowed(),
},
bool_yn: true,
Expand Down
Loading
Loading