aboutsummaryrefslogtreecommitdiff
blob: fa67b6f96519b957dd4e4ddb3d648ed68b25aed8 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3

inherit eutils flag-o-matic base subversion # autotools

DESCRIPTION="A fully developed set of DNA sequence assembly (Gap4), editing and analysis tools (Spin)."
HOMEPAGE="http://sourceforge.net/projects/staden"
# https://staden.svn.sourceforge.net/svnroot/staden staden
if [ "$PV" == "9999" ]; then
	ESVN_REPO_URI="https://staden.svn.sourceforge.net/svnroot/staden/staden/trunk"
	#KEYWORDS="~amd64 ~x86"
else
	SRC_URI="http://downloads.sourceforge.net/staden/staden-2.0.0b7-src.tar.gz"
	#KEYWORDS="~amd64 ~x86"
fi

LICENSE="staden"
SLOT="0"
KEYWORDS=""
IUSE="debug fortran X png curl tcl tk zlib"

# either g77 or gfortran must be available
# edit src/mk/linux.mk accordingly

#
# this is a glibc-2.9 issue, see https://sourceforge.net/tracker/index.php?func=detail&aid=2629155&group_id=100316&atid=627058
#
# 
#
DEPEND="dev-vcs/subversion
		>=dev-lang/tk-8.4
		>=dev-lang/tcl-8.4
		dev-tcltk/tklib
		>=sci-libs/io_lib-1.12.2
		>=sys-libs/zlib-1.2
		>=media-libs/libpng-1.2
		sci-biology/samtools
		>=app-arch/xz-utils-4.999"

# maybe we should depend on app-arch/lzma or app-arch/xz-utils?

RDEPEND="tcl? ( >=dev-tcltk/itcl-3.2 )
		tk? ( >=dev-tcltk/itk-3.2 )
		>=dev-tcltk/iwidgets-4.0"

src_unpack() {
	if [ "$PV" == "9999" ]; then
		subversion_src_unpack
		S="${WORKDIR}"/"${P}"/src/ || die
		cd "${S}" || die
		./bootstrap || die "bootstrap failed"
	else
		unpack ${A} || die
		S="${WORKDIR}"/staden-2.0.0b7-src || die "Cannot cd ${WORKDIR}/staden-2.0.0b7-src"
		cd "${S}" || die "Cannot cd ${S}"
		./bootstrap || die "bootstrap failed"
	fi
}

src_configure() {
	local myconf
	use X && myconf=" --with-x"
	myconf=" --with-tklib=/usr/lib/tklib0.5" # HACK, see http://bugs.gentoo.org/show_bug.cgi?id=311847#c10
	use amd64 && myconf="${myconf} --enable-64bit"
	use debug && append-cflags "-DCACHE_REF_DEBUG"
	use debug && append-cxxflags "-DCACHE_REF_DEBUG"
	econf ${myconf} || die "configure failed"
	emake || die "emake failed"
}

src_compile() {
	emake || die "emake failed"
}

src_install() {
	emake install DESTDIR="${D}" || die "make install failed"
	echo "STADENROOT="${EPREFIX}"/usr/share/staden" > "${S}"/99staden
	doenvd "${S}"/99staden || die
}