[med-svn] [kmc] 01/08: add static lib patch
Kevin Murray
daube-guest at moszumanska.debian.org
Thu Oct 1 08:50:46 UTC 2015
This is an automated email from the git hooks/post-receive script.
daube-guest pushed a commit to branch daube/libkmcdev
in repository kmc.
commit 51bc3c1f2667bd3f8038034cf73c45bbc0684c41
Author: Kevin Murray <spam at kdmurray.id.au>
Date: Thu Oct 1 18:15:56 2015 +1000
add static lib patch
Using gbp pq, which touched other patches
---
...005-Add-static-library-target-to-makefile.patch | 53 ++++++++
debian/patches/allow-dry-clean | 18 ++-
...-libz2-include-statements-to-native-debian-libs | 30 -----
...hange-kmc-zlib-and-libz2-to-deb-zlib-and-libbz2 | 18 ---
debian/patches/debian-dependent-makefile.patch | 36 ------
debian/patches/disable-asmlib | 14 +-
debian/patches/hardening | 16 ++-
.../remove-all-zlib-libz2-include-statements | 15 ---
.../patches/remove-call-to-asmlib-sub-in-kbsorter | 16 ---
.../remove-embedded-libraries-from-makefile | 26 ----
.../remove-gz-and-bz-flags-from-compilation | 13 --
debian/patches/remove-references-to-asmlib | 44 -------
.../patches/remove-use-of-asmlib-subroutines.patch | 141 ---------------------
debian/patches/removing-static-option-in-makefile | 1 -
debian/patches/series | 1 +
debian/patches/use-shared-libs | 73 ++++++-----
16 files changed, 132 insertions(+), 383 deletions(-)
diff --git a/debian/patches/0005-Add-static-library-target-to-makefile.patch b/debian/patches/0005-Add-static-library-target-to-makefile.patch
new file mode 100644
index 0000000..1b3f12e
--- /dev/null
+++ b/debian/patches/0005-Add-static-library-target-to-makefile.patch
@@ -0,0 +1,53 @@
+From: Kevin Murray <spam at kdmurray.id.au>
+Date: Thu, 1 Oct 2015 18:11:51 +1000
+Subject: Add static library target to makefile
+
+---
+ makefile | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/makefile b/makefile
+index 3e2edc9..bc2ed0f 100644
+--- a/makefile
++++ b/makefile
+@@ -1,5 +1,3 @@
+-all: kmc
+-
+ KMC_BIN_DIR = bin
+ KMC_MAIN_DIR = kmer_counter
+ KMC_API_DIR = kmc_api
+@@ -32,6 +30,8 @@ $(KMC_DUMP_DIR)/kmc_dump.o \
+ $(KMC_API_DIR)/kmc_file.o \
+ $(KMC_API_DIR)/kmer_api.o
+
++KMC_LIB_OBJS = $(wildcard $(KMC_API_DIR)/*.o)
++
+ ifeq ($(DISABLE_ASMLIB),true)
+ CFLAGS += -DDISABLE_ASMLIB
+ else
+@@ -39,6 +39,8 @@ else
+ $(KMC_MAIN_DIR)/libs/alibelf64.a
+ endif
+
++all: kmc kmc_dump libkmc.a
++
+ .cpp.o:
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
+
+@@ -48,10 +50,15 @@ kmc: $(KMC_OBJS)
+ kmc_dump: $(KMC_DUMP_OBJS)
+ -mkdir -p $(KMC_BIN_DIR)
+ $(CC) $(LDFLAGS) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^
++
++libkmc.a: $(KMC_LIB_OBJS)
++ ar rcs $@ $^
++ ranlib libkmc.a
++
+ clean:
+ -rm -f $(KMC_MAIN_DIR)/*.o
+ -rm -f $(KMC_API_DIR)/*.o
+ -rm -f $(KMC_DUMP_DIR)/*.o
+ -rm -rf bin
++ -rm -f libkmc.a
+
+-all: kmc kmc_dump
diff --git a/debian/patches/allow-dry-clean b/debian/patches/allow-dry-clean
index 223793d..4160d24 100644
--- a/debian/patches/allow-dry-clean
+++ b/debian/patches/allow-dry-clean
@@ -1,8 +1,16 @@
-Author: Sascha Steinbiss <sascha at steinbiss.name>
-Description: allow to run the clean target without having built kmc before
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Thu, 1 Oct 2015 16:13:54 +1000
+Subject: allow-dry-clean
+
+---
+ makefile | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/makefile b/makefile
+index 0706eb3..71dd3b2 100644
--- a/makefile
+++ b/makefile
-@@ -32,8 +32,6 @@
+@@ -32,8 +32,6 @@ $(KMC_DUMP_DIR)/kmc_dump.o \
$(KMC_API_DIR)/kmc_file.o \
$(KMC_API_DIR)/kmer_api.o
@@ -11,7 +19,7 @@ Description: allow to run the clean target without having built kmc before
ifeq ($(DISABLE_ASMLIB),true)
CFLAGS += -DDISABLE_ASMLIB
else
-@@ -41,7 +39,6 @@
+@@ -41,7 +39,6 @@ else
$(KMC_MAIN_DIR)/libs/alibelf64.a
endif
@@ -19,7 +27,7 @@ Description: allow to run the clean target without having built kmc before
.cpp.o:
$(CC) $(CFLAGS) -c $< -o $@
-@@ -52,9 +49,9 @@
+@@ -52,9 +49,9 @@ kmc_dump: $(KMC_DUMP_OBJS)
-mkdir -p $(KMC_BIN_DIR)
$(CC) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^
clean:
diff --git a/debian/patches/change-all-zlib-libz2-include-statements-to-native-debian-libs b/debian/patches/change-all-zlib-libz2-include-statements-to-native-debian-libs
deleted file mode 100644
index 212aa14..0000000
--- a/debian/patches/change-all-zlib-libz2-include-statements-to-native-debian-libs
+++ /dev/null
@@ -1,30 +0,0 @@
-Description: zlib and libbz2 are distributed with the KMC.
-This patch alters the include statments for these libraries,
-using the debian libs instead.--- a/kmer_counter/fastq_reader.h
-+++ b/kmer_counter/fastq_reader.h
-@@ -16,8 +16,8 @@
- #include <stdio.h>
- #include <iostream>
-
--#include "libs/zlib.h"
--#include "libs/bzlib.h"
-+#include "zlib.h"
-+#include "bzlib.h"
-
-
- using namespace std;
-Index: b/kmer_counter/fastq_reader.h
-===================================================================
---- a/kmer_counter/fastq_reader.h
-+++ b/kmer_counter/fastq_reader.h
-@@ -16,8 +16,8 @@
- #include <stdio.h>
- #include <iostream>
-
--#include "libs/zlib.h"
--#include "libs/bzlib.h"
-+#include "zlib.h"
-+#include "bzlib.h"
-
-
- using namespace std;
diff --git a/debian/patches/change-kmc-zlib-and-libz2-to-deb-zlib-and-libbz2 b/debian/patches/change-kmc-zlib-and-libz2-to-deb-zlib-and-libbz2
deleted file mode 100644
index af9f4c8..0000000
--- a/debian/patches/change-kmc-zlib-and-libz2-to-deb-zlib-and-libbz2
+++ /dev/null
@@ -1,18 +0,0 @@
-Description: KMC distributes zlib and libbz2.
-This changes the usage of the distributed libs
-and makes KMC use the native debian libs
-Index: b/kmer_counter/fastq_reader.h
-===================================================================
---- a/kmer_counter/fastq_reader.h
-+++ b/kmer_counter/fastq_reader.h
-@@ -16,8 +16,8 @@
- #include <stdio.h>
- #include <iostream>
-
--#include "libs/zlib.h"
--#include "libs/bzlib.h"
-+#include "zlib.h"
-+#include "bzlib.h"
-
-
- using namespace std;
diff --git a/debian/patches/debian-dependent-makefile.patch b/debian/patches/debian-dependent-makefile.patch
deleted file mode 100644
index a734784..0000000
--- a/debian/patches/debian-dependent-makefile.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Description: Removes all local dependencies from the makefile and
-establishes links to the respective debian packages
-Index: b/makefile
-===================================================================
---- a/makefile
-+++ b/makefile
-@@ -1,7 +1,7 @@
- all: kmc
--
--BOOST_LIB = /boost/boost_1_55_0/stage/lib
--BOOST_H = /boost/boost_1_55_0
-+
-+BOOST_LIB := /usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-+BOOST_H = /usr/include/boost
-
- KMC_BIN_DIR = bin
- KMC_MAIN_DIR = kmer_counter
-@@ -13,15 +13,15 @@ CFLAGS = -Wall -O3 -m64 -static -fopenmp
- CLINK = -lm -static -fopenmp -O3 -std=c++11
-
- .cpp.o:
-- $(CC) $(CFLAGS) -c $< -o $@
-+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
- kmc: $(KMC_MAIN_DIR)/kmer_counter.o $(KMC_MAIN_DIR)/mmer.o $(KMC_MAIN_DIR)/mem_disk_file.o $(KMC_MAIN_DIR)/rev_byte.o $(KMC_MAIN_DIR)/fastq_reader.o $(KMC_MAIN_DIR)/timer.o $(KMC_MAIN_DIR)/radix.o $(KMC_MAIN_DIR)/kb_completer.o $(KMC_MAIN_DIR)/kb_storer.o $(KMC_MAIN_DIR)/kmer.o
- -mkdir -p $(KMC_BIN_DIR)
-- $(CC) $(CLINK) -o $(KMC_BIN_DIR)/$@ $(KMC_MAIN_DIR)/kmer_counter.o $(KMC_MAIN_DIR)/mem_disk_file.o $(KMC_MAIN_DIR)/rev_byte.o $(KMC_MAIN_DIR)/mmer.o $(KMC_MAIN_DIR)/fastq_reader.o $(KMC_MAIN_DIR)/timer.o $(KMC_MAIN_DIR)/radix.o $(KMC_MAIN_DIR)/kb_completer.o $(KMC_MAIN_DIR)/kb_storer.o $(KMC_MAIN_DIR)/kmer.o $(KMC_MAIN_DIR)/libs/alibelf64.a $(KMC_MAIN_DIR)/libs/libz.a $(KMC_MAIN_DIR)/libs/libbz2.a $(BOOST_LIB)/libboost_thread.a $(BOOST_LIB)/libboost_filesystem.a $(BOOST_LIB)/libboost_system.a
-+ $(CC) $(CPPFLAGS) $(CLINK) -o $(KMC_BIN_DIR)/$@ $(KMC_MAIN_DIR)/kmer_counter.o $(KMC_MAIN_DIR)/mem_disk_file.o $(KMC_MAIN_DIR)/rev_byte.o $(KMC_MAIN_DIR)/mmer.o $(KMC_MAIN_DIR)/fastq_reader.o $(KMC_MAIN_DIR)/timer.o $(KMC_MAIN_DIR)/radix.o $(KMC_MAIN_DIR)/kb_completer.o $(KMC_MAIN_DIR)/kb_storer.o $(KMC_MAIN_DIR)/kmer.o $(KMC_MAIN_DIR)/libs/alibelf64.a $(KMC_MAIN_DIR)/libs/libz.a $(KMC_MAIN_DIR)/libs/libbz2.a $(BOOST_LIB)/libboost_thread.a $(BOOST_LIB)/libboost_filesystem.a $(BOOST_LIB [...]
-
- kmc_dump: $(KMC_DUMP_DIR)/nc_utils.o $(KMC_API_DIR)/mmer.o $(KMC_DUMP_DIR)/kmc_dump.o $(KMC_API_DIR)/kmc_file.o $(KMC_API_DIR)/kmer_api.o
- -mkdir -p $(KMC_BIN_DIR)
-- $(CC) $(CLINK) -o $(KMC_BIN_DIR)/$@ $(KMC_DUMP_DIR)/nc_utils.o $(KMC_API_DIR)/mmer.o $(KMC_DUMP_DIR)/kmc_dump.o $(KMC_API_DIR)/kmc_file.o $(KMC_API_DIR)/kmer_api.o
-+ $(CC) $(CPPFLAGS) $(CLINK) -o $(KMC_BIN_DIR)/$@ $(KMC_DUMP_DIR)/nc_utils.o $(KMC_API_DIR)/mmer.o $(KMC_DUMP_DIR)/kmc_dump.o $(KMC_API_DIR)/kmc_file.o $(KMC_API_DIR)/kmer_api.o $(LDFLAGS)
-
- clean:
- -rm $(KMC_MAIN_DIR)/*.o
diff --git a/debian/patches/disable-asmlib b/debian/patches/disable-asmlib
index b3c83ba..109352f 100644
--- a/debian/patches/disable-asmlib
+++ b/debian/patches/disable-asmlib
@@ -1,5 +1,13 @@
-Author: Sascha Steinbiss <sascha at steinbiss.name>
-Description: disable the use of asmlib, which is removed for licensing reasons
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Thu, 1 Oct 2015 16:13:54 +1000
+Subject: disable-asmlib
+
+---
+ makefile | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/makefile b/makefile
+index 8488f72..2858043 100644
--- a/makefile
+++ b/makefile
@@ -1,15 +1,15 @@
@@ -22,7 +30,7 @@ Description: disable the use of asmlib, which is removed for licensing reasons
KMC_OBJS = \
$(KMC_MAIN_DIR)/kmer_counter.o \
-@@ -42,8 +42,8 @@
+@@ -42,8 +42,8 @@ ifeq ($(DISABLE_ASMLIB),true)
CFLAGS += -DDISABLE_ASMLIB
else
KMC_LIBS += \
diff --git a/debian/patches/hardening b/debian/patches/hardening
index 2e4afac..c5f6f6c 100644
--- a/debian/patches/hardening
+++ b/debian/patches/hardening
@@ -1,8 +1,16 @@
-Author: Sascha Steinbiss <sascha at steinbiss.name>
-Description: pass through compiler flags for hardening
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Thu, 1 Oct 2015 16:13:54 +1000
+Subject: hardening
+
+---
+ makefile | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/makefile b/makefile
+index 71dd3b2..3e2edc9 100644
--- a/makefile
+++ b/makefile
-@@ -5,8 +5,8 @@
+@@ -5,8 +5,8 @@ KMC_MAIN_DIR = kmer_counter
KMC_API_DIR = kmc_api
KMC_DUMP_DIR = kmc_dump
@@ -13,7 +21,7 @@ Description: pass through compiler flags for hardening
CLINK = -lm -lz -lbz2 -fopenmp -O3 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11
DISABLE_ASMLIB = true
-@@ -40,14 +40,14 @@
+@@ -40,14 +40,14 @@ else
endif
.cpp.o:
diff --git a/debian/patches/remove-all-zlib-libz2-include-statements b/debian/patches/remove-all-zlib-libz2-include-statements
deleted file mode 100644
index c4da373..0000000
--- a/debian/patches/remove-all-zlib-libz2-include-statements
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: b/kmer_counter/fastq_reader.h
-===================================================================
---- a/kmer_counter/fastq_reader.h
-+++ b/kmer_counter/fastq_reader.h
-@@ -16,8 +16,8 @@
- #include <stdio.h>
- #include <iostream>
-
--#include "libs/zlib.h"
--#include "libs/bzlib.h"
-+#include "zlib.h"
-+#include "bzlib.h"
-
-
- using namespace std;
diff --git a/debian/patches/remove-call-to-asmlib-sub-in-kbsorter b/debian/patches/remove-call-to-asmlib-sub-in-kbsorter
deleted file mode 100644
index 84fd718..0000000
--- a/debian/patches/remove-call-to-asmlib-sub-in-kbsorter
+++ /dev/null
@@ -1,16 +0,0 @@
-Description: Removes a call to set memory cache.
-asmlib subroutineIndex: kmc/kmer_counter/kb_sorter.h
-===================================================================
-Index: b/kmer_counter/kb_sorter.h
-===================================================================
---- a/kmer_counter/kb_sorter.h
-+++ b/kmer_counter/kb_sorter.h
-@@ -247,8 +247,6 @@ template <typename KMER_T, unsigned SIZE
- uint64 tmp_n_rec;
- CMemDiskFile *file;
-
-- SetMemcpyCacheLimit(8);
--
- // Process bins
- while (!bq->completed())
- {
diff --git a/debian/patches/remove-embedded-libraries-from-makefile b/debian/patches/remove-embedded-libraries-from-makefile
deleted file mode 100644
index c8e4b64..0000000
--- a/debian/patches/remove-embedded-libraries-from-makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-Description: Removes the calls to the distributed
-libraries
-===================================================================
-Index: b/makefile
-===================================================================
---- a/makefile
-+++ b/makefile
-@@ -9,15 +9,15 @@ KMC_API_DIR = kmc_api
- KMC_DUMP_DIR = kmc_dump
-
- CC = g++
--CFLAGS = -Wall -O3 -m64 -static -fopenmp -std=c++11 -I $(BOOST_H)
--CLINK = -lm -static -fopenmp -O3 -std=c++11
-+CFLAGS = -Wall -O3 -fopenmp -std=c++11 -I $(BOOST_H)
-+CLINK = -lm -fopenmp -O3 -std=c++11
-
- .cpp.o:
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
- kmc: $(KMC_MAIN_DIR)/kmer_counter.o $(KMC_MAIN_DIR)/mmer.o $(KMC_MAIN_DIR)/mem_disk_file.o $(KMC_MAIN_DIR)/rev_byte.o $(KMC_MAIN_DIR)/fastq_reader.o $(KMC_MAIN_DIR)/timer.o $(KMC_MAIN_DIR)/radix.o $(KMC_MAIN_DIR)/kb_completer.o $(KMC_MAIN_DIR)/kb_storer.o $(KMC_MAIN_DIR)/kmer.o
- -mkdir -p $(KMC_BIN_DIR)
-- $(CC) $(CPPFLAGS) $(CLINK) -o $(KMC_BIN_DIR)/$@ $(KMC_MAIN_DIR)/kmer_counter.o $(KMC_MAIN_DIR)/mem_disk_file.o $(KMC_MAIN_DIR)/rev_byte.o $(KMC_MAIN_DIR)/mmer.o $(KMC_MAIN_DIR)/fastq_reader.o $(KMC_MAIN_DIR)/timer.o $(KMC_MAIN_DIR)/radix.o $(KMC_MAIN_DIR)/kb_completer.o $(KMC_MAIN_DIR)/kb_storer.o $(KMC_MAIN_DIR)/kmer.o $(KMC_MAIN_DIR)/libs/alibelf64.a $(KMC_MAIN_DIR)/libs/libz.a $(KMC_MAIN_DIR)/libs/libbz2.a $(BOOST_LIB)/libboost_thread.a $(BOOST_LIB)/libboost_filesystem.a $(BOOST_LIB [...]
-+ $(CC) $(CPPFLAGS) $(CLINK) -o $(KMC_BIN_DIR)/$@ $(KMC_MAIN_DIR)/kmer_counter.o $(KMC_MAIN_DIR)/mem_disk_file.o $(KMC_MAIN_DIR)/rev_byte.o $(KMC_MAIN_DIR)/mmer.o $(KMC_MAIN_DIR)/fastq_reader.o $(KMC_MAIN_DIR)/timer.o $(KMC_MAIN_DIR)/radix.o $(KMC_MAIN_DIR)/kb_completer.o $(KMC_MAIN_DIR)/kb_storer.o $(KMC_MAIN_DIR)/kmer.o $(BOOST_LIB)/libboost_thread.a $(BOOST_LIB)/libboost_filesystem.a $(BOOST_LIB)/libboost_system.a $(LDFLAGS) -lz -lbz2
-
- kmc_dump: $(KMC_DUMP_DIR)/nc_utils.o $(KMC_API_DIR)/mmer.o $(KMC_DUMP_DIR)/kmc_dump.o $(KMC_API_DIR)/kmc_file.o $(KMC_API_DIR)/kmer_api.o
- -mkdir -p $(KMC_BIN_DIR)
diff --git a/debian/patches/remove-gz-and-bz-flags-from-compilation b/debian/patches/remove-gz-and-bz-flags-from-compilation
deleted file mode 100644
index 86df646..0000000
--- a/debian/patches/remove-gz-and-bz-flags-from-compilation
+++ /dev/null
@@ -1,13 +0,0 @@
-Description: Removing -lz and -lbz2 from compilation command.Index: kmc/makefile
-===================================================================
---- kmc.orig/makefile
-+++ kmc/makefile
-@@ -17,7 +17,7 @@ CLINK = -lm -static -fopenmp -O3 -std=c+
-
- kmc: $(KMC_MAIN_DIR)/kmer_counter.o $(KMC_MAIN_DIR)/mmer.o $(KMC_MAIN_DIR)/mem_disk_file.o $(KMC_MAIN_DIR)/rev_byte.o $(KMC_MAIN_DIR)/fastq_reader.o $(KMC_MAIN_DIR)/timer.o $(KMC_MAIN_DIR)/radix.o $(KMC_MAIN_DIR)/kb_completer.o $(KMC_MAIN_DIR)/kb_storer.o $(KMC_MAIN_DIR)/kmer.o
- -mkdir -p $(KMC_BIN_DIR)
-- $(CC) $(CPPFLAGS) $(CLINK) -o $(KMC_BIN_DIR)/$@ $(KMC_MAIN_DIR)/kmer_counter.o $(KMC_MAIN_DIR)/mem_disk_file.o $(KMC_MAIN_DIR)/rev_byte.o $(KMC_MAIN_DIR)/mmer.o $(KMC_MAIN_DIR)/fastq_reader.o $(KMC_MAIN_DIR)/timer.o $(KMC_MAIN_DIR)/radix.o $(KMC_MAIN_DIR)/kb_completer.o $(KMC_MAIN_DIR)/kb_storer.o $(KMC_MAIN_DIR)/kmer.o $(BOOST_LIB)/libboost_thread.a $(BOOST_LIB)/libboost_filesystem.a $(BOOST_LIB)/libboost_system.a $(LDFLAGS) -lz -lbz2
-+ $(CC) $(CPPFLAGS) $(CLINK) -o $(KMC_BIN_DIR)/$@ $(KMC_MAIN_DIR)/kmer_counter.o $(KMC_MAIN_DIR)/mem_disk_file.o $(KMC_MAIN_DIR)/rev_byte.o $(KMC_MAIN_DIR)/mmer.o $(KMC_MAIN_DIR)/fastq_reader.o $(KMC_MAIN_DIR)/timer.o $(KMC_MAIN_DIR)/radix.o $(KMC_MAIN_DIR)/kb_completer.o $(KMC_MAIN_DIR)/kb_storer.o $(KMC_MAIN_DIR)/kmer.o $(BOOST_LIB)/libboost_thread.a $(BOOST_LIB)/libboost_filesystem.a $(BOOST_LIB)/libboost_system.a $(LDFLAGS)
-
- kmc_dump: $(KMC_DUMP_DIR)/nc_utils.o $(KMC_API_DIR)/mmer.o $(KMC_DUMP_DIR)/kmc_dump.o $(KMC_API_DIR)/kmc_file.o $(KMC_API_DIR)/kmer_api.o
- -mkdir -p $(KMC_BIN_DIR)
diff --git a/debian/patches/remove-references-to-asmlib b/debian/patches/remove-references-to-asmlib
deleted file mode 100644
index ee1ec9a..0000000
--- a/debian/patches/remove-references-to-asmlib
+++ /dev/null
@@ -1,44 +0,0 @@
-Description: Removes all - include "libs/asmlib.h".
-This is a customised subroutine optimisaiton library
-that gives KMC a speed performance increase of ~0.66%
-when compared ot the native library.
-A decision was made togehter with upstream to remove
-this dependency for the Debian package.
-
-
-Index: b/kmer_counter/kmc.h
-===================================================================
---- a/kmer_counter/kmc.h
-+++ b/kmer_counter/kmc.h
-@@ -29,7 +29,6 @@
- #include "kb_storer.h"
- #include "s_mapper.h"
- #include "splitter.h"
--#include "libs/asmlib.h"
- #include <boost/filesystem.hpp>
-
- #ifdef DEVELOP_MODE
-Index: b/kmer_counter/mem_disk_file.cpp
-===================================================================
---- a/kmer_counter/mem_disk_file.cpp
-+++ b/kmer_counter/mem_disk_file.cpp
-@@ -10,7 +10,6 @@
- */
-
- #include "mem_disk_file.h"
--#include "libs/asmlib.h"
-
- //----------------------------------------------------------------------------------
- // Constructor
-Index: b/kmer_counter/radix.h
-===================================================================
---- a/kmer_counter/radix.h
-+++ b/kmer_counter/radix.h
-@@ -16,7 +16,6 @@
- #include <iostream>
- #include <omp.h>
- #include <algorithm>
--#include "libs/asmlib.h"
- #include "defs.h"
- #include "queues.h"
- #include <boost/static_assert.hpp>
diff --git a/debian/patches/remove-use-of-asmlib-subroutines.patch b/debian/patches/remove-use-of-asmlib-subroutines.patch
deleted file mode 100644
index 79a5bfb..0000000
--- a/debian/patches/remove-use-of-asmlib-subroutines.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-Description: Removes all usage of the "A_mem" subroutines.
-The A_mem type of calls are defined in the asmlib library.
-
-Index: b/kmer_counter/defs.h
-===================================================================
---- a/kmer_counter/defs.h
-+++ b/kmer_counter/defs.h
-@@ -73,8 +73,6 @@ typedef float count_t;
- #define KMER_WORDS ((MAX_K + 31) / 32)
-
- #ifdef _DEBUG
--#define A_memcpy memcpy
--#define A_memset memset
- #endif
-
-
-Index: b/kmer_counter/kb_sorter.h
-===================================================================
---- a/kmer_counter/kb_sorter.h
-+++ b/kmer_counter/kb_sorter.h
-@@ -406,7 +406,7 @@ template <unsigned SIZE> void CKmerBinSo
- template <unsigned SIZE> void CKmerBinSorter_Impl<CKmer<SIZE>, SIZE>::FromChildThread(CKmerBinSorter<CKmer<SIZE>, SIZE>& ptr, CKmer<SIZE>* thread_buffer, uint64 size)
- {
- lock_guard<mutex> lcx(ptr.expander_mtx);
-- A_memcpy(ptr.buffer_input + ptr.input_pos, thread_buffer, size * sizeof(CKmer<SIZE>));
-+ memcpy(ptr.buffer_input + ptr.input_pos, thread_buffer, size * sizeof(CKmer<SIZE>));
- ptr.input_pos += size;
- }
-
-@@ -1359,4 +1359,4 @@ template <typename KMER_T, unsigned SIZE
-
- #endif
-
--// ***** EOF
-\ No newline at end of file
-+// ***** EOF
-Index: b/kmer_counter/kb_storer.cpp
-===================================================================
---- a/kmer_counter/kb_storer.cpp
-+++ b/kmer_counter/kb_storer.cpp
-@@ -156,7 +156,7 @@ void CKmerBinStorer::PutBinToTmpFile(uin
- {
- buf = get<0>(*p);
- size = get<1>(*p);
-- A_memcpy(tmp_buff + tmp_buff_pos, buf, size);
-+ memcpy(tmp_buff + tmp_buff_pos, buf, size);
- tmp_buff_pos += size;
- pmm_bins->free(buf);
- }
-Index: b/kmer_counter/mem_disk_file.cpp
-===================================================================
---- a/kmer_counter/mem_disk_file.cpp
-+++ b/kmer_counter/mem_disk_file.cpp
-@@ -78,7 +78,7 @@ size_t CMemDiskFile::Read(uchar * ptr, s
- uint64 pos = 0;
- for(auto& p : container)
- {
-- A_memcpy(ptr + pos, p.first, p.second);
-+ memcpy(ptr + pos, p.first, p.second);
- pos += p.second;
- delete[] p.first;
- }
-@@ -97,7 +97,7 @@ size_t CMemDiskFile::Write(const uchar *
- if(memory_mode)
- {
- uchar *buf = new uchar[size * count];
-- A_memcpy(buf, ptr, size * count);
-+ memcpy(buf, ptr, size * count);
- container.push_back(make_pair(buf, size * count));
- return size * count;
- }
-Index: b/kmer_counter/radix.cpp
-===================================================================
---- a/kmer_counter/radix.cpp
-+++ b/kmer_counter/radix.cpp
-@@ -72,7 +72,7 @@ void RadixOMP_uint8(uint32 *SourcePtr, u
-
- ++privateByteCounter[byteValue];
- }
-- A_memcpy(&ByteCounter[myID][0], privateByteCounter, sizeof(privateByteCounter));
-+ memcpy(&ByteCounter[myID][0], privateByteCounter, sizeof(privateByteCounter));
-
- #pragma omp barrier
-
-@@ -104,7 +104,7 @@ void RadixOMP_uint8(uint32 *SourcePtr, u
- for (private_i = 0; private_i < 256; private_i++)
- ByteCounter[myID][private_i] += globalHisto[private_i];
-
-- A_memcpy(privateByteCounter, &ByteCounter[myID][0], sizeof(privateByteCounter));
-+ memcpy(privateByteCounter, &ByteCounter[myID][0], sizeof(privateByteCounter));
-
- #pragma omp for schedule(static)
- for(i = data_offset; i < SourceSize_in_bytes; i = i + rec_size)
-@@ -199,7 +199,7 @@ template<typename COUNTER_TYPE, typename
- byteValue = *(reinterpret_cast<const uint8_t*>(&tempSource[i]) + ByteIndex);
- ++privateByteCounter[byteValue];
- }
-- A_memcpy(&ByteCounter[myID][0], privateByteCounter, sizeof(privateByteCounter));
-+ memcpy(&ByteCounter[myID][0], privateByteCounter, sizeof(privateByteCounter));
-
- #pragma omp barrier
-
-@@ -230,7 +230,7 @@ template<typename COUNTER_TYPE, typename
- for (private_i = 0; private_i < 256; private_i++)
- ByteCounter[myID][private_i] += globalHisto[private_i];
-
-- A_memcpy(privateByteCounter, &ByteCounter[myID][0], sizeof(privateByteCounter));
-+ memcpy(privateByteCounter, &ByteCounter[myID][0], sizeof(privateByteCounter));
-
-
- #pragma omp for schedule(static)
-@@ -245,7 +245,7 @@ template<typename COUNTER_TYPE, typename
- privateByteCounter[byteValue]++;
-
- if(index_x == (BUFFER_WIDTH -1))
-- A_memcpy ( &tempDest[privateByteCounter[byteValue] - (BUFFER_WIDTH)], &Buffer[byteValue * BUFFER_WIDTH], BUFFER_WIDTH *sizeof(uint64) );
-+ memcpy ( &tempDest[privateByteCounter[byteValue] - (BUFFER_WIDTH)], &Buffer[byteValue * BUFFER_WIDTH], BUFFER_WIDTH *sizeof(uint64) );
- } //end_for
-
- INT_TYPE elemInBuffer;
-@@ -265,7 +265,7 @@ template<typename COUNTER_TYPE, typename
- elemInBuffer = index_stop - index_start;
-
- if(elemInBuffer != 0)
-- A_memcpy ( &tempDest[privateByteCounter[private_i] - elemInBuffer], &Buffer[private_i * BUFFER_WIDTH + (privateByteCounter[private_i] - elemInBuffer)%BUFFER_WIDTH], (elemInBuffer)*sizeof(uint64) );
-+ memcpy ( &tempDest[privateByteCounter[private_i] - elemInBuffer], &Buffer[private_i * BUFFER_WIDTH + (privateByteCounter[private_i] - elemInBuffer)%BUFFER_WIDTH], (elemInBuffer)*sizeof(uint64) );
-
- }
- #pragma omp barrier
-Index: b/kmer_counter/kmc.h
-===================================================================
---- a/kmer_counter/kmc.h
-+++ b/kmer_counter/kmc.h
-@@ -164,7 +164,6 @@ template <typename KMER_T, unsigned SIZE
-
- initialized = true;
-
-- SetMemcpyCacheLimit(8); // Sets the asmlib's memcpy function to make copy without use of cache memory
- }
-
- //----------------------------------------------------------------------------------
diff --git a/debian/patches/removing-static-option-in-makefile b/debian/patches/removing-static-option-in-makefile
deleted file mode 100644
index 4415469..0000000
--- a/debian/patches/removing-static-option-in-makefile
+++ /dev/null
@@ -1 +0,0 @@
-Description: Removes the static compilation option
\ No newline at end of file
diff --git a/debian/patches/series b/debian/patches/series
index 2a1d604..fb0024a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ disable-asmlib
use-shared-libs
allow-dry-clean
hardening
+0005-Add-static-library-target-to-makefile.patch
diff --git a/debian/patches/use-shared-libs b/debian/patches/use-shared-libs
index 6b986ca..7d980b2 100644
--- a/debian/patches/use-shared-libs
+++ b/debian/patches/use-shared-libs
@@ -1,8 +1,45 @@
-Author: Sascha Steinbiss <sascha at steinbiss.name>
-Description: use shared libraries
+From: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Date: Thu, 1 Oct 2015 16:13:54 +1000
+Subject: use-shared-libs
+
+---
+ kmer_counter/fastq_reader.h | 8 ++++----
+ makefile | 8 ++------
+ 2 files changed, 6 insertions(+), 10 deletions(-)
+
+diff --git a/kmer_counter/fastq_reader.h b/kmer_counter/fastq_reader.h
+index 5132d23..bad1243 100644
+--- a/kmer_counter/fastq_reader.h
++++ b/kmer_counter/fastq_reader.h
+@@ -16,8 +16,8 @@
+ #include <stdio.h>
+ #include <iostream>
+
+-#include "libs/zlib.h"
+-#include "libs/bzlib.h"
++#include <zlib.h>
++#include <bzlib.h>
+
+
+ using namespace std;
+@@ -42,10 +42,10 @@ class CFastqReader {
+ int bzerror;
+
+ uint64 part_size;
+-
++
+ uchar *part;
+ uint64 part_filled;
+-
++
+ uint32 gzip_buffer_size;
+ uint32 bzip2_buffer_size;
+
+diff --git a/makefile b/makefile
+index 2858043..0706eb3 100644
--- a/makefile
+++ b/makefile
-@@ -7,7 +7,7 @@
+@@ -7,7 +7,7 @@ KMC_DUMP_DIR = kmc_dump
CC = g++
CFLAGS = -Wall -O3 -m64 -static -fopenmp -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11
@@ -11,7 +48,7 @@ Description: use shared libraries
DISABLE_ASMLIB = true
-@@ -25,10 +25,6 @@
+@@ -25,10 +25,6 @@ $(KMC_MAIN_DIR)/kb_completer.o \
$(KMC_MAIN_DIR)/kb_storer.o \
$(KMC_MAIN_DIR)/kmer.o
@@ -22,7 +59,7 @@ Description: use shared libraries
KMC_DUMP_OBJS = \
$(KMC_DUMP_DIR)/nc_utils.o \
$(KMC_API_DIR)/mmer.o \
-@@ -51,7 +47,7 @@
+@@ -51,7 +47,7 @@ endif
kmc: $(KMC_OBJS)
-mkdir -p $(KMC_BIN_DIR)
@@ -31,29 +68,3 @@ Description: use shared libraries
kmc_dump: $(KMC_DUMP_OBJS)
-mkdir -p $(KMC_BIN_DIR)
$(CC) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^
---- a/kmer_counter/fastq_reader.h
-+++ b/kmer_counter/fastq_reader.h
-@@ -16,8 +16,8 @@
- #include <stdio.h>
- #include <iostream>
-
--#include "libs/zlib.h"
--#include "libs/bzlib.h"
-+#include <zlib.h>
-+#include <bzlib.h>
-
-
- using namespace std;
-@@ -42,10 +42,10 @@
- int bzerror;
-
- uint64 part_size;
--
-+
- uchar *part;
- uint64 part_filled;
--
-+
- uint32 gzip_buffer_size;
- uint32 bzip2_buffer_size;
-
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/kmc.git
More information about the debian-med-commit
mailing list