summaryrefslogtreecommitdiff
blob: bc221ecb2d273f3c8a0dec2d0e2bc0a2d6ff2c79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-biology/seqan/seqan-1.4.2.ebuild,v 1.3 2014/12/26 13:01:33 jlec Exp $

EAPI=5

PYTHON_COMPAT=( python2_7 )

inherit cmake-utils flag-o-matic python-single-r1

DESCRIPTION="C++ Sequence Analysis Library"
HOMEPAGE="http://www.seqan.de/"
SRC_URI="http://packages.${PN}.de/${PN}-src/${PN}-src-${PV}.tar.gz"

SLOT="0"
LICENSE="BSD GPL-3"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE=""

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

RDEPEND="${PYTHON_DEPS}
	sci-biology/samtools"
DEPEND="${RDEPEND}"

#S="${WORKDIR}"/${P}/cmake

PATCHES=(
	"${FILESDIR}"/${P}-shared.patch
	"${FILESDIR}"/${P}-include.patch
)

pkg_pretend() {
	[[ ${MERGE_TYPE} = "binary" ]] && return 0
	if ! echo "#include <smmintrin.h>" | gcc -E - 2>&1 > /dev/null; then
		ewarn "Need at least SSE4.1 support"
		die "Missing SSE4.1 support"
	fi
}

src_prepare() {
	rm -f \
		util/cmake/FindZLIB.cmake \
		|| die
	touch extras/apps/seqan_flexbar/README || die
	sed \
		-e "s:share/doc:share/doc/${PF}:g" \
		-i docs/CMakeLists.txt util/cmake/SeqAnBuildSystem.cmake || die
	cmake-utils_src_prepare
}

src_configure() {
	local mycmakeargs=(
		-DZLIB_INCLUDE_DIRS="${EPREFIX}"/usr/include
	)
	cmake-utils_src_configure
}

src_install() {
	mkdir -p "${BUILD_DIR}"/docs/html || die
	cmake-utils_src_install
	chmod 755 "${ED}"/usr/bin/*sh || die

	mv "${ED}"/usr/bin/{,seqan-}join || die
}

pkg_postinst() {
	elog "Due to filecollision the 'join' binary has been renamed to seqan-join"
}