Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Dec 2013 22:19:00 +0100
From:      Matthias Andree <matthias.andree@gmx.de>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Kind of hacky fix for banshee-2.6.0
Message-ID:  <529F9C44.3070202@gmx.de>
In-Reply-To: <1687534.6K1SDGFtbY@hactar>
References:  <3074012.QmsohyHcnK@hactar> <2093792.KXDdxCWCWG@hactar> <1386179105.17871.55518481.669547E0@webmail.messagingengine.com> <1687534.6K1SDGFtbY@hactar>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 04.12.2013 21:37, schrieb Stefan Wendler:
> On Wednesday 04 December 2013 11:45:05 Mark Felder wrote:
>>
>> I have a build dependency issue so I can't even get my poudriere to
>> build banshee and test further. I'll poke at it again later this week if
>> I get a chance. Feel free to bounce questions off us in IRC as well.
> I will do that.
> 
> But I have a general question. Is it even possible to do the following within 
> REINPLACE_CMD: insert a line, if it is not present? Because the 
> ASSEMBLY_BUILD_FLAGS variable has to be in almost all Makefile.in files. And 
> there are alot.

Yes, but code like that starts getting cumbersome.

You might get away with (sorry, I got to quote this to cheat my mailer
not to word-wrap):

> 	for i in $(${FIND} ${WRKSRC} -name 'Makefile.*'); do ; \
> 		if ${GREP} -q "ASSEMBLY_BUILD_FLAGS" ; then \
> 			${REINPLACE_CMD} -E 's|ASSEMBLY_BUILD_FLAGS = -unsafe|ASSEMBLY_BUILD_FLAGS = -unsafe -sdk:4|' $$i ; \
>               else ${REINPLACE_CMD} -E "1iASSEMBLY_BUILD_FLAGS=-unsafe -sdk:4" $$i ; fi; \
>       done

Where 1i is the magic incantation to insert on (i. e. before) line 1.

If you have a common anchor text, you can replace the 1 by /uniquetext/,
as in:

${REINPLACE_CMD} -E '/^MAGICPLACE/iASSEMBLY_BUILD_FLAGS=...' $$i





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?529F9C44.3070202>