changeset 5627:b022da047e9b

* src/ghostscript-1-fixes.patch: Update patch for fontconfig
author John Donoghue <john.donoghue@ieee.org>
date Sun, 27 Dec 2020 18:41:10 -0500
parents 4420fb1dbc99
children 843dc4524892
files src/ghostscript-1-fixes.patch
diffstat 1 files changed, 87 insertions(+), 101 deletions(-) [+]
line wrap: on
line diff
--- a/src/ghostscript-1-fixes.patch	Sun Dec 27 14:28:37 2020 -0500
+++ b/src/ghostscript-1-fixes.patch	Sun Dec 27 18:41:10 2020 -0500
@@ -1,40 +1,20 @@
-This file is part of MXE. See LICENSE.md for licensing information.
-
-Contains ad hoc patches for cross building.
-
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: darealshinji <djcj@gmx.de>
-Date: Mon, 3 Dec 2018 21:05:41 +0100
-Subject: [PATCH 1/1] cross-build fixes, hide libgs symbols
-
-
-diff --git a/Makefile.in b/Makefile.in
-index 1111111..2222222 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -173,6 +173,9 @@ CAPOPT= @HAVE_MKSTEMP@ @HAVE_FILE64@ @HAVE_FSEEKO@ @HAVE_MKSTEMP64@ @HAVE_FONTCO
+diff -ur ghostscript-9.50.orig/base/fapi_ft.c ghostscript-9.50/base/fapi_ft.c
+--- ghostscript-9.50.orig/base/fapi_ft.c	2020-12-27 14:29:32.714236780 -0500
++++ ghostscript-9.50/base/fapi_ft.c	2020-12-27 14:30:34.503600642 -0500
+@@ -125,6 +125,10 @@
+ delete_inc_int_info(gs_fapi_server * a_server,
+                     FT_IncrementalRec * a_inc_int_info);
  
- GS=@GS@
- GS_SO_BASE=@GS@
-+GS_SONAME=@GS_SONAME@
-+GS_SONAME_MAJOR=@GS_SONAME_MAJOR@
-+GS_SONAME_MAJOR_MINOR=@GS_SONAME_MAJOR_MINOR@
- 
- PCL=@PCL@
- PCL_SO_BASE=@PCL@
-@@ -184,7 +187,7 @@ GPDL=@GPDL@
- GPDL_SO_BASE=@GPDL@
- 
- XE=@EXEEXT@
--XEAUX=@EXEEXT@
-+XEAUX=@AUXEXEEXT@
- 
- PCL_TARGET=@PCL_TARGET@
- XPS_TARGET=@XPS_TARGET@
-diff --git a/base/gp_unix.c b/base/gp_unix.c
-index 1111111..2222222 100644
---- a/base/gp_unix.c
-+++ b/base/gp_unix.c
++#ifndef FT_CALLBACK_DEF
++  #define FT_CALLBACK_DEF(X) X
++#endif
++
+ FT_CALLBACK_DEF(void *)
+ FF_alloc(FT_Memory memory, long size)
+ {
+diff -ur ghostscript-9.50.orig/base/gp_unix.c ghostscript-9.50/base/gp_unix.c
+--- ghostscript-9.50.orig/base/gp_unix.c	2020-12-27 14:29:32.703236181 -0500
++++ ghostscript-9.50/base/gp_unix.c	2020-12-27 18:25:25.242079971 -0500
 @@ -16,6 +16,9 @@
  
  /* Unix-specific routines for Ghostscript */
@@ -45,7 +25,7 @@
  #include "pipe_.h"
  #include "string_.h"
  #include "time_.h"
-@@ -454,3 +457,54 @@ void gp_enumerate_fonts_free(void *enum_state)
+@@ -466,3 +469,54 @@
      }
  #endif
  }
@@ -100,11 +80,11 @@
 +    return unicode[0];
 +}
 +#endif /* __MINGW32__ */
