aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Mokrejs <mmokrejs@fold.natur.cuni.cz>2019-02-20 20:43:32 +0100
committerMartin Mokrejs <mmokrejs@fold.natur.cuni.cz>2019-02-20 20:43:32 +0100
commita93d11e69bfb168131822a534931dae912b5fbe2 (patch)
treee92b5e2ab98f5b2fddbf14aa5f364dc2a045cc10
parentsci-biology/canu: add live package of a new tool (diff)
downloadsci-a93d11e69bfb168131822a534931dae912b5fbe2.tar.gz
sci-a93d11e69bfb168131822a534931dae912b5fbe2.tar.bz2
sci-a93d11e69bfb168131822a534931dae912b5fbe2.zip
sci-biology/canu: respect CXXFLAGS
Package-Manager: Portage-2.3.61, Repoman-2.3.12 Signed-off-by: Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
-rw-r--r--sci-biology/canu/canu-9999.ebuild35
-rw-r--r--sci-biology/canu/files/canu-1.8_respect_CXXFLAGS.patch112
2 files changed, 143 insertions, 4 deletions
diff --git a/sci-biology/canu/canu-9999.ebuild b/sci-biology/canu/canu-9999.ebuild
index bef85d20f..2233e284a 100644
--- a/sci-biology/canu/canu-9999.ebuild
+++ b/sci-biology/canu/canu-9999.ebuild
@@ -1,9 +1,11 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=5
-inherit java-pkg-2 git-r3
+PYTHON_COMPAT=( python2_7 )
+PERL_EXPORT_PHASE_FUNCTIONS=no
+inherit eutils java-pkg-2 perl-module multilib git-r3
DESCRIPTION="Fork of a wgs-assembler for Oxfordnanopore and PacBio sequences"
HOMEPAGE="http://canu.readthedocs.io/en/latest"
@@ -14,6 +16,8 @@ SLOT="0"
KEYWORDS=""
IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
RDEPEND="
>=virtual/jre-1.8:*
dev-lang/perl
@@ -24,8 +28,21 @@ RDEPEND="
DEPEND="${RDEPEND}
>=virtual/jdk-1.8:*
dev-java/ant-core
+ !sci-biology/wgs-assembler
"
+# Detected file collision(s):
+# * sci-biology/wgs-assembler-8.3_rc2:0::science
+# * /usr/bin/bogart
+# * /usr/bin/bogus
+# * /usr/bin/fastqAnalyze
+# * /usr/bin/fastqSample
+# * /usr/bin/fastqSimulate
+# * /usr/bin/fastqSimulate-sort
+# * /usr/bin/meryl
+# * /usr/bin/overlapInCore
+# * /usr/bin/utgcns
+
# Perl 5.12.0, or File::Path 2.08
# Java SE 8
# https://github.com/marbl/MHAP uses Apache maven
@@ -33,6 +50,10 @@ S="${WORKDIR}"/"${P}"
# contains bundled mhap-2.1.3.jar, kmer, pbutgcns, FALCON
+src_prepare(){
+ epatch "${FILESDIR}"/canu-1.8_respect_CXXFLAGS.patch
+}
+
src_compile(){
cd src || die
emake
@@ -42,9 +63,15 @@ src_install(){
# installs
# /usr/bin
# /usr/lib/libcanu.a
- # /usr/lib/site_perl/canu
+ # /usr/lib64/perl5/vendor_perl/5.28.0/lib/site_perl/canu
# /usr/share/java/classes/mhap-2.1.3.jar
rm -rf Linux-amd64/obj
insinto /usr
- doins -r Linux-amd64/{bin,lib,share}
+ doins -r Linux-amd64/{bin,share}
+ insinto /usr/$(get_libdir)
+ dolib Linux-amd64/lib/libcanu.a
+ rm Linux-amd64/lib/libcanu.a || die
+ perl_set_version
+ insinto ${VENDOR_LIB}
+ doins -r Linux-amd64/lib
}
diff --git a/sci-biology/canu/files/canu-1.8_respect_CXXFLAGS.patch b/sci-biology/canu/files/canu-1.8_respect_CXXFLAGS.patch
new file mode 100644
index 000000000..ac46e0ddd
--- /dev/null
+++ b/sci-biology/canu/files/canu-1.8_respect_CXXFLAGS.patch
@@ -0,0 +1,112 @@
+diff --git a/src/Makefile b/src/Makefile
+index e2770f5a0..3cdb81a4c 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -388,6 +388,22 @@ endif
+ # and remove -fomit-frame-pointer from CXXFLAGS. It added a bunch of complication and wasn't
+ # really used.
+
++ifeq ($(BUILDOPTIMIZED), 1)
++else
++ CXXFLAGS ?= -g3
++endif
++
++ifeq ($(BUILDDEBUG), 1)
++else
++ ifeq (${OSTYPE}, FreeBSD)
++ ifeq (${MACHINETYPE}, amd64)
++ CXXFLAGS ?= -O3 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer
++ else
++ CXXFLAGS ?= -O4 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer
++ endif
++ endif
++endif
++
+ ifeq (${OSTYPE}, Linux)
+ CC ?= gcc
+ CXX ?= g++
+@@ -398,16 +414,6 @@ ifeq (${OSTYPE}, Linux)
+ CXXFLAGS += -Wall -Wextra -Wno-write-strings -Wno-unused -Wno-char-subscripts -Wno-sign-compare -Wformat
+
+ BUILDSTACKTRACE ?= 1
+-
+- ifeq ($(BUILDOPTIMIZED), 1)
+- else
+- CXXFLAGS += -g3
+- endif
+-
+- ifeq ($(BUILDDEBUG), 1)
+- else
+- CXXFLAGS += -O4 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer
+- endif
+ endif
+
+
+@@ -479,16 +485,6 @@ ifeq (${OSTYPE}, Darwin)
+
+ CXXFLAGS += -pthread -fPIC -m64 -Wall -Wextra -Wno-write-strings -Wno-unused -Wno-char-subscripts -Wno-sign-compare -Wno-format-truncation -Wformat
+ LDFLAGS += -pthread -lm
+-
+- ifeq ($(BUILDOPTIMIZED), 1)
+- else
+- CXXFLAGS += -g3
+- endif
+-
+- ifeq ($(BUILDDEBUG), 1)
+- else
+- CXXFLAGS += -O4 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer
+- endif
+ endif
+
+
+@@ -519,16 +515,6 @@ ifeq (${MACHINETYPE}, amd64)
+
+ # callgrind
+ #CXXFLAGS += -g3 -Wa,--gstabs -save-temps
+-
+- ifeq ($(BUILDOPTIMIZED), 1)
+- else
+- CXXFLAGS += -g3
+- endif
+-
+- ifeq ($(BUILDDEBUG), 1)
+- else
+- CXXFLAGS += -O3 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer
+- endif
+ endif
+ endif
+
+@@ -544,16 +530,6 @@ ifeq (${MACHINETYPE}, arm)
+ CXXFLAGS += -Wall -Wextra -Wno-write-strings -Wno-unused -Wno-char-subscripts -Wno-sign-compare -Wformat -Wno-parentheses
+ CXXFLAGS += -funroll-loops -fomit-frame-pointer
+ LDFLAGS +=
+-
+- ifeq ($(BUILDOPTIMIZED), 1)
+- else
+- CXXFLAGS += -g3
+- endif
+-
+- ifeq ($(BUILDDEBUG), 1)
+- else
+- CXXFLAGS += -O4 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer
+- endif
+ endif
+ endif
+
+@@ -566,16 +542,6 @@ ifneq (,$(findstring CYGWIN, ${OSTYPE}))
+ LDFLAGS := -fopenmp -pthread -lm
+
+ CXXFLAGS += -Wall -Wextra -Wno-write-strings -Wno-unused -Wno-char-subscripts -Wno-sign-compare -Wformat
+-
+- ifeq ($(BUILDOPTIMIZED), 1)
+- else
+- CXXFLAGS += -g3
+- endif
+-
+- ifeq ($(BUILDDEBUG), 1)
+- else
+- CXXFLAGS += -O4 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer
+- endif
+ endif
+
+