From 5c94901047b60e7e21d38dea38be43e2d5f7a816 Mon Sep 17 00:00:00 2001 From: David Seifert Date: Sat, 8 May 2021 16:14:54 +0200 Subject: sci-biology/kallisto: Bump to 0.46.2 Bug: https://bugs.gentoo.org/696504 Bug: https://bugs.gentoo.org/708658 Bug: https://bugs.gentoo.org/788427 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: David Seifert --- sci-biology/kallisto/Manifest | 1 + .../kallisto/files/kallisto-0.46.2-catch2.patch | 38 ++++++ .../kallisto/files/kallisto-0.46.2-cmake.patch | 149 +++++++++++++++++++++ .../kallisto/files/kallisto-0.46.2-gcc11.patch | 21 +++ .../kallisto/files/kallisto-0.46.2-htslib.patch | 52 +++++++ sci-biology/kallisto/kallisto-0.46.2.ebuild | 64 +++++++++ 6 files changed, 325 insertions(+) create mode 100644 sci-biology/kallisto/files/kallisto-0.46.2-catch2.patch create mode 100644 sci-biology/kallisto/files/kallisto-0.46.2-cmake.patch create mode 100644 sci-biology/kallisto/files/kallisto-0.46.2-gcc11.patch create mode 100644 sci-biology/kallisto/files/kallisto-0.46.2-htslib.patch create mode 100644 sci-biology/kallisto/kallisto-0.46.2.ebuild (limited to 'sci-biology') diff --git a/sci-biology/kallisto/Manifest b/sci-biology/kallisto/Manifest index 720b078417b1..85d85197b1cc 100644 --- a/sci-biology/kallisto/Manifest +++ b/sci-biology/kallisto/Manifest @@ -1 +1,2 @@ DIST kallisto-0.43.1.tar.gz 1067076 BLAKE2B 15a2fc65f0c9db431d9be6b2c8434b582ff7bf95fb659a9838d287feb3486744bca6201563d0f318be47c0f8532b805148a2eabfda633075d6b55bad1c3a406a SHA512 c7725a2d649cf96fcd24a20d542b409777cfd9fe97c09f0f459a5ec2981e0a4f5f0ea03d76d3ec3edf0e498c799fc7d074d442d5e35ddb4043d1f7634619dda8 +DIST kallisto-0.46.2.tar.gz 2693869 BLAKE2B 73d725e74133d64b9f7910f69a5fff85eac05b93ad6891807a6fd4e16a1fa16a55306058db3fcb4e0fbfeb0719d3a9d3c8da7d2b76b64dde5a2fea51b0254b99 SHA512 6aca29afa0abe1c6896d27745fd2436c9b9aaf298d70276baf877dbf0aaaba94df54b9a42829c8f8f7c02e7262ecd1837b8a021625c3066a10c0cc0551179093 diff --git a/sci-biology/kallisto/files/kallisto-0.46.2-catch2.patch b/sci-biology/kallisto/files/kallisto-0.46.2-catch2.patch new file mode 100644 index 000000000000..7566966c1c68 --- /dev/null +++ b/sci-biology/kallisto/files/kallisto-0.46.2-catch2.patch @@ -0,0 +1,38 @@ +--- a/unit_tests/main.cpp ++++ b/unit_tests/main.cpp +@@ -1,2 +1,2 @@ + #define CATCH_CONFIG_MAIN +-#include "catch.hpp" ++#include +--- a/unit_tests/test_index.cpp ++++ b/unit_tests/test_index.cpp +@@ -1,4 +1,4 @@ +-#include "catch.hpp" ++#include + + #include "common.h" + #include "KmerIndex.h" +--- a/unit_tests/test_kmerhashtable.cpp ++++ b/unit_tests/test_kmerhashtable.cpp +@@ -1,4 +1,4 @@ +-#include "catch.hpp" ++#include + + #include + #include +--- a/unit_tests/test_multinomial.cpp ++++ b/unit_tests/test_multinomial.cpp +@@ -1,4 +1,4 @@ +-#include "catch.hpp" ++#include + + #include + #include +--- a/unit_tests/test_weights.cpp ++++ b/unit_tests/test_weights.cpp +@@ -1,4 +1,4 @@ +-#include "catch.hpp" ++#include + + #include + diff --git a/sci-biology/kallisto/files/kallisto-0.46.2-cmake.patch b/sci-biology/kallisto/files/kallisto-0.46.2-cmake.patch new file mode 100644 index 000000000000..ba6114a9164f --- /dev/null +++ b/sci-biology/kallisto/files/kallisto-0.46.2-cmake.patch @@ -0,0 +1,149 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,9 +11,6 @@ + add_compile_definitions("USE_HDF5=ON") + endif(USE_HDF5) + +-set(EXT_PROJECTS_DIR ${PROJECT_SOURCE_DIR}/ext) +-set(CMAKE_CXX_FLAGS_PROFILE "-g") +- + # Set Release type for builds where CMAKE_BUILD_TYPE is unset + # This is usually a good default as this implictly enables + # +@@ -33,44 +30,12 @@ + set(CMAKE_CXX_EXTENSIONS OFF) + endif() + +-#add_compile_options(-Wall -Wno-unused-function) +- +-if(LINK MATCHES static) +- message("static build") +-ELSE(LINK MATCHES shared) +- message("shared build") +-ENDIF(LINK MATCHES static) +- +- +-include(ExternalProject) +-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 +- --prefix=${PREFIX} --disable-bz2 --disable-lzma --disable-libcurl +- BUILD_COMMAND make lib-static +- INSTALL_COMMAND "" +-) +- +-include_directories(${htslib_PREFIX}/src/htslib) +- +- +- +-# add_compile_options(-Wdeprecated-register) +- + add_subdirectory(src) +-include_directories(${EXT_PROJECTS_DIR}) + + option(BUILD_TESTING "Build unit tests." OFF) + include(CTest) + + if (BUILD_TESTING) +- add_subdirectory(${EXT_PROJECTS_DIR}/catch) +- +- # Includes Catch in the project: +- include_directories(${CATCH_INCLUDE_DIR} ${COMMON_INCLUDES}) +- + add_subdirectory(unit_tests) + endif(BUILD_TESTING) + +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -3,30 +3,17 @@ + + list(REMOVE_ITEM sources main.cpp) + +-include_directories(../ext/htslib) +- + add_library(kallisto_core ${sources} ${headers}) + target_include_directories(kallisto_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) + + add_executable(kallisto main.cpp) + +-find_package( Threads REQUIRED ) +-target_link_libraries(kallisto kallisto_core pthread ${CMAKE_CURRENT_SOURCE_DIR}/../ext/htslib/libhts.a) +- +-if(LINK MATCHES static) +- set(BUILD_SHARED_LIBS OFF) +- set(HDF5_USE_STATIC_LIBRARIES 1) +- +- if (UNIX AND NOT APPLE) +- #set(CMAKE_EXE_LINKER_FLAGS "-static -static-libgcc -static-libstdc++") +- set(CMAKE_EXE_LINKER_FLAGS "-static -static-libstdc++") +- SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") +- set(CMAKE_EXE_LINKER_FLAGS "-static -static-libgcc -static-libstdc++") +- endif(UNIX AND NOT APPLE) +- +- SET_TARGET_PROPERTIES(kallisto kallisto_core PROPERTIES LINK_SEARCH_END_STATIC 1) +-endif(LINK MATCHES static) ++find_package( PkgConfig REQUIRED ) ++pkg_check_modules( HTSLIB REQUIRED htslib ) + ++find_package( Threads REQUIRED ) ++target_include_directories(kallisto PRIVATE ${HTSLIB_CFLAGS}) ++target_link_libraries(kallisto PRIVATE kallisto_core Threads::Threads ${HTSLIB_LDFLAGS}) + + if(USE_HDF5) + find_package( HDF5 REQUIRED ) +@@ -36,7 +23,7 @@ + + if ( ZLIB_FOUND ) + include_directories( ${ZLIB_INCLUDE_DIRS} ) +- target_link_libraries(kallisto kallisto_core ${ZLIB_LIBRARIES}) ++ target_link_libraries(kallisto PRIVATE kallisto_core ${ZLIB_LIBRARIES}) + else() + message(FATAL_ERROR "zlib not found. Required for to output files" ) + endif( ZLIB_FOUND ) +@@ -44,22 +31,17 @@ + if(USE_HDF5) + if(HDF5_FOUND) + include_directories( ${HDF5_INCLUDE_DIRS} ) +- target_link_libraries( kallisto_core ${HDF5_LIBRARIES} ) +- target_link_libraries( kallisto ${HDF5_LIBRARIES} ) ++ target_link_libraries( kallisto_core PRIVATE ${HDF5_LIBRARIES} ) ++ target_link_libraries( kallisto PRIVATE ${HDF5_LIBRARIES} ) + else() + message(FATAL_ERROR "HDF5 not found. Required to output files") + endif() + endif(USE_HDF5) + +-if(LINK MATCHES static) +- if (UNIX AND NOT APPLE) +- target_link_libraries(kallisto librt.a) +- endif() +-else() +- if (UNIX AND NOT APPLE) +- target_link_libraries(kallisto rt) +- endif() +-endif(LINK MATCHES static) +- ++target_compile_options( kallisto_core PRIVATE ${HTSLIB_CFLAGS} ) ++target_link_libraries( kallisto_core PRIVATE ${HTSLIB_LDFLAGS} ) + +-install(TARGETS kallisto DESTINATION "${CMAKE_INSTALL_BINDIR}") +\ No newline at end of file ++install(TARGETS kallisto DESTINATION "${CMAKE_INSTALL_BINDIR}") ++if ( BUILD_SHARED_LIBS ) ++ install(TARGETS kallisto_core DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++endif() +--- a/unit_tests/CMakeLists.txt ++++ b/unit_tests/CMakeLists.txt +@@ -8,6 +8,10 @@ + add_executable(tests ${sources}) + add_test(unittest tests) + ++find_package( Catch2 REQUIRED ) ++include_directories( ${Catch2_INCLUDE_DIRS} ) ++target_link_libraries( tests ${Catch2_LIBRARIES} ) ++ + find_package( ZLIB REQUIRED ) + if ( ZLIB_FOUND ) + include_directories( ${ZLIB_INCLUDE_DIRS} ) diff --git a/sci-biology/kallisto/files/kallisto-0.46.2-gcc11.patch b/sci-biology/kallisto/files/kallisto-0.46.2-gcc11.patch new file mode 100644 index 000000000000..19594f067776 --- /dev/null +++ b/sci-biology/kallisto/files/kallisto-0.46.2-gcc11.patch @@ -0,0 +1,21 @@ +From 1d63e9d731bada64f6038818e27f06da63007d73 Mon Sep 17 00:00:00 2001 +From: Nilesh Patra +Date: Thu, 4 Mar 2021 23:38:30 +0530 +Subject: [PATCH] Fix GCC-11 Build Failure: include limits lib + +--- + src/MinCollector.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/MinCollector.h b/src/MinCollector.h +index a905f1f..c4460fb 100644 +--- a/src/MinCollector.h ++++ b/src/MinCollector.h +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + + #include "KmerIndex.h" + #include "weights.h" diff --git a/sci-biology/kallisto/files/kallisto-0.46.2-htslib.patch b/sci-biology/kallisto/files/kallisto-0.46.2-htslib.patch new file mode 100644 index 000000000000..0e926136261c --- /dev/null +++ b/sci-biology/kallisto/files/kallisto-0.46.2-htslib.patch @@ -0,0 +1,52 @@ +--- a/src/KmerIndex.cpp ++++ b/src/KmerIndex.cpp +@@ -4,7 +4,7 @@ + #include + #include + #include +-#include "kseq.h" ++#include + + #ifndef KSEQ_INIT_READY + #define KSEQ_INIT_READY +--- a/src/ProcessReads.cpp ++++ b/src/ProcessReads.cpp +@@ -1,6 +1,6 @@ + /* + #include +-#include "kseq.h" ++#include + #include + #include + #include +@@ -20,7 +20,7 @@ + #include + + #include "ProcessReads.h" +-#include "kseq.h" ++#include + #include "PseudoBam.h" + #include "Fusion.hpp" + #include "BUSData.h" +--- a/src/ProcessReads.h ++++ b/src/ProcessReads.h +@@ -2,7 +2,7 @@ + #define KALLISTO_PROCESSREADS_H + + #include +-#include "kseq.h" ++#include + #include + #include + #include +--- a/unit_tests/test_kmerhashtable.cpp ++++ b/unit_tests/test_kmerhashtable.cpp +@@ -13,7 +13,7 @@ + #include "KmerHashTable.h" + + #include +-#include "kseq.h" ++#include + + #ifndef KSEQ_INIT_READY + #define KSEQ_INIT_READY diff --git a/sci-biology/kallisto/kallisto-0.46.2.ebuild b/sci-biology/kallisto/kallisto-0.46.2.ebuild new file mode 100644 index 000000000000..293cf9f76ed0 --- /dev/null +++ b/sci-biology/kallisto/kallisto-0.46.2.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="Near-optimal RNA-Seq quantification" +HOMEPAGE="http://pachterlab.github.io/kallisto/" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/pachterlab/kallisto.git" +else + SRC_URI="https://github.com/pachterlab/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +fi + +LICENSE="BSD" +SLOT="0" +IUSE="hdf5 test" +RESTRICT="!test? ( test )" + +RDEPEND=" + sci-libs/htslib:= + sys-libs/zlib:= + hdf5? ( sci-libs/hdf5:= )" +DEPEND=" + ${RDEPEND} + test? ( + dev-cpp/catch:0 + sci-libs/hdf5 + )" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${P}-cmake.patch + "${FILESDIR}"/${P}-htslib.patch + "${FILESDIR}"/${P}-catch2.patch + "${FILESDIR}"/${P}-gcc11.patch +) + +src_prepare() { + cmake_src_prepare + # bundled catch2 + rm -r ext || die + # bundled htslib structs + rm src/kseq.h || die + + # the test suite is cheesy and relies on a + # specific builddir nesting structure. + sed -e "s|../test/input/short_reads.fastq|$(readlink -f unit_tests/input/short_reads.fastq)|g" \ + -i unit_tests/test_kmerhashtable.cpp || die +} + +src_configure() { + local mycmakeargs=( + -DUSE_HDF5=$(usex hdf5) + -DBUILD_TESTING=$(usex test) + # convenience library only + -DBUILD_SHARED_LIBS=OFF + ) + cmake_src_configure +} -- cgit v1.2.3-65-gdbad