Kind of hacky fix for banshee-2.6.0

Matthias Andree matthias.andree at gmx.de
Wed Dec 4 21:19:04 UTC 2013


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




More information about the freebsd-hackers mailing list