git: 64ae45e8c91f - main - biology/kallisto: Update to 0.52.0,1

From: Jason W. Bacon <jwb_at_FreeBSD.org>
Date: Wed, 04 Mar 2026 23:31:44 UTC
The branch main has been updated by jwb:

URL: https://cgit.FreeBSD.org/ports/commit/?id=64ae45e8c91f8484d2740b98a432a53d338a6111

commit 64ae45e8c91f8484d2740b98a432a53d338a6111
Author:     Jason W. Bacon <jwb@FreeBSD.org>
AuthorDate: 2026-03-04 23:28:49 +0000
Commit:     Jason W. Bacon <jwb@FreeBSD.org>
CommitDate: 2026-03-04 23:28:49 +0000

    biology/kallisto: Update to 0.52.0,1
    
    Release 0.52.0 brings back --genomebam and --pseudobam options
    Changes: https://github.com/pachterlab/kallisto/releases
    
    Reported by:    portscout
---
 biology/kallisto/Makefile                          | 10 +++++--
 biology/kallisto/distinfo                          |  6 ++--
 biology/kallisto/files/kallisto-test.in            |  0
 biology/kallisto/files/patch-CMakeLists.txt        | 35 ++++++++++++----------
 .../kallisto/files/patch-ext_bifrost_src_BooPHF.h  | 33 ++++++++++++++++++++
 .../kallisto/files/patch-ext_bifrost_src_kseq.h    | 15 ++++++++++
 biology/kallisto/files/patch-src_main.cpp          | 16 +++++-----
 7 files changed, 85 insertions(+), 30 deletions(-)

diff --git a/biology/kallisto/Makefile b/biology/kallisto/Makefile
index ee2b20397ca6..16751e9f67b4 100644
--- a/biology/kallisto/Makefile
+++ b/biology/kallisto/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=		kallisto
 DISTVERSIONPREFIX=	v
-DISTVERSION=		0.51.1
-PORTREVISION=		1
+DISTVERSION=		0.52.0
 PORTEPOCH=		1
 CATEGORIES=		biology
 
@@ -37,12 +36,17 @@ EXAMPLES_PLIST_FILES=	bin/kallisto-test
 CMAKE_ARGS+=		-DUSE_HDF5:BOOL=ON -DUSE_BAM:BOOL=ON
 # WIP: Remove before committing
 CMAKE_ARGS+=		-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
+CMAKE_ARGS+=		-DLOCALBASE:STRING=${LOCALBASE}
 MAKE_JOBS_UNSAFE=	yes
 CXXFLAGS+=		-Wno-unqualified-std-cast-call
-LDFLAGS+=		-lhts -lz
+LDFLAGS+=		-lhdf5 -lhts -lz
 
 OPTIONS_DEFINE=	EXAMPLES
 
+pre-configure:
+	${REINPLACE_CMD} -e "s|-Wno-return-type|& -I${LOCALBASE}/include|g" \
+		${WRKSRC}/CMakeLists.txt
+
 post-install-EXAMPLES-on:
 	${INSTALL_SCRIPT} ${WRKDIR}/kallisto-test ${STAGEDIR}${PREFIX}/bin
 	cd ${WRKSRC}/test && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
diff --git a/biology/kallisto/distinfo b/biology/kallisto/distinfo
index a207db3e922d..c13840c32511 100644
--- a/biology/kallisto/distinfo
+++ b/biology/kallisto/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1748283025
-SHA256 (pachterlab-kallisto-v0.51.1_GH0.tar.gz) = a8bcc23bca6ac758f15e30bb77e9e169e628beff2da3be2e34a53e1d42253516
-SIZE (pachterlab-kallisto-v0.51.1_GH0.tar.gz) = 5954250
+TIMESTAMP = 1772127559
+SHA256 (pachterlab-kallisto-v0.52.0_GH0.tar.gz) = 68184e41706d77e409f05a598a87dacdf3cf227f18c028175e2bce8b284bdea4
+SIZE (pachterlab-kallisto-v0.52.0_GH0.tar.gz) = 5961651
diff --git a/biology/kallisto/files/kallisto-test.in b/biology/kallisto/files/kallisto-test.in
old mode 100755
new mode 100644
diff --git a/biology/kallisto/files/patch-CMakeLists.txt b/biology/kallisto/files/patch-CMakeLists.txt
index 7d56e7d9b1a1..71b8ffeb1233 100644
--- a/biology/kallisto/files/patch-CMakeLists.txt
+++ b/biology/kallisto/files/patch-CMakeLists.txt
@@ -1,30 +1,26 @@
---- CMakeLists.txt.orig	2024-07-20 19:07:27 UTC
+--- CMakeLists.txt.orig	2026-01-20 17:34:25 UTC
 +++ CMakeLists.txt
