[asterisk-dev] [Code Review] 3707: asterisk.pc file contains a spacing error in CFlags

Diederik de Groot reviewboard at asterisk.org
Thu Jul 3 07:57:22 CDT 2014



> On July 3, 2014, 2:33 p.m., wdoekes wrote:
> > /trunk/build_tools/mkpkgconfig, lines 25-30
> > <https://reviewboard.asterisk.org/r/3707/diff/1/?file=62137#file62137line25>
> >
> >     's/\s+/\ /g'
> >     
> >     space doesn't need escaping
> >     
> >     's/^[ \t]*//;s/[ \t]*$//'
> >     
> >     combining multiple s/ may be allowed by both perl and sed, but if we allow that, we might as well shorten the whole block and use a single ${EXTREGEX}.
> >     
> >     's/^\s+|\s+$//'
> >     
> >     should be equivalent without resorting to semi-colons
> >     
> >     
> >     In addition, this is still open to mangling of things like this:
> >     
> >       -DSOME_OPTION=-Iinclude
> >       gets turned into
> >       -DSOME_OPTION=
> >     
> >     I'd rather see something like this:
> >     
> >       echo " $CFLAGS " ...
> >       ...
> >       ${EXTREGEX} 's/\s+-I(include|\.\.\/include)\s+/ /g'
> >     
> >     whereby you're making sure that the option you're stripping is actually delimited by a space on both sides.

Thanks for looking into this.

Sorry for combinging the sed statements :-). sed is really not my erea of expertise, so if you would be willing to fix this, that would be very helpfull !

IMHO: I think taking the stuff we want, instead of removing the stuff we don't want, might be the better solution.

BTW: Maybe gathering the stuff we need to put in pkg-config file during configure might be the best solution, instead of using grep/sed after the fact. 


- Diederik


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3707/#review12462
-----------------------------------------------------------


On July 3, 2014, 2:12 p.m., Diederik de Groot wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3707/
> -----------------------------------------------------------
> 
> (Updated July 3, 2014, 2:12 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-23991
>     https://issues.asterisk.org/jira/browse/ASTERISK-23991
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> ASTERISK-23991
> 
> After installation the asterisk.pc file contains:
> Cflags: -I/usr/include/libxml2-g3
> 
> Which should have been:
> Cflags: -I/usr/include/libxml2 -g3
> 
> 
> Diffs
> -----
> 
>   /trunk/build_tools/mkpkgconfig 417800 
> 
> Diff: https://reviewboard.asterisk.org/r/3707/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Diederik de Groot
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140703/c24a56c2/attachment.html>


More information about the asterisk-dev mailing list