Skip to content

Commit

Permalink
pdflib: Fix build with recent clang
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandesign committed Feb 5, 2025
1 parent de689eb commit 9817ed4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions print/pdflib/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ patchfiles patch-configure.diff \
implicit.patch \
arm64.patch \
patch-perl_Makefile.diff \
patch-pngconf.h.diff \
patch-libtool.diff

configure.ccache no
Expand Down
25 changes: 25 additions & 0 deletions print/pdflib/files/patch-pngconf.h.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Fix:

fatal error: 'fp.h' file not found

https://github.com/pnggroup/libpng/commit/893b8113f04d408cc6177c6de19c9889a48faa24
--- libs/png/pngconf.h.orig 2012-06-06 06:59:01.000000000 -0500
+++ libs/png/pngconf.h 2025-02-05 10:02:40.000000000 -0600
@@ -382,17 +382,7 @@
*/

#if defined(PNG_FLOATING_POINT_SUPPORTED)
-# if defined(MACOS)
- /* 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

0 comments on commit 9817ed4

Please sign in to comment.