-@@ -50,10 +50,11 @@ else()
-     # remove this block once CMake >=3.1 has fixated in the ecosystem
-     add_compile_options(-std=c++11)
- else()
-+    # Use c++11 to silence warnings
+@@ -60,7 +60,7 @@ else()
      include(CheckCXXCompilerFlag)
      check_cxx_compiler_flag(-std=c++17 COMPILER_SUPPORTS_CXX17)
      if(COMPILER_SUPPORTS_CXX17)
--    set(CMAKE_CXX_STANDARD 17)
-+    set(CMAKE_CXX_STANDARD 11)
+-        set(CMAKE_CXX_STANDARD 17)
++        set(CMAKE_CXX_STANDARD 11)
      else()
-     set(CMAKE_CXX_STANDARD 11)
+         set(CMAKE_CXX_STANDARD 11)
      endif()
-@@ -61,9 +62,7 @@ endif()
+@@ -69,9 +69,7 @@ endif()
      set(CMAKE_CXX_EXTENSIONS OFF)
  endif()
  
 -#add_compile_options(-Wall -Wno-unused-function)
--add_compile_options(-Wno-subobject-linkage) # Suppress bifrost warning
+-add_compile_options(-Wno-deprecated-declarations -Wno-subobject-linkage) # Suppress bifrost warning
 -set(PROJECT_BIFROST_CMAKE_CXX_FLAGS "-Wno-subobject-linkage -Wno-return-type") # Suppress bifrost warning
 +set(PROJECT_BIFROST_CMAKE_CXX_FLAGS "-Wno-return-type") # Suppress bifrost warning
  
  if(LINK MATCHES static)
      message("static build")
-@@ -73,24 +72,13 @@ include(ExternalProject)
+@@ -81,24 +79,13 @@ include(ExternalProject)
  
  
  include(ExternalProject)
@@ -33,9 +29,9 @@
 -    PREFIX ${PROJECT_SOURCE_DIR}/ext/htslib
 -    SOURCE_DIR ${PROJECT_SOURCE_DIR}/ext/htslib
 -    BUILD_IN_SOURCE 1
--    CONFIGURE_COMMAND autoreconf -i && autoheader &&  autoconf && ${PROJECT_SOURCE_DIR}/ext/htslib/configure
--        --prefix=${PREFIX} --disable-bz2 --disable-lzma --disable-libcurl
--    BUILD_COMMAND make lib-static
+-    CONFIGURE_COMMAND "" #autoreconf -i && autoheader &&  autoconf && ${PROJECT_SOURCE_DIR}/ext/htslib/configure
+-        #--prefix=${PREFIX} --disable-bz2 --disable-lzma --disable-libcurl
+-    BUILD_COMMAND "" #make lib-static
 -    INSTALL_COMMAND ""
 -)
 -endif(USE_BAM)
@@ -50,7 +46,7 @@
      INSTALL_COMMAND ""
  )
  
-@@ -101,7 +89,7 @@ if (ZLIBNG)
+@@ -109,13 +96,13 @@ if (ZLIBNG)
      SOURCE_DIR ${PROJECT_SOURCE_DIR}/ext/zlib-ng
      BUILD_IN_SOURCE 1
      CONFIGURE_COMMAND mkdir -p zlib-ng && cd zlib-ng && cmake .. -DZLIB_COMPAT=ON -DZLIB_ENABLE_TESTS=OFF -DCMAKE_INSTALL_PREFIX=${PREFIX}
@@ -59,3 +55,10 @@
      INSTALL_COMMAND ""
      )
  endif(ZLIBNG)
