/[gentoo-alt]/trunk/prefix/eclass/embassy.eclass
Gentoo

Contents of /trunk/prefix/eclass/embassy.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 982 - (show annotations) (download)
Thu Feb 2 04:20:17 2006 UTC (13 years, 2 months ago) by kito
File size: 2697 byte(s)
Initial eclass import from gentoo-x86
1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/embassy.eclass,v 1.12 2005/12/14 03:29:26 spyderous Exp $
4
5 # Author Olivier Fisette <ribosome@gentoo.org>
6
7 # This eclass is used to install EMBASSY programs (EMBOSS add-ons).
8
9 # The inheriting ebuild should provide a "DESCRIPTION", "KEYWORDS" and, if
10 # necessary, add "(R|P)DEPEND"encies. Additionnaly, the inheriting ebuild's
11 # name must begin by "embassy-". Also, before inheriting, the ebuild should
12 # specify what version of EMBOSS is required by setting EBOV.
13
14 inherit eutils multilib
15
16 # The EMBASSY package name, retrieved from the inheriting ebuild's name
17 EN=${PN:8}
18 # The full name and version of the EMBASSY package (excluding the Gentoo
19 # revision number)
20 EF="$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}"
21
22 DESCRIPTION="Based on the $ECLASS eclass"
23 HOMEPAGE="http://emboss.sourceforge.net/"
24 LICENSE="LGPL-2 GPL-2"
25 SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-${EBOV}.tar.gz
26 ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz"
27
28 SLOT="0"
29 IUSE="X png"
30
31 DEPEND="=sci-biology/emboss-${EBOV}*
32 !<sci-biology/emboss-${EBOV}
33 X? ( || ( x11-libs/libX11 virtual/x11 ) )
34 png? ( sys-libs/zlib
35 media-libs/libpng
36 >=media-libs/gd-1.8
37 )"
38
39 S=${WORKDIR}/EMBOSS-${EBOV}/embassy/${EF}
40
41 embassy_src_unpack() {
42 unpack ${A}
43 mkdir EMBOSS-${EBOV}/embassy
44 mv ${EF} EMBOSS-${EBOV}/embassy/
45 cp /usr/$(get_libdir)/libplplot.la EMBOSS-${EBOV}/plplot/
46 cp /usr/$(get_libdir)/libajax.la EMBOSS-${EBOV}/ajax/
47 cp /usr/$(get_libdir)/libajaxg.la EMBOSS-${EBOV}/ajax/
48 cp /usr/$(get_libdir)/libnucleus.la EMBOSS-${EBOV}/nucleus/
49 if [ -e ${FILESDIR}/${PF}.patch ]; then
50 cd ${S}
51 epatch ${FILESDIR}/${PF}.patch
52 fi
53 }
54
55 embassy_src_compile() {
56 local EXTRA_CONF
57 ! use X && EXTRA_CONF="${EXTRA_CONF} --without-x"
58 ! use png && EXTRA_CONF="${EXTRA_CONF} --without-pngdriver"
59 ./configure --host=${CHOST} \
60 --mandir=/usr/share/man \
61 --infodir=/usr/share/info \
62 --datadir=/usr/share \
63 --sysconfdir=/etc \
64 --localstatedir=/var/lib \
65 ${EXTRA_CONF} || die
66 emake || die "Before reporting this error as a bug, please make sure you compiled
67 EMBOSS and the EMBASSY packages with the same \"USE\" flags. Failure to
68 do so may prevent the compilation of some EMBASSY packages, or cause
69 runtime problems with some EMBASSY programs. For example, if you
70 compile EMBOSS with \"png\" support and then try to build DOMAINATRIX
71 without \"png\" support, compilation will fail when linking the binaries."
72 }
73
74 embassy_src_install() {
75 einstall || die
76 dodoc AUTHORS ChangeLog NEWS README
77 }
78
79 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20