Skip to content

Commit

Permalink
science/cdo: Update to 2.4.0
Browse files Browse the repository at this point in the history
- Clean up sparc64 patch (PTHREAD_MUTEXATTR)

Changes:	https://code.mpimet.mpg.de/projects/cdo/news
  • Loading branch information
sunpoet committed Apr 10, 2024
1 parent 3dbc89f commit 2230bc9
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 111 deletions.
9 changes: 4 additions & 5 deletions 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
Expand All @@ -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 \
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions 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
31 changes: 0 additions & 31 deletions science/cdo/files/patch-libcdi-src-cdilib.c

This file was deleted.

16 changes: 0 additions & 16 deletions science/cdo/files/patch-libcdi-src-namespace.c

This file was deleted.

17 changes: 0 additions & 17 deletions science/cdo/files/patch-libcdi-src-resource_handle.c

This file was deleted.

39 changes: 0 additions & 39 deletions science/cdo/files/patch-libcdi_src_cgribexlib.c

This file was deleted.

39 changes: 39 additions & 0 deletions 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

0 comments on commit 2230bc9

Please sign in to comment.