1 |
commit: a93d11e69bfb168131822a534931dae912b5fbe2 |
2 |
Author: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz> |
3 |
AuthorDate: Wed Feb 20 19:43:32 2019 +0000 |
4 |
Commit: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz> |
5 |
CommitDate: Wed Feb 20 19:43:32 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=a93d11e6 |
7 |
|
8 |
sci-biology/canu: respect CXXFLAGS |
9 |
|
10 |
Package-Manager: Portage-2.3.61, Repoman-2.3.12 |
11 |
Signed-off-by: Martin Mokrejs <mmokrejs <AT> fold.natur.cuni.cz> |
12 |
|
13 |
sci-biology/canu/canu-9999.ebuild | 35 ++++++- |
14 |
.../canu/files/canu-1.8_respect_CXXFLAGS.patch | 112 +++++++++++++++++++++ |
15 |
2 files changed, 143 insertions(+), 4 deletions(-) |
16 |
|
17 |
diff --git a/sci-biology/canu/canu-9999.ebuild b/sci-biology/canu/canu-9999.ebuild |
18 |
index bef85d20f..2233e284a 100644 |
19 |
--- a/sci-biology/canu/canu-9999.ebuild |
20 |
+++ b/sci-biology/canu/canu-9999.ebuild |
21 |
@@ -1,9 +1,11 @@ |
22 |
# Copyright 1999-2019 Gentoo Authors |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
|
25 |
-EAPI=6 |
26 |
+EAPI=5 |
27 |
|
28 |
-inherit java-pkg-2 git-r3 |
29 |
+PYTHON_COMPAT=( python2_7 ) |
30 |
+PERL_EXPORT_PHASE_FUNCTIONS=no |
31 |
+inherit eutils java-pkg-2 perl-module multilib git-r3 |
32 |
|
33 |
DESCRIPTION="Fork of a wgs-assembler for Oxfordnanopore and PacBio sequences" |
34 |
HOMEPAGE="http://canu.readthedocs.io/en/latest" |
35 |
@@ -14,6 +16,8 @@ SLOT="0" |
36 |
KEYWORDS="" |
37 |
IUSE="" |
38 |
|
39 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
40 |
+ |
41 |
RDEPEND=" |
42 |
>=virtual/jre-1.8:* |
43 |
dev-lang/perl |
44 |
@@ -24,8 +28,21 @@ RDEPEND=" |
45 |
DEPEND="${RDEPEND} |
46 |
>=virtual/jdk-1.8:* |
47 |
dev-java/ant-core |
48 |
+ !sci-biology/wgs-assembler |
49 |
" |
50 |
|
51 |
+# Detected file collision(s): |
52 |
+# * sci-biology/wgs-assembler-8.3_rc2:0::science |
53 |
+# * /usr/bin/bogart |
54 |
+# * /usr/bin/bogus |
55 |
+# * /usr/bin/fastqAnalyze |
56 |
+# * /usr/bin/fastqSample |
57 |
+# * /usr/bin/fastqSimulate |
58 |
+# * /usr/bin/fastqSimulate-sort |
59 |
+# * /usr/bin/meryl |
60 |
+# * /usr/bin/overlapInCore |
61 |
+# * /usr/bin/utgcns |
62 |
+ |
63 |
# Perl 5.12.0, or File::Path 2.08 |
64 |
# Java SE 8 |
65 |
# https://github.com/marbl/MHAP uses Apache maven |
66 |
@@ -33,6 +50,10 @@ S="${WORKDIR}"/"${P}" |
67 |
|
68 |
# contains bundled mhap-2.1.3.jar, kmer, pbutgcns, FALCON |
69 |
|
70 |
+src_prepare(){ |
71 |
+ epatch "${FILESDIR}"/canu-1.8_respect_CXXFLAGS.patch |
72 |
+} |
73 |
+ |
74 |
src_compile(){ |
75 |
cd src || die |
76 |
emake |
77 |
@@ -42,9 +63,15 @@ src_install(){ |
78 |
# installs |
79 |
# /usr/bin |
80 |
# /usr/lib/libcanu.a |
81 |
- # /usr/lib/site_perl/canu |
82 |
+ # /usr/lib64/perl5/vendor_perl/5.28.0/lib/site_perl/canu |
83 |
# /usr/share/java/classes/mhap-2.1.3.jar |
84 |
rm -rf Linux-amd64/obj |
85 |
insinto /usr |
86 |
- doins -r Linux-amd64/{bin,lib,share} |
87 |
+ doins -r Linux-amd64/{bin,share} |
88 |
+ insinto /usr/$(get_libdir) |
89 |
+ dolib Linux-amd64/lib/libcanu.a |
90 |
+ rm Linux-amd64/lib/libcanu.a || die |
91 |
+ perl_set_version |
92 |
+ insinto ${VENDOR_LIB} |
93 |
+ doins -r Linux-amd64/lib |
94 |
} |
95 |
|
96 |
diff --git a/sci-biology/canu/files/canu-1.8_respect_CXXFLAGS.patch b/sci-biology/canu/files/canu-1.8_respect_CXXFLAGS.patch |
97 |
new file mode 100644 |
98 |
index 000000000..ac46e0ddd |
99 |
--- /dev/null |
100 |
+++ b/sci-biology/canu/files/canu-1.8_respect_CXXFLAGS.patch |
101 |
@@ -0,0 +1,112 @@ |
102 |
+diff --git a/src/Makefile b/src/Makefile |
103 |
+index e2770f5a0..3cdb81a4c 100644 |
104 |
+--- a/src/Makefile |
105 |
++++ b/src/Makefile |
106 |
+@@ -388,6 +388,22 @@ endif |
107 |
+ # and remove -fomit-frame-pointer from CXXFLAGS. It added a bunch of complication and wasn't |
108 |
+ # really used. |
109 |
+ |
110 |
++ifeq ($(BUILDOPTIMIZED), 1) |
111 |
++else |
112 |
++ CXXFLAGS ?= -g3 |
113 |
++endif |
114 |
++ |
115 |
++ifeq ($(BUILDDEBUG), 1) |
116 |
++else |
117 |
++ ifeq (${OSTYPE}, FreeBSD) |
118 |
++ ifeq (${MACHINETYPE}, amd64) |
119 |
++ CXXFLAGS ?= -O3 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer |
120 |
++ else |
121 |
++ CXXFLAGS ?= -O4 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer |
122 |
++ endif |
123 |
++ endif |
124 |
++endif |
125 |
++ |
126 |
+ ifeq (${OSTYPE}, Linux) |
127 |
+ CC ?= gcc |
128 |
+ CXX ?= g++ |
129 |
+@@ -398,16 +414,6 @@ ifeq (${OSTYPE}, Linux) |
130 |
+ CXXFLAGS += -Wall -Wextra -Wno-write-strings -Wno-unused -Wno-char-subscripts -Wno-sign-compare -Wformat |
131 |
+ |
132 |
+ BUILDSTACKTRACE ?= 1 |
133 |
+- |
134 |
+- ifeq ($(BUILDOPTIMIZED), 1) |
135 |
+- else |
136 |
+- CXXFLAGS += -g3 |
137 |
+- endif |
138 |
+- |
139 |
+- ifeq ($(BUILDDEBUG), 1) |
140 |
+- else |
141 |
+- CXXFLAGS += -O4 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer |
142 |
+- endif |
143 |
+ endif |
144 |
+ |
145 |
+ |
146 |
+@@ -479,16 +485,6 @@ ifeq (${OSTYPE}, Darwin) |
147 |
+ |
148 |
+ CXXFLAGS += -pthread -fPIC -m64 -Wall -Wextra -Wno-write-strings -Wno-unused -Wno-char-subscripts -Wno-sign-compare -Wno-format-truncation -Wformat |
149 |
+ LDFLAGS += -pthread -lm |
150 |
+- |
151 |
+- ifeq ($(BUILDOPTIMIZED), 1) |
152 |
+- else |
153 |
+- CXXFLAGS += -g3 |
154 |
+- endif |
155 |
+- |
156 |
+- ifeq ($(BUILDDEBUG), 1) |
157 |
+- else |
158 |
+- CXXFLAGS += -O4 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer |
159 |
+- endif |
160 |
+ endif |
161 |
+ |
162 |
+ |
163 |
+@@ -519,16 +515,6 @@ ifeq (${MACHINETYPE}, amd64) |
164 |
+ |
165 |
+ # callgrind |
166 |
+ #CXXFLAGS += -g3 -Wa,--gstabs -save-temps |
167 |
+- |
168 |
+- ifeq ($(BUILDOPTIMIZED), 1) |
169 |
+- else |
170 |
+- CXXFLAGS += -g3 |
171 |
+- endif |
172 |
+- |
173 |
+- ifeq ($(BUILDDEBUG), 1) |
174 |
+- else |
175 |
+- CXXFLAGS += -O3 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer |
176 |
+- endif |
177 |
+ endif |
178 |
+ endif |
179 |
+ |
180 |
+@@ -544,16 +530,6 @@ ifeq (${MACHINETYPE}, arm) |
181 |
+ CXXFLAGS += -Wall -Wextra -Wno-write-strings -Wno-unused -Wno-char-subscripts -Wno-sign-compare -Wformat -Wno-parentheses |
182 |
+ CXXFLAGS += -funroll-loops -fomit-frame-pointer |
183 |
+ LDFLAGS += |
184 |
+- |
185 |
+- ifeq ($(BUILDOPTIMIZED), 1) |
186 |
+- else |
187 |
+- CXXFLAGS += -g3 |
188 |
+- endif |
189 |
+- |
190 |
+- ifeq ($(BUILDDEBUG), 1) |
191 |
+- else |
192 |
+- CXXFLAGS += -O4 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer |
193 |
+- endif |
194 |
+ endif |
195 |
+ endif |
196 |
+ |
197 |
+@@ -566,16 +542,6 @@ ifneq (,$(findstring CYGWIN, ${OSTYPE})) |
198 |
+ LDFLAGS := -fopenmp -pthread -lm |
199 |
+ |
200 |
+ CXXFLAGS += -Wall -Wextra -Wno-write-strings -Wno-unused -Wno-char-subscripts -Wno-sign-compare -Wformat |
201 |
+- |
202 |
+- ifeq ($(BUILDOPTIMIZED), 1) |
203 |
+- else |
204 |
+- CXXFLAGS += -g3 |
205 |
+- endif |
206 |
+- |
207 |
+- ifeq ($(BUILDDEBUG), 1) |
208 |
+- else |
209 |
+- CXXFLAGS += -O4 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer |
210 |
+- endif |
211 |
+ endif |
212 |
+ |
213 |
+ |