Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
econf ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
MoonWalker
Guru
Guru


Joined: 04 Jul 2002
Posts: 510

PostPosted: Sat Feb 15, 2003 4:10 pm    Post subject: econf ? Reply with quote

Hi,

I try to learn the art of making ebuilds by making some euilds apache2 aware, but it's kinda hard when documentation not is kept upto date. The comand "econf" are used in later ebuilds but there is no documentation on how it works. Anyone? a simple syntax and desc or someting.
_________________
/Joakim

Living on earth is expensive, but it includes a free trip around the sun
every year.
Back to top
View user's profile Send private message
fifo
Guru
Guru


Joined: 14 Jan 2003
Posts: 437

PostPosted: Sat Feb 15, 2003 4:13 pm    Post subject: Reply with quote

There's a brief description in /usr/portage/skel.ebuild.
Back to top
View user's profile Send private message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Sat Feb 15, 2003 4:19 pm    Post subject: Reply with quote

You should read /usr/portage/skel.ebuild more often. It is the most helpful ebuild developers 1st encyclopedia I've ever read.

ANywho, this is what econf does:
Code:

econf() {
        if [ -x ./configure ] ; then
                if [ ! -z "${CBUILD}" ]; then
                        EXTRA_ECONF="--build=${CBUILD} ${EXTRA_ECONF}"
                fi
                ./configure \
                    --prefix=/usr \
                    --host=${CHOST} \
                    --mandir=/usr/share/man \
                    --infodir=/usr/share/info \
                    --datadir=/usr/share \
                    --sysconfdir=/etc \
                    --localstatedir=/var/lib \
                                ${EXTRA_ECONF} \
                    "$@" || die "econf failed"
        else
                die "no configure script found"
        fi
}
Back to top
View user's profile Send private message
MoonWalker
Guru
Guru


Joined: 04 Jul 2002
Posts: 510

PostPosted: Sat Feb 15, 2003 5:35 pm    Post subject: Reply with quote

Ok thanks, the coment in ebuild.skel about econf was really nada, but the econf function helped.... abit unsure though if this is ok?
Code:
src_compile() {
        #econf \
        local myconf

        myconf="--enable-dns "

        # optional support for apache2
        use apache2 && myconf="${myconf} --with-etcdir=/etc/apache2/conf" \
                || myconf="${myconf} --with-etcdir=/etc/apache/conf"

        econf myconf || die
        make || die
}


It's from webalizer.ebuild which I try to make apache2 compatible
_________________
/Joakim

Living on earth is expensive, but it includes a free trip around the sun
every year.
Back to top
View user's profile Send private message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Sun Feb 16, 2003 2:35 am    Post subject: Reply with quote

Code:

src_compile() {
        #econf \
        local myconf

        myconf="--enable-dns "

        # optional support for apache2
        use apache2 && myconf="${myconf} --with-etcdir=/etc/apache2/conf" \
                || myconf="${myconf} --with-etcdir=/etc/apache/conf"

        econf ${myconf} || die
        make || die
}


You made a small typo.
Back to top
View user's profile Send private message
MoonWalker
Guru
Guru


Joined: 04 Jul 2002
Posts: 510

PostPosted: Sun Feb 16, 2003 9:32 am    Post subject: Reply with quote

Well I'm not so sure about that, I assume you refer to
Code:
econf myconf
which you changed to
Code:
econf $(myconf)
?

With your correction
Code:
#emerge webalizer

results in
Code:
>>>Source unpacked
apache2
/usr/sbin/ebuild.sh: line 1: myconf: command not found

while mine
Code:
>>>Source unpacked
apache2
creating cache ./config.cache
checking for gcc... gcc


I don't know, maybe none of them are valid but mine at least don't cause complaint. Anyhow, here are the whole ebuild script as I submitted it to bugzilla. I must say though I'm still abit unsure wether I got it right with the conf files etc. but guess the maintainer will sort that out now when the raw work is done.
_________________
/Joakim

Living on earth is expensive, but it includes a free trip around the sun
every year.
Back to top
View user's profile Send private message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Sun Feb 16, 2003 12:41 pm    Post subject: Reply with quote

Curly braces != Round braces.

${myconf} not $(myconf)
Back to top
View user's profile Send private message
MoonWalker
Guru
Guru


Joined: 04 Jul 2002
Posts: 510

PostPosted: Sun Feb 16, 2003 1:22 pm    Post subject: Reply with quote

ops! I blaim it all on konq, it always display with such smal fonts and sometime I'm to lazy to manually enlage them :-)
_________________
/Joakim

Living on earth is expensive, but it includes a free trip around the sun
every year.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum