pngcrush: Fix build with recent clang

Closes: https://trac.macports.org/ticket/71631
This commit is contained in:
Ryan Carsten Schmidt
2025-02-05 09:59:14 -06:00
parent 18e21425ab
commit de689eb4f2
2 changed files with 28 additions and 1 deletions
+2 -1
View File
@@ -28,7 +28,8 @@ use_xz yes
checksums rmd160 ff93938e8e6ba8565386efdb51962f16b138a27d \
sha256 8fc18bcbcc65146769241e20f9e21e443b0f4538d581250dce89b1e969a30705
patchfiles patch-Makefile.diff
patchfiles patch-Makefile.diff \
patch-pngpriv.h.diff
# cannot use SSE includes on snowleopard, #52419
if {${os.platform} eq "darwin" && ${os.major} <= 10} {
@@ -0,0 +1,26 @@
Fix:
fatal error: 'fp.h' file not found
https://github.com/pnggroup/libpng/commit/893b8113f04d408cc6177c6de19c9889a48faa24
--- pngpriv.h.orig 2017-08-29 16:01:23.000000000 -0500
+++ pngpriv.h 2025-02-05 09:56:47.000000000 -0600
@@ -508,18 +508,7 @@
*/
# include <float.h>
-# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
- defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
- /* We need to check that <math.h> hasn't already been included earlier
- * as it seems it doesn't agree with <fp.h>, yet we should really use
- * <fp.h> if possible.
- */
-# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
-# include <fp.h>
-# endif
-# else
# include <math.h>
-# endif
# if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
/* Amiga SAS/C: We must include builtin FPU functions when compiling using
* MATH=68881