Bug#822210: sdl2-config.cmake: extra leading / trailing whitespace

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Fri Apr 29 10:44:45 UTC 2016


Control: forwarded -1 https://bugzilla.libsdl.org/show_bug.cgi?id=3295


2016-04-27 22:41 GMT+01:00 Manuel A. Fernandez Montecelo
<manuel.montezelo at gmail.com>:
> Hi,
>
> 2016-04-27 14:08 GMT+01:00 Gianfranco Costamagna <locutusofborg at debian.org>:
>> Hi Manuel and libsdl2 developers!
>>
>>
>> How do you feel about the patch below?
>> I think we should apply it, to avoid cmake breakages in linux systems.
>
> It looks a bit odd to have to play with whitespace in this way.
>
> I'm fine with it in general, though; but since this is not Debian
> specific I prefer if it's applied (or at least blessed) by upstream
> first.  If it's failing for Jason, it should affect more people using
> other distros or the code directly from SDL repos.

This has been reported in upstream's bugzilla already (by somebody
else), with no fixes so far -- setting "forwarded" accordingly to
track the evolution upstream.


At a first glance, it looks very odd for cmake to be so fussy about
whitespace, but I guess that they have a good reason.

I've been looking into it and a more definitive/robust fix could be to
trim the strings coming from configure, so the same problem is avoided
in other systems or in future changes to other variables.  (Patch
attached).

Since "string(STRIP input output)" does not return the stripped
string, instead of using the string() function in the same spot where
the original variable is used, one has to use an "output variable" and
then use the variable as substitute in the original command.

So the result looks a bit ugly and duplicates the number of lines, and
everything is a bit cumbersome, but I think that it works.

Jason, if you want to test it to see if it works fine, then I can
submit both to upstream's bug report for them to decide.

(If anybody wants to use the attached patch as a basis for better
patches, feel free to do it.  Also anybody feel free to submit the
patches upstream, but better if tested first).


Cheers.
-- 
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sdl2-config.cmake.in
Type: application/octet-stream
Size: 657 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-sdl-maintainers/attachments/20160429/ff316db2/attachment.obj>


More information about the Pkg-sdl-maintainers mailing list