[macports-ports] branch master updated: exiftran: Update to version 2.14

Rainer Müller raimue at macports.org
Thu Sep 28 22:33:31 UTC 2017


On 09/28/2017 10:15 PM, Ryan Schmidt wrote:
> 
> On Sep 28, 2017, at 14:54, Ryan Schmidt wrote:
> 
>> On Sep 28, 2017, at 10:30, Rainer Müller wrote:
>>>
>>> depends_lib         port:jpeg \
>>
>> libpixman is now required; dependency needs to be added:
>>
>> path:lib/pkgconfig/pixman-1.pc:libpixman
> 
> Also needs a build dependency on pkgconfig to be able to find libpixman.

Thanks! After all that testing of patches, I did not do the trace mode run...

>>> + #!/bin/sh
>>> +-echo JPEG_LIB_VERSION | cpp $CFLAGS -include jpeglib.h | tail -1
>>> ++echo JPEG_LIB_VERSION | $CC -E $CFLAGS -include jpeglib.h - | tail -1
>>
>> This will fail with old versions of clang that don't support CPATH. The intention here was probably for $CFLAGS to contain the -I flag, but we don't set it that way, nor do we even set CFLAGS as an environment variable. In my version, I had patched this to use $CPPFLAGS instead of $CFLAGS, and I had added an appropriate CPPFLAGS variable to build.env.
> 
> This script expects the jpeg version number to appear on the last line of cpp's output, but when using cpp, the last line was blank, and it was the last non-blank line that we wanted. I didn't try using $CC -E; instead, I replaced "tail -1" with "awk 'NF{p=$0} END{print p}'".

I thought using the same compiler would be more correct, although cpp would have
worked. As you noticed, cpp adds a blank line at the end, but clang does not.
Your awk script proposal looks more robust as it should work with either.

I also agree that using CPPFLAGS for this would be better.

Please just go ahead with your changes!

Rainer


More information about the macports-dev mailing list