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/bedtools/files/, sci-biology/bedtools/
Date: Sun, 16 Aug 2020 20:50:41
Message-Id: 1597610989.3a1f5a9faf6dfeb828e148cd397290d670c93744.soap@gentoo
1 commit: 3a1f5a9faf6dfeb828e148cd397290d670c93744
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 16 20:49:49 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 16 20:49:49 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a1f5a9f
7
8 sci-biology/bedtools: Version bump to 2.29.2
9
10 Bug: https://bugs.gentoo.org/718468
11 Package-Manager: Portage-3.0.2, Repoman-2.3.23
12 Signed-off-by: David Seifert <soap <AT> gentoo.org>
13
14 sci-biology/bedtools/Manifest | 1 +
15 sci-biology/bedtools/bedtools-2.29.2.ebuild | 48 +++++++++++++
16 .../files/bedtools-2.29.2-buildsystem.patch | 82 ++++++++++++++++++++++
17 .../bedtools/files/bedtools-2.29.2-python.patch | 41 +++++++++++
18 .../files/bedtools-2.29.2-samtools-1.10.patch | 13 ++++
19 5 files changed, 185 insertions(+)
20
21 diff --git a/sci-biology/bedtools/Manifest b/sci-biology/bedtools/Manifest
22 index 642fe852658..d776ef0925a 100644
23 --- a/sci-biology/bedtools/Manifest
24 +++ b/sci-biology/bedtools/Manifest
25 @@ -1,2 +1,3 @@
26 DIST bedtools-2.26.0-fix-buildsystem.patch.bz2 2584 BLAKE2B 550cd03a0c01217adb347587cb75bdc2ffa4e03ad6ad66535b22d423e6f030e237b0ccfd3d1bd3e434cb9cc2a007971517f03e9ceabc08b63c725bac786e23e8 SHA512 0a7835f560102ce6183736faea6a2be05609b69bb8efdaf98b9d7057e24aa1ebe9d6067118b95c76470ca341b151970db532094ee70ca333075aed7c47509ba3
27 DIST bedtools-2.26.0.tar.gz 19939711 BLAKE2B 8f6ee6ed755c638dbdd0a4750a5348c28a865f36eaafef6160e90f62912cb0a6b719713935ba68dad74bc591e3f37db49eab54a06a316dc00e4ec82a5dca71dc SHA512 b224adcc09322e90ef389e8172e14572b68f164185fe1a8814db1c47bb4f15656ca8c0ff0061017eb54d76affbe0d0f5793d893b8ab489b56eaf0818616a5def
28 +DIST bedtools-2.29.2.tar.gz 20646485 BLAKE2B cdfff7a0f5300f31c2487e98bd28dc7e8b7f3575a098947c2c7b3a6e30272a80d35f07997d3a00bd42d91bf60899f32358b25b054b6f40b761cc66e2788508b3 SHA512 138ff029995e9889d2e43f884fa15bb5614d11cf75dfe18e2999aad0915e80f49444e67c9934c92ca8e28caad399394b493db8a1bee9f5304413a8c41c22c6d5
29
30 diff --git a/sci-biology/bedtools/bedtools-2.29.2.ebuild b/sci-biology/bedtools/bedtools-2.29.2.ebuild
31 new file mode 100644
32 index 00000000000..de337827bf2
33 --- /dev/null
34 +++ b/sci-biology/bedtools/bedtools-2.29.2.ebuild
35 @@ -0,0 +1,48 @@
36 +# Copyright 1999-2020 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=7
40 +
41 +PYTHON_COMPAT=( python3_{6..9} )
42 +
43 +inherit python-any-r1 toolchain-funcs
44 +
45 +DESCRIPTION="Tools for manipulation and analysis of BED, GFF/GTF, VCF, SAM/BAM file formats"
46 +HOMEPAGE="https://bedtools.readthedocs.io/"
47 +SRC_URI="https://github.com/arq5x/${PN}2/releases/download/v${PV}/${P}.tar.gz"
48 +
49 +LICENSE="GPL-2"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~x86"
52 +IUSE="test"
53 +RESTRICT="!test? ( test )"
54 +
55 +RDEPEND="
56 + app-arch/bzip2
57 + app-arch/xz-utils
58 + sys-libs/zlib"
59 +DEPEND="${RDEPEND}"
60 +BDEPEND="test? ( >=sci-biology/samtools-1.10:0 )"
61 +
62 +S="${WORKDIR}"/${PN}2
63 +
64 +# bedtools2 has a *terrible* build system and development practices.
65 +# Upstream has forked htslib 1.9 and extended it by adding clever callbacks
66 +# that make unbundling it nigh impossible. There are no signs of upstream porting
67 +# their fork to 1.10, which means we're stuck with the bundled version.
68 +PATCHES=(
69 + "${FILESDIR}"/${PN}-2.29.2-buildsystem.patch
70 + "${FILESDIR}"/${PN}-2.29.2-python.patch
71 + "${FILESDIR}"/${PN}-2.29.2-samtools-1.10.patch
72 +)
73 +
74 +src_configure() {
75 + tc-export AR CC CXX RANLIB
76 +}
77 +
78 +src_install() {
79 + default
80 +
81 + insinto /usr/share/${PN}
82 + doins -r genomes
83 +}
84
85 diff --git a/sci-biology/bedtools/files/bedtools-2.29.2-buildsystem.patch b/sci-biology/bedtools/files/bedtools-2.29.2-buildsystem.patch
86 new file mode 100644
87 index 00000000000..573e88993bc
88 --- /dev/null
89 +++ b/sci-biology/bedtools/files/bedtools-2.29.2-buildsystem.patch
90 @@ -0,0 +1,82 @@
91 +--- a/Makefile
92 ++++ b/Makefile
93 +@@ -4,44 +4,29 @@
94 + # (c) 2009 Aaron Quinlan
95 + # ==========================
96 +
97 +-SHELL := /bin/bash -e
98 ++SHELL := bash -e
99 +
100 + VERSION_FILE=./src/utils/version/version_git.h
101 + RELEASED_VERSION_FILE=./src/utils/version/version_release.txt
102 +
103 +
104 + # define our object and binary directories
105 +-ifeq ($(VERBOSE),1)
106 + CCPREFIX =
107 +-else
108 +-CCPREFIX = @
109 +-endif
110 +
111 + OBJ_DIR = obj
112 + BIN_DIR = bin
113 + SRC_DIR = src
114 +
115 +-CXX = g++
116 +-
117 +-ifeq ($(DEBUG),1)
118 +-BT_CPPFLAGS = -DDEBUG -D_DEBUG -D_FILE_OFFSET_BITS=64 -DWITH_HTS_CB_API $(INCLUDES)
119 +-BT_CXXFLAGS = -Wconversion -Wall -Wextra -g -O0
120 +-else
121 + BT_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -DWITH_HTS_CB_API $(INCLUDES)
122 +-BT_CXXFLAGS = -g -Wall -O2
123 +-endif
124 ++BT_CXXFLAGS = -Wall
125 +
126 + # If the user has specified to do so, tell the compile to use rand() (instead of mt19937).
127 +-ifeq ($(USE_RAND),1)
128 +-BT_CXXFLAGS += -DUSE_RAND
129 +-else
130 + BT_CXXFLAGS += -std=c++11
131 +-endif
132 +
133 + BT_LDFLAGS =
134 + BT_LIBS = -lz -lm -lbz2 -llzma -lpthread
135 +
136 +-prefix ?= /usr/local
137 ++prefix = $(EPREFIX)/usr
138 +
139 + SUBDIRS = $(SRC_DIR)/annotateBed \
140 + $(SRC_DIR)/bamToBed \
141 +@@ -204,7 +189,7 @@
142 +
143 + # make the "obj/" and "bin/" directories, if they don't exist
144 + $(OBJ_DIR) $(BIN_DIR):
145 +- @mkdir -p $@
146 ++ mkdir -p $@
147 +
148 +
149 + # Usually HTSlib's configure script has not been used (detected via config.mk
150 +--- a/src/utils/htslib/Makefile
151 ++++ b/src/utils/htslib/Makefile
152 +@@ -22,20 +22,13 @@
153 + # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
154 + # DEALINGS IN THE SOFTWARE.
155 +
156 +-CC = gcc
157 +-AR = ar
158 +-RANLIB = ranlib
159 +-
160 + # Default libraries to link if configure is not used
161 + htslib_default_libs = -lz -lm -lbz2 -llzma
162 +
163 +-CPPFLAGS =
164 + # TODO: probably update cram code to make it compile cleanly with -Wc++-compat
165 + # For testing strict C99 support add -std=c99 -D_XOPEN_SOURCE=600
166 + #CFLAGS = -g -Wall -O2 -pedantic -std=c99 -D_XOPEN_SOURCE=600 -D__FUNCTION__=__func__
167 +-CFLAGS = -g -Wall -O2
168 + EXTRA_CFLAGS_PIC = -fpic
169 +-LDFLAGS =
170 + LIBS = $(htslib_default_libs)
171 +
172 + prefix = /usr/local
173
174 diff --git a/sci-biology/bedtools/files/bedtools-2.29.2-python.patch b/sci-biology/bedtools/files/bedtools-2.29.2-python.patch
175 new file mode 100644
176 index 00000000000..9576a78bd1d
177 --- /dev/null
178 +++ b/sci-biology/bedtools/files/bedtools-2.29.2-python.patch
179 @@ -0,0 +1,41 @@
180 +--- a/Makefile
181 ++++ b/Makefile
182 +@@ -183,7 +168,7 @@
183 +
184 + $(BIN_DIR)/intersectBed: | $(BIN_DIR)
185 + @echo "- Creating executables for old CLI."
186 +- @python scripts/makeBashScripts.py
187 ++ $(EPYTHON) scripts/makeBashScripts.py
188 + @chmod +x bin/*
189 + @echo "done."
190 +
191 +--- a/src/utils/BamTools/Makefile.frag
192 ++++ b/src/utils/BamTools/Makefile.frag
193 +@@ -1,4 +1,4 @@
194 + src/utils/BamTools/include/BamAlignment.mapping.hpp: src/utils/BamTools/mapping/BamAlignment.py src/utils/BamTools/mapping/BamAlignment.map
195 +
196 + src/utils/BamTools/include/%.mapping.hpp: src/utils/BamTools/mapping/%.py src/utils/BamTools/mapping/%.map
197 +- python $^ > $@
198 ++ $(EPYTHON) $^ > $@
199 +--- a/test/bigchroms/test-bigchroms.sh
200 ++++ b/test/bigchroms/test-bigchroms.sh
201 +@@ -28,7 +28,7 @@
202 + rm obs
203 +
204 + if [[ "$BT_NO_BIG_FILES" != "" ]]; then
205 +-python make-big-chrom.py
206 ++${EPYTHON} make-big-chrom.py
207 +
208 + echo -e " bigchroms.t03...big get fasta \c"
209 + $BT getfasta -fi bigx.fasta -bed bigx.bed | tail -1 > obs
210 +--- a/test/fisher/cmp.sh
211 ++++ b/test/fisher/cmp.sh
212 +@@ -3,7 +3,7 @@
213 + echo "fisher,shuffled"
214 +
215 + for i in $(seq 1000); do
216 +- fisher=$(python ./sim.py | tail -1 | cut -f 2)
217 ++ fisher=$(${EPYTHON} ./sim.py | tail -1 | cut -f 2)
218 + shuffle=$(bash shuf.sh)
219 + echo "$fisher,$shuffle"
220 + done
221
222 diff --git a/sci-biology/bedtools/files/bedtools-2.29.2-samtools-1.10.patch b/sci-biology/bedtools/files/bedtools-2.29.2-samtools-1.10.patch
223 new file mode 100644
224 index 00000000000..7cc0e23de2d
225 --- /dev/null
226 +++ b/sci-biology/bedtools/files/bedtools-2.29.2-samtools-1.10.patch
227 @@ -0,0 +1,13 @@
228 +--- a/test/intersect/new_test-intersect.sh
229 ++++ b/test/intersect/new_test-intersect.sh
230 +@@ -975,8 +975,8 @@
231 + # Test intersect preserve the text header in bam
232 + ############################################################
233 + echo -e " intersect.new.t78...\c"
234 +-echo -e "@HD VN:1.5 SO:coordinate" > exp
235 +-echo "@HD VN:1.5 SO:coordinate" | samtools view -b | $BT intersect -a /dev/stdin -b b.bed | samtools view -H >obs
236 ++echo -e "@HD VN:1.5 SO:coordinate" > exp
237 ++echo "@HD VN:1.5 SO:coordinate" | samtools view --no-PG -b | $BT intersect -a /dev/stdin -b b.bed | samtools view --no-PG -H >obs
238 + check exp obs
239 + rm exp obs
240 + [[ $FAILURES -eq 0 ]] || exit 1;