On Wednesday 19 September 2007, Donnie Berkholz wrote:
> On 18:32 Wed 19 Sep     , Olivier Fisette (ribosome) wrote:
> >   Modified:             ChangeLog
> >   Added:                phylip-3.67.ebuild
> >   Log:
> >   New upstream version.
> >   (Portage version: 2.1.3.9)
> >
> >
> > file :
> > http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-biology/phylip/Change
> >Log?rev=1.27&view=markup plain:
> > http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-biology/phylip/Change
> >Log?rev=1.27&content-type=text/plain diff :
> > http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-biology/phylip/Change
> >Log?r1=1.26&r2=1.27
> >
> > src_compile() {
> >     sed -e "s/CFLAGS  = -O3 -fomit-frame-pointer/CFLAGS = ${CFLAGS}/" \
> >             -e "s/CC        = cc/CC        = $(tc-getCC)/" \
> >             -e "s/DC        = cc/DC        = $(tc-getCC)/" \
> >             -i Makefile || die "Patching Makefile failed."
>
> This sed is pretty fragile, since it relies on upstream not changing the
> spacing or the default CFLAGS. Better tokens might do something like this:
>
> sed -e "s:^\(CFLAGS.*=\).*:\1 ${CFLAGS}:g"

or do a match/replace and let the env accumulate like normal:
sed -e '/^CFLAGS =/s:=.*:+=:' 
-mike

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

Reply via email to