summaryrefslogtreecommitdiff
path: root/sci-biology/kallisto/files
diff options
context:
space:
mode:
Diffstat (limited to 'sci-biology/kallisto/files')
-rw-r--r--sci-biology/kallisto/files/kallisto-0.46.2-catch2.patch38
-rw-r--r--sci-biology/kallisto/files/kallisto-0.46.2-cmake.patch149
-rw-r--r--sci-biology/kallisto/files/kallisto-0.46.2-gcc11.patch21
-rw-r--r--sci-biology/kallisto/files/kallisto-0.46.2-htslib.patch52
4 files changed, 260 insertions, 0 deletions
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 <catch2/catch.hpp>
+--- a/unit_tests/test_index.cpp
++++ b/unit_tests/test_index.cpp
+@@ -1,4 +1,4 @@
+-#include "catch.hpp"
++#include <catch2/catch.hpp>
+
+ #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 <catch2/catch.hpp>
+
+ #include <random>
+ #include <string>
+--- a/unit_tests/test_multinomial.cpp
++++ b/unit_tests/test_multinomial.cpp
+@@ -1,4 +1,4 @@
+-#include "catch.hpp"
++#include <catch2/catch.hpp>
+
+ #include <iostream>
+ #include <vector>
+--- a/unit_tests/test_weights.cpp
++++ b/unit_tests/test_weights.cpp
+@@ -1,4 +1,4 @@
+-#include "catch.hpp"
++#include <catch2/catch.hpp>
+
+ #include <vector>
+
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 <npatra974@gmail.com>
+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 <sstream>
+ #include <vector>
+ #include <unordered_map>
++#include <limits>
+
+ #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 <ctype.h>
+ #include <zlib.h>
+ #include <unordered_set>
+-#include "kseq.h"
++#include <htslib/kseq.h>
+
+ #ifndef KSEQ_INIT_READY
+ #define KSEQ_INIT_READY
+--- a/src/ProcessReads.cpp
++++ b/src/ProcessReads.cpp
+@@ -1,6 +1,6 @@
+ /*
+ #include <zlib.h>
+-#include "kseq.h"
++#include <htslib/kseq.h>
+ #include <string>
+ #include <vector>
+ #include <unordered_map>
+@@ -20,7 +20,7 @@
+ #include <iomanip>
+
+ #include "ProcessReads.h"
+-#include "kseq.h"
++#include <htslib/kseq.h>
+ #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 <zlib.h>
+-#include "kseq.h"
++#include <htslib/kseq.h>
+ #include <string>
+ #include <vector>
+ #include <unordered_map>
+--- a/unit_tests/test_kmerhashtable.cpp
++++ b/unit_tests/test_kmerhashtable.cpp
+@@ -13,7 +13,7 @@
+ #include "KmerHashTable.h"
+
+ #include <zlib.h>
+-#include "kseq.h"
++#include <htslib/kseq.h>
+
+ #ifndef KSEQ_INIT_READY
+ #define KSEQ_INIT_READY