annotate src/ghostscript.mk @ 4325:b63aebf07b75

ghostscript: use external lcms2 for all native builds
author John W. Eaton <jwe@octave.org>
date Sun, 08 Jan 2017 09:49:59 -0500
parents 720a6eb65741
children 506a61f959e4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3643
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 # This file is part of MXE.
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2 # See index.html for further information.
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
3
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4 PKG := ghostscript
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
5 $(PKG)_IGNORE :=
3882
d5936b3095a5 ghostscript: update to v9.16
John Donoghue
parents: 3827
diff changeset
6 $(PKG)_VERSION := 9.16
d5936b3095a5 ghostscript: update to v9.16
John Donoghue
parents: 3827
diff changeset
7 $(PKG)_CHECKSUM := cc06fbf8244b9e8d0694cee5bf3be5bdd444b888
3643
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
3792
1a2fec9962a7 ghostscript: update to 9.15
John Donoghue
parents: 3759
diff changeset
9 $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
4132
720a6eb65741 ghostscript: updated ghostscript download URL
John Donoghue <john.donoghue@ieee.org>
parents: 4079
diff changeset
10 $(PKG)_URL := http://downloads.ghostscript.com/public/old-gs-releases/$($(PKG)_FILE)
3701
ddf15410d64c ghostscript: depend on lcms
John W. Eaton <jwe@octave.org>
parents: 3661
diff changeset
11 $(PKG)_DEPS := jpeg lcms libpng tiff zlib
3743
4f58c4b4dee0 build libX11 and dependencies
John W. Eaton <jwe@octave.org>
parents: 3701
diff changeset
12 ifeq ($(MXE_WINDOWS_BUILD),no)
3827
02990526ae69 allow building of X11 libs to be disabled
John W. Eaton <jwe@octave.org>
parents: 3805
diff changeset
13 ifeq ($(USE_SYSTEM_X11_LIBS),no)
02990526ae69 allow building of X11 libs to be disabled
John W. Eaton <jwe@octave.org>
parents: 3805
diff changeset
14 $(PKG)_DEPS += x11 xext
02990526ae69 allow building of X11 libs to be disabled
John W. Eaton <jwe@octave.org>
parents: 3805
diff changeset
15 endif
3743
4f58c4b4dee0 build libX11 and dependencies
John W. Eaton <jwe@octave.org>
parents: 3701
diff changeset
16 endif
3643
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
17
3658
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
18 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes)
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
19 $(PKG)_DEPS += lcms
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
20 endif
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
21
3643
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
22 define $(PKG)_UPDATE
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
23 echo 'Warning: Updates are temporarily disabled for package ghostscript.' >&2;
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
24 echo $($(PKG)_VERSION)
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25 endef
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
27 ## Currently only works for native builds and i686 mingw cross builds.
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
29 ifeq ($(MXE_NATIVE_BUILD),yes)
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
30 define $(PKG)_BUILD
4325
b63aebf07b75 ghostscript: use external lcms2 for all native builds
John W. Eaton <jwe@octave.org>
parents: 4132
diff changeset
31 # force external lcm2
b63aebf07b75 ghostscript: use external lcms2 for all native builds
John W. Eaton <jwe@octave.org>
parents: 4132
diff changeset
32 mv '$(1)/lcms2' '$(1)/lcms2.x'
4079
8f22781fe395 ghostscript: force use of external libpng
John Donoghue
parents: 4055
diff changeset
33 # force external libpng
8f22781fe395 ghostscript: force use of external libpng
John Donoghue
parents: 4055
diff changeset
34 mv '$(1)/libpng' '$(1)/libpng.x'
3653
3085b1b955dd make native ghostscript build work; include ghostscript patches in dist file
John W. Eaton <jwe@octave.org>
parents: 3643
diff changeset
35 cd '$(1)' && autoreconf
3643
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
36 cd '$(1)' && '$(1)/configure' \
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
37 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
38 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
39 --prefix='$(HOST_PREFIX)' \
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
40 --with-system-libtiff \
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
41 && $(CONFIGURE_POST_HOOK)
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
42
3658
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
43 if [ "$(MXE_SYSTEM)" == "mingw" ]; then \
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
44 $(MAKE) -C '$(1)' -j '$(JOBS)' GS_LIB_DEFAULT=""; \
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
45 else \
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
46 $(MAKE) -C '$(1)' -j '$(JOBS)'; \
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
47 fi
3643
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
48 $(MAKE) -C '$(1)' install
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
49 endef
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
50 else
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
51 ifeq ($(MXE_SYSTEM),mingw)
3805
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
52 ## Ghostscript configure script is not cross-compiler friendly,
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
53 ## so instead of running it, copying configuration files from a
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
54 ## native mingw build. Some configuration is done by compiling
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
55 ## and running programs during the build, but those programs
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
56 ## probe the build system and don't know about cross compiling,
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
57 ## so we generate the files then replace them with files from a
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
58 ## mingw native build.
4055
ccade212c3f9 ghostscript: set ghostscript search paths based on mxe install path (Bug #46301)
John Donoghue
parents: 3882
diff changeset
59 ifeq ($(ENABLE_WINDOWS_64),yes)
3805
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
60 define $(PKG)_BUILD
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
61 mv '$(1)/freetype' '$(1)/freetype.x'
4079
8f22781fe395 ghostscript: force use of external libpng
John Donoghue
parents: 4055
diff changeset
62 mv '$(1)/libpng' '$(1)/libpng.x'
3805
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
63 cp '$(TOP_DIR)/src/ghostscript-mingw-x86_64-makefile' '$(1)/Makefile'
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
64 $(MAKE) -C '$(1)' TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' obj/arch.h obj/gconfig_.h
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
65 cp '$(TOP_DIR)/src/ghostscript-mingw-x86_64-arch.h' '$(1)/obj/arch.h'
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
66 cp '$(TOP_DIR)/src/ghostscript-mingw-x86_64-arch.h' '$(1)/obj/gconfig_.h'
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
67 $(MAKE) -C '$(1)' -j '$(JOBS)' \
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
68 TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' CC='$(MXE_CC)'
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
69 $(MAKE) -C '$(1)' \
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
70 TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' CC='$(MXE_CC)' \
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
71 install
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
72 endef
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
73 else
3643
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
74 define $(PKG)_BUILD
3792
1a2fec9962a7 ghostscript: update to 9.15
John Donoghue
parents: 3759
diff changeset
75 mv '$(1)/freetype' '$(1)/freetype.x'
3643
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
76 cp '$(TOP_DIR)/src/ghostscript-mingw-i686-makefile' '$(1)/Makefile'
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
77 $(MAKE) -C '$(1)' TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' obj/arch.h obj/gconfig_.h
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
78 cp '$(TOP_DIR)/src/ghostscript-mingw-i686-arch.h' '$(1)/obj/arch.h'
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
79 cp '$(TOP_DIR)/src/ghostscript-mingw-i686-arch.h' '$(1)/obj/gconfig_.h'
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
80 $(MAKE) -C '$(1)' -j '$(JOBS)' \
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
81 TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' CC='$(MXE_CC)'
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
82 $(MAKE) -C '$(1)' \
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
83 TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' CC='$(MXE_CC)' \
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
84 install
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
85 endef
3805
496c393c1d3e ghostscript: enable mingw 64
John D
parents: 3792
diff changeset
86
3643
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
87 endif
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
88 endif
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
89 endif