From 23fab3a20a66d4e6a58a11d1541267690237e25d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 23 Jan 2020 17:08:41 +0100 Subject: [PATCH] Change SONAME and all the library paths to libfprint-2 To avoid conflicts with previous libfprint version and make sure that the target version is the correct one (plus to allow parallel install in some distros), let's use a versioned naming for the library keeping the abi version in sync. Fixes #223 --- doc/meson.build | 2 +- doc/xml/meson.build | 6 +++--- libfprint/meson.build | 6 +++--- meson.build | 7 ++++--- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/doc/meson.build b/doc/meson.build index 55065edd..1da63fbf 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -23,7 +23,7 @@ glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix') glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html') docpath = join_paths(get_option('datadir'), 'gtk-doc', 'html') -gnome.gtkdoc(meson.project_name(), +gnome.gtkdoc(versioned_libname, main_xml: 'libfprint-docs.xml', src_dir: join_paths(meson.source_root(), 'libfprint'), dependencies: libfprint_dep, diff --git a/doc/xml/meson.build b/doc/xml/meson.build index 5e56bb40..44c6e4aa 100644 --- a/doc/xml/meson.build +++ b/doc/xml/meson.build @@ -1,8 +1,8 @@ ent_conf = configuration_data() -ent_conf.set('PACKAGE', meson.project_name()) +ent_conf.set('PACKAGE', versioned_libname) ent_conf.set('PACKAGE_BUGREPORT', 'https://gitlab.freedesktop.org/libfprint/libfprint/issues') -ent_conf.set('PACKAGE_NAME', meson.project_name()) -ent_conf.set('PACKAGE_STRING', meson.project_name()) +ent_conf.set('PACKAGE_NAME', versioned_libname) +ent_conf.set('PACKAGE_STRING', versioned_libname) 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()) diff --git a/libfprint/meson.build b/libfprint/meson.build index 50df8a0c..3d0752e9 100644 --- a/libfprint/meson.build +++ b/libfprint/meson.build @@ -177,7 +177,7 @@ other_sources = [] fp_enums = gnome.mkenums_simple('fp-enums', sources: libfprint_public_headers, install_header: true, - install_dir: get_option('includedir') / meson.project_name(), + install_dir: get_option('includedir') / versioned_libname, ) fp_enums_h = fp_enums[1] @@ -244,7 +244,7 @@ libfprint_drivers = static_library('fprint-drivers', mapfile = files('libfprint.ver') vflag = '-Wl,--version-script,@0@/@1@'.format(meson.source_root(), mapfile[0]) -libfprint = library('fprint', +libfprint = library(versioned_libname.split('lib')[1], sources: [ fp_enums, libfprint_sources, @@ -268,7 +268,7 @@ libfprint_dep = declare_dependency(link_with: libfprint, ]) install_headers(['fprint.h'] + libfprint_public_headers, - subdir: meson.project_name() + subdir: versioned_libname ) libfprint_private_dep = declare_dependency( diff --git a/meson.build b/meson.build index db2a804d..1f83e96f 100644 --- a/meson.build +++ b/meson.build @@ -75,6 +75,7 @@ soversion = 2 current = 0 revision = 0 libversion = '@0@.@1@.@2@'.format(soversion, current, revision) +versioned_libname = meson.project_name() + '-' + soversion.to_string() # Dependencies glib_dep = dependency('glib-2.0', version: '>=' + glib_min_version) @@ -206,10 +207,10 @@ subdir('tests') pkgconfig = import('pkgconfig') pkgconfig.generate( - name: meson.project_name(), + name: versioned_libname, description: 'Generic C API for fingerprint reader access', version: meson.project_version(), libraries: libfprint, - subdirs: meson.project_name(), - filebase: meson.project_name() + '@0@'.format(soversion), + subdirs: versioned_libname, + filebase: versioned_libname, )