1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 # @ECLASS: emboss-r1.eclass
7 # sci-biology@gentoo.org
9 # ted.tanberry@gmail.com
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).
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").
24 # EBO_DESCRIPTION="applications from the CBS group"
28 # @ECLASS-VARIABLE: EBO_DESCRIPTION
31 # Should be set. Completes the generic description of the embassy module as follows:
33 # EMBOSS integrated version of ${EBO_DESCRIPTION}, e.g.
35 # "EMBOSS integrated version of applications from the CBS group"
37 # Defaults to the upstream name of the module.
39 # @ECLASS-VARIABLE: EBO_EXTRA_ECONF
42 # Extra config options passed to econf.
46 *) die "this eclass doesn't support < EAPI 5" ;;
49 inherit autotools-utils eutils flag-o-matic
51 HOMEPAGE="http://emboss.sourceforge.net/"
52 LICENSE="LGPL-2 GPL-2"
55 IUSE="mysql pdf png postgres static-libs X"
62 mysql? ( virtual/mysql )
63 pdf? ( media-libs/libharu )
64 png? ( media-libs/gd[png] )
65 postgres? ( dev-db/postgresql:= )
66 X? ( x11-libs/libXt )"
69 if [[ ${PN} == embassy-* ]]; then
71 # The EMBASSY package name, retrieved from the inheriting ebuild's name
73 # The full name and version of the EMBASSY package (excluding the Gentoo
75 EF=$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}
76 : ${EBO_DESCRIPTION:=${EN}}
77 DESCRIPTION="EMBOSS integrated version of ${EBO_DESCRIPTION}"
78 SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${EN}-${PVR}.tar.gz"
79 DEPEND+=" >=sci-biology/emboss-6.6.0[mysql=,pdf=,png=,postgres=,static-libs=,X=]"
84 # @FUNCTION: emboss-r1_src_prepare
86 # Does the following things
88 # 1. Renames configure.in to configure.ac, if possible
89 # 2. Applies ${PATCHES[@]} and runs autotools via autotools-utils.eclass
92 emboss-r1_src_prepare() {
93 if [[ -e configure.in ]]; then
94 mv configure.{in,ac} || die
97 autotools-utils_src_prepare
100 # @FUNCTION: emboss-r1_src_configure
102 # runs econf with following options.
105 # $(use_with png pngdriver)
106 # $(use_with pdf hpdf)
107 # $(use_with mysql mysql)
108 # $(use_with postgres postgresql)
109 # $(use_enable static-libs static)
112 # --enable-systemlibs
115 emboss-r1_src_configure() {
118 $(use_with png pngdriver "${EPREFIX}/usr")
119 $(use_with pdf hpdf "${EPREFIX}/usr")
120 $(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config")
121 $(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config")
128 [[ ${EMBASSY_PACKAGE} == yes ]] && \
129 append-cppflags "-I${EPREFIX}/usr/include/emboss"
131 autotools-utils_src_configure
134 EXPORT_FUNCTIONS src_prepare src_configure