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
30 # Should be set. Completes the generic description of the embassy module as follows:
32 # EMBOSS integrated version of ${EBO_DESCRIPTION},
34 # "EMBOSS integrated version of applications from the CBS group"
36 # Defaults to the upstream name of the module.
38 # @ECLASS-VARIABLE: EBO_EXTRA_ECONF
41 # Extra config options passed to econf.
45 *) die "this eclass doesn't support < EAPI 5" ;;
48 inherit autotools-utils eutils flag-o-matic
50 HOMEPAGE="http://emboss.sourceforge.net/"
51 LICENSE="LGPL-2 GPL-2"
54 IUSE="mysql pdf png postgres static-libs X"
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 )"
68 if [[ ${PN} == embassy-* ]]; then
70 # The EMBASSY package name, retrieved from the inheriting ebuild's name
72 # The full name and version of the EMBASSY package (excluding the Gentoo
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=]"
83 # @FUNCTION: emboss_src_prepare
85 # Does the following things
87 # 1. Renames configure.in to configure.ac, if possible
88 # 2. Applies ${PATCHES[@]} and runs autotools via autotools-utils.eclass
91 emboss-r1_src_prepare() {
92 if [[ -e configure.in ]]; then
93 mv configure.{in,ac} || die
96 autotools-utils_src_prepare
99 # @FUNCTION: emboss_src_configure
101 # runs econf with following options.
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)
111 # --enable-systemlibs
114 emboss-r1_src_configure() {
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")
127 [[ ${EMBASSY_PACKAGE} == yes ]] && \
128 append-cppflags "-I${EPREFIX}/usr/include/emboss"
130 autotools-utils_src_configure
133 EXPORT_FUNCTIONS src_prepare src_configure