/[gentoo-x86]/eclass/emboss.eclass
Gentoo

Contents of /eclass/emboss.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Mar 29 07:23:23 2011 UTC (3 years, 5 months ago) by jlec
Branch: MAIN
emboss.eclass add, future replacement for embassy.eclass

1 # Copyright 1999-2011 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.17 2008/11/03 22:17:50 ribosome Exp $
4
5 # Creator of the original eclass
6 # Author Olivier Fisette <ofisette@gmail.com>
7 #
8 # Author of the next generation eclass
9 # Justin Lecher <jlec@gentoo.org>
10
11 # @ECLASS: emboss.eclass
12 # @MAINTAINER:
13 # sci-biology@gentoo.org
14 # jlec@gentoo.org
15 # @BLURB: Use this to easy install EMBOSS and EMBASSY programs (EMBOSS add-ons).
16 # @DESCRIPTION:
17 # The inheriting ebuild must set EAPI=4 and provide EBO_DESCRIPTION before the inherit line.
18 # KEYWORDS should be set. Additionally "(R|P)DEPEND"encies and other standard
19 # ebuild variables can be extended (FOO+=" bar").
20 # Default installation of following DOCS="AUTHORS ChangeLog NEWS README"
21 #
22 # Example:
23 #
24 # EAPI="4"
25 #
26 # EBO_DESCRIPTION="applications from the CBS group"
27 #
28 # inherit emboss
29
30 # @ECLASS-VARIABLE: EBO_DESCRIPTION
31 # @DESCRIPTION:
32 # Should be set. Completes the generic description of the embassy module as follows:
33 #
34 # EMBOSS integrated version of ${EBO_DESCRIPTION},
35 # e.g.
36 # "EMBOSS integrated version of applications from the CBS group"
37 #
38 # Defaults to the upstream name of the module.
39
40 # @ECLASS-VARIABLE: EBO_EAUTORECONF
41 # @DESCRIPTION:
42 # Set to 'no', if you don't want eautoreconf to be run after patching.
43 : ${EBO_EAUTORECONF:=yes}
44
45 # @ECLASS-VARIABLE: EBO_EXTRA_ECONF
46 # @DEFAULT_UNSET
47 # @DESCRIPTION:
48 # Extra config options passed to econf, similar to EXTRA_ECONF.
49
50 case ${EAPI:-0} in
51 4) ;;
52 *) die "this eclass doesn't support < EAPI 4" ;;
53 esac
54
55 inherit autotools eutils
56
57 HOMEPAGE="http://emboss.sourceforge.net/"
58 LICENSE="LGPL-2 GPL-2"
59
60 SLOT="0"
61 IUSE="mysql pdf png postgres static-libs X"
62
63 DEPEND="
64 dev-libs/expat
65 dev-libs/libpcre:3
66 sci-libs/plplot
67 sys-libs/zlib
68 mysql? ( dev-db/mysql )
69 pdf? ( media-libs/libharu )
70 png? ( media-libs/gd[png] )
71 postgres? ( dev-db/postgresql-base )
72 X? ( x11-libs/libXt )"
73 RDEPEND="${DEPEND}"
74
75 if [[ ${PN} == embassy-* ]]; then
76 # The EMBASSY package name, retrieved from the inheriting ebuild's name
77 EN=${PN:8}
78 # The full name and version of the EMBASSY package (excluding the Gentoo
79 # revision number)
80 EF=$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}
81 : ${EBO_DESCRIPTION:=${EN}}
82 DESCRIPTION="EMBOSS integrated version of ${EBO_DESCRIPTION}"
83 SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${EN}-${PV}.tar.gz"
84 DEPEND+=" >=sci-biology/emboss-6.3.1_p4[mysql=,pdf=,png=,postgres=,static-libs=,X=]"
85
86 S="${WORKDIR}"/${EF}
87 fi
88
89 DOCS="AUTHORS ChangeLog NEWS README"
90
91 # @FUNCTION: emboss_src_prepare
92 # @DESCRIPTION:
93 # Does following things
94 #
95 # 1. Patches with "${FILESDIR}"/${PF}.patch, if present
96 # 2. Runs eautoreconf, unless EBO_EAUTORECONF is set to no
97 #
98
99 emboss_src_prepare() {
100 [[ -f ${FILESDIR}/${PF}.patch ]] && epatch "${FILESDIR}"/${PF}.patch
101 [[ ${EBO_EAUTORECONF} == yes ]] && eautoreconf
102 }
103
104 # @FUNCTION: emboss_src_configure
105 # @DESCRIPTION:
106 # runs econf with following options.
107 #
108 # $(use_with X x)
109 # $(use_with png pngdriver)
110 # $(use_with pdf hpdf)
111 # $(use_with mysql mysql)
112 # $(use_with postgres postgresql)
113 # $(use_enable static-libs static)
114 # --enable-large
115 # --without-java
116 # --enable-systemlibs
117 # --docdir="${EPREFIX}/usr/share/doc/${PF}"
118 # ${EBO_EXTRA_ECONF}
119
120 emboss_src_configure() {
121 econf \
122 $(use_with X x) \
123 $(use_with png pngdriver) \
124 $(use_with pdf hpdf) \
125 $(use_with mysql mysql) \
126 $(use_with postgres postgresql) \
127 $(use_enable static-libs static) \
128 --enable-large \
129 --without-java \
130 --enable-systemlibs \
131 --docdir="${EPREFIX}/usr/share/doc/${PF}" \
132 ${EBO_EXTRA_ECONF}
133 }
134
135 EXPORT_FUNCTIONS src_prepare src_configure

  ViewVC Help
Powered by ViewVC 1.1.20