git: 0a7946717881 - main - biology/ncbi-toolkit: Unbreak by fixing chained C comparison in tools/readdb.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 11 Jul 2026 01:00:18 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=0a7946717881fe656f1cb1947a678ace7f26b94d
commit 0a7946717881fe656f1cb1947a678ace7f26b94d
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-07-11 00:57:27 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-07-11 01:00:13 +0000
biology/ncbi-toolkit: Unbreak by fixing chained C comparison in tools/readdb.c
Reported by: fallout
---
biology/ncbi-toolkit/Makefile | 2 +-
biology/ncbi-toolkit/files/patch-tools_readdb.c | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/biology/ncbi-toolkit/Makefile b/biology/ncbi-toolkit/Makefile
index 5dfe289470cf..589f07a4436f 100644
--- a/biology/ncbi-toolkit/Makefile
+++ b/biology/ncbi-toolkit/Makefile
@@ -1,6 +1,6 @@
PORTNAME= ncbi-toolkit
DISTVERSION= 2017.01.06 # containing BLAST v2.2.27 (? is this true)
-PORTREVISION= 9
+PORTREVISION= 10
CATEGORIES= biology
MASTER_SITES= ftp://ftp.ncbi.nlm.nih.gov/toolbox/ncbi_tools/old/${PORTVERSION:S/.//g}/
DISTNAME= ncbi
diff --git a/biology/ncbi-toolkit/files/patch-tools_readdb.c b/biology/ncbi-toolkit/files/patch-tools_readdb.c
new file mode 100644
index 000000000000..3e6b09a21b95
--- /dev/null
+++ b/biology/ncbi-toolkit/files/patch-tools_readdb.c
@@ -0,0 +1,16 @@
+-- Fix a chained comparison that modern Clang rejects with -Werror.
+-- C does not support 'a <= b <= c'; rewrite as 'a <= b && b <= c'.
+
+--- tools/readdb.c.orig 2026-07-10 18:56:47 UTC
++++ tools/readdb.c
+@@ -4893,8 +4893,8 @@ readdb_check_oid(ReadDBFILEPtr rdfp_head, Int4 oid)
+ if (s_SearchOidInLocalOidList(rdfp_var->oidlist, oid-rdfp_var->start) == 0)
+ return TRUE;
+ } else {
+- if (rdfp_var->start <= oid <= rdfp_var->stop)
+- return TRUE;
++ if (rdfp_var->start <= oid && oid <= rdfp_var->stop)
++ return TRUE;
+ }
+ rdfp_var = rdfp_var->next;
+ }