[med-svn] r18909 - trunk/packages/spades/trunk/debian/patches

Andreas Tille tille at moszumanska.debian.org
Wed Mar 4 19:35:16 UTC 2015


Author: tille
Date: 2015-03-04 19:35:15 +0000 (Wed, 04 Mar 2015)
New Revision: 18909

Added:
   trunk/packages/spades/trunk/debian/patches/0103_use-debian-packaged-bwa.patch
   trunk/packages/spades/trunk/debian/patches/use-debian-packaged-bamtools.patch
Removed:
   trunk/packages/spades/trunk/debian/patches/do_not_install_third_party_libs.patch
Modified:
   trunk/packages/spades/trunk/debian/patches/series
   trunk/packages/spades/trunk/debian/patches/use-debian-packaged-samtools.patch
Log:
Strange error in test suite is caused by using Debian packaged bamtools - at least when linked this way.


Added: trunk/packages/spades/trunk/debian/patches/0103_use-debian-packaged-bwa.patch
===================================================================
--- trunk/packages/spades/trunk/debian/patches/0103_use-debian-packaged-bwa.patch	                        (rev 0)
+++ trunk/packages/spades/trunk/debian/patches/0103_use-debian-packaged-bwa.patch	2015-03-04 19:35:15 UTC (rev 18909)
@@ -0,0 +1,22 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Changed: Tue, 18 Feb 2014 15:48:55 +0100
+Description: SPAdes originally contained a code copy of bwa since the version
+ of bwa which was current of the time of release did not builded with recent
+ gcc versions.  Since this is not the case with Debian shipped bwa this code
+ copy is skipped.
+ .
+ See https://lists.debian.org/debian-med/2014/02/msg00192.html
+ .
+ Note: I tried to patch the Python scripts which were calling bwa-spades to
+ rather call /usr/bin/bwa but the test suite failed.  So as an alternative
+ the package contains a symlink
+    ln -s /usr/bin/bwa /usr/lib/spades/bin/bwa-spades
+ which enables successfull run of the test suite
+
+--- a/ext/tools/CMakeLists.txt
++++ b/ext/tools/CMakeLists.txt
+@@ -4,4 +4,3 @@
+ # See file LICENSE for details.
+ ############################################################################
+ 
+-add_subdirectory(bwa-0.6.2)

Deleted: trunk/packages/spades/trunk/debian/patches/do_not_install_third_party_libs.patch
===================================================================
--- trunk/packages/spades/trunk/debian/patches/do_not_install_third_party_libs.patch	2015-03-04 16:31:10 UTC (rev 18908)
+++ trunk/packages/spades/trunk/debian/patches/do_not_install_third_party_libs.patch	2015-03-04 19:35:15 UTC (rev 18909)
@@ -1,120 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-Last-Changed: Wed, 05 Feb 2014 15:12:36 +0100
-Description: SPAdes originally contained code copies of
- python-yaml and python-joblib.  These code copies are removed
- and this patch is just fixing the cmake input file
-
---- a/ext/src/CMakeLists.txt
-+++ b/ext/src/CMakeLists.txt
-@@ -4,5 +4,4 @@ add_subdirectory(jemalloc)
- add_subdirectory(nlopt)
- add_subdirectory(yaml-cpp)
- add_subdirectory(ConsensusCore)
--add_subdirectory(bamtools)
- add_subdirectory(samtools)
---- a/src/cmake/includes.cmake
-+++ b/src/cmake/includes.cmake
-@@ -1,6 +1,7 @@
- # -*- cmake -*-
- 
- set(CMAKE_INCLUDE_CURRENT_DIR ON)
-+### include_directories(SYSTEM "-I/usr/include/bamtools")
- set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
- set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
- include_directories(${SPADES_MAIN_INCLUDE_DIR} ${SPADES_BUILT_INCLUDE_DIR})
---- a/src/cmake/deps.cmake
-+++ b/src/cmake/deps.cmake
-@@ -16,6 +16,20 @@ endif()
- find_package(OpenMP)
- find_package(ZLIB REQUIRED)
- find_package(BZip2 REQUIRED)
-+
-+# BamTools: The bamtools package would require a cmake control file.
-+#           Than we could use:
-+# FIND_LIBRARY(BAMTOOLS_LIB bamtools ${BAMTOOLS_DIR}/lib)
-+# MESSAGE(status "** BAMTOOLS Include: ${INCLUDE_DIRECTORIES}")
-+# MESSAGE(status "** BAMTOOLS Link: ${LINK_DIRECTORIES}")
-+# MESSAGE(status "** BAMTOOLS Lib: ${BAMTOOLS_DIR}")
-+#
-+# find_package(BamTools REQUIRED)
-+## Hmmm, this seems to be quite brutal and should be rather set by FIND_LIBRARY see above
-+ADD_DEFINITIONS(-I/usr/include/bamtools)
-+ADD_DEFINITIONS(-L/usr/lib)
-+ADD_DEFINITIONS(-lbamtools)
-+
- find_package(Readline QUIET)
- set(CURSES_NEED_NCURSES TRUE)
- find_package(Curses QUIET)
---- a/src/dipspades/CMakeLists.txt
-+++ b/src/dipspades/CMakeLists.txt
-@@ -27,7 +27,7 @@ add_executable(dipspades
- 	      utils/files_utils.cpp
-           main.cpp)
- 
--target_link_libraries(dipspades input mph_index BamTools yaml-cpp nlopt ${COMMON_LIBRARIES} ssw)
-+target_link_libraries(dipspades input mph_index bamtools yaml-cpp nlopt ${COMMON_LIBRARIES} ssw)
- 
- if (SPADES_STATIC_BUILD)
-   set_target_properties(dipspades PROPERTIES LINK_SEARCH_END_STATIC 1)
---- a/src/debruijn/CMakeLists.txt
-+++ b/src/debruijn/CMakeLists.txt
-@@ -25,7 +25,7 @@ add_executable(spades
- # We have to do this to minimize changes in ConsensusCore itself
- include_directories(${EXT_DIR}/include/ConsensusCore)
- 
--target_link_libraries(spades ConsensusCore input mph_index nlopt BamTools yaml-cpp ${COMMON_LIBRARIES})
-+target_link_libraries(spades ConsensusCore input mph_index nlopt bamtools yaml-cpp ${COMMON_LIBRARIES})
- 
- if (SPADES_STATIC_BUILD)
-   set_target_properties(spades PROPERTIES LINK_SEARCH_END_STATIC 1)
---- a/src/hammer/CMakeLists.txt
-+++ b/src/hammer/CMakeLists.txt
-@@ -21,7 +21,7 @@ add_executable(hammer
- #  add_subdirectory(quake_count)
- #  add_subdirectory(gen_test_data)
- 
--target_link_libraries(hammer input mph_index BamTools yaml-cpp ${COMMON_LIBRARIES})
-+target_link_libraries(hammer input mph_index bamtools yaml-cpp ${COMMON_LIBRARIES})
- 
- if (SPADES_STATIC_BUILD)
-   set_target_properties(hammer PROPERTIES LINK_SEARCH_END_STATIC 1)
---- a/src/io/CMakeLists.txt
-+++ b/src/io/CMakeLists.txt
-@@ -12,5 +12,5 @@ add_library(input STATIC
-             copy_file.cpp
-             library.cpp)
- 
--target_link_libraries(input BamTools yaml-cpp)
-+target_link_libraries(input bamtools yaml-cpp)
- 
---- a/src/ionhammer/CMakeLists.txt
-+++ b/src/ionhammer/CMakeLists.txt
-@@ -19,7 +19,7 @@ add_executable(ionhammer
-                seqeval/TreephaserLite.cpp
-                main.cpp)
- 
--target_link_libraries(ionhammer input mph_index BamTools yaml-cpp ${COMMON_LIBRARIES})
-+target_link_libraries(ionhammer input mph_index bamtools yaml-cpp ${COMMON_LIBRARIES})
- 
- if (SPADES_STATIC_BUILD)
-   set_target_properties(ionhammer PROPERTIES LINK_SEARCH_END_STATIC 1)
---- a/src/corrector/CMakeLists.txt
-+++ b/src/corrector/CMakeLists.txt
-@@ -19,7 +19,8 @@ add_executable(corrector
- 	config_struct.cpp
-         main.cpp)
- 
--target_link_libraries(corrector samtools input yaml-cpp ${COMMON_LIBRARIES})
-+target_link_libraries(corrector samtools input yaml-cpp ${COMMON_LIBRARIES} -lhts)
-+# target_link_libraries(corrector input yaml-cpp ${COMMON_LIBRARIES})
- 
- 
- 
---- a/ext/src/samtools/CMakeLists.txt
-+++ b/ext/src/samtools/CMakeLists.txt
-@@ -28,4 +28,4 @@ add_library (samtools
-   bam_reheader.c
-   kprobaln.c
-   bam_cat.c)
--target_link_libraries(samtools BamTools)
-+target_link_libraries(samtools bamtools)

Modified: trunk/packages/spades/trunk/debian/patches/series
===================================================================
--- trunk/packages/spades/trunk/debian/patches/series	2015-03-04 16:31:10 UTC (rev 18908)
+++ trunk/packages/spades/trunk/debian/patches/series	2015-03-04 19:35:15 UTC (rev 18909)
@@ -8,3 +8,4 @@
 #adapt_to_debian_pathes.patch
 # use-debian-packaged-samtools.patch
 # bamtools-cmake.patch
+# use-debian-packaged-bamtools.patch   ## <<-- does not work - see patch description

Added: trunk/packages/spades/trunk/debian/patches/use-debian-packaged-bamtools.patch
===================================================================
--- trunk/packages/spades/trunk/debian/patches/use-debian-packaged-bamtools.patch	                        (rev 0)
+++ trunk/packages/spades/trunk/debian/patches/use-debian-packaged-bamtools.patch	2015-03-04 19:35:15 UTC (rev 18909)
@@ -0,0 +1,115 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Changed: Wed, 05 Feb 2014 15:12:36 +0100
+Description: SPAdes originally contained code copies of
+ python-yaml and python-joblib.  These code copies are removed
+ and this patch is just fixing the cmake input file
+ .
+ FIXME: This does not work.  If you run
+    /usr/bin/spades.py --test
+ this ends up in
+ .
+ ===== Assembling started.
+ == Running assembler: K21
+ Exception caught /home/andreas/debian-maintain/repack/spades/orig/SPAdes-3.5.0/spades_test/K21/configs/config.info(3): cannot open include file simplification.info
+ == Error ==  system call for: "['/usr/bin/spades', '/home/andreas/debian-maintain/repack/spades/orig/SPAdes-3.5.0/spades_test/K21/configs/config.info']" finished abnormally, err code: 4
+
+--- a/ext/src/CMakeLists.txt
++++ b/ext/src/CMakeLists.txt
+@@ -4,5 +4,4 @@ add_subdirectory(jemalloc)
+ add_subdirectory(nlopt)
+ add_subdirectory(yaml-cpp)
+ add_subdirectory(ConsensusCore)
+-add_subdirectory(bamtools)
+ add_subdirectory(samtools)
+--- a/src/cmake/deps.cmake
++++ b/src/cmake/deps.cmake
+@@ -28,3 +28,16 @@ else()
+ endif()
+ set(Boost_USE_MULTITHREADED ON)
+ find_package(Boost REQUIRED)
++
++# BamTools: The bamtools package would require a cmake control file.
++#           Than we could use:
++# FIND_LIBRARY(BAMTOOLS_LIB bamtools ${BAMTOOLS_DIR}/lib)
++# MESSAGE(status "** BAMTOOLS Include: ${INCLUDE_DIRECTORIES}")
++# MESSAGE(status "** BAMTOOLS Link: ${LINK_DIRECTORIES}")
++# MESSAGE(status "** BAMTOOLS Lib: ${BAMTOOLS_DIR}")
++#
++# find_package(BamTools REQUIRED)
++## Hmmm, this seems to be quite brutal and should be rather set by FIND_LIBRARY see above
++ADD_DEFINITIONS(-I/usr/include/bamtools)
++ADD_DEFINITIONS(-L/usr/lib)
++ADD_DEFINITIONS(-lbamtools)
+--- a/src/dipspades/CMakeLists.txt
++++ b/src/dipspades/CMakeLists.txt
+@@ -27,7 +27,7 @@ add_executable(dipspades
+ 	      utils/files_utils.cpp
+           main.cpp)
+ 
+-target_link_libraries(dipspades input mph_index BamTools yaml-cpp nlopt ${COMMON_LIBRARIES} ssw)
++target_link_libraries(dipspades input mph_index bamtools yaml-cpp nlopt ${COMMON_LIBRARIES} ssw)
+ 
+ if (SPADES_STATIC_BUILD)
+   set_target_properties(dipspades PROPERTIES LINK_SEARCH_END_STATIC 1)
+--- a/src/debruijn/CMakeLists.txt
++++ b/src/debruijn/CMakeLists.txt
+@@ -25,7 +25,7 @@ add_executable(spades
+ # We have to do this to minimize changes in ConsensusCore itself
+ include_directories(${EXT_DIR}/include/ConsensusCore)
+ 
+-target_link_libraries(spades ConsensusCore input mph_index nlopt BamTools yaml-cpp ${COMMON_LIBRARIES})
++target_link_libraries(spades ConsensusCore input mph_index nlopt bamtools yaml-cpp ${COMMON_LIBRARIES})
+ 
+ if (SPADES_STATIC_BUILD)
+   set_target_properties(spades PROPERTIES LINK_SEARCH_END_STATIC 1)
+--- a/src/hammer/CMakeLists.txt
++++ b/src/hammer/CMakeLists.txt
+@@ -21,7 +21,7 @@ add_executable(hammer
+ #  add_subdirectory(quake_count)
+ #  add_subdirectory(gen_test_data)
+ 
+-target_link_libraries(hammer input mph_index BamTools yaml-cpp ${COMMON_LIBRARIES})
++target_link_libraries(hammer input mph_index bamtools yaml-cpp ${COMMON_LIBRARIES})
+ 
+ if (SPADES_STATIC_BUILD)
+   set_target_properties(hammer PROPERTIES LINK_SEARCH_END_STATIC 1)
+--- a/src/io/CMakeLists.txt
++++ b/src/io/CMakeLists.txt
+@@ -12,5 +12,5 @@ add_library(input STATIC
+             copy_file.cpp
+             library.cpp)
+ 
+-target_link_libraries(input BamTools yaml-cpp)
++target_link_libraries(input bamtools yaml-cpp)
+ 
+--- a/src/ionhammer/CMakeLists.txt
++++ b/src/ionhammer/CMakeLists.txt
+@@ -19,7 +19,7 @@ add_executable(ionhammer
+                seqeval/TreephaserLite.cpp
+                main.cpp)
+ 
+-target_link_libraries(ionhammer input mph_index BamTools yaml-cpp ${COMMON_LIBRARIES})
++target_link_libraries(ionhammer input mph_index bamtools yaml-cpp ${COMMON_LIBRARIES})
+ 
+ if (SPADES_STATIC_BUILD)
+   set_target_properties(ionhammer PROPERTIES LINK_SEARCH_END_STATIC 1)
+--- a/src/corrector/CMakeLists.txt
++++ b/src/corrector/CMakeLists.txt
+@@ -19,7 +19,8 @@ add_executable(corrector
+ 	config_struct.cpp
+         main.cpp)
+ 
+-target_link_libraries(corrector samtools input yaml-cpp ${COMMON_LIBRARIES})
++target_link_libraries(corrector samtools input yaml-cpp ${COMMON_LIBRARIES} -lhts)
++# target_link_libraries(corrector input yaml-cpp ${COMMON_LIBRARIES})
+ 
+ 
+ 
+--- a/ext/src/samtools/CMakeLists.txt
++++ b/ext/src/samtools/CMakeLists.txt
+@@ -28,4 +28,4 @@ add_library (samtools
+   bam_reheader.c
+   kprobaln.c
+   bam_cat.c)
+-target_link_libraries(samtools BamTools)
++target_link_libraries(samtools bamtools)

Modified: trunk/packages/spades/trunk/debian/patches/use-debian-packaged-samtools.patch
===================================================================
--- trunk/packages/spades/trunk/debian/patches/use-debian-packaged-samtools.patch	2015-03-04 16:31:10 UTC (rev 18908)
+++ trunk/packages/spades/trunk/debian/patches/use-debian-packaged-samtools.patch	2015-03-04 19:35:15 UTC (rev 18909)
@@ -2,11 +2,13 @@
 Last-Changed: Mon, 23 Feb 2015 21:24:39 +0100
 Description: SPAdes originally contained a code copy of samtools
  Rather use the Debian packaged version
+ .
+ Problem:  spades try to *link* against lsamtools which does not exist
 
 --- a/ext/src/CMakeLists.txt
 +++ b/ext/src/CMakeLists.txt
-@@ -4,4 +4,3 @@ add_subdirectory(jemalloc)
- add_subdirectory(nlopt)
+@@ -5,4 +5,3 @@ add_subdirectory(nlopt)
  add_subdirectory(yaml-cpp)
  add_subdirectory(ConsensusCore)
+ add_subdirectory(bamtools)
 -add_subdirectory(samtools)




More information about the debian-med-commit mailing list