[med-svn] [kmc] 06/15: add patches

Sascha Steinbiss sascha-guest at moszumanska.debian.org
Mon Aug 24 21:25:07 UTC 2015


This is an automated email from the git hooks/post-receive script.

sascha-guest pushed a commit to branch master
in repository kmc.

commit 4fda3625913140085cfbfb2e486ddec6d067f51a
Author: Sascha Steinbiss <sascha at steinbiss.name>
Date:   Mon Aug 24 19:20:27 2015 +0000

    add patches
---
 debian/patches/allow-dry-clean | 32 ++++++++++++++++++++
 debian/patches/disable-asmlib  | 33 ++++++++++++++++++++
 debian/patches/hardening       | 30 ++++++++++++++++++
 debian/patches/use-shared-libs | 69 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 164 insertions(+)

diff --git a/debian/patches/allow-dry-clean b/debian/patches/allow-dry-clean
new file mode 100644
index 0000000..67c5310
--- /dev/null
+++ b/debian/patches/allow-dry-clean
@@ -0,0 +1,32 @@
+--- a/makefile
++++ b/makefile
+@@ -32,8 +32,6 @@
+ $(KMC_API_DIR)/kmc_file.o \
+ $(KMC_API_DIR)/kmer_api.o
+ 
+-
+-
+ ifeq ($(DISABLE_ASMLIB),true)
+ 	CFLAGS += -DDISABLE_ASMLIB
+ else
+@@ -41,7 +39,6 @@
+ 	$(KMC_MAIN_DIR)/libs/alibelf64.a
+ endif
+ 
+-
+ .cpp.o:
+ 	$(CC) $(CFLAGS) -c $< -o $@
+ 
+@@ -52,9 +49,9 @@
+ 	-mkdir -p $(KMC_BIN_DIR)
+ 	$(CC) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^
+ clean:
+-	-rm $(KMC_MAIN_DIR)/*.o
+-	-rm $(KMC_API_DIR)/*.o
+-	-rm $(KMC_DUMP_DIR)/*.o
++	-rm -f $(KMC_MAIN_DIR)/*.o
++	-rm -f $(KMC_API_DIR)/*.o
++	-rm -f $(KMC_DUMP_DIR)/*.o
+ 	-rm -rf bin
+ 
+ all: kmc kmc_dump
diff --git a/debian/patches/disable-asmlib b/debian/patches/disable-asmlib
new file mode 100644
index 0000000..5173015
--- /dev/null
+++ b/debian/patches/disable-asmlib
@@ -0,0 +1,33 @@
+--- a/makefile
++++ b/makefile
+@@ -1,15 +1,15 @@
+ all: kmc
+-	
++
+ KMC_BIN_DIR = bin
+ KMC_MAIN_DIR = kmer_counter
+ KMC_API_DIR = kmc_api
+ KMC_DUMP_DIR = kmc_dump
+ 
+ CC 	= g++
+-CFLAGS	= -Wall -O3 -m64 -static -fopenmp -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11 
+-CLINK	= -lm -static -fopenmp -O3 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11 
++CFLAGS	= -Wall -O3 -m64 -static -fopenmp -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11
++CLINK	= -lm -static -fopenmp -O3 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11
+ 
+-DISABLE_ASMLIB = false
++DISABLE_ASMLIB = true
+ 
+ KMC_OBJS = \
+ $(KMC_MAIN_DIR)/kmer_counter.o \
+@@ -42,8 +42,8 @@
+ 	CFLAGS += -DDISABLE_ASMLIB
+ else
+ 	KMC_LIBS += \
+-	$(KMC_MAIN_DIR)/libs/alibelf64.a 
+-endif 	
++	$(KMC_MAIN_DIR)/libs/alibelf64.a
++endif
+ 
+ 
+ .cpp.o:
diff --git a/debian/patches/hardening b/debian/patches/hardening
new file mode 100644
index 0000000..60453b8
--- /dev/null
+++ b/debian/patches/hardening
@@ -0,0 +1,30 @@
+--- a/makefile
++++ b/makefile
+@@ -5,8 +5,7 @@
+ KMC_API_DIR = kmc_api
+ KMC_DUMP_DIR = kmc_dump
+ 
+-CC 	= g++
+-CFLAGS	= -Wall -O3 -m64 -static -fopenmp -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11
++CFLAGS	+= -Wall -O3 -fopenmp -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11
+ CLINK	= -lm -lz -lbz2 -fopenmp -O3 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11
+ 
+ DISABLE_ASMLIB = true
+@@ -40,14 +39,14 @@
+ endif
+ 
+ .cpp.o:
+-	$(CC) $(CFLAGS) -c $< -o $@
++	$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
+ 
+ kmc: $(KMC_OBJS)
+ 	-mkdir -p $(KMC_BIN_DIR)
+-	$(CC) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^
++	$(CC) $(LDFLAGS) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^
+ kmc_dump: $(KMC_DUMP_OBJS)
+ 	-mkdir -p $(KMC_BIN_DIR)
+-	$(CC) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^
++	$(CC) $(LDFLAGS) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^
+ clean:
+ 	-rm -f $(KMC_MAIN_DIR)/*.o
+ 	-rm -f $(KMC_API_DIR)/*.o
diff --git a/debian/patches/use-shared-libs b/debian/patches/use-shared-libs
new file mode 100644
index 0000000..7586cf4
--- /dev/null
+++ b/debian/patches/use-shared-libs
@@ -0,0 +1,69 @@
+--- a/makefile
++++ b/makefile
+@@ -7,7 +7,7 @@
+ 
+ CC 	= g++
+ CFLAGS	= -Wall -O3 -m64 -static -fopenmp -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11
+-CLINK	= -lm -static -fopenmp -O3 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11
++CLINK	= -lm -lz -lbz2 -fopenmp -O3 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11
+ 
+ DISABLE_ASMLIB = true
+ 
+@@ -25,10 +25,6 @@
+ $(KMC_MAIN_DIR)/kb_storer.o \
+ $(KMC_MAIN_DIR)/kmer.o
+ 
+-KMC_LIBS = \
+-$(KMC_MAIN_DIR)/libs/libz.a \
+-$(KMC_MAIN_DIR)/libs/libbz2.a
+-
+ KMC_DUMP_OBJS = \
+ $(KMC_DUMP_DIR)/nc_utils.o \
+ $(KMC_API_DIR)/mmer.o \
+@@ -51,7 +47,7 @@
+ 
+ kmc: $(KMC_OBJS)
+ 	-mkdir -p $(KMC_BIN_DIR)
+-	$(CC) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_LIBS)
++	$(CC) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^
+ 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
+@@ -1,9 +1,9 @@
+ /*
+   This file is a part of KMC software distributed under GNU GPL 3 licence.
+   The homepage of the KMC project is http://sun.aei.polsl.pl/kmc
+-  
++
+   Authors: Sebastian Deorowicz, Agnieszka Debudaj-Grabysz, Marek Kokot
+-  
++
+   Version: 2.1.1
+   Date   : 2015-01-22
+ */
+@@ -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