From 9817ed4b6c956f06d0fd249037614e5770301f41 Mon Sep 17 00:00:00 2001 From: Ryan Carsten Schmidt Date: Wed, 5 Feb 2025 10:04:31 -0600 Subject: [PATCH] pdflib: Fix build with recent clang Closes: https://trac.macports.org/ticket/71998 --- print/pdflib/Portfile | 1 + print/pdflib/files/patch-pngconf.h.diff | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 print/pdflib/files/patch-pngconf.h.diff diff --git a/print/pdflib/Portfile b/print/pdflib/Portfile index da8d7ade7c65f..0678c5832990d 100644 --- a/print/pdflib/Portfile +++ b/print/pdflib/Portfile @@ -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 diff --git a/print/pdflib/files/patch-pngconf.h.diff b/print/pdflib/files/patch-pngconf.h.diff new file mode 100644 index 0000000000000..acfff15a21752 --- /dev/null +++ b/print/pdflib/files/patch-pngconf.h.diff @@ -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 hasn't already been included earlier +- * as it seems it doesn't agree with , yet we should really use +- * if possible. +- */ +-# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) +-# include +-# endif +-# else + # include +-# endif + # if defined(_AMIGA) && defined(__SASC) && defined(_M68881) + /* Amiga SAS/C: We must include builtin FPU functions when compiling using + * MATH=68881