diff -Nurd ghostscript-10.02.0.orig/base/lcms2mt.mak ghostscript-10.02.0/base/lcms2mt.mak --- ghostscript-10.02.0.orig/base/lcms2mt.mak 2023-09-13 02:45:01.000000000 -0400 +++ ghostscript-10.02.0/base/lcms2mt.mak 2023-09-17 13:35:30.000000000 -0400 @@ -89,7 +89,7 @@ # dev file for shared (separately built) lcms library $(LCMS2GEN)lcms2mt_1.dev : $(LCMS2_MAK) $(ECHOGS_XE) $(MAKEDIRS) - $(SETMOD) $(LCMS2GEN)lcms2mt_1 -lib lcms2 + $(SETMOD) $(LCMS2GEN)lcms2mt_1 -lib lcms2mt # dev file for compiling our own from source $(LCMS2GEN)lcms2mt_0.dev : $(LCMS2_MAK) $(ECHOGS_XE) $(lcms2_OBJS) $(LCMS2_DEPS) diff -Nurd ghostscript-10.02.0.orig/base/sjpx_openjpeg.c ghostscript-10.02.0/base/sjpx_openjpeg.c --- ghostscript-10.02.0.orig/base/sjpx_openjpeg.c 2023-09-13 02:45:01.000000000 -0400 +++ ghostscript-10.02.0/base/sjpx_openjpeg.c 2023-09-17 13:35:52.000000000 -0400 @@ -25,7 +25,6 @@ #include "gxsync.h" #include "assert_.h" #if !defined(SHARE_JPX) || (SHARE_JPX == 0) -#include "opj_malloc.h" #endif /* Some locking to get around the criminal lack of context * in the openjpeg library. */ diff -Nurd ghostscript-10.02.0.orig/base/unistd_.h ghostscript-10.02.0/base/unistd_.h --- ghostscript-10.02.0.orig/base/unistd_.h 2023-09-13 02:45:01.000000000 -0400 +++ ghostscript-10.02.0/base/unistd_.h 2023-09-17 15:47:36.000000000 -0400 @@ -52,7 +52,9 @@ /* _XOPEN_SOURCE 500 define is needed to get * access to pread and pwrite */ # define _XOPEN_SOURCE 500 +# ifndef __USE_UNIX98 # define __USE_UNIX98 +# endif # include #endif diff -Nurd ghostscript-10.02.0.orig/configure.ac ghostscript-10.02.0/configure.ac --- ghostscript-10.02.0.orig/configure.ac 2023-09-13 02:45:01.000000000 -0400 +++ ghostscript-10.02.0/configure.ac 2023-09-17 15:47:04.000000000 -0400 @@ -1461,7 +1461,7 @@ dnl zlib is needed for language level 3, and libpng # we must define ZLIBDIR regardless because png.mak does a -I$(ZLIBDIR) # this seems a harmless default -ZLIBDIR=src +ZLIBDIR=$oldincludedir AUX_SHARED_ZLIB= ZLIBCFLAGS="" @@ -1577,11 +1577,11 @@ WHICHLCMS=lcms2 LCMS2DIR=$LCMS2SRC else - # See if we have system library of lcms2 + # See if we have system library of lcms2 (preferably Artifex) AC_MSG_RESULT([no]) AC_MSG_CHECKING([for system lcms2 library]) - AC_CHECK_LIB(lcms2, _cmsCreateMutex, [ - AC_CHECK_HEADERS([lcms2.h], [SHARELCMS=1;WHICHLCMS=lcms2]) + AC_CHECK_LIB(lcms2mt, cmsCloneTransformChangingFormats, [ + AC_CHECK_HEADERS([lcms2mt.h], [SHARELCMS=1;WHICHLCMS=lcms2mt]) ]) if test x$WHICHLCMS = x; then AC_MSG_ERROR([lcms2 not found, or too old]) diff -Nurd ghostscript-10.02.0.orig/devices/gdevpng.c ghostscript-10.02.0/devices/gdevpng.c --- ghostscript-10.02.0.orig/devices/gdevpng.c 2023-09-13 02:45:01.000000000 -0400 +++ ghostscript-10.02.0/devices/gdevpng.c 2023-09-17 13:54:15.000000000 -0400 @@ -808,6 +808,7 @@ #if PNG_LIBPNG_VER_MINOR < 5 +#if 0 /* not required in 1.5 */ /* * Patch around a static reference to a never-used procedure. * This could be avoided if we were willing to edit pngconf.h to @@ -828,6 +829,7 @@ } #endif #endif +#endif static int pngalpha_open(gx_device * pdev) Binary files ghostscript-10.02.0.orig/lcms2mt/Projects/mac/LittleCMS/._Info.plist and ghostscript-10.02.0/lcms2mt/Projects/mac/LittleCMS/._Info.plist differ Binary files ghostscript-10.02.0.orig/lcms2mt/Projects/mac/LittleCMS/._LittleCMS.xcodeproj and ghostscript-10.02.0/lcms2mt/Projects/mac/LittleCMS/._LittleCMS.xcodeproj differ