diff --git a/releases.json b/releases.json index 5c2cdab329..5cda3da82b 100644 --- a/releases.json +++ b/releases.json @@ -775,6 +775,7 @@ "libcurl" ], "versions": [ + "8.12.1-2", "8.12.1-1", "8.10.1-1", "8.10.0-1", diff --git a/subprojects/packagefiles/curl/lib/meson.build b/subprojects/packagefiles/curl/lib/meson.build index 09070e0b07..d9c4b2b77f 100644 --- a/subprojects/packagefiles/curl/lib/meson.build +++ b/subprojects/packagefiles/curl/lib/meson.build @@ -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 ? { diff --git a/subprojects/packagefiles/curl/meson.build b/subprojects/packagefiles/curl/meson.build index f9360719d4..65c9374427 100644 --- a/subprojects/packagefiles/curl/meson.build +++ b/subprojects/packagefiles/curl/meson.build @@ -4,6 +4,7 @@ project( 'curl', 'c', version: '8.12.1', + license: 'curl', meson_version: '>=0.60.0', ) @@ -256,9 +257,11 @@ foreach _header, _symlist : _headerlist 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 @@ -282,16 +285,16 @@ endforeach 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( @@ -355,11 +358,12 @@ cdata.set( # 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', + 'wincrypt.h', + 'CryptAcquireContext', + prefix: '#include', ) ) @@ -384,15 +388,17 @@ _required = asynchdns_opt.disabled() ? asynchdns_opt : false 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. @@ -458,10 +464,10 @@ cdata.set('USE_IPV6', ipv6_opt.allowed()) # 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 ) # }}} @@ -784,12 +790,13 @@ foreach _provider : get_option('ldap-provider') ) _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) @@ -929,12 +936,13 @@ foreach _provider : get_option('idn-provider') 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, @@ -1076,15 +1084,16 @@ else 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( @@ -1313,9 +1322,10 @@ cdata.set( _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 @@ -1345,10 +1355,10 @@ foreach _arg1 : ['char *', 'unsigned char *', 'void *'] 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 @@ -1406,7 +1416,8 @@ cdata.set_quoted('CURL_OS', _os) # 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")))') @@ -1526,14 +1537,16 @@ endforeach # 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`… @@ -1675,10 +1688,11 @@ ssl_backends_summary += { # 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 @@ -1748,8 +1762,11 @@ cdata.set('SUPPORT_FEATURES', ' '.join(enabled_features)) 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, @@ -1878,8 +1895,8 @@ summary( 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, @@ -1889,7 +1906,7 @@ summary( 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, diff --git a/subprojects/packagefiles/curl/meson_options.txt b/subprojects/packagefiles/curl/meson_options.txt index 5769f56dcd..aa823846d0 100644 --- a/subprojects/packagefiles/curl/meson_options.txt +++ b/subprojects/packagefiles/curl/meson_options.txt @@ -1,10 +1,10 @@ # Build targets. option( - 'tool' , + 'tool', type: 'feature', ) option( - 'tests' , + 'tests', type: 'feature', ) option( @@ -20,19 +20,19 @@ option( ) # Debug build only: use libuv for event-based tests. option( - 'libuv' , + 'libuv', type: 'feature', ) # CA. option( - 'ca_bundle' , - type: 'string' , + 'ca_bundle', + type: 'string', value: 'auto', ) option( - 'ca_path' , - type: 'string' , + 'ca_path', + type: 'string', value: 'auto', ) option( @@ -47,105 +47,105 @@ option( # Features. {{{ option( - 'bindlocal' , + 'bindlocal', type: 'feature', value: 'enabled', ) option( - 'brotli' , + 'brotli', type: 'feature', ) option( - 'cookies' , + 'cookies', type: 'feature', value: 'enabled', ) option( - 'doh' , + 'doh', type: 'feature', value: 'enabled', ) option( - 'form-api' , + 'form-api', type: 'feature', value: 'enabled', ) option( - 'getoptions' , + 'getoptions', type: 'feature', value: 'enabled', ) option( - 'gsasl' , + 'gsasl', type: 'feature', ) option( - 'http2' , + 'http2', type: 'feature', ) option( - 'ipv6' , + 'ipv6', type: 'feature', ) option( - 'libcurl-option' , + 'libcurl-option', type: 'feature', value: 'enabled', ) option( - 'libz' , + 'libz', type: 'feature', ) option( - 'mime' , + 'mime', type: 'feature', value: 'enabled', ) option( - 'netrc' , + 'netrc', type: 'feature', value: 'enabled', ) option( - 'parsedate' , + 'parsedate', type: 'feature', value: 'enabled', ) option( - 'progress-meter' , + 'progress-meter', type: 'feature', value: 'enabled', ) option( - 'proxy' , + 'proxy', type: 'feature', value: 'enabled', ) option( - 'psl' , + 'psl', type: 'feature', ) option( - 'sha512_256' , + 'sha512_256', type: 'feature', value: 'enabled', ) option( - 'shuffle-dns' , + 'shuffle-dns', type: 'feature', value: 'enabled', ) option( - 'socketpair' , + 'socketpair', type: 'feature', value: 'enabled', ) option( - 'sspi' , + 'sspi', type: 'feature', ) option( - 'unixsockets' , + 'unixsockets', type: 'feature', ) option( @@ -154,12 +154,12 @@ option( value: 'enabled', ) option( - 'websockets' , + 'websockets', type: 'feature', value: 'enabled', ) option( - 'zstd' , + 'zstd', type: 'feature', ) @@ -178,27 +178,27 @@ option( # Authentication. option( - 'aws' , + 'aws', type: 'feature', value: 'enabled', ) option( - 'basic-auth' , + 'basic-auth', type: 'feature', value: 'enabled', ) option( - 'bearer-auth' , + 'bearer-auth', type: 'feature', value: 'enabled', ) option( - 'digest-auth' , + 'digest-auth', type: 'feature', value: 'enabled', ) option( - 'kerberos-auth' , + 'kerberos-auth', type: 'feature', value: 'enabled', ) @@ -234,7 +234,7 @@ option( # HTTP. option( - 'alt-svc' , + 'alt-svc', type: 'feature', ) option( @@ -243,11 +243,11 @@ option( value: 'enabled', ) option( - 'hsts' , + 'hsts', type: 'feature', ) option( - 'http-auth' , + 'http-auth', type: 'feature', value: 'enabled', ) @@ -279,31 +279,31 @@ option( # SSL support. option( - 'ssl' , + 'ssl', type: 'feature', ) option( - 'tls-srp' , + 'tls-srp', type: 'feature', ) option( 'ssl-default-backend', - type: 'combo' , + type: 'combo', choices: ['implicit', 'openssl', 'schannel', 'secure-transport'], ) # Backends. option( - 'openssl' , + 'openssl', type: 'feature', ) # Windows only. option( - 'schannel' , + 'schannel', type: 'feature', ) # macOS only. option( - 'secure-transport' , + 'secure-transport', type: 'feature', ) @@ -312,16 +312,16 @@ option( # Protocols. {{{ option( - 'dict' , + 'dict', type: 'feature', ) option( - 'file' , + 'file', type: 'feature', value: 'enabled', ) option( - 'ftp' , + 'ftp', type: 'feature', ) option( @@ -329,48 +329,48 @@ option( type: 'feature', ) option( - 'http' , + 'http', type: 'feature', value: 'enabled', ) option( - 'imap' , + 'imap', type: 'feature', ) option( - 'ipfs' , + 'ipfs', type: 'feature', ) option( - 'ldap' , + 'ldap', type: 'feature', ) option( - 'ldaps' , + 'ldaps', type: 'feature', ) option( - 'mqtt' , + 'mqtt', type: 'feature', ) option( - 'pop3' , + 'pop3', type: 'feature', ) option( - 'rtmp' , + 'rtmp', type: 'feature', ) option( - 'rtsp' , + 'rtsp', type: 'feature', ) option( - 'smb' , + 'smb', type: 'feature', ) option( - 'smtp' , + 'smtp', type: 'feature', ) option( @@ -378,7 +378,7 @@ option( type: 'feature', ) option( - 'tftp' , + 'tftp', type: 'feature', ) @@ -391,7 +391,7 @@ option( value: 'disabled', ) option( - '_enabled' , + '_enabled', type: 'feature', value: 'enabled', ) diff --git a/subprojects/packagefiles/curl/tests/libtest/meson.build b/subprojects/packagefiles/curl/tests/libtest/meson.build index b7d8cbb2ce..b697630221 100644 --- a/subprojects/packagefiles/curl/tests/libtest/meson.build +++ b/subprojects/packagefiles/curl/tests/libtest/meson.build @@ -47,10 +47,11 @@ foreach _spec : makefile_extractions['libtest'] elif _part.startswith('-I') _incs += include_directories(_part.substring(2)) elif _part.endswith('.c') - _srcs += (_part in _generated_srcs ? _generated_srcs.get(_part) : files( - _part, - ) -) + _srcs += ( + _part in _generated_srcs ? _generated_srcs.get(_part) : files( + _part, + ) + ) endif endforeach libtest_targets += executable( diff --git a/subprojects/packagefiles/curl/tests/meson.build b/subprojects/packagefiles/curl/tests/meson.build index dd8468b3d0..e55f720616 100644 --- a/subprojects/packagefiles/curl/tests/meson.build +++ b/subprojects/packagefiles/curl/tests/meson.build @@ -1,12 +1,12 @@ buildinfo_cfg = { - 'build_backend' : meson.backend(), - 'build_cpu' : build_machine.cpu(), - 'build_system' : build_machine.system(), - 'compiler_id' : cc.get_id(), + 'build_backend': meson.backend(), + 'build_cpu': build_machine.cpu(), + 'build_system': build_machine.system(), + 'compiler_id': cc.get_id(), 'compiler_version': cc.version(), - 'host_cpu' : host_machine.cpu(), - 'host_system' : host_machine.system(), - 'meson_version' : meson.version(), + 'host_cpu': host_machine.cpu(), + 'host_system': host_machine.system(), + 'meson_version': meson.version(), } if meson.version().version_compare('>=1.1.0') buildinfo_cfg += { @@ -26,12 +26,14 @@ unit_targets = [] subdir('log') # Extract test targets info. -makefile_extractions = ({ +makefile_extractions = ( + { 'libtest': '', - 'server': '', - } + (build_unittests.found() ? { - 'unit': '', - } : {} + 'server': '', + } + ( + build_unittests.found() ? { + 'unit': '', + } : {} ) ) foreach _subdir : makefile_extractions.keys()