+ 
+ if (USE_BAM)
+-    include_directories(${htslib_PREFIX}/src/htslib)
++    include_directories(${LOCALBASE}/htslib)
+ endif(USE_BAM)
+ 
+ include_directories(${EXT_PROJECTS_DIR}/bifrost/build/src)
diff --git a/biology/kallisto/files/patch-ext_bifrost_src_BooPHF.h b/biology/kallisto/files/patch-ext_bifrost_src_BooPHF.h
new file mode 100644
index 000000000000..680e38d9fe8a
--- /dev/null
+++ b/biology/kallisto/files/patch-ext_bifrost_src_BooPHF.h
@@ -0,0 +1,33 @@
+--- ext/bifrost/src/BooPHF.h.orig	2026-02-26 17:50:47 UTC
++++ ext/bifrost/src/BooPHF.h
+@@ -8,6 +8,7 @@
+ #include <stdlib.h>
+ #include <iostream>
+ #include <math.h>
++#include <inttypes.h>
+ 
+ #include <array>
+ #include <unordered_map>
+@@ -533,11 +534,11 @@ we need this 2-functors scheme because HashFunctors wo
+         //for debug purposes
+         void print() const
+         {
+-            printf("bit array of size %llu: \n",_size);
++            printf("bit array of size %" PRIu64 ": \n",_size);
+             for(uint64_t ii = 0; ii< _size; ii++)
+             {
+                 if(ii%10==0)
+-                    printf(" (%llu) ",ii);
++                    printf(" (%" PRIu64 ") ",ii);
+                 int val = (_bitArray[ii >> 6] >> (ii & 63 ) ) & 1;
+                 printf("%i",val);
+             }
+@@ -546,7 +547,7 @@ we need this 2-functors scheme because HashFunctors wo
+             printf("rank array : size %lu \n",_ranks.size());
+             for (uint64_t ii = 0; ii< _ranks.size(); ii++)
+             {
+-                printf("%llu :  %llu,  ",ii,_ranks[ii]);
++                printf("%" PRIu64 " :  %" PRIu64 ",  ",ii,_ranks[ii]);
+             }
+             printf("\n");
+         }
diff --git a/biology/kallisto/files/patch-ext_bifrost_src_kseq.h b/biology/kallisto/files/patch-ext_bifrost_src_kseq.h
new file mode 100644
index 000000000000..70ac3c179968
--- /dev/null
+++ b/biology/kallisto/files/patch-ext_bifrost_src_kseq.h
@@ -0,0 +1,15 @@
+--- ext/bifrost/src/kseq.h.orig	2026-01-20 17:34:25 UTC
++++ ext/bifrost/src/kseq.h
+@@ -32,6 +32,12 @@
+ #include <string.h>
+ #include <stdlib.h>
+ 
++// Prevent redefinition of kstring_t below
++#include <htslib/kstring.h>
++
++// Prevent redefinition of kstring_t below
++#include <htslib/kstring.h>
++
+ #define KS_SEP_SPACE 0 // isspace(): \t, \n, \v, \f, \r
+ #define KS_SEP_TAB   1 // isspace() && !' '
+ #define KS_SEP_LINE  2 // line separator: "\n" (Unix) or "\r\n" (Windows)
diff --git a/biology/kallisto/files/patch-src_main.cpp b/biology/kallisto/files/patch-src_main.cpp
index 2eadc428781c..b0e9ad94526a 100644
--- a/biology/kallisto/files/patch-src_main.cpp
+++ b/biology/kallisto/files/patch-src_main.cpp
@@ -1,10 +1,10 @@
---- src/main.cpp.orig	2023-11-02 11:38:09 UTC
+--- src/main.cpp.orig	2026-01-20 17:34:25 UTC
 +++ src/main.cpp
-@@ -11,6 +11,7 @@
- #include <limits>
+@@ -1,6 +1,7 @@
+ #include <getopt.h>
+ #include <sys/stat.h>
+ #include <time.h>
++#include <unistd.h>
  
- #include <cstdio>
-+#include <unistd.h>	// rmdir()
- 
- #include "common.h"
- #include "ProcessReads.h"
+ #include <CompactedDBG.hpp>
+ #include <algorithm>