View previous topic :: View next topic |
Author |
Message |
MoonWalker Guru
Joined: 04 Jul 2002 Posts: 510
|
Posted: Sat Feb 15, 2003 4:10 pm Post subject: econf ? |
|
|
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 |
|
|
fifo Guru
Joined: 14 Jan 2003 Posts: 437
|
Posted: Sat Feb 15, 2003 4:13 pm Post subject: |
|
|
There's a brief description in /usr/portage/skel.ebuild. |
|
Back to top |
|
|
zhenlin Veteran
Joined: 09 Nov 2002 Posts: 1361
|
Posted: Sat Feb 15, 2003 4:19 pm Post subject: |
|
|
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 |
|
|
MoonWalker Guru
Joined: 04 Jul 2002 Posts: 510
|
Posted: Sat Feb 15, 2003 5:35 pm Post subject: |
|
|
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 |
|
|
zhenlin Veteran
Joined: 09 Nov 2002 Posts: 1361
|
Posted: Sun Feb 16, 2003 2:35 am Post subject: |
|
|
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 |
|
|
MoonWalker Guru
Joined: 04 Jul 2002 Posts: 510
|
Posted: Sun Feb 16, 2003 9:32 am Post subject: |
|
|
Well I'm not so sure about that, I assume you refer to
which you changed to
?
With your correction
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 |
|
|
zhenlin Veteran
Joined: 09 Nov 2002 Posts: 1361
|
Posted: Sun Feb 16, 2003 12:41 pm Post subject: |
|
|
Curly braces != Round braces.
${myconf} not $(myconf) |
|
Back to top |
|
|
MoonWalker Guru
Joined: 04 Jul 2002 Posts: 510
|
Posted: Sun Feb 16, 2003 1:22 pm Post subject: |
|
|
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 |
|
|
|