pkgsrc-WIP-changes archive

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

calligra: patch to detect RAM



Module Name:	pkgsrc-wip
Committed By:	coypu <coypu%sdf.org@localhost>
Pushed By:	coypu
Date:		Wed Feb 17 17:55:40 2016 +0200
Changeset:	88d973fec7ffcc4a6925c55cd1399b39f348cbb1

Modified Files:
	calligra/distinfo
Added Files:
	calligra/patches/patch-krita_image_kis__image__config.cpp

Log Message:
calligra: patch to detect RAM

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=88d973fec7ffcc4a6925c55cd1399b39f348cbb1

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

diffstat:
 calligra/distinfo                                  |  1 +
 .../patch-krita_image_kis__image__config.cpp       | 30 ++++++++++++++++++++++
 2 files changed, 31 insertions(+)

diffs:
diff --git a/calligra/distinfo b/calligra/distinfo
index 51870cf..3ae3dc2 100644
--- a/calligra/distinfo
+++ b/calligra/distinfo
@@ -5,4 +5,5 @@ RMD160 (calligra-2.9.9.tar.xz) = e737998aeac5f531f1290bb074aa6ec45c864055
 SHA512 (calligra-2.9.9.tar.xz) = 09b221502dc2c1d48ee5f783da515a1a53ffc7456b45b271e8de846430ad1254ce12c39baf7f0e220a6ccef4e5bc02da05e211d300caa948905b5d0c766068e5
 Size (calligra-2.9.9.tar.xz) = 194657892 bytes
 SHA1 (patch-3rdparty_google-breakpad_src_third_party_protobuf_protobuf_post_process_dist.sh) = 94a37a5095d8864fc426453625dbb5f62b087dc7
+SHA1 (patch-krita_image_kis__image__config.cpp) = 3e38bfe21ca12fa810630eb13eadd800959e3fe0
 SHA1 (patch-krita_plugins_formats_xcf_3rdparty_xcftools_config.h) = e040804bfef8c1e10d722b2862c25aaff947da73
diff --git a/calligra/patches/patch-krita_image_kis__image__config.cpp b/calligra/patches/patch-krita_image_kis__image__config.cpp
new file mode 100644
index 0000000..e0d18b9
--- /dev/null
+++ b/calligra/patches/patch-krita_image_kis__image__config.cpp
@@ -0,0 +1,30 @@
+$NetBSD$
+
+Correctly detect total RAM for NetBSD, OpenBSD too.
+
+--- krita/image/kis_image_config.cpp.orig	2015-11-02 13:52:01.000000000 +0000
++++ krita/image/kis_image_config.cpp
+@@ -224,7 +224,7 @@ void KisImageConfig::setSwapDir(const QS
+ 
+ #if defined Q_OS_LINUX
+ #include <sys/sysinfo.h>
+-#elif defined Q_OS_FREEBSD
++#elif defined Q_OS_FREEBSD || defined Q_OS_NETBSD || defined Q_OS_OPENBSD
+ #include <sys/sysctl.h>
+ #elif defined Q_OS_WIN
+ #include <windows.h>
+@@ -248,9 +248,13 @@ int KisImageConfig::totalRAM()
+     if(!error) {
+         totalMemory = info.totalram * info.mem_unit / (1UL << 20);
+     }
+-#elif defined Q_OS_FREEBSD
++#elif defined Q_OS_FREEBSD || defined Q_OS_NETBSD || defined Q_OS_OPENBSD
+     u_long physmem;
++#   if defined HW_PHYSMEM64
++    int mib[] = {CTL_HW, HW_PHYSMEM64};
++#   else
+     int mib[] = {CTL_HW, HW_PHYSMEM};
++#   endif
+     size_t len = sizeof(physmem);
+ 
+     error = sysctl(mib, 2, &physmem, &len, NULL, 0);


Home | Main Index | Thread Index | Old Index