Mercurial > mxe-octave
annotate src/ghostscript.mk @ 3827:02990526ae69
allow building of X11 libs to be disabled
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 04 Mar 2015 09:27:23 -0500 |
parents | 496c393c1d3e |
children | d5936b3095a5 |
rev | line source |
---|---|
3643 | 1 # This file is part of MXE. |
2 # See index.html for further information. | |
3 | |
4 PKG := ghostscript | |
5 $(PKG)_IGNORE := | |
3792 | 6 $(PKG)_VERSION := 9.15 |
7 $(PKG)_CHECKSUM := f53bcc47e912c7bffc2ced62ed9311376fb18bab | |
3643 | 8 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) |
3792 | 9 $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz |
3643 | 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) |
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 | 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 | 22 define $(PKG)_UPDATE |
23 echo 'Warning: Updates are temporarily disabled for package ghostscript.' >&2; | |
24 echo $($(PKG)_VERSION) | |
25 endef | |
26 | |
27 ## Currently only works for native builds and i686 mingw cross builds. | |
28 | |
29 ifeq ($(MXE_NATIVE_BUILD),yes) | |
30 define $(PKG)_BUILD | |
3658
581873dfae44
ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents:
3653
diff
changeset
|
31 # 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
|
32 if [ "$(MXE_SYSTEM)" == "mingw" ]; then \ |
581873dfae44
ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents:
3653
diff
changeset
|
33 rm -rf '$(1)/lcms2'; \ |
581873dfae44
ghostscript: enable native mingw build
John Donoghue <john.donoghue@ieee.org>
parents:
3653
diff
changeset
|
34 fi |
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 | 36 cd '$(1)' && '$(1)/configure' \ |
37 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \ | |
38 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ | |
39 --prefix='$(HOST_PREFIX)' \ | |
40 --with-system-libtiff \ | |
41 && $(CONFIGURE_POST_HOOK) | |
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 | 48 $(MAKE) -C '$(1)' install |
49 endef | |
50 else | |
51 ifeq ($(MXE_SYSTEM),mingw) | |
3805 | 52 ## Ghostscript configure script is not cross-compiler friendly, |
53 ## so instead of running it, copying configuration files from a | |
54 ## native mingw build. Some configuration is done by compiling | |
55 ## and running programs during the build, but those programs | |
56 ## probe the build system and don't know about cross compiling, | |
57 ## so we generate the files then replace them with files from a | |
58 ## mingw native build. | |
59 ifeq ($(ENABLE_64),yes) | |
60 define $(PKG)_BUILD | |
61 mv '$(1)/zlib' '$(1)/zlib.x' | |
62 mv '$(1)/freetype' '$(1)/freetype.x' | |
63 cp '$(TOP_DIR)/src/ghostscript-mingw-x86_64-makefile' '$(1)/Makefile' | |
64 $(MAKE) -C '$(1)' TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' obj/arch.h obj/gconfig_.h | |
65 cp '$(TOP_DIR)/src/ghostscript-mingw-x86_64-arch.h' '$(1)/obj/arch.h' | |
66 cp '$(TOP_DIR)/src/ghostscript-mingw-x86_64-arch.h' '$(1)/obj/gconfig_.h' | |
67 $(MAKE) -C '$(1)' -j '$(JOBS)' \ | |
68 TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' CC='$(MXE_CC)' | |
69 $(MAKE) -C '$(1)' \ | |
70 TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' CC='$(MXE_CC)' \ | |
71 install | |
72 endef | |
73 else | |
3643 | 74 define $(PKG)_BUILD |
3792 | 75 mv '$(1)/zlib' '$(1)/zlib.x' |
76 mv '$(1)/freetype' '$(1)/freetype.x' | |
3643 | 77 cp '$(TOP_DIR)/src/ghostscript-mingw-i686-makefile' '$(1)/Makefile' |
78 $(MAKE) -C '$(1)' TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' obj/arch.h obj/gconfig_.h | |
79 cp '$(TOP_DIR)/src/ghostscript-mingw-i686-arch.h' '$(1)/obj/arch.h' | |
80 cp '$(TOP_DIR)/src/ghostscript-mingw-i686-arch.h' '$(1)/obj/gconfig_.h' | |
81 $(MAKE) -C '$(1)' -j '$(JOBS)' \ | |
82 TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' CC='$(MXE_CC)' | |
83 $(MAKE) -C '$(1)' \ | |
84 TARGET='$(TARGET)' prefix='$(HOST_PREFIX)' CC='$(MXE_CC)' \ | |
85 install | |
86 endef | |
3805 | 87 |
3643 | 88 endif |
89 endif | |
90 endif |