1 |
commit: 456c869b7e5ae4d6efd1c2293b1181e59a5e6a67 |
2 |
Author: Martin Mokrejš <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz> |
3 |
AuthorDate: Thu Feb 16 10:56:54 2017 +0000 |
4 |
Commit: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz> |
5 |
CommitDate: Thu Feb 16 10:56:54 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=456c869b |
7 |
|
8 |
sci-biology/freebayes: respect CC/CXX/CFLAGS/CXXFLAGS |
9 |
|
10 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
11 |
|
12 |
sci-biology/freebayes/freebayes-9999.ebuild | 21 +++++++++++++++++++-- |
13 |
1 file changed, 19 insertions(+), 2 deletions(-) |
14 |
|
15 |
diff --git a/sci-biology/freebayes/freebayes-9999.ebuild b/sci-biology/freebayes/freebayes-9999.ebuild |
16 |
index 1b1eb89ed..a5e640591 100644 |
17 |
--- a/sci-biology/freebayes/freebayes-9999.ebuild |
18 |
+++ b/sci-biology/freebayes/freebayes-9999.ebuild |
19 |
@@ -4,7 +4,7 @@ |
20 |
|
21 |
EAPI=6 |
22 |
|
23 |
-inherit eutils git-r3 |
24 |
+inherit eutils git-r3 toolchain-funcs |
25 |
|
26 |
DESCRIPTION="Bayesian gen. variant detector to find short polymorphisms" |
27 |
HOMEPAGE="https://github.com/ekg/freebayes" |
28 |
@@ -15,7 +15,7 @@ SLOT="0" |
29 |
KEYWORDS="" |
30 |
IUSE="" |
31 |
|
32 |
-DEPEND="" |
33 |
+DEPEND="dev-util/cmake" |
34 |
RDEPEND="${DEPEND} |
35 |
sci-libs/htslib |
36 |
sci-biology/bamtools |
37 |
@@ -84,6 +84,23 @@ RDEPEND="${DEPEND} |
38 |
|
39 |
# g++ -O3 -D_FILE_OFFSET_BITS=64 -g -I../ttmath -I../bamtools/src/ -I../vcflib/src/ -I../vcflib/tabixpp/ -I../vcflib/smithwaterman/ -I../vcflib/multichoose/ -I../vcflib/filevercmp/ -I../vcflib/tabixpp/htslib -I../SeqLib -I../SeqLib/htslib -c freebayes.cpp |
40 |
|
41 |
+src_prepare(){ |
42 |
+ find . -name Makefile | while read f; do \ |
43 |
+ sed -e "s/-O3 -D_FILE_OFFSET_BITS=64/${CFLAGS}/" -i $f || die |
44 |
+ sed -e "s/^CFLAGS:= -O3/CFLAGS ?= ${CFLAGS}/" -i $f || die |
45 |
+ sed -e "s/^CXX = g++/CXX = $(tc-getCXX)/;s/^CXX=g++/CXX = $(tc-getCXX)/" -i $f || die |
46 |
+ sed -e "s/g++ /$(tc-getCXX) /" -i $f || die |
47 |
+ sed -e "s/-O3/${CXXFLAGS}/" -i $f || die |
48 |
+ sed -e "s/^CC[ ]*=[ ]gcc/CC = $(tc-getCC)/" -i $f || die |
49 |
+ sed -e "s/-g -Wall -O2/${CFLAGS}/;s/-g -Wall -Wno-unused-function -O2/${CFLAGS}/" -i $f || die |
50 |
+ sed -e "s/-O3 /${CFLAGS}/;s/ -O3/${CFLAGS}/" -i $f || die |
51 |
+ done |
52 |
+ sed -e "s/^C=gcc/C = $(tc-getCC)/" -i Makefile || die |
53 |
+ sed -e "s/gcc/$(tc-getCC)/" -i SeqLib/bwa/Makefile SeqLib/fermi-lite/Makefile || die |
54 |
+ sed -e "s/g++/$(tc-getCXX)/" -i SeqLib/src/Makefile.am || die |
55 |
+ default |
56 |
+} |
57 |
+ |
58 |
src_compile(){ |
59 |
emake -j1 # vcflib/smithwaterman/ sometimes does not compile |
60 |
} |