diff src/ghostscript.mk @ 4959:506a61f959e4

Update ghostscript to 9.26. * src/ghostscript.mk: Update version, checksum and dependencies. Update build rule. * src/ghostscript-1-fixes.patch: Add new file. * src/ghostscrip-mingw-[i686,x86_64]-[arch.h,gconfig_.h,makefile]: Remove files. * src/build-automake.mk: Update to version 1.16.1. * src/build-automake-1-perl-5.patch: Remove file. * src/libidn.mk: Update to version 1.35. * src/glpk.mk: Skip autoconf steps.
author Markus Mützel <markus.muetzel@gmx.de>
date Sat, 16 Feb 2019 16:03:02 +0100
parents b63aebf07b75
children d80152a06425
line wrap: on
line diff
--- a/src/ghostscript.mk	Fri Feb 15 11:27:55 2019 -0500
+++ b/src/ghostscript.mk	Sat Feb 16 16:03:02 2019 +0100
@@ -3,12 +3,14 @@
 
 PKG             := ghostscript
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 9.16
-$(PKG)_CHECKSUM := cc06fbf8244b9e8d0694cee5bf3be5bdd444b888
+$(PKG)_VERSION  := 9.26
+$(PKG)_NODOTVER := $(subst .,,$($(PKG)_VERSION))
+$(PKG)_CHECKSUM := 2727000ebee0d08311705859a31a504e259f0d98
 $(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
-$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.gz
-$(PKG)_URL      := http://downloads.ghostscript.com/public/old-gs-releases/$($(PKG)_FILE)
-$(PKG)_DEPS     := jpeg lcms libpng tiff zlib
+$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.xz
+$(PKG)_URL      := https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs$($(PKG)_NODOTVER)/$($(PKG)_FILE)
+$(PKG)_DEPS     := dbus fontconfig freetype libiconv libidn libpaper libpng tiff zlib
+
 ifeq ($(MXE_WINDOWS_BUILD),no)
   ifeq ($(USE_SYSTEM_X11_LIBS),no)
     $(PKG)_DEPS += x11 xext
@@ -20,70 +22,24 @@
 endif
 
 define $(PKG)_UPDATE
-    echo 'Warning: Updates are temporarily disabled for package ghostscript.' >&2;
-    echo $($(PKG)_VERSION)
+    $(WGET) -q -O- 'https://api.github.com/repos/ArtifexSoftware/ghostpdl-downloads/releases' | \
+    $(SED) -n 's,.*"ghostscript-\([0-9\.]*\)\.tar.xz".*,\1,p' | \
+    head -1
 endef
 
-## Currently only works for native builds and i686 mingw cross builds.
-
-ifeq ($(MXE_NATIVE_BUILD),yes)
-  define $(PKG)_BUILD
-    # force external lcm2
-    mv '$(1)/lcms2' '$(1)/lcms2.x'
-    # force external libpng
-    mv '$(1)/libpng' '$(1)/libpng.x'
-    cd '$(1)' && autoreconf
-    cd '$(1)' && '$(1)/configure' \
-        $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \
+define $(PKG)_BUILD
+    cp -f `automake --print-libdir`/{config.guess,config.sub,install-sh} '$(1)'
+    cd '$(1)' && rm -rf freetype jpeg libpng openjpeg tiff
+    cd '$(1)' && autoreconf -f -i
+    mkdir '$(1)/.build'
+    cd '$(1)/.build' && $(1)/configure \
+        CPPFLAGS='$(CPPFLAGS) -DHAVE_SYS_TIMES_H=0' \
         $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
         --prefix='$(HOST_PREFIX)' \
-        --with-system-libtiff \
-        && $(CONFIGURE_POST_HOOK)
+        --without-local-zlib \
+        --with-system-libtiff
 
-    if [ "$(MXE_SYSTEM)" == "mingw" ]; then \
-        $(MAKE) -C '$(1)' -j '$(JOBS)' GS_LIB_DEFAULT=""; \
-    else \
-        $(MAKE) -C '$(1)' -j '$(JOBS)'; \
-    fi
-    $(MAKE) -C '$(1)' install
-  endef
-else
-  ifeq ($(MXE_SYSTEM),mingw)
-    ## Ghostscript configure script is not cross-compiler friendly,
-    ## so instead of running it, copying configuration files from a
-    ## native mingw build.  Some configuration is done by compiling
-    ## and running programs during the build, but those programs
-    ## probe the build system and don't know about cross compiling,
-    ## so we generate the files then replace them with files from a
-    ## mingw native build.
-    ifeq ($(ENABLE_WINDOWS_64),yes)
-      define $(PKG)_BUILD
-        mv '$(1)/freetype' '$(1)/freetype.x'
-        mv '$(1)/libpng' '$(1)/libpng.x'
-        cp '$(TOP_DIR)/src/ghostscript-mingw-x86_64-makefile' '$(1)/Makefile'
-        $(MAKE) -C '$(1)' TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' obj/arch.h obj/gconfig_.h
-        cp '$(TOP_DIR)/src/ghostscript-mingw-x86_64-arch.h' '$(1)/obj/arch.h'
-        cp '$(TOP_DIR)/src/ghostscript-mingw-x86_64-arch.h' '$(1)/obj/gconfig_.h'
-        $(MAKE) -C '$(1)' -j '$(JOBS)' \
-          TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' CC='$(MXE_CC)'
-        $(MAKE) -C '$(1)' \
-          TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' CC='$(MXE_CC)' \
-          install
-      endef
-    else
-      define $(PKG)_BUILD
-        mv '$(1)/freetype' '$(1)/freetype.x'
-        cp '$(TOP_DIR)/src/ghostscript-mingw-i686-makefile' '$(1)/Makefile'
-        $(MAKE) -C '$(1)' TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' obj/arch.h obj/gconfig_.h
-        cp '$(TOP_DIR)/src/ghostscript-mingw-i686-arch.h' '$(1)/obj/arch.h'
-        cp '$(TOP_DIR)/src/ghostscript-mingw-i686-arch.h' '$(1)/obj/gconfig_.h'
-        $(MAKE) -C '$(1)' -j '$(JOBS)' \
-          TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' CC='$(MXE_CC)'
-        $(MAKE) -C '$(1)' \
-          TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' CC='$(MXE_CC)' \
-          install
-      endef
- 
-    endif
-  endif
-endif
+    $(MAKE) -C '$(1)/.build' -j '$(JOBS)' $(if $(BUILD_STATIC),libgs,so)
+    $(MAKE) -C '$(1)/.build' prefix='$(HOST_PREFIX)' install
+endef
+