summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2021-01-07 15:14:24 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2021-01-29 20:31:56 +1000
commit8bea9c85db20d19c94eecb699c823954d27c3e24 (patch)
tree78e72ff6bfb552d39a9d4edeef3e8ddb065b6983 /meson.build
parent38e31edc5d1fb24ae66790c1607c88dbb8a9a50d (diff)
downloadlibwacom-8bea9c85db20d19c94eecb699c823954d27c3e24.tar.gz
Support loading tablet/stylus files from /etc/libwacom/
To add a new .tablet file, a user would have to add that file to /usr/share. This location may be read-only on some systems, and any file there will conflict with files provided by the distribution package. In the best case, the user's file will be overwritten on update, in the worst case a file name change leaves both files in place, causing conflicts. The traditional approach is to have distribution-provided files in /usr and host-specific packages in /etc, so let's do the same here: add /etc/libwacom as default lookup path for .tablet and .stylus files. This requires a change in the file loading: where a directory does not exist we count it as a non-failure and continue. In the CI, we have a set of jobs that split the database in various ways across /usr and /etc. Then we compare the device list before/after the split and expect them to be the same. Fixes #327 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build2
1 files changed, 2 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 32ef797..6d9552f 100644
--- a/meson.build
+++ b/meson.build
@@ -5,6 +5,7 @@ project('libwacom', 'c',
meson_version: '>= 0.50.0')
dir_data = join_paths(get_option('prefix'), get_option('datadir'), 'libwacom')
+dir_etc = join_paths(get_option('prefix'), get_option('sysconfdir'), 'libwacom')
dir_man1 = join_paths(get_option('prefix'), get_option('mandir'), 'man1')
dir_src = join_paths(meson.source_root(), 'libwacom')
dir_test = join_paths(meson.source_root(), 'test')
@@ -85,6 +86,7 @@ lib_libwacom = shared_library('wacom',
c_args: [
'-DG_LOG_DOMAIN="@0@"'.format(meson.project_name()),
'-DDATADIR="@0@"'.format(dir_data),
+ '-DETCDIR="@0@"'.format(dir_etc),
],
install: true)
dep_libwacom = declare_dependency(link_with: lib_libwacom)