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