diff options
| author | pjotrp | 2026-03-21 10:00:21 +0100 |
|---|---|---|
| committer | pjotrp | 2026-03-21 10:00:25 +0100 |
| commit | f6be6750ef2847bacbf483f7acc0a1ec3c5e896b (patch) | |
| tree | fbba026114eddf15c5cda4f5e7c0d2c43e01348f | |
| parent | fc0ab806dcbdc6e66ff34c9194aba0ea303c4257 (diff) | |
| download | guix-bioinformatics-f6be6750ef2847bacbf483f7acc0a1ec3c5e896b.tar.gz | |
Fix (vcflib) upgrade to latest 1.0.15
Includes vcflib CMake patch that will be merged upstream.
| -rw-r--r-- | gn/packages/bioinformatics.scm | 12 | ||||
| -rw-r--r-- | vcflib-use-system-fastahack-smithwaterman.patch | 107 |
2 files changed, 114 insertions, 5 deletions
diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm index 7a7d0de..a1de4b2 100644 --- a/gn/packages/bioinformatics.scm +++ b/gn/packages/bioinformatics.scm @@ -2358,16 +2358,18 @@ sequences to accelerate the alignment process.") (uri (git-reference (url "https://github.com/vcflib/vcflib") (commit (string-append "v" version)) - (recursive? #t))) ; some sources are included in the build + (recursive? #t))) (file-name (git-file-name name version)) (sha256 (base32 - "0chpjd3g70jc0kwpf141z7rgm9i8pd8xxr1bfywyn15zfry774xa")))) + "04gwnwvr10z6kc0f4n25a5dhw4jl4i2mqfxyy1kxmqbl1dw1b20k")) + (patches + (list (search-patch "vcflib-use-system-fastahack-smithwaterman.patch"))))) (build-system cmake-build-system) (inputs (list - fastahack - htslib + fastahack + htslib pandoc ; for man pages perl python @@ -2381,7 +2383,7 @@ sequences to accelerate the alignment process.") xz zig-0.15)) ; older versions of zig will not work (native-inputs - `(("pkg-config" ,pkg-config))) + (list pkg-config)) (home-page "https://github.com/vcflib/vcflib/") (synopsis "Library for parsing and manipulating VCF files") (description "Vcflib provides methods to manipulate and interpret diff --git a/vcflib-use-system-fastahack-smithwaterman.patch b/vcflib-use-system-fastahack-smithwaterman.patch new file mode 100644 index 0000000..91f372c --- /dev/null +++ b/vcflib-use-system-fastahack-smithwaterman.patch @@ -0,0 +1,107 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index af3fe67..f237563 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -63,8 +63,10 @@ set_package_properties(ZLIB PROPERTIES TYPE REQUIRED) + find_package(Threads) + set_package_properties(Threads PROPERTIES TYPE REQUIRED) + +-pkg_check_modules(htslib IMPORTED_TARGET htslib) # Optionally builds from contrib/ +-pkg_check_modules(tabixpp IMPORTED_TARGET tabixpp) # Optionally builds from contrib/ ++pkg_check_modules(htslib IMPORTED_TARGET htslib) # Optionally builds from contrib/ ++pkg_check_modules(tabixpp IMPORTED_TARGET tabixpp) # Optionally builds from contrib/ ++pkg_check_modules(fastahack IMPORTED_TARGET fastahack) # Optionally builds from contrib/ ++pkg_check_modules(smithwaterman IMPORTED_TARGET smithwaterman) # Optionally builds from contrib/ + + # ---- Build switches + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ${ipo_supported}) +@@ -113,12 +115,20 @@ endif(ZIG) + # ---- Include files + + include_directories(include) +-include_directories(contrib/fastahack) + include_directories(contrib/intervaltree) +-include_directories(contrib/smithwaterman) + include_directories(contrib/filevercmp) + include_directories(contrib/c-progress-bar) + ++if(NOT fastahack_FOUND) ++ message(STATUS "Using included fastahack") ++ include_directories(contrib/fastahack) ++endif() ++ ++if(NOT smithwaterman_FOUND) ++ message(STATUS "Using included smithwaterman") ++ include_directories(contrib/smithwaterman) ++endif() ++ + if(NOT htslib_FOUND) + message(STATUS "Using included htslib") + include(FindCURL) # for htslib +@@ -142,11 +152,19 @@ endif() + file(GLOB INCLUDES + src/*.h* + contrib/intervaltree/*.h* +- contrib/smithwaterman/*.h* +- contrib/fastahack/*.h* + contrib/filevercmp/*.h* + ) + ++if(NOT fastahack_FOUND) ++ file(GLOB FASTAHACK_INCLUDES contrib/fastahack/*.h*) ++ list(APPEND INCLUDES ${FASTAHACK_INCLUDES}) ++endif() ++ ++if(NOT smithwaterman_FOUND) ++ file(GLOB SW_INCLUDES contrib/smithwaterman/*.h*) ++ list(APPEND INCLUDES ${SW_INCLUDES}) ++endif() ++ + set(vcfwfa_SOURCE + src/legacy.cpp # introduces a WFA dependency + src/vcf-wfa.cpp +@@ -170,16 +188,24 @@ set(vcflib_SOURCE + src/LeftAlign.cpp + src/cigar.cpp + src/allele.cpp +- contrib/fastahack/Fasta.cpp ++ contrib/fsom/fsom.c ++ contrib/filevercmp/filevercmp.c ++ contrib/c-progress-bar/progress.c ++) ++ ++if(NOT fastahack_FOUND) ++ list(APPEND vcflib_SOURCE contrib/fastahack/Fasta.cpp) ++endif() ++ ++if(NOT smithwaterman_FOUND) ++ list(APPEND vcflib_SOURCE + contrib/smithwaterman/SmithWatermanGotoh.cpp + contrib/smithwaterman/Repeats.cpp + contrib/smithwaterman/IndelAllele.cpp + contrib/smithwaterman/disorder.cpp + contrib/smithwaterman/LeftAlign.cpp +- contrib/fsom/fsom.c +- contrib/filevercmp/filevercmp.c +- contrib/c-progress-bar/progress.c +-) ++ ) ++endif() + + if (tabixpp_LOCAL) # add the tabixpp source file + list(APPEND vcflib_SOURCE ${tabixpp_SOURCE}) +@@ -440,6 +466,14 @@ if (NOT tabixpp_LOCAL) + target_link_libraries(vcflib PkgConfig::tabixpp) + endif() + ++if(fastahack_FOUND) ++ target_link_libraries(vcflib PkgConfig::fastahack) ++endif() ++ ++if(smithwaterman_FOUND) ++ target_link_libraries(vcflib PkgConfig::smithwaterman) ++endif() ++ + if(OPENMP) + target_link_libraries(vcflib OpenMP::OpenMP_CXX) + endif() |
