Re: [gentoo-dev] src_configure

2005-08-23 Thread Paul de Vrieze
On Thursday 07 July 2005 03:14, Aron Griffis wrote:
 Roy Marples wrote:[Wed Jul 06 2005, 08:51:17PM EDT]

  ebuilds could be changed over time - unless I'm missing something
  basic here ..

 Yes, you're missing the default functions.  Presently src_compile does
 (effectively) econf  emake if the function isn't defined.  That
 would be broken into two default functions now, but none of the
 ebuilds have src_configure defined, so it would be broken for all of
 them.

Another issue is the fact that current portage versions will not work with 
ebuilds with the new format. The format code at least should be out for a 
while before changing the ebuilds over.

Paul

-- 
Paul de Vrieze
Gentoo Developer
Mail: [EMAIL PROTECTED]
Homepage: http://www.devrieze.net


pgpS7kS8XObEc.pgp
Description: PGP signature


Re: [gentoo-dev] src_configure

2005-07-07 Thread Daniel Drake
Jonathan Smith wrote:
 you could simply make the default:
 
 src_configure() {
   [ -f ./configure ]  econf || die
 }


No need, this will do fine as a default:

src_configure() {
econf || die
}

Since econf already checks for a configure script and does nothing if it can't
find one...

Daniel
-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] src_configure

2005-07-07 Thread twofourtysix
On 07/07/05, Daniel Drake [EMAIL PROTECTED] wrote:
 src_configure() {
 econf || die
 }
 
 Since econf already checks for a configure script and does nothing if it can't
 find one...

Yours might do. The one I have in /usr/sbin/ebuild.sh from portage
2.0.51.22-r1 says this:

econf() {
»···local LOCAL_EXTRA_ECONF=${EXTRA_ECONF}

»···if [ -z ${ECONF_SOURCE} ]; then
»···»···ECONF_SOURCE=.
»···fi
»···if [ -x ${ECONF_SOURCE}/configure ]; then
+- 78 lines: if [ -e /usr/share/gnuconfig/ ]; then--
»···else
»···»···die no configure script found
»···fi
}

-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] src_configure

2005-07-07 Thread Martin Schlemmer
On Thu, 2005-07-07 at 02:04 +0200, Sven Wegener wrote:
 Hi all!
 
 I'm writing this mail to bring you a thought we had over on freenode in
 the #gentoo-portage channel. We would like to split up src_compile. The
 new src_configure should just do the econf part and src_compile should
 do the emake part. This represents the general 3-step[1] installation in
 a much better way.
 

Will make debugging compile failures much easier imho.


-- 
Martin Schlemmer
Gentoo Linux Developer, Desktop/System Team Developer
Cape Town, South Africa



signature.asc
Description: This is a digitally signed message part


Re: [gentoo-dev] src_configure

2005-07-07 Thread twofourtysix
On 07/07/05, Sven Wegener [EMAIL PROTECTED] wrote:
 I'm writing this mail to bring you a thought we had over on freenode in
 the #gentoo-portage channel. We would like to split up src_compile. The
 new src_configure should just do the econf part and src_compile should
 do the emake part. This represents the general 3-step[1] installation in
 a much better way.

Whilst you're at it... Why not split unpack up into, say, unpack and
prepare? Make src_unpack's default stay the same and use src_prepare
for patches and autotools things? This will avoid the pointless
duplication of the default src_unpack code that's currently used in
many ebuilds.

-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] src_configure

2005-07-07 Thread Henrik Brix Andersen
On Thu, 2005-07-07 at 15:25 +0100, twofourtysix wrote:
 Whilst you're at it... Why not split unpack up into, say, unpack and
 prepare? Make src_unpack's default stay the same and use src_prepare
 for patches and autotools things? This will avoid the pointless
 duplication of the default src_unpack code that's currently used in
 many ebuilds.

Not a bad idea, actually...

./Brix
-- 
Henrik Brix Andersen [EMAIL PROTECTED]
Gentoo Metadistribution | Mobile computing herd


signature.asc
Description: This is a digitally signed message part


Re: [gentoo-dev] src_configure

2005-07-06 Thread Diego 'Flameeyes' Pettenò
On Thursday 07 July 2005 02:04, Sven Wegener wrote:
 We would like to split up src_compile. The
 new src_configure should just do the econf part and src_compile should
 do the emake part.
That will be very very interesting but... but not everything uses ./configure, 
so we should add a bunch of dummy src_configure, and a call to econf || die 
 for those packages not fixed to use that will return a bunch of erroneous 
packages not compiling.

-- 
Diego Flameeyes Pettenò
Gentoo Developer - http://dev.gentoo.org/~flameeyes/
(Gentoo/FreeBSD, Video, Gentoo/AMD64, Sound, PAM)


pgpbHveMXAjRf.pgp
Description: PGP signature


Re: [gentoo-dev] src_configure

2005-07-06 Thread Ian Leitch
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sven Wegener wrote:
 Hi all!
 
 I'm writing this mail to bring you a thought we had over on freenode in
 the #gentoo-portage channel. We would like to split up src_compile. The
 new src_configure should just do the econf part and src_compile should
 do the emake part. This represents the general 3-step[1] installation in
 a much better way.
 
 Regards,
 Sven
 
 [1] ./configure  make  make install

