Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Apr 2024 07:20:16 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 2230bc91a5d4 - main - science/cdo: Update to 2.4.0
Message-ID:  <202404100720.43A7KGIF086908@gitrepo.freebsd.org>

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

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

commit 2230bc91a5d476af787be1e27882055d4d4c5f30
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-04-10 07:11:29 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-04-10 07:11:29 +0000

    science/cdo: Update to 2.4.0
    
    - Clean up sparc64 patch (PTHREAD_MUTEXATTR)
    
    Changes:        https://code.mpimet.mpg.de/projects/cdo/news
---
 science/cdo/Makefile                               |  9 +++--
 science/cdo/distinfo                               |  6 ++--
 science/cdo/files/patch-libcdi-src-cdilib.c        | 31 -----------------
 science/cdo/files/patch-libcdi-src-namespace.c     | 16 ---------
 .../cdo/files/patch-libcdi-src-resource_handle.c   | 17 ----------
 science/cdo/files/patch-libcdi_src_cgribexlib.c    | 39 ----------------------
 science/cdo/files/patch-powerpc64                  | 39 ++++++++++++++++++++++
 7 files changed, 46 insertions(+), 111 deletions(-)

diff --git a/science/cdo/Makefile b/science/cdo/Makefile
index 3e0140edccfc..86b8be0b7540 100644
--- a/science/cdo/Makefile
+++ b/science/cdo/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	cdo
-PORTVERSION=	2.3.0
+PORTVERSION=	2.4.0
 CATEGORIES=	science
-MASTER_SITES=	https://code.mpimet.mpg.de/attachments/download/29019/ \
+MASTER_SITES=	https://code.mpimet.mpg.de/attachments/download/29313/ \
 		LOCAL/sunpoet
 
 MAINTAINER=	sunpoet@FreeBSD.org
@@ -22,9 +22,8 @@ UUID_DESC=	UUID support
 
 PORTSCOUT=	site:https://code.mpimet.mpg.de/projects/cdo/files
 
-USES=		compiler:c++17-lang gmake libtool localbase pathfix python:build
+USES=		compiler:c++20-lang gmake libtool localbase pathfix python:build
 
-CFLAGS+=	-DPTHREAD_MUTEXATTR
 CONFIGURE_ARGS=	--disable-data \
 		--disable-extra \
 		--disable-fortran \
@@ -39,7 +38,7 @@ GNU_CONFIGURE=	yes
 INSTALL_TARGET=	install-strip
 MAKE_JOBS_UNSAFE=	yes
 TEST_TARGET=	check
-USE_CXXSTD=	c++17
+USE_CXXSTD=	c++20
 USE_LDCONFIG=	yes
 
 CGRIBEX_CONFIGURE_WITH=	cgribex
