git: cab50560d1b5 - main - biology/kallisto: Update to 0.50.0

From: Jason W. Bacon <jwb_at_FreeBSD.org>
Date: Fri, 07 Jul 2023 18:00:12 UTC
The branch main has been updated by jwb:

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

commit cab50560d1b5cdd1c99b23ba5fcbfdcd58fd8910
Author:     Jason W. Bacon <jwb@FreeBSD.org>
AuthorDate: 2023-07-07 17:56:28 +0000
Commit:     Jason W. Bacon <jwb@FreeBSD.org>
CommitDate: 2023-07-07 18:00:11 +0000

    biology/kallisto: Update to 0.50.0
    
    New, more memory-efficient index
    Several other new features and enhancements
    End of support for bulk RNASeq features
    
    changes: https://github.com/pachterlab/kallisto/releases
    
    Reported by:    portscout
---
 biology/kallisto/Makefile                          |  4 +-
 biology/kallisto/distinfo                          |  6 +--
 biology/kallisto/files/patch-CMakeLists.txt        | 45 ++++++++++++++++------
 .../patch-ext_bifrost_src_strict__fstream.hpp      | 11 ++++++
 biology/kallisto/files/patch-src_CMakeLists.txt    | 32 +++++++--------
 5 files changed, 62 insertions(+), 36 deletions(-)

diff --git a/biology/kallisto/Makefile b/biology/kallisto/Makefile
index 9a9ac1e108d4..42715d9abc88 100644
--- a/biology/kallisto/Makefile
+++ b/biology/kallisto/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=		kallisto
 DISTVERSIONPREFIX=	v
-DISTVERSION=		0.48.0
-PORTREVISION=	3
+DISTVERSION=		0.50.0
 PORTEPOCH=		1
 CATEGORIES=		biology
 
@@ -12,7 +11,6 @@ WWW=		https://pachterlab.github.io/kallisto/about.html
 LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/license.txt
 
-BUILD_DEPENDS=	autoconf>=0:devel/autoconf
 LIB_DEPENDS=	libhdf5.so:science/hdf5 \
 		libsz.so:science/libaec \
 		libhts.so:biology/htslib
diff --git a/biology/kallisto/distinfo b/biology/kallisto/distinfo
index 1f2de73cccd4..e216bb4ae394 100644
--- a/biology/kallisto/distinfo
+++ b/biology/kallisto/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1642516764
-SHA256 (pachterlab-kallisto-v0.48.0_GH0.tar.gz) = 1797ac4d1f0771e3f1f25dd7972bded735fcb43f853cf52184d3d9353a6269b0
-SIZE (pachterlab-kallisto-v0.48.0_GH0.tar.gz) = 2706838
+TIMESTAMP = 1688395958
+SHA256 (pachterlab-kallisto-v0.50.0_GH0.tar.gz) = f9cc0058d08206cb6dde4a4dcaf8a778df5a939a6e021508eea9b00b0d6d5368
+SIZE (pachterlab-kallisto-v0.50.0_GH0.tar.gz) = 5939018
diff --git a/biology/kallisto/files/patch-CMakeLists.txt b/biology/kallisto/files/patch-CMakeLists.txt
index fb498f8a945b..7c6d4c95b51e 100644
--- a/biology/kallisto/files/patch-CMakeLists.txt
+++ b/biology/kallisto/files/patch-CMakeLists.txt
@@ -1,25 +1,46 @@
---- CMakeLists.txt.orig	2019-11-04 16:28:52 UTC
+--- CMakeLists.txt.orig	2023-06-27 10:45:00 UTC
 +++ CMakeLists.txt
-@@ -34,22 +34,6 @@ ELSE(LINK MATCHES shared)
-     message("shared build")
- ENDIF(LINK MATCHES static)
+@@ -56,42 +56,16 @@ ENDIF(LINK MATCHES static)
  
--
--include(ExternalProject)
+ 
+ include(ExternalProject)
+-if (USE_BAM)
 -ExternalProject_Add(htslib
 -    PREFIX ${PROJECT_SOURCE_DIR}/ext/htslib
 -    SOURCE_DIR ${PROJECT_SOURCE_DIR}/ext/htslib
 -    BUILD_IN_SOURCE 1
--    CONFIGURE_COMMAND autoheader && autoconf && ${PROJECT_SOURCE_DIR}/ext/htslib/configure 
+-    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)
+ 
+ ExternalProject_Add(bifrost
+     PREFIX ${PROJECT_SOURCE_DIR}/ext/bifrost
+     SOURCE_DIR ${PROJECT_SOURCE_DIR}/ext/bifrost
+     BUILD_IN_SOURCE 1
+     CONFIGURE_COMMAND mkdir -p build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_CXX_FLAGS=${PROJECT_BIFROST_CMAKE_CXX_FLAGS}
+-    BUILD_COMMAND cd build && make
++    BUILD_COMMAND cd build && gmake
+     INSTALL_COMMAND ""
+ )
+ 
+-if (ZLIBNG)
+-    message("zlib-ng enabled.")
+-    ExternalProject_Add(zlib-ng
+-    PREFIX ${PROJECT_SOURCE_DIR}/ext/zlib-ng
+-    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}
+-    BUILD_COMMAND cd zlib-ng && make
+-    INSTALL_COMMAND ""
+-    )
+-endif(ZLIBNG)
 -
