Revision: 117329 https://trac.macports.org/changeset/117329 Author: ryandesign@macports.org Date: 2014-02-21 23:22:18 -0800 (Fri, 21 Feb 2014) Log Message: ----------- libpng: fix incompatibility building other ports using libpng with old clang (#42571) Modified Paths: -------------- trunk/dports/graphics/libpng/Portfile Added Paths: ----------- trunk/dports/graphics/libpng/files/ trunk/dports/graphics/libpng/files/patch-pngconf.h.diff Modified: trunk/dports/graphics/libpng/Portfile =================================================================== --- trunk/dports/graphics/libpng/Portfile 2014-02-22 07:03:06 UTC (rev 117328) +++ trunk/dports/graphics/libpng/Portfile 2014-02-22 07:22:18 UTC (rev 117329) @@ -5,6 +5,7 @@ name libpng version 1.6.9 +revision 1 set branch [join [lrange [split ${version} .] 0 1] ""] categories graphics maintainers ryandesign @@ -32,6 +33,8 @@ depends_lib port:zlib +patchfiles patch-pngconf.h.diff + use_parallel_build yes test.run yes Added: trunk/dports/graphics/libpng/files/patch-pngconf.h.diff =================================================================== --- trunk/dports/graphics/libpng/files/patch-pngconf.h.diff (rev 0) +++ trunk/dports/graphics/libpng/files/patch-pngconf.h.diff 2014-02-22 07:22:18 UTC (rev 117329) @@ -0,0 +1,20 @@ +Fix build with older clang +http://sourceforge.net/p/libpng/bugs/220/ +http://sourceforge.net/p/libpng/code/ci/dd6679dce8e03e8874ca758440b51c50d11d... +--- pngconf.h.orig 2014-02-05 22:28:54.000000000 -0600 ++++ pngconf.h 2014-02-21 15:06:07.000000000 -0600 +@@ -376,9 +376,11 @@ + # define PNG_DEPRECATED __attribute__((__deprecated__)) + # endif + # if !defined(PNG_PRIVATE) +-# if __has_extension(attribute_unavailable_with_message) +-# define PNG_PRIVATE __attribute__((__unavailable__(\ +- "This function is not exported by libpng."))) ++# ifdef __has_extension ++# if __has_extension(attribute_unavailable_with_message) ++# define PNG_PRIVATE __attribute__((__unavailable__(\ ++ "This function is not exported by libpng."))) ++# endif + # endif + # endif + # ifndef PNG_RESTRICT