libfprint/SOURCES/0013-meson-Use-preferred-syntax-everywhere.patch
2021-09-09 20:12:48 +00:00

385 lines
13 KiB
Diff

From 099fa9f005d22aa6d9c7ee79b9a11a088499994c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Thu, 21 Nov 2019 20:37:17 +0100
Subject: [PATCH 013/181] meson: Use preferred syntax everywhere
Meson files are normally using 4-spaces to indent and functions use first
parameter on the same line while others at next indentation level, not
following the parenthesis indentation.
So adapt libfprint to follow the meson standard.
---
demo/meson.build | 27 +++++++------
doc/meson.build | 48 +++++++++++------------
doc/xml/meson.build | 4 +-
examples/meson.build | 24 ++++++------
libfprint/meson.build | 89 +++++++++++++++++++++----------------------
meson.build | 31 ++++++++-------
tests/meson.build | 9 ++---
7 files changed, 116 insertions(+), 116 deletions(-)
diff --git a/demo/meson.build b/demo/meson.build
index ceca56d..bf7a7ee 100644
--- a/demo/meson.build
+++ b/demo/meson.build
@@ -1,21 +1,24 @@
-gtk_test_resources = gnome.compile_resources('gtk-test-resources', 'gtk-libfprint-test.gresource.xml',
- source_dir : '.',
- c_name : 'gtk_test')
+gtk_test_resources = gnome.compile_resources('gtk-test-resources',
+ 'gtk-libfprint-test.gresource.xml',
+ source_dir : '.',
+ c_name : 'gtk_test')
prefix = get_option('prefix')
bindir = join_paths(prefix, get_option('bindir'))
datadir = join_paths(prefix, get_option('datadir'))
executable('gtk-libfprint-test',
- [ 'gtk-libfprint-test.c', gtk_test_resources ],
- dependencies: [ libfprint_dep, gtk_dep ],
- include_directories: [
- root_inc,
- ],
- c_args: [ common_cflags,
- '-DPACKAGE_VERSION="' + meson.project_version() + '"' ],
- install: true,
- install_dir: bindir)
+ [ 'gtk-libfprint-test.c', gtk_test_resources ],
+ dependencies: [ libfprint_dep, gtk_dep ],
+ include_directories: [
+ root_inc,
+ ],
+ c_args: [
+ common_cflags,
+ '-DPACKAGE_VERSION="' + meson.project_version() + '"'
+ ],
+ install: true,
+ install_dir: bindir)
appdata = 'org.freedesktop.libfprint.Demo.appdata.xml'
install_data(appdata,
diff --git a/doc/meson.build b/doc/meson.build
index 5418667..407413a 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -1,14 +1,14 @@
subdir('xml')
private_headers = [
- 'config.h',
- 'nbis-helpers.h',
- 'fprint.h',
- 'fp_internal.h',
+ 'config.h',
+ 'nbis-helpers.h',
+ 'fprint.h',
+ 'fp_internal.h',
- # Subdirectories to ignore
- 'drivers',
- 'nbis',
+ # Subdirectories to ignore
+ 'drivers',
+ 'nbis',
]
html_images = [
@@ -25,20 +25,20 @@ glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
docpath = join_paths(get_option('datadir'), 'gtk-doc', 'html')
gnome.gtkdoc('libfprint',
- main_xml: 'libfprint-docs.xml',
- src_dir: join_paths(meson.source_root(), 'libfprint'),
- dependencies: libfprint_dep,
- content_files: content_files,
- expand_content_files: expand_content_files,
- scan_args: [
- #'--rebuild-sections',
- '--ignore-decorators=API_EXPORTED',
- '--ignore-headers=' + ' '.join(private_headers),
- ],
- fixxref_args: [
- '--html-dir=@0@'.format(docpath),
- '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
- '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
- ],
- html_assets: html_images,
- install: true)
+ main_xml: 'libfprint-docs.xml',
+ src_dir: join_paths(meson.source_root(), 'libfprint'),
+ dependencies: libfprint_dep,
+ content_files: content_files,
+ expand_content_files: expand_content_files,
+ scan_args: [
+ #'--rebuild-sections',
+ '--ignore-decorators=API_EXPORTED',
+ '--ignore-headers=' + ' '.join(private_headers),
+ ],
+ fixxref_args: [
+ '--html-dir=@0@'.format(docpath),
+ '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
+ '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
+ ],
+ html_assets: html_images,
+ install: true)
diff --git a/doc/xml/meson.build b/doc/xml/meson.build
index e35f7ee..2ca1100 100644
--- a/doc/xml/meson.build
+++ b/doc/xml/meson.build
@@ -7,4 +7,6 @@ ent_conf.set('PACKAGE_TARNAME', 'libfprint-' + meson.project_version())
ent_conf.set('PACKAGE_URL', 'https://fprint.freedesktop.org/')
ent_conf.set('PACKAGE_VERSION', meson.project_version())
ent_conf.set('PACKAGE_API_VERSION', '1.0')
-configure_file(input: 'gtkdocentities.ent.in', output: 'gtkdocentities.ent', configuration: ent_conf)
+configure_file(input: 'gtkdocentities.ent.in',
+ output: 'gtkdocentities.ent',
+ configuration: ent_conf)
diff --git a/examples/meson.build b/examples/meson.build
index 5cd3d83..ff03ac6 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -2,18 +2,18 @@
examples = [ 'enroll', 'verify', 'manage-prints' ]
foreach example: examples
executable(example,
- [example + '.c', 'storage.c', 'utilities.c'],
- dependencies: [libfprint_dep, glib_dep],
- include_directories: [
- root_inc,
- ],
- c_args: common_cflags)
+ [ example + '.c', 'storage.c', 'utilities.c' ],
+ dependencies: [ libfprint_dep, glib_dep ],
+ include_directories: [
+ root_inc,
+ ],
+ c_args: common_cflags)
endforeach
executable('cpp-test',
- 'cpp-test.cpp',
- dependencies: libfprint_dep,
- include_directories: [
- root_inc,
- ],
- c_args: common_cflags)
+ 'cpp-test.cpp',
+ dependencies: libfprint_dep,
+ include_directories: [
+ root_inc,
+ ],
+ c_args: common_cflags)
diff --git a/libfprint/meson.build b/libfprint/meson.build
index af2fe84..f77965a 100644
--- a/libfprint/meson.build
+++ b/libfprint/meson.build
@@ -162,73 +162,73 @@ endif
other_sources = []
fp_enums = gnome.mkenums_simple('fp-enums',
- sources: libfprint_public_headers,
- install_header : true)
+ sources: libfprint_public_headers,
+ install_header : true)
fp_enums_h = fp_enums[1]
fpi_enums = gnome.mkenums_simple('fpi-enums',
- sources: libfprint_private_headers,
- install_header : true)
+ sources: libfprint_private_headers,
+ install_header : true)
fpi_enums_h = fpi_enums[1]
drivers_sources += configure_file(input: 'empty_file',
- output: 'fp-drivers.c',
- capture: true,
- command: [
- 'echo',
- drivers_type_list + '\n\n' + drivers_type_func
- ])
+ output: 'fp-drivers.c',
+ capture: true,
+ command: [
+ 'echo',
+ drivers_type_list + '\n\n' + drivers_type_func
+ ])
mapfile = 'libfprint.ver'
vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
deps = [ mathlib_dep, glib_dep, gusb_dep, nss_dep, imaging_dep, gio_dep ]
libfprint = library('fprint',
- libfprint_sources + fp_enums + fpi_enums +
- drivers_sources + nbis_sources + other_sources,
- soversion: soversion,
- version: libversion,
- c_args: common_cflags + drivers_cflags,
- include_directories: [
- root_inc,
- include_directories('nbis/include'),
- ],
- link_args : vflag,
- link_depends : mapfile,
- dependencies: deps,
- install: true)
+ libfprint_sources + fp_enums + fpi_enums +
+ drivers_sources + nbis_sources + other_sources,
+ soversion: soversion,
+ version: libversion,
+ c_args: common_cflags + drivers_cflags,
+ include_directories: [
+ root_inc,
+ include_directories('nbis/include'),
+ ],
+ link_args : vflag,
+ link_depends : mapfile,
+ dependencies: deps,
+ install: true)
libfprint_dep = declare_dependency(link_with: libfprint,
- sources: [ fp_enums_h ],
- include_directories: root_inc,
- dependencies: [glib_dep, gusb_dep, gio_dep])
+ sources: [ fp_enums_h ],
+ include_directories: root_inc,
+ dependencies: [ glib_dep, gusb_dep, gio_dep ])
install_headers(['fprint.h'] + libfprint_public_headers, subdir: 'libfprint')
udev_rules = executable('fprint-list-udev-rules',
- 'fprint-list-udev-rules.c',
- include_directories: [
- root_inc,
- ],
- dependencies: [ deps, libfprint_dep ],
- install: false)
+ 'fprint-list-udev-rules.c',
+ include_directories: [
+ root_inc,
+ ],
+ dependencies: [ deps, libfprint_dep ],
+ install: false)
if get_option('udev_rules')
custom_target('udev-rules',
- output: '60-fprint-autosuspend.rules',
- capture: true,
- command: [ udev_rules ],
- install: true,
- install_dir: udev_rules_dir)
+ output: '60-fprint-autosuspend.rules',
+ capture: true,
+ command: [ udev_rules ],
+ install: true,
+ install_dir: udev_rules_dir)
endif
supported_devices = executable('fprint-list-supported-devices',
- 'fprint-list-supported-devices.c',
- include_directories: [
- root_inc,
- ],
- dependencies: [ deps, libfprint_dep ],
- install: false)
+ 'fprint-list-supported-devices.c',
+ include_directories: [
+ root_inc,
+ ],
+ dependencies: [ deps, libfprint_dep ],
+ install: false)
if get_option('introspection')
@@ -256,8 +256,7 @@ if get_option('introspection')
'GObject-2.0',
'GUsb-1.0',
],
- install : true
- )
+ install : true)
libfprint_gir = libfprint_girtarget[0]
libfprint_typelib = libfprint_girtarget[1]
endif
diff --git a/meson.build b/meson.build
index a499a38..158a2a0 100644
--- a/meson.build
+++ b/meson.build
@@ -1,12 +1,12 @@
project('libfprint', [ 'c', 'cpp' ],
- version: '1.90.0',
- license: 'LGPLv2.1+',
- default_options: [
- 'buildtype=debugoptimized',
- 'warning_level=1',
- 'c_std=c99',
- ],
- meson_version: '>= 0.46.0')
+ version: '1.90.0',
+ license: 'LGPLv2.1+',
+ default_options: [
+ 'buildtype=debugoptimized',
+ 'warning_level=1',
+ 'c_std=c99',
+ ],
+ meson_version: '>= 0.46.0')
gnome = import('gnome')
@@ -160,11 +160,10 @@ endif
pkgconfig = import('pkgconfig')
pkgconfig.generate(
- name: 'libfprint',
- description: 'Generic C API for fingerprint reader access',
- version: meson.project_version(),
- libraries: libfprint,
- subdirs: 'libfprint',
- filebase: 'libfprint2',
- install_dir: join_paths(get_option('libdir'), 'pkgconfig'),
-)
+ name: 'libfprint',
+ description: 'Generic C API for fingerprint reader access',
+ version: meson.project_version(),
+ libraries: libfprint,
+ subdirs: 'libfprint',
+ filebase: 'libfprint2',
+ install_dir: join_paths(get_option('libdir'), 'pkgconfig'))
diff --git a/tests/meson.build b/tests/meson.build
index d02b05a..7987692 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -16,8 +16,7 @@ envs.set('NO_AT_BRIDGE', '1')
if get_option('introspection')
if 'virtual_image' in drivers
- test(
- 'virtual-image',
+ test('virtual-image',
find_program('virtual-image.py'),
args: '--verbose',
env: envs,
@@ -26,8 +25,7 @@ if get_option('introspection')
endif
if 'vfs5011' in drivers
- test(
- 'vfs5011',
+ test('vfs5011',
find_program('umockdev-test.py'),
args: join_paths(meson.current_source_dir(), 'vfs5011'),
env: envs,
@@ -37,8 +35,7 @@ if get_option('introspection')
endif
if 'synaptics' in drivers
- test(
- 'synaptics',
+ test('synaptics',
find_program('umockdev-test.py'),
args: join_paths(meson.current_source_dir(), 'synaptics'),
env: envs,
--
2.24.1