commit:     841b73539cdc92799497752d37b764c16793582b
Author:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Tue Mar 16 18:11:02 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Tue Mar 16 18:11:02 2021 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=841b7353

Revert "sci-biology/bowtie: drop old"

This reverts commit 718c86792641e4203877c23d69e9d4dcb0274388.

Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>

 .../bowtie/bowtie-1.2.2_beta20190219.ebuild        | 81 ++++++++++++++++++++++
 .../files/bowtie-1.2.2-_ContextLss-1.1-1.4.patch   | 17 +++++
 .../files/bowtie-1.2.2-fix-Intel-compilation.patch | 32 +++++++++
 .../files/bowtie-1.2.2-fix-isa-return-type.patch   | 22 ++++++
 .../bowtie/files/bowtie-1.2.2-unbundle-seqan.patch | 14 ++++
 .../bowtie/files/bowtie-1.2.2-void2int.patch       | 16 +++++
 6 files changed, 182 insertions(+)

diff --git a/sci-biology/bowtie/bowtie-1.2.2_beta20190219.ebuild 
b/sci-biology/bowtie/bowtie-1.2.2_beta20190219.ebuild
new file mode 100644
index 000000000..f7a1b92d4
--- /dev/null
+++ b/sci-biology/bowtie/bowtie-1.2.2_beta20190219.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs git-r3
+
+DESCRIPTION="Popular short read aligner for Next-generation sequencing data"
+HOMEPAGE="http://bowtie-bio.sourceforge.net/";
+EGIT_REPO_URI="https://github.com/BenLangmead/bowtie.git";
+EGIT_BRANCH="bug_fixes"
+COMMIT="f253e204f5ba4565d14ae1b300ea6cb10dfe4660"
+
+LICENSE="Artistic"
+SLOT="1"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="examples +tbb"
+
+RDEPEND="tbb? ( dev-cpp/tbb )"
+DEPEND="${RDEPEND}
+       app-arch/unzip"
+#      sci-biology/seqan:1.4"
+
+DOCS=( AUTHORS NEWS TUTORIAL doc/README )
+HTML_DOCS=( doc/{manual.html,style.css} )
+
+PATCHES=( "${FILESDIR}/bowtie-1.2.2-fix-isa-return-type.patch" )
+# not needed
+# "${FILESDIR}/${P}-fix-Intel-compilation.patch", obsoleted by 
https://github.com/BenLangmead/bowtie/commit/d8b661fb36c129cb9899fcd3689b3618036f8c7b
+#
+# still to be considered
+#PATCHES=(
+#      "${FILESDIR}/${P}-_ContextLss-1.1-1.4.patch"
+#      "${FILESDIR}/${P}-unbundle-seqan.patch"
+#      "${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 library of headers, 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/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.foss...@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-fix-isa-return-type.patch 
b/sci-biology/bowtie/files/bowtie-1.2.2-fix-isa-return-type.patch
new file mode 100644
index 000000000..de19e42a8
--- /dev/null
+++ b/sci-biology/bowtie/files/bowtie-1.2.2-fix-isa-return-type.patch
@@ -0,0 +1,22 @@
+From 58c6ac97b1938909881877ef83167f5eff0e8ab1 Mon Sep 17 00:00:00 2001
+From: Rone Charles <rone_char...@fastmail.com>
+Date: Tue, 4 Sep 2018 21:06:39 -0400
+Subject: [PATCH] Fix isa return type
+
+---
+ ebwt.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ebwt.h b/ebwt.h
+index fe6300cc..8f886b8d 100644
+--- a/ebwt.h
++++ b/ebwt.h
+@@ -862,7 +862,7 @@ class Ebwt {
+       TIndexOffU*   ftab() const         { return _ftab; }
+       TIndexOffU*   eftab() const        { return _eftab; }
+       TIndexOffU*   offs() const         { return _offs; }
+-      uint32_t*   isa() const          { return _isa; } /* check */
++      TIndexOffU*   isa() const          { return _isa; } /* check */
+       TIndexOffU*   plen() const         { return _plen; }
+       TIndexOffU*   rstarts() const      { return _rstarts; }
+       uint8_t*    ebwt() const         { return _ebwt; }

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 (fujin...@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 *) &regs,0); // test if __cpuid() works, if not catch 
the exception
+-        __cpuid((void *) &regs,0x1); // POPCNT bit is bit 23 in ECX
++        __cpuid((int *) &regs,0); // test if __cpuid() works, if not catch 
the exception
++        __cpuid((int *) &regs,0x1); // POPCNT bit is bit 23 in ECX
+ #elif defined(USING_GCC_COMPILER)
+         __get_cpuid(0x1, &regs.EAX, &regs.EBX, &regs.ECX, &regs.EDX);
+ #else

Reply via email to