summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@FreeBSD.org>2024-12-23 13:34:16 +0100
committerJoel Bodenmann <jbo@FreeBSD.org>2024-12-23 14:02:37 +0100
commite328e7c218833412be5537690ffd61924b128593 (patch)
treeefdefebb827067652316c680101521acd1fe02f9
parentbf6d1c5be9bb1fb1b15bde35c90b31a1560da6cc (diff)
devel/openocd: Unbreak aarch64 build
Working around an issue where upstream provided page size macros are colliding with page size macros from <machine/param.h>. PR: 283034 Reported by: Duane (parakleta@darkreality.org) (cherry picked from commit 7ff81df978340dd7d36c28c38492eb5ec7af6cb9)
-rw-r--r--devel/openocd/Makefile7
-rw-r--r--devel/openocd/files/patch-src_target_nds32__tlb.h16
2 files changed, 17 insertions, 6 deletions
diff --git a/devel/openocd/Makefile b/devel/openocd/Makefile
index f19f6b0540d4..22b500114d87 100644
--- a/devel/openocd/Makefile
+++ b/devel/openocd/Makefile
@@ -1,6 +1,6 @@
PORTNAME= openocd
DISTVERSION= 0.12.0
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= devel
MASTER_SITES= SF
@@ -11,11 +11,6 @@ WWW= https://openocd.sf.net
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
-# Note: A local patch would be feasible but upstream has removed support for the offending feature
-# implementation since their last release (0.12.0). As such, this will no longer be relevant
-# from 0.13.0 onwards. Hence we're not addressing this "limitation" right now.
-BROKEN_aarch64= fails to build: src/target/nds32_tlb.h:25:2: error: expected identifier PAGE_SIZE_4K = 0
-
USES= gmake libtool makeinfo pkgconfig tar:bzip2
GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share
diff --git a/devel/openocd/files/patch-src_target_nds32__tlb.h b/devel/openocd/files/patch-src_target_nds32__tlb.h
new file mode 100644
index 000000000000..04b1a2494ec7
--- /dev/null
+++ b/devel/openocd/files/patch-src_target_nds32__tlb.h
@@ -0,0 +1,16 @@
+--- src/target/nds32_tlb.h.orig 2022-09-18 13:46:16 UTC
++++ src/target/nds32_tlb.h
+@@ -10,6 +10,13 @@
+
+ #include "nds32.h"
+
++#ifdef PAGE_SIZE_4K
++# undef PAGE_SIZE_4K
++#endif
++#ifdef PAGE_SIZE_8K
++# undef PAGE_SIZE_8k
++#endif
++
+ enum {
+ PAGE_SIZE_4K = 0,
+ PAGE_SIZE_8K,