[mutter] meson: Don't list libraries private dependencies in pc files



commit 7f551ba7769422529f7978af8fc423e0966460fa
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date:   Mon Jan 21 12:13:48 2019 +0100

    meson: Don't list libraries private dependencies in pc files
    
    pkg-config files for mutter are generated using *_pkg_deps as requires, but
    programs linked with libmutter doesn't need most of these private dependencies
    which are only needed for building and linking mutter and its subprojects.
    
    So list packages needed only by mutter itself inside *_pkg_private_deps and
    don't expose such packages to pkg-config, but only use them at build time.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/3955

 clutter/meson.build | 21 ++++++++++++++-------
 cogl/meson.build    | 10 ++++++++--
 src/meson.build     | 40 +++++++++++++++++++++++-----------------
 3 files changed, 45 insertions(+), 26 deletions(-)
---
diff --git a/clutter/meson.build b/clutter/meson.build
index f0af1c679..053cfa751 100644
--- a/clutter/meson.build
+++ b/clutter/meson.build
@@ -29,26 +29,30 @@ endif
 clutter_c_args += clutter_debug_c_args
 
 clutter_pkg_deps = [
-  gdk_pixbuf_dep,
+  atk_dep,
   cairo_gobject_dep,
   glib_dep,
   gobject_dep,
   gio_dep,
+  json_glib_dep,
+  pango_dep,
+]
+
+clutter_pkg_private_deps = [
+  gdk_pixbuf_dep,
   gthread_dep,
   gmodule_no_export_dep,
-  atk_dep,
   pangocairo_dep,
-  json_glib_dep,
 ]
 
 if have_pango_ft2
-  clutter_pkg_deps += [
+  clutter_pkg_private_deps += [
     pangoft2_dep,
   ]
 endif
 
 if have_wayland
-  clutter_pkg_deps += [
+  clutter_pkg_private_deps += [
     wayland_egl_dep,
     wayland_server_dep,
   ]
@@ -57,6 +61,8 @@ endif
 if have_x11
   clutter_pkg_deps += [
     x11_dep,
+  ]
+  clutter_pkg_private_deps += [
     xext_dep,
     xdamage_dep,
     xcomposite_dep,
@@ -66,7 +72,7 @@ if have_x11
 endif
 
 if have_native_backend
-  clutter_pkg_deps += [
+  clutter_pkg_private_deps += [
     libudev_dep,
     libinput_dep,
     xkbcommon_dep,
@@ -74,13 +80,14 @@ if have_native_backend
 endif
 
 if have_libwacom
-  clutter_pkg_deps += [
+  clutter_pkg_private_deps += [
     libwacom_dep,
   ]
 endif
 
 clutter_deps = [
   clutter_pkg_deps,
+  clutter_pkg_private_deps,
   libmutter_cogl_dep,
   m_dep
 ]
diff --git a/cogl/meson.build b/cogl/meson.build
index 1618c33bc..d76b86589 100644
--- a/cogl/meson.build
+++ b/cogl/meson.build
@@ -21,12 +21,15 @@ cogl_mutter_config_h = configure_file(
   configuration: cdata)
 
 cogl_pkg_deps = [
-  cairo_dep,
-  #uprof_dep,
   glib_dep,
   gobject_dep,
+]
+
+cogl_pkg_private_deps = [
+  cairo_dep,
   gmodule_no_export_dep,
   gdk_pixbuf_dep,
+  #uprof_dep,
 ]
 
 if have_wayland
@@ -44,6 +47,8 @@ endif
 if have_x11
   cogl_pkg_deps += [
     x11_dep,
+  ]
+  cogl_pkg_private_deps += [
     xext_dep,
     xfixes_dep,
     xdamage_dep,
@@ -66,6 +71,7 @@ endif
 
 cogl_deps = [
   cogl_pkg_deps,
+  cogl_pkg_private_deps,
   m_dep,
 ]
 
diff --git a/src/meson.build b/src/meson.build
index ad4b33370..fa48a61ea 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -15,15 +15,18 @@ mutter_pkg_deps = [
   cairo_dep,
   gio_unix_dep,
   glib_dep,
+  gsettings_desktop_schemas_dep,
+  gtk3_dep,
+  pango_dep,
+]
+
+mutter_pkg_private_deps = [
   gmodule_no_export_dep,
   gnome_desktop_dep,
-  gsettings_desktop_schemas_dep,
   gnome_settings_daemon_dep,
-  gtk3_dep,
   json_glib_dep,
-  pango_dep,
-  xkbcommon_dep,
   libcanberra_dep,
+  xkbcommon_dep,
 ]
 
 if have_gl
@@ -33,7 +36,7 @@ if have_gl
 endif
 
 if have_gles2
-  mutter_pkg_deps += [
+  mutter_pkg_private_deps += [
     gles2_dep,
   ]
 endif
@@ -45,49 +48,51 @@ if have_egl
 endif
 
 if have_libgudev
-  mutter_pkg_deps += [
+  mutter_pkg_private_deps += [
     gudev_dep,
     libudev_dep,
   ]
 endif
 
 if have_startup_notification
-  mutter_pkg_deps += [
+  mutter_pkg_private_deps += [
     libstartup_notification_dep,
   ]
 endif
 
 if have_libwacom
-  mutter_pkg_deps += [
+  mutter_pkg_private_deps += [
     libwacom_dep,
   ]
 endif
 
 if have_remote_desktop
-  mutter_pkg_deps += [
+  mutter_pkg_private_deps += [
     libpipewire_dep,
   ]
 endif
 
 if have_introspection
-  mutter_pkg_deps += [
+  mutter_pkg_private_deps += [
     gobject_introspection_dep,
   ]
 endif
 
 if have_x11
   mutter_pkg_deps += [
-    xrandr_dep,
+    xfixes_dep,
+    xi_dep,
     x11_dep,
+  ]
+
+  mutter_pkg_private_deps += [
+    xrandr_dep,
     xinerama_dep,
     xext_dep,
     ice_dep,
     xcomposite_dep,
     xcursor_dep,
     xdamage_dep,
-    xext_dep,
-    xfixes_dep,
-    xi_dep,
     xkbfile_dep,
     xkeyboard_config_dep,
     xkbcommon_x11_dep,
@@ -98,7 +103,7 @@ if have_x11
   ]
 
   if have_sm
-    mutter_pkg_deps += [
+    mutter_pkg_private_deps += [
       sm_dep,
     ]
   endif
@@ -111,7 +116,7 @@ if have_wayland
 endif
 
 if have_native_backend
-  mutter_pkg_deps += [
+  mutter_pkg_private_deps += [
     libdrm_dep,
     libinput_dep,
     gudev_dep,
@@ -124,13 +129,14 @@ if have_wayland_eglstream
   mutter_lib_deps += [
     dl_dep,
   ]
-  mutter_pkg_deps += [
+  mutter_pkg_private_deps += [
     wayland_eglstream_protocols_dep,
   ]
 endif
 
 mutter_deps = [
   mutter_pkg_deps,
+  mutter_pkg_private_deps,
   mutter_lib_deps,
 ]
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]