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