[gnome-build-meta/abderrahim/sysprof: 1/2] sdk/{gjs, glib, gtk+-3, gtk, libsoup, libsoup-2.4, mutter}.bst: build with sysprof support




commit e055994564e7bde402a7d4dfc132abbbaaadb5cc
Author: Abderrahim Kitouni <akitouni gnome org>
Date:   Sat Aug 1 10:10:51 2020 +0100

    sdk/{gjs,glib,gtk+-3,gtk,libsoup, libsoup-2.4, mutter}.bst: build with sysprof support
    
    This commit also moves sysprof-minimal from sdk-deps to sdk.bst due to the
    sysprof-capture dependency ending up in Requires.private .pc files of modules
    that link against it, even when they statically link the library.
    
    This makes it so that pkg-config refuses to use the .pc files of
    the libraries unless sysprof-capture is also available, and thus
    forces it to be part of the Sdk now.
    
    More details can be found here:
    
    https://github.com/mesonbuild/meson/issues/3970
    
    Fixes #294

 elements/core/gnome-software.bst               |  2 +-
 elements/core/mutter.bst                       |  2 +-
 elements/core/sysprof.bst                      | 12 ++++++++++++
 elements/sdk.bst                               |  1 +
 elements/sdk/gjs.bst                           |  8 ++++++--
 elements/sdk/glib.bst                          | 12 ++++++++++++
 elements/sdk/gtk+-3.bst                        |  2 ++
 elements/sdk/gtk.bst                           |  2 ++
 elements/sdk/libsoup-2.4.bst                   |  3 ++-
 elements/sdk/libsoup.bst                       |  3 ++-
 elements/{sdk-deps => sdk}/sysprof-minimal.bst |  0
 11 files changed, 41 insertions(+), 6 deletions(-)
---
diff --git a/elements/core/gnome-software.bst b/elements/core/gnome-software.bst
index 92e1e0c2..ae9e8c4d 100644
--- a/elements/core/gnome-software.bst
+++ b/elements/core/gnome-software.bst
@@ -5,7 +5,7 @@ sources:
   track: main
 build-depends:
 - sdk/gtk-doc.bst
-- sdk-deps/sysprof-minimal.bst
+- sdk/sysprof-minimal.bst
 - freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
 depends:
 - core-deps/appstream.bst
diff --git a/elements/core/mutter.bst b/elements/core/mutter.bst
index 12f24eeb..cb4dc4be 100644
--- a/elements/core/mutter.bst
+++ b/elements/core/mutter.bst
@@ -41,4 +41,4 @@ depends:
 variables:
   meson-local: >-
     -Dxwayland_initfd=disabled
-    -Dprofiler=false
+    -Dprofiler=true
diff --git a/elements/core/sysprof.bst b/elements/core/sysprof.bst
index de1f7436..2bb8c73b 100644
--- a/elements/core/sysprof.bst
+++ b/elements/core/sysprof.bst
@@ -14,3 +14,15 @@ depends:
 - sdk/gtk+-3.bst
 - freedesktop-sdk.bst:components/polkit.bst
 - freedesktop-sdk.bst:bootstrap-import.bst
+
+public:
+  bst:
+    # This might overlap with sysprof-minimal as due to some pkgcofnig/meson
+    # quirkyness sysprof-capture ends up in Requires.private and now
+    # is a runtime dependency of glib so other modules can find the .pc file
+    # even though its a statically build build depency
+    # see: sdk/glib.bst
+    overlap-whitelist:
+    - '%{includedir}/sysprof-4/*.h'
+    - '%{libdir}/libsysprof-capture-4.a'
+    - '%{libdir}/pkgconfig/sysprof-capture-4.pc'
\ No newline at end of file
diff --git a/elements/sdk.bst b/elements/sdk.bst
index 51c5b864..cb67c5e5 100644
--- a/elements/sdk.bst
+++ b/elements/sdk.bst
@@ -2,6 +2,7 @@ kind: stack
 depends:
 - sdk-platform.bst
 - sdk/gtk-doc.bst
+- sdk/sysprof-minimal.bst
 - sdk/vala.bst
 - sdk/yelp-tools.bst
 
diff --git a/elements/sdk/gjs.bst b/elements/sdk/gjs.bst
index 28c1a977..191a45c3 100644
--- a/elements/sdk/gjs.bst
+++ b/elements/sdk/gjs.bst
@@ -1,11 +1,14 @@
 kind: meson
+
 sources:
 - kind: git_tag
   url: gitlab_gnome_org:GNOME/gjs.git
   track: master
+
 build-depends:
-- sdk-deps/sysprof-minimal.bst
+- sdk/sysprof-minimal.bst
 - freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
+
 depends:
 - sdk/gobject-introspection.bst
 - sdk/gtk+-3.bst
