annotate src/ghostscript.mk @ 3743:4f58c4b4dee0

build libX11 and dependencies
author John W. Eaton <jwe@octave.org>
date Wed, 19 Nov 2014 11:12:26 -0500
parents ddf15410d64c
children 0023c034ec4a
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 :=
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
6 $(PKG)_VERSION := 9.07
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 $(PKG)_CHECKSUM := 550a85e73b7213d8ae41ea06523661638b4bc1a2
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
10 $(PKG)_URL := http://downloads.ghostscript.com/public/$($(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)
4f58c4b4dee0 build libX11 and dependencies
John W. Eaton <jwe@octave.org>
parents: 3701
diff changeset
13 $(PKG)_DEPS += x11 xext
4f58c4b4dee0 build libX11 and dependencies
John W. Eaton <jwe@octave.org>
parents: 3701
diff changeset
14 endif
3643
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15
3658
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
16 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes)
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
17 $(PKG)_DEPS += lcms
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
18 endif
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
19
3643
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
20 define $(PKG)_UPDATE
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
21 echo 'Warning: Updates are temporarily disabled for package ghostscript.' >&2;
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
22 echo $($(PKG)_VERSION)
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
23 endef
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
24
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25 ## Currently only works for native builds and i686 mingw cross builds.
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 ifeq ($(MXE_NATIVE_BUILD),yes)
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28 define $(PKG)_BUILD
3658
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
29 # in native mingw, force it to use external lcm2
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
30 if [ "$(MXE_SYSTEM)" == "mingw" ]; then \
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
31 rm -rf '$(1)/lcms2'; \
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
32 fi
3653
3085b1b955dd make native ghostscript build work; include ghostscript patches in dist file
John W. Eaton <jwe@octave.org>
parents: 3643
diff changeset
33 cd '$(1)' && autoreconf
3643
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
34 cd '$(1)' && '$(1)/configure' \
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
35 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
36 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
37 --prefix='$(HOST_PREFIX)' \
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
38 --with-system-libtiff \
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
39 && $(CONFIGURE_POST_HOOK)
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
40
3658
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
41 if [ "$(MXE_SYSTEM)" == "mingw" ]; then \
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
42 $(MAKE) -C '$(1)' -j '$(JOBS)' GS_LIB_DEFAULT=""; \
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
43 else \
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
44 $(MAKE) -C '$(1)' -j '$(JOBS)'; \
581873dfae44 ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents: 3653
diff changeset
45 fi
3643
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
46 $(MAKE) -C '$(1)' install
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
47 endef
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
48 else
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
49 ifeq ($(MXE_SYSTEM),mingw)
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
50 ifneq ($(ENABLE_64),yes)
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
51 ## Ghostscript configure script is not cross-compiler friendly,
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
52 ## so instead of running it, copying configuration files from a
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
53 ## native mingw build. Some configuration is done by compiling
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
54 ## and running programs during the build, but those programs
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
55 ## probe the build system and don't know about cross compiling,
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
56 ## so we generate the files then replace them with files from a
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
57 ## mingw native build.
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
58 define $(PKG)_BUILD
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
59 cp '$(TOP_DIR)/src/ghostscript-mingw-i686-makefile' '$(1)/Makefile'
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
60 $(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
61 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
62 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
63 $(MAKE) -C '$(1)' -j '$(JOBS)' \
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
64 TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' CC='$(MXE_CC)'
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
65 $(MAKE) -C '$(1)' \
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
66 TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' CC='$(MXE_CC)' \
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
67 install
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
68 endef
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
69 endif
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
70 endif
f2503a486cce ghostscript: new package
John W. Eaton <jwe@octave.org>
parents:
diff changeset
71 endif