diff options
author | 2016-09-04 14:59:47 +0200 | |
---|---|---|
committer | 2016-09-04 15:00:11 +0200 | |
commit | b57cefc0475955dc9dce44855af6a5795a78a001 (patch) | |
tree | d9a4af199d078344228c21bc943a12445b3c2481 /sci-biology/mosaik/files | |
parent | mail-client/mutt: revbump for fixes for bugs #592664 and #592680 (diff) | |
download | gentoo-b57cefc0475955dc9dce44855af6a5795a78a001.tar.gz gentoo-b57cefc0475955dc9dce44855af6a5795a78a001.tar.bz2 gentoo-b57cefc0475955dc9dce44855af6a5795a78a001.zip |
sci-biology/mosaik: Version bump to 2.2.30
* EAPI=6
* Make build system verbose
* Honour CPPFLAGS and LDFLAGS
* Handle LFS properly
* Fix -Werror=format-security errors
Package-Manager: portage-2.3.0
Diffstat (limited to 'sci-biology/mosaik/files')
3 files changed, 320 insertions, 0 deletions
diff --git a/sci-biology/mosaik/files/mosaik-2.2.30-Wformat-security.patch b/sci-biology/mosaik/files/mosaik-2.2.30-Wformat-security.patch new file mode 100644 index 000000000000..9f7271860229 --- /dev/null +++ b/sci-biology/mosaik/files/mosaik-2.2.30-Wformat-security.patch @@ -0,0 +1,84 @@ +- Fix incorrect printf format specifier (-Wformat) +* fann.c: In function ‘fann_print_connections’: +* fann.c:889:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=] +* printf("L %3d / N %4d %s\n", layer_it - ann->first_layer, + +- Fix erroneous memset call +* md5.c: In function ‘MD5Final’: +* md5.c:152:26: warning: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess] +* memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ + +--- a/fann-2.1.0/fann.c ++++ b/fann-2.1.0/fann.c +@@ -886,7 +886,7 @@ + neurons[ann->connections[i] - ann->first_layer->first_neuron] = (char)('A' + value); + } + } +- printf("L %3d / N %4d %s\n", layer_it - ann->first_layer, ++ printf("L %3ld / N %4ld %s\n", layer_it - ann->first_layer, + neuron_it - ann->first_layer->first_neuron, neurons); + } + } +@@ -987,12 +987,12 @@ + { + if(ann->network_type == FANN_NETTYPE_SHORTCUT) + { +- printf(" Hidden layer :%4d neurons, 0 bias\n", ++ printf(" Hidden layer :%4ld neurons, 0 bias\n", + layer_it->last_neuron - layer_it->first_neuron); + } + else + { +- printf(" Hidden layer :%4d neurons, 1 bias\n", ++ printf(" Hidden layer :%4ld neurons, 1 bias\n", + layer_it->last_neuron - layer_it->first_neuron - 1); + } + } +--- a/fann-2.1.0/fann_io.c ++++ b/fann-2.1.0/fann_io.c +@@ -174,7 +174,7 @@ + #endif + + /* Save network parameters */ +- fprintf(conf, "num_layers=%u\n", ann->last_layer - ann->first_layer); ++ fprintf(conf, "num_layers=%ld\n", ann->last_layer - ann->first_layer); + fprintf(conf, "learning_rate=%f\n", ann->learning_rate); + fprintf(conf, "connection_rate=%f\n", ann->connection_rate); + fprintf(conf, "network_type=%u\n", ann->network_type); +@@ -236,7 +236,7 @@ + for(layer_it = ann->first_layer; layer_it != ann->last_layer; layer_it++) + { + /* the number of neurons in the layers (in the last layer, there is always one too many neurons, because of an unused bias) */ +- fprintf(conf, "%u ", layer_it->last_neuron - layer_it->first_neuron); ++ fprintf(conf, "%ld ", layer_it->last_neuron - layer_it->first_neuron); + } + fprintf(conf, "\n"); + +@@ -316,14 +316,14 @@ + if(save_as_fixed) + { + /* save the connection "(source weight) " */ +- fprintf(conf, "(%u, %d) ", ++ fprintf(conf, "(%ld, %d) ", + connected_neurons[i] - first_neuron, + (int) floor((weights[i] * fixed_multiplier) + 0.5)); + } + else + { + /* save the connection "(source weight) " */ +- fprintf(conf, "(%u, " FANNPRINTF ") ", connected_neurons[i] - first_neuron, weights[i]); ++ fprintf(conf, "(%ld, " FANNPRINTF ") ", connected_neurons[i] - first_neuron, weights[i]); + } + #else + /* save the connection "(source weight) " */ +--- a/CommonSource/Utilities/md5.c ++++ b/CommonSource/Utilities/md5.c +@@ -149,7 +149,7 @@ + MD5Transform(ctx->buf, (uint32 *) ctx->in); + byteReverse((unsigned char *) ctx->buf, 4); + memcpy(digest, ctx->buf, 16); +- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ ++ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ + } + + diff --git a/sci-biology/mosaik/files/mosaik-2.2.30-fix-build-system.patch b/sci-biology/mosaik/files/mosaik-2.2.30-fix-build-system.patch new file mode 100644 index 000000000000..00a9bec3ae4d --- /dev/null +++ b/sci-biology/mosaik/files/mosaik-2.2.30-fix-build-system.patch @@ -0,0 +1,226 @@ +- Make build system verbose by default, as required by Gentoo policy + See also: https://bugs.gentoo.org/show_bug.cgi?id=429308 +- Remove CFLAGS and CXXFLAGS defaults +- Fix order of flags and honour CPPFLAGS for LFS support + and LDFLAGS for --as-needed, respectively + +--- a/CommonSource/DataStructures/Makefile ++++ b/CommonSource/DataStructures/Makefile +@@ -22,7 +22,7 @@ + + $(BUILT_OBJECTS): $(SOURCES) + @echo " * compiling" $(*F).cpp +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp + + clean: + @echo "Cleaning up." +--- a/CommonSource/ExternalReadFormats/Makefile ++++ b/CommonSource/ExternalReadFormats/Makefile +@@ -22,7 +22,7 @@ + + $(BUILT_OBJECTS): $(SOURCES) + @echo " * compiling" $(*F).cpp +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp + + clean: + @echo "Cleaning up." +--- a/CommonSource/MosaikReadFormat/Makefile ++++ b/CommonSource/MosaikReadFormat/Makefile +@@ -22,7 +22,7 @@ + + $(BUILT_OBJECTS): $(SOURCES) + @echo " * compiling" $(*F).cpp +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp + + clean: + @echo "Cleaning up." +--- a/CommonSource/PairwiseAlignment/Makefile ++++ b/CommonSource/PairwiseAlignment/Makefile +@@ -26,11 +26,11 @@ + + $(BUILT_OBJECTS): $(SOURCES) + @echo " * compiling" $(*F).cpp +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp + + $(CBUILT_OBJECTS): $(CSOURCES) + @echo " * compiling" $(*F).c +- @$(CC) -c -o $@ $(*F).c -O3 $(PLATFORM_FLAGS) $(INCLUDES) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).c + + clean: + @echo "Cleaning up." +--- a/CommonSource/Utilities/Makefile ++++ b/CommonSource/Utilities/Makefile +@@ -48,11 +48,11 @@ + + $(BUILT_OBJECTS): $(SOURCES) + @echo " * compiling" $(*F).cpp +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp + + $(CBUILT_OBJECTS): $(CSOURCES) + @echo " * compiling" $(*F).c +- @$(CC) -c -o $@ $(*F).c -O3 -w -DSQLITE_OMIT_LOAD_EXTENSION $(PLATFORM_FLAGS) $(INCLUDES) ++ $(CC) $(CFLAGS) $(CPPFLAGS) -DSQLITE_OMIT_LOAD_EXTENSION $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).c + + clean: + @echo "Cleaning up." +--- a/fann-2.1.0/Makefile ++++ b/fann-2.1.0/Makefile +@@ -12,7 +12,7 @@ + + $(CBUILT_OBJECTS): $(CSOURCES) + @echo " * compiling" $(*F).c +- @$(CC) -c -o $@ $(*F).c -O3 $(PLATFORM_FLAGS) -I$(INCLUDES) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) -I$(INCLUDES) -c -o $@ $(*F).c + + clean: + @echo "Cleaning up." +--- a/Makefile ++++ b/Makefile +@@ -4,8 +4,8 @@ + # ========================== + + # define our object and binary directories +-export OBJ_DIR = ../obj +-export BIN_DIR = ../bin ++export OBJ_DIR = ./obj ++export BIN_DIR = ./bin + + # define our common source directories + export ASSEMBLY_DIR = CommonSource/AssemblyFormats +@@ -16,20 +16,6 @@ + export PAIRWISE_DIR = CommonSource/PairwiseAlignment + export UTILITIES_DIR = CommonSource/Utilities + +-# define some default flags +-FLAGS = -Wall -Wno-char-subscripts -ansi -O3 +-#FLAGS = -Wall -Wno-char-subscripts -ansi -g -D VERBOSE_DEBUG #gdb debugging +-#FLAGS = -Wall -Wno-char-subscripts -ansi -O3 -D VERBOSE_DEBUG #enables verbose debugging +-CFLAGS = +-CXXFLAGS = +-#CXXFLAGS = -ansi -pedantic -Wextra -Weffc++ +-CFLAGS += $(FLAGS) +-CXXFLAGS += $(FLAGS) +-export CFLAGS +-export CXXFLAGS +-#export LDFLAGS = -Wl +-export CXX ?= g++ +- + # define our platform + export BLD_PLATFORM ?= linux + include includes/$(BLD_PLATFORM).inc +--- a/MosaikAligner/Makefile ++++ b/MosaikAligner/Makefile +@@ -68,11 +68,11 @@ + + $(PROGRAM): $(BUILT_OBJECTS) $(EXT_OBJECTS) + @echo " * linking $(PROGRAM)" +- @$(CXX) $(LDFLAGS) $(CXXFLAGS) $(PLATFORM_FLAGS) -o $(TD)$(BIN_DIR)/$@ $^ $(LIBS) ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(PLATFORM_FLAGS) -o $(TD)$(BIN_DIR)/$@ $^ $(LIBS) + + $(BUILT_OBJECTS): $(SOURCES) + @echo " * compiling" $(*F).cpp +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp + + $(EXT_OBJECTS): + @$(MAKE) --no-print-directory -C $(TD)$(DATA_STRUCT_DIR) +--- a/MosaikBuild/Makefile ++++ b/MosaikBuild/Makefile +@@ -26,11 +26,11 @@ + + $(PROGRAM): $(BUILT_OBJECTS) $(EXT_OBJECTS) + @echo " * linking $(PROGRAM)" +- @$(CXX) $(LDFLAGS) $(CXXFLAGS) $(PLATFORM_FLAGS) -o $(TD)$(BIN_DIR)/$@ $^ $(LIBS) ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(PLATFORM_FLAGS) -o $(TD)$(BIN_DIR)/$@ $^ $(LIBS) + + $(BUILT_OBJECTS): $(SOURCES) + @echo " * compiling" $(*F).cpp +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp + + $(EXT_OBJECTS): + @$(MAKE) --no-print-directory -C $(TD)$(DATA_STRUCT_DIR) +--- a/MosaikJump/Makefile ++++ b/MosaikJump/Makefile +@@ -26,11 +26,11 @@ + + $(PROGRAM): $(BUILT_OBJECTS) $(EXT_OBJECTS) + @echo " * linking $(PROGRAM)" +- @$(CXX) $(LDFLAGS) $(CXXFLAGS) $(PLATFORM_FLAGS) -o $(TD)$(BIN_DIR)/$@ $^ $(LIBS) ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(PLATFORM_FLAGS) -o $(TD)$(BIN_DIR)/$@ $^ $(LIBS) + + $(BUILT_OBJECTS): $(SOURCES) + @echo " * compiling" $(*F).cpp +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp + + $(EXT_OBJECTS): + @$(MAKE) --no-print-directory -C $(TD)$(MOSAIKREAD_DIR) +--- a/MosaikText/Makefile ++++ b/MosaikText/Makefile +@@ -26,11 +26,11 @@ + + $(PROGRAM): $(BUILT_OBJECTS) $(EXT_OBJECTS) + @echo " * linking $(PROGRAM)" +- @$(CXX) $(LDFLAGS) $(CXXFLAGS) $(PLATFORM_FLAGS) -o $(TD)$(BIN_DIR)/$@ $^ $(LIBS) ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(PLATFORM_FLAGS) -o $(TD)$(BIN_DIR)/$@ $^ $(LIBS) + + $(BUILT_OBJECTS): $(SOURCES) + @echo " * compiling" $(*F).cpp +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp + + $(EXT_OBJECTS): + @$(MAKE) --no-print-directory -C $(TD)$(MOSAIKREAD_DIR) +--- a/networkFile/retrainCode/attachXC/Makefile ++++ b/networkFile/retrainCode/attachXC/Makefile +@@ -3,12 +3,11 @@ + # (c) 2012 Wan-Ping Lee + # ========================== + +-FLAGS = -Wall -O3 + + + all: xc_pe.cpp xc_se.cpp +- @$(CXX) $(FLAGS) xc_pe.cpp -o xc_pe +- @$(CXX) $(FLAGS) xc_se.cpp -o xc_se ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) xc_pe.cpp -o xc_pe ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) xc_se.cpp -o xc_se + + .PHONY: all + +--- a/networkFile/retrainCode/trainNetwork/Makefile ++++ b/networkFile/retrainCode/trainNetwork/Makefile +@@ -5,8 +5,6 @@ + + OBJ_DIR = ./obj + +-FLAGS = -Wall -O3 +-CFLAGS = -O3 + FANN=../../../fann-2.1.0 + + SOURCES = sam_parser_float.cpp parameter_parser_float.cpp mq_train_float.cpp +@@ -15,12 +13,12 @@ + all: $(FANN)/floatfann.c $(SOURCES) + @test -d $(OBJ_DIR) || mkdir $(OBJ_DIR) + @echo " * compiling ......" +- @$(CC) $(CFLAGS) -c -o $(OBJ_DIR)/floatfann.o $(FANN)/floatfann.c -I$(FANN)/include +- @$(CXX) -c $(FLAGS) -o $(OBJ_DIR)/sam_parser_float.o sam_parser_float.cpp +- @$(CXX) -c $(FLAGS) -o $(OBJ_DIR)/parameter_parser_float.o parameter_parser_float.cpp +- @$(CXX) -c $(FLAGS) -o $(OBJ_DIR)/mq_train_float.o mq_train_float.cpp -I$(FANN)/include ++ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $(OBJ_DIR)/floatfann.o $(FANN)/floatfann.c -I$(FANN)/include ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $(OBJ_DIR)/sam_parser_float.o sam_parser_float.cpp ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $(OBJ_DIR)/parameter_parser_float.o parameter_parser_float.cpp ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $(OBJ_DIR)/mq_train_float.o mq_train_float.cpp -I$(FANN)/include + @echo " * linking ......" +- @$(CXX) $(FLAGS) $(OBJ_DIR)/*.o -o $(PROGRAM) ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJ_DIR)/*.o -o $(PROGRAM) + + .PHONY: all + diff --git a/sci-biology/mosaik/files/mosaik-2.2.30-remove-platform-code.patch b/sci-biology/mosaik/files/mosaik-2.2.30-remove-platform-code.patch new file mode 100644 index 000000000000..8573573ec125 --- /dev/null +++ b/sci-biology/mosaik/files/mosaik-2.2.30-remove-platform-code.patch @@ -0,0 +1,10 @@ +- Remove macro for enabling large file support, this is better handled at an + ebuild level, where the LFS flags can be handled for multiple architectures +- Remove static flag, which is contrary to Gentoo policy + +--- a/includes/linux.inc ++++ b/includes/linux.inc +@@ -1,2 +1,2 @@ + # define our processor specific flags +-export PLATFORM_FLAGS = -D_FILE_OFFSET_BITS=64 -static ++export PLATFORM_FLAGS = |