Date: Wednesday, February 1, 2023 @ 23:07:03
  Author: freswa
Revision: 467781

archrelease: copy trunk to staging-x86_64

Added:
  sysprof/repos/staging-x86_64/
  
sysprof/repos/staging-x86_64/0001-libsysprof-Actually-set-spawnable-flags-to-inherit-s.patch
    (from rev 467780, 
sysprof/trunk/0001-libsysprof-Actually-set-spawnable-flags-to-inherit-s.patch)
  sysprof/repos/staging-x86_64/PKGBUILD
    (from rev 467780, sysprof/trunk/PKGBUILD)

-----------------------------------------------------------------+
 0001-libsysprof-Actually-set-spawnable-flags-to-inherit-s.patch |   26 +++
 PKGBUILD                                                        |   82 
++++++++++
 2 files changed, 108 insertions(+)

Copied: 
sysprof/repos/staging-x86_64/0001-libsysprof-Actually-set-spawnable-flags-to-inherit-s.patch
 (from rev 467780, 
sysprof/trunk/0001-libsysprof-Actually-set-spawnable-flags-to-inherit-s.patch)
===================================================================
--- 
staging-x86_64/0001-libsysprof-Actually-set-spawnable-flags-to-inherit-s.patch  
                            (rev 0)
+++ 
staging-x86_64/0001-libsysprof-Actually-set-spawnable-flags-to-inherit-s.patch  
    2023-02-01 23:07:03 UTC (rev 467781)
@@ -0,0 +1,26 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <[email protected]>
+Date: Fri, 7 Oct 2022 17:48:48 +0000
+Subject: [PATCH] libsysprof: Actually set spawnable flags to inherit stdin
+
+The code calculated flags but never actually set them on the spawnable,
+so the `inherit-stdin` property did not work.
+
+Fixes: 8799d2f0ca4a6f939e808443db14b266b2142a7f
+See: https://gitlab.gnome.org/GNOME/sysprof/-/issues/76#note_1531919
+---
+ src/libsysprof/sysprof-local-profiler.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/libsysprof/sysprof-local-profiler.c 
b/src/libsysprof/sysprof-local-profiler.c
+index 9b77de305360..59b4aba26e63 100644
+--- a/src/libsysprof/sysprof-local-profiler.c
++++ b/src/libsysprof/sysprof-local-profiler.c
+@@ -666,6 +666,7 @@ sysprof_local_profiler_start_after_auth 
(SysprofLocalProfiler *self)
+ 
+       g_ptr_array_add (env, NULL);
+ 
++      sysprof_spawnable_set_flags (spawnable, flags);
+       sysprof_spawnable_set_environ (spawnable, (const gchar * const 
*)env->pdata);
+       sysprof_spawnable_append_args (spawnable, (const gchar * const 
*)priv->spawn_argv);
+ 

Copied: sysprof/repos/staging-x86_64/PKGBUILD (from rev 467780, 
sysprof/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD                             (rev 0)
+++ staging-x86_64/PKGBUILD     2023-02-01 23:07:03 UTC (rev 467781)
@@ -0,0 +1,82 @@
+# Maintainer: Jan Alexander Steffens (heftig) <[email protected]>
+# Contributor: Sergej Pupykin <[email protected]>
+# Contributor: Geoffroy Carrier <[email protected]>
+# Contributor: Eric Belanger <[email protected]>
+# Contributor: aeolist <[email protected]>
+# Contributor: Gabriel Rauter <[email protected]>
+
+pkgbase=sysprof
+pkgname=(sysprof libsysprof-capture)
+pkgver=3.46.0
+pkgrel=4
+pkgdesc="Kernel based performance profiler"
+url="https://wiki.gnome.org/Apps/Sysprof";
+license=(GPL)
+arch=(x86_64)
+depends=(libadwaita polkit)
+makedepends=(yelp-tools git meson)
+_commit=d2b678d1d558d4ea7ec3de72a79f5a17cf5c2c2f  # tags/3.46.0^0
+source=("git+https://gitlab.gnome.org/GNOME/sysprof.git#commit=$_commit";
+        0001-libsysprof-Actually-set-spawnable-flags-to-inherit-s.patch)
+sha256sums=('SKIP'
+            'd772d116eb1e49a2aeefb22d1474314d84a07900cb2eaf449ce8cb3e75ebd8f1')
+
+pkgver() {
+  cd sysprof
+  git describe --tags | sed 's/^sysprof-//;s/[^-]*-g/r&/;s/-/+/g'
+}
+
+prepare() {
+  cd sysprof
+
+  # https://gitlab.gnome.org/GNOME/sysprof/-/merge_requests/55
+  git apply -3 
../0001-libsysprof-Actually-set-spawnable-flags-to-inherit-s.patch
+}
+
+build() {
+  # Ensure static library is non-LTO compatible
+  CFLAGS+=" -ffat-lto-objects"
+
+  arch-meson sysprof build
+  meson compile -C build
+}
+
+check() {
+  meson test -C build --print-errorlogs
+}
+
+_pick() {
+  local p="$1" f d; shift
+  for f; do
+    d="$srcdir/$p/${f#$pkgdir/}"
+    mkdir -p "$(dirname "$d")"
+    mv "$f" "$d"
+    rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
+  done
+}
+
+package_sysprof() {
+  depends+=(libsysprof-capture)
+  groups=(gnome-extra)
+
+  meson install -C build --destdir "$pkgdir"
+
+  cd "$pkgdir"
+
+  _pick capture usr/lib/libsysprof-capture-*
+  _pick capture usr/lib/pkgconfig/sysprof-capture-*
+  _pick capture 
usr/include/sysprof-*/sysprof-{address,capture,clock,collector,macros}.h
+  _pick capture 
usr/include/sysprof-*/sysprof-{platform,version,version-macros}.h
+  _pick capture 
usr/include/sysprof-*/sysprof-capture-{condition,cursor,reader,types,writer}.h
+}
+
+package_libsysprof-capture() {
+  pkgdesc+=" - capture library"
+  depends=()
+  license=(BSD)
+
+  mv capture/* "$pkgdir"
+
+  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 \
+    sysprof/src/libsysprof-capture/COPYING
+}

Reply via email to