diff options
34 files changed, 154 insertions, 43 deletions
diff --git a/.clang-tidy b/.clang-tidy index b695c4f..54e9bd6 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,7 +3,6 @@ Checks: > *, - -*-macro-to-enum, -*-vararg, -altera-*, -bugprone-assignment-in-if-condition, @@ -1,9 +1,11 @@ -# Copyright 2018-2022 David Robillard <d@drobilla.net> +# Copyright 2018-2025 David Robillard <d@drobilla.net> # SPDX-License-Identifier: 0BSD OR ISC -.meson-subproject-wrap-hash.txt -__pycache__ -build/** -subprojects/packagecache/ -subprojects/sphinxygen-1.0.4/ -subprojects/sphinxygen/ +/.meson-subproject-wrap-hash.txt +/build/ +/subprojects/packagecache/ +/subprojects/sphinxygen-1.0.10/ +/subprojects/sphinxygen/ + +*.pyc +__pycache__/ diff --git a/.reuse/dep5 b/.reuse/dep5 index 73b8cb6..1219ed7 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -4,7 +4,7 @@ Upstream-Contact: David Robillard <d@drobilla.net> Source: https://gitlab.com/drobilla/lilv Files: AUTHORS NEWS lilv.ttl -Copyright: 2006-2022 David Robillard <d@drobilla.net> +Copyright: 2006-2025 David Robillard <d@drobilla.net> Comment: Contributed to the Commons as a representation of simple facts License: 0BSD OR ISC @@ -1,4 +1,10 @@ -lilv (0.24.25) unstable; urgency=medium +lilv (0.24.27) unstable; urgency=medium + + * Add header warnings test + + -- David Robillard <d@drobilla.net> Mon, 20 Jan 2025 18:14:00 +0000 + +lilv (0.24.26) stable; urgency=medium * Add lint option with project metadata and code quality tests * Avoid use of VLAs in lv2apply @@ -10,7 +16,7 @@ lilv (0.24.25) unstable; urgency=medium * Improve const correctness * Replace more platform-specific code with use of zix - -- David Robillard <d@drobilla.net> Wed, 18 Dec 2024 17:57:56 +0000 + -- David Robillard <d@drobilla.net> Sun, 19 Jan 2025 13:53:31 +0000 lilv (0.24.24) stable; urgency=medium @@ -6,6 +6,7 @@ Lilv Lilv is a C library to make the use of LV2 plugins as simple as possible for applications. + For more information, see <http://drobilla.net/software/lilv>. -- David Robillard <d@drobilla.net> diff --git a/bindings/python/conf.py b/bindings/python/conf.py index 52d514a..4fc0911 100644 --- a/bindings/python/conf.py +++ b/bindings/python/conf.py @@ -60,9 +60,9 @@ copyright = u'2016, David Robillard' # built documents. # # The short X.Y version. -version = '0.24.25' +version = '0.24.27' # The full version, including alpha/beta/rc tags. -release = '0.24.25' +release = '0.24.27' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/bindings/python/lilv.py b/bindings/python/lilv.py index 69f6e7d..100b3d1 100644 --- a/bindings/python/lilv.py +++ b/bindings/python/lilv.py @@ -6,7 +6,7 @@ __author__ = "David Robillard" __copyright__ = "Copyright 2016-2024 David Robillard" __license__ = "ISC" -__version__ = "0.24.25" +__version__ = "0.24.27" __maintainer__ = "David Robillard" __email__ = "d@drobilla.net" __status__ = "Production" diff --git a/bindings/test/bindings_test_plugin.c b/bindings/test/bindings_test_plugin.c index cdbdbb9..0397db4 100644 --- a/bindings/test/bindings_test_plugin.c +++ b/bindings/test/bindings_test_plugin.c @@ -174,7 +174,7 @@ static const LV2_Descriptor descriptor = {TEST_URI, The lv2_descriptor() function is the entry point to the plugin library. The host will load the library and call this function repeatedly with increasing indices to find all the plugins defined in the library. The index is not an - indentifier, the URI of the returned descriptor is used to determine the + identifier, the URI of the returned descriptor is used to determine the identify of the plugin. This method is in the ``discovery'' threading class, so no other functions diff --git a/doc/conf.py.in b/doc/conf.py.in index 444b70a..1831ded 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -1,10 +1,10 @@ -# Copyright 2020-2021 David Robillard <d@drobilla.net> +# Copyright 2020-2025 David Robillard <d@drobilla.net> # SPDX-License-Identifier: ISC # Project information project = "@LILV_TITLE@" -copyright = "2020-2023, David Robillard" +copyright = "2020-2025, David Robillard" author = "David Robillard" release = "@LILV_VERSION@" version = "@LILV_VERSION@" diff --git a/doc/lv2apply.1 b/doc/lv2apply.1 index d6c2f16..e34a6c6 100644 --- a/doc/lv2apply.1 +++ b/doc/lv2apply.1 @@ -1,8 +1,8 @@ -.\" # Copyright 2010-2024 David Robillard <d@drobilla.net> +.\" # Copyright 2010-2025 David Robillard <d@drobilla.net> .\" # SPDX-License-Identifier: ISC -.Dd Nov 29, 2022 +.Dd January 20, 2025 .Dt LV2APPLY 1 -.Os Lilv 0.24.25 +.Os .Sh NAME .Nm lv2apply .Nd apply an LV2 plugin to an audio file diff --git a/doc/lv2bench.1 b/doc/lv2bench.1 index f03916a..78e1340 100644 --- a/doc/lv2bench.1 +++ b/doc/lv2bench.1 @@ -1,8 +1,8 @@ -.\" # Copyright 2024 David Robillard <d@drobilla.net> +.\" # Copyright 2024-2025 David Robillard <d@drobilla.net> .\" # SPDX-License-Identifier: ISC -.Dd Nov 29, 2022 +.Dd January 20, 2025 .Dt LV2BENCH 1 -.Os Lilv 0.24.25 +.Os .Sh NAME .Nm lv2bench .Nd benchmark all installed and supported LV2 plugins diff --git a/doc/lv2info.1 b/doc/lv2info.1 index 783cad0..8f82f8f 100644 --- a/doc/lv2info.1 +++ b/doc/lv2info.1 @@ -1,8 +1,8 @@ -.\" # Copyright 2009-2024 David Robillard <d@drobilla.net> +.\" # Copyright 2009-2025 David Robillard <d@drobilla.net> .\" # SPDX-License-Identifier: ISC -.Dd Nov 29, 2022 +.Dd January 20, 2025 .Dt LV2INFO 1 -.Os Lilv 0.24.25 +.Os .Sh NAME .Nm lv2info .Nd print information about an installed LV2 plugin diff --git a/doc/lv2ls.1 b/doc/lv2ls.1 index e9a71b9..7cefb06 100644 --- a/doc/lv2ls.1 +++ b/doc/lv2ls.1 @@ -1,8 +1,8 @@ -.\" # Copyright 2010-2024 David Robillard <d@drobilla.net> +.\" # Copyright 2010-2025 David Robillard <d@drobilla.net> .\" # SPDX-License-Identifier: ISC -.Dd Nov 29, 2022 +.Dd January 20, 2025 .Dt LV2LS 1 -.Os Lilv 0.24.25 +.Os .Sh NAME .Nm lv2ls .Nd list all installed LV2 plugins diff --git a/meson.build b/meson.build index a3a2c27..755b42d 100644 --- a/meson.build +++ b/meson.build @@ -12,7 +12,7 @@ project( ], license: 'ISC', meson_version: '>= 0.56.0', - version: '0.24.25', + version: '0.24.27', ) lilv_src_root = meson.current_source_dir() @@ -220,11 +220,31 @@ add_project_arguments(platform_defines, language: ['c']) m_dep = cc.find_library('m', required: false) dl_dep = cc.find_library('dl', required: false) -zix_dep = dependency('zix-0', fallback: 'zix', version: '>= 0.5.1') -serd_dep = dependency('serd-0', fallback: 'serd', version: '>= 0.30.10') -sord_dep = dependency('sord-0', fallback: 'sord', version: '>= 0.16.15') -lv2_dep = dependency('lv2', fallback: 'lv2', version: '>= 1.18.2') -sratom_dep = dependency('sratom-0', fallback: 'sratom', version: '>= 0.6.10') +zix_dep = dependency( + 'zix-0', + include_type: 'system', + version: '>= 0.6.0', +) +serd_dep = dependency( + 'serd-0', + include_type: 'system', + version: '>= 0.30.10', +) +sord_dep = dependency( + 'sord-0', + include_type: 'system', + version: '>= 0.16.16', +) +lv2_dep = dependency( + 'lv2', + include_type: 'system', + version: '>= 1.18.2', +) +sratom_dep = dependency( + 'sratom-0', + include_type: 'system', + version: '>= 0.6.10', +) ########### # Library # @@ -274,6 +294,7 @@ liblilv = library( darwin_versions: [major_version + '.0.0', meson.project_version()], dependencies: common_dependencies, gnu_symbol_visibility: 'hidden', + implicit_include_directories: false, include_directories: include_directories('include'), install: true, soversion: soversion, @@ -288,7 +309,7 @@ lilv_dep = declare_dependency( link_with: liblilv, ) -# Generage pkg-config file for external dependants +# Generate pkg-config file for external dependants pkg.generate( liblilv, description: 'Library for hosting LV2 plugins', diff --git a/src/.clang-tidy b/src/.clang-tidy index 9cc7cdc..0d90367 100644 --- a/src/.clang-tidy +++ b/src/.clang-tidy @@ -1,4 +1,4 @@ -# Copyright 2020-2024 David Robillard <d@drobilla.net> +# Copyright 2020-2025 David Robillard <d@drobilla.net> # SPDX-License-Identifier: 0BSD OR ISC Checks: > @@ -7,6 +7,7 @@ Checks: > -bugprone-narrowing-conversions, -cert-err33-c, -clang-analyzer-optin.core.EnumCastOutOfRange, + -clang-analyzer-optin.taint.TaintedAlloc, -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling, -clang-analyzer-valist.Uninitialized, -concurrency-mt-unsafe, diff --git a/src/lilv_config.h b/src/lilv_config.h index 2f7c498..1198ce2 100644 --- a/src/lilv_config.h +++ b/src/lilv_config.h @@ -5,7 +5,7 @@ #define LILV_CONFIG_H // Define version unconditionally so a warning will catch a mismatch -#define LILV_VERSION "0.24.25" +#define LILV_VERSION "0.24.27" // Separator between entries in variables like PATH #ifndef LILV_PATH_SEP diff --git a/src/lilv_internal.h b/src/lilv_internal.h index 70c47de..2cef3aa 100644 --- a/src/lilv_internal.h +++ b/src/lilv_internal.h @@ -8,8 +8,6 @@ extern "C" { #endif -#include "lilv_config.h" - #include <lilv/lilv.h> #include <lv2/core/lv2.h> #include <serd/serd.h> diff --git a/src/plugin.c b/src/plugin.c index d828f6f..c82bb65 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -307,7 +307,7 @@ lilv_plugin_load_ports_if_necessary(const LilvPlugin* const_plugin) plugin->num_ports = this_index + 1; } - // Havn't seen this port yet, add it to array + // Haven't seen this port yet, add it to array if (!this_port) { this_port = lilv_port_new( plugin->world, port, this_index, lilv_node_as_string(symbol)); diff --git a/test/bad_syntax.lv2/meson.build b/test/bad_syntax.lv2/meson.build index 2e22042..48df70e 100644 --- a/test/bad_syntax.lv2/meson.build +++ b/test/bad_syntax.lv2/meson.build @@ -29,6 +29,7 @@ test( files('test_bad_syntax.c'), c_args: c_suppressions + test_args, dependencies: [lv2_dep, lilv_dep], + implicit_include_directories: false, ), args: [meson.current_build_dir() / ''], suite: 'plugin', diff --git a/test/cpp/.clang-tidy b/test/cpp/.clang-tidy index 5d20fa0..a087a3d 100644 --- a/test/cpp/.clang-tidy +++ b/test/cpp/.clang-tidy @@ -1,7 +1,8 @@ -# Copyright 2020-2022 David Robillard <d@drobilla.net> +# Copyright 2020-2025 David Robillard <d@drobilla.net> # SPDX-License-Identifier: 0BSD OR ISC Checks: > + -*-nullptr, -cert-dcl50-cpp, -cppcoreguidelines-macro-usage, -cppcoreguidelines-pro-bounds-array-to-pointer-decay, @@ -14,6 +15,7 @@ Checks: > -modernize-return-braced-init-list, -modernize-use-nodiscard, -modernize-use-trailing-return-type, + -modernize-use-using, -readability-implicit-bool-conversion, HeaderFilterRegex: '.*/lilvmm\.hpp' InheritParentConfig: true diff --git a/test/cpp/meson.build b/test/cpp/meson.build index 0c750de..b810e39 100644 --- a/test/cpp/meson.build +++ b/test/cpp/meson.build @@ -31,6 +31,7 @@ test( files('test_lilv_hpp.cpp'), cpp_args: test_args + cpp_suppressions, dependencies: [lv2_dep, lilv_dep], + implicit_include_directories: false, ), suite: 'unit', ) diff --git a/test/failed_instantiation.lv2/meson.build b/test/failed_instantiation.lv2/meson.build index 37f8e26..0719d53 100644 --- a/test/failed_instantiation.lv2/meson.build +++ b/test/failed_instantiation.lv2/meson.build @@ -29,6 +29,7 @@ test( files('test_failed_instantiation.c'), c_args: c_suppressions + test_args, dependencies: [lv2_dep, lilv_dep], + implicit_include_directories: false, ), args: [meson.current_build_dir() / ''], suite: 'plugin', diff --git a/test/failed_lib_descriptor.lv2/meson.build b/test/failed_lib_descriptor.lv2/meson.build index 15c01e1..8c5907a 100644 --- a/test/failed_lib_descriptor.lv2/meson.build +++ b/test/failed_lib_descriptor.lv2/meson.build @@ -29,6 +29,7 @@ test( files('test_failed_lib_descriptor.c'), c_args: c_suppressions + test_args, dependencies: [lv2_dep, lilv_dep], + implicit_include_directories: false, ), args: [meson.current_build_dir() / ''], suite: 'plugin', diff --git a/test/headers/.clang-tidy b/test/headers/.clang-tidy new file mode 100644 index 0000000..a42a718 --- /dev/null +++ b/test/headers/.clang-tidy @@ -0,0 +1,15 @@ +# Copyright 2020-2024 David Robillard <d@drobilla.net> +# SPDX-License-Identifier: 0BSD OR ISC + +Checks: > + *, + -altera-*, + -llvmlibc-*, +CheckOptions: + - key: readability-function-cognitive-complexity.Threshold + value: '1' + - key: readability-identifier-length.IgnoredParameterNames + value: '^(a)|(b)|(ui)|(i)$' +WarningsAsErrors: '*' +HeaderFilterRegex: '.*' +FormatStyle: file diff --git a/test/headers/meson.build b/test/headers/meson.build new file mode 100644 index 0000000..c81ffaa --- /dev/null +++ b/test/headers/meson.build @@ -0,0 +1,32 @@ +# Copyright 2020-2025 David Robillard <d@drobilla.net> +# SPDX-License-Identifier: 0BSD OR ISC + +header_c_suppressions = [] + +if get_option('warning_level') == 'everything' + if cc.get_id() == 'clang' + if not meson.is_cross_build() + header_c_suppressions += ['-Wno-poison-system-directories'] + endif + elif cc.get_id() == 'msvc' + header_c_suppressions += [ + '/wd4820', # padding added after construct + ] + endif +endif + +if cc.get_id() == 'clang' + header_c_suppressions += ['-Wno-nullability-extension'] +endif + +test( + 'headers', + executable( + 'test_headers', + files('test_headers.c'), + c_args: header_c_suppressions, + dependencies: lilv_dep, + implicit_include_directories: false, + ), + suite: 'unit', +) diff --git a/test/headers/test_headers.c b/test/headers/test_headers.c new file mode 100644 index 0000000..b0d4aa5 --- /dev/null +++ b/test/headers/test_headers.c @@ -0,0 +1,13 @@ +// Copyright 2022-2025 David Robillard <d@drobilla.net> +// SPDX-License-Identifier: ISC + +#include <lilv/lilv.h> // IWYU pragma: keep + +#ifdef __GNUC__ +__attribute__((const)) +#endif +int +main(void) +{ + return 0; +} diff --git a/test/lib_descriptor.lv2/meson.build b/test/lib_descriptor.lv2/meson.build index e70ed29..217b907 100644 --- a/test/lib_descriptor.lv2/meson.build +++ b/test/lib_descriptor.lv2/meson.build @@ -29,6 +29,7 @@ test( files('test_lib_descriptor.c'), c_args: c_suppressions + test_args, dependencies: [lv2_dep, lilv_dep], + implicit_include_directories: false, ), args: [meson.current_build_dir() / ''], suite: 'plugin', diff --git a/test/meson.build b/test/meson.build index e260f37..ce0c708 100644 --- a/test/meson.build +++ b/test/meson.build @@ -1,6 +1,12 @@ # Copyright 2020-2022 David Robillard <d@drobilla.net> # SPDX-License-Identifier: 0BSD OR ISC +################### +# Header Warnings # +################### + +subdir('headers') + ############## # Test Setup # ############## @@ -82,6 +88,7 @@ foreach unit : unit_tests files('lilv_test_utils.c', 'test_@0@.c'.format(unit)), c_args: define_args + test_args + c_suppressions, dependencies: [lv2_dep, lilv_dep], + implicit_include_directories: false, ), suite: 'unit', ) diff --git a/test/missing_descriptor.lv2/meson.build b/test/missing_descriptor.lv2/meson.build index 78d749b..92c5145 100644 --- a/test/missing_descriptor.lv2/meson.build +++ b/test/missing_descriptor.lv2/meson.build @@ -29,6 +29,7 @@ test( files('test_missing_descriptor.c'), c_args: c_suppressions + test_args, dependencies: [lv2_dep, lilv_dep], + implicit_include_directories: false, ), args: [meson.current_build_dir() / ''], suite: 'plugin', diff --git a/test/missing_name.lv2/meson.build b/test/missing_name.lv2/meson.build index 56a695a..da9759e 100644 --- a/test/missing_name.lv2/meson.build +++ b/test/missing_name.lv2/meson.build @@ -29,6 +29,7 @@ test( files('test_missing_name.c'), c_args: c_suppressions + test_args, dependencies: [lv2_dep, lilv_dep], + implicit_include_directories: false, ), args: [meson.current_build_dir() / ''], suite: 'plugin', diff --git a/test/missing_plugin.lv2/meson.build b/test/missing_plugin.lv2/meson.build index 7e6f51f..f28fc9f 100644 --- a/test/missing_plugin.lv2/meson.build +++ b/test/missing_plugin.lv2/meson.build @@ -29,6 +29,7 @@ test( files('test_missing_plugin.c'), c_args: c_suppressions + test_args, dependencies: [lv2_dep, lilv_dep], + implicit_include_directories: false, ), args: [meson.current_build_dir() / ''], suite: 'plugin', diff --git a/test/missing_port.lv2/meson.build b/test/missing_port.lv2/meson.build index 8dfc655..3bf892b 100644 --- a/test/missing_port.lv2/meson.build +++ b/test/missing_port.lv2/meson.build @@ -29,6 +29,7 @@ test( files('test_missing_port.c'), c_args: c_suppressions + test_args, dependencies: [lv2_dep, lilv_dep], + implicit_include_directories: false, ), args: [meson.current_build_dir() / ''], suite: 'plugin', diff --git a/test/missing_port_name.lv2/meson.build b/test/missing_port_name.lv2/meson.build index 734177f..68fe629 100644 --- a/test/missing_port_name.lv2/meson.build +++ b/test/missing_port_name.lv2/meson.build @@ -29,6 +29,7 @@ test( files('test_missing_port_name.c'), c_args: c_suppressions + test_args, dependencies: [lv2_dep, lilv_dep], + implicit_include_directories: false, ), args: [meson.current_build_dir() / ''], suite: 'plugin', diff --git a/tools/meson.build b/tools/meson.build index ee35378..199f7d7 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -18,6 +18,7 @@ foreach tool : basic_tools files(tool + '.c'), c_args: c_suppressions, dependencies: lilv_dep, + implicit_include_directories: false, install: true, ) @@ -38,8 +39,9 @@ install_data( sndfile_dep = dependency( 'sndfile', - version: '>= 1.0.0', + include_type: 'system', required: get_option('tools'), + version: '>= 1.0.0', ) if sndfile_dep.found() @@ -48,6 +50,7 @@ if sndfile_dep.found() files('lv2apply.c'), c_args: c_suppressions, dependencies: [lilv_dep, sndfile_dep], + implicit_include_directories: false, install: true, ) @@ -78,6 +81,7 @@ int main(void) { struct timespec t; return clock_gettime(CLOCK_MONOTONIC, &t); } files('lv2bench.c'), c_args: c_suppressions, dependencies: [lilv_dep, rt_dep, sndfile_dep], + implicit_include_directories: false, install: true, ) |