Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-30 Thread Petteri Räty
Nirbheek Chauhan kirjoitti: On Sat, Sep 27, 2008 at 3:47 PM, Thomas Sachau <[EMAIL PROTECTED]> wrote: So what about this one? default_src_install() { if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then emake DESTDIR="${D}" install || die "emake install failed

Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-28 Thread Nirbheek Chauhan
On Sat, Sep 27, 2008 at 3:47 PM, Thomas Sachau <[EMAIL PROTECTED]> wrote: > So what about this one? > > default_src_install() { >if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then >emake DESTDIR="${D}" install || die "emake install failed" >fi >

Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-27 Thread Thomas Sachau
Nirbheek Chauhan schrieb: > On Wed, Sep 24, 2008 at 4:51 AM, Bo Ørsted Andresen <[EMAIL PROTECTED]> wrote: >> On Tuesday 23 September 2008 21:39:52 Thomas Sachau wrote: > >>> if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then > [...] >>> fi > > - So if those makefiles don't

Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-24 Thread Bo Ørsted Andresen
On Wednesday 24 September 2008 07:28:07 Alec Warner wrote: > > Now figure out the four flaws in the above code. > > Why not be helpful and point them out? > > I would call your comment 'UnGentooey', if I may use a work term.  I > don't think saying there are flaws in a given piece of code is really

Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-24 Thread Santiago M. Mola
El mié, 24-09-2008 a las 02:35 +0200, Robert Buchholz escribió: > > Let's go with an even simpler default implementation: > > default_src_install() { > if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then > emake DESTDIR="${D}" install || die "emake install failed

Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-24 Thread Nirbheek Chauhan
On Wed, Sep 24, 2008 at 4:51 AM, Bo Ørsted Andresen <[EMAIL PROTECTED]> wrote: > On Tuesday 23 September 2008 21:39:52 Thomas Sachau wrote: >> default_src_install() { >> if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then >> if emake DESTDIR="${D} install || einstall ;

[gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-23 Thread Duncan
Steve Long <[EMAIL PROTECTED]> posted [EMAIL PROTECTED], excerpted below, on Wed, 24 Sep 2008 02:34:33 +0100: > "Why do we never have time to do it right, but always plenty of time to > do it over." > In this case, you're saying "oh anyone who wants something that copes > with all filenames can

[gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-23 Thread Ulrich Mueller
> On Wed, 24 Sep 2008, Steve Long wrote: > As I said; generality in lib functions seems like a useful thing. Other ebuild variables are space separated lists, so why should DOCS be an exception? So far nobody has shown a real-life example of an existing ebuild that could profit from the arra

Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-23 Thread Alec Warner
On Tue, Sep 23, 2008 at 4:21 PM, Bo Ørsted Andresen <[EMAIL PROTECTED]> wrote: > On Tuesday 23 September 2008 21:39:52 Thomas Sachau wrote: >> default_src_install() { >> if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then >> if emake DESTDIR="${D} install || einstall ;

Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-23 Thread Robert Buchholz
On Tuesday 23 September 2008, Thomas Sachau wrote: > Ulrich Mueller schrieb: > > And I still don't see why we would need the most general solution > > for a *default* function. There's always the possibility to write > > your own src_install() for the few ebuilds that need it. > > > > Ulrich > > I

Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-23 Thread Bo Ørsted Andresen
On Tuesday 23 September 2008 21:39:52 Thomas Sachau wrote: > default_src_install() { >         if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then >                 if emake DESTDIR="${D} install || einstall ; then >                         die "install failed" >                 else >      

Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-23 Thread Thomas Sachau
Ulrich Mueller schrieb: >> On Sun, 21 Sep 2008, Steve Long wrote: > >> That works for that specific case, yes, but it's still not a general >> solution, which is what BASH arrays were invented for. For instance, >> an ebuild author cannot specifically include a file with spaces, and >> ignore

[gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-22 Thread Duncan
Steve Long <[EMAIL PROTECTED]> posted [EMAIL PROTECTED], excerpted below, on Mon, 22 Sep 2008 01:35:57 +0100: >> This is an old rhetorical trick (I don't know its name in English): You >> impute that I claimed things which I never said - of course, then it is >> easy for you to prove that these t

[gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-22 Thread Duncan
"Alec Warner" <[EMAIL PROTECTED]> posted [EMAIL PROTECTED], excerpted below, on Sun, 21 Sep 2008 18:35:04 -0700: > gentoo-x86 uses bash; the ebuilds, the eclasses, they all rely on it. > I'm pretty sure most package managers rely on bash as well, but I have > not looked at the code outside of por

Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-21 Thread Alec Warner
On Sat, Sep 20, 2008 at 11:18 PM, Vaeth <[EMAIL PROTECTED]> wrote: > Steve Long wrote: > >> Thomas Sachau wrote: [...] >> >> > [[ -n ${DOCS} ]] && dodoc ${DOCS} > [...] >> >> It might be wise to use an array for DOCS there > > Since I have now seen suggestions for using arrays unnecessarily > at le

[gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-21 Thread Steve Long
Ulrich Mueller wrote: >> On Sun, 21 Sep 2008, Steve Long wrote: > >> That works for that specific case, yes, but it's still not a general >> solution, which is what BASH arrays were invented for. For instance, >> an ebuild author cannot specifically include a file with spaces, and >> ignore a

[gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-21 Thread Ulrich Mueller
> On Sun, 21 Sep 2008, Steve Long wrote: > That works for that specific case, yes, but it's still not a general > solution, which is what BASH arrays were invented for. For instance, > an ebuild author cannot specifically include a file with spaces, and > ignore all the other files in the same

[gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-21 Thread Steve Long
Ulrich Mueller wrote: >> On Mon, 22 Sep 2008, Kent Fredric wrote: > >> find /usr/share/doc/ -wholename "* *" >> /usr/share/doc/gpac-0.4.4-r1/ISO 639-2 codes.txt.bz2 > > Yes, and if you look into src_install of the ebuild, it does: > dodoc doc/*.txt > Well at least we've established that

[gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-21 Thread Ulrich Mueller
> On Mon, 22 Sep 2008, Kent Fredric wrote: > find /usr/share/doc/ -wholename "* *" > /usr/share/doc/gpac-0.4.4-r1/ISO 639-2 codes.txt.bz2 Yes, and if you look into src_install of the ebuild, it does: dodoc doc/*.txt So a simple "dodoc ${DOCS}" with DOCS="... doc/*.txt ..." would work eve

Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-21 Thread Kent Fredric
On Mon, Sep 22, 2008 at 1:04 AM, Ulrich Mueller <[EMAIL PROTECTED]> wrote: > > > On Sun, 21 Sep 2008, Steve Long wrote: > > > Vaeth wrote: > >> let me remark that the more clever way to this is > >> [ -n "${DOCS}" ] && eval "dodoc ${DOCS}" > > > [...] > > BASH arrays will cope with *any* charac

[gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-21 Thread Ulrich Mueller
> On Sun, 21 Sep 2008, Steve Long wrote: > Vaeth wrote: >> let me remark that the more clever way to this is >> [ -n "${DOCS}" ] && eval "dodoc ${DOCS}" > [...] > BASH arrays will cope with *any* character apart from NUL, which > isn't allowed in filenames. Can you _guarantee_ the same? It s

Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-21 Thread Thomas Anderson
On Sun, Sep 21, 2008 at 08:18:05AM +0200, Vaeth wrote: > Steve Long wrote: > > > Thomas Sachau wrote: [...] > > > > > [[ -n ${DOCS} ]] && dodoc ${DOCS} > [...] > > > > It might be wise to use an array for DOCS there > > Since I have now seen suggestions for using arrays unnecessarily > at least

Re: [gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-20 Thread Vaeth
Steve Long wrote: > Thomas Sachau wrote: [...] > > > [[ -n ${DOCS} ]] && dodoc ${DOCS} [...] > > It might be wise to use an array for DOCS there Since I have now seen suggestions for using arrays unnecessarily at least twice (see also [RFC] Ability to pass arguments to src_configure/src_compil

[gentoo-dev] Re: Default src_install for EAPI-2 or following EAPI

2008-09-20 Thread Steve Long
Thomas Sachau wrote: > I see, we have a default src_unpack and a default src_compile but a > default src_install is still missing. Here is my suggestion (taken and > modified from bug 33544): > > src_install() { > if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then > emake DESTDIR=${D} inst