Hi,

simple calligra patch fix to compute RAM-size correctly on OpenBSD.

Tested @amd64 with -current.

OK?

Best regards,

Rafael

Index: Makefile
===================================================================
RCS file: /cvs/ports/editors/calligra/Makefile,v
retrieving revision 1.14
diff -u -p -u -p -r1.14 Makefile
--- Makefile    19 Dec 2015 15:46:01 -0000      1.14
+++ Makefile    16 Jan 2016 15:54:06 -0000
@@ -3,6 +3,7 @@
 COMMENT =      K Desktop Environment, office suite
 HOMEPAGE =     https://www.calligra-suite.org/
 DISTNAME =     calligra-2.9.10
+REVISION =     0
 CATEGORIES =   editors
 
 DIST_SUBDIR =  kde
Index: patches/patch-krita_image_kis_image_config_cpp
===================================================================
RCS file: patches/patch-krita_image_kis_image_config_cpp
diff -N patches/patch-krita_image_kis_image_config_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-krita_image_kis_image_config_cpp      16 Jan 2016 15:54:06 
-0000
@@ -0,0 +1,24 @@
+$OpenBSD$
+
+fix KisImageConfig::totalRAM
+
+--- krita/image/kis_image_config.cpp.orig      Tue Dec  8 20:09:16 2015
++++ krita/image/kis_image_config.cpp   Sun Dec 20 22:10:57 2015
+@@ -224,7 +224,7 @@ void KisImageConfig::setSwapDir(const QString &swapDir
+ 
+ #if defined Q_OS_LINUX
+ #include <sys/sysinfo.h>
+-#elif defined Q_OS_FREEBSD
++#elif defined Q_OS_FREEBSD || defined Q_OS_OPENBSD
+ #include <sys/sysctl.h>
+ #elif defined Q_OS_WIN
+ #include <windows.h>
+@@ -248,7 +248,7 @@ 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_OPENBSD
+     u_long physmem;
+     int mib[] = {CTL_HW, HW_PHYSMEM};
+     size_t len = sizeof(physmem);

Reply via email to