summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-biology/emboss
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-biology/emboss')
-rw-r--r--sci-biology/emboss/Manifest4
-rw-r--r--sci-biology/emboss/emboss-6.0.1.ebuild112
-rw-r--r--sci-biology/emboss/emboss-6.3.1_p4-r1.ebuild117
-rw-r--r--sci-biology/emboss/emboss-6.6.0.ebuild61
-rw-r--r--sci-biology/emboss/files/22emboss4
-rw-r--r--sci-biology/emboss/files/6.3.1_p4-unbundle-libs.patch600
-rw-r--r--sci-biology/emboss/files/README.Gentoo28
-rw-r--r--sci-biology/emboss/files/README.gentoo34
-rw-r--r--sci-biology/emboss/files/emboss-5.0.0-as-needed.patch24
-rw-r--r--sci-biology/emboss/files/emboss-6.3.1_p4-r1_plcol.patch112
-rw-r--r--sci-biology/emboss/files/emboss-6.6.0_FORTIFY_SOURCE-fix.patch11
-rw-r--r--sci-biology/emboss/files/emboss-6.6.0_fix-build-system.patch411
-rw-r--r--sci-biology/emboss/files/emboss-6.6.0_plplot-declarations.patch61
-rw-r--r--sci-biology/emboss/files/emboss-6.6.0_qa-implicit-declarations.patch74
-rw-r--r--sci-biology/emboss/files/emboss-README.Gentoo-134
-rw-r--r--sci-biology/emboss/files/emboss-README.Gentoo-234
-rw-r--r--sci-biology/emboss/metadata.xml18
17 files changed, 1739 insertions, 0 deletions
diff --git a/sci-biology/emboss/Manifest b/sci-biology/emboss/Manifest
new file mode 100644
index 000000000000..c364f2c77e86
--- /dev/null
+++ b/sci-biology/emboss/Manifest
@@ -0,0 +1,4 @@
+DIST EMBOSS-6.0.1.tar.gz 20204153 SHA256 3e352902aa9dab88bf486457ff23794f19398dfc6b550c4bf175dfcad34c233d
+DIST EMBOSS-6.3.1.tar.gz 23572243 SHA256 4f3290600a970c2a23a7e47f884d1fc8156ec40538f7191a6e83e23680d27a8d
+DIST EMBOSS-6.6.0.tar.gz 117962028 SHA256 7184a763d39ad96bb598bfd531628a34aa53e474db9e7cac4416c2a40ab10c6e SHA512 2d28a03381f7dc98d205aa50202fbbac02ad218fc775d86579d310296be124403623484b1907154d915f15cd32a9f8cf16ecfaa6c4a28b362e24dc8e6380b75a WHIRLPOOL 25241e865b1ad4e5459f84a2b0def7cd00a6e2904db714838dfe0533e01f8373cfdd4c78df225f9d2a77ead4cb9998791bd19f46b32e220810ad950fa288b9fe
+DIST emboss-6.3.1_p4.patch.gz 4070 SHA256 61d1b62e3148541d496103711db6526ba76488a0899af2c98264b03bf8d6e24c
diff --git a/sci-biology/emboss/emboss-6.0.1.ebuild b/sci-biology/emboss/emboss-6.0.1.ebuild
new file mode 100644
index 000000000000..0edfd7a639d0
--- /dev/null
+++ b/sci-biology/emboss/emboss-6.0.1.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=1
+
+inherit eutils
+
+DESCRIPTION="The European Molecular Biology Open Software Suite - A sequence analysis package"
+HOMEPAGE="http://emboss.sourceforge.net/"
+SRC_URI="ftp://${PN}.open-bio.org/pub/EMBOSS/old/${PV}/EMBOSS-${PV}.tar.gz"
+LICENSE="GPL-2 LGPL-2"
+
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="X png minimal"
+
+DEPEND="
+ X? ( x11-libs/libXt )
+ png? (
+ sys-libs/zlib
+ media-libs/libpng
+ media-libs/gd
+ )
+ !minimal? (
+ sci-biology/primer3
+ sci-biology/clustalw
+ )"
+
+RDEPEND="${DEPEND}
+ !sys-devel/cons"
+
+PDEPEND="
+ !minimal? (
+ sci-biology/aaindex
+ sci-biology/cutg
+ sci-biology/prints
+ sci-biology/prosite
+ sci-biology/rebase
+ sci-biology/transfac
+ )"
+
+S="${WORKDIR}/EMBOSS-${PV}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-5.0.0-as-needed.patch
+
+ local link_string="$(pkg-config --libs x11)"
+ if use png; then
+ link_string="${link_string} -lgd $(pkg-config --libs libpng)"
+ fi
+ sed -e "s:PATCH_PLPLOT:${link_string}:" -i plplot/Makefile.in \
+ || die "Failed to patch ajax Makefile"
+}
+
+src_compile() {
+ local myconf
+ myconf="--includedir=${D}/usr/include/emboss"
+ use X || myconf="${EXTRA_CONF} --without-x"
+ use png || myconf="${EXTRA_CONF} --without-pngdriver"
+
+ econf ${myconf}
+ # Do not install the JEMBOSS component (the --without-java configure option
+ # does not work). JEMBOSS will eventually be available as a separate package.
+ sed -i -e "s/SUBDIRS = plplot ajax nucleus emboss test doc jemboss/SUBDIRS = plplot ajax nucleus emboss test doc/" \
+ Makefile || die
+ emake || die
+}
+
+src_install() {
+ einstall || die "Failed to install program files."
+
+ dodoc AUTHORS ChangeLog FAQ NEWS README THANKS \
+ || die "Failed to install documentation."
+ newdoc "${FILESDIR}"/${PN}-README.Gentoo-1 README.Gentoo \
+ || die "Failed to install Gentoo readme file."
+
+ # Install env file for setting libplplot and acd files path.
+ cat <<- EOF > 22emboss
+ # plplot libs dir
+ PLPLOT_LIB="/usr/share/EMBOSS/"
+ # ACD files location
+ EMBOSS_ACDROOT="/usr/share/EMBOSS/acd"
+ EOF
+ doenvd 22emboss || die "Failed to install environment file."
+
+ # Symlink preinstalled docs to "/usr/share/doc".
+ dosym /usr/share/EMBOSS/doc/manuals /usr/share/doc/${PF}/manuals || die
+ dosym /usr/share/EMBOSS/doc/programs /usr/share/doc/${PF}/programs || die
+ dosym /usr/share/EMBOSS/doc/tutorials /usr/share/doc/${PF}/tutorials || die
+ dosym /usr/share/EMBOSS/doc/html /usr/share/doc/${PF}/html || die
+
+ # Clashes #330507
+ mv "${D}"/usr/bin/{digest,pepdigest} || die
+
+ # Remove useless dummy files from the image.
+ find emboss/data -name dummyfile -delete || die "Failed to remove dummy files."
+
+ # Move the provided codon files to a different directory. This will avoid
+ # user confusion and file collisions on case-insensitive file systems (see
+ # bug #115446). This change is documented in "README.Gentoo".
+ mv "${D}"/usr/share/EMBOSS/data/CODONS{,.orig} || \
+ die "Failed to move CODON directory."
+
+ # Move the provided restriction enzyme prototypes file to a different name.
+ # This avoids file collisions with versions of rebase that install their
+ # own enzyme prototypes file (see bug #118832).
+ mv "${D}"/usr/share/EMBOSS/data/embossre.equ{,.orig} || \
+ die "Failed to move enzyme equivalence file."
+}
diff --git a/sci-biology/emboss/emboss-6.3.1_p4-r1.ebuild b/sci-biology/emboss/emboss-6.3.1_p4-r1.ebuild
new file mode 100644
index 000000000000..e8baba4c7752
--- /dev/null
+++ b/sci-biology/emboss/emboss-6.3.1_p4-r1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils
+
+MY_PATCH="4"
+
+DESCRIPTION="The European Molecular Biology Open Software Suite - A sequence analysis package"
+HOMEPAGE="http://emboss.sourceforge.net/"
+SRC_URI="
+ ftp://${PN}.open-bio.org/pub/EMBOSS/old/${PV}/EMBOSS-${PV/_p${MY_PATCH}}.tar.gz
+ ftp://${PN}.open-bio.org/pub/EMBOSS/old/${PV}/fixes/patches/patch-1-${MY_PATCH}.gz -> ${P}.patch.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="doc minimal mysql pdf png postgres static-libs X"
+
+DEPEND="
+ dev-libs/expat
+ dev-libs/libpcre:3
+ sci-libs/plplot
+ sys-libs/zlib
+ mysql? ( virtual/mysql )
+ pdf? ( media-libs/libharu )
+ png? (
+ sys-libs/zlib
+ media-libs/libpng
+ media-libs/gd
+ )
+ postgres? ( dev-db/postgresql )
+ !minimal? (
+ sci-biology/primer3
+ sci-biology/clustalw
+ )
+ X? ( x11-libs/libXt )"
+RDEPEND="${DEPEND}
+ !sys-devel/cons"
+PDEPEND="
+ !minimal? (
+ sci-biology/aaindex
+ sci-biology/cutg
+ sci-biology/prints
+ sci-biology/prosite
+ sci-biology/rebase
+ sci-biology/transfac
+ )"
+
+S="${WORKDIR}/EMBOSS-${PV/_p${MY_PATCH}}"
+
+src_prepare() {
+ epatch "${WORKDIR}"/${P}.patch
+ epatch \
+ "${FILESDIR}"/${PV}-unbundle-libs.patch \
+ "${FILESDIR}/${PF}_plcol.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with X x) \
+ $(use_with png pngdriver "${EPREFIX}/usr") \
+ $(use_with doc docroot "${EPREFIX}/usr") \
+ $(use_with pdf hpdf "${EPREFIX}/usr") \
+ $(use_with mysql mysql "${EPREFIX}/usr/bin/mysql_config") \
+ $(use_with postgres postgresql "${EPREFIX}/usr/bin/pg_config") \
+ $(use_enable amd64 64) \
+ $(use_enable static-libs static) \
+ --without-java \
+ --enable-large \
+ --enable-systemlibs \
+ --includedir="${ED}/usr/include/emboss"
+}
+
+src_install() {
+ einstall || die "Failed to install program files."
+
+ dodoc AUTHORS ChangeLog FAQ NEWS README THANKS
+ sed "s:EPREFIX:${EPREFIX}:g" "${FILESDIR}"/${PN}-README.Gentoo-2 > README.Gentoo && \
+ dodoc README.Gentoo
+
+ # Install env file for setting libplplot and acd files path.
+ cat <<- EOF > 22emboss
+ # plplot libs dir
+ PLPLOT_LIB="${EPREFIX}/usr/share/EMBOSS/"
+ # ACD files location
+ EMBOSS_ACDROOT="${EPREFIX}/usr/share/EMBOSS/acd"
+ EOF
+ doenvd 22emboss
+
+ # Symlink preinstalled docs to "/usr/share/doc".
+ dosym /usr/share/EMBOSS/doc/manuals /usr/share/doc/${PF}/manuals
+ dosym /usr/share/EMBOSS/doc/programs /usr/share/doc/${PF}/programs
+ dosym /usr/share/EMBOSS/doc/tutorials /usr/share/doc/${PF}/tutorials
+ dosym /usr/share/EMBOSS/doc/html /usr/share/doc/${PF}/html
+
+ # Clashes #330507
+ mv "${ED}"/usr/bin/{digest,pepdigest} || die
+
+ # Remove useless dummy files from the image.
+ find emboss/data -name dummyfile -delete || die "Failed to remove dummy files."
+
+ # Move the provided codon files to a different directory. This will avoid
+ # user confusion and file collisions on case-insensitive file systems (see
+ # bug #115446). This change is documented in "README.Gentoo".
+ mv "${ED}"/usr/share/EMBOSS/data/CODONS{,.orig} || \
+ die "Failed to move CODON directory."
+
+ # Move the provided restriction enzyme prototypes file to a different name.
+ # This avoids file collisions with versions of rebase that install their
+ # own enzyme prototypes file (see bug #118832).
+ mv "${ED}"/usr/share/EMBOSS/data/embossre.equ{,.orig} || \
+ die "Failed to move enzyme equivalence file."
+}
diff --git a/sci-biology/emboss/emboss-6.6.0.ebuild b/sci-biology/emboss/emboss-6.6.0.ebuild
new file mode 100644
index 000000000000..22d650f1107a
--- /dev/null
+++ b/sci-biology/emboss/emboss-6.6.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+inherit autotools-utils emboss-r1 eutils readme.gentoo
+
+DESCRIPTION="The European Molecular Biology Open Software Suite - A sequence analysis package"
+SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-${PV}.tar.gz"
+
+KEYWORDS="~amd64 ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE+=" minimal"
+LICENSE+=" Apache-2.0 GPL-3+ CC-BY-3.0"
+
+RDEPEND+=" !sys-devel/cons"
+PDEPEND+="
+ !minimal? (
+ sci-biology/aaindex
+ sci-biology/cutg
+ sci-biology/primer3
+ sci-biology/prints
+ sci-biology/prosite
+ sci-biology/rebase
+ )"
+
+S="${WORKDIR}"/EMBOSS-${PV}
+
+DOCS=( ChangeLog AUTHORS NEWS THANKS FAQ )
+
+PATCHES=(
+ "${FILESDIR}"/${P}_fix-build-system.patch
+ "${FILESDIR}"/${P}_FORTIFY_SOURCE-fix.patch
+ "${FILESDIR}"/${P}_plplot-declarations.patch
+ "${FILESDIR}"/${P}_qa-implicit-declarations.patch
+)
+
+src_install() {
+ # Use autotools-utils_* to remove useless *.la files
+ autotools-utils_src_install
+
+ readme.gentoo_create_doc
+
+ # Install env file for setting libplplot and acd files path.
+ cat > 22emboss <<- EOF
+ # ACD files location
+ EMBOSS_ACDROOT="${EPREFIX}/usr/share/EMBOSS/acd"
+ EMBOSS_DATA="${EPREFIX}/usr/share/EMBOSS/data"
+ EOF
+ doenvd 22emboss
+
+ # Remove useless dummy files
+ find "${ED}"/usr/share/EMBOSS -name dummyfile -delete || die "Failed to remove dummy files."
+
+ # Move the provided codon files to a different directory. This will avoid
+ # user confusion and file collisions on case-insensitive file systems (see
+ # bug #115446). This change is documented in "README.gentoo".
+ mv "${ED}"/usr/share/EMBOSS/data/CODONS{,.orig} || \
+ die "Failed to move CODON directory."
+}
diff --git a/sci-biology/emboss/files/22emboss b/sci-biology/emboss/files/22emboss
new file mode 100644
index 000000000000..177643ced11f
--- /dev/null
+++ b/sci-biology/emboss/files/22emboss
@@ -0,0 +1,4 @@
+# plplot libs dir
+PLPLOT_LIB="/usr/share/EMBOSS/"
+# ACD files location
+EMBOSS_ACDROOT="/usr/share/EMBOSS/acd"
diff --git a/sci-biology/emboss/files/6.3.1_p4-unbundle-libs.patch b/sci-biology/emboss/files/6.3.1_p4-unbundle-libs.patch
new file mode 100644
index 000000000000..5e463744a739
--- /dev/null
+++ b/sci-biology/emboss/files/6.3.1_p4-unbundle-libs.patch
@@ -0,0 +1,600 @@
+diff --git a/Makefile.am b/Makefile.am
+index 4fe2ed1..7f3a95f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -5,12 +5,21 @@ ACLOCAL_AMFLAGS = -I m4
+
+ AUTOMAKE_OPTIONS = gnits
+
+-SUBDIRS = plplot ajax nucleus emboss test doc jemboss
++if !ESYSTEMLIBS
++EXTRA_DIRS = plplot
++endif
++
++if GJEMBOSS
++JEMBOSS_DIR = jemboss
++endif
++
++SUBDIRS = $(EXTRA_DIRS) ajax nucleus emboss test doc $(JEMBOSS_DIR)
++DIST_SUBDIRS = $(EXTRA_DIRS) ajax nucleus emboss test doc $(JEMBOSS_DIR)
+
+ # AJAX_FIXED_ROOT = \"`pwd`/emboss/acd\"
+
+ # files with nonstandard names in this directory
+-EXTRA_DIST = COMPAT LICENSE KNOWN_BUGS ONEWS PROBLEMS FAQ ChangeLog depcomp ltmain.sh
++EXTRA_DIST = COMPAT KNOWN_BUGS ONEWS PROBLEMS FAQ ChangeLog depcomp ltmain.sh
+
+ # tar to pick up the other directories
+ # then remove any CVS subdirectories
+diff --git a/README.fixes b/README.fixes
+new file mode 100644
+index 0000000..3c56d79
+--- /dev/null
++++ b/README.fixes
+@@ -0,0 +1,9 @@
++The files in this directory are bugfix replacements for files in
++the EMBOSS-6.3.1 distribution. Just drop the replacement files in
++the location shown and redo the 'make install.'
++
++Fix 1. EMBOSS-6.3.1/configure
++ EMBOSS-6.3.1/m4/mysql.m4
++
++21 Jul 2010: Addresses a problem whereby, in some circumstances, inclusion of
++ hpdf support prevented inclusion of MySQL support.
+diff --git a/ajax/Makefile.am b/ajax/Makefile.am
+index 4a44f6f..cf27ff8 100644
+--- a/ajax/Makefile.am
++++ b/ajax/Makefile.am
+@@ -1,6 +1,6 @@
+ ## Process this file with automake to produce Makefile.in
+ if !ESYSTEMLIBS
+-EXTRA_DIRS = expat zlib
++EXTRA_DIRS = pcre expat zlib
+ endif
+
+-SUBDIRS = pcre $(EXTRA_DIRS) core graphics ensembl ajaxdb acd
++SUBDIRS = $(EXTRA_DIRS) core graphics ensembl ajaxdb acd
+diff --git a/ajax/acd/Makefile.am b/ajax/acd/Makefile.am
+index 02bcaa7..368ddfe 100644
+--- a/ajax/acd/Makefile.am
++++ b/ajax/acd/Makefile.am
+@@ -13,10 +13,13 @@ CYGWIN_LDACD = -L../../plplot -L../pcre -L../expat -L../zlib -L../core \
+ endif
+
+ if !ESYSTEMLIBS
+-EXTRA_INCLUDES = -I$(top_srcdir)/ajax/expat -I$(top_srcdir)/ajax/zlib
++EXTRA_INCLUDES = -I$(top_srcdir)/ajax/expat -I$(top_srcdir)/ajax/zlib \
++-I$(top_srcdir)/plplot -I$(top_srcdir)/ajax/pcre
++else
++EXTRA_INCLUDES = $(PLPLOT_CFLAGS)
+ endif
+
+-INCLUDES = -I$(top_srcdir)/plplot -I$(top_srcdir)/ajax/pcre \
++INCLUDES = \
+ $(EXTRA_INCLUDES) \
+ -I$(top_srcdir)/ajax/core \
+ -I$(top_srcdir)/ajax/graphics \
+@@ -38,3 +41,4 @@ LINKFLAGS = $(VERS_INF)
+ endif
+
+ libacd_la_LDFLAGS = $(LINKFLAGS)
++libacd_la_LIBADD = ../core/libajax.la ../graphics/libajaxg.la ../ajaxdb/libajaxdb.la
+diff --git a/ajax/ajaxdb/Makefile.am b/ajax/ajaxdb/Makefile.am
+index da57727..857ca5f 100644
+--- a/ajax/ajaxdb/Makefile.am
++++ b/ajax/ajaxdb/Makefile.am
+@@ -13,11 +13,12 @@ CYGWIN_LDAJAXDB = -L../../plplot -L../pcre -L../expat -L../zlib -L../core \
+ endif
+
+ if !ESYSTEMLIBS
+-EXTRA_INCLUDES = -I$(top_srcdir)/ajax/expat -I$(top_srcdir)/ajax/zlib
++EXTRA_INCLUDES = -I$(top_srcdir)/ajax/expat -I$(top_srcdir)/ajax/zlib \
++-I$(top_srcdir)/plplot -I$(top_srcdir)/ajax/pcre
+ endif
+
+
+-INCLUDES = -I$(top_srcdir)/plplot -I$(top_srcdir)/ajax/pcre \
++INCLUDES = \
+ $(EXTRA_INCLUDES) \
+ -I$(top_srcdir)/ajax/core -I$(top_srcdir)/ajax/ensembl
+
+@@ -37,3 +38,4 @@ LINKFLAGS = $(VERS_INF)
+ endif
+
+ libajaxdb_la_LDFLAGS = $(LINKFLAGS)
++libajaxdb_la_LIBADD = ../core/libajax.la ../ensembl/libensembl.la
+diff --git a/ajax/core/Makefile.am b/ajax/core/Makefile.am
+index af27cb0..8fa4a3a 100644
+--- a/ajax/core/Makefile.am
++++ b/ajax/core/Makefile.am
+@@ -12,13 +12,18 @@ CYGWIN_LDAJAX = -L../../plplot -L../expat -L../pcre -L../zlib \
+ endif
+
+ if !ESYSTEMLIBS
+-EXTRA_INCLUDES = -I$(top_srcdir)/ajax/expat -I$(top_srcdir)/ajax/zlib
++EXTRA_INCLUDES = -I$(top_srcdir)/ajax/expat -I$(top_srcdir)/ajax/zlib \
++-I$(top_srcdir)/plplot -I$(top_srcdir)/ajax/pcre
++else
++EXTRA_LIBS = -lexpat -lpcre
+ endif
+
++EXTRA_DIST = ajax-pcre-config.h.in
++DISTCLEAN = ajax-pcre-config.h
+
+ INCLUDES = -DAJAX_FIXED_ROOT=$(AJAX_FIXED_ROOT) \
+ -DAJAX_SYSTEM="$(AJAX_SYSTEM)" -DPREFIX=\"$(prefix)\" \
+--I$(top_srcdir)/plplot -I$(top_srcdir)/ajax/pcre $(EXTRA_INCLUDES)
++$(EXTRA_INCLUDES) $(POSTGRESQL_CFLAGS) $(MYSQL_CFLAGS)
+
+ AJAXSRC = ajalign.c ajarr.c ajassert.c \
+ ajbase.c ajcall.c ajcod.c \
+@@ -44,7 +49,7 @@ ajindex.h ajjava.h ajlist.h \
+ ajmath.h ajmatrices.h ajmem.h ajmess.h \
+ ajnam.h ajnexus.h ajobo.h \
+ ajpat.h ajpdb.h ajpdbio.h ajphylo.h \
+-ajrange.h ajreg.h ajreport.h ajresource.h \
++ajrange.h ajreg.h ajax-pcre-config.h ajreport.h ajresource.h \
+ ajseq.h ajseqabi.h ajseqbam.h ajseqdata.h ajseqread.h ajseqtype.h ajseqwrite.h \
+ ajsort.h ajsql.h ajstr.h ajsys.h \
+ ajtable.h ajtax.h ajtime.h ajtranslate.h ajtree.h ajutil.h ajvector.h
+@@ -61,3 +66,4 @@ LINKFLAGS = $(VERS_INF)
+ endif
+
+ libajax_la_LDFLAGS = $(LINKFLAGS)
++libajax_la_LIBADD = $(EXTRA_LIBS) $(POSTGRESQL_LDFLAGS) $(MYSQL_LDFLAGS)
+diff --git a/ajax/core/ajax-pcre-config.h.in b/ajax/core/ajax-pcre-config.h.in
+new file mode 100644
+index 0000000..b09e4e6
+--- /dev/null
++++ b/ajax/core/ajax-pcre-config.h.in
+@@ -0,0 +1 @@
++@DEFINE_USE_SYSTEM_PCRE@ AJAX_USE_SYSTEM_PCRE
+diff --git a/ajax/core/ajreg.h b/ajax/core/ajreg.h
+index 06793be..659f462 100644
+--- a/ajax/core/ajreg.h
++++ b/ajax/core/ajreg.h
+@@ -16,9 +16,14 @@ extern "C"
+ #define ajreg_h
+
+ #include "ajax.h"
++#include "ajax-pcre-config.h"
++#ifndef AJAX_USE_SYSTEM_PCRE
+ #include "pcre_config.h"
+ #include "pcre_internal.h"
+ #include "pcreposix.h"
++#else
++#include <pcre.h>
++#endif
+
+ #define AJREG_OVECSIZE 30
+
+@@ -41,7 +46,11 @@ extern "C"
+ ******************************************************************************/
+
+ typedef struct AjSRegexp {
++#ifndef AJAX_USE_SYSTEM_PCRE
+ real_pcre *pcre;
++#else
++ pcre *pcre;
++#endif
+ pcre_extra *extra;
+ int *ovector;
+ const char* orig;
+diff --git a/ajax/ensembl/Makefile.am b/ajax/ensembl/Makefile.am
+index ca33a84..87e51bd 100644
+--- a/ajax/ensembl/Makefile.am
++++ b/ajax/ensembl/Makefile.am
+@@ -10,12 +10,13 @@ CYGWIN_LDENSEMBL = -L../../plplot -L../expat -L../pcre -L../core -lajax -leplplo
+ endif
+
+ if !ESYSTEMLIBS
+-EXTRA_INCLUDES = -I$(top_srcdir)/ajax/expat
++EXTRA_INCLUDES = -I$(top_srcdir)/ajax/expat \
++-I$(top_srcdir)/plplot -I$(top_srcdir)/ajax/pcre
+ endif
+
+
+-INCLUDES = -I$(top_srcdir)/plplot $(EXTRA_INCLUDES) \
+--I$(top_srcdir)/ajax/pcre -I$(top_srcdir)/ajax/core
++INCLUDES = $(EXTRA_INCLUDES) \
++-I$(top_srcdir)/ajax/core
+
+ ENSEMBLSRC = ensanalysis.c ensassembly.c ensassemblyexception.c \
+ ensassemblymapper.c ensattribute.c ensbaseadaptor.c enscache.c \
+@@ -56,3 +57,4 @@ LINKFLAGS = $(VERS_INF)
+ endif
+
+ libensembl_la_LDFLAGS = $(LINKFLAGS)
++libensembl_la_LIBADD = ../core/libajax.la
+diff --git a/ajax/graphics/Makefile.am b/ajax/graphics/Makefile.am
+index ab45afc..f61c605 100644
+--- a/ajax/graphics/Makefile.am
++++ b/ajax/graphics/Makefile.am
+@@ -10,11 +10,15 @@ CYGWIN_LDAJAXG = -L../../plplot -L../expat -L../pcre -L../core -lajax -leplplot
+ endif
+
+ if !ESYSTEMLIBS
+-EXTRA_INCLUDES = -I$(top_srcdir)/ajax/expat
++EXTRA_INCLUDES = -I$(top_srcdir)/ajax/expat \
++-I$(top_srcdir)/plplot -I$(top_srcdir)/ajax/pcre
++else
++EXTRA_INCLUDES = $(PLPLOT_CFLAGS) -DUSE_PLXSFNAM_SHIM
++EXTRA_LIBS = $(PLPLOT_LIBS)
+ endif
+
+
+-INCLUDES = -I$(top_srcdir)/plplot -I$(top_srcdir)/ajax/pcre \
++INCLUDES = \
+ $(EXTRA_INCLUDES) -I$(top_srcdir)/ajax/core
+
+ AJAXGSRC = ajgraph.c ajhist.c
+@@ -32,3 +36,4 @@ LINKFLAGS = $(VERS_INF)
+ endif
+
+ libajaxg_la_LDFLAGS = $(LINKFLAGS)
++libajaxg_la_LIBADD = ../core/libajax.la $(EXTRA_LIBS)
+diff --git a/ajax/graphics/ajgraph.c b/ajax/graphics/ajgraph.c
+index 25e75e4..60f2743 100644
+--- a/ajax/graphics/ajgraph.c
++++ b/ajax/graphics/ajgraph.c
+@@ -34,10 +34,8 @@
+ #include <float.h>
+ #define AZ 28
+
+-
+ #include "plplotP.h"
+
+-
+ static void GraphArray(ajuint numofpoints,
+ float *x, float *y);
+ static void GraphArrayGaps(ajuint numofpoints,
+@@ -1049,13 +1047,26 @@ static void GraphDefCharSize(float size)
+ ** @@
+ ******************************************************************************/
+
++#define _GNU_SOURCE
++#include <stdio.h>
++
+ static void GraphSetName(const AjPGraph thys,
+ const AjPStr txt, const char *ext)
+ {
+ if(!thys->ready)
+ {
++#ifdef USE_PLXSFNAM_SHIM
++ char *fullname;
++#endif
+ ajDebug("=g= plxsfnam ('%S', '%s')\n", txt, ext);
++#ifdef USE_PLXSFNAM_SHIM
++ fullname = asprintf(fullname,"%s%s", ajStrGetPtr(txt), ext);
++ ajDebug("=g= plsfnam ('%S') instead\n", fullname);
++ plsfnam(fullname);
++ free(fullname);
++#else
+ plxsfnam(ajStrGetPtr(txt), ext);
++#endif
+ ajStrAssignS(&graphBasename, txt);
+ ajStrAssignC(&graphExtension, ext);
+ if(ajStrGetCharFirst(graphExtension) == '.')
+diff --git a/configure.in b/configure.in
+index ddb4f81..3f4fe5e 100644
+--- a/configure.in
++++ b/configure.in
+@@ -235,15 +235,6 @@ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
+
+-dnl Intel MacOSX 10.6 puts X11 in a non-standard place
+-if test "${with_x}" != "no" ; then
+-if test "`uname -a | grep Darwin`"; then
+-OSXX=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'`
+-if test ${OSXX} '>' '10.4'; then
+-CFLAGS="$CFLAGS -I/usr/X11/include -L/usr/X11/lib"
+-fi
+-fi
+-fi
+
+ # Checks for header files.
+ #as# AC_PATH_X
+@@ -292,9 +283,6 @@ AC_CHECK_FUNCS(memmove)
+ #as# select socket sqrt strchr strcspn strdup strerror strpbrk \
+ #as# strrchr strspn strstr strtol])
+
+-if test "${with_x}" != "no" ; then
+-LF_EMBOSS_PATH_XLIB
+-fi
+
+ dnl Library checks
+ AC_CHECK_LIB(c, socket, LIBS="$LIBS" , LIBS="$LIBS -lsocket")
+@@ -316,14 +304,16 @@ CHECK_PNGDRIVER
+ CHECK_AUTH
+ CHECK_AMD64
+
++AM_CONDITIONAL(GJEMBOSS, test "$JAVA_OK" = "yes")
++
+ AX_LIB_MYSQL
+ AX_LIB_POSTGRESQL
+
+ CFLAGS="$CFLAGS $MYSQL_CFLAGS"
+ LDFLAGS="$LDFLAGS $MYSQL_LDFLAGS"
+
+-CFLAGS="$CFLAGS $POSTGRESQL_CFLAGS"
+-LDFLAGS="$LDFLAGS $POSTGRESQL_LDFLAGS"
++CFLAGS="$POSTGRESQL_CFLAGS $CFLAGS"
++LDFLAGS="$POSTGRESQL_LDFLAGS $LDFLAGS"
+
+
+ dnl Check for 'ant' for packaging Jemboss and export result
+@@ -443,13 +433,36 @@ fi
+
+ dnl Test if --enable-systemlibs given
+ have_systemlibs=no
++DEFINE_USE_SYSTEM_PCRE="#undef"
+ AC_ARG_ENABLE(systemlibs,
+ AS_HELP_STRING([--enable-systemlibs], [utility for RPM/dpkg bundles]))
++AC_MSG_CHECKING(for systemlib usage)
+ if test "${enable_systemlibs}" = "yes" ; then
+ have_systemlibs=yes
++ DEFINE_USE_SYSTEM_PCRE="#define"
++ PKG_CHECK_MODULES([PLPLOT], [plplotd])
++ PKG_CHECK_MODULES([ZLIB], [zlib])
++else
++ dnl X11 is only used by plplot
++ dnl Intel MacOSX 10.6 puts X11 in a non-standard place
++ if test "${with_x}" != "no" ; then
++ if test "`uname -a | grep Darwin`"; then
++ OSXX=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'`
++ if test ${OSXX} '>' '10.4'; then
++ CFLAGS="$CFLAGS -I/usr/X11/include -L/usr/X11/lib"
++ fi
++ fi
++ fi
++ if test "${with_x}" != "no" ; then
++ LF_EMBOSS_PATH_XLIB
++ fi
++ AC_MSG_NOTICE(USING bundled LIBS)
+ fi
+ AM_CONDITIONAL(ESYSTEMLIBS, test "$have_systemlibs" = "yes")
+ AC_SUBST(ESYSTEMLIBS)
++AC_SUBST(DEFINE_USE_SYSTEM_PCRE)
++AC_SUBST(PLPLOT_CFLAGS)
++AC_SUBST(PLPLOT_LIBS)
+
+
+
+@@ -457,7 +470,6 @@ AC_SUBST(ESYSTEMLIBS)
+
+ dnl Test if purify exists and if --enable-purify given if so
+ dnl set "-g"
+-
+ AC_MSG_CHECKING(for purify)
+ dnl if(purify -version) < /dev/null > /dev/null 2>&1; then
+ AC_ARG_ENABLE(purify,
+@@ -683,6 +695,7 @@ CHECK_THREADS
+
+
+ AC_OUTPUT([plplot/Makefile plplot/lib/Makefile nucleus/Makefile ajax/Makefile
++ajax/core/ajax-pcre-config.h
+ ajax/pcre/Makefile ajax/expat/Makefile ajax/zlib/Makefile ajax/core/Makefile
+ ajax/graphics/Makefile ajax/ensembl/Makefile ajax/ajaxdb/Makefile
+ ajax/acd/Makefile
+diff --git a/emboss/Makefile.am b/emboss/Makefile.am
+index 0820517..a0257b2 100644
+--- a/emboss/Makefile.am
++++ b/emboss/Makefile.am
+@@ -79,14 +79,17 @@ wordcount wordfinder wordmatch wossname \
+ yank
+
+ if !ESYSTEMLIBS
+-EXTRA_INCLUDES = -I$(top_srcdir)/ajax/expat -I$(top_srcdir)/ajax/zlib
++EXTRA_INCLUDES = -I$(top_srcdir)/ajax/expat -I$(top_srcdir)/ajax/zlib \
++-I$(top_srcdir)/plplot -I$(top_srcdir)/ajax/pcre
++else
++EXTRA_INCLUDES = $(PLPLOT_CFLAGS)
+ endif
+
+-INCLUDES = -I$(top_srcdir)/nucleus -I$(top_srcdir)/ajax/pcre \
++INCLUDES = -I$(top_srcdir)/nucleus \
+ $(EXTRA_INCLUDES) \
+ -I$(top_srcdir)/ajax/core -I$(top_srcdir)/ajax/graphics \
+ -I$(top_srcdir)/ajax/ensembl -I$(top_srcdir)/ajax/ajaxdb \
+- -I$(top_srcdir)/ajax/acd -I$(top_srcdir)/plplot
++ -I$(top_srcdir)/ajax/acd
+
+
+ aaindexextract_SOURCES = aaindexextract.c
+@@ -319,7 +322,7 @@ testplot_SOURCES = testplot.c
+ treetypedisplay_SOURCES = treetypedisplay.c
+
+ if !ESYSTEMLIBS
+-EXTRA_LDS = ../ajax/zlib/libezlib.la ../ajax/expat/libeexpat.la
++EXTRA_LDS = ../ajax/zlib/libezlib.la ../ajax/expat/libeexpat.la ../plplot/libeplplot.la ../ajax/pcre/libepcre.la
+ endif
+
+
+@@ -327,7 +330,6 @@ LDADD = ../nucleus/libnucleus.la ../ajax/acd/libacd.la \
+ ../ajax/ajaxdb/libajaxdb.la ../ajax/ensembl/libensembl.la \
+ ../ajax/graphics/libajaxg.la ../ajax/core/libajax.la \
+ $(EXTRA_LDS) \
+- ../ajax/pcre/libepcre.la ../plplot/libeplplot.la \
+ $(XLIB)
+
+ pkgdata_DATA = emboss.default.template
+diff --git a/m4/mysql.m4 b/m4/mysql.m4
+index fe413af..ebea25c 100644
+--- a/m4/mysql.m4
++++ b/m4/mysql.m4
+@@ -1,4 +1,6 @@
+-##### http://autoconf-archive.cryp.to/ax_lib_mysql.html
++# ===========================================================================
++# http://www.gnu.org/software/autoconf-archive/ax_lib_mysql.html
++# ===========================================================================
+ #
+ # SYNOPSIS
+ #
+@@ -6,19 +8,18 @@
+ #
+ # DESCRIPTION
+ #
+-# This macro provides tests of availability of MySQL client library
+-# of particular version or newer.
++# This macro provides tests of availability of MySQL client library of
++# particular version or newer.
+ #
+-# AX_LIB_MYSQL macro takes only one argument which is optional. If
+-# there is no required version passed, then macro does not run
+-# version test.
++# AX_LIB_MYSQL macro takes only one argument which is optional. If there
++# is no required version passed, then macro does not run version test.
+ #
+ # The --with-mysql option takes one of three possible values:
+ #
+ # no - do not check for MySQL client library
+ #
+-# yes - do check for MySQL library in standard locations
+-# (mysql_config should be in the PATH)
++# yes - do check for MySQL library in standard locations (mysql_config
++# should be in the PATH)
+ #
+ # path - complete path to mysql_config utility, use this option if
+ # mysql_config can't be found in the PATH
+@@ -33,27 +34,23 @@
+ #
+ # HAVE_MYSQL
+ #
+-# LAST MODIFICATION
++# LICENSE
+ #
+-# 2006-07-16
+-# 2007-01-09 MS: mysql_config --cflags may set gcc -fomit-frame-pointers,
+-# which prevents gdb from displaying stack traces.
+-# Changed mysql_config --cflags to mysql_config --include
++# Copyright (c) 2008 Mateusz Loskot <mateusz@loskot.net>
+ #
+-# COPYLEFT
+-#
+-# Copyright (c) 2006 Mateusz Loskot <mateusz@loskot.net>
+-#
+-# Copying and distribution of this file, with or without
+-# modification, are permitted in any medium without royalty provided
+-# the copyright notice and this notice are preserved.
++# Copying and distribution of this file, with or without modification, are
++# permitted in any medium without royalty provided the copyright notice
++# and this notice are preserved. This file is offered as-is, without any
++# warranty.
++
++#serial 12
+
+ AC_DEFUN([AX_LIB_MYSQL],
+ [
+ AC_ARG_WITH([mysql],
+- [AS_HELP_STRING([--with-mysql=@<:@ARG@:>@],
++ AS_HELP_STRING([--with-mysql=@<:@ARG@:>@],
+ [use MySQL client library @<:@default=yes@:>@, optionally specify path to mysql_config]
+- )],
++ ),
+ [
+ if test "$withval" = "no"; then
+ want_mysql="no"
+@@ -66,19 +63,20 @@ AC_DEFUN([AX_LIB_MYSQL],
+ ],
+ [want_mysql="yes"]
+ )
++ AC_ARG_VAR([MYSQL_CONFIG], [Full path to mysql_config program])
+
+ MYSQL_CFLAGS=""
+ MYSQL_LDFLAGS=""
+ MYSQL_VERSION=""
+
+ dnl
+- dnl Check MySQL libraries (libpq)
++ dnl Check MySQL libraries
+ dnl
+
+ if test "$want_mysql" = "yes"; then
+
+- if test -z "$MYSQL_CONFIG" -o test; then
+- AC_PATH_PROG([MYSQL_CONFIG], [mysql_config], [no])
++ if test -z "$MYSQL_CONFIG" ; then
++ AC_PATH_PROGS([MYSQL_CONFIG], [mysql_config mysql_config5], [no])
+ fi
+
+ if test "$MYSQL_CONFIG" != "no"; then
+@@ -90,35 +88,8 @@ dnl MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`"
+
+ MYSQL_VERSION=`$MYSQL_CONFIG --version`
+
+-dnl It isn't enough to just test for mysql_config as Fedora
+-dnl provides it in the mysql RPM even though mysql-devel may
+-dnl not be installed
+-
+- EMBCFLAGS=$CFLAGS
+- EMBLDFLAGS=$LDFLAGS
+- CFLAGS=$MYSQL_CFLAGS
+- LDFLAGS=$MYSQL_LDFLAGS
+-
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
+- #include "mysql.h"]],
+- [[mysql_info(NULL)]])],
+- [havemysql=yes],
+- [havemysql=no])
+-
+- CFLAGS=$EMBCFLAGS
+- LDFLAGS=$EMBLDFLAGS
+-
+- if test "$havemysql" = yes; then
+- AC_DEFINE([HAVE_MYSQL], [1],
+- [Define to 1 if MySQL libraries are available])
+- found_mysql="yes"
+- AC_MSG_RESULT([yes])
+- else
+- MYSQL_CFLAGS=""
+- MYSQL_LDFLAGS=""
+- found_mysql="no"
+- AC_MSG_RESULT([no])
+- fi
++ found_mysql="yes"
++ AC_MSG_RESULT([yes])
+ else
+ found_mysql="no"
+ AC_MSG_RESULT([no])
+@@ -170,6 +141,11 @@ dnl not be installed
+ fi
+ fi
+
++ if test "$found_mysql" = "yes" ; then
++ AC_DEFINE([HAVE_MYSQL], [1],
++ [Define to 1 if MySQL libraries are available])
++ fi
++
+ AC_SUBST([MYSQL_VERSION])
+ AC_SUBST([MYSQL_CFLAGS])
+ AC_SUBST([MYSQL_LDFLAGS])
+diff --git a/nucleus/Makefile.am b/nucleus/Makefile.am
+index c244786..ff301b9 100644
+--- a/nucleus/Makefile.am
++++ b/nucleus/Makefile.am
+@@ -19,13 +19,16 @@ CYGWIN_LIBS = -L../plplot -L../ajax/pcre -L../ajax/expat -L../ajax/zlib \
+ -lezlib -leplplot
+ else
+ if !ESYSTEMLIBS
+-EXTRA_INCLUDES = -I$(top_srcdir)/ajax/expat -I$(top_srcdir)/ajax/zlib
++EXTRA_INCLUDES = -I$(top_srcdir)/ajax/expat -I$(top_srcdir)/ajax/zlib \
++-I$(top_srcdir)/plplot -I$(top_srcdir)/ajax/pcre
++else
++EXTRA_INCLUDES = $(PLPLOT_CFLAGS)
+ endif
+ endif
+
+
+-INCLUDES = -I$(top_srcdir)/plplot $(X_CFLAGS) -I$(srcdir)/ \
+- -I$(top_srcdir)/ajax -I$(top_srcdir)/ajax/pcre \
++INCLUDES = $(X_CFLAGS) -I$(srcdir)/ \
++ -I$(top_srcdir)/ajax \
+ $(EXTRA_INCLUDES) \
+ -I$(top_srcdir)/ajax/core -I$(top_srcdir)/ajax/graphics \
+ -I$(top_srcdir)/ajax/ensembl -I$(top_srcdir)/ajax/ajaxdb \
+@@ -55,3 +58,4 @@ LINKFLAGS = $(VERS_INF)
+ endif
+
+ libnucleus_la_LDFLAGS = $(LINKFLAGS)
++libnucleus_la_LIBADD = ../ajax/core/libajax.la ../ajax/graphics/libajaxg.la ../ajax/acd/libacd.la
diff --git a/sci-biology/emboss/files/README.Gentoo b/sci-biology/emboss/files/README.Gentoo
new file mode 100644
index 000000000000..ce37576f0fc4
--- /dev/null
+++ b/sci-biology/emboss/files/README.Gentoo
@@ -0,0 +1,28 @@
+Using EMBOSS on Gentoo systems
+
+Codon data files location
+
+The codon data files that are distributed with EMBOSS are installed in the
+"/usr/share/EMBOSS/data/CODONS.orig" directory instead of the usual
+"/usr/share/EMBOSS/data/CODONS". This is done to avoid confusion between these
+codon files and those installed with the CUTG database. The names of these files
+sometimes vary only by their case. Having both sets of files in the same directory
+is also impossible on systems such as MacOSX, where the root filesystem is case
+insensitive. If you do not have the CUTG database installed and want to use the
+codon files distributed with EMBOSS, you can symlink the "CODONS.orig" directory
+to "CODONS":
+
+ cd /usr/share/EMBOSS/data
+ ln -s CODONS.orig CODONS
+
+Restriction enzymes equivalence file location
+
+The restriction enzymes equivalence file distributed with EMBOSS is installed as
+"/usr/share/EMBOSS/data/embossre.equ.orig" rather than the usual
+"/usr/share/EMBOSS/data/embossre.equ". This is done to avoid a file collision
+with the equivalence file provided by the Rebase database. If you do not have the
+Rebase database installed and want to use the equivalence file distributed with
+EMBOSS, you can symlink the "embossre.equ.orig" file to "embossre.equ":
+
+ cd /usr/share/EMBOSS/data
+ ln -s embossre.equ.orig embossre.equ
diff --git a/sci-biology/emboss/files/README.gentoo b/sci-biology/emboss/files/README.gentoo
new file mode 100644
index 000000000000..d1879bd0811c
--- /dev/null
+++ b/sci-biology/emboss/files/README.gentoo
@@ -0,0 +1,34 @@
+Administrating EMBOSS on Gentoo systems
+=======================================
+
+
+Codon data files location
+-------------------------
+
+The codon data files that are distributed with EMBOSS are installed in the
+``EPREFIX/usr/share/EMBOSS/data/CODONS.orig`` directory instead of the usual
+``EPREFIX/usr/share/EMBOSS/data/CODONS``. This is done to avoid confusion between
+these codon files and those installed with the CUTG database. The names of
+these files sometimes vary only by their case. Having both sets of files in
+the same directory is also impossible on systems such as MacOSX, where the
+root filesystem is case insensitive. If you do not have the CUTG database
+installed and want to use the codon files distributed with EMBOSS, you can
+symlink the ``CODONS.orig`` directory to ``CODONS``::
+
+ # cd ${EPREFIX}/usr/share/EMBOSS/data
+ # ln -s CODONS.orig CODONS
+
+
+Restriction enzymes equivalence file location
+---------------------------------------------
+
+The restriction enzymes equivalence file distributed with EMBOSS is installed
+as ``EPREFIX/usr/share/EMBOSS/data/embossre.equ.orig`` rather than the usual
+``EPREFIX/usr/share/EMBOSS/data/embossre.equ``. This is done to avoid a file
+collision with the equivalence file provided by the Rebase database. If you do
+not have the Rebase database installed and want to use the equivalence file
+distributed with EMBOSS, you can symlink the ``embossre.equ.orig`` file to
+``embossre.equ``::
+
+ # cd ${EPREFIX}/usr/share/EMBOSS/data
+ # ln -s embossre.equ.orig embossre.equ
diff --git a/sci-biology/emboss/files/emboss-5.0.0-as-needed.patch b/sci-biology/emboss/files/emboss-5.0.0-as-needed.patch
new file mode 100644
index 000000000000..9915f95376d0
--- /dev/null
+++ b/sci-biology/emboss/files/emboss-5.0.0-as-needed.patch
@@ -0,0 +1,24 @@
+diff -Naur EMBOSS-5.0.0.old/ajax/Makefile.in EMBOSS-5.0.0/ajax/Makefile.in
+--- EMBOSS-5.0.0.old/ajax/Makefile.in 2007-07-12 05:53:32.000000000 -0500
++++ EMBOSS-5.0.0/ajax/Makefile.in 2008-01-25 16:43:51.000000000 -0500
+@@ -244,7 +244,7 @@
+ top_srcdir = @top_srcdir@
+ @ISCYGWIN_FALSE@lib_LTLIBRARIES = libajax.la libajaxg.la
+ @ISCYGWIN_TRUE@lib_LTLIBRARIES = libajax.la
+-@ISAIXIA64_FALSE@@ISSHARED_TRUE@AM_CFLAGS =
++@ISAIXIA64_FALSE@@ISSHARED_TRUE@AM_CFLAGS = -lm -L../plplot/.libs -leplplot
+ @ISAIXIA64_TRUE@@ISSHARED_TRUE@@NEEDAJAX_FALSE@AM_CFLAGS = -Wl,-G -L../plplot/.libs -L.libs -leplplot -lm
+ @ISAIXIA64_TRUE@@ISSHARED_TRUE@@NEEDAJAX_TRUE@AM_CFLAGS = -Wl,-G -L../plplot/.libs -L.libs -lajax -leplplot -lm
+ @ISCYGWIN_TRUE@AM_LDFLAGS = -no-undefined -Wl,--add-stdcall-alias -Wl,--export-all-symbols -Wl,--enable-auto-import -L../plplot -leplplot
+diff -Naur EMBOSS-5.0.0.old/plplot/Makefile.in EMBOSS-5.0.0/plplot/Makefile.in
+--- EMBOSS-5.0.0.old/plplot/Makefile.in 2007-07-12 05:53:36.000000000 -0500
++++ EMBOSS-5.0.0/plplot/Makefile.in 2008-01-25 16:42:51.000000000 -0500
+@@ -229,7 +229,7 @@
+ lib_LTLIBRARIES = libeplplot.la
+ @AMPNG_FALSE@@ISAIXIA64_TRUE@@ISSHARED_TRUE@AM_CFLAGS = -Wl,-G -lX11
+ @AMPNG_TRUE@@ISAIXIA64_TRUE@@ISSHARED_TRUE@AM_CFLAGS = -Wl,-G -lgd -lpng -lz -lX11 -lm
+-@ISAIXIA64_FALSE@@ISSHARED_TRUE@AM_CFLAGS =
++@ISAIXIA64_FALSE@@ISSHARED_TRUE@AM_CFLAGS = PATCH_PLPLOT
+ @ISCYGWIN_TRUE@AM_LDFLAGS = -no-undefined -Wl,--add-stdcall-alias -Wl,--export-all-symbols -Wl,--enable-auto-import -lX11 -lgd -lpng -lz
+ INCLUDES = $(X_CFLAGS) -I$(srcdir)/ -I/usr/include/gd -DPREFIX=\"$(prefix)\" -DBUILD_DIR=\"$(srcdir)\" -DDRV_DIR=\"$(srcdir)\" -DEMBOSS_TOP=\"$(EMBOSS_TOP)\"
+ PLPLOTSRC = pdfutils.c plargs.c plbox.c plcont.c plcore.c \
diff --git a/sci-biology/emboss/files/emboss-6.3.1_p4-r1_plcol.patch b/sci-biology/emboss/files/emboss-6.3.1_p4-r1_plcol.patch
new file mode 100644
index 000000000000..0f5e592b77f1
--- /dev/null
+++ b/sci-biology/emboss/files/emboss-6.3.1_p4-r1_plcol.patch
@@ -0,0 +1,112 @@
+--- EMBOSS-6.3.1/ajax/graphics/ajgraph.c 2012-07-19 23:29:05.000000000 +0200
++++ /tmp/ajgraph.c 2012-07-19 23:25:00.000000000 +0200
+@@ -1645,14 +1645,14 @@
+ ** @return [void]
+ ** @@
+ ******************************************************************************/
+
+ static void GraphSetPen(ajint colour)
+ {
+- ajDebug("=g= plcol(%d '%s') [colour]\n", colour, graphColourName[colour]);
+- plcol((PLINT)colour);
++ ajDebug("=g= plcol0(%d '%s') [colour]\n", colour, graphColourName[colour]);
++ plcol0((PLINT)colour);
+
+ return;
+ }
+
+
+
+--- EMBOSS-6.3.1/plplot/plcore.c 2007-10-24 15:14:43.000000000 +0200
++++ /tmp/plcore.c 2012-07-19 23:25:00.000000000 +0200
+@@ -1709,13 +1709,13 @@
+ if (plsc->zdigmax == 0)
+ plsc->zdigmax = 3;
+
+ /* Switch to graphics mode and set color and arrow style*/
+
+ plgra();
+- plcol(1);
++ plcol0(1);
+
+ plstyl(0, &mk, &sp);
+ plpat(1, &inc, &del);
+
+ plsvect(def_arrow_x, def_arrow_y, 6, 0);
+
+--- EMBOSS-6.3.1/plplot/plstripc.c 2007-05-08 11:09:37.000000000 +0200
++++ /tmp/plstripc.c 2012-07-19 23:25:00.000000000 +0200
+@@ -153,17 +153,17 @@
+
+ plgchr(&sc, &dy);
+ sc = dy = dy/100;
+ plwind(-0.01, 1.01, -0.01, 1.01);
+ for (i=0; i<PEN; i++) {
+ if (mystripc->npts[i] || first) {
+- plcol(mystripc->colline[i]);
++ plcol0(mystripc->colline[i]);
+ pllsty(mystripc->styline[i]);
+ pljoin(mystripc->xlpos, mystripc->ylpos - sc,
+ mystripc->xlpos + 0.1, mystripc->ylpos - sc);
+- plcol(mystripc->collab);
++ plcol0(mystripc->collab);
+ plptex(mystripc->xlpos + 0.11, mystripc->ylpos - sc,
+ 0., 0., 0, mystripc->legline[i]);
+ sc += dy;
+ }
+ }
+ plwind(mystripc->xmin, mystripc->xmax, mystripc->ymin, mystripc->ymax);
+@@ -184,34 +184,34 @@
+ PLFLT x[]={0.,1.,1.,0.}, y[]={0.,0.,1.,1.};
+
+ /* Set up window */
+
+ plvpor(0,1,0,1);
+ plwind(0,1,0,1);
+- plcol(0);plpsty(0);
++ plcol0(0);plpsty(0);
+ plfill(4, &x[0], &y[0]);
+ plvsta();
+
+ /* Draw box and same window dimensions */
+ mystrip->wxmin=mystrip->xmin;
+ mystrip->wxmax=mystrip->xmax;
+ mystrip->wymin=mystrip->ymin;
+ mystrip->wymax=mystrip->ymax; /* FIXME - can exist some redundancy here */
+
+ plwind(mystrip->xmin, mystrip->xmax, mystrip->ymin, mystrip->ymax);
+
+ pllsty(1);
+- plcol(mystrip->colbox);
++ plcol0(mystrip->colbox);
+ plbox(mystrip->xspec, 0.0, 0, mystrip->yspec, 0.0, 0);
+
+- plcol(mystrip->collab);
++ plcol0(mystrip->collab);
+ pllab(mystrip->labx, mystrip->laby, mystrip->labtop);
+
+ for (i=0; i<PEN; i++) {
+ if (mystrip->npts[i] > 0) {
+- plcol(mystrip->colline[i]);pllsty(mystrip->styline[i]);
++ plcol0(mystrip->colline[i]);pllsty(mystrip->styline[i]);
+ plline(mystrip->npts[i], mystrip->x[i], mystrip->y[i]);
+ }
+ }
+
+ plstrip_legend(mystrip,0);
+ }
+@@ -269,13 +269,13 @@
+ if (stripc->xmax - stripc->xmin < stripc->xlen) {
+ if( yasc == 0) {
+
+ /* If user has changed subwindow, make shure we have the correct one */
+ plvsta();
+ plwind(stripc->wxmin, stripc->wxmax, stripc->wymin, stripc->wymax); /* FIXME - can exist some redundancy here */
+- plcol(stripc->colline[p]); pllsty(stripc->styline[p]);
++ plcol0(stripc->colline[p]); pllsty(stripc->styline[p]);
+ if ((stripc->npts[p]-2) < 0)
+ plP_movwor(stripc->x[p][stripc->npts[p]-1], stripc->y[p][stripc->npts[p]-1]);
+ else
+ plP_movwor(stripc->x[p][stripc->npts[p]-2], stripc->y[p][stripc->npts[p]-2]);
+ plP_drawor(stripc->x[p][stripc->npts[p]-1], stripc->y[p][stripc->npts[p]-1]);
+ plflush();
diff --git a/sci-biology/emboss/files/emboss-6.6.0_FORTIFY_SOURCE-fix.patch b/sci-biology/emboss/files/emboss-6.6.0_FORTIFY_SOURCE-fix.patch
new file mode 100644
index 000000000000..7704873e9d26
--- /dev/null
+++ b/sci-biology/emboss/files/emboss-6.6.0_FORTIFY_SOURCE-fix.patch
@@ -0,0 +1,11 @@
+--- EMBOSS-6.6.0/emboss/embossversion.c
++++ EMBOSS-6.6.0/emboss/embossversion.c
+@@ -415,7 +415,7 @@
+ ajFmtPrintF(outfile, "X_DISPLAY_MISSING %d\n", X_DISPLAY_MISSING);
+ #endif
+ #ifdef _FORTIFY_SOURCE
+- ajFmtPrintF(outfile, "_FORTIFY_SOURCE %d\n", _FORTIFY_SOURCE);
++ ajFmtPrintF(outfile, "_FORTIFY_SOURCE %d\n", __USE_FORTIFY_LEVEL);
+ #endif
+ ajFmtPrintF(outfile, "\n");
+ ajFmtPrintF(outfile, "Sizes (bytes):\n");
diff --git a/sci-biology/emboss/files/emboss-6.6.0_fix-build-system.patch b/sci-biology/emboss/files/emboss-6.6.0_fix-build-system.patch
new file mode 100644
index 000000000000..266bddd95a37
--- /dev/null
+++ b/sci-biology/emboss/files/emboss-6.6.0_fix-build-system.patch
@@ -0,0 +1,411 @@
+ Makefile.am | 9 +++---
+ ajax/Makefile.am | 4 +--
+ ajax/acd/Makefile.am | 8 +++--
+ ajax/ajaxdb/Makefile.am | 6 ++--
+ ajax/core/Makefile.am | 6 ++--
+ ajax/core/ajreg.h | 7 ++--
+ ajax/ensembl/Makefile.am | 6 ++--
+ ajax/graphics/Makefile.am | 8 +++--
+ configure.ac | 82 ++++++++++++++++++++++++++---------------------
+ emboss/Makefile.am | 13 +++++---
+ jemboss/lib/Makefile.am | 2 +-
+ m4/idxdbs.m4 | 17 +++-------
+ nucleus/Makefile.am | 8 +++--
+ 13 files changed, 100 insertions(+), 76 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 177dec5..18dd99a 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -12,8 +12,11 @@ LICENSE \
+ ONEWS \
+ PROBLEMS
+
+-SUBDIRS = \
+-plplot \
++SUBDIRS =
++if !ESYSTEMLIBS
++SUBDIRS += plplot
++endif
++SUBDIRS += \
+ ajax \
+ nucleus \
+ emboss \
+@@ -33,5 +36,3 @@ dist-hook:
+ tar cBf - doc | ( cd $(distdir); tar xBf - ; find doc -name CVS | xargs rm -rf; )
+ tar cBf - jemboss | ( cd $(distdir); tar xBf - ; find jemboss -name CVS | xargs rm -rf; find jemboss -name Makefile | xargs rm -rf; find jemboss -name .cvsignore | xargs rm -rf )
+
+-install-exec-hook:
+- $(bindir)/embossupdate
+diff --git a/ajax/Makefile.am b/ajax/Makefile.am
+index f27472c..de34e17 100644
+--- a/ajax/Makefile.am
++++ b/ajax/Makefile.am
+@@ -1,7 +1,7 @@
+ ## Process this file with automake to produce Makefile.in
+
+-SUBDIRS = pcre
++SUBDIRS =
+ if !ESYSTEMLIBS
+-SUBDIRS += expat zlib
++SUBDIRS += pcre expat zlib
+ endif
+ SUBDIRS += core graphics ensembl ajaxdb acd
+diff --git a/ajax/acd/Makefile.am b/ajax/acd/Makefile.am
+index 9f0f700..3295a1d 100644
+--- a/ajax/acd/Makefile.am
++++ b/ajax/acd/Makefile.am
+@@ -3,16 +3,20 @@
+ lib_LTLIBRARIES = libacd.la
+
+ libacd_la_CFLAGS = $(WARN_CFLAGS) $(DEVWARN_CFLAGS) $(JAVA_CFLAGS)
++libacd_la_LIBADD = ../core/libajax.la ../graphics/libajaxg.la
+
+ libacd_la_CPPFLAGS = -I$(top_srcdir)/ajax/ajaxdb
++libacd_la_CPPFLAGS += -I$(top_srcdir)/ajax/core
+ libacd_la_CPPFLAGS += -I$(top_srcdir)/ajax/ensembl
+ libacd_la_CPPFLAGS += -I$(top_srcdir)/ajax/graphics
+-libacd_la_CPPFLAGS += -I$(top_srcdir)/ajax/pcre
+ if !ESYSTEMLIBS
++libacd_la_CPPFLAGS += -I$(top_srcdir)/ajax/pcre
+ libacd_la_CPPFLAGS += -I$(top_srcdir)/ajax/expat
+ libacd_la_CPPFLAGS += -I$(top_srcdir)/ajax/zlib
+-endif
+ libacd_la_CPPFLAGS += -I$(top_srcdir)/plplot
++else
++libacd_la_CFLAGS += $(PLPLOT_CFLAGS)
++endif
+ libacd_la_CPPFLAGS += $(JAVA_CPPFLAGS)
+
+ libacd_la_LDFLAGS = -version-info 6:5:0
+diff --git a/ajax/ajaxdb/Makefile.am b/ajax/ajaxdb/Makefile.am
+index c2b0c00..9de14fe 100644
+--- a/ajax/ajaxdb/Makefile.am
++++ b/ajax/ajaxdb/Makefile.am
+@@ -3,14 +3,16 @@
+ lib_LTLIBRARIES = libajaxdb.la
+
+ libajaxdb_la_CFLAGS = $(WARN_CFLAGS) $(DEVWARN_CFLAGS) $(JAVA_CFLAGS)
++libajaxdb_la_LIBADD = ../core/libajax.la ../ensembl/libensembl.la
+
+ libajaxdb_la_CPPFLAGS = -I$(top_srcdir)/ajax/ensembl
+-libajaxdb_la_CPPFLAGS += -I$(top_srcdir)/ajax/pcre
++libajaxdb_la_CPPFLAGS += -I$(top_srcdir)/ajax/core
+ if !ESYSTEMLIBS
++libajaxdb_la_CPPFLAGS += -I$(top_srcdir)/ajax/pcre
+ libajaxdb_la_CPPFLAGS += -I$(top_srcdir)/ajax/expat
+ libajaxdb_la_CPPFLAGS += -I$(top_srcdir)/ajax/zlib
+-endif
+ libajaxdb_la_CPPFLAGS += -I$(top_srcdir)/plplot
++endif
+ libajaxdb_la_CPPFLAGS += $(AXIS2C_CPPFLAGS)
+ libajaxdb_la_CPPFLAGS += $(JAVA_CPPFLAGS)
+
+diff --git a/ajax/core/Makefile.am b/ajax/core/Makefile.am
+index 2906837..3189c34 100644
+--- a/ajax/core/Makefile.am
++++ b/ajax/core/Makefile.am
+@@ -3,13 +3,15 @@
+ lib_LTLIBRARIES = libajax.la
+
+ libajax_la_CFLAGS = $(WARN_CFLAGS) $(DEVWARN_CFLAGS) $(JAVA_CFLAGS)
++libajax_la_LIBADD = $(EXPAT_LIBS) $(PCRE_LIBS) $(ZLIB_LIBS)
+
+-libajax_la_CPPFLAGS = -I$(top_srcdir)/ajax/pcre
++libajax_la_CPPFLAGS =
+ if !ESYSTEMLIBS
++libajax_la_CPPFLAGS += -I$(top_srcdir)/ajax/pcre
+ libajax_la_CPPFLAGS += -I$(top_srcdir)/ajax/expat
+ libajax_la_CPPFLAGS += -I$(top_srcdir)/ajax/zlib
+-endif
+ libajax_la_CPPFLAGS += -I$(top_srcdir)/plplot
++endif
+ libajax_la_CPPFLAGS += $(JAVA_CPPFLAGS)
+ libajax_la_CPPFLAGS += $(MYSQL_CPPFLAGS)
+ libajax_la_CPPFLAGS += $(POSTGRESQL_CPPFLAGS)
+diff --git a/ajax/core/ajreg.h b/ajax/core/ajreg.h
+index 1623c82..5d928cf 100644
+--- a/ajax/core/ajreg.h
++++ b/ajax/core/ajreg.h
+@@ -39,9 +39,8 @@
+ #include "ajdefine.h"
+ #include "ajstr.h"
+
+-#include "pcre_config.h"
+-#include "pcre_internal.h"
+-#include "pcreposix.h"
++#include <pcre.h>
++#include <pcreposix.h>
+
+ AJ_BEGIN_DECLS
+
+@@ -84,7 +83,7 @@ AJ_BEGIN_DECLS
+
+ typedef struct AjSRegexp
+ {
+- real_pcre *pcre;
++ struct real_pcre *pcre;
+ pcre_extra *extra;
+ int *ovector;
+ const char* orig;
+diff --git a/ajax/ensembl/Makefile.am b/ajax/ensembl/Makefile.am
+index 0d1250b..5484c02 100644
+--- a/ajax/ensembl/Makefile.am
++++ b/ajax/ensembl/Makefile.am
+@@ -3,13 +3,15 @@
+ lib_LTLIBRARIES = libensembl.la
+
+ libensembl_la_CFLAGS = $(WARN_CFLAGS) $(DEVWARN_CFLAGS) $(JAVA_CFLAGS)
++libensembl_la_LIBADD = ../core/libajax.la
+
+-libensembl_la_CPPFLAGS = -I$(top_srcdir)/ajax/pcre
++libensembl_la_CPPFLAGS = -I$(top_srcdir)/ajax/core
+ if !ESYSTEMLIBS
++libensembl_la_CPPFLAGS += -I$(top_srcdir)/ajax/pcre
+ libensembl_la_CPPFLAGS += -I$(top_srcdir)/ajax/expat
+ libensembl_la_CPPFLAGS += -I$(top_srcdir)/ajax/zlib
+-endif
+ libensembl_la_CPPFLAGS += -I$(top_srcdir)/plplot
++endif
+ libensembl_la_CPPFLAGS += $(JAVA_CPPFLAGS)
+
+ libensembl_la_LDFLAGS = -version-info 6:5:0
+diff --git a/ajax/graphics/Makefile.am b/ajax/graphics/Makefile.am
+index a4f202b..1114c2c 100644
+--- a/ajax/graphics/Makefile.am
++++ b/ajax/graphics/Makefile.am
+@@ -3,12 +3,16 @@
+ lib_LTLIBRARIES = libajaxg.la
+
+ libajaxg_la_CFLAGS = $(WARN_CFLAGS) $(DEVWARN_CFLAGS) $(JAVA_CFLAGS)
++libajaxg_la_LIBADD = ../core/libajax.la $(PLPLOT_LIBS)
+
+-libajaxg_la_CPPFLAGS = -I$(top_srcdir)/ajax/pcre
++libajaxg_la_CPPFLAGS = -I$(top_srcdir)/ajax/core
+ if !ESYSTEMLIBS
++libajaxg_la_CPPFLAGS += -I$(top_srcdir)/ajax/pcre
+ libajaxg_la_CPPFLAGS += -I$(top_srcdir)/ajax/expat
+-endif
+ libajaxg_la_CPPFLAGS += -I$(top_srcdir)/plplot
++else
++libajaxg_la_CFLAGS += $(PLPLOT_CFLAGS)
++endif
+ libajaxg_la_CPPFLAGS += $(JAVA_CPPFLAGS)
+
+ libajaxg_la_LDFLAGS = -version-info 6:5:0
+diff --git a/configure.ac b/configure.ac
+index a7bd9c6..9ba3121 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -629,32 +629,6 @@ AS_CASE([${host_os}],
+
+
+
+-
+-dnl PCRE library definitions - see the MAJOR and MINOR values
+-dnl to see which version's configure.in these lines come from
+-
+-dnl Provide the current PCRE version information. Do not use numbers
+-dnl with leading zeros for the minor version, as they end up in a C
+-dnl macro, and may be treated as octal constants. Stick to single
+-dnl digits for minor numbers less than 10. There are unlikely to be
+-dnl that many releases anyway.
+-
+-PCRE_MAJOR="7"
+-PCRE_MINOR="9"
+-PCRE_DATE="11-Apr-2009"
+-PCRE_VERSION="${PCRE_MAJOR}.${PCRE_MINOR}"
+-
+-dnl Default values for miscellaneous macros
+-
+-POSIX_MALLOC_THRESHOLD="-DPOSIX_MALLOC_THRESHOLD=10"
+-
+-dnl Provide versioning information for libtool shared libraries that
+-dnl are built by default on Unix systems.
+-
+-PCRE_LIB_VERSION="0:1:0"
+-PCRE_POSIXLIB_VERSION="0:0:0"
+-
+-
+ dnl Define where the EMBOSS package is located
+ AC_SUBST([AJAX_FIXED_ROOT])
+ AJAX_FIXED_ROOT="\\\"`pwd`/emboss\\\""
+@@ -743,17 +717,7 @@ AX_LIB_POSTGRESQL
+
+
+
+-dnl "Export" these variables for PCRE
+
+-AC_SUBST([HAVE_MEMMOVE])
+-AC_SUBST([HAVE_STRERROR])
+-AC_SUBST([PCRE_MAJOR])
+-AC_SUBST([PCRE_MINOR])
+-AC_SUBST([PCRE_DATE])
+-AC_SUBST([PCRE_VERSION])
+-AC_SUBST([PCRE_LIB_VERSION])
+-AC_SUBST([PCRE_POSIXLIB_VERSION])
+-AC_SUBST([POSIX_MALLOC_THRESHOLD])
+
+
+
+@@ -849,7 +813,53 @@ AC_ARG_ENABLE([systemlibs],
+
+ AM_CONDITIONAL([ESYSTEMLIBS], [test "x${enable_systemlibs}" = "xyes"])
+
++AS_IF([test "x${enable_systemlibs}" = "xyes"],
++[
++dnl using system libraries
++ PKG_CHECK_MODULES([PCRE], [libpcre])
++ PKG_CHECK_MODULES([EXPAT], [expat])
++ PKG_CHECK_MODULES([ZLIB], [zlib])
++ PKG_CHECK_MODULES([PLPLOT], [plplotd],
++ [],[PKG_CHECK_MODULES([PLPLOT], [plplot])]
++ )
++],
++[
++dnl using bundled libraries
++ dnl PCRE library definitions - see the MAJOR and MINOR values
++ dnl to see which version's configure.ac these lines come from
+
++ dnl Provide the current PCRE version information. Do not use numbers
++ dnl with leading zeros for the minor version, as they end up in a C
++ dnl macro, and may be treated as octal constants. Stick to single
++ dnl digits for minor numbers less than 10. There are unlikely to be
++ dnl that many releases anyway.
++
++ PCRE_MAJOR="7"
++ PCRE_MINOR="9"
++ PCRE_DATE="11-Apr-2009"
++ PCRE_VERSION="${PCRE_MAJOR}.${PCRE_MINOR}"
++
++ dnl Default values for miscellaneous macros
++
++ POSIX_MALLOC_THRESHOLD="-DPOSIX_MALLOC_THRESHOLD=10"
++
++ dnl Provide versioning information for libtool shared libraries that
++ dnl are built by default on Unix systems.
++
++ PCRE_LIB_VERSION="0:1:0"
++ PCRE_POSIXLIB_VERSION="0:0:0"
++
++ dnl "Export" these variables for PCRE
++ AC_SUBST([HAVE_MEMMOVE])
++ AC_SUBST([HAVE_STRERROR])
++ AC_SUBST([PCRE_MAJOR])
++ AC_SUBST([PCRE_MINOR])
++ AC_SUBST([PCRE_DATE])
++ AC_SUBST([PCRE_VERSION])
++ AC_SUBST([PCRE_LIB_VERSION])
++ AC_SUBST([PCRE_POSIXLIB_VERSION])
++ AC_SUBST([POSIX_MALLOC_THRESHOLD])
++])
+
+
+ # Enable the purify tool: --enable-purify, sets CC and LIBTOOL
+diff --git a/emboss/Makefile.am b/emboss/Makefile.am
+index 89ada78..f987d40 100644
+--- a/emboss/Makefile.am
++++ b/emboss/Makefile.am
+@@ -28,15 +28,18 @@ endif
+
+ AM_CPPFLAGS = -I$(top_srcdir)/ajax/acd
+ AM_CPPFLAGS += -I$(top_srcdir)/ajax/ajaxdb
++AM_CPPFLAGS += -I$(top_srcdir)/ajax/core
+ AM_CPPFLAGS += -I$(top_srcdir)/ajax/ensembl
+ AM_CPPFLAGS += -I$(top_srcdir)/ajax/graphics
++if !ESYSTEMLIBS
+ AM_CPPFLAGS += -I$(top_srcdir)/ajax/pcre
+-if !ESYSTEMLIBS
+ AM_CPPFLAGS += -I$(top_srcdir)/ajax/expat
+ AM_CPPFLAGS += -I$(top_srcdir)/ajax/zlib
+-endif
+-AM_CPPFLAGS += -I$(top_srcdir)/nucleus
+ AM_CPPFLAGS += -I$(top_srcdir)/plplot
++else
++AM_CFLAGS += $(PLPLOT_CFLAGS)
++endif
++AM_CPPFLAGS += -I$(top_srcdir)/nucleus
+ AM_CPPFLAGS += $(AXIS2C_CPPFLAGS)
+ AM_CPPFLAGS += $(JAVA_CPPFLAGS)
+
+@@ -49,9 +52,11 @@ LDADD += ../ajax/core/libajax.la
+ if !ESYSTEMLIBS
+ LDADD += ../ajax/zlib/libezlib.la
+ LDADD += ../ajax/expat/libeexpat.la
+-endif
+ LDADD += ../ajax/pcre/libepcre.la
+ LDADD += ../plplot/libeplplot.la
++else
++LDADD += $(EXPAT_LIBS) $(PCRE_LIBS) $(ZLIB_LIBS) $(PLPLOT_LIBS)
++endif
+ LDADD += $(XLIB)
+
+ #if PURIFY
+diff --git a/jemboss/lib/Makefile.am b/jemboss/lib/Makefile.am
+index 5f7e21e..8b45ce2 100644
+--- a/jemboss/lib/Makefile.am
++++ b/jemboss/lib/Makefile.am
+@@ -12,7 +12,7 @@ mail.jar \
+ jalviewApplet.jar \
+ jemboss.jar
+
+-jemboss.jar:../org/emboss/jemboss/server/JembossFile*Server.java
++jemboss.jar:$(srcdir)/../org/emboss/jemboss/server/JembossFile*Server.java
+ if JAVA_BUILD
+ $(ANT) -f ../build.xml package -Demboss.data=../emboss/data -Dname=jemboss -Djar.dir=lib -Dnotformemboss=yes;
+ endif
+diff --git a/m4/idxdbs.m4 b/m4/idxdbs.m4
+index 0ca7ea9..9b54f2a 100644
+--- a/m4/idxdbs.m4
++++ b/m4/idxdbs.m4
+@@ -1,17 +1,8 @@
+ AC_DEFUN([CHECK_IDXDBS],
+ [
+-AC_MSG_CHECKING(for EMBOSS pre-indexed databases)
++AC_MSG_NOTICE(checking for EMBOSS pre-indexed databases)
+
+-
+-if test -f ./emboss/index/edam.xac; then
+-AC_MSG_RESULT(yes)
+-else
+-AC_MSG_RESULT(no)
+-echo ""
+-echo "Pre-indexed edam, taxon + drcat databases not found."
+-echo "Please download them from within this directory using:"
+-echo " rsync -av rsync://emboss.open-bio.org/EMBOSS/ ."
+-echo "and then repeat the configure step."
+-exit 1
+-fi
++AC_CHECK_FILE([$srcdir/emboss/index/edam.xac],
++ [],
++ [AC_MSG_ERROR([cannot find pre-indexed edam, taxon + drcat databases])])
+ ])
+diff --git a/nucleus/Makefile.am b/nucleus/Makefile.am
+index 37b8543..5819c89 100644
+--- a/nucleus/Makefile.am
++++ b/nucleus/Makefile.am
+@@ -3,6 +3,7 @@
+ lib_LTLIBRARIES = libnucleus.la
+
+ libnucleus_la_CFLAGS = $(WARN_CFLAGS) $(DEVWARN_CFLAGS) $(JAVA_CFLAGS)
++libnucleus_la_LIBADD = ../ajax/core/libajax.la ../ajax/ajaxdb/libajaxdb.la ../ajax/acd/libacd.la
+
+ if ISSHARED
+ if ISAIXIA64
+@@ -10,11 +11,14 @@ libnucleus_la_CFLAGS += -Wl,-G -lm
+ endif
+ endif
+
+-libnucleus_la_CPPFLAGS = -I$(top_srcdir)/plplot
+-libnucleus_la_CPPFLAGS += -I$(top_srcdir)/ajax/pcre
++libnucleus_la_CPPFLAGS = -I$(top_srcdir)/ajax/core
+ if !ESYSTEMLIBS
++libnucleus_la_CPPFLAGS += -I$(top_srcdir)/plplot
++libnucleus_la_CPPFLAGS += -I$(top_srcdir)/ajax/pcre
+ libnucleus_la_CPPFLAGS += -I$(top_srcdir)/ajax/expat
+ libnucleus_la_CPPFLAGS += -I$(top_srcdir)/ajax/zlib
++else
++libnucleus_la_CFLAGS += $(PLPLOT_CFLAGS)
+ endif
+ libnucleus_la_CPPFLAGS += -I$(top_srcdir)/ajax/graphics
+ libnucleus_la_CPPFLAGS += -I$(top_srcdir)/ajax/ensembl
diff --git a/sci-biology/emboss/files/emboss-6.6.0_plplot-declarations.patch b/sci-biology/emboss/files/emboss-6.6.0_plplot-declarations.patch
new file mode 100644
index 000000000000..15f5f967a07d
--- /dev/null
+++ b/sci-biology/emboss/files/emboss-6.6.0_plplot-declarations.patch
@@ -0,0 +1,61 @@
+--- EMBOSS-6.6.0/ajax/graphics/ajgraph.c
++++ EMBOSS-6.6.0/ajax/graphics/ajgraph.c
+@@ -49,7 +49,7 @@
+
+ #define GRAPH_DEBUG 1
+
+-#include "plplotP.h"
++#include <plplotP.h>
+
+
+ static void GraphArray(ajuint numofpoints,
+@@ -964,10 +964,10 @@
+ if(!thys->ready)
+ {
+ #if GRAPH_DEBUG
+- ajDebug("=g= plxsfnam ('%S', '%s')\n", txt, ext);
++ ajDebug("=g= plsfnam ('%S')\n", txt);
+ #endif
+
+- plxsfnam(ajStrGetPtr(txt), ext);
++ plsfnam(ajStrGetPtr(txt));
+ ajStrAssignS(&graphBasename, txt);
+ ajStrAssignC(&graphExtension, ext);
+ if(ajStrGetCharFirst(graphExtension) == '.')
+@@ -1213,10 +1213,10 @@
+ void ajGraphicsSetPenwidth(float penwidth)
+ {
+ #if GRAPH_DEBUG
+- ajDebug("=g= plwid(%.2f) [width]\n", penwidth);
++ ajDebug("=g= c_plwidth(%.2f) [width]\n", penwidth);
+ #endif
+
+- plwid((PLINT)penwidth);
++ c_plwidth((PLINT)penwidth);
+
+ return;
+ }
+@@ -1538,10 +1538,10 @@
+ static void GraphSetPen(ajint colour)
+ {
+ #if GRAPH_DEBUG
+- ajDebug("=g= plcol(%d '%s') [colour]\n", colour, graphColourName[colour]);
++ ajDebug("=g= plcol0(%d '%s') [colour]\n", colour, graphColourName[colour]);
+ #endif
+
+- plcol((PLINT)colour);
++ plcol0((PLINT)colour);
+
+ return;
+ }
+--- EMBOSS-6.6.0/ajax/graphics/ajgraph.h
++++ EMBOSS-6.6.0/ajax/graphics/ajgraph.h
+@@ -32,7 +32,7 @@
+ /* ========================================================================= */
+
+ #include "ajdefine.h"
+-#include "plplot.h"
++#include <plplot.h>
+ #include "ajgraphstruct.h"
+ #include "ajdefine.h"
+ #include "ajstr.h"
diff --git a/sci-biology/emboss/files/emboss-6.6.0_qa-implicit-declarations.patch b/sci-biology/emboss/files/emboss-6.6.0_qa-implicit-declarations.patch
new file mode 100644
index 000000000000..eff10b2e6700
--- /dev/null
+++ b/sci-biology/emboss/files/emboss-6.6.0_qa-implicit-declarations.patch
@@ -0,0 +1,74 @@
+--- EMBOSS-6.6.0/ajax/core/ajfeatread.c
++++ EMBOSS-6.6.0/ajax/core/ajfeatread.c
+@@ -45,6 +45,7 @@
+
+ #include <limits.h>
+ #include <math.h>
++#include <string.h>
+ #include <errno.h>
+
+ #ifdef WIN32
+--- EMBOSS-6.6.0/ajax/core/ajfeatwrite.c
++++ EMBOSS-6.6.0/ajax/core/ajfeatwrite.c
+@@ -43,7 +43,7 @@
+
+ #include <limits.h>
+ #include <math.h>
+-
++#include <string.h>
+
+ static AjPRegexp featoutRegUfoFmt = NULL;
+ static AjPRegexp featoutRegUfoFile = NULL;
+--- EMBOSS-6.6.0/ajax/core/ajpdbio.c
++++ EMBOSS-6.6.0/ajax/core/ajpdbio.c
+@@ -37,7 +37,7 @@
+
+ #include <limits.h>
+ #include <math.h>
+-
++#include <string.h>
+
+
+
+--- EMBOSS-6.6.0/ajax/core/ajreg.c
++++ EMBOSS-6.6.0/ajax/core/ajreg.c
+@@ -32,6 +32,7 @@
+ #include "ajlib.h"
+
+ #include "ajreg.h"
++#include <string.h>
+
+
+
+--- EMBOSS-6.6.0/ajax/core/ajseqtype.c
++++ EMBOSS-6.6.0/ajax/core/ajseqtype.c
+@@ -32,7 +32,7 @@
+ #include "ajfeat.h"
+ #include "ajfile.h"
+ #include "ajreg.h"
+-
++#include <string.h>
+
+
+
+--- EMBOSS-6.6.0/nucleus/embindex.c
++++ EMBOSS-6.6.0/nucleus/embindex.c
+@@ -35,6 +35,7 @@
+ #include "ajnam.h"
+
+ #include <errno.h>
++#include <string.h>
+
+ #define BTENTRYFILE ".ent"
+ #define KWLIMIT 12
+--- EMBOSS-6.6.0/nucleus/embword.c
++++ EMBOSS-6.6.0/nucleus/embword.c
+@@ -36,7 +36,7 @@
+ #include "ajutil.h"
+
+ #include <math.h>
+-
++#include <string.h>
+
+
+
diff --git a/sci-biology/emboss/files/emboss-README.Gentoo-1 b/sci-biology/emboss/files/emboss-README.Gentoo-1
new file mode 100644
index 000000000000..81e71988ae80
--- /dev/null
+++ b/sci-biology/emboss/files/emboss-README.Gentoo-1
@@ -0,0 +1,34 @@
+Administrating EMBOSS on Gentoo systems
+=======================================
+
+
+Codon data files location
+-------------------------
+
+The codon data files that are distributed with EMBOSS are installed in the
+``/usr/share/EMBOSS/data/CODONS.orig`` directory instead of the usual
+``/usr/share/EMBOSS/data/CODONS``. This is done to avoid confusion between
+these codon files and those installed with the CUTG database. The names of
+these files sometimes vary only by their case. Having both sets of files in
+the same directory is also impossible on systems such as MacOSX, where the
+root filesystem is case insensitive. If you do not have the CUTG database
+installed and want to use the codon files distributed with EMBOSS, you can
+symlink the ``CODONS.orig`` directory to ``CODONS``::
+
+ # cd /usr/share/EMBOSS/data
+ # ln -s CODONS.orig CODONS
+
+
+Restriction enzymes equivalence file location
+---------------------------------------------
+
+The restriction enzymes equivalence file distributed with EMBOSS is installed
+as ``/usr/share/EMBOSS/data/embossre.equ.orig`` rather than the usual
+``/usr/share/EMBOSS/data/embossre.equ``. This is done to avoid a file
+collision with the equivalence file provided by the Rebase database. If you do
+not have the Rebase database installed and want to use the equivalence file
+distributed with EMBOSS, you can symlink the ``embossre.equ.orig`` file to
+``embossre.equ``::
+
+ # cd /usr/share/EMBOSS/data
+ # ln -s embossre.equ.orig embossre.equ
diff --git a/sci-biology/emboss/files/emboss-README.Gentoo-2 b/sci-biology/emboss/files/emboss-README.Gentoo-2
new file mode 100644
index 000000000000..72fa3662c9a8
--- /dev/null
+++ b/sci-biology/emboss/files/emboss-README.Gentoo-2
@@ -0,0 +1,34 @@
+Administrating EMBOSS on Gentoo systems
+=======================================
+
+
+Codon data files location
+-------------------------
+
+The codon data files that are distributed with EMBOSS are installed in the
+``EPREFIX/usr/share/EMBOSS/data/CODONS.orig`` directory instead of the usual
+``EPREFIX/usr/share/EMBOSS/data/CODONS``. This is done to avoid confusion between
+these codon files and those installed with the CUTG database. The names of
+these files sometimes vary only by their case. Having both sets of files in
+the same directory is also impossible on systems such as MacOSX, where the
+root filesystem is case insensitive. If you do not have the CUTG database
+installed and want to use the codon files distributed with EMBOSS, you can
+symlink the ``CODONS.orig`` directory to ``CODONS``::
+
+ # cd EPREFIX/usr/share/EMBOSS/data
+ # ln -s CODONS.orig CODONS
+
+
+Restriction enzymes equivalence file location
+---------------------------------------------
+
+The restriction enzymes equivalence file distributed with EMBOSS is installed
+as ``EPREFIX/usr/share/EMBOSS/data/embossre.equ.orig`` rather than the usual
+``EPREFIX/usr/share/EMBOSS/data/embossre.equ``. This is done to avoid a file
+collision with the equivalence file provided by the Rebase database. If you do
+not have the Rebase database installed and want to use the equivalence file
+distributed with EMBOSS, you can symlink the ``embossre.equ.orig`` file to
+``embossre.equ``::
+
+ # cd EPREFIX/usr/share/EMBOSS/data
+ # ln -s embossre.equ.orig embossre.equ
diff --git a/sci-biology/emboss/metadata.xml b/sci-biology/emboss/metadata.xml
new file mode 100644
index 000000000000..3af936dc1564
--- /dev/null
+++ b/sci-biology/emboss/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-biology</herd>
+ <longdescription>
+ EMBOSS is "The European Molecular Biology Open Software Suite".
+ EMBOSS is a free Open Source software analysis package specially
+ developed for the needs of the molecular biology (e.g. EMBnet) user
+ community. The software automatically copes with data in a variety
+ of formats and even allows transparent retrieval of sequence data
+ from the web. Also, as extensive libraries are provided with the
+ package, it is a platform to allow other scientists to develop and
+ release software in true open source spirit. EMBOSS also integrates
+ a range of currently available packages and tools for sequence
+ analysis into a seamless whole. EMBOSS breaks the historical trend
+ towards commercial software packages.
+ </longdescription>
+</pkgmetadata>