I made some patches[1] to do this years ago, I was told by the portage
devs at the time (can't remember who) that they should probably be
includes some time in the future. Maybe now is the time?

1:  http://dev.gentoo.org/~port001/Patches/configure-ebuild.sh.patch
http://dev.gentoo.org/~port001/Patches/configure-portage-py.patch
(NOTE: these probably don't apply anymore, seeing as they were made
in december 2003).

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCzIYXefZ4eWAXRGIRAuNNAKCQHoEqZ/vsMiOORxt27veqar4gkQCfdFLT
daFN7flKJXqo7eCEDfMYJGQ=
=fhld
-END PGP SIGNATURE-
-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] src_configure

2005-07-06 Thread Mike Frysinger
On Wednesday 06 July 2005 08:27 pm, Jonathan Smith wrote:
 you could simply make the default:

 src_configure() {
   [ -f ./configure ]  econf || die
 }

well you cant because then die would be called if ./configure isnt a file but 
i think that's irrelevant to the point you're trying to make ;)
-mike
-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] src_configure

2005-07-06 Thread Diego 'Flameeyes' Pettenò
On Thursday 07 July 2005 02:27, Jonathan Smith wrote:
 src_configure() {
   [ -f ./configure ]  econf || die
 }
I'm not still convinced about this.

-- 
Diego Flameeyes Pettenò
Gentoo Developer - http://dev.gentoo.org/~flameeyes/
(Gentoo/FreeBSD, Video, Gentoo/AMD64, Sound, PAM)


pgprfAEphLu8T.pgp
Description: PGP signature


Re: [gentoo-dev] src_configure

2005-07-06 Thread Joshua Baergen

Jonathan Smith wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Diego 'Flameeyes' Pettenò wrote:
 


On Thursday 07 July 2005 02:04, Sven Wegener wrote:

   


We would like to split up src_compile. The
new src_configure should just do the econf part and src_compile should
do the emake part.
 

That will be very very interesting but... but not everything uses ./configure, 
so we should add a bunch of dummy src_configure, and a call to econf || die 
 for those packages not fixed to use that will return a bunch of erroneous 
packages not compiling.


   



you could simply make the default:

src_configure() {
[ -f ./configure ]  econf || die
}

- --

smithj

Gentoo Developer
[ desktop stuff  netmon  documentation ]


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCzHcJl5AvwDPiUowRAqeFAJwIxve3a/X5BnlSBOxfv/Ac2lMAaACg30Pg
62/3CVfdiHVSppJfEe73DsY=
=lK9Q
-END PGP SIGNATURE-
 


By order of operations that won't work...I think you'll have to do if/then.

if [ -f ./configure ]
then
   econf || die
fi

But that's a possible solution for sure.  It would still introduce a lot 
of ebuild editing for those ebuilds doing special conf stuff though.


Joshua Baergen

P.S. I tried sending this earlier but my client barfed, so I apologize 
if it ends up double.

--
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] src_configure

2005-07-06 Thread Thomas de Grenier de Latour
On Thu, 7 Jul 2005 02:04:04 +0200
Sven Wegener [EMAIL PROTECTED] wrote:

 We would like to split up src_compile. The new src_configure
 should just do the econf part and src_compile should do the
 emake part.

Just by curiosity, i've run a grep on the tree to count occurences
of ^[[:space:]]*econf and ^[[:space:]]*\..*/configure in
ebuilds. Here are the results (that's numbers of ebuilds, not
packages, grouped by the number of econf/configure they have):

 1: 5736
 2: 182
 3: 12
 4: 3
 5: 2
 7: 3

I would have thought this figures would be much worst, but that's
actually a few tenths of packages with 2 config calls, and only
~10 with 3+. 


Looking at some random ebuilds with 2+ econf/configure, it seems
that the most frequent pattern is something like that:

src_compile() {
econf  || die
emake  || die
if use foo ; then
cd ${S}/foo-plugin
econf || die
emake || die
fi
}


Sure, spliting that will produce a bit of code duplication. It's
a bit less readable imho, but that's really just a cosmetic
issue: 

src_configure() {
econf  || die
if use foo ; then
cd ${S}/foo-plugin
econf || die
fi
}

src_compile() {
emake  || die
if use foo ; then
cd ${S}/foo-plugin
emake || die
fi
}



I've also searched for some more problematic ebuilds, like some
which would configure  build the same source several times
(x11-libs/wxGTK maybe, also i'm not really sure) or some which
would first configure and build a libfoo/ subtree, and then
configure and build the main program (did not found any of that
kind, but i would not be surprised some exists).


If anyone want to have a look on my list to find some package
that may be problematic, it's here:
http://tdegreni.free.fr/gentoo/ebuilds_with_two_or_more_configure.list

(disclaimer: yup, keep in mind i've just done a quick grep on
the tree - this figures might not be completly meaningless, but
are for sure not accurate)

-- 
TGL.
-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] src_configure

2005-07-06 Thread Kumba

Diego 'Flameeyes' Pettenò wrote:


That will be very very interesting but... but not everything uses ./configure, 
so we should add a bunch of dummy src_configure, and a call to econf || die 
 for those packages not fixed to use that will return a bunch of erroneous 
packages not compiling.


I know some packages off the top of my head, like Perl and OpenSSL use their own 
odd variants of configure.  There are likely many others.


Kernel ebuilds probably need special treatment, as they don't really go through 
a configure and compile phase.



--Kumba

--
Gentoo/MIPS Team Lead
Gentoo Foundation Board of Trustees

Such is oft the course of deeds that move the wheels of the world: small hands 
do them because they must, while the eyes of the great are elsewhere.  --Elrond

--
gentoo-dev@gentoo.org mailing list