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

Contents of /eclass/emboss-r1.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Mar 28 16:45:24 2015 UTC (3 years, 4 months ago) by jlec
Branch: MAIN
CVS Tags: HEAD
Drop obsolete eclass and add new version, thanks Ted Tanberry for the work

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 # @ECLASS: emboss-r1.eclass
6 # @MAINTAINER:
7 # sci-biology@gentoo.org
8 # jlec@gentoo.org
9 # ted.tanberry@gmail.com
10 # @AUTHOR:
11 # Original author: Author Olivier Fisette <ofisette@gmail.com>
12 # Next gen author: Justin Lecher <jlec@gentoo.org>
13 # Next gen author: Ted Tanberry <ted.tanberry@gmail.com>
14 # @BLURB: Use this to easy install EMBOSS and EMBASSY programs (EMBOSS add-ons).
15 # @DESCRIPTION:
16 # The inheriting ebuild must set at least EAPI=5 and provide EBO_DESCRIPTION before the inherit line.
17 # KEYWORDS should be set. Additionally "(R|P)DEPEND"encies and other standard
18 # ebuild variables can be extended (FOO+=" bar").
19 #
20 # Example:
21 #
22 # EAPI="5"
23 #
24 # EBO_DESCRIPTION="applications from the CBS group"
25 #
26 # inherit emboss-r1
27
28 # @ECLASS-VARIABLE: EBO_DESCRIPTION
29 # @DESCRIPTION:
30 # Should be set. Completes the generic description of the embassy module as follows:
31 #
32 # EMBOSS integrated version of ${EBO_DESCRIPTION},
33 # e.g.
34 # "EMBOSS integrated version of applications from the CBS group"
35 #
36 # Defaults to the upstream name of the module.
37
38 # @ECLASS-VARIABLE: EBO_EXTRA_ECONF
39 # @DEFAULT_UNSET
40 # @DESCRIPTION:
41 # Extra config options passed to econf.
42
43 case ${EAPI:-0} in
44 5) ;;
45 *) die "this eclass doesn't support < EAPI 5" ;;
46 esac
47
48 inherit autotools-utils eutils flag-o-matic
49
50 HOMEPAGE="http://emboss.sourceforge.net/"
51 LICENSE="LGPL-2 GPL-2"
52
53 SLOT="0"
54 IUSE="mysql pdf png postgres static-libs X"
55
56 DEPEND="
57 dev-libs/expat
58 dev-libs/libpcre:3
59 sci-libs/plplot
60 sys-libs/zlib
61 mysql? ( virtual/mysql )
62 pdf? ( media-libs/libharu )
63 png? ( media-libs/gd[png] )
64 postgres? ( dev-db/postgresql:= )
65 X? ( x11-libs/libXt )"
66 RDEPEND="${DEPEND}"
67
68 if [[ ${PN} == embassy-* ]]; then
69 EMBASSY_PACKAGE=yes
70 # The EMBASSY package name, retrieved from the inheriting ebuild's name
71 EN=${PN:8}
72 # The full name and version of the EMBASSY package (excluding the Gentoo
73 # revision number)
74 EF=$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}
75 : ${EBO_DESCRIPTION:=${EN}}
76 DESCRIPTION="EMBOSS integrated version of ${EBO_DESCRIPTION}"
77 SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${EN}-${PVR}.tar.gz"
78 DEPEND+=" >=sci-biology/emboss-6.6.0[mysql=,pdf=,png=,postgres=,static-libs=,X=]"
79
80 S="${WORKDIR}"/${EF}
81 fi
82
83 # @FUNCTION: emboss_src_prepare
84 # @DESCRIPTION:
85 # Does the following things
86 #
87 # 1. Renames configure.in to configure.ac, if possible
88 # 2. Applies ${PATCHES[@]} and runs autotools via autotools-utils.eclass
89 #
90
91 emboss-r1_src_prepare() {
92 if [[ -e configure.in ]]; then
93 mv configure.{in,ac} || die
94 fi
95
96 autotools-utils_src_prepare
97 }
98
99 # @FUNCTION: emboss_src_configure
100 # @DESCRIPTION:
101 # runs econf with following options.
102 #
103 # $(use_with X x)
104 # $(use_with png pngdriver)
105 # $(use_with pdf hpdf)
106 # $(use_with mysql mysql)
107 # $(use_with postgres postgresql)
108 # $(use_enable static-libs static)
109 # --enable-large
110 # --without-java
111 # --enable-systemlibs
112 # ${EBO_EXTRA_ECONF}
113
114 emboss-r1_src_configure() {
115 local myeconfargs=(
116 $(use_with X x)
117 $(use_with png pngdriver "${EPREFIX}/usr")
118 $(use_with pdf hpdf "${EPREFIX}/usr")
119 $(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config")
120 $(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config")
121 --enable-large
122 --without-java
123 --enable-systemlibs
124 ${EBO_EXTRA_ECONF}
125 )
126
127 [[ ${EMBASSY_PACKAGE} == yes ]] && \
128 append-cppflags "-I${EPREFIX}/usr/include/emboss"
129
130 autotools-utils_src_configure
131 }
132
133 EXPORT_FUNCTIONS src_prepare src_configure

  ViewVC Help
Powered by ViewVC 1.1.20