summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--science/cdo/Makefile7
-rw-r--r--science/cdo/distinfo6
-rw-r--r--science/cdo/files/patch-libcdi-src-cdilib.c31
-rw-r--r--science/cdo/files/patch-libcdi-src-namespace.c16
-rw-r--r--science/cdo/files/patch-libcdi-src-resource_handle.c17
-rw-r--r--science/cdo/files/patch-src-cdo_pthread.cc29
-rw-r--r--science/cdo/files/patch-src-pthread_debug.cc18
-rw-r--r--science/cdo/files/patch-src-pthread_debug.h33
8 files changed, 70 insertions, 87 deletions
diff --git a/science/cdo/Makefile b/science/cdo/Makefile
index 2d1c3eee9157..d38c105b7d57 100644
--- a/science/cdo/Makefile
+++ b/science/cdo/Makefile
@@ -2,10 +2,9 @@
# $FreeBSD$
PORTNAME= cdo
-PORTVERSION= 1.9.8
-PORTREVISION= 1
+PORTVERSION= 1.9.9
CATEGORIES= science
-MASTER_SITES= https://code.mpimet.mpg.de/attachments/download/20826/ \
+MASTER_SITES= https://code.mpimet.mpg.de/attachments/download/23323/ \
LOCAL/sunpoet
MAINTAINER= sunpoet@FreeBSD.org
@@ -65,7 +64,7 @@ UUID_LIB_DEPENDS= libuuid.so:misc/e2fsprogs-libuuid
.include <bsd.port.pre.mk>
.if ${ARCH} != "sparc64"
-CFLAGS+= -DPTHREAD_MUTEXATTR_CONDATTR
+CFLAGS+= -DPTHREAD_MUTEXATTR
.endif
post-patch:
diff --git a/science/cdo/distinfo b/science/cdo/distinfo
index 6536744c5a00..c89816cac69b 100644
--- a/science/cdo/distinfo
+++ b/science/cdo/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1573550115
-SHA256 (cdo-1.9.8.tar.gz) = f2660ac6f8bf3fa071cf2a3a196b3ec75ad007deb3a782455e80f28680c5252a
-SIZE (cdo-1.9.8.tar.gz) = 10793380
+TIMESTAMP = 1604680076
+SHA256 (cdo-1.9.9.tar.gz) = 959b5b58f495d521a7fd1daa84644888ec87d6a0df43f22ad950d17aee5ba98d
+SIZE (cdo-1.9.9.tar.gz) = 11511630
diff --git a/science/cdo/files/patch-libcdi-src-cdilib.c b/science/cdo/files/patch-libcdi-src-cdilib.c
new file mode 100644
index 000000000000..34b98f218273
--- /dev/null
+++ b/science/cdo/files/patch-libcdi-src-cdilib.c
@@ -0,0 +1,31 @@
+--- libcdi/src/cdilib.c.orig 2020-02-22 18:32:17 UTC
++++ libcdi/src/cdilib.c
+@@ -34056,11 +34056,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)
+@@ -34516,12 +34518,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
new file mode 100644
index 000000000000..747e642168b3
--- /dev/null
+++ b/science/cdo/files/patch-libcdi-src-namespace.c
@@ -0,0 +1,16 @@
+--- libcdi/src/namespace.c.orig 2020-01-21 20:19:01 UTC
++++ libcdi/src/namespace.c
+@@ -88,11 +88,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
new file mode 100644
index 000000000000..4c184c1b97f5
--- /dev/null
+++ b/science/cdo/files/patch-libcdi-src-resource_handle.c
@@ -0,0 +1,17 @@
+--- libcdi/src/resource_handle.c.orig 2020-04-22 13:06:24 UTC
++++ libcdi/src/resource_handle.c
+@@ -208,12 +208,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-src-cdo_pthread.cc b/science/cdo/files/patch-src-cdo_pthread.cc
deleted file mode 100644
index 455a79c283f9..000000000000
--- a/science/cdo/files/patch-src-cdo_pthread.cc
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/cdo_pthread.cc.orig 2018-05-09 08:49:58 UTC
-+++ src/cdo_pthread.cc
-@@ -32,8 +32,10 @@ print_pthread_info()
- {
- #ifdef HAVE_LIBPTHREAD
- pthread_attr_t attr;
-+#if defined (PTHREAD_MUTEXATTR_CONDATTR)
- pthread_mutexattr_t m_attr;
- pthread_condattr_t c_attr;
-+#endif
-
- #if defined(PTHREAD_KEYS_MAX)
- fprintf(stderr, "PTHREAD_KEYS_MAX = %d\n", PTHREAD_KEYS_MAX);
-@@ -54,6 +56,7 @@ print_pthread_info()
- print_pthread_attr("Default pthread attr", &attr);
- pthread_attr_destroy(&attr);
-
-+#if defined (PTHREAD_MUTEXATTR_CONDATTR)
- pthread_mutexattr_init(&m_attr);
- print_pthread_mutexattr("Default pthread mutexattr", &m_attr);
- pthread_mutexattr_destroy(&m_attr);
-@@ -61,6 +64,7 @@ print_pthread_info()
- pthread_condattr_init(&c_attr);
- print_pthread_condattr("Default pthread condattr ", &c_attr);
- pthread_condattr_destroy(&c_attr);
-+#endif
-
- fprintf(stderr, "\n");
- #endif
diff --git a/science/cdo/files/patch-src-pthread_debug.cc b/science/cdo/files/patch-src-pthread_debug.cc
deleted file mode 100644
index 0e3271a7e3ac..000000000000
--- a/science/cdo/files/patch-src-pthread_debug.cc
+++ /dev/null
@@ -1,18 +0,0 @@
---- src/pthread_debug.cc.orig 2018-05-09 08:49:58 UTC
-+++ src/pthread_debug.cc
-@@ -87,6 +87,7 @@ print_pthread_attr(const char *caller, p
- fprintf(stderr, "%-18s : %-14s = %ld\n", caller, "stacksize", (long) stacksize);
- }
-
-+#if defined (PTHREAD_MUTEXATTR_CONDATTR)
- void
- print_pthread_mutexattr(const char *caller, pthread_mutexattr_t *m_attr)
- {
-@@ -118,6 +119,7 @@ PTHREAD_PRIO_NONE);
- }
- #endif
- }
-+#endif
-
- void
- print_pthread_condattr(const char *caller, pthread_condattr_t *c_attr)
diff --git a/science/cdo/files/patch-src-pthread_debug.h b/science/cdo/files/patch-src-pthread_debug.h
deleted file mode 100644
index 8e539e373d7d..000000000000
--- a/science/cdo/files/patch-src-pthread_debug.h
+++ /dev/null
@@ -1,33 +0,0 @@
---- src/pthread_debug.h.orig 2018-05-09 08:49:58 UTC
-+++ src/pthread_debug.h
-@@ -26,20 +26,22 @@ int Pthread_create(const char *caller, p
-
- int Pthread_join(const char *caller, pthread_t th, void **thread_return);
-
--void Pthread_mutex_lock(const char *caller, pthread_mutex_t *mutex);
--void Pthread_mutex_lock(const char *caller, std::mutex &p_mutex);
-+int Pthread_mutex_lock(const char *caller, pthread_mutex_t *mutex);
-+int Pthread_mutex_lock(const char *caller, std::mutex &p_mutex);
-
--void Pthread_mutex_unlock(const char *caller, pthread_mutex_t *mutex);
--void Pthread_mutex_unlock(const char *caller, std::mutex &p_mutex);
-+int Pthread_mutex_unlock(const char *caller, pthread_mutex_t *mutex);
-+int Pthread_mutex_unlock(const char *caller, std::mutex &p_mutex);
-
--void Pthread_cond_signal(const char *caller, pthread_cond_t *cond);
--void Pthread_cond_signal(const char *caller, std::condition_variable &p_cond_var);
--void Pthread_cond_wait(const char *caller, pthread_cond_t *cond, pthread_mutex_t *mutex);
--void Pthread_cond_wait(const char *caller, std::condition_variable &p_cond_var, std::unique_lock<std::mutex> &p_mutex);
-+int Pthread_cond_signal(const char *caller, pthread_cond_t *cond);
-+int Pthread_cond_signal(const char *caller, std::condition_variable &p_cond_var);
-+int Pthread_cond_wait(const char *caller, pthread_cond_t *cond, pthread_mutex_t *mutex);
-+int Pthread_cond_wait(const char *caller, std::condition_variable &p_cond_var, std::unique_lock<std::mutex> &p_mutex);
-
- void print_pthread_attr(const char *caller, pthread_attr_t *attr);
-+#if defined (PTHREAD_MUTEXATTR_CONDATTR)
- void print_pthread_mutexattr(const char *caller, pthread_mutexattr_t *m_attr);
- void print_pthread_condattr(const char *caller, pthread_condattr_t *c_attr);
-+#endif
-
- #define pthread_create(a, b, c, d) Pthread_create(__func__, a, b, c, d)
- #define pthread_join(a, b) Pthread_join(__func__, a, b)