diff --git a/science/cdo/distinfo b/science/cdo/distinfo
index 0d36acd41ad5..31705ed5009b 100644
--- a/science/cdo/distinfo
+++ b/science/cdo/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1708448952
-SHA256 (cdo-2.3.0.tar.gz) = 10c878227baf718a6917837527d4426c2d0022cfac4457c65155b9c57f091f6b
-SIZE (cdo-2.3.0.tar.gz) = 13588973
+TIMESTAMP = 1712644648
+SHA256 (cdo-2.4.0.tar.gz) = a4790fb8cc07f353b11f9bbe49218b8e4be8e5ae56aade8420bad390510b4d2c
+SIZE (cdo-2.4.0.tar.gz) = 13497565
diff --git a/science/cdo/files/patch-libcdi-src-cdilib.c b/science/cdo/files/patch-libcdi-src-cdilib.c
deleted file mode 100644
index 03eb7c4a2349..000000000000
--- a/science/cdo/files/patch-libcdi-src-cdilib.c
+++ /dev/null
@@ -1,31 +0,0 @@
---- libcdi/src/cdilib.c.orig	2023-04-18 19:43:48 UTC
-+++ libcdi/src/cdilib.c
-@@ -34701,11 +34701,13 @@ static pthread_mutex_t namespaceMutex;
- static void
- namespaceInitialize(void)
- {
-+#if defined(PTHREAD_MUTEXATTR)
-   pthread_mutexattr_t ma;
-   pthread_mutexattr_init(&ma);
-   pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE);
-   pthread_mutex_init(&namespaceMutex, &ma);
-   pthread_mutexattr_destroy(&ma);
-+#endif
- }
- 
- #define NAMESPACE_LOCK() pthread_mutex_lock(&namespaceMutex)
-@@ -35276,12 +35278,14 @@ static void
- listInitialize(void)
- {
- #if defined(HAVE_LIBPTHREAD)
-+#if defined(PTHREAD_MUTEXATTR)
-   pthread_mutexattr_t ma;
-   pthread_mutexattr_init(&ma);
-   pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE);
-   /* initialize global API mutex lock */
-   pthread_mutex_init(&listMutex, &ma);
-   pthread_mutexattr_destroy(&ma);
-+#endif
- #endif
-   /* file is special and has its own table, which needs to be
-    * created, before we register the listDestroy exit handler */
diff --git a/science/cdo/files/patch-libcdi-src-namespace.c b/science/cdo/files/patch-libcdi-src-namespace.c
deleted file mode 100644
index 8255c3117422..000000000000
--- a/science/cdo/files/patch-libcdi-src-namespace.c
+++ /dev/null
@@ -1,16 +0,0 @@
---- libcdi/src/namespace.c.orig	2023-04-16 12:23:50 UTC
-+++ libcdi/src/namespace.c
-@@ -99,11 +99,13 @@ static pthread_mutex_t namespaceMutex;
- static void
- namespaceInitialize(void)
- {
-+#if defined(PTHREAD_MUTEXATTR)
-   pthread_mutexattr_t ma;
-   pthread_mutexattr_init(&ma);
-   pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE);
-   pthread_mutex_init(&namespaceMutex, &ma);
-   pthread_mutexattr_destroy(&ma);
-+#endif
- }
- 
- #define NAMESPACE_LOCK() pthread_mutex_lock(&namespaceMutex)
diff --git a/science/cdo/files/patch-libcdi-src-resource_handle.c b/science/cdo/files/patch-libcdi-src-resource_handle.c
deleted file mode 100644
index d5003822c965..000000000000
--- a/science/cdo/files/patch-libcdi-src-resource_handle.c
+++ /dev/null
@@ -1,17 +0,0 @@
---- libcdi/src/resource_handle.c.orig	2023-04-16 12:23:50 UTC
-+++ libcdi/src/resource_handle.c
-@@ -288,12 +288,14 @@ static void
- listInitialize(void)
- {
- #if defined(HAVE_LIBPTHREAD)
-+#if defined(PTHREAD_MUTEXATTR)
-   pthread_mutexattr_t ma;
-   pthread_mutexattr_init(&ma);
-   pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_RECURSIVE);
-   /* initialize global API mutex lock */
-   pthread_mutex_init(&listMutex, &ma);
-   pthread_mutexattr_destroy(&ma);
-+#endif
- #endif
-   /* file is special and has its own table, which needs to be
-    * created, before we register the listDestroy exit handler */
diff --git a/science/cdo/files/patch-libcdi_src_cgribexlib.c b/science/cdo/files/patch-libcdi_src_cgribexlib.c
deleted file mode 100644
index 1792d73ad1d1..000000000000
--- a/science/cdo/files/patch-libcdi_src_cgribexlib.c
+++ /dev/null
@@ -1,39 +0,0 @@
---- libcdi/src/cgribexlib.c.orig	2023-04-16 12:23:50 UTC
-+++ libcdi/src/cgribexlib.c
-@@ -12,7 +12,7 @@
- #pragma GCC diagnostic warning "-Wstrict-overflow"
- #endif
- 
--#ifdef _ARCH_PWR6
-+#if defined(_ARCH_PWR6) && defined(__GLIBC__)
- #pragma options nostrict
- #include <ppu_intrinsics.h>
- #endif
-@@ -749,21 +749,21 @@ void pwr6_minmax_val_double_unrolled6(const double *re
-       {
- 	for (size_t j = 0; j < __UNROLL_DEPTH_1; ++j) 
- 	  {
--	    dmin[j] = __fsel(dmin[j] - data[i+j], data[i+j], dmin[j]);
--	    dmax[j] = __fsel(data[i+j] - dmax[j], data[i+j], dmax[j]);
-+	    dmin[j] = __builtin_ppc_fsel(dmin[j] - data[i+j], data[i+j], dmin[j]);
-+	    dmax[j] = __builtin_ppc_fsel(data[i+j] - dmax[j], data[i+j], dmax[j]);
- 	  }
-       }
- 
-     for (size_t j = 0; j < residual; ++j) 
-       {
--	dmin[j] = __fsel(dmin[j] - data[ofs+j], data[ofs+j], dmin[j]);
--	dmax[j] = __fsel(data[ofs+j] - dmax[j], data[ofs+j], dmax[j]);
-+	dmin[j] = __builtin_ppc_fsel(dmin[j] - data[ofs+j], data[ofs+j], dmin[j]);
-+	dmax[j] = __builtin_ppc_fsel(data[ofs+j] - dmax[j], data[ofs+j], dmax[j]);
-       }
- 
-     for (size_t j = 0; j < __UNROLL_DEPTH_1; ++j) 
-       {
--	*fmin = __fsel(*fmin - dmin[j], dmin[j], *fmin);
--	*fmax = __fsel(dmax[j] - *fmax, dmax[j], *fmax);
-+	*fmin = __builtin_ppc_fsel(*fmin - dmin[j], dmin[j], *fmin);
-+	*fmax = __builtin_ppc_fsel(dmax[j] - *fmax, dmax[j], *fmax);
-       }
-   }
- #undef __UNROLL_DEPTH_1
diff --git a/science/cdo/files/patch-powerpc64 b/science/cdo/files/patch-powerpc64
new file mode 100644
index 000000000000..f903f05da1fc
--- /dev/null
+++ b/science/cdo/files/patch-powerpc64
@@ -0,0 +1,39 @@
+--- libcdi/src/cgribexlib.c.orig	2024-02-02 10:51:13 UTC
++++ libcdi/src/cgribexlib.c
+@@ -10,7 +10,7 @@
+ #pragma GCC diagnostic warning "-Wstrict-overflow"
+ #endif
+ 
+-#ifdef _ARCH_PWR6
++#if defined(_ARCH_PWR6) && defined(__GLIBC__)
+ #pragma options nostrict
+ #include <ppu_intrinsics.h>
+ #endif
+@@ -766,21 +766,21 @@ pwr6_minmax_val_double_unrolled6(const double *restric
+       {
+         for (size_t j = 0; j < __UNROLL_DEPTH_1; ++j)
+           {
+-            dmin[j] = __fsel(dmin[j] - data[i + j], data[i + j], dmin[j]);
+-            dmax[j] = __fsel(data[i + j] - dmax[j], data[i + j], dmax[j]);
++	    dmin[j] = __builtin_ppc_fsel(dmin[j] - data[i + j], data[i + j], dmin[j]);
++	    dmax[j] = __builtin_ppc_fsel(data[i + j] - dmax[j], data[i + j], dmax[j]);
+           }
+       }
+ 
+     for (size_t j = 0; j < residual; ++j)
+       {
+-        dmin[j] = __fsel(dmin[j] - data[ofs + j], data[ofs + j], dmin[j]);
+-        dmax[j] = __fsel(data[ofs + j] - dmax[j], data[ofs + j], dmax[j]);
++	dmin[j] = __builtin_ppc_fsel(dmin[j] - data[ofs + j], data[ofs + j], dmin[j]);
++	dmax[j] = __builtin_ppc_fsel(data[ofs + j] - dmax[j], data[ofs + j], dmax[j]);
+       }
+ 
+     for (size_t j = 0; j < __UNROLL_DEPTH_1; ++j)
+       {
+-        *fmin = __fsel(*fmin - dmin[j], dmin[j], *fmin);
+-        *fmax = __fsel(dmax[j] - *fmax, dmax[j], *fmax);
++	*fmin = __builtin_ppc_fsel(*fmin - dmin[j], dmin[j], *fmin);
++	*fmax = __builtin_ppc_fsel(dmax[j] - *fmax, dmax[j], *fmax);
+       }
+   }
+ #undef __UNROLL_DEPTH_1



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