-diff --git a/base/unix-aux.mak b/base/unix-aux.mak
-index 1111111..2222222 100644
---- a/base/unix-aux.mak
-+++ b/base/unix-aux.mak
-@@ -57,23 +57,29 @@ $(AUX)gp_stdia.$(OBJ): $(GLSRC)gp_stdia.c $(AK)\
+Only in ghostscript-9.50/base: gp_unix.c.orig
+diff -ur ghostscript-9.50.orig/base/unix-aux.mak ghostscript-9.50/base/unix-aux.mak
+--- ghostscript-9.50.orig/base/unix-aux.mak	2020-12-27 14:29:32.718236997 -0500
++++ ghostscript-9.50/base/unix-aux.mak	2020-12-27 18:25:25.242079971 -0500
+@@ -57,23 +57,29 @@
  # -------------------------- Auxiliary programs --------------------------- #
  
  $(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS)
@@ -134,7 +114,7 @@
  	$(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS)
  
  # To get GS to use the system zlib, you remove/hide the gs/zlib directory
-@@ -84,6 +90,7 @@ MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \
+@@ -84,6 +90,7 @@
   $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ)
  
  $(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(UNIX_AUX_MAK) $(MAKEDIRS)
@@ -142,7 +122,7 @@
  	$(CCAUX_) $(GENOPTAUX) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS)
  
  # .... and one using the zlib library linked via the command line
