git: eb1bbca9e5e1 - main - biology/muscle: fix build on non arm64 / amd64

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Fri, 11 Sep 2026 12:49:53 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=eb1bbca9e5e165c03ce784fea6b8cc5a41f0aed9

commit eb1bbca9e5e165c03ce784fea6b8cc5a41f0aed9
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-08-29 19:52:24 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-09-11 12:48:58 +0000

    biology/muscle: fix build on non arm64 / amd64
    
    myutils.cpp:1105:17: error: use of undeclared identifier 'physmem'
     1105 |         return (double)physmem;
---
 biology/muscle/files/patch-src__myutils.cpp | 13 ++++---------
 biology/muscle/files/patch-src__myutils.h   | 11 +++++++++++
 biology/muscle/files/patch-src__timing.h    | 21 +++++++++++++++++++++
 3 files changed, 36 insertions(+), 9 deletions(-)

diff --git a/biology/muscle/files/patch-src__myutils.cpp b/biology/muscle/files/patch-src__myutils.cpp
index 68b2a4eacfed..75925719ba97 100644
--- a/biology/muscle/files/patch-src__myutils.cpp
+++ b/biology/muscle/files/patch-src__myutils.cpp
@@ -1,6 +1,6 @@
 --- myutils.cpp.orig	2022-01-13 23:29:59 UTC
 +++ myutils.cpp
-@@ -1050,7 +1050,62 @@
+@@ -1050,6 +1050,57 @@ double GetMemUseBytes()
  		g_PeakMemUseBytes = Bytes;
  	return Bytes;
  	}
@@ -10,7 +10,7 @@
 +#include <sys/sysctl.h>
 +#include <sys/user.h>
 +#include <unistd.h>
- 
++
 +double GetMemUseBytes()
 +	{
 +	static int initialized = 0;
@@ -44,11 +44,7 @@
 +
 +double GetPhysMemBytes()
 +	{
-+ 	#if BITS == 32
-+	unsigned int physmem32 = 0;
-+	#else
-+	uint64_t physmem = 0;
-+	#endif
++	unsigned long physmem = 0;
 +
 +	size_t len = sizeof(physmem);
 +
@@ -59,7 +55,6 @@
 +	return (double)physmem;
 +
 +	}
-+
+ 
  #elif defined(__MACH__)
  #include <memory.h>
- #include <stdlib.h>
diff --git a/biology/muscle/files/patch-src__myutils.h b/biology/muscle/files/patch-src__myutils.h
new file mode 100644
index 000000000000..d39df958137e
--- /dev/null
+++ b/biology/muscle/files/patch-src__myutils.h
@@ -0,0 +1,11 @@
+--- myutils.h.orig	2026-08-29 19:37:51 UTC
++++ myutils.h
+@@ -11,7 +11,7 @@
+ #define TRACK_ALLOC		0
+ #define ALLOC_TOTALS	0
+ 
+-#if defined(__x86_64__) || defined(_M_X64) || defined(__arm64__)
++#if defined(__x86_64__) || defined(_M_X64) || defined(__arm64__) || defined(__LP64__)
+ #define	BITS			64
+ #else
+ #define	BITS			32
diff --git a/biology/muscle/files/patch-src__timing.h b/biology/muscle/files/patch-src__timing.h
new file mode 100644
index 000000000000..4d48299d0b47
--- /dev/null
+++ b/biology/muscle/files/patch-src__timing.h
@@ -0,0 +1,21 @@
+--- timing.h.orig	2026-08-29 19:42:39 UTC
++++ timing.h
+@@ -17,14 +17,14 @@ __inline__ uint64_t GetClockTicks()
+ 	}
+ 
+ #elif __GNUC__
++#include <time.h>
+ 
+ typedef uint64_t TICKS;
+ __inline__ uint64_t GetClockTicks()
+ 	{
+-	uint32_t lo, hi;
+-	/* We cannot use "=A", since this would use %rax on x86_64 */
+-	__asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
+-	return (uint64_t)hi << 32 | lo;
++	struct timespec ts;
++	clock_gettime(CLOCK_MONOTONIC, &ts);
++	return (uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec;
+ 	}
+ 
+ #else