aboutsummaryrefslogtreecommitdiff
path: root/science/minc2
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@FreeBSD.org>2023-04-11 00:39:34 +0000
committerRobert Clausecker <fuz@FreeBSD.org>2023-04-11 23:02:43 +0000
commitda38f7128609fddf5240744354097f9eda5ce92e (patch)
tree33a141c4c63432c7a951da1517a69d04806f584d /science/minc2
parent754c811b6bf814562fa2176d64b8973ab603c027 (diff)
downloadports-da38f7128609fddf5240744354097f9eda5ce92e.tar.gz
ports-da38f7128609fddf5240744354097f9eda5ce92e.zip
science/minc2: fix build with -fno-common
Move the definition of two symbols from header to source file. This fixes the build on FreeBSD 13+.
Diffstat (limited to 'science/minc2')
-rw-r--r--science/minc2/Makefile5
-rw-r--r--science/minc2/files/patch-conversion_minctoecat_ecat__write.c12
-rw-r--r--science/minc2/files/patch-conversion_minctoecat_ecat__write.h14
3 files changed, 27 insertions, 4 deletions
diff --git a/science/minc2/Makefile b/science/minc2/Makefile
index 4d3ae192e619..60f4ed80542d 100644
--- a/science/minc2/Makefile
+++ b/science/minc2/Makefile
@@ -1,7 +1,7 @@
PORTNAME= minc
PORTVERSION= 2.2.00
DISTVERSIONPREFIX= release-
-PORTREVISION= 12
+PORTREVISION= 13
PORTEPOCH= 1
CATEGORIES= science biology
PKGNAMESUFFIX= 2
@@ -13,9 +13,6 @@ WWW= https://www.bic.mni.mcgill.ca/ServicesSoftware/MINC
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/COPYING
-BROKEN_FreeBSD_13= ld: error: duplicate symbol: matrix_errno
-BROKEN_FreeBSD_14= ld: error: duplicate symbol: matrix_errno
-
LIB_DEPENDS= libhdf5.so:science/hdf5 \
libnetcdf.so:science/netcdf
RUN_DEPENDS= bash:shells/bash
diff --git a/science/minc2/files/patch-conversion_minctoecat_ecat__write.c b/science/minc2/files/patch-conversion_minctoecat_ecat__write.c
new file mode 100644
index 000000000000..4369323f90d8
--- /dev/null
+++ b/science/minc2/files/patch-conversion_minctoecat_ecat__write.c
@@ -0,0 +1,12 @@
+--- conversion/minctoecat/ecat_write.c.orig 2023-04-11 00:36:34 UTC
++++ conversion/minctoecat/ecat_write.c
+@@ -11,6 +11,9 @@
+ #define ERROR -1
+ #define V7 70
+
++MatrixErrorCode matrix_errno;
++
++char matrix_errtxt[132];
+
+ char* dstypecode[NumDataSetTypes] =
+ { "u","s","i","a","n","pm","v8","v","p8","p","i8","S","S8","N", "FS"};
diff --git a/science/minc2/files/patch-conversion_minctoecat_ecat__write.h b/science/minc2/files/patch-conversion_minctoecat_ecat__write.h
new file mode 100644
index 000000000000..902eafc23a84
--- /dev/null
+++ b/science/minc2/files/patch-conversion_minctoecat_ecat__write.h
@@ -0,0 +1,14 @@
+--- conversion/minctoecat/ecat_write.h.orig 2023-04-11 00:36:27 UTC
++++ conversion/minctoecat/ecat_write.h
+@@ -39,9 +39,9 @@ typedef enum {
+ BitData
+ } MatrixDataType;
+
+-MatrixErrorCode matrix_errno;
++extern MatrixErrorCode matrix_errno;
+
+-char matrix_errtxt[132];
++extern char matrix_errtxt[132];
+
+ typedef struct XMAIN_HEAD {
+ char magic_number[14];