+-if (USE_BAM)
 -include_directories(${htslib_PREFIX}/src/htslib)
--
--
--
- # add_compile_options(-Wdeprecated-register)
+-endif(USE_BAM)
+ include_directories(${EXT_PROJECTS_DIR}/bifrost/build/src)
  
- add_subdirectory(src)
+ ExternalProject_Get_Property(bifrost install_dir)
diff --git a/biology/kallisto/files/patch-ext_bifrost_src_strict__fstream.hpp b/biology/kallisto/files/patch-ext_bifrost_src_strict__fstream.hpp
new file mode 100644
index 000000000000..1a4191325e7c
--- /dev/null
+++ b/biology/kallisto/files/patch-ext_bifrost_src_strict__fstream.hpp
@@ -0,0 +1,11 @@
+--- ext/bifrost/src/strict_fstream.hpp.orig	2023-07-06 14:11:32 UTC
++++ ext/bifrost/src/strict_fstream.hpp
+@@ -64,7 +64,7 @@ static std::string strerror()
+     } else {
+         return "Unknown error (" + std::to_string(err_num) + ")";
+     }
+-#elif ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE) || defined(__APPLE__) || defined(__MUSL__)
++#elif ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE) || defined(__APPLE__) || defined(__MUSL__) || defined(__FreeBSD__)
+ // XSI-compliant strerror_r()
+     const int err_num = errno; // See above
+     if (strerror_r(err_num, buff.data(), buff.size()) == 0) {
diff --git a/biology/kallisto/files/patch-src_CMakeLists.txt b/biology/kallisto/files/patch-src_CMakeLists.txt
index fbeb9128522a..c7927b9e1478 100644
--- a/biology/kallisto/files/patch-src_CMakeLists.txt
+++ b/biology/kallisto/files/patch-src_CMakeLists.txt
@@ -1,26 +1,22 @@
---- src/CMakeLists.txt.orig	2021-11-24 14:45:50 UTC
+--- src/CMakeLists.txt.orig	2023-07-06 14:07:38 UTC
 +++ src/CMakeLists.txt
-@@ -3,15 +3,13 @@ file(GLOB headers *.h *.hpp)
+@@ -3,10 +3,6 @@ file(GLOB headers *.h *.hpp)
  
  list(REMOVE_ITEM sources main.cpp)
  
+-if (USE_BAM)
 -include_directories(../ext/htslib)
+-endif(USE_BAM)
 -
- add_library(kallisto_core ${sources} ${headers})
- target_include_directories(kallisto_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
- 
- add_executable(kallisto main.cpp)
+ add_compile_options(-Wno-subobject-linkage) # Suppress bifrost warning
  
+ add_library(kallisto_core ${sources} ${headers})
+@@ -17,7 +13,7 @@ add_executable(kallisto main.cpp)
  find_package( Threads REQUIRED )
--target_link_libraries(kallisto kallisto_core pthread ${CMAKE_CURRENT_SOURCE_DIR}/../ext/htslib/libhts.a)
-+target_link_libraries(kallisto kallisto_core pthread)
- 
- if(LINK MATCHES static)
-     set(BUILD_SHARED_LIBS OFF)
-@@ -56,4 +54,4 @@ else()
- endif(LINK MATCHES static)
- 
- 
--install(TARGETS kallisto DESTINATION "${CMAKE_INSTALL_BINDIR}")
-\ No newline at end of file
-+install(TARGETS kallisto DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ ExternalProject_Get_Property(bifrost install_dir)
+ if (USE_BAM)
+-target_link_libraries(kallisto kallisto_core pthread ${CMAKE_CURRENT_SOURCE_DIR}/../ext/htslib/libhts.a ${install_dir}/build/src/libbifrost.a)
++target_link_libraries(kallisto kallisto_core pthread hts ${install_dir}/build/src/libbifrost.a)
+ else()
+ target_link_libraries(kallisto kallisto_core pthread ${install_dir}/build/src/libbifrost.a)
+ endif(USE_BAM)