-@@ -93,9 +100,11 @@ MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \
+@@ -93,9 +100,11 @@
   $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ)
  
  $(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(UNIX_AUX_MAK) $(MAKEDIRS)
@@ -154,11 +134,10 @@
  	$(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE)
  
  # Query the environment to construct gconfig_.h.
-diff --git a/base/unix-dll.mak b/base/unix-dll.mak
-index 1111111..2222222 100644
---- a/base/unix-dll.mak
-+++ b/base/unix-dll.mak
-@@ -66,9 +66,6 @@ GPDL_SONAME_BASE=lib$(GPDL_SO_BASE)
+diff -ur ghostscript-9.50.orig/base/unix-dll.mak ghostscript-9.50/base/unix-dll.mak
+--- ghostscript-9.50.orig/base/unix-dll.mak	2020-12-27 14:29:32.690235473 -0500
++++ ghostscript-9.50/base/unix-dll.mak	2020-12-27 18:25:25.242079971 -0500
+@@ -66,9 +66,6 @@
  GS_SOEXT=$(SO_LIB_EXT)
  GS_DLLEXT=$(DLL_EXT)
  
@@ -168,11 +147,10 @@
  
  PCL_SONAME=$(PCL_SONAME_BASE)$(GS_SOEXT)$(GS_DLLEXT)
  PCL_SONAME_MAJOR=$(PCL_SONAME_BASE)$(GS_SOEXT)$(SO_LIB_VERSION_SEPARATOR)$(GS_VERSION_MAJOR)$(GS_DLLEXT)
-diff --git a/configure.ac b/configure.ac
-index 1111111..2222222 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -23,6 +23,7 @@ AC_INIT
+diff -ur ghostscript-9.50.orig/configure.ac ghostscript-9.50/configure.ac
+--- ghostscript-9.50.orig/configure.ac	2020-12-27 14:29:32.689235419 -0500
++++ ghostscript-9.50/configure.ac	2020-12-27 18:25:25.243080026 -0500
+@@ -23,6 +23,7 @@
  AC_PREREQ(2.63)
  AC_LANG(C)
  AC_CONFIG_SRCDIR(psi/gs.c)
@@ -180,7 +158,7 @@
  
  dnl Inherit compiler flags from the environment...
  CFLAGS="${CFLAGS:=}"
-@@ -125,8 +126,11 @@ AUXEXTRALIBSTMP="\$(EXTRALIBS)"
+@@ -125,8 +126,11 @@
  
  # purposefully do not include "help" output for this
  AC_ARG_ENABLE([save_confaux])
@@ -193,7 +171,7 @@
    # rerun configure for the AUX tools, disabling a load of tests not relevant for CCAUX
    olddir=`pwd`
    if test x"$enable_save_confaux" = x"yes"; then
-@@ -146,9 +150,10 @@ if test x"$CCAUX" != x"" ; then
+@@ -146,9 +150,10 @@
    echo $AUXFLAGS_MAK_LINE06 >> $AUXFLAGS_MAK.in
    echo $AUXFLAGS_MAK_LINE07 >> $AUXFLAGS_MAK.in
  
@@ -206,7 +184,7 @@
    if test $status -eq 0 ; then
      CCAUX=$(grep CCAUX $AUXFLAGS_MAK | sed "s/CCAUX=//g")
      GCFLAGSAUXTMP=$(grep GCFLAGSAUX $AUXFLAGS_MAK | sed "s/GCFLAGSAUX=//g")
-@@ -204,7 +209,7 @@ AC_PATH_TOOL(PKGCONFIG, pkg-config)
+@@ -204,7 +209,7 @@
  # but if we are cross compiling, and there isn't a matching
  # pkconfig for the --host setting, then don't use the 'local'
  # pkconfig at all
@@ -215,7 +193,7 @@
    AC_PATH_PROG(BUILD_PKGCONFIG, pkg-config)
    if test x"$BUILD_PKGCONFIG" = x"$PKGCONFIG" ; then
      PKGCONFIG=
-@@ -217,7 +222,7 @@ AC_PATH_TOOL(STRIP_XE, strip)
+@@ -217,7 +222,7 @@
  # but if we are cross compiling, and there isn't a matching
  # pkconfig for the --host setting, then don't use the 'local'
  # pkconfig at all
@@ -224,7 +202,7 @@
    AC_PATH_PROG(BUILD_STRIP_XE, strip)
    if test x"$BUILD_STRIP_XE" = x"$STRIP_XE" ; then
      STRIP_XE=
-@@ -234,18 +239,14 @@ CONTRIBINCLUDE="include $srcdir/contrib/contrib.mak"
+@@ -234,18 +239,14 @@
  INSTALL_CONTRIB="install-contrib-extras"
  
  if test x"$enable_contrib" = x; then
@@ -245,7 +223,7 @@
  fi
  
  if test x"$enable_contrib" != x"no"; then
-@@ -274,26 +275,27 @@ dnl --------------------------------------------------
+@@ -274,26 +275,27 @@
  CC_OPT_FLAGS_TO_TRY="-O"
  SET_DT_SONAME="-soname="
  
@@ -283,7 +261,7 @@
          if test $ac_cv_prog_gcc = yes; then
              CC_OPT_FLAGS_TO_TRY="-O2"
              CC_DBG_FLAGS_TO_TRY="-gdwarf-2 -g3 -O0"
-@@ -321,7 +323,6 @@ else
+@@ -321,7 +323,6 @@
          fi
          ;;
    esac
@@ -291,7 +269,7 @@
  
  AC_SUBST(SET_DT_SONAME)
  
-@@ -368,18 +369,20 @@ AC_ARG_WITH([arch_h], AC_HELP_STRING([--with-arch_h=<arch.h to use>],
+@@ -368,18 +369,20 @@
  ARCH_CONF_HEADER=
  
  if test x"$with_arch_h" = x""; then
@@ -318,7 +296,7 @@
  else
    ARCH_CONF_HEADER=$with_arch_h
  fi
-@@ -658,15 +661,7 @@ dnl Set options that we want to pass into all other
+@@ -658,15 +661,7 @@
  dnl configure scripts we might call
  dnl --------------------------------------------------
  
@@ -335,7 +313,7 @@
  
  dnl --------------------------------------------------
  dnl Check for libraries
-@@ -996,7 +991,7 @@ if test x"$enable_fapi" != xno; then
+@@ -996,7 +991,7 @@
              if $PKGCONFIG --atleast-version=12.0.6 freetype2; then
                  AC_MSG_RESULT(yes)
                  FT_CFLAGS="$CFLAGS `$PKGCONFIG --cflags freetype2`"
@@ -344,7 +322,7 @@
                  FT_BRIDGE=1
                  SHARE_FT=1
              else
-@@ -1047,6 +1042,14 @@ AC_SUBST(FTSRCDIR)
+@@ -1047,6 +1042,14 @@
  AC_SUBST(FT_CFLAGS)
  AC_SUBST(FT_LIBS)
  
@@ -359,7 +337,7 @@
  AC_MSG_CHECKING([for local jpeg library source])
  dnl At present, we give the local source priority over the shared
  dnl build, so that the D_MAX_BLOCKS_IN_MCU patch will be applied.
-@@ -1088,6 +1091,13 @@ else
+@@ -1088,6 +1091,13 @@
      [define if the libjpeg memory system prototypes aren't available])
  fi
  
@@ -373,7 +351,7 @@
  AC_MSG_CHECKING([for local zlib source])
  dnl zlib is needed for language level 3, and libpng
  # we must define ZLIBDIR regardless because png.mak does a -I$(ZLIBDIR)
-@@ -1096,6 +1106,13 @@ ZLIBDIR=src
+@@ -1096,6 +1106,13 @@
  AUX_SHARED_ZLIB=
  ZLIBCFLAGS=""
  
@@ -387,7 +365,7 @@
  if test -d $srcdir/zlib; then
          AC_MSG_RESULT([yes])
          SHARE_ZLIB=0
-@@ -1110,6 +1127,9 @@ else
+@@ -1110,6 +1127,9 @@
            AC_CHECK_HEADERS(zlib.h, [SHARE_ZLIB=1; AUX_SHARED_ZLIB="-l\$(ZLIB_NAME)"])
          ])
  fi
@@ -397,7 +375,7 @@
  if test -z "$SHARE_ZLIB"; then
    AC_MSG_ERROR([I did not find a copy of zlib on your system.
    Please either install it, or unpack a copy of the source in a
-@@ -1136,6 +1156,11 @@ AC_SUBST(ZLIBDIR)
+@@ -1136,6 +1156,11 @@
  AC_SUBST(FT_SYS_ZLIB)
  
  dnl png for the png output device; it also requires zlib
@@ -409,7 +387,7 @@
  LIBPNGDIR=src
  PNGDEVS=''
  PNGDEVS_ALL='png48 png16m pnggray pngmono pngmonod png256 png16 pngalpha'
-@@ -1157,12 +1182,21 @@ fi
+@@ -1157,12 +1182,21 @@
  if test -z "$PNGDEVS"; then
    AC_MSG_NOTICE([disabling png output devices])
  fi
@@ -431,7 +409,7 @@
  AC_MSG_CHECKING([for local lcms2mt library source])
  LCMS2DIR=src
  LCMS2MTDIR=src
-@@ -1197,6 +1231,8 @@ else
+@@ -1197,6 +1231,8 @@
     fi
  fi
  
@@ -440,7 +418,7 @@
  AC_SUBST(SHARELCMS)
  AC_SUBST(WHICHLCMS)
  AC_SUBST(LCMS2DIR)
-@@ -1349,7 +1385,7 @@ EXPATDIR=src
+@@ -1349,7 +1385,7 @@
  EXPAT_CFLAGS=
  EXPAT_LIBS=
  
@@ -449,7 +427,7 @@
    if test -f $srcdir/xps/xps.mak; then
      AC_MSG_CHECKING([for local expat library source])
      if test -f $srcdir/expat/lib/expat.h ; then
-@@ -1528,16 +1564,14 @@ dnl look for IJS implementation
+@@ -1528,16 +1564,14 @@
  AC_ARG_WITH([ijs], AC_HELP_STRING([--without-ijs],
      [disable IJS driver support]))
  
@@ -468,7 +446,7 @@
  
  dnl set safe defaults
      IJSDIR=src
-@@ -1589,15 +1623,8 @@ if test x$with_luratech != xno; then
+@@ -1589,15 +1623,8 @@
      SHARE_JBIG2=0
      JBIG2DIR=$srcdir/luratech/ldf_jb2
  
@@ -486,7 +464,7 @@
            JBIG2_AUTOCONF_CFLAGS="-DUSE_LDF_JB2 -DMAC -DMAC_OS_X_BUILD -fsigned-char"
          ;;
          AIX)
-@@ -1611,7 +1638,6 @@ if test x$with_luratech != xno; then
+@@ -1611,7 +1638,6 @@
            JBIG2_AUTOCONF_CFLAGS="-DUSE_LDF_JB2 -fsigned-char -DLINUX=1 -DFORTE"
          ;;
        esac
@@ -494,7 +472,7 @@
  
      JBIG2FILEDEVS='$(DD)gdevjbig2.dev'
      JBIG2DEVS='$(PSD)jbig2.dev'
-@@ -1718,15 +1744,8 @@ if test x$with_luratech != xno; then
+@@ -1734,15 +1760,8 @@
      SHARE_JPX=0
      JPXDIR=$srcdir/luratech/lwf_jp2
  
@@ -512,7 +490,7 @@
            JPX_AUTOCONF_CFLAGS="-DUSE_LWF_JP2 -DMAC -DMAC_OS_X_BUILD"
          ;;
          AIX)
-@@ -1740,7 +1759,6 @@ if test x$with_luratech != xno; then
+@@ -1756,7 +1775,6 @@
            JPX_AUTOCONF_CFLAGS="-DUSE_LWF_JP2 -DLINUX=1 -DFORTE"
          ;;
        esac
@@ -520,7 +498,7 @@
      JPXDEVS='$(PSD)jpx.dev'
    else
      AC_MSG_RESULT([no])
-@@ -2357,22 +2375,15 @@ SO_LIB_EXT=".so"
+@@ -2506,22 +2524,15 @@
  DLL_EXT=""
  SO_LIB_VERSION_SEPARATOR="."
  
@@ -552,7 +530,7 @@
        DYNAMIC_CFLAGS="-fPIC"
        GS_DYNAMIC_LDFLAGS="-shared -Wl,\$(LD_SET_DT_SONAME)\$(LDFLAGS_SO_PREFIX)\$(GS_SONAME_MAJOR)"
        PCL_DYNAMIC_LDFLAGS="-shared -Wl,\$(LD_SET_DT_SONAME)\$(LDFLAGS_SO_PREFIX)\$(PCL_SONAME_MAJOR)"
-@@ -2386,17 +2397,21 @@ else
+@@ -2535,17 +2546,21 @@
        fi
        SO_LIB_EXT=".so"
      ;;
@@ -578,7 +556,7 @@
        DYNAMIC_CFLAGS="-fPIC"
        GS_DYNAMIC_LDFLAGS="-shared -Wl,\$(LD_SET_DT_SONAME)\$(LDFLAGS_SO_PREFIX)\$(GS_SONAME_MAJOR)"
        PCL_DYNAMIC_LDFLAGS="-shared -Wl,\$(LD_SET_DT_SONAME)\$(LDFLAGS_SO_PREFIX)\$(PCL_SONAME_MAJOR)"
-@@ -2404,7 +2419,7 @@ else
+@@ -2553,7 +2568,7 @@
        DYNAMIC_LIBS=""
        SO_LIB_EXT=".so"
      ;;
@@ -587,7 +565,7 @@
        GS_DYNAMIC_LDFLAGS="-dynamiclib -install_name \$(GS_SONAME_MAJOR_MINOR)"
        PCL_DYNAMIC_LDFLAGS="-dynamiclib -install_name \$(PCL_SONAME_MAJOR_MINOR)"
        XPS_DYNAMIC_LDFLAGS="-dynamiclib -install_name \$(XPS_SONAME_MAJOR_MINOR)"
-@@ -2442,15 +2457,18 @@ else
+@@ -2591,15 +2606,18 @@
        fi
        SO_LIB_EXT=".so"
        ;;
@@ -610,7 +588,7 @@
        INSTALL_SHARED="install-shared"
        if test "x$X_DEVS" != x; then
                DYNAMIC_DEVS="\$(GLOBJDIR)/X11.so"
-@@ -2462,14 +2480,14 @@ AC_ARG_ENABLE([dynamic], AC_HELP_STRING([--enable-dynamic],
+@@ -2611,14 +2629,14 @@
        OPT_CFLAGS="$DYNAMIC_CFLAGS $OPT_CFLAGS"
        DBG_CFLAGS="$DYNAMIC_CFLAGS $DBG_CFLAGS"
        ;;
@@ -627,7 +605,7 @@
        INSTALL_SHARED="install-shared"
        DYNAMIC_FLAGS="-DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\\\"\$(gssharedir)\\\""
        X11_DEVS=""
-@@ -2814,23 +2832,31 @@ AC_SUBST(AUXDIRPOSTFIX)
+@@ -2963,23 +2981,31 @@
  # usually empty on Unix-like systems
  # --------------------------------------------------
  EXEEXT=""
@@ -671,7 +649,7 @@
  
  # --------------------------------------------------
  # Check for disabling of versioned path option.
-@@ -2885,7 +2911,7 @@ fi
+@@ -3034,7 +3060,7 @@
  
  AC_SUBST(CLUSTER_CFLAGS)
  
@@ -680,7 +658,7 @@
  
    ilog2()
    {
-@@ -3025,7 +3051,7 @@ AC_SUBST(AUXEXTRALIBS)
+@@ -3174,7 +3200,7 @@
  
  CONFIG_FILES_LIST="$CONFIG_FILES_LIST $THEMAKEFILE"
  
@@ -689,19 +667,27 @@
    CONFIG_FILES_LIST="$CONFIG_FILES_LIST"
  fi
  
-diff --git a/psi/iapi.h b/psi/iapi.h
-index 1111111..2222222 100644
---- a/psi/iapi.h
-+++ b/psi/iapi.h
-@@ -68,6 +68,11 @@ extern "C" {
- #    define GSDLLEXPORT
- #  endif
- # endif
-+# ifdef __MINGW32__
-+/* export stdcall functions as "name" instead of "_name@ordinal" */
-+#  undef GSDLLAPI
-+#  define GSDLLAPI
-+# endif
- # ifndef GSDLLAPI
- #  define GSDLLAPI __stdcall
-# endif
+Only in ghostscript-9.50: configure.ac.orig
+diff -ur ghostscript-9.50.orig/Makefile.in ghostscript-9.50/Makefile.in
+--- ghostscript-9.50.orig/Makefile.in	2020-12-27 14:29:32.689235419 -0500
++++ ghostscript-9.50/Makefile.in	2020-12-27 18:25:25.241079917 -0500
+@@ -172,6 +172,9 @@
+ 
+ GS=@GS@
+ GS_SO_BASE=@GS@
++GS_SONAME=@GS_SONAME@
++GS_SONAME_MAJOR=@GS_SONAME_MAJOR@
++GS_SONAME_MAJOR_MINOR=@GS_SONAME_MAJOR_MINOR@
+ 
+ PCL=@PCL@
+ PCL_SO_BASE=@PCL@
+@@ -183,7 +186,7 @@
+ GPDL_SO_BASE=@GPDL@
+ 
+ XE=@EXEEXT@
+-XEAUX=@EXEEXT@
++XEAUX=@AUXEXEEXT@
+ 
+ PCL_TARGET=@PCL_TARGET@
+ XPS_TARGET=@XPS_TARGET@
+Only in ghostscript-9.50: Makefile.in.orig