From 93206e91d2fd379d1b64e1a7cd46b2903d0bbb08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20V=C3=A1zquez=20Blanco?= Date: Sat, 3 Feb 2024 01:02:14 +0100 Subject: [PATCH 1/2] libusb: udpate to 1.0.27 --- subprojects/libusb.wrap | 8 ++++---- subprojects/packagefiles/libusb/meson.build | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/subprojects/libusb.wrap b/subprojects/libusb.wrap index d267d03a9..eebceba46 100644 --- a/subprojects/libusb.wrap +++ b/subprojects/libusb.wrap @@ -1,8 +1,8 @@ [wrap-file] -directory = libusb-1.0.26 -source_url = https://github.com/libusb/libusb/releases/download/v1.0.26/libusb-1.0.26.tar.bz2 -source_filename = libusb-1.0.26.tar.bz2 -source_hash = 12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5 +directory = libusb-1.0.27 +source_url = https://github.com/libusb/libusb/releases/download/v1.0.27/libusb-1.0.27.tar.bz2 +source_filename = libusb-1.0.27.tar.bz2 +source_hash = ffaa41d741a8a3bee244ac8e54a72ea05bf2879663c098c82fc5757853441575 patch_directory = libusb [provide] diff --git a/subprojects/packagefiles/libusb/meson.build b/subprojects/packagefiles/libusb/meson.build index 273c835fe..46fdd87bb 100644 --- a/subprojects/packagefiles/libusb/meson.build +++ b/subprojects/packagefiles/libusb/meson.build @@ -1,7 +1,7 @@ project( 'libusb', 'c', - version: '1.0.26', + version: '1.0.27', meson_version: '>=0.60.0', ) From f3efcb821bff1c1a7144d3e2e113babaf412edd1 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 2 Feb 2024 19:51:16 -0800 Subject: [PATCH 2/2] libusb: meson build files update Signed-off-by: Rosen Penev --- releases.json | 1 + subprojects/packagefiles/libusb/meson.build | 40 ++++++++++++------- .../packagefiles/libusb/tests/meson.build | 2 +- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/releases.json b/releases.json index b0135e99b..d97b40065 100644 --- a/releases.json +++ b/releases.json @@ -1813,6 +1813,7 @@ "libusb-1.0" ], "versions": [ + "1.0.27-1", "1.0.26-5", "1.0.26-4", "1.0.26-3", diff --git a/subprojects/packagefiles/libusb/meson.build b/subprojects/packagefiles/libusb/meson.build index 46fdd87bb..6a97335e3 100644 --- a/subprojects/packagefiles/libusb/meson.build +++ b/subprojects/packagefiles/libusb/meson.build @@ -2,7 +2,7 @@ project( 'libusb', 'c', version: '1.0.27', - meson_version: '>=0.60.0', + meson_version: '>=0.49.0', ) add_project_arguments('-D_GNU_SOURCE', language: 'c') @@ -30,19 +30,25 @@ if not cdata.get('HAVE_SYSLOG') and get_option('system-log') error('system logging requires syslog to be present') endif -cdata.set('HAVE_CLOCK_GETTIME', cc.has_function('clock_gettime') and host_machine.system() != 'windows') -cdata.set('HAVE_EVENTFD', cc.has_function('eventfd')) -cdata.set('HAVE_TIMERFD', cc.has_function('timerfd_create')) -cdata.set('HAVE_PIPE2', cc.has_function('pipe2')) -cdata.set('HAVE_PTHREAD_CONDATTR_SETCLOCK', cc.has_function('pthread_condattr_setclock', dependencies: thread_dep)) -cdata.set('HAVE_PTHREAD_SETNAME_NP', cc.has_function('pthread_setname_np', dependencies: thread_dep)) -cdata.set('HAVE_PTHREAD_THREADID_NP', cc.has_function('pthread_threadid_np', dependencies: thread_dep)) +functions = { + 'clock_gettime': [], + 'eventfd': [], + 'pipe2': [], + 'pthread_condattr_setclock': thread_dep, + 'pthread_setname_np': thread_dep, + 'pthread_threadid_np': thread_dep, +} + +foreach f, d : functions + cdata.set('HAVE_@0@'.format(f.to_upper()), cc.has_function(f, dependencies: d)) +endforeach -cdata.set('HAVE_ASM_TYPES_H', cc.has_header('asm/types.h')) -cdata.set('HAVE_NFDS_T', cc.has_header('nfds.h')) -cdata.set('HAVE_STRING_H', cc.has_header('string.h')) -cdata.set('HAVE_SYS_TIME_H', cc.has_header('sys/time.h')) +foreach h : ['asm/types.h', 'string.h', 'sys/time.h'] + cdata.set('HAVE_@0@'.format(h.underscorify().to_upper()), cc.has_header(h)) +endforeach +cdata.set('HAVE_TIMERFD', cc.has_function('timerfd_create')) +cdata.set('HAVE_NFDS_T', cc.has_header_symbol('poll.h', 'nfds_t')) cdata.set('HAVE_STRUCT_TIMESPEC', cc.has_header_symbol('time.h', 'struct timespec')) if cc.has_function_attribute('format') @@ -51,6 +57,12 @@ else cdata.set('PRINTF_FORMAT(a, b)', '') endif +if cc.has_function_attribute('visibility:default') + cdata.set('DEFAULT_VISIBILITY', '__attribute__ ((visibility ("default")))') +else + cdata.set('DEFAULT_VISIBILITY', '') +endif + cdata.set('ENABLE_LOGGING', get_option('logging')) cdata.set('ENABLE_DEBUG_LOGGING', get_option('debug-logging')) cdata.set('USE_SYSTEM_LOGGING_FACILITY', get_option('system-log')) @@ -69,17 +81,15 @@ sources = files( if host_machine.system() == 'windows' cdata.set('PLATFORM_WINDOWS', true) - cdata.set('DEFAULT_VISIBILITY', '') sources += files('libusb/os/events_windows.c', 'libusb/os/threads_windows.c') else cdata.set('PLATFORM_POSIX', true) - cdata.set('DEFAULT_VISIBILITY', '__attribute__ ((visibility ("default")))') sources += files('libusb/os/events_posix.c', 'libusb/os/threads_posix.c') endif if host_machine.system() == 'linux' sources += 'libusb/os/linux_usbfs.c' - udev_dep = dependency('libudev', 'libudev-zero', required: get_option('udev')) + udev_dep = dependency('libudev', required: get_option('udev')) if udev_dep.found() cdata.set('HAVE_LIBUDEV', true) sources += 'libusb/os/linux_udev.c' diff --git a/subprojects/packagefiles/libusb/tests/meson.build b/subprojects/packagefiles/libusb/tests/meson.build index ba1b19cf3..e4c4b49c7 100644 --- a/subprojects/packagefiles/libusb/tests/meson.build +++ b/subprojects/packagefiles/libusb/tests/meson.build @@ -10,7 +10,7 @@ stress = executable( include_directories: config_inc, ) -test('libusb_test', stress, timeout: 90) +test('libusb_test', stress, timeout: 240) umockdev_dep = dependency('umockdev', required: false) if umockdev_dep.found()