1
0
Fork 0

Merging upstream version 1.12.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-03-20 08:08:33 +01:00
parent 8d543389aa
commit a3d0cc5ebd
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
1005 changed files with 9469 additions and 1830 deletions

View file

@ -7,8 +7,8 @@
#
project(
'libnvme', ['c'],
meson_version: '>= 0.50.0',
version: '1.11.1',
meson_version: '>= 0.62.0',
version: '1.12',
license: 'LGPL-2.1-or-later',
default_options: [
'c_std=gnu99',
@ -31,7 +31,7 @@ endif
################################################################################
cc = meson.get_compiler('c')
cxx_available = add_languages('cpp', required: false)
cxx_available = add_languages('cpp', required: false, native: false)
prefixdir = get_option('prefix')
libdir = join_paths(prefixdir, get_option('libdir'))
@ -68,40 +68,34 @@ else
endif
conf.set('CONFIG_JSONC', json_c_dep.found(), description: 'Is json-c required?')
if get_option('liburing').disabled()
liburing_dep = dependency('', required: false)
else
liburing_dep = dependency('liburing', version: '>=2.2', required: get_option('liburing'))
endif
conf.set('CONFIG_LIBURING', liburing_dep.found(), description: 'Is liburing available?')
if get_option('openssl').disabled()
openssl_dep = dependency('', required: false)
else
openssl_dep = dependency('openssl',
version: '>=1.1.0',
version: '>=3.0.0',
required: get_option('openssl'),
fallback : ['openssl', 'libssl_dep'])
if openssl_dep.found()
if openssl_dep.version().version_compare('<2.0.0')
api_version = 1
endif
if openssl_dep.found()
# Test for LibreSSL v3.x with incomplete OpenSSL v3 APIs
if openssl_dep.type_name() != 'internal'
is_libressl = cc.has_header_symbol('openssl/opensslv.h',
'LIBRESSL_VERSION_NUMBER',
dependencies: openssl_dep)
has_header = cc.has_header('openssl/core_names.h',
dependencies: openssl_dep)
if is_libressl and not has_header
openssl_dep = dependency('', required: false)
endif
if openssl_dep.version().version_compare('>=3.0.0')
api_version = 3
endif
# Test for LibreSSL v3.x with incomplete OpenSSL v3 APIs
if openssl_dep.type_name() != 'internal'
is_libressl = cc.has_header_symbol('openssl/opensslv.h',
'LIBRESSL_VERSION_NUMBER',
dependencies: openssl_dep)
has_header = cc.has_header('openssl/core_names.h',
dependencies: openssl_dep)
if is_libressl and not has_header
api_version = 1
endif
endif
conf.set('CONFIG_OPENSSL_@0@'.format(api_version), true,
description: 'OpenSSL/LibreSSL API version @0@'.format(api_version))
endif
endif
conf.set('CONFIG_OPENSSL', openssl_dep.found(),
description: 'Is OpenSSL/LibreSSL available?')
@ -236,15 +230,11 @@ conf.set(
),
description: 'Is network address and service translation available'
)
dl_dep = dependency('dl', required: false)
conf.set(
'HAVE_GLIBC_IOCTL',
cc.compiles(
'''#include <sys/ioctl.h>
int ioctl(int fd, unsigned long request, ...);
''',
name: 'ioctl has glibc-style prototype'
),
description: 'Is ioctl the glibc interface (rather than POSIX)'
'HAVE_LIBC_DLSYM',
cc.has_function('dlsym', dependencies: dl_dep),
description: 'Is dlsym function present',
)
if cc.has_function_attribute('fallthrough')
@ -258,6 +248,7 @@ substs = configuration_data()
substs.set('NAME', meson.project_name())
substs.set('VERSION', meson.project_version())
substs.set('LICENSE', meson.project_license()[0])
substs.set('PREFIX', prefixdir)
configure_file(
input: 'libnvme.spec.in',
output: 'libnvme.spec',
@ -304,6 +295,7 @@ if meson.version().version_compare('>=0.53.0')
'keyutitls': keyutils_dep.found(),
'libdbus': libdbus_dep.found(),
'Python 3': py3_dep.found(),
'liburing': liburing_dep.found(),
}
summary(dep_dict, section: 'Dependencies')
conf_dict = {