Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Apr 2023 23:04:24 GMT
From:      Robert Clausecker <fuz@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: da38f7128609 - main - science/minc2: fix build with -fno-common
Message-ID:  <202304112304.33BN4O9k071955@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by fuz:

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

commit da38f7128609fddf5240744354097f9eda5ce92e
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2023-04-11 00:39:34 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-04-11 23:02:43 +0000

    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(-)

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];



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304112304.33BN4O9k071955>