FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 03-15-2011, 06:33 AM
justin
 
Default RFC: emboss.eclass as replacement for embassy.eclass

Hi all,

I unbundled a couple of libs from emboss and thus we need a new
installation scheme for the embassy package. For this purpose I rewrote
the embassy eclass to handle now all emboss and embassy* packages.

Please comment if you have objections for the tree commit

http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=blob_plain;
f=eclass/emboss.eclass;hb=HEAD

thanks justin
 
Old 03-15-2011, 07:51 PM
justin
 
Default RFC: emboss.eclass as replacement for embassy.eclass

Donnie pointed out, that it might be clever to attach what I want to
have reviewed. So here it is.

justin
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/embassy.eclass,v 1.17 2008/11/03 22:17:50 ribosome Exp $

# Creator of the original eclass
# Author Olivier Fisette <ofisette@gmail.com>
#
# Author of the next generation eclass
# Justin Lecher <jlec@gentoo.org>

# @ECLASS: emboss.eclass
# @MAINTAINER:
# sci-biology@gentoo.org
# jlec@gentoo.org
# @BLURB: Use this to easy install EMBOSS and EMBASSY programs (EMBOSS add-ons).
# @DESCRIPTION:
# The inheriting ebuild should provide EBO_DESCRIPTION before the inherit line.
# KEYWORDS should be set. Additionally "(R|P)DEPEND"encies and other standard
# ebuild Variables can be extended (FOO+="BAR").
# The inheriting ebuild's name must begin with "emboss" or "embassy" and must be EAPI=4 conform.

# @ECLASS-VARIABLE: EBO_DESCRIPTION
# @DESCRIPTION:
# Should be set. Completes the describtion of the embassy module as follows:
#
# EMBOSS integrated version of EBO_DESCRIPTION"
#
# Defaults to the upstream name of the module.

# @ECLASS-VARIABLE: EBO_PATCH
# @DEFAULT_UNSET
# @DESCRIPTION: Specify the patch level of EMBOSS. Only available for the emboss ebuild.
# The patch wil be fetch from:
#
# ftp://emboss.open-bio.org/pub/EMBOSS/fixes/patches/patch-1-${EBO_PATCH}.gz.
#
# Embassy packages should create one patch package and place it in FILESDIR, e.g.
# "files/embassy-iprscan-4.3.1-r2.patch". The patch will be automatically used during src_prepare

# @ECLASS-VARIABLE: NO_RECONF
# @DEFAULT_UNSET
# @DESCRIPTION:
# Set this, if you do not want to have eautoreconf be run after patching.

# @ECLASS-VARIABLE: EBO_ECONF
# @DEFAULT_UNSET
# @DESCRIPTION:
# Extra config options passed to econf, similar to EXTRA_ECONF.

EAPI="4"

inherit autotools eutils multilib

HOMEPAGE="http://emboss.sourceforge.net"
LICENSE="LGPL-2 GPL-2"

SLOT="0"
IUSE="mysql pdf png postgres static-libs X "

DEPEND="
dev-libs/expat
dev-libs/libpcre:3
sci-libs/plplot
sys-libs/zlib
mysql? ( dev-db/mysql )
pdf? ( media-libs/libharu )
png? ( media-libs/gd[png] )
postgres? ( dev-db/postgresql-base )
X? ( x11-libs/libXt )
"

RDEPEND="
${DEPEND}
"

DOCS="AUTHORS ChangeLog NEWS README "

if [[ ${PN} == "emboss" ]] ; then
EBOV=${PV/_p*}
DESCRIPTION="The European Molecular Biology Open Software Suite - A sequence analysis package"
SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-${EBOV}.tar.gz"
[[ -n ${EBO_PATCH} ]] && SRC_URI+=" ftp://${PN}.open-bio.org/pub/EMBOSS/fixes/patches/patch-1-${EBO_PATCH}.gz -> ${P}.patch.gz"
IUSE+="minimal "
RDEPEND+="
!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-${EBOV}
DOCS+="FAQ THANKS "
else
# The EMBASSY package name, retrieved from the inheriting ebuild's name
EN=${PN:8}
# The full name and version of the EMBASSY package (excluding the Gentoo
# revision number)
EF=$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}
EBO_DESCRIPTION=${EBO_DESCRIPTION:=${EN}}
DESCRIPTION="EMBOSS integrated version of ${EBO_DESCRIPTION}"
SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/${EF}.tar.gz -> embassy-${PN:8}-${PV}.tar.gz"
DEPEND+=">=sci-biology/emboss-6.3.1_p4[mysql=,pdf=,png=,postgres=,static-libs=,X=] "

