aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Mokrejš <mmokrejs@fold.natur.cuni.cz>2017-03-01 12:28:52 +0100
committerMartin Mokrejš <mmokrejs@fold.natur.cuni.cz>2017-03-01 12:28:52 +0100
commit0765721b800e099f0e7d29d715fc39047d1b0f65 (patch)
tree7daf8f1f873a8db2ba9cf685090dd17dc581d574
parentMerge remote-tracking branch 'github/master' (diff)
downloadsci-0765721b.tar.gz
sci-0765721b.tar.bz2
sci-0765721b.zip
sci-biology/hisat2: new package
Package-Manager: Portage-2.3.3, Repoman-2.3.1
-rw-r--r--sci-biology/hisat2/Manifest1
-rw-r--r--sci-biology/hisat2/files/hisat2-2.0.5-respect_CXXFLAGS.patch53
-rw-r--r--sci-biology/hisat2/hisat2-2.0.5.ebuild51
-rw-r--r--sci-biology/hisat2/metadata.xml12
4 files changed, 117 insertions, 0 deletions
diff --git a/sci-biology/hisat2/Manifest b/sci-biology/hisat2/Manifest
new file mode 100644
index 000000000..c9e85a34c
--- /dev/null
+++ b/sci-biology/hisat2/Manifest
@@ -0,0 +1 @@
+DIST hisat2-2.0.5-source.zip 3914703 SHA256 ef74e2ab828aff8fd8a6320feacc8ddb030b58ecbc81c095609acb3851b6dc53 SHA512 a626ebf8bb2682bdd69ffde55d1f53c6926ef6172a2d852aadc7fb02c08ab7b1b25158e046a6e07acb4f406549c37a329e5354402eaa5e93612568c7c58b2559 WHIRLPOOL 9735c7d8cd29913ee3c058a58141ec8926c065e4691803865d281acf5964d3c4930479e94be231d8860e69708b755f58bf86af40a6513c8edced6e42e476c806
diff --git a/sci-biology/hisat2/files/hisat2-2.0.5-respect_CXXFLAGS.patch b/sci-biology/hisat2/files/hisat2-2.0.5-respect_CXXFLAGS.patch
new file mode 100644
index 000000000..26db123c8
--- /dev/null
+++ b/sci-biology/hisat2/files/hisat2-2.0.5-respect_CXXFLAGS.patch
@@ -0,0 +1,53 @@
+--- hisat2-2.0.5/Makefile.ori 2017-03-01 11:35:36.430368298 +0100
++++ hisat2-2.0.5/Makefile 2017-03-01 11:43:42.974034697 +0100
+@@ -23,9 +23,8 @@
+ INC =
+ GCC_PREFIX = $(shell dirname `which gcc`)
+ GCC_SUFFIX =
+-CC = $(GCC_PREFIX)/gcc$(GCC_SUFFIX)
+-CPP = $(GCC_PREFIX)/g++$(GCC_SUFFIX)
+-CXX = $(CPP)
++CXX ?= $(GCC_PREFIX)/g++$(GCC_SUFFIX)
++CXXFLAGS ?= "-O3"
+ HEADERS = $(wildcard *.h)
+ BOWTIE_MM = 1
+ BOWTIE_SHARED_MEM = 0
+@@ -134,30 +133,30 @@
+ VERSION = $(shell cat VERSION)
+
+ # Convert BITS=?? to a -m flag
+-BITS=32
++BITS?=32
+ ifeq (x86_64,$(shell uname -m))
+-BITS=64
++BITS?=64
+ endif
+ # msys will always be 32 bit so look at the cpu arch instead.
+ ifneq (,$(findstring AMD64,$(PROCESSOR_ARCHITEW6432)))
+ ifeq (1,$(MINGW))
+- BITS=64
++ BITS?=64
+ endif
+ endif
+ BITS_FLAG =
+
+ ifeq (32,$(BITS))
+- BITS_FLAG = -m32
++ BITS_FLAG ?= -m32
+ endif
+
+ ifeq (64,$(BITS))
+- BITS_FLAG = -m64
++ BITS_FLAG ?= -m64
+ endif
+-SSE_FLAG=-msse2
++SSE_FLAG?=-msse2
+
+-DEBUG_FLAGS = -O0 -g3 $(BIToS_FLAG) $(SSE_FLAG)
++DEBUG_FLAGS = -g3 -O0 $(CXXFLAGS) $(BIToS_FLAG) $(SSE_FLAG)
+ DEBUG_DEFS = -DCOMPILER_OPTIONS="\"$(DEBUG_FLAGS) $(EXTRA_FLAGS)\""
+-RELEASE_FLAGS = -O3 $(BITS_FLAG) $(SSE_FLAG) -funroll-loops -g3
++RELEASE_FLAGS = $(CXXFLAGS) $(BITS_FLAG) $(SSE_FLAG) -funroll-loops
+ RELEASE_DEFS = -DCOMPILER_OPTIONS="\"$(RELEASE_FLAGS) $(EXTRA_FLAGS)\""
+ NOASSERT_FLAGS = -DNDEBUG
+ FILE_FLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
diff --git a/sci-biology/hisat2/hisat2-2.0.5.ebuild b/sci-biology/hisat2/hisat2-2.0.5.ebuild
new file mode 100644
index 000000000..a8a81a26f
--- /dev/null
+++ b/sci-biology/hisat2/hisat2-2.0.5.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit eutils
+
+DESCRIPTION="Align DNA reads to a population of genomes"
+HOMEPAGE="https://ccb.jhu.edu/software/hisat2
+ https://github.com/infphilo/hisat2"
+SRC_URI="ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/downloads/${P}-source.zip"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cpu_flags_x86_sse2"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-respect_CXXFLAGS.patch )
+
+# TODO: could depend on sci-biology/ncbi-tools++ or sra_sdk containing ncbi-vdb
+# For the support of SRA data access in HISAT2, please download and install the [NCBI-NGS] toolkit.
+# When running `make`, specify additional variables as follow.
+# `make USE_SRA=1 NCBI_NGS_DIR=/path/to/NCBI-NGS-directory NCBI_VDB_DIR=/path/to/NCBI-NGS-directory`,
+# where `NCBI_NGS_DIR` and `NCBI_VDB_DIR` will be used in Makefile for -I and -L compilation options.
+# For example, $(NCBI_NGS_DIR)/include and $(NCBI_NGS_DIR)/lib64 will be used.
+
+src_configure(){
+ if use cpu_flags_x86_sse2; then
+ SSE_FLAGS='-msse2'
+ fi
+ if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "ia64" ] || [ "$ARCH" = "ppc64" ]; then
+ BITS='-m64'
+ else
+ BITS='-32'
+ fi
+}
+
+src_compile(){
+ emake SSE_FLAG="${SSE_FLAGS}" BITS="${BITS}"
+}
+
+src_install(){
+ dobin hisat2 hisat2-build hisat2-inspect hisat2-build-s hisat2-build-l hisat2-align-s hisat2-align-l hisat2-inspect-s hisat2-inspect-l *.py
+ insinto /usr/share/"${PN}"/scripts
+ doins scripts/*.sh
+ dodoc MANUAL TUTORIAL
+}
diff --git a/sci-biology/hisat2/metadata.xml b/sci-biology/hisat2/metadata.xml
new file mode 100644
index 000000000..f68a1b6fa
--- /dev/null
+++ b/sci-biology/hisat2/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mmokrejs@fold.natur.cuni.cz</email>
+ <name>Martin Mokrejs</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-biology@gentoo.org</email>
+ <name>Gentoo Biology Project</name>
+ </maintainer>
+</pkgmetadata>