svn commit: r568007 - in head/math/ogdf: . files

Piotr Kubaj pkubaj at FreeBSD.org
Wed Mar 10 14:37:09 UTC 2021


Author: pkubaj
Date: Wed Mar 10 14:37:08 2021
New Revision: 568007
URL: https://svnweb.freebsd.org/changeset/ports/568007

Log:
  math/ogdf: fix build on non-x86
  
  Don't use cpuid on non-x86.

Modified:
  head/math/ogdf/Makefile
  head/math/ogdf/files/patch-src_ogdf_basic_System.cpp

Modified: head/math/ogdf/Makefile
==============================================================================
--- head/math/ogdf/Makefile	Wed Mar 10 14:29:15 2021	(r568006)
+++ head/math/ogdf/Makefile	Wed Mar 10 14:37:08 2021	(r568007)
@@ -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

Modified: head/math/ogdf/files/patch-src_ogdf_basic_System.cpp
==============================================================================
--- head/math/ogdf/files/patch-src_ogdf_basic_System.cpp	Wed Mar 10 14:29:15 2021	(r568006)
+++ head/math/ogdf/files/patch-src_ogdf_basic_System.cpp	Wed Mar 10 14:37:08 2021	(r568007)
@@ -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)


More information about the svn-ports-head mailing list