@@ -15,7 +18,8 @@ depends:
 - freedesktop-sdk.bst:bootstrap-import.bst
 variables:
   meson-local: >-
-    -Dprofiler=disabled
+    -Dprofiler=enabled
+
 public:
   bst:
     split-rules:
diff --git a/elements/sdk/glib.bst b/elements/sdk/glib.bst
index 2c149a37..158d68ba 100644
--- a/elements/sdk/glib.bst
+++ b/elements/sdk/glib.bst
@@ -15,6 +15,17 @@ runtime-depends:
 - freedesktop-sdk.bst:components/glib.bst
 
 depends:
+# sysprof-capture-4 ends up in Requires.private
+# so we either could have added sysprof-minimal
+# as a builddep to everything that depends on it
+# and its downstream users, or make it a runtime
+# depencency of glib and have it be always available
+# transiently.
+#
+# Ideally, sysprof-miniaml would be just a build dep
+# of moduels, since its already statically linked.
+# https://github.com/mesonbuild/meson/issues/3970
+- sdk/sysprof-minimal.bst
 - freedesktop-sdk.bst:components/libffi.bst
 - freedesktop-sdk.bst:components/util-linux.bst
 - freedesktop-sdk.bst:components/python3.bst
@@ -25,6 +36,7 @@ variables:
     -Dgtk_doc=false
     -Dinstalled-tests=true
     -Dselinux=disabled
+    -Dsysprof=enabled
 
 public:
   bst:
diff --git a/elements/sdk/gtk+-3.bst b/elements/sdk/gtk+-3.bst
index 45e53d8c..a1be2327 100644
--- a/elements/sdk/gtk+-3.bst
+++ b/elements/sdk/gtk+-3.bst
@@ -8,6 +8,7 @@ sources:
   path: files/gtk3-werror.patch
 
 build-depends:
+- sdk-deps/sysprof-minimal.bst
 - sdk/gobject-introspection.bst
 - sdk/gtk-doc.bst
 - freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
@@ -48,6 +49,7 @@ variables:
     -Dman=true
     -Dintrospection=true
     -Dtracker3=true
+    -Dprofiler=true
 
 public:
   bst:
diff --git a/elements/sdk/gtk.bst b/elements/sdk/gtk.bst
index 35192109..8d844dd2 100644
--- a/elements/sdk/gtk.bst
+++ b/elements/sdk/gtk.bst
@@ -7,6 +7,7 @@ sources:
 
 build-depends:
 - sdk-deps/sassc.bst
+- sdk/sysprof-minimal.bst
 - sdk/gobject-introspection.bst
 - sdk/gtk-doc.bst
 - freedesktop-sdk.bst:components/vulkan-headers.bst
@@ -36,6 +37,7 @@ variables:
     -Dbroadway-backend=true
     -Dmedia-ffmpeg=disabled
     -Dprint-cloudprint=disabled
+    -Dprofiler=true
 
 public:
   bst:
diff --git a/elements/sdk/libsoup-2.4.bst b/elements/sdk/libsoup-2.4.bst
index 6744eec3..fae5b5e5 100644
--- a/elements/sdk/libsoup-2.4.bst
+++ b/elements/sdk/libsoup-2.4.bst
@@ -6,6 +6,7 @@ sources:
   track: gnome-3-38
 
 build-depends:
+- sdk/sysprof-minimal.bst
 - sdk/gobject-introspection.bst
 - sdk/gtk-doc.bst
 - sdk/vala.bst
@@ -29,7 +30,7 @@ variables:
     -Dtls_check=false
     -Dgtk_doc=true
     -Dntlm=disabled
-    -Dsysprof=disabled
+    -Dsysprof=enabled
 
 public:
   bst:
diff --git a/elements/sdk/libsoup.bst b/elements/sdk/libsoup.bst
index bd71d6dd..6179dbe3 100644
--- a/elements/sdk/libsoup.bst
+++ b/elements/sdk/libsoup.bst
@@ -6,6 +6,7 @@ sources:
   track: master
 
 build-depends:
+- sdk/sysprof-minimal.bst
 - sdk/gobject-introspection.bst
 - sdk/gtk-doc.bst
 - sdk/vala.bst
@@ -33,7 +34,7 @@ variables:
     -Dhttp2_tests=disabled
     -Dinstalled_tests=true
     -Dntlm=disabled
-    -Dsysprof=disabled
+    -Dsysprof=enabled
     -Dtls_check=false
 
 public:
diff --git a/elements/sdk-deps/sysprof-minimal.bst b/elements/sdk/sysprof-minimal.bst
similarity index 100%
rename from elements/sdk-deps/sysprof-minimal.bst
rename to elements/sdk/sysprof-minimal.bst


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