# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sci-biology/seaview/seaview-20071113.ebuild,v 1.3 2008/08/26 15:08:19 ribosome Exp $ inherit toolchain-funcs multilib DESCRIPTION="A graphical multiple sequence alignment editor" HOMEPAGE="http://pbil.univ-lyon1.fr/software/seaview.html" # source now in a sensible location SRC_URI="ftp://pbil.univ-lyon1.fr/pub/mol_phylogeny/seaview/archive/${PN}_${PV}.tar.gz" LICENSE="public-domain" SLOT="0" KEYWORDS="amd64 ppc x86" IUSE="pdf xft" # # libXft and fltk built with xft needed if xft enabled # sci-libs/libmuscle blocks/replaces sci-biology/muscle, no virtual # DEPEND="x11-libs/fltk pdf? ( media-libs/pdflib ) xft? ( x11-libs/libXft x11-libs/fltk[xft] ) sci-biology/clustalw sci-libs/libmuscle sci-biology/phyml" S=${WORKDIR} src_unpack() { unpack ${A} cd ${S}/seaview || die "Cannot chdir to ${S}/seaview" # respect CXXFLAGS (package uses them as CFLAGS) # removed cruft from ebuild and Makefile sed -i \ -e "s:^CXX.*:CXX = $(tc-getCXX):" \ -e "s:\$(OPT):${CXXFLAGS}:" \ -e "s:^OPT:#OPT:" \ -e "s:^#IFLTK .*:IFLTK = $(fltk-config --use-images --cxxflags):" \ -e "s:^#LFLTK .*:LFLTK = $(fltk-config --use-images --ldflags):" \ -e "s:^USE_XFT:#USE_XFT:" \ -e "s:^#HELPFILE:HELPFILE:" \ -e "s:^#PHYMLNAME:PHYMLNAME:" \ Makefile || die "sed failed while editing Makefile" if use pdf; then sed -i \ -e "s:PDF_PS_FLAGS = -DNO_PDF:#PDF_PS_FLAGS = -DNO_PDF:" \ -e "s:PDF_PS = postscript:#PDF_PS = postscript:" \ -e "s:#PDF_INC = \$(HOME)/PDFlibLite:PDF_INC = /usr/include:" \ -e "s:#PDF_LIB = \$(HOME)/PDFlibLite:PDF_LIB = /usr/lib:" \ -e "s:#PDF_PS = pdf:PDF_PS = pdf:" \ -e "s:#PDF_PS_FLAGS = -I\$(PDF_INC):PDF_PS_FLAGS = -I\$(PDF_INC):" \ -e "s:#LPDF = -L\$(PDF_LIB) -lpdf:LPDF = -L\$(PDF_LIB) -lpdf:" \ Makefile || die "sed failed while editing Makefile to enable pdf output" fi if use xft; then sed -i \ -e "s:^#USE_XFT .*:USE_XFT = -DUSE_XFT $(xft-config --cflags):" \ -e "s:-lXft:$(xft-config --libs):" \ Makefile || die "sed failed while editing Makefile to enable xft" fi } src_compile(){ cd ${S}/seaview || die "Cannot chdir to ${S}/seaview" make || die "make failed" } src_install() { cd ${S}/seaview || die "Cannot chdir to ${S}/seaview" dobin seaview # /usr/share/seaview/seaview.html is hardcoded in the binary, see Makefile insinto /usr/share/seaview doins example.nxs seaview.html insinto /usr/share/seaview/images doins seaview.xpm # desktop still useful insinto /usr/share/applications/ doins "${FILESDIR}/${PN}.desktop" # manpage available now doman seaview.1 }