From da38f7128609fddf5240744354097f9eda5ce92e Mon Sep 17 00:00:00 2001 From: Robert Clausecker Date: Tue, 11 Apr 2023 02:39:34 +0200 Subject: 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+. --- science/minc2/Makefile | 5 +---- .../minc2/files/patch-conversion_minctoecat_ecat__write.c | 12 ++++++++++++ .../minc2/files/patch-conversion_minctoecat_ecat__write.h | 14 ++++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 science/minc2/files/patch-conversion_minctoecat_ecat__write.c create mode 100644 science/minc2/files/patch-conversion_minctoecat_ecat__write.h 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]; -- cgit v1.2.3