Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-biology/mosaik/, sci-biology/mosaik/files/
Date: Sun, 04 Sep 2016 13:02:21
Message-Id: 1472994011.b57cefc0475955dc9dce44855af6a5795a78a001.soap@gentoo
1 commit: b57cefc0475955dc9dce44855af6a5795a78a001
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 4 12:59:47 2016 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 4 13:00:11 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b57cefc0
7
8 sci-biology/mosaik: Version bump to 2.2.30
9
10 * EAPI=6
11 * Make build system verbose
12 * Honour CPPFLAGS and LDFLAGS
13 * Handle LFS properly
14 * Fix -Werror=format-security errors
15
16 Package-Manager: portage-2.3.0
17
18 sci-biology/mosaik/Manifest | 1 +
19 .../files/mosaik-2.2.30-Wformat-security.patch | 84 ++++++++
20 .../files/mosaik-2.2.30-fix-build-system.patch | 226 +++++++++++++++++++++
21 .../files/mosaik-2.2.30-remove-platform-code.patch | 10 +
22 sci-biology/mosaik/mosaik-2.2.30.ebuild | 53 +++++
23 5 files changed, 374 insertions(+)
24
25 diff --git a/sci-biology/mosaik/Manifest b/sci-biology/mosaik/Manifest
26 index 77f5aa8..de9954a 100644
27 --- a/sci-biology/mosaik/Manifest
28 +++ b/sci-biology/mosaik/Manifest
29 @@ -1,2 +1,3 @@
30 DIST Mosaik-1.0.1367-source.tar.bz2 8700231 SHA256 2a6ee1d25af835028b71f2518c6a00e929e64e7be6305183dfe0e242a015c750 SHA512 2100cd3b182a77be9a7411dce61ee51cb28b5e8e64282ec26e74d86c1e41d3254f7f62bd69f2ee4ad4d60c535e00e604b5f84f748f5c43ad4b0ac939cf8ed81a WHIRLPOOL cf25de6062201956068f02c339216d11fc1b473d68d7b4e9aed12d6f53ac5485995082a386b972d9545672346fac08f607bae34ac839bc8edf461b84e7430456
31 DIST Mosaik-1.0.1388-source.tar.bz2 8730164 SHA256 d6a8effa49adac617a388e2132aaf1a6b0679c783574d7df2cbd952a5f96e60c SHA512 cb6c4035cf9a6433b25800d841b74add3c88f06a87ac0261ffbba7be0528bcb02460fbbd0095656e60ca44c28ea249fe702bb0a4262d2ba64574a7e54a05a2bb WHIRLPOOL 5bf926898ab0f40f21858e511c366586d82450f4ef9af14e4add2e7e889be27a543afa23006de3bb2f49d2a43a81d32473958946a5cc08da0a26feee41c7a3e0
32 +DIST mosaik-2.2.30.tar.gz 4387062 SHA256 685dcc4cde1b56d19be37bfb238ae4cddeb25dced6da7b3880e68973957e940e SHA512 1acf534e6defc927fc22937a7bae6786e85ab7aa234b4209169f1267f1a9bd68415b441c6aed2e7cd667f694a562017ebc9457251958f77386259ffce9812b10 WHIRLPOOL 493291cc94cc5f95f5f1f62c3208f1c8dbb8cb0efcf6a21cca3e3963228f02ab0e59f11e00d8a9724a99733ffd290bc979262c0e553a1ee55c1adc9c392c3813
33
34 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
35 new file mode 100644
36 index 00000000..9f72718
37 --- /dev/null
38 +++ b/sci-biology/mosaik/files/mosaik-2.2.30-Wformat-security.patch
39 @@ -0,0 +1,84 @@
40 +- Fix incorrect printf format specifier (-Wformat)
41 +* fann.c: In function ‘fann_print_connections’:
42 +* fann.c:889:11: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
43 +* printf("L %3d / N %4d %s\n", layer_it - ann->first_layer,
44 +
45 +- Fix erroneous memset call
46 +* md5.c: In function ‘MD5Final’:
47 +* 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]
48 +* memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
49 +
50 +--- a/fann-2.1.0/fann.c
51 ++++ b/fann-2.1.0/fann.c
52 +@@ -886,7 +886,7 @@
53 + neurons[ann->connections[i] - ann->first_layer->first_neuron] = (char)('A' + value);
54 + }
55 + }
56 +- printf("L %3d / N %4d %s\n", layer_it - ann->first_layer,
57 ++ printf("L %3ld / N %4ld %s\n", layer_it - ann->first_layer,
58 + neuron_it - ann->first_layer->first_neuron, neurons);
59 + }
60 + }
61 +@@ -987,12 +987,12 @@
62 + {
63 + if(ann->network_type == FANN_NETTYPE_SHORTCUT)
64 + {
65 +- printf(" Hidden layer :%4d neurons, 0 bias\n",
66 ++ printf(" Hidden layer :%4ld neurons, 0 bias\n",
67 + layer_it->last_neuron - layer_it->first_neuron);
68 + }
69 + else
70 + {
71 +- printf(" Hidden layer :%4d neurons, 1 bias\n",
72 ++ printf(" Hidden layer :%4ld neurons, 1 bias\n",
73 + layer_it->last_neuron - layer_it->first_neuron - 1);
74 + }
75 + }
76 +--- a/fann-2.1.0/fann_io.c
77 ++++ b/fann-2.1.0/fann_io.c
78 +@@ -174,7 +174,7 @@
79 + #endif
80 +
81 + /* Save network parameters */
82 +- fprintf(conf, "num_layers=%u\n", ann->last_layer - ann->first_layer);
83 ++ fprintf(conf, "num_layers=%ld\n", ann->last_layer - ann->first_layer);
84 + fprintf(conf, "learning_rate=%f\n", ann->learning_rate);
85 + fprintf(conf, "connection_rate=%f\n", ann->connection_rate);
86 + fprintf(conf, "network_type=%u\n", ann->network_type);
87 +@@ -236,7 +236,7 @@
88 + for(layer_it = ann->first_layer; layer_it != ann->last_layer; layer_it++)
89 + {
90 + /* the number of neurons in the layers (in the last layer, there is always one too many neurons, because of an unused bias) */
91 +- fprintf(conf, "%u ", layer_it->last_neuron - layer_it->first_neuron);
92 ++ fprintf(conf, "%ld ", layer_it->last_neuron - layer_it->first_neuron);
93 + }
94 + fprintf(conf, "\n");
95 +
96 +@@ -316,14 +316,14 @@
97 + if(save_as_fixed)
98 + {
99 + /* save the connection "(source weight) " */
100 +- fprintf(conf, "(%u, %d) ",
101 ++ fprintf(conf, "(%ld, %d) ",
102 + connected_neurons[i] - first_neuron,
103 + (int) floor((weights[i] * fixed_multiplier) + 0.5));
104 + }
105 + else
106 + {
107 + /* save the connection "(source weight) " */
108 +- fprintf(conf, "(%u, " FANNPRINTF ") ", connected_neurons[i] - first_neuron, weights[i]);
109 ++ fprintf(conf, "(%ld, " FANNPRINTF ") ", connected_neurons[i] - first_neuron, weights[i]);
110 + }
111 + #else
112 + /* save the connection "(source weight) " */
113 +--- a/CommonSource/Utilities/md5.c
114 ++++ b/CommonSource/Utilities/md5.c
115 +@@ -149,7 +149,7 @@
116 + MD5Transform(ctx->buf, (uint32 *) ctx->in);
117 + byteReverse((unsigned char *) ctx->buf, 4);
118 + memcpy(digest, ctx->buf, 16);
119 +- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
120 ++ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
121 + }
122 +
123 +
124
125 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
126 new file mode 100644
127 index 00000000..00a9bec
128 --- /dev/null
129 +++ b/sci-biology/mosaik/files/mosaik-2.2.30-fix-build-system.patch
130 @@ -0,0 +1,226 @@
131 +- Make build system verbose by default, as required by Gentoo policy
132 + See also: https://bugs.gentoo.org/show_bug.cgi?id=429308
133 +- Remove CFLAGS and CXXFLAGS defaults
134 +- Fix order of flags and honour CPPFLAGS for LFS support
135 + and LDFLAGS for --as-needed, respectively
136 +
137 +--- a/CommonSource/DataStructures/Makefile
138 ++++ b/CommonSource/DataStructures/Makefile
139 +@@ -22,7 +22,7 @@
140 +
141 + $(BUILT_OBJECTS): $(SOURCES)
142 + @echo " * compiling" $(*F).cpp
143 +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES)
144 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp
145 +
146 + clean:
147 + @echo "Cleaning up."
148 +--- a/CommonSource/ExternalReadFormats/Makefile
149 ++++ b/CommonSource/ExternalReadFormats/Makefile
150 +@@ -22,7 +22,7 @@
151 +
152 + $(BUILT_OBJECTS): $(SOURCES)
153 + @echo " * compiling" $(*F).cpp
154 +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES)
155 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp
156 +
157 + clean:
158 + @echo "Cleaning up."
159 +--- a/CommonSource/MosaikReadFormat/Makefile
160 ++++ b/CommonSource/MosaikReadFormat/Makefile
161 +@@ -22,7 +22,7 @@
162 +
163 + $(BUILT_OBJECTS): $(SOURCES)
164 + @echo " * compiling" $(*F).cpp
165 +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES)
166 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp
167 +
168 + clean:
169 + @echo "Cleaning up."
170 +--- a/CommonSource/PairwiseAlignment/Makefile
171 ++++ b/CommonSource/PairwiseAlignment/Makefile
172 +@@ -26,11 +26,11 @@
173 +
174 + $(BUILT_OBJECTS): $(SOURCES)
175 + @echo " * compiling" $(*F).cpp
176 +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES)
177 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp
178 +
179 + $(CBUILT_OBJECTS): $(CSOURCES)
180 + @echo " * compiling" $(*F).c
181 +- @$(CC) -c -o $@ $(*F).c -O3 $(PLATFORM_FLAGS) $(INCLUDES)
182 ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).c
183 +
184 + clean:
185 + @echo "Cleaning up."
186 +--- a/CommonSource/Utilities/Makefile
187 ++++ b/CommonSource/Utilities/Makefile
188 +@@ -48,11 +48,11 @@
189 +
190 + $(BUILT_OBJECTS): $(SOURCES)
191 + @echo " * compiling" $(*F).cpp
192 +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES)
193 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp
194 +
195 + $(CBUILT_OBJECTS): $(CSOURCES)
196 + @echo " * compiling" $(*F).c
197 +- @$(CC) -c -o $@ $(*F).c -O3 -w -DSQLITE_OMIT_LOAD_EXTENSION $(PLATFORM_FLAGS) $(INCLUDES)
198 ++ $(CC) $(CFLAGS) $(CPPFLAGS) -DSQLITE_OMIT_LOAD_EXTENSION $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).c
199 +
200 + clean:
201 + @echo "Cleaning up."
202 +--- a/fann-2.1.0/Makefile
203 ++++ b/fann-2.1.0/Makefile
204 +@@ -12,7 +12,7 @@
205 +
206 + $(CBUILT_OBJECTS): $(CSOURCES)
207 + @echo " * compiling" $(*F).c
208 +- @$(CC) -c -o $@ $(*F).c -O3 $(PLATFORM_FLAGS) -I$(INCLUDES)
209 ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) -I$(INCLUDES) -c -o $@ $(*F).c
210 +
211 + clean:
212 + @echo "Cleaning up."
213 +--- a/Makefile
214 ++++ b/Makefile
215 +@@ -4,8 +4,8 @@
216 + # ==========================
217 +
218 + # define our object and binary directories
219 +-export OBJ_DIR = ../obj
220 +-export BIN_DIR = ../bin
221 ++export OBJ_DIR = ./obj
222 ++export BIN_DIR = ./bin
223 +
224 + # define our common source directories
225 + export ASSEMBLY_DIR = CommonSource/AssemblyFormats
226 +@@ -16,20 +16,6 @@
227 + export PAIRWISE_DIR = CommonSource/PairwiseAlignment
228 + export UTILITIES_DIR = CommonSource/Utilities
229 +
230 +-# define some default flags
231 +-FLAGS = -Wall -Wno-char-subscripts -ansi -O3
232 +-#FLAGS = -Wall -Wno-char-subscripts -ansi -g -D VERBOSE_DEBUG #gdb debugging
233 +-#FLAGS = -Wall -Wno-char-subscripts -ansi -O3 -D VERBOSE_DEBUG #enables verbose debugging
234 +-CFLAGS =
235 +-CXXFLAGS =
236 +-#CXXFLAGS = -ansi -pedantic -Wextra -Weffc++
237 +-CFLAGS += $(FLAGS)
238 +-CXXFLAGS += $(FLAGS)
239 +-export CFLAGS
240 +-export CXXFLAGS
241 +-#export LDFLAGS = -Wl
242 +-export CXX ?= g++
243 +-
244 + # define our platform
245 + export BLD_PLATFORM ?= linux
246 + include includes/$(BLD_PLATFORM).inc
247 +--- a/MosaikAligner/Makefile
248 ++++ b/MosaikAligner/Makefile
249 +@@ -68,11 +68,11 @@
250 +
251 + $(PROGRAM): $(BUILT_OBJECTS) $(EXT_OBJECTS)
252 + @echo " * linking $(PROGRAM)"
253 +- @$(CXX) $(LDFLAGS) $(CXXFLAGS) $(PLATFORM_FLAGS) -o $(TD)$(BIN_DIR)/$@ $^ $(LIBS)
254 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(PLATFORM_FLAGS) -o $(TD)$(BIN_DIR)/$@ $^ $(LIBS)
255 +
256 + $(BUILT_OBJECTS): $(SOURCES)
257 + @echo " * compiling" $(*F).cpp
258 +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES)
259 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp
260 +
261 + $(EXT_OBJECTS):
262 + @$(MAKE) --no-print-directory -C $(TD)$(DATA_STRUCT_DIR)
263 +--- a/MosaikBuild/Makefile
264 ++++ b/MosaikBuild/Makefile
265 +@@ -26,11 +26,11 @@
266 +
267 + $(PROGRAM): $(BUILT_OBJECTS) $(EXT_OBJECTS)
268 + @echo " * linking $(PROGRAM)"
269 +- @$(CXX) $(LDFLAGS) $(CXXFLAGS) $(PLATFORM_FLAGS) -o $(TD)$(BIN_DIR)/$@ $^ $(LIBS)
270 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(PLATFORM_FLAGS) -o $(TD)$(BIN_DIR)/$@ $^ $(LIBS)
271 +
272 + $(BUILT_OBJECTS): $(SOURCES)
273 + @echo " * compiling" $(*F).cpp
274 +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES)
275 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp
276 +
277 + $(EXT_OBJECTS):
278 + @$(MAKE) --no-print-directory -C $(TD)$(DATA_STRUCT_DIR)
279 +--- a/MosaikJump/Makefile
280 ++++ b/MosaikJump/Makefile
281 +@@ -26,11 +26,11 @@
282 +
283 + $(PROGRAM): $(BUILT_OBJECTS) $(EXT_OBJECTS)
284 + @echo " * linking $(PROGRAM)"
285 +- @$(CXX) $(LDFLAGS) $(CXXFLAGS) $(PLATFORM_FLAGS) -o $(TD)$(BIN_DIR)/$@ $^ $(LIBS)
286 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(PLATFORM_FLAGS) -o $(TD)$(BIN_DIR)/$@ $^ $(LIBS)
287 +
288 + $(BUILT_OBJECTS): $(SOURCES)
289 + @echo " * compiling" $(*F).cpp
290 +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES)
291 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp
292 +
293 + $(EXT_OBJECTS):
294 + @$(MAKE) --no-print-directory -C $(TD)$(MOSAIKREAD_DIR)
295 +--- a/MosaikText/Makefile
296 ++++ b/MosaikText/Makefile
297 +@@ -26,11 +26,11 @@
298 +
299 + $(PROGRAM): $(BUILT_OBJECTS) $(EXT_OBJECTS)
300 + @echo " * linking $(PROGRAM)"
301 +- @$(CXX) $(LDFLAGS) $(CXXFLAGS) $(PLATFORM_FLAGS) -o $(TD)$(BIN_DIR)/$@ $^ $(LIBS)
302 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(PLATFORM_FLAGS) -o $(TD)$(BIN_DIR)/$@ $^ $(LIBS)
303 +
304 + $(BUILT_OBJECTS): $(SOURCES)
305 + @echo " * compiling" $(*F).cpp
306 +- @$(CXX) -c -o $@ $(*F).cpp $(CXXFLAGS) $(PLATFORM_FLAGS) $(INCLUDES)
307 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PLATFORM_FLAGS) $(INCLUDES) -c -o $@ $(*F).cpp
308 +
309 + $(EXT_OBJECTS):
310 + @$(MAKE) --no-print-directory -C $(TD)$(MOSAIKREAD_DIR)
311 +--- a/networkFile/retrainCode/attachXC/Makefile
312 ++++ b/networkFile/retrainCode/attachXC/Makefile
313 +@@ -3,12 +3,11 @@
314 + # (c) 2012 Wan-Ping Lee
315 + # ==========================
316 +
317 +-FLAGS = -Wall -O3
318 +
319 +
320 + all: xc_pe.cpp xc_se.cpp
321 +- @$(CXX) $(FLAGS) xc_pe.cpp -o xc_pe
322 +- @$(CXX) $(FLAGS) xc_se.cpp -o xc_se
323 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) xc_pe.cpp -o xc_pe
324 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) xc_se.cpp -o xc_se
325 +
326 + .PHONY: all
327 +
328 +--- a/networkFile/retrainCode/trainNetwork/Makefile
329 ++++ b/networkFile/retrainCode/trainNetwork/Makefile
330 +@@ -5,8 +5,6 @@
331 +
332 + OBJ_DIR = ./obj
333 +
334 +-FLAGS = -Wall -O3
335 +-CFLAGS = -O3
336 + FANN=../../../fann-2.1.0
337 +
338 + SOURCES = sam_parser_float.cpp parameter_parser_float.cpp mq_train_float.cpp
339 +@@ -15,12 +13,12 @@
340 + all: $(FANN)/floatfann.c $(SOURCES)
341 + @test -d $(OBJ_DIR) || mkdir $(OBJ_DIR)
342 + @echo " * compiling ......"
343 +- @$(CC) $(CFLAGS) -c -o $(OBJ_DIR)/floatfann.o $(FANN)/floatfann.c -I$(FANN)/include
344 +- @$(CXX) -c $(FLAGS) -o $(OBJ_DIR)/sam_parser_float.o sam_parser_float.cpp
345 +- @$(CXX) -c $(FLAGS) -o $(OBJ_DIR)/parameter_parser_float.o parameter_parser_float.cpp
346 +- @$(CXX) -c $(FLAGS) -o $(OBJ_DIR)/mq_train_float.o mq_train_float.cpp -I$(FANN)/include
347 ++ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $(OBJ_DIR)/floatfann.o $(FANN)/floatfann.c -I$(FANN)/include
348 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $(OBJ_DIR)/sam_parser_float.o sam_parser_float.cpp
349 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $(OBJ_DIR)/parameter_parser_float.o parameter_parser_float.cpp
350 ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -o $(OBJ_DIR)/mq_train_float.o mq_train_float.cpp -I$(FANN)/include
351 + @echo " * linking ......"
352 +- @$(CXX) $(FLAGS) $(OBJ_DIR)/*.o -o $(PROGRAM)
353 ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJ_DIR)/*.o -o $(PROGRAM)
354 +
355 + .PHONY: all
356 +
357
358 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
359 new file mode 100644
360 index 00000000..8573573
361 --- /dev/null
362 +++ b/sci-biology/mosaik/files/mosaik-2.2.30-remove-platform-code.patch
363 @@ -0,0 +1,10 @@
364 +- Remove macro for enabling large file support, this is better handled at an
365 + ebuild level, where the LFS flags can be handled for multiple architectures
366 +- Remove static flag, which is contrary to Gentoo policy
367 +
368 +--- a/includes/linux.inc
369 ++++ b/includes/linux.inc
370 +@@ -1,2 +1,2 @@
371 + # define our processor specific flags
372 +-export PLATFORM_FLAGS = -D_FILE_OFFSET_BITS=64 -static
373 ++export PLATFORM_FLAGS =
374
375 diff --git a/sci-biology/mosaik/mosaik-2.2.30.ebuild b/sci-biology/mosaik/mosaik-2.2.30.ebuild
376 new file mode 100644
377 index 00000000..ab1d891
378 --- /dev/null
379 +++ b/sci-biology/mosaik/mosaik-2.2.30.ebuild
380 @@ -0,0 +1,53 @@
381 +# Copyright 1999-2016 Gentoo Foundation
382 +# Distributed under the terms of the GNU General Public License v2
383 +# $Id$
384 +
385 +EAPI=6
386 +
387 +inherit flag-o-matic toolchain-funcs vcs-snapshot
388 +
389 +DESCRIPTION="A reference-guided aligner for next-generation sequencing technologies"
390 +HOMEPAGE="https://github.com/wanpinglee/MOSAIK"
391 +SRC_URI="https://github.com/wanpinglee/MOSAIK/archive/5c25216d3522d6a33e53875cd76a6d65001e4e67.tar.gz -> ${P}.tar.gz"
392 +
393 +LICENSE="GPL-2"
394 +SLOT="0"
395 +IUSE=""
396 +KEYWORDS="~amd64 ~x86"
397 +
398 +DEPEND=""
399 +RDEPEND=""
400 +
401 +S="${WORKDIR}/${P}/src"
402 +
403 +PATCHES=(
404 + "${FILESDIR}/${P}-remove-platform-code.patch"
405 + "${FILESDIR}/${P}-fix-build-system.patch"
406 + "${FILESDIR}/${P}-Wformat-security.patch"
407 +)
408 +
409 +src_configure() {
410 + # readd default warning flags from build system
411 + append-flags -Wall -Wno-char-subscripts
412 + append-lfs-flags
413 + export BLD_PLATFORM=linux
414 +}
415 +
416 +src_compile() {
417 + emake \
418 + CC=$(tc-getCC) \
419 + CXX=$(tc-getCXX) \
420 + CFLAGS="${CFLAGS}" \
421 + CXXFLAGS="${CXXFLAGS}" \
422 + CPPFLAGS="${CPPFLAGS}" \
423 + LDFLAGS="${LDFLAGS}"
424 +}
425 +
426 +src_install() {
427 + dobin bin/Mosaik*
428 +
429 + dodoc ../README
430 +
431 + insinto /usr/share/${PN}/examples
432 + doins -r ../demo/.
433 +}