[med-svn] [Git][med-team/bamtools][master] 2 commits: Fix shared + static library building

Michael R. Crusoe (@crusoe) gitlab at salsa.debian.org
Fri Sep 17 15:44:42 BST 2021



Michael R. Crusoe pushed to branch master at Debian Med / bamtools


Commits:
3cc5008f by Michael R. Crusoe at 2021-09-17T16:39:41+02:00
Fix shared + static library building

- - - - -
f368869f by Michael R. Crusoe at 2021-09-17T16:43:49+02:00
routine-update: Ready to upload to unstable

- - - - -


4 changed files:

- debian/changelog
- debian/control
- debian/patches/series
- debian/patches/shared_and_static.patch


Changes:

=====================================
debian/changelog
=====================================
@@ -1,10 +1,10 @@
-bamtools (2.5.2+dfsg-1) UNRELEASED; urgency=medium
+bamtools (2.5.2+dfsg-1) unstable; urgency=medium
 
   * New upstream version, fixes FTBFS with gcc-11. Closes: #983981
   * Standards-Version: 4.6.0 (routine-update)
-  * refresh patches
+  * refresh patches including reworking the shared & static library patch
 
- -- Michael R. Crusoe <crusoe at debian.org>  Fri, 17 Sep 2021 15:17:35 +0200
+ -- Michael R. Crusoe <crusoe at debian.org>  Fri, 17 Sep 2021 16:43:49 +0200
 
 bamtools (2.5.1+dfsg-9) unstable; urgency=medium
 


=====================================
debian/control
=====================================
@@ -56,11 +56,12 @@ Package: libbamtools-dev
 Architecture: any
 Multi-Arch: same
 Section: libdevel
-Depends: libbamtools2.5.1 (= ${binary:Version}),
-         ${misc:Depends}
+Depends: libbamtools2.5.2 (= ${binary:Version}),
+         ${misc:Depends},
+         ${devlibs:Depends}
 Suggests: libbamtools-doc (= ${binary:Version})
-Breaks: libbamtools2.4.0 (<< 2.5.1+dfsg-2~)
-Replaces: libbamtools2.4.0 (<< 2.5.1+dfsg-2~)
+Breaks: libbamtools2.5.1
+Replaces: libbamtools2.5.1
 Description: C++ API for manipulating BAM (genome alignment) files
  BamTools facilitates research analysis and data management using BAM
  files.  It copes with the enormous amount of data produced by current
@@ -73,7 +74,7 @@ Description: C++ API for manipulating BAM (genome alignment) files
  .
  This is the developers API package.
 
-Package: libbamtools2.5.1
+Package: libbamtools2.5.2
 Architecture: any
 Multi-Arch: same
 Section: libs


=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
 0001-ignore-thirdparty-and-fix-jsoncpp.patch
+shared_and_static.patch


=====================================
debian/patches/shared_and_static.patch
=====================================
@@ -2,31 +2,116 @@ Description: Build additional static lib
 Author: Andreas Tille <tille at debian.org>
 Last-Update: Wed, 27 May 2020 09:59:29 +0200
 
---- a/src/api/CMakeLists.txt
-+++ b/src/api/CMakeLists.txt
-@@ -38,18 +38,24 @@ if( WIN32 )
- endif()
+--- bamtools.orig/src/CMakeLists.txt
++++ bamtools/src/CMakeLists.txt
+@@ -33,7 +33,7 @@
  
  # create main BamTools API library
--add_library( BamTools ${BamToolsAPISources} )
-+add_library( BamTools SHARED ${BamToolsAPISources} )
-+add_library( BamTools_static STATIC ${BamToolsAPISources} )
+ add_library(
+-    BamTools
++    BamTools SHARED
+ 
+     api/BamAlignment.cpp
+     api/BamMultiReader.cpp
+@@ -73,6 +73,48 @@
+     api/internal/sam/SamHeaderValidator_p.cpp
+     api/internal/utils/BamException_p.cpp
+ )
++add_library(
++    BamTools_static STATIC
++
++    api/BamAlignment.cpp
++    api/BamMultiReader.cpp
++    api/BamReader.cpp
++    api/BamWriter.cpp
++    api/SamHeader.cpp
++    api/SamProgram.cpp
++    api/SamProgramChain.cpp
++    api/SamReadGroup.cpp
++    api/SamReadGroupDictionary.cpp
++    api/SamSequence.cpp
++    api/SamSequenceDictionary.cpp
++    api/internal/bam/BamHeader_p.cpp
++    api/internal/bam/BamMultiReader_p.cpp
++    api/internal/bam/BamRandomAccessController_p.cpp
++    api/internal/bam/BamReader_p.cpp
++    api/internal/bam/BamWriter_p.cpp
++    api/internal/index/BamIndexFactory_p.cpp
++    api/internal/index/BamStandardIndex_p.cpp
++    api/internal/index/BamToolsIndex_p.cpp
++    api/internal/io/BamDeviceFactory_p.cpp
++    api/internal/io/BamFile_p.cpp
++    api/internal/io/BamFtp_p.cpp
++    api/internal/io/BamHttp_p.cpp
++    api/internal/io/BamPipe_p.cpp
++    api/internal/io/BgzfStream_p.cpp
++    api/internal/io/ByteArray_p.cpp
++    api/internal/io/HostAddress_p.cpp
++    api/internal/io/HostInfo_p.cpp
++    api/internal/io/HttpHeader_p.cpp
++    api/internal/io/ILocalIODevice_p.cpp
++    api/internal/io/RollingBuffer_p.cpp
++    api/internal/io/TcpSocketEngine_p.cpp
++    api/internal/io/TcpSocket_p.cpp
++    api/internal/sam/SamFormatParser_p.cpp
++    api/internal/sam/SamFormatPrinter_p.cpp
++    api/internal/sam/SamHeaderValidator_p.cpp
++    api/internal/utils/BamException_p.cpp
++)
++
+ 
  # The SONAME is bumped on every version increment
  # as Bamtools does not yet guarantee a stable ABI
- set_target_properties( BamTools PROPERTIES
-                        SOVERSION "${BamTools_VERSION}"
-                        OUTPUT_NAME "bamtools" )
-+set_target_properties( BamTools_static PROPERTIES
-+                       OUTPUT_NAME "bamtools" )
- target_include_directories( BamTools PRIVATE "${ZLIB_INCLUDE_DIRS}" )
- target_link_libraries( BamTools PRIVATE "${ZLIB_LIBRARIES}" "${WIN32_LIBRARIES}" )
- install( TARGETS BamTools
-          ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
-          LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
-          RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" )
-+install( TARGETS BamTools_static
-+         ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
-+         LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" )
+@@ -83,6 +125,12 @@
+     CXX_STANDARD 11
+     CXX_STANDARD_REQUIRED ON
+     CXX_EXTENSIONS OFF)
++set_target_properties(
++    BamTools_static PROPERTIES
++    OUTPUT_NAME bamtools
++    CXX_STANDARD 11
++    CXX_STANDARD_REQUIRED ON
++    CXX_EXTENSIONS OFF)
+ target_include_directories(
+     BamTools PRIVATE
+     ${ZLIB_INCLUDE_DIRS}
+@@ -91,6 +139,15 @@
+ target_link_libraries(
+     BamTools PRIVATE
+     ${ZLIB_LIBRARIES})
++target_include_directories(
++    BamTools_static PRIVATE
++    ${ZLIB_INCLUDE_DIRS}
++    ${CMAKE_CURRENT_SOURCE_DIR}
++    ${CMAKE_CURRENT_BINARY_DIR})
++target_link_libraries(
++    BamTools_static PRIVATE
++    ${ZLIB_LIBRARIES})
++
+ 
+ if(WIN32)
+     target_link_libraries(
+@@ -103,6 +160,9 @@
+     target_sources(
+         BamTools PRIVATE
+         api/internal/io/TcpSocketEngine_unix_p.cpp)
++    target_sources(
++        BamTools_static PRIVATE
++        api/internal/io/TcpSocketEngine_unix_p.cpp)
+ endif()
+ 
+ if(EnableNodeJS)
+@@ -195,6 +255,13 @@
+     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
  
- install( FILES api_global.h              DESTINATION "include/bamtools/api" COMPONENT Development )
- install( FILES BamAlgorithms.h           DESTINATION "include/bamtools/api" COMPONENT Development )
+ install(
++    TARGETS BamTools_static
++    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
++
++
++install(
+     TARGETS bamtools_cmd
+     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+     LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}



View it on GitLab: https://salsa.debian.org/med-team/bamtools/-/compare/aca8e44548feb580ff00db8d3dd37c7e27d8969e...f368869f1f7f8ee34635fdcf6e4c3c005e33379c

-- 
View it on GitLab: https://salsa.debian.org/med-team/bamtools/-/compare/aca8e44548feb580ff00db8d3dd37c7e27d8969e...f368869f1f7f8ee34635fdcf6e4c3c005e33379c
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210917/2ba24c29/attachment-0001.htm>


More information about the debian-med-commit mailing list