Tue, 11 Dec 2018 00:22:00 -0600
libpurple: Install headers into a standard subdirectory
This patch makes libpurple's header files be installed in a standard
subdirectory. Instead of installing to ${includedir}/libpurple, it
now installs purple.h into ${includedir}/purple-3/ and all the rest
into ${includedir}/purple-3/libpurple/. This should avoid conflicting
with libpurple 2, in addition to setting us up for the more standard
single header include pattern.
Ideally, the inner directory should be named purple/, but doing so
would break third parties. Therefore to maintain compatibility, it
remains libpurple until most projects have ported to use purple.h.
Additionally, this patch adds both purple-3/ and purple-3/libpurple
directories to the Cflags variable in its pkg-config file for the
same reason. The latter should be removed once we're ready to break
this compatibility via renaming the inner directory to purple/
and/or causing including non-purple.h headers from an external
project to throw an error.
| libpurple/meson.build | file | annotate | diff | comparison | revisions |
--- a/libpurple/meson.build Tue Dec 11 01:10:58 2018 -0600 +++ b/libpurple/meson.build Tue Dec 11 00:22:00 2018 -0600 @@ -159,6 +159,7 @@ ] purple_filebase = 'purple-@0@'.format(purple_major_version) +purple_include_base = join_paths(purple_filebase, 'libpurple') if enable_gst purple_coresources += 'media/backend-fs2.c' @@ -219,7 +220,7 @@ h_template : 'enums.h.in', c_template : 'enums.c.in', install_header : true, - install_dir : get_option('includedir') + '/libpurple') + install_dir : join_paths(get_option('includedir'), purple_include_base)) enums_c = enums[0] enums_h = enums[1] @@ -227,12 +228,14 @@ output : 'purple.h', configuration : purple_h_conf, install : true, - install_dir : get_option('includedir') + '/libpurple') + install_dir : join_paths(get_option('includedir'), + purple_filebase)) version_h = configure_file(input : 'version.h.in', output : 'version.h', configuration : version_conf, install : true, - install_dir : get_option('includedir') + '/libpurple') + install_dir : join_paths(get_option('includedir'), + purple_include_base)) purple_builtsources = [ enums_c, @@ -264,17 +267,18 @@ dependencies : [gstreamer, gplugin, glib, gio]) install_headers(purple_coreheaders, - subdir : 'libpurple') + subdir : purple_include_base) install_headers(purple_mediaheaders, - subdir : 'libpurple/media') + subdir : join_paths(purple_include_base, 'media')) pkgconfig.generate( name : 'libpurple', description : 'libpurple is a GLib-based instant messenger library.', version : purple_display_version, filebase : purple_filebase, - subdirs : 'libpurple', +# TODO: Only use purple_filebase once everything is ported to only use purple.h + subdirs : [purple_filebase, purple_include_base], libraries : [libpurple], requires : ['glib-2.0'] + GPLUGIN_REQ, variables : ['plugindir=${libdir}/@0@'.format(purple_filebase)])