git: 0f12812f16d4 - main - biology/py-pybigwig: Update to 0.3.22

From: Jason W. Bacon <jwb_at_FreeBSD.org>
Date: Sat, 16 Dec 2023 14:00:58 UTC
The branch main has been updated by jwb:

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

commit 0f12812f16d40ac818faf4123086697a041313d2
Author:     Jason W. Bacon <jwb@FreeBSD.org>
AuthorDate: 2023-12-16 13:59:37 +0000
Commit:     Jason W. Bacon <jwb@FreeBSD.org>
CommitDate: 2023-12-16 13:59:37 +0000

    biology/py-pybigwig: Update to 0.3.22
    
    No real changes from 0.3.21
    Add patch to resolve conflict with roundup() macro in sys/param.h
    
    Reported by:    pkg-fallout
---
 biology/py-pybigwig/Makefile                       |  2 +-
 biology/py-pybigwig/distinfo                       |  6 ++---
 .../py-pybigwig/files/patch-libBigWig_bwValues.c   | 29 ++++++++++++++++++++++
 3 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/biology/py-pybigwig/Makefile b/biology/py-pybigwig/Makefile
index 131ba5e45ca1..76d160a9e818 100644
--- a/biology/py-pybigwig/Makefile
+++ b/biology/py-pybigwig/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	pyBigWig
-DISTVERSION=	0.3.21
+DISTVERSION=	0.3.22
 CATEGORIES=	biology python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
diff --git a/biology/py-pybigwig/distinfo b/biology/py-pybigwig/distinfo
index 4d8222cfc082..44d8c0b8eead 100644
--- a/biology/py-pybigwig/distinfo
+++ b/biology/py-pybigwig/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1680381155
-SHA256 (pyBigWig-0.3.21.tar.gz) = 5bff713fe3f8840e0fbe48cf8c8fe9d92c8af8ba107da0b845076164445d076e
-SIZE (pyBigWig-0.3.21.tar.gz) = 73827
+TIMESTAMP = 1681053575
+SHA256 (pyBigWig-0.3.22.tar.gz) = 5d4426f754bd7b7f6dc21d6c3f93b58a96a65b6eb2e578ae03b31a71272d2243
+SIZE (pyBigWig-0.3.22.tar.gz) = 73864
diff --git a/biology/py-pybigwig/files/patch-libBigWig_bwValues.c b/biology/py-pybigwig/files/patch-libBigWig_bwValues.c
new file mode 100644
index 000000000000..7b2fc3774b92
--- /dev/null
+++ b/biology/py-pybigwig/files/patch-libBigWig_bwValues.c
@@ -0,0 +1,29 @@
+--- libBigWig/bwValues.c.orig	2023-12-16 13:51:54 UTC
++++ libBigWig/bwValues.c
+@@ -5,7 +5,7 @@
+ #include <zlib.h>
+ #include <errno.h>
+ 
+-static uint32_t roundup(uint32_t v) {
++static uint32_t bigwig_roundup(uint32_t v) {
+     v--;
+     v |= v >> 1;
+     v |= v >> 2;
+@@ -346,7 +346,7 @@ static bwOverlappingIntervals_t *pushIntervals(bwOverl
+ //Returns NULL on error, in which case o has been free()d
+ static bwOverlappingIntervals_t *pushIntervals(bwOverlappingIntervals_t *o, uint32_t start, uint32_t end, float value) {
+     if(o->l+1 >= o->m) {
+-        o->m = roundup(o->l+1);
++        o->m = bigwig_roundup(o->l+1);
+         o->start = realloc(o->start, o->m * sizeof(uint32_t));
+         if(!o->start) goto error;
+         o->end = realloc(o->end, o->m * sizeof(uint32_t));
+@@ -366,7 +366,7 @@ static bbOverlappingEntries_t *pushBBIntervals(bbOverl
+ 
+ static bbOverlappingEntries_t *pushBBIntervals(bbOverlappingEntries_t *o, uint32_t start, uint32_t end, char *str, int withString) {
+     if(o->l+1 >= o->m) {
+-        o->m = roundup(o->l+1);
++        o->m = bigwig_roundup(o->l+1);
+         o->start = realloc(o->start, o->m * sizeof(uint32_t));
+         if(!o->start) goto error;
+         o->end = realloc(o->end, o->m * sizeof(uint32_t));