Skip to content

Meson: fix libraries soname, exported symbols and pkg-config files

Marco Trevisan requested to merge 3v1n0/mutter:meson-libraries-fixes into master

Various fixes for the libraries generated by meson, as noticed while creating the debian package we had issue related to the fact that no private symbols where hidden and the soname was wrong, causing the lintian to complain.

Also pkg-config files were containing as Requires packages which are really not needed for building and linking sub-projects.

So:

  • Fix map files syntax, add missing ones and actually load them
  • Use libraries version and proper soname
  • Added an (optional) cleanup to reduce few duplication
  • Split pkg dependencies not to make pkg-config files to be wrongly generated

To ensure .pc dependencies are enough it's just needed to do something like:

grep -h "#include" /usr/include/mutter-4/meta/ -r | sort | uniq|grep -v deprecated|grep -v "meta\/\|cogl[-/]\|clutter[-/]\|cally-" 
#include <cairo.h>
#include <gdesktop-enums.h>
#include <gio/gio.h>
#include <glib.h>
#include <glib-object.h>
#include <gmodule.h>
#include <gsettings-desktop-schemas/gdesktop-enums.h>
#include <gtk/gtk.h>
#include <pango/pango-font.h>
#include <string.h>
#include <X11/extensions/Xfixes.h>
#include <X11/extensions/XInput2.h>
#include <X11/extensions/XInput.h>
#include <X11/Xlib.h>
----

grep -h "#include" /usr/include/mutter-4/clutter/ -r | sort | uniq|grep -v deprecated|grep -v "meta\/\|cogl[-/]\|clutter[-/]\|cally-" 
#include <atk/atk.h>
#include <atk/atkobject.h>
#include <cairo.h>
#include <gio/gio.h>
#include <glib.h>
#include <glib-object.h>
#include <json-glib/json-glib.h>
#include <pango/pango.h>
#include <stdint.h>
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
----

grep -h "#include" /usr/include/mutter-4/cogl/ -r | sort | uniq|grep -v deprecated|grep -v "meta\/\|cogl[-/]\|clutter[-/]\|cally-" 
#include <EGL/eglext.h>
#include <EGL/egl.h>
#include <GLES2/gl2platform.h>
#include <GL/glx.h>
#include <glib.h>
#include <glib-object.h>
#include <pango/pangocairo.h>
#include <pango/pango.h>
#include <poll.h>
#include <stddef.h>
#include <stdint.h>
#include <wayland-server.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
Edited by Marco Trevisan

Merge request reports