pkgsrc-Changes archive

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

CVS commit: pkgsrc/graphics/digikam



Module Name:    pkgsrc
Committed By:   joerg
Date:           Tue May 26 11:27:21 UTC 2020

Modified Files:
        pkgsrc/graphics/digikam: distinfo
        pkgsrc/graphics/digikam/patches:
            patch-core_libs_kmemoryinfo_libstatgrab_kmemoryinfo_backend.cpp

Log Message:
Fix uvmexp use.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 pkgsrc/graphics/digikam/distinfo
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/graphics/digikam/patches/patch-core_libs_kmemoryinfo_libstatgrab_kmemoryinfo_backend.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/graphics/digikam/distinfo
diff -u pkgsrc/graphics/digikam/distinfo:1.50 pkgsrc/graphics/digikam/distinfo:1.51
--- pkgsrc/graphics/digikam/distinfo:1.50       Sun May 24 06:09:39 2020
+++ pkgsrc/graphics/digikam/distinfo    Tue May 26 11:27:21 2020
@@ -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 @@ SHA512 (digikam-6.4.0-03/digikam-6.4.0.t
 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

Index: pkgsrc/graphics/digikam/patches/patch-core_libs_kmemoryinfo_libstatgrab_kmemoryinfo_backend.cpp
diff -u pkgsrc/graphics/digikam/patches/patch-core_libs_kmemoryinfo_libstatgrab_kmemoryinfo_backend.cpp:1.1 
pkgsrc/graphics/digikam/patches/patch-core_libs_kmemoryinfo_libstatgrab_kmemoryinfo_backend.cpp:1.2
--- pkgsrc/graphics/digikam/patches/patch-core_libs_kmemoryinfo_libstatgrab_kmemoryinfo_backend.cpp:1.1 Sun Nov 17 09:11:21 2019
+++ pkgsrc/graphics/digikam/patches/patch-core_libs_kmemoryinfo_libstatgrab_kmemoryinfo_backend.cpp     Tue May 26 11:27:21 2020
@@ -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 @@ it actually returns the correct results.
  #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 @@ it actually returns the correct results.
      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