Control: tags 1024218 + patch
Control: tags 1024218 + pending

Dear maintainer,

I've prepared an NMU for apitrace (versioned as 11.1+repack-1.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

Cheers
-- 
Sebastian Ramacher
diff -Nru apitrace-11.1+repack/debian/changelog apitrace-11.1+repack/debian/changelog
--- apitrace-11.1+repack/debian/changelog	2022-05-25 15:54:07.000000000 +0200
+++ apitrace-11.1+repack/debian/changelog	2022-12-24 13:13:35.000000000 +0100
@@ -1,3 +1,10 @@
+apitrace (11.1+repack-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/: Switch to libproc2-dev (Closes: #1024218)
+
+ -- Sebastian Ramacher <sramac...@debian.org>  Sat, 24 Dec 2022 13:13:35 +0100
+
 apitrace (11.1+repack-1) unstable; urgency=medium
 
   [ David Heidelberg ]
diff -Nru apitrace-11.1+repack/debian/control apitrace-11.1+repack/debian/control
--- apitrace-11.1+repack/debian/control	2022-05-25 15:54:07.000000000 +0200
+++ apitrace-11.1+repack/debian/control	2022-12-24 13:13:25.000000000 +0100
@@ -19,7 +19,7 @@
  libsnappy-dev,
  libpng-dev,
  libbsd-dev,
- libprocps-dev,
+ libproc2-dev,
  libgtest-dev,
 Standards-Version: 4.6.0
 Homepage: https://apitrace.github.io
diff -Nru apitrace-11.1+repack/debian/patches/libproc-2.patch apitrace-11.1+repack/debian/patches/libproc-2.patch
--- apitrace-11.1+repack/debian/patches/libproc-2.patch	1970-01-01 01:00:00.000000000 +0100
+++ apitrace-11.1+repack/debian/patches/libproc-2.patch	2022-12-24 13:13:35.000000000 +0100
@@ -0,0 +1,88 @@
+Description: Build for libproc2
+ Replace libprocps with libproc2
+Author: Craig Small <csm...@debian.org>
+Reviewed-by: Craig Small <csm...@debian.org>
+Last-Update: 2022-11-16
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: apitrace-11.1+repack/lib/os/os_memory.hpp
+===================================================================
+--- apitrace-11.1+repack.orig/lib/os/os_memory.hpp
++++ apitrace-11.1+repack/lib/os/os_memory.hpp
+@@ -30,13 +30,46 @@
+ 
+ #pragma once
+ 
+-#ifdef HAVE_READPROC_H
++#ifdef HAVE_LIBPROC2_PIDS_H
++#include <libproc2/pids.h>
++#elif defined(HAVE_READPROC_H)
+ #include <proc/readproc.h>
+ #endif
+ 
+ namespace os {
+ 
+-#if defined(HAVE_READPROC_H)
++#ifdef HAVE_LIBPROC2_PIDS_H
++    inline long long
++    getVsize(void) {
++        enum pids_item Item[] = {PIDS_VSIZE_BYTES};
++        struct pids_info *info = NULL;
++        struct pids_stack *stack;
++        unsigned long value=0;
++        if (
++            (procps_pids_new(&info, Item, 1) == 0) &&
++            ((stack = fatal_proc_unmounted(info, 1)) == NULL)) {
++            value = PIDS_VAL(0, ul_int, stack, info);
++        }
++        procps_pids_unref(&info);
++        return value;
++    }
++
++    inline long long
++    getRss(void) {
++        enum pids_item Item[] = {PIDS_RSS};
++        struct pids_info *info = NULL;
++        struct pids_stack *stack;
++        unsigned long value=0;
++        if (
++            (procps_pids_new(&info, Item, 1) == 0) &&
++            ((stack = fatal_proc_unmounted(info, 1)) == NULL)) {
++            value = PIDS_VAL(0, ul_int, stack, info);
++        }
++        procps_pids_unref(&info);
++        return value;
++    }
++
++#elif defined(HAVE_READPROC_H)
+ 
+     inline long long
+     getVsize(void) {
+Index: apitrace-11.1+repack/CMakeLists.txt
+===================================================================
+--- apitrace-11.1+repack.orig/CMakeLists.txt
++++ apitrace-11.1+repack/CMakeLists.txt
+@@ -490,6 +490,10 @@ if (NOT WIN32 AND NOT ENABLE_STATIC_EXE)
+     if (PKG_CONFIG_FOUND)
+         pkg_check_modules (BROTLIDEC IMPORTED_TARGET libbrotlidec>=1.0.7)
+         pkg_check_modules (BROTLIENC IMPORTED_TARGET libbrotlienc>=1.0.7)
++        pkg_check_modules (LIBPROC2 IMPORTED_TARGET libproc2)
++        if (LIBPROC2_FOUND)
++            add_definitions (-DHAVE_LIBPROC2_PIDS_H)
++        endif ()
+     endif ()
+ 
+     find_package (GTest)
+Index: apitrace-11.1+repack/lib/os/CMakeLists.txt
+===================================================================
+--- apitrace-11.1+repack.orig/lib/os/CMakeLists.txt
++++ apitrace-11.1+repack/lib/os/CMakeLists.txt
+@@ -38,3 +38,8 @@ if (BUILD_TESTING)
+     add_gtest (os_thread_test os_thread_test.cpp)
+     target_link_libraries (os_thread_test os)
+ endif ()
++
++if (LIBPROC2_FOUND)
++    target_link_libraries(os PUBLIC PkgConfig::LIBPROC2)
++endif ()
++
diff -Nru apitrace-11.1+repack/debian/patches/series apitrace-11.1+repack/debian/patches/series
--- apitrace-11.1+repack/debian/patches/series	2022-05-25 15:54:07.000000000 +0200
+++ apitrace-11.1+repack/debian/patches/series	2022-12-24 13:13:18.000000000 +0100
@@ -4,3 +4,4 @@
 highlight.py-fix1.patch
 highlight.py-fix2.patch
 disable-submodule-check.patch
+libproc-2.patch

Reply via email to