[gnome-build-meta/abderrahim/sysprof-agent: 2/2] enable sysprof-agent and add it to the sdk




commit f1688ac7f08a7091e44748649088250438899292
Author: Abderrahim Kitouni <abderrahim kitouni codethink co uk>
Date:   Sat Jul 23 11:11:52 2022 +0200

    enable sysprof-agent and add it to the sdk

 elements/core/gnome-builder.bst                   |  2 +-
 elements/core/meta-gnome-core-developer-tools.bst |  2 +-
 elements/core/mutter.bst                          |  2 +-
 elements/core/sysprof-app.bst                     | 29 +++++++++++++++++++++++
 elements/{core => sdk-deps}/sysprof.bst           | 10 ++++++++
 elements/sdk.bst                                  |  1 +
 elements/sdk/sysprof-agent.bst                    | 15 ++++++++++++
 elements/sdk/sysprof-minimal.bst                  |  1 +
 8 files changed, 59 insertions(+), 3 deletions(-)
---
diff --git a/elements/core/gnome-builder.bst b/elements/core/gnome-builder.bst
index fc590d091..58dfaa67e 100644
--- a/elements/core/gnome-builder.bst
+++ b/elements/core/gnome-builder.bst
@@ -28,7 +28,7 @@ depends:
 - core-deps/vte.bst
 - core/dspy.bst
 - core/gvfs-daemon.bst
-- core/sysprof.bst
+- core/sysprof-app.bst
 - sdk/glib.bst
 - sdk/gtk.bst
 - sdk/gtksourceview.bst
diff --git a/elements/core/meta-gnome-core-developer-tools.bst 
b/elements/core/meta-gnome-core-developer-tools.bst
index 53cbaa0eb..e3de2e146 100644
--- a/elements/core/meta-gnome-core-developer-tools.bst
+++ b/elements/core/meta-gnome-core-developer-tools.bst
@@ -9,4 +9,4 @@ depends:
 - core/dspy.bst
 - core/gnome-boxes.bst
 - core/gnome-builder.bst
-- core/sysprof.bst
+- core/sysprof-app.bst
diff --git a/elements/core/mutter.bst b/elements/core/mutter.bst
index bcc4b73cd..01ae71cb4 100644
--- a/elements/core/mutter.bst
+++ b/elements/core/mutter.bst
@@ -8,7 +8,7 @@ sources:
 build-depends:
 # Need the whole thing over just the capture for the dbus interface.
 # /usr/share/dbus-1/interfaces/org.gnome.Sysprof3.Profiler.xml
-- core/sysprof.bst
+- core/sysprof-app.bst
 - core-deps/libxcvt.bst
 - sdk/gtk-doc.bst
 - freedesktop-sdk.bst:public-stacks/buildsystem-meson.bst
diff --git a/elements/core/sysprof-app.bst b/elements/core/sysprof-app.bst
new file mode 100644
index 000000000..aea13b789
--- /dev/null
+++ b/elements/core/sysprof-app.bst
@@ -0,0 +1,29 @@
+kind: filter
+
+build-depends:
+- sdk-deps/sysprof.bst
+
+runtime-depends:
+- sdk/adwaita-icon-theme.bst
+- sdk/glib.bst
+- sdk/gtk.bst
+- sdk/libadwaita.bst
+- freedesktop-sdk.bst:components/libunwind.bst
+- freedesktop-sdk.bst:components/polkit.bst
+- freedesktop-sdk.bst:bootstrap-import.bst
+
+config:
+  exclude:
+  - sysprof-agent
+
+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 dependency
+    # see: sdk/glib.bst
+    overlap-whitelist:
+    - '%{includedir}/sysprof-4/*.h'
+    - '%{libdir}/libsysprof-capture-4.a'
+    - '%{libdir}/pkgconfig/sysprof-capture-4.pc'
diff --git a/elements/core/sysprof.bst b/elements/sdk-deps/sysprof.bst
similarity index 79%
rename from elements/core/sysprof.bst
rename to elements/sdk-deps/sysprof.bst
index 99c1ec3f2..1d30d5fa1 100644
--- a/elements/core/sysprof.bst
+++ b/elements/sdk-deps/sysprof.bst
@@ -13,10 +13,15 @@ runtime-depends:
 depends:
 - sdk/gtk.bst
 - sdk/libadwaita.bst
+- sdk/json-glib.bst
 - freedesktop-sdk.bst:components/libunwind.bst
 - freedesktop-sdk.bst:components/polkit.bst
 - freedesktop-sdk.bst:bootstrap-import.bst
 
+variables:
+  meson-local: >-
+    -Dagent=true
+
 public:
   bst:
     # This might overlap with sysprof-minimal as due to some pkgcofnig/meson
@@ -28,3 +33,8 @@ public:
     - '%{includedir}/sysprof-4/*.h'
     - '%{libdir}/libsysprof-capture-4.a'
     - '%{libdir}/pkgconfig/sysprof-capture-4.pc'
+    split-rules:
+      sysprof-agent:
+      - '%{bindir}/sysprof-agent'
+      - '%{libdir}/libsysprof-memory-4.so'
+      - '%{libdir}/libsysprof-speedtrack-4.so'
diff --git a/elements/sdk.bst b/elements/sdk.bst
index 585e7a76e..6e0cc762f 100644
--- a/elements/sdk.bst
+++ b/elements/sdk.bst
@@ -7,6 +7,7 @@ kind: stack
 depends:
 - sdk-platform.bst
 - sdk/gtk-doc.bst
+- sdk/sysprof-agent.bst
 - sdk/sysprof-minimal.bst
 - sdk/vala.bst
 - sdk/yelp-tools.bst
diff --git a/elements/sdk/sysprof-agent.bst b/elements/sdk/sysprof-agent.bst
new file mode 100644
index 000000000..6209dc86b
--- /dev/null
+++ b/elements/sdk/sysprof-agent.bst
@@ -0,0 +1,15 @@
+kind: filter
+
+build-depends:
+- sdk-deps/sysprof.bst
+
+runtime-depends:
+- sdk/glib.bst
+- sdk/json-glib.bst
+- freedesktop-sdk.bst:components/libunwind.bst
+- freedesktop-sdk.bst:bootstrap-import.bst
+
+config:
+  include:
+  - sysprof-agent
+  include-orphans: false
diff --git a/elements/sdk/sysprof-minimal.bst b/elements/sdk/sysprof-minimal.bst
index 96a9b5c05..fb3534486 100644
--- a/elements/sdk/sysprof-minimal.bst
+++ b/elements/sdk/sysprof-minimal.bst
@@ -11,6 +11,7 @@ depends:
 
 variables:
   meson-local: >-
+    -Dagent=false
     -Dexamples=false
     -Dgtk=false
     -Dtests=false


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