Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/digikam Fix uvmexp use.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1b00e4b83cb7
branches:  trunk
changeset: 432859:1b00e4b83cb7
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue May 26 11:27:21 2020 +0000

description:
Fix uvmexp use.

diffstat:

 graphics/digikam/distinfo                                                                |   4 +-
 graphics/digikam/patches/patch-core_libs_kmemoryinfo_libstatgrab_kmemoryinfo_backend.cpp |  81 +++++++++-
 2 files changed, 81 insertions(+), 4 deletions(-)

diffs (114 lines):

diff -r 53ab7d988fb4 -r 1b00e4b83cb7 graphics/digikam/distinfo
--- a/graphics/digikam/distinfo Tue May 26 11:27:01 2020 +0000
+++ b/graphics/digikam/distinfo Tue May 26 11:27:21 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.50 2020/05/24 06:09:39 markd Exp $
+$NetBSD: distinfo,v 1.51 2020/05/26 11:27:21 joerg Exp $
 
 SHA1 (digikam-6.4.0-03/digikam-6.4.0.tar.xz) = 6f067b31a2109f82b2e78c89fc84bd03eab30674
 RMD160 (digikam-6.4.0-03/digikam-6.4.0.tar.xz) = 818826ba0fd64785cb25297a1f4c11e0747e0eb2
@@ -6,4 +6,4 @@
 Size (digikam-6.4.0-03/digikam-6.4.0.tar.xz) = 340146992 bytes
 SHA1 (patch-core_libs_facesengine_detection_opencvfacedetector.cpp) = e5c05583c31c4d0bfc9a2b7548a7131709a50f96
 SHA1 (patch-core_libs_facesengine_recognition_dlib-dnn_dnnface_dnn__base_cv__image.h) = e3164ad2cc91232abc36b66e56806ad4a0715ee6
-SHA1 (patch-core_libs_kmemoryinfo_libstatgrab_kmemoryinfo_backend.cpp) = 2dda961ce33d535cef998a490eeb1969419cbc17
+SHA1 (patch-core_libs_kmemoryinfo_libstatgrab_kmemoryinfo_backend.cpp) = d4e4bee19424ef0af3d399822b428b274114ba46
diff -r 53ab7d988fb4 -r 1b00e4b83cb7 graphics/digikam/patches/patch-core_libs_kmemoryinfo_libstatgrab_kmemoryinfo_backend.cpp
--- a/graphics/digikam/patches/patch-core_libs_kmemoryinfo_libstatgrab_kmemoryinfo_backend.cpp  Tue May 26 11:27:01 2020 +0000
+++ b/graphics/digikam/patches/patch-core_libs_kmemoryinfo_libstatgrab_kmemoryinfo_backend.cpp  Tue May 26 11:27:21 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-core_libs_kmemoryinfo_libstatgrab_kmemoryinfo_backend.cpp,v 1.1 2019/11/17 09:11:21 markd Exp $
+$NetBSD: patch-core_libs_kmemoryinfo_libstatgrab_kmemoryinfo_backend.cpp,v 1.2 2020/05/26 11:27:21 joerg Exp $
 
 Make memory info backend compile on NetBSD.  Need to check
 it actually returns the correct results.
@@ -15,7 +15,55 @@
  #endif
  #if defined(Q_OS_OPENBSD)
  #include <sys/param.h>
-@@ -430,7 +431,7 @@ int get_mem_stats(Digikam::KMemoryInfo::
+@@ -151,7 +152,28 @@ kvm_t* sg_get_kvm2()
+ }
+ #endif // (defined(Q_OS_FREEBSD) && !defined(FREEBSD5)) || defined(DFBSD)
+ 
+-#if defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD)
++#if defined(Q_OS_NETBSD)
++struct uvmexp_sysctl* sg_get_uvmexp()
++{
++    int                  mib[2];
++    static struct uvmexp_sysctl uvm;
++    size_t               size = sizeof(uvm);
++//    struct uvmexp*       new;
++
++    mib[0] = CTL_VM;
++    mib[1] = VM_UVMEXP2;
++
++    if (sysctl(mib, 2, &uvm, &size, NULL, 0) < 0)
++    {
++        //sg_set_error_with_errno(SG_ERROR_SYSCTL, "CTL_VM.VM_UVMEXP");
++        return NULL;
++    }
++
++    return &uvm;
++}
++#endif // defined(Q_OS_NETBSD)
++
++#if defined(Q_OS_OPENBSD)
+ struct uvmexp* sg_get_uvmexp()
+ {
+     int                  mib[2];
+@@ -170,7 +192,7 @@ struct uvmexp* sg_get_uvmexp()
+ 
+     return &uvm;
+ }
+-#endif // defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD)
++#endif // defined(Q_OS_OPENBSD)
+ 
+ #ifdef Q_OS_HPUX
+ struct pst_KMemoryInfo::static* sg_get_pstat_static()
+@@ -229,7 +251,7 @@ int get_mem_stats(Digikam::KMemoryInfo::
+ #endif // defined(Q_OS_FREEBSD) || defined(Q_OS_DFBSD)
+ 
+ #if defined(Q_OS_NETBSD)
+-    struct uvmexp* uvm = 0;
++    struct uvmexp_sysctl* uvm = 0;
+ #endif // defined(Q_OS_NETBSD)
+ 
+ #if defined(Q_OS_OPENBSD)
+@@ -430,7 +452,7 @@ int get_mem_stats(Digikam::KMemoryInfo::
  
      data->totalRam = uvm->pagesize * uvm->npages;
      data->cacheRam = uvm->pagesize * (uvm->filepages + uvm->execpages);
@@ -24,3 +72,32 @@
      data->usedRam  = data->totalRam - data->freeRam;
  
      return 1;
+@@ -540,7 +562,12 @@ int get_mem_stats(Digikam::KMemoryInfo::
+ #endif
+ #include <unistd.h>
+ #endif
+-#if defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD)
++#if defined(Q_OS_NETBSD)
++#include <sys/param.h>
++#include <sys/time.h>
++#include <uvm/uvm_extern.h>
++#include <unistd.h>
++#elif defined(Q_OS_OPENBSD)
+ #include <sys/param.h>
+ #include <sys/time.h>
+ #include <uvm/uvm.h>
+@@ -593,9 +620,12 @@ int get_swap_stats(Digikam::KMemoryInfo:
+ 
+ #endif // defined(Q_OS_FREEBSD)
+ 
+-#if defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD)
++#if defined(Q_OS_OPENBSD)
+     struct uvmexp* uvm = 0;
+-#endif // defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD)
++#endif // defined(Q_OS_OPENBSD)
++#if defined(Q_OS_NETBSD)
++    struct uvmexp_sysctl* uvm = 0;
++#endif // defined(Q_OS_NETBSD)
+ 
+ #ifdef Q_OS_WIN
+     MEMORYSTATUSEX memstats;



Home | Main Index | Thread Index | Old Index