diff --git a/biology/kallisto/Makefile b/biology/kallisto/Makefile index 9a9ac1e108d4..42715d9abc88 100644 --- a/biology/kallisto/Makefile +++ b/biology/kallisto/Makefile @@ -1,46 +1,44 @@ PORTNAME= kallisto DISTVERSIONPREFIX= v -DISTVERSION= 0.48.0 -PORTREVISION= 3 +DISTVERSION= 0.50.0 PORTEPOCH= 1 CATEGORIES= biology MAINTAINER= jwb@FreeBSD.org COMMENT= Quantify abundances of transcripts from RNA-Seq data 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 USES= cmake:noninja compiler:c++11-lang gmake localbase:ldflags USE_GITHUB= yes GH_ACCOUNT= pachterlab SUB_FILES= kallisto-test PORTEXAMPLES= * PLIST_FILES= bin/kallisto EXAMPLES_PLIST_FILES= bin/kallisto-test # hdf5 is being phased out and is no longer built in by default, but is still # required for Sleuth (requires kallisto bootstrap estimates) and other # downstream tools. Remove this after Sleuth et al catch up. CMAKE_ARGS+= -DUSE_HDF5:BOOL=ON MAKE_JOBS_UNSAFE= yes LDFLAGS+= -lhts -lz OPTIONS_DEFINE= EXAMPLES post-extract: ${RM} -rf ${WRKSRC}/ext/htslib post-install-EXAMPLES-on: ${INSTALL_SCRIPT} ${WRKDIR}/kallisto-test ${STAGEDIR}${PREFIX}/bin cd ${WRKSRC}/test && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} .include 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)