aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--math/ogdf/Makefile3
-rw-r--r--math/ogdf/files/patch-src_ogdf_basic_System.cpp28
2 files changed, 23 insertions, 8 deletions
diff --git a/math/ogdf/Makefile b/math/ogdf/Makefile
index 3252c0b4e5f3..abd12ea91a51 100644
--- a/math/ogdf/Makefile
+++ b/math/ogdf/Makefile
@@ -15,9 +15,6 @@ LICENSE_COMB= dual
LICENSE_FILE_GPLv2= ${WRKSRC}/LICENSE_GPL_v2.txt
LICENSE_FILE_GPLv3= ${WRKSRC}/LICENSE_GPL_v3.txt
-ONLY_FOR_ARCHS= amd64 i386
-ONLY_FOR_ARCHS_REASON= fails to compile: reports "include/cpuid.h:11:2: this header is for x86 only"
-
CONFLICTS_INSTALL= CoinMP-[0-9]*
USES= cmake compiler:c++11-lang zip
diff --git a/math/ogdf/files/patch-src_ogdf_basic_System.cpp b/math/ogdf/files/patch-src_ogdf_basic_System.cpp
index 5ff22adb014b..847f4051b2db 100644
--- a/math/ogdf/files/patch-src_ogdf_basic_System.cpp
+++ b/math/ogdf/files/patch-src_ogdf_basic_System.cpp
@@ -1,6 +1,6 @@
---- src/ogdf/basic/System.cpp.orig 2015-05-29 15:36:49 UTC
+--- src/ogdf/basic/System.cpp.orig 2020-02-09 22:05:19 UTC
+++ src/ogdf/basic/System.cpp
-@@ -52,6 +52,13 @@
+@@ -56,6 +56,13 @@
#include <mach/vm_statistics.h>
#include <mach/mach.h>
#include <mach/machine.h>
@@ -14,7 +14,25 @@
#elif defined(OGDF_SYSTEM_UNIX)
#include <malloc.h>
#endif
-@@ -308,6 +315,40 @@ size_t System::memoryUsedByProcess()
+@@ -67,7 +74,7 @@
+ # include <fcntl.h>
+ # include <sys/time.h>
+ #endif
+-#ifdef __GNUC__
++#if defined(__GNUC__) && (defined(__amd64__) || defined(__i386__))
+ # include <cpuid.h>
+ #endif
+
+@@ -81,7 +88,7 @@ static inline void cpuid(int CPUInfo[4], int infoType)
+ uint32_t c = 0;
+ uint32_t d = 0;
+
+-# ifdef __GNUC__
++#if defined(__GNUC__) && (defined(__amd64__) || defined(__i386__))
+ __get_cpuid(infoType, &a, &b, &c, &d);
+ # endif
+
+@@ -289,6 +296,40 @@ size_t System::memoryUsedByProcess()
return 0;
}
@@ -55,9 +73,9 @@
#else
// LINUX, NOT MAC OS
long long System::physicalMemory()
-@@ -389,6 +430,19 @@ size_t System::memoryInFreelistOfMalloc(
+@@ -370,6 +411,19 @@ size_t System::memoryInFreelistOfMalloc()
{
- return mstats().chunks_free;
+ return mstats().bytes_free;
}
+
+#elif defined(OGDF_SYSTEM_FREEBSD)