Gentoo Archives: gentoo-commits

From: Martin Mokrejs <mmokrejs@×××××××××××××××.cz>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-biology/hisat2/files/, sci-biology/hisat2/
Date: Wed, 01 Mar 2017 11:29:09
Message-Id: 1488367732.0765721b800e099f0e7d29d715fc39047d1b0f65.mmokrejs@gentoo
1 commit: 0765721b800e099f0e7d29d715fc39047d1b0f65
2 Author: Martin Mokrejš <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
3 AuthorDate: Wed Mar 1 11:28:52 2017 +0000
4 Commit: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
5 CommitDate: Wed Mar 1 11:28:52 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=0765721b
7
8 sci-biology/hisat2: new package
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 .../files/hisat2-2.0.5-respect_CXXFLAGS.patch | 53 ++++++++++++++++++++++
13 sci-biology/hisat2/hisat2-2.0.5.ebuild | 51 +++++++++++++++++++++
14 sci-biology/hisat2/metadata.xml | 12 +++++
15 3 files changed, 116 insertions(+)
16
17 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
18 new file mode 100644
19 index 000000000..26db123c8
20 --- /dev/null
21 +++ b/sci-biology/hisat2/files/hisat2-2.0.5-respect_CXXFLAGS.patch
22 @@ -0,0 +1,53 @@
23 +--- hisat2-2.0.5/Makefile.ori 2017-03-01 11:35:36.430368298 +0100
24 ++++ hisat2-2.0.5/Makefile 2017-03-01 11:43:42.974034697 +0100
25 +@@ -23,9 +23,8 @@
26 + INC =
27 + GCC_PREFIX = $(shell dirname `which gcc`)
28 + GCC_SUFFIX =
29 +-CC = $(GCC_PREFIX)/gcc$(GCC_SUFFIX)
30 +-CPP = $(GCC_PREFIX)/g++$(GCC_SUFFIX)
31 +-CXX = $(CPP)
32 ++CXX ?= $(GCC_PREFIX)/g++$(GCC_SUFFIX)
33 ++CXXFLAGS ?= "-O3"
34 + HEADERS = $(wildcard *.h)
35 + BOWTIE_MM = 1
36 + BOWTIE_SHARED_MEM = 0
37 +@@ -134,30 +133,30 @@
38 + VERSION = $(shell cat VERSION)
39 +
40 + # Convert BITS=?? to a -m flag
41 +-BITS=32
42 ++BITS?=32
43 + ifeq (x86_64,$(shell uname -m))
44 +-BITS=64
45 ++BITS?=64
46 + endif
47 + # msys will always be 32 bit so look at the cpu arch instead.
48 + ifneq (,$(findstring AMD64,$(PROCESSOR_ARCHITEW6432)))
49 + ifeq (1,$(MINGW))
50 +- BITS=64
51 ++ BITS?=64
52 + endif
53 + endif
54 + BITS_FLAG =
55 +
56 + ifeq (32,$(BITS))
57 +- BITS_FLAG = -m32
58 ++ BITS_FLAG ?= -m32
59 + endif
60 +
61 + ifeq (64,$(BITS))
62 +- BITS_FLAG = -m64
63 ++ BITS_FLAG ?= -m64
64 + endif
65 +-SSE_FLAG=-msse2
66 ++SSE_FLAG?=-msse2
67 +
68 +-DEBUG_FLAGS = -O0 -g3 $(BIToS_FLAG) $(SSE_FLAG)
69 ++DEBUG_FLAGS = -g3 -O0 $(CXXFLAGS) $(BIToS_FLAG) $(SSE_FLAG)
70 + DEBUG_DEFS = -DCOMPILER_OPTIONS="\"$(DEBUG_FLAGS) $(EXTRA_FLAGS)\""
71 +-RELEASE_FLAGS = -O3 $(BITS_FLAG) $(SSE_FLAG) -funroll-loops -g3
72 ++RELEASE_FLAGS = $(CXXFLAGS) $(BITS_FLAG) $(SSE_FLAG) -funroll-loops
73 + RELEASE_DEFS = -DCOMPILER_OPTIONS="\"$(RELEASE_FLAGS) $(EXTRA_FLAGS)\""
74 + NOASSERT_FLAGS = -DNDEBUG
75 + FILE_FLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
76
77 diff --git a/sci-biology/hisat2/hisat2-2.0.5.ebuild b/sci-biology/hisat2/hisat2-2.0.5.ebuild
78 new file mode 100644
79 index 000000000..a8a81a26f
80 --- /dev/null
81 +++ b/sci-biology/hisat2/hisat2-2.0.5.ebuild
82 @@ -0,0 +1,51 @@
83 +# Copyright 1999-2017 Gentoo Foundation
84 +# Distributed under the terms of the GNU General Public License v2
85 +# $Id$
86 +
87 +EAPI=6
88 +
89 +inherit eutils
90 +
91 +DESCRIPTION="Align DNA reads to a population of genomes"
92 +HOMEPAGE="https://ccb.jhu.edu/software/hisat2
93 + https://github.com/infphilo/hisat2"
94 +SRC_URI="ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/downloads/${P}-source.zip"
95 +
96 +LICENSE="GPL-3+"
97 +SLOT="0"
98 +KEYWORDS="~amd64 ~x86"
99 +IUSE="cpu_flags_x86_sse2"
100 +
101 +DEPEND=""
102 +RDEPEND="${DEPEND}"
103 +
104 +PATCHES=( "${FILESDIR}"/${P}-respect_CXXFLAGS.patch )
105 +
106 +# TODO: could depend on sci-biology/ncbi-tools++ or sra_sdk containing ncbi-vdb
107 +# For the support of SRA data access in HISAT2, please download and install the [NCBI-NGS] toolkit.
108 +# When running `make`, specify additional variables as follow.
109 +# `make USE_SRA=1 NCBI_NGS_DIR=/path/to/NCBI-NGS-directory NCBI_VDB_DIR=/path/to/NCBI-NGS-directory`,
110 +# where `NCBI_NGS_DIR` and `NCBI_VDB_DIR` will be used in Makefile for -I and -L compilation options.
111 +# For example, $(NCBI_NGS_DIR)/include and $(NCBI_NGS_DIR)/lib64 will be used.
112 +
113 +src_configure(){
114 + if use cpu_flags_x86_sse2; then
115 + SSE_FLAGS='-msse2'
116 + fi
117 + if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "ia64" ] || [ "$ARCH" = "ppc64" ]; then
118 + BITS='-m64'
119 + else
120 + BITS='-32'
121 + fi
122 +}
123 +
124 +src_compile(){
125 + emake SSE_FLAG="${SSE_FLAGS}" BITS="${BITS}"
126 +}
127 +
128 +src_install(){
129 + 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
130 + insinto /usr/share/"${PN}"/scripts
131 + doins scripts/*.sh
132 + dodoc MANUAL TUTORIAL
133 +}
134
135 diff --git a/sci-biology/hisat2/metadata.xml b/sci-biology/hisat2/metadata.xml
136 new file mode 100644
137 index 000000000..f68a1b6fa
138 --- /dev/null
139 +++ b/sci-biology/hisat2/metadata.xml
140 @@ -0,0 +1,12 @@
141 +<?xml version="1.0" encoding="UTF-8"?>
142 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
143 +<pkgmetadata>
144 + <maintainer type="person">
145 + <email>mmokrejs@×××××××××××××××.cz</email>
146 + <name>Martin Mokrejs</name>
147 + </maintainer>
148 + <maintainer type="project">
149 + <email>sci-biology@g.o</email>
150 + <name>Gentoo Biology Project</name>
151 + </maintainer>
152 +</pkgmetadata>