S=${WORKDIR}/${EF}
fi

# @FUNCTION: emboss_src_prepare
# @USAGE:
# @RETURN:
# @MAINTAINER:
# @DESCRIPTION:
# Does three things
#
# 1. Patches EMBOSS if EBO_PATCH is set
# 2. Patches with "${FILESDIR}"/${PF}.patch, of present
# 3. Runs eautoreconf unless NO_RECONF is set
#

emboss_src_prepare() {
[[ ${PN} == emboss ]] && [[ -n ${EBO_PATCH} ]] && epatch "${WORKDIR}"/${P}.patch
[[ -f "${FILESDIR}"/${PF}.patch ]] && epatch "${FILESDIR}"/${PF}.patch
[[ -n ${NO_RECONF} ]] || eautoreconf
}

# @FUNCTION: emboss_src_prepare
# @USAGE:
# @RETURN:
# @MAINTAINER:
# @DESCRIPTION:
# runs econf with following options. Extra options can be passed by setting EBO_ECONF
#
# $(use_with X x)
# $(use_with png pngdriver "${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)
# --enable-large
# --without-java
# --enable-systemlibs
# ${EBO_ECONF}

emboss_src_configure() {
econf
$(use_with X x)
$(use_with png pngdriver "${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)
--enable-large
--without-java
--enable-systemlibs
${EBO_ECONF}
}

# @FUNCTION: emboss_src_install
# @USAGE:
# @RETURN:
# @MAINTAINER:
# @DESCRIPTION:
# Standard src_install. Takes care of correct position of docs.

emboss_src_install() {
default
mv "${ED}"/usr/share/EMBOSS/doc/* "${ED}"/usr/share/doc/${PF}/
rm -rf "${ED}"/usr/share/EMBOSS/doc
}

[[ ${PN} == embassy ]] || EXPORT_FUNCTIONS src_prepare src_configure src_install
 
Old 03-15-2011, 08:25 PM
Tomáš Chvátal
 
Default RFC: emboss.eclass as replacement for embassy.eclass

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dne 15.3.2011 21:51, justin napsal(a):
> Donnie pointed out, that it might be clever to attach what I want to
> have reviewed. So here it is.
>
> justin
EAPI CAN'T BE DEFINED IN ECLASS!
this should be craved into stones

Some whitespace is funny.

look on XFCONF_AUTORECONF or XORG_AUTORECONF variable, just create
EBO_AUTORECONF with yes by default and handle it correctly.

i am seriously hurt by $(use_enable amd64 64)

why are not those functions exported for embassy ebuild?

Cheers

Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1/2UcACgkQHB6c3gNBRYd7owCgsP74VUYO0oQ5w2UNoYNXS0aA
zoUAnRMrGLAA/8kj4hX7Jc+QCb5cPJdb
=lz/B
-----END PGP SIGNATURE-----
 
Old 03-15-2011, 09:06 PM
Mike Frysinger
 
Default RFC: emboss.eclass as replacement for embassy.eclass

> # Copyright 1999-2004 Gentoo Foundation

s/2004/2011/

have you looked at the man page output for this to make sure the white spacing
you're putting into the comments properly carries over ?

> # @ECLASS-VARIABLE: EBO_DESCRIPTION
> # @DESCRIPTION:
> # Should be set. Completes the describtion of the embassy module as follows:

i dont understand what this is trying to say (ignoring the spelling mistake in
description)

> # EMBOSS integrated version of EBO_DESCRIPTION"

i see just one quote. it needs a friend.

> # @ECLASS-VARIABLE: EBO_PATCH
> # @DEFAULT_UNSET
> # @DESCRIPTION: Specify the patch level of EMBOSS. Only available for the
emboss ebuild.
> # The patch wil be fetch from:

wil -> will

> # @ECLASS-VARIABLE: NO_RECONF
> # @DEFAULT_UNSET
> # @DESCRIPTION:
> # Set this, if you do not want to have eautoreconf be run after patching.

please namespace all variables consistently

> # @ECLASS-VARIABLE: EBO_ECONF

EBO_EXTRA_ECONF is better for consistency sake too

> EAPI="4"

erp!

> HOMEPAGE="http://emboss.sourceforge.net"

could do with a trailing "/"

> IUSE="mysql pdf png postgres static-libs X "

no trailing space. let the person appending the variable add the space:
IUSE+=" moo"

> DOCS="AUTHORS ChangeLog NEWS README "

no need for that trailing space, and usually DOCS is left for end ebuilds isnt
it ? eclasses should append it.

>
> if [[ ${PN} == "emboss" ]] ; then
> EBOV=${PV/_p*}
> DESCRIPTION="The European Molecular Biology Open Software Suite - A
sequence analysis package"
> SRC_URI="ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-${EBOV}.tar.gz"
> [[ -n ${EBO_PATCH} ]] && SRC_URI+=" ftp://${PN}.open-
bio.org/pub/EMBOSS/fixes/patches/patch-1-${EBO_PATCH}.gz -> ${P}.patch.gz"
> IUSE+="minimal "
> RDEPEND+="
> !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-${EBOV}
> DOCS+="FAQ THANKS "

this doesnt make much sense to me. shouldnt this all be in the emboss ebuild
instead of the eclass ?

> # The EMBASSY package name, retrieved from the inheriting ebuild's name
> EN=${PN:8}

should there be some checking here to make sure it starts with "embassy-" or
whatever you're expecting ?

> # The full name and version of the EMBASSY package (excluding the Gentoo
> # revision number)
> EF=$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}

ugh, but i guess we cant do much until we have newer bash

> EBO_DESCRIPTION=${EBO_DESCRIPTION:=${EN}}

tricky, but wrong. i guess you actually want:
: ${EBO_DESCRIPTION:=${EN}}

> DEPEND+=">=sci-biology/emboss-6.3.1_p4[mysql=,pdf=,png=,postgres=,static-
libs=,X=] "

space should be at the start of the string, not the end

> # @FUNCTION: emboss_src_prepare
> # @USAGE:
> # @RETURN:
> # @MAINTAINER:

i dont think these three tags make sense. not even sure if this last one is
even allowed. best to just punt.

same goes for all the other funcs below.

> emboss_src_prepare() {
> [[ ${PN} == emboss ]] && [[ -n ${EBO_PATCH} ]] && epatch
"${WORKDIR}"/${P}.patch

guess that would be moved to the emboss ebuild

> [[ -f "${FILESDIR}"/${PF}.patch ]] && epatch "${FILESDIR}"/${PF}.patch

technically, no need to quote FILESDIR here as the [[...]] takes care of it

> # $(use_with png pngdriver "${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")

do you really need full paths here ? are the configure scripts that screwed
up ? ideally libs would be found via .pc files.

> # $(use_enable amd64 64)

oh god it burns so bad when i poo

> emboss_src_install() {
> default
> mv "${ED}"/usr/share/EMBOSS/doc/* "${ED}"/usr/share/doc/${PF}/
> rm -rf "${ED}"/usr/share/EMBOSS/doc

does the configure script respect --docdir= ? then you wouldnt need this
clean up logic ...

> [[ ${PN} == embassy ]] || EXPORT_FUNCTIONS src_prepare src_configure
src_install

this $PN logic should get punted
-mike
 
Old 03-15-2011, 10:25 PM
Duncan
 
Default RFC: emboss.eclass as replacement for embassy.eclass

Mike Frysinger posted on Tue, 15 Mar 2011 18:06:36 -0400 as excerpted:

>> # The patch wil be fetch from:
>
> wil -> will

While you're at it, s/fetch/fetched/

IOW:

# The patch will be fetched from:

--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
 
Old 03-16-2011, 02:00 AM
Jeroen Roovers
 
Default RFC: emboss.eclass as replacement for embassy.eclass

On Tue, 15 Mar 2011 18:06:36 -0400
Mike Frysinger <vapier@gentoo.org> wrote:

> > # The full name and version of the EMBASSY package
> > (excluding the Gentoo # revision number)
> > EF=$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}
>
> ugh, but i guess we cant do much until we have newer bash

bash 4.1 has been stable for half a year now. Not long enough?

EF="${EN^^}"


jer
 
Old 03-16-2011, 02:17 AM
Jeremy Olexa
 
Default RFC: emboss.eclass as replacement for embassy.eclass

On 03/15/2011 10:00 PM, Jeroen Roovers wrote:

On Tue, 15 Mar 2011 18:06:36 -0400
Mike Frysinger<vapier@gentoo.org> wrote:


# The full name and version of the EMBASSY package
(excluding the Gentoo # revision number)
EF=$(echo ${EN} | tr "[:lower:]" "[:upper:]")-${PV}


ugh, but i guess we cant do much until we have newer bash


bash 4.1 has been stable for half a year now. Not long enough?

EF="${EN^^}"


Not until PMS specifies[1] something other than: "The interpreter is
assumed to be GNU bash, version 3.2 or later"


[1]: http://dev.gentoo.org/~ulm/pms/head/pms.html#x1-650007

-Jeremy
 
Old 03-16-2011, 05:48 AM
justin
 
Default RFC: emboss.eclass as replacement for embassy.eclass

On 15/03/11 22:25, Tomáš Chvátal wrote:
> Dne 15.3.2011 21:51, justin napsal(a):
>> Donnie pointed out, that it might be clever to attach what I want to
>> have reviewed. So here it is.
>
>> justin
> EAPI CAN'T BE DEFINED IN ECLASS!
> this should be craved into stones

I didn't see this mentioned anywhere in the docs. But okay, this is fixable.

>
> Some whitespace is funny.

I love funny whitespaces.

>
> look on XFCONF_AUTORECONF or XORG_AUTORECONF variable, just create
> EBO_AUTORECONF with yes by default and handle it correctly.

Thanks for that hint. I will change it accordingly.

>
> i am seriously hurt by $(use_enable amd64 64)

Where is the problem? The purpose of the eclass is not to repeat the
same code 20 times. Why can't this be here?

>
> why are not those functions exported for embassy ebuild?

Just a Meta ebuild to install all modules (emabassy-*).

>
> Cheers
>
> Tom

thanks justin
 
Old 03-16-2011, 06:02 AM
justin
 
Default RFC: emboss.eclass as replacement for embassy.eclass

On 15/03/11 23:06, Mike Frysinger wrote:
>> # Copyright 1999-2004 Gentoo Foundation
>
> s/2004/2011/
>
> have you looked at the man page output for this to make sure the white spacing
> you're putting into the comments properly carries over ?

I will do this before the final commit. Currently it is alright.

>
>> # @ECLASS-VARIABLE: EBO_DESCRIPTION
>> # @DESCRIPTION:
>> # Should be set. Completes the describtion of the embassy module as follows:
>
> i dont understand what this is trying to say (ignoring the spelling mistake in
> description)

These are all modules for EMBOSS. I want to shorten the Description of
each ebuild to the important part. But I will makes this clearer for the
manpage. What I don't want, is what you can read in all the gstreamer
plugins "plugins for foo"

>> HOMEPAGE="http://emboss.sourceforge.net"
>
> could do with a trailing "/"

I asked myself quite often, if this needed or not. What is the purpose
of the trailing "/"?

//
snip
//

>> # $(use_with png pngdriver "${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")
>
> do you really need full paths here ? are the configure scripts that screwed
> up ? ideally libs would be found via .pc files.

It f..ing defaults to / roots if not specified

>
>> # $(use_enable amd64 64)
>
> oh god it burns so bad when i poo
>
>> emboss_src_install() {
>> default
>> mv "${ED}"/usr/share/EMBOSS/doc/* "${ED}"/usr/share/doc/${PF}/
>> rm -rf "${ED}"/usr/share/EMBOSS/doc
>
> does the configure script respect --docdir= ? then you wouldnt need this
> clean up logic ...

It soesn't and actually the java part (not installed yet) expects docs
here. I am not sure where this could be left like this or breaks somehting.

> -mike

Thanks mike for all your suggestions and remarks. I will fix the eclass
accordingly.

justin
 
Old 03-16-2011, 06:20 AM
justin
 
Default RFC: emboss.eclass as replacement for embassy.eclass

>> # $(use_enable amd64 64)
>
> oh god it burns so bad when i poo
>

I couldn't find out why this burns so much. The eclass is inherited from
the ebuild during emerge, so it should be aware of the current system.
So what is the problem? Only thing I can think of is crosscompiling, but
even there your profile should set this.
Could you explain that to me?

Thanks justin
 

Thread Tools




All times are GMT. The time now is 10:07 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org