Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-biology/STAR/, sci-biology/STAR/files/
Date: Thu, 16 Nov 2017 13:17:14
Message-Id: 1510838205.acd76729254ed012b6898eb33fcc59ab8c2076e4.soap@gentoo
1 commit: acd76729254ed012b6898eb33fcc59ab8c2076e4
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 16 12:32:54 2017 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 16 13:16:45 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=acd76729
7
8 sci-biology/STAR: Initial addition
9
10 Closes: https://github.com/gentoo/sci/pull/814
11 Package-Manager: Portage-2.3.14, Repoman-2.3.6
12
13 sci-biology/STAR/Manifest | 1 +
14 sci-biology/STAR/STAR-2.5.3a.ebuild | 42 +++++++
15 .../STAR/files/STAR-2.5.3a-fix-build-system.patch | 123 +++++++++++++++++++++
16 sci-biology/STAR/metadata.xml | 19 ++++
17 4 files changed, 185 insertions(+)
18
19 diff --git a/sci-biology/STAR/Manifest b/sci-biology/STAR/Manifest
20 new file mode 100644
21 index 00000000000..0ec6da1a3d9
22 --- /dev/null
23 +++ b/sci-biology/STAR/Manifest
24 @@ -0,0 +1 @@
25 +DIST STAR-2.5.3a.tar.gz 9857460 SHA256 2a258e77cda103aa293e528f8597f25dc760cba188d0a7bc7c9452f4698e7c04 SHA512 8bd86ad384f2c0331fd701873b02641301f4205a5ff0fceeb800d425da42c53b6c61a74500d37fee7fc13a5bff10e1fb44b9142811883b8f5cd012f51f1f9fdf WHIRLPOOL 64bb7dc68e24ecd7d198d281e98042fd1463fc96af8ab8be9cab8e1588c2d08ab7cd1435187f2e0ebe870da11ab607c8f8a981d76360c55dd76e1fb4bb304006
26
27 diff --git a/sci-biology/STAR/STAR-2.5.3a.ebuild b/sci-biology/STAR/STAR-2.5.3a.ebuild
28 new file mode 100644
29 index 00000000000..73743cbb4e5
30 --- /dev/null
31 +++ b/sci-biology/STAR/STAR-2.5.3a.ebuild
32 @@ -0,0 +1,42 @@
33 +# Copyright 1999-2017 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +
38 +inherit toolchain-funcs
39 +
40 +DESCRIPTION="STAR aligner: align RNA-seq reads to reference genome uncompressed suffix arrays"
41 +HOMEPAGE="https://github.com/alexdobin/STAR"
42 +SRC_URI="https://github.com/alexdobin/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
43 +
44 +LICENSE="GPL-3"
45 +SLOT="0"
46 +KEYWORDS="~amd64"
47 +
48 +RDEPEND="sci-libs/htslib:="
49 +DEPEND="${RDEPEND}
50 + virtual/pkgconfig"
51 +
52 +PATCHES=( "${FILESDIR}"/${PN}-2.5.3a-fix-build-system.patch )
53 +DOCS=( README.md CHANGES.md RELEASEnotes.md doc/STARmanual.pdf )
54 +
55 +pkg_pretend() {
56 + [[ ${MERGE_TYPE} != binary ]] && tc-check-openmp
57 +}
58 +
59 +pkg_setup() {
60 + [[ ${MERGE_TYPE} != binary ]] && tc-check-openmp
61 +}
62 +
63 +src_configure() {
64 + tc-export CC CXX PKG_CONFIG
65 +}
66 +
67 +src_compile() {
68 + emake -C source STAR
69 +}
70 +
71 +src_install() {
72 + dobin source/STAR
73 + einstalldocs
74 +}
75
76 diff --git a/sci-biology/STAR/files/STAR-2.5.3a-fix-build-system.patch b/sci-biology/STAR/files/STAR-2.5.3a-fix-build-system.patch
77 new file mode 100644
78 index 00000000000..8e504fa429e
79 --- /dev/null
80 +++ b/sci-biology/STAR/files/STAR-2.5.3a-fix-build-system.patch
81 @@ -0,0 +1,123 @@
82 +* unbundle htslib
83 +* honour all user flags
84 +* use pkg-config for linking
85 +
86 +--- a/source/Makefile
87 ++++ b/source/Makefile
88 +@@ -8,24 +8,12 @@
89 + LDFLAGSextra ?=
90 + CXXFLAGSextra ?=
91 +
92 +-# user may define the compiler
93 +-CXX ?= g++
94 +-
95 + # pre-defined flags
96 +-LDFLAGS_shared := -pthread -Lhtslib -Bstatic -lhts -Bdynamic -lz -lrt
97 +-LDFLAGS_static := -static -static-libgcc -pthread -Lhtslib -lhts -lz
98 +-LDFLAGS_Mac :=-pthread -lz htslib/libhts.a
99 +-LDFLAGS_Mac_static :=-pthread -lz -static-libgcc htslib/libhts.a
100 +-LDFLAGS_gdb := $(LDFLAGS_shared)
101 +-
102 + COMPTIMEPLACE := -D'COMPILATION_TIME_PLACE="$(shell echo `date` $(HOSTNAME):`pwd`)"'
103 +
104 +-CXXFLAGS_common := -pipe -std=c++11 -Wall -Wextra -fopenmp $(COMPTIMEPLACE)
105 +-CXXFLAGS_main := -O3 $(CXXFLAGS_common)
106 +-CXXFLAGS_gdb := -O0 -g $(CXXFLAGS_common)
107 +-
108 +-CFLAGS := -O3 -pipe -Wall -Wextra $(CFLAGS)
109 +-
110 ++CFLAGS_common = -Wall -Wextra -pthread `$(PKG_CONFIG) --cflags htslib` `$(PKG_CONFIG) --cflags zlib`
111 ++CXXFLAGS_common = $(CFLAGS_common) -std=c++11 -fopenmp $(COMPTIMEPLACE)
112 ++LIBS_common = -pthread `$(PKG_CONFIG) --libs htslib` `$(PKG_CONFIG) --libs zlib` -lrt
113 +
114 + ##########################################################################################################
115 +
116 +@@ -54,10 +42,10 @@
117 +
118 +
119 + %.o : %.cpp
120 +- $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $<
121 ++ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(CXXFLAGS_common) $<
122 +
123 + %.o : %.c
124 +- $(CXX) -c $(CPPFLAGS) $(CFLAGS) $<
125 ++ $(CXX) -c $(CPPFLAGS) $(CFLAGS) $(CFLAGS_common) $<
126 +
127 + all: STAR
128 +
129 +@@ -84,7 +72,7 @@
130 + ifneq ($(MAKECMDGOALS),CLEAN)
131 + ifneq ($(MAKECMDGOALS),STARforMac)
132 + ifneq ($(MAKECMDGOALS),STARforMacGDB)
133 +-Depend.list: $(SOURCES) parametersDefault.xxd htslib
134 ++Depend.list: $(SOURCES) parametersDefault.xxd
135 + echo $(SOURCES)
136 + /bin/rm -f ./Depend.list
137 + $(CXX) $(CXXFLAGS_common) -MM $^ >> Depend.list
138 +@@ -95,57 +83,34 @@
139 + endif
140 + endif
141 +
142 +-htslib : htslib/libhts.a
143 +-
144 +-htslib/libhts.a :
145 +- $(MAKE) -C htslib lib-static
146 +-
147 + parametersDefault.xxd: parametersDefault
148 + xxd -i parametersDefault > parametersDefault.xxd
149 +
150 +-STAR : CXXFLAGS := $(CXXFLAGSextra) $(CXXFLAGS_main) $(CXXFLAGS)
151 +-STAR : LDFLAGS := $(LDFLAGSextra) $(LDFLAGS_shared) $(LDFLAGS)
152 + STAR : Depend.list parametersDefault.xxd $(OBJECTS)
153 +- $(CXX) -o STAR $(CXXFLAGS) $(OBJECTS) $(LDFLAGS)
154 ++ $(CXX) $(CXXFLAGS) $(CXXFLAGS_common) $(LDFLAGS) -o STAR $(OBJECTS) $(LIBS) $(LIBS_common)
155 +
156 +-POSIXSHARED : CXXFLAGS := $(CXXFLAGSextra) $(CXXFLAGS_main) -DPOSIX_SHARED_MEM $(CXXFLAGS)
157 +-POSIXSHARED : LDFLAGS := $(LDFLAGSextra) $(LDFLAGS_shared) $(LDFLAGS)
158 + POSIXSHARED : Depend.list parametersDefault.xxd $(OBJECTS)
159 +- $(CXX) -o STAR $(CXXFLAGS) $(OBJECTS) $(LDFLAGS)
160 ++ $(CXX) $(CXXFLAGS) $(CXXFLAGS_common) $(LDFLAGS) -o STAR $(OBJECTS) $(LIBS) $(LIBS_common)
161 +
162 +-STARstatic : CXXFLAGS := $(CXXFLAGSextra) $(CXXFLAGS_main) $(CXXFLAGS)
163 +-STARstatic : LDFLAGS := $(LDFLAGSextra) $(LDFLAGS_static) $(LDFLAGS)
164 + STARstatic : Depend.list parametersDefault.xxd $(OBJECTS)
165 +- $(CXX) -o STAR $(CXXFLAGS) $(OBJECTS) $(LDFLAGS)
166 ++ $(CXX) $(CXXFLAGS) $(CXXFLAGS_common) $(LDFLAGS) -o STAR $(OBJECTS) $(LIBS) $(LIBS_common)
167 +
168 +-STARlong : CXXFLAGS := $(CXXFLAGSextra) $(CXXFLAGS_main) -D'COMPILE_FOR_LONG_READS' $(CXXFLAGS)
169 +-STARlong : LDFLAGS := $(LDFLAGSextra) $(LDFLAGS_shared) $(LDFLAGS)
170 + STARlong : Depend.list parametersDefault.xxd $(OBJECTS)
171 +- $(CXX) -o STARlong $(CXXFLAGS) $(OBJECTS) $(LDFLAGS)
172 ++ $(CXX) $(CXXFLAGS) $(CXXFLAGS_common) $(LDFLAGS) -o STARlong $(OBJECTS) $(LIBS) $(LIBS_common)
173 +
174 +-STARlongStatic : CXXFLAGS := $(CXXFLAGSextra) $(CXXFLAGS_main) -D'COMPILE_FOR_LONG_READS' $(CXXFLAGS)
175 +-STARlongStatic : LDFLAGS := $(LDFLAGSextra) $(LDFLAGS_static) $(LDFLAGS)
176 + STARlongStatic : Depend.list parametersDefault.xxd $(OBJECTS)
177 +- $(CXX) -o STARlong $(CXXFLAGS) $(OBJECTS) $(LDFLAGS)
178 ++ $(CXX) $(CXXFLAGS) $(CXXFLAGS_common) $(LDFLAGS) -o STARlong $(OBJECTS) $(LIBS) $(LIBS_common)
179 +
180 +-gdb : CXXFLAGS := $(CXXFLAGSextra) $(CXXFLAGS_gdb) $(CXXFLAGS)
181 +-gdb : LDFLAGS := $(LDFLAGSextra) $(LDFLAGS_gdb) $(LDFLAGS)
182 + gdb : Depend.list parametersDefault.xxd $(OBJECTS)
183 +- $(CXX) -o STAR $(CXXFLAGS) $(OBJECTS) $(LDFLAGS)
184 ++ $(CXX) $(CXXFLAGS) $(CXXFLAGS_common) $(LDFLAGS) -o STAR $(OBJECTS) $(LIBS) $(LIBS_common)
185 +
186 +-gdb-long : CXXFLAGS := $(CXXFLAGSextra) $(CXXFLAGS_gdb) -D'COMPILE_FOR_LONG_READS' $(CXXFLAGS)
187 +-gdb-long : LDFLAGS := $(LDFLAGSextra) $(LDFLAGS_gdb) $(LDFLAGS)
188 + gdb-long : Depend.list parametersDefault.xxd $(OBJECTS)
189 +- $(CXX) -o STARlong $(CXXFLAGS) $(OBJECTS) $(LDFLAGS)
190 ++ $(CXX) $(CXXFLAGS) $(CXXFLAGS_common) $(LDFLAGS) -o STARlong $(OBJECTS) $(LIBS) $(LIBS_common)
191 +
192 +-STARforMacStatic : CXXFLAGS := $(CXXFLAGSextra) $(CXXFLAGS_main) -D'COMPILE_FOR_MAC' $(CXXFLAGS)
193 +-STARforMacStatic : LDFLAGS := $(LDFLAGSextra) $(LDFLAGS_Mac_static) $(LDFLAGS)
194 + STARforMacStatic : Depend.list parametersDefault.xxd $(OBJECTS)
195 +- $(CXX) -o STAR $(CXXFLAGS) $(OBJECTS) $(LDFLAGS)
196 ++ $(CXX) $(CXXFLAGS) $(CXXFLAGS_common) $(LDFLAGS) -o STAR $(OBJECTS) $(LIBS) $(LIBS_common)
197 +
198 +-STARlongForMacStatic : CXXFLAGS := -D'COMPILE_FOR_LONG_READS' $(CXXFLAGSextra) $(CXXFLAGS_main) -D'COMPILE_FOR_MAC' $(CXXFLAGS)
199 +-STARlongForMacStatic : LDFLAGS := $(LDFLAGSextra) $(LDFLAGS_Mac_static) $(LDFLAGS)
200 + STARlongForMacStatic : Depend.list parametersDefault.xxd $(OBJECTS)
201 +- $(CXX) -o STARlong $(CXXFLAGS) $(OBJECTS) $(LDFLAGS)
202 ++ $(CXX) $(CXXFLAGS) $(CXXFLAGS_common) $(LDFLAGS) -o STARlong $(OBJECTS) $(LIBS) $(LIBS_common)
203 +
204 +
205
206 diff --git a/sci-biology/STAR/metadata.xml b/sci-biology/STAR/metadata.xml
207 new file mode 100644
208 index 00000000000..22727da1cad
209 --- /dev/null
210 +++ b/sci-biology/STAR/metadata.xml
211 @@ -0,0 +1,19 @@
212 +<?xml version="1.0" encoding="UTF-8"?>
213 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
214 +<pkgmetadata>
215 + <maintainer type="person">
216 + <email>mmokrejs@×××××××××××××××.cz</email>
217 + <name>Martin Mokrejs</name>
218 + </maintainer>
219 + <maintainer type="project">
220 + <email>proxy-maint@g.o</email>
221 + <name>Proxy Maintainers</name>
222 + </maintainer>
223 + <maintainer type="project">
224 + <email>sci-biology@g.o</email>
225 + <name>Gentoo Biology Project</name>
226 + </maintainer>
227 + <upstream>
228 + <remote-id type="github">alexdobin/STAR</remote-id>
229 + </upstream>
230 +</pkgmetadata>