diff options
author | Martin Mokrejs <mmokrejs@fold.natur.cuni.cz> | 2019-02-18 14:44:27 +0100 |
---|---|---|
committer | Martin Mokrejs <mmokrejs@fold.natur.cuni.cz> | 2019-02-18 14:44:27 +0100 |
commit | 3c65e999c45f956a48f434581ed74f27732c9c2a (patch) | |
tree | 4edcd3823dce3cadb9757856ca87da40ee25eed2 | |
parent | sci-biology/samri_bidsdata: deprecated version (diff) | |
download | sci-3c65e999c45f956a48f434581ed74f27732c9c2a.tar.gz sci-3c65e999c45f956a48f434581ed74f27732c9c2a.tar.bz2 sci-3c65e999c45f956a48f434581ed74f27732c9c2a.zip |
sci-biology/bowtie: add some compile patches from Debian
Seems both bowtie1 and bowtie2 are bound too much to SeqAn-1.1
and need more patches for SeqAn-1.4. Per reports on github
it seems one should be able to compile bowtie-1.2.2 using
-std=c++03 (but not me).
Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Martin Mokrejs <mmokrejs@fold.natur.cuni.cz>
-rw-r--r-- | sci-biology/bowtie/Manifest | 2 | ||||
-rw-r--r-- | sci-biology/bowtie/bowtie-1.2.2.ebuild | 77 | ||||
-rw-r--r-- | sci-biology/bowtie/bowtie-2.3.4.3.ebuild | 62 | ||||
-rw-r--r-- | sci-biology/bowtie/files/bowtie-1.2.2-_ContextLss-1.1-1.4.patch | 17 | ||||
-rw-r--r-- | sci-biology/bowtie/files/bowtie-1.2.2-fix-Intel-compilation.patch | 32 | ||||
-rw-r--r-- | sci-biology/bowtie/files/bowtie-1.2.2-unbundle-seqan.patch | 14 | ||||
-rw-r--r-- | sci-biology/bowtie/files/bowtie-1.2.2-void2int.patch | 16 | ||||
-rw-r--r-- | sci-biology/bowtie/metadata.xml | 16 |
8 files changed, 236 insertions, 0 deletions
diff --git a/sci-biology/bowtie/Manifest b/sci-biology/bowtie/Manifest new file mode 100644 index 000000000..58e5c5299 --- /dev/null +++ b/sci-biology/bowtie/Manifest @@ -0,0 +1,2 @@ +DIST bowtie-1.2.2-src.zip 7758948 BLAKE2B 76f16f1383af9caf18776616b28556124b02eba39236de745cff902feff85312c98972009a503229658ba4b6b13d6b5470373792de8703d1ef7ffc25ec11f5a7 SHA512 60e44515088c9a67b46b66bcab0c96e25134f5ef6b001f87b1992c6185d6a9e0addb4ddddc65036e1614d697ba9546bca4990bdc8b3a217b0506fafec69c01ce +DIST bowtie2-2.3.4.3-source.zip 17156180 BLAKE2B 4004aa417f318f5540b129eb97d7f14d31b087c77bb767d547b195d3b966ec272fe7df5888d60b5501330d2ac011f05bdc9b062fa34d5b96b2b29ea0b6167a5c SHA512 9e048c1a86a479c5fe728a492129372d2366d6c50530e05db3faad5ac055596d9f95ac0a9f50099ab3dd945893a587c02e8aaa9b62cc3ead75f6691c52413a2f diff --git a/sci-biology/bowtie/bowtie-1.2.2.ebuild b/sci-biology/bowtie/bowtie-1.2.2.ebuild new file mode 100644 index 000000000..cae085bff --- /dev/null +++ b/sci-biology/bowtie/bowtie-1.2.2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Popular short read aligner for Next-generation sequencing data" +HOMEPAGE="http://bowtie-bio.sourceforge.net/" +SRC_URI="mirror://sourceforge/bowtie-bio/${P}-src.zip" + +LICENSE="Artistic" +SLOT="1" +KEYWORDS="" + +IUSE="examples +tbb" + +RDEPEND="tbb? ( dev-cpp/tbb )" +DEPEND="${RDEPEND} + sci-biology/seqan:1.4 + app-arch/unzip" + +DOCS=( AUTHORS NEWS TUTORIAL doc/README ) +HTML_DOCS=( doc/{manual.html,style.css} ) + +PATCHES=( + "${FILESDIR}/${P}-_ContextLss-1.1-1.4.patch" + "${FILESDIR}/${P}-fix-Intel-compilation.patch" + "${FILESDIR}/${P}-unbundle-seqan.patch" +) +# other patches to be still considered +# "${FILESDIR}/${P}-fix-setBegin-call.patch" +# "${FILESDIR}/${P}-seqan-popcount.patch" +# "${FILESDIR}/${P}-seqan-rename-ChunkPool.patch" +# "${FILESDIR}/${P}-seqan-rename-fill-to-resize.patch" +# "${FILESDIR}/${P}-spelling.patch" +# "${FILESDIR}/${P}-tbb-tinythread-missing.patch" +#) + +src_prepare() { + default + + # remove bundled libraries, use system seqan 1.4 + rm -rf SeqAn-1.1/ third_party/ || die + + # innocuous non-security flags, prevent log pollution + append-cxxflags \ + -Wno-unused-local-typedefs \ + -Wno-unused-but-set-variable \ + -Wno-unused-variable +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + CPP="$(tc-getCXX)" \ + CFLAGS="" \ + CXXFLAGS="" \ + EXTRA_FLAGS="${LDFLAGS}" \ + RELEASE_FLAGS="${CXXFLAGS}" \ + WITH_TBB="$(usex tbb 1 0)" +} + +src_install() { + dobin ${PN} ${PN}-* + + exeinto /usr/libexec/${PN} + doexe scripts/* + + newman MANUAL ${PN}.1 + einstalldocs + + if use examples; then + insinto /usr/share/${PN} + doins -r genomes indexes + fi +} diff --git a/sci-biology/bowtie/bowtie-2.3.4.3.ebuild b/sci-biology/bowtie/bowtie-2.3.4.3.ebuild new file mode 100644 index 000000000..eea3059cf --- /dev/null +++ b/sci-biology/bowtie/bowtie-2.3.4.3.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs + +DESCRIPTION="Popular short read aligner for Next-generation sequencing data" +HOMEPAGE="http://bowtie-bio.sourceforge.net/bowtie2/" +SRC_URI="mirror://sourceforge/project/${PN}-bio/${PN}2/${PV}/${PN}2-${PV}-source.zip" + +LICENSE="GPL-3" +SLOT="2" +KEYWORDS="" + +IUSE="examples cpu_flags_x86_sse2 +tbb" + +RDEPEND="dev-lang/perl + tbb? ( dev-cpp/tbb )" +DEPEND="${RDEPEND} + app-arch/unzip + sys-libs/readline" + +S="${WORKDIR}/${PN}2-${PV}" + +DOCS=( AUTHORS NEWS TUTORIAL ) +HTML_DOCS=( doc/{manual.html,style.css} ) +#PATCHES=( "${FILESDIR}/${P}-fix-c++14.patch" ) # needs 2.3.4.3 update + +pkg_pretend() { + if ! use cpu_flags_x86_sse2 ; then + eerror "This package requires a CPU supporting the SSE2 instruction set." + die "SSE2 support missing" + fi +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + CPP="$(tc-getCXX)" \ + CXX="$(tc-getCXX)" \ + CFLAGS="" \ + CXXFLAGS="" \ + EXTRA_FLAGS="${LDFLAGS}" \ + RELEASE_FLAGS="${CXXFLAGS} -msse2" \ + WITH_TBB="$(usex tbb 1 0)" +} + +src_install() { + dobin ${PN}2 ${PN}2-* + + exeinto /usr/libexec/${PN}2 + doexe scripts/* + + newman MANUAL ${PN}2.1 + einstalldocs + + if use examples; then + insinto /usr/share/${PN}2 + doins -r example + fi +} diff --git a/sci-biology/bowtie/files/bowtie-1.2.2-_ContextLss-1.1-1.4.patch b/sci-biology/bowtie/files/bowtie-1.2.2-_ContextLss-1.1-1.4.patch new file mode 100644 index 000000000..4bcd61ba3 --- /dev/null +++ b/sci-biology/bowtie/files/bowtie-1.2.2-_ContextLss-1.1-1.4.patch @@ -0,0 +1,17 @@ +Description: Change class name of _Context_LSS + New version 1.4 of SeQan uses a different name of the class. +Forwarded: no +Author: Gert Wollny <gw.fossdev@gmail.com> +Last-Update: 2014-100-06 + +--- bowtie-1.2.2/diff_sample.h 2017-11-03 01:25:56.000000000 +0100 ++++ bowtie-1.2.2/diff_sample.h 2019-02-18 12:50:37.894674282 +0100 +@@ -979,7 +979,7 @@ + { + Timer timer(cout, " Invoking Larsson-Sadakane on ranks time: ", this->verbose()); + VMSG_NL(" Invoking Larsson-Sadakane on ranks"); +- _Context_LSS<TIndexOff> c; ++ ContextLss_<TIndexOff> c; + c.suffixsort( + (TIndexOff*)begin(_isaPrime, Standard()), + (TIndexOff*)begin(sPrime, Standard()), diff --git a/sci-biology/bowtie/files/bowtie-1.2.2-fix-Intel-compilation.patch b/sci-biology/bowtie/files/bowtie-1.2.2-fix-Intel-compilation.patch new file mode 100644 index 000000000..75942efb5 --- /dev/null +++ b/sci-biology/bowtie/files/bowtie-1.2.2-fix-Intel-compilation.patch @@ -0,0 +1,32 @@ +fix compilation errors with Intel compilers: +error: no operator "=" matches these operands +author: Ward Poelmans +--- bowtie-1.2.2/hit.h 2018-01-24 12:57:47.135575442 +0100 ++++ bowtie-1.2.2/hit.h 2018-01-24 12:57:58.615869774 +0100 +@@ -640,10 +640,26 @@ + s.moveTo(btString); + } + ++ batch(const batch &other) ++ { ++ batchId = other.batchId; ++ isWritten = other.isWritten; ++ btString = other.btString; ++ } ++ + bool operator<(const batch& other) const { + return batchId < other.batchId; + } + ++ batch& operator=(batch&& other) { ++ if (&other != this) { ++ batchId = other.batchId; ++ isWritten = other.isWritten; ++ other.btString.moveTo(btString); ++ } ++ return *this; ++ } ++ + batch& operator=(batch& other) { + if (&other != this) { + batchId = other.batchId; diff --git a/sci-biology/bowtie/files/bowtie-1.2.2-unbundle-seqan.patch b/sci-biology/bowtie/files/bowtie-1.2.2-unbundle-seqan.patch new file mode 100644 index 000000000..b1a5f98f5 --- /dev/null +++ b/sci-biology/bowtie/files/bowtie-1.2.2-unbundle-seqan.patch @@ -0,0 +1,14 @@ +--- bowtie-1.2.2/Makefile 2019-02-18 13:26:29.490835084 +0100 ++++ bowtie-1.2.2/Makefile 2019-02-18 13:28:36.864742545 +0100 +@@ -5,10 +5,7 @@ + prefix = /usr/local + bindir = $(prefix)/bin + +-SEQAN_DIR = ./SeqAn-1.1 +-# treat SeqAn as a sysdir to suppress warnings +-SEQAN_INC = -isystem $(SEQAN_DIR) +-INC = $(if $(RELEASE_BUILD),-I$(CURDIR)/.include) $(SEQAN_INC) -I third_party ++INC = $(if $(RELEASE_BUILD),-I$(CURDIR)/.include) `pkg-config --cflags seqan-1.4` -I third_party + CPP = g++ + CXX = $(CPP) + CC = gcc diff --git a/sci-biology/bowtie/files/bowtie-1.2.2-void2int.patch b/sci-biology/bowtie/files/bowtie-1.2.2-void2int.patch new file mode 100644 index 000000000..822b673ae --- /dev/null +++ b/sci-biology/bowtie/files/bowtie-1.2.2-void2int.patch @@ -0,0 +1,16 @@ +#The latest Intel compiler (2016,2017) complains about the incompatibility of "void *" argument +#being incompatible with parameter of type "int *" +#M. Fujinaga (fujinaga@ualberta.ca) +--- processor_support.h 2017-02-02 21:48:42.436432756 +0000 ++++ processor_support.h 2017-02-02 21:48:54.419309743 +0000 +@@ -44,8 +44,8 @@ + + try { + #if ( defined(USING_INTEL_COMPILER) || defined(USING_MSC_COMPILER) ) +- __cpuid((void *) ®s,0); // test if __cpuid() works, if not catch the exception +- __cpuid((void *) ®s,0x1); // POPCNT bit is bit 23 in ECX ++ __cpuid((int *) ®s,0); // test if __cpuid() works, if not catch the exception ++ __cpuid((int *) ®s,0x1); // POPCNT bit is bit 23 in ECX + #elif defined(USING_GCC_COMPILER) + __get_cpuid(0x1, ®s.EAX, ®s.EBX, ®s.ECX, ®s.EDX); + #else diff --git a/sci-biology/bowtie/metadata.xml b/sci-biology/bowtie/metadata.xml new file mode 100644 index 000000000..71e8d3bb8 --- /dev/null +++ b/sci-biology/bowtie/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sci-biology@gentoo.org</email> + <name>Gentoo Biology Project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">bowtie-bio</remote-id> + </upstream> + <use> + <flag name="tbb">Enables building bowtie with the Intel + Threading Building Blocks from <pkg>dev-cpp/tbb</pkg>. This + flag is recommended.</flag> + </use> +</pkgmetadata> |