changeset 6379:8ecb6b6fcdc9

Fix mingw::ghostscript windows make patch
author Masamichi Hosoda <trueroad@users.noreply.github.com>
date Sat, 14 Mar 2015 09:58:14 +0900
parents d5faec43550f
children 827af33f6d0b
files gub/specs/ghostscript.py patches/ghostscript-9.15-windows-make.patch
diffstat 2 files changed, 296 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gub/specs/ghostscript.py	Sat Mar 14 01:16:15 2015 +0900
+++ b/gub/specs/ghostscript.py	Sat Mar 14 09:58:14 2015 +0900
@@ -28,7 +28,7 @@
         'ghostscript-9.15-make.patch',
         'ghostscript-9.15-cygwin.patch',
         'ghostscript-9.15-windows-snprintf.patch',
-#        'ghostscript-8.70-windows-make.patch',
+        'ghostscript-9.15-windows-make.patch',
        ]
     parallel_build_broken = True
     # For --enable-compile-inits, see comment in compile()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/ghostscript-9.15-windows-make.patch	Sat Mar 14 09:58:14 2015 +0900
@@ -0,0 +1,295 @@
+--- /dev/null	2015-03-14 01:29:23.000000000 +0900
++++ b/base/gsdll.mak	2015-03-14 01:27:42.445482800 +0900
+@@ -0,0 +1,28 @@
++#    Copyright (C) 1997-2004 Aladdin Enterprises.  All rights reserved.
++# 
++# This software is provided AS-IS with no warranty, either express or
++# implied.
++# 
++# This software is distributed under license and may not be copied,
++# modified or distributed except as expressly authorized under the terms
++# of the license contained in the file LICENSE in this distribution.
++# 
++# For more information about licensing, please refer to
++# http://www.ghostscript.com/licensing/. For information on
++# commercial licensing, go to http://www.artifex.com/licensing/ or
++# contact Artifex Software, Inc., 101 Lucas Valley Road #110,
++# San Rafael, CA  94903, U.S.A., +1(415)492-9861.
++
++# This makefile must be acceptable to Microsoft Visual C++, Watcom C++,
++# and Borland C++.  For this reason, the only conditional directives
++# allowed are !if[n]def, !else, and !endif.
++
++# Compile gsdll.c, the main program of the DLL.
++
++$(PSOBJ)gsdll.obj: $(PSSRC)gsdll.c $(AK) $(iapi_h) $(ghost_h)
++	$(PSCCWIN) $(COMPILE_FOR_DLL) $(PSO_)gsdll.$(OBJ) $(C_) $(PSSRC)gsdll.c
++
++$(GLOBJ)gp_msdll.obj: $(GLSRC)gp_msdll.c $(AK) $(iapi_h)
++	$(PSCCWIN) $(COMPILE_FOR_DLL) $(GLO_)gp_msdll.$(OBJ) $(C_) $(GLSRC)gp_msdll.c
++
++# end of gsdll.mak
+--- a/psi/winint.mak	2014-09-22 19:17:33.000000000 +0900
++++ b/psi/winint.mak	2015-03-14 01:28:28.351796400 +0900
+@@ -111,13 +111,7 @@
+  $(dwdll_h) $(iapi_h)
+ 	$(PSCCWIN) $(COMPILE_FOR_EXE) $(PSO_)dwnodll.obj $(C_) $(PSSRC)dwnodll.c
+ 
+-# Compile gsdll.c, the main program of the DLL.
+-
+-$(PSOBJ)gsdll.obj: $(PSSRC)gsdll.c $(AK) $(iapi_h) $(ghost_h)
+-	$(PSCCWIN) $(COMPILE_FOR_DLL) $(PSO_)gsdll.$(OBJ) $(C_) $(PSSRC)gsdll.c
+-
+-$(GLOBJ)gp_msdll.obj: $(GLSRC)gp_msdll.c $(AK) $(iapi_h)
+-	$(PSCCWIN) $(COMPILE_FOR_DLL) $(GLO_)gp_msdll.$(OBJ) $(C_) $(GLSRC)gp_msdll.c
++!include $(GLSRCDIR)\gsdll.mak
+ 
+ # Modules for console mode EXEs
+ 
+--- a/base/winlib.mak	2014-09-22 19:17:33.000000000 +0900
++++ b/base/winlib.mak	2015-03-14 01:40:33.017615400 +0900
+@@ -164,6 +164,7 @@
+ 
+ !include $(GLSRCDIR)\winplat.mak
+ !include $(GLSRCDIR)\pcwin.mak
++!include $(GLSRCDIR)\w32.mak
+ 
+ # Define abbreviations for the executable and DLL files.
+ GS_OBJ=$(GLOBJ)$(GS)
+@@ -176,108 +177,4 @@
+ $(gconfig__h): $(TOP_MAKEFILES)
+ 	$(ECHOGS_XE) -w $(gconfig__h) -x 2f2a20 This file deliberately left blank. -x 2a2f
+ 
+-# -------------------------------- Library -------------------------------- #
+-
+-# The Windows Win32 platform
+-
+-mswin32__=$(GLOBJ)gp_mswin.$(OBJ) $(GLOBJ)gp_wgetv.$(OBJ) $(GLOBJ)gp_wpapr.$(OBJ) \
+- $(GLOBJ)gp_stdia.$(OBJ) $(GLOBJ)gp_wutf8.$(OBJ)
+-mswin32_inc=$(GLD)nosync.dev $(GLD)winplat.dev
+-
+-$(GLGEN)mswin32_.dev:  $(mswin32__) $(ECHOGS_XE) $(mswin32_inc)
+-	$(SETMOD) $(GLGEN)mswin32_ $(mswin32__)
+-	$(ADDMOD) $(GLGEN)mswin32_ -include $(mswin32_inc)
+-
+-$(GLOBJ)gp_mswin.$(OBJ): $(GLSRC)gp_mswin.c $(AK) $(gp_mswin_h) \
+- $(ctype__h) $(dos__h) $(malloc__h) $(memory__h) $(pipe__h) \
+- $(stdio__h) $(string__h) $(windows__h) \
+- $(gx_h) $(gp_h) $(gpcheck_h) $(gpmisc_h) $(gserrors_h) $(gsexit_h)
+-	$(GLCCWIN) $(GLO_)gp_mswin.$(OBJ) $(C_) $(GLSRC)gp_mswin.c
+-
+-$(GLOBJ)gp_wutf8.$(OBJ): $(GLSRC)gp_wutf8.c $(windows__h)
+-	$(GLCCWIN) $(GLO_)gp_wutf8.$(OBJ) $(C_) $(GLSRC)gp_wutf8.c
+-
+-$(AUX)gp_wutf8.$(OBJ): $(GLSRC)gp_wutf8.c $(windows__h)
+-	$(GLCCAUX) $(AUXO_)gp_wutf8.$(OBJ) $(C_) $(GLSRC)gp_wutf8.c
+-
+-$(GLOBJ)gp_wgetv.$(OBJ): $(GLSRC)gp_wgetv.c $(AK) $(gscdefs_h)
+-	$(GLCCWIN) $(GLO_)gp_wgetv.$(OBJ) $(C_) $(GLSRC)gp_wgetv.c
+-
+-$(GLOBJ)gp_wpapr.$(OBJ): $(GLSRC)gp_wpapr.c $(AK) $(gp_h)
+-	$(GLCCWIN) $(GLO_)gp_wpapr.$(OBJ) $(C_) $(GLSRC)gp_wpapr.c
+-
+-$(GLOBJ)gp_stdia.$(OBJ): $(GLSRC)gp_stdia.c $(AK)\
+-  $(stdio__h) $(time__h) $(unistd__h) $(gx_h) $(gp_h)
+-	$(GLCCWIN) $(GLO_)gp_stdia.$(OBJ) $(C_) $(GLSRC)gp_stdia.c
+-
+-# The Metro platform
+-!ifdef METRO
+-METRO_OBJS=$(GLOBJ)winrtsup.$(OBJ) $(GLOBJ)gp_wutf8.$(OBJ)
+-
+-$(GLOBJ)winrtsup.$(OBJ): $(GLSRCDIR)/winrtsup.cpp
+-	$(GLCCWIN) /EHsc $(GLO_)winrtsup.$(OBJ) $(C_) $(GLSRCDIR)/winrtsup.cpp
+-!else
+-METRO_OBJS=
+-!endif
+-
+-
+-metro__=$(GLOBJ)gp_mswin.$(OBJ) $(GLOBJ)gp_wgetv.$(OBJ) $(GLOBJ)gp_wpapr.$(OBJ)\
+-  $(GLOBJ)gp_stdia.$(OBJ) $(METRO_OBJS)
+-#$(GLOBJ)gp_wutf8.$(OBJ)
+-metro_inc=$(GLD)nosync.dev $(GLD)winplat.dev
+-
+-$(GLGEN)metro_.dev:  $(metro__) $(ECHOGS_XE) $(metro_inc)
+-	$(SETMOD) $(GLGEN)metro_ $(metro__)
+-	$(ADDMOD) $(GLGEN)metro_ -include $(metro_inc)
+-
+-
+-# Define MS-Windows handles (file system) as a separable feature.
+-
+-mshandle_=$(GLOBJ)gp_mshdl.$(OBJ)
+-$(GLD)mshandle.dev: $(ECHOGS_XE) $(mshandle_)
+-	$(SETMOD) $(GLD)mshandle $(mshandle_)
+-	$(ADDMOD) $(GLD)mshandle -iodev handle
+-
+-$(GLOBJ)gp_mshdl.$(OBJ): $(GLSRC)gp_mshdl.c $(AK)\
+- $(ctype__h) $(errno__h) $(stdio__h) $(string__h)\
+- $(gsmemory_h) $(gstypes_h) $(gxiodev_h) $(gserrors_h)
+-	$(GLCC) $(GLO_)gp_mshdl.$(OBJ) $(C_) $(GLSRC)gp_mshdl.c
+-
+-# Define MS-Windows printer (file system) as a separable feature.
+-
+-msprinter_=$(GLOBJ)gp_msprn.$(OBJ)
+-msxpsprinter_=$(GLOBJ)xpsprint.$(OBJ)
+-
+-$(GLD)msprinter_0.dev: $(ECHOGS_XE) $(msprinter_)
+-	$(SETMOD) $(GLD)msprinter_0 $(msprinter_)
+-	$(ADDMOD) $(GLD)msprinter_0 -iodev printer
+-
+-$(GLD)msprinter_1.dev: $(ECHOGS_XE) $(msprinter_) $(msxpsprinter_) \
+- $(DD)xpswrite.dev
+-	$(SETMOD) $(GLD)msprinter_1 $(msprinter_) $(msxpsprinter_)
+-	$(ADDMOD) $(GLD)msprinter_1 -iodev printer
+-
+-$(GLD)msprinter.dev: $(GLD)msprinter_$(XPSPRINT).dev
+-	$(CP_) $(GLD)msprinter_$(XPSPRINT).dev $(GLD)msprinter.dev
+-
+-$(GLOBJ)gp_msprn.$(OBJ): $(GLSRC)gp_msprn.c $(AK)\
+- $(ctype__h) $(errno__h) $(stdio__h) $(string__h)\
+- $(gsmemory_h) $(gstypes_h) $(gxiodev_h)
+-	$(GLCCWIN) $(GLO_)gp_msprn.$(OBJ) $(C_) $(GLSRC)gp_msprn.c
+-
+-# The XPS printer
+-$(GLOBJ)xpsprint.$(OBJ): $(GLSRC)xpsprint.cpp $(windows__h) $(string__h) \
+- $(gx_h) $(gserrors_h)
+-	$(GLCCWINXPSPRINT) $(GLO_)xpsprint.$(OBJ) $(C_) $(GLSRC)xpsprint.cpp
+-
+-# Define MS-Windows polling as a separable feature
+-# because it is not needed by the gslib.
+-mspoll_=$(GLOBJ)gp_mspol.$(OBJ)
+-$(GLD)mspoll.dev: $(ECHOGS_XE) $(mspoll_)
+-	$(SETMOD) $(GLD)mspoll $(mspoll_)
+-
+-$(GLOBJ)gp_mspol.$(OBJ): $(GLSRC)gp_mspol.c $(AK)\
+- $(gx_h) $(gp_h) $(gpcheck_h)
+-	$(GLCCWIN) $(GLO_)gp_mspol.$(OBJ) $(C_) $(GLSRC)gp_mspol.c
+-
+ # end of winlib.mak
+--- /dev/null	2015-03-14 01:43:27.000000000 +0900
++++ b/base/w32.mak	2015-03-14 01:42:38.595935600 +0900
+@@ -0,0 +1,125 @@
++# Copyright (C) 2001-2012 Artifex Software, Inc.
++# All Rights Reserved.
++#
++# This software is provided AS-IS with no warranty, either express or
++# implied.
++#
++# This software is distributed under license and may not be copied,
++# modified or distributed except as expressly authorized under the terms
++# of the license contained in the file LICENSE in this distribution.
++#
++# Refer to licensing information at http://www.artifex.com or contact
++# Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134, San Rafael,
++# CA  94903, U.S.A., +1(415)492-9861, for further information.
++#
++# Common makefile section for 32-bit MS Windows.
++
++# This makefile must be acceptable to Microsoft Visual C++, Watcom C++,
++# and Borland C++.  For this reason, the only conditional directives
++# allowed are !if[n]def, !else, and !endif.
++
++# -------------------------------- Library -------------------------------- #
++
++# The Windows Win32 platform
++
++mswin32__=$(GLOBJ)gp_mswin.$(OBJ) $(GLOBJ)gp_wgetv.$(OBJ) $(GLOBJ)gp_wpapr.$(OBJ) \
++ $(GLOBJ)gp_stdia.$(OBJ) $(GLOBJ)gp_wutf8.$(OBJ)
++mswin32_inc=$(GLD)nosync.dev $(GLD)winplat.dev
++
++$(GLGEN)mswin32_.dev:  $(mswin32__) $(ECHOGS_XE) $(mswin32_inc)
++	$(SETMOD) $(GLGEN)mswin32_ $(mswin32__)
++	$(ADDMOD) $(GLGEN)mswin32_ -include $(mswin32_inc)
++
++$(GLOBJ)gp_mswin.$(OBJ): $(GLSRC)gp_mswin.c $(AK) $(gp_mswin_h) \
++ $(ctype__h) $(dos__h) $(malloc__h) $(memory__h) $(pipe__h) \
++ $(stdio__h) $(string__h) $(windows__h) \
++ $(gx_h) $(gp_h) $(gpcheck_h) $(gpmisc_h) $(gserrors_h) $(gsexit_h)
++	$(GLCCWIN) $(GLO_)gp_mswin.$(OBJ) $(C_) $(GLSRC)gp_mswin.c
++
++$(GLOBJ)gp_wutf8.$(OBJ): $(GLSRC)gp_wutf8.c $(windows__h)
++	$(GLCCWIN) $(GLO_)gp_wutf8.$(OBJ) $(C_) $(GLSRC)gp_wutf8.c
++
++$(AUX)gp_wutf8.$(OBJ): $(GLSRC)gp_wutf8.c $(windows__h)
++	$(GLCCAUX) $(AUXO_)gp_wutf8.$(OBJ) $(C_) $(GLSRC)gp_wutf8.c
++
++$(GLOBJ)gp_wgetv.$(OBJ): $(GLSRC)gp_wgetv.c $(AK) $(gscdefs_h)
++	$(GLCCWIN) $(GLO_)gp_wgetv.$(OBJ) $(C_) $(GLSRC)gp_wgetv.c
++
++$(GLOBJ)gp_wpapr.$(OBJ): $(GLSRC)gp_wpapr.c $(AK) $(gp_h)
++	$(GLCCWIN) $(GLO_)gp_wpapr.$(OBJ) $(C_) $(GLSRC)gp_wpapr.c
++
++$(GLOBJ)gp_stdia.$(OBJ): $(GLSRC)gp_stdia.c $(AK)\
++  $(stdio__h) $(time__h) $(unistd__h) $(gx_h) $(gp_h)
++	$(GLCCWIN) $(GLO_)gp_stdia.$(OBJ) $(C_) $(GLSRC)gp_stdia.c
++
++# The Metro platform
++#!ifdef METRO
++#METRO_OBJS=$(GLOBJ)winrtsup.$(OBJ) $(GLOBJ)gp_wutf8.$(OBJ)
++#
++#$(GLOBJ)winrtsup.$(OBJ): $(GLSRCDIR)/winrtsup.cpp
++#	$(GLCCWIN) /EHsc $(GLO_)winrtsup.$(OBJ) $(C_) $(GLSRCDIR)/winrtsup.cpp
++#!else
++METRO_OBJS=
++#!endif
++
++
++metro__=$(GLOBJ)gp_mswin.$(OBJ) $(GLOBJ)gp_wgetv.$(OBJ) $(GLOBJ)gp_wpapr.$(OBJ)\
++  $(GLOBJ)gp_stdia.$(OBJ) $(METRO_OBJS)
++#$(GLOBJ)gp_wutf8.$(OBJ)
++metro_inc=$(GLD)nosync.dev $(GLD)winplat.dev
++
++$(GLGEN)metro_.dev:  $(metro__) $(ECHOGS_XE) $(metro_inc)
++	$(SETMOD) $(GLGEN)metro_ $(metro__)
++	$(ADDMOD) $(GLGEN)metro_ -include $(metro_inc)
++
++
++# Define MS-Windows handles (file system) as a separable feature.
++
++mshandle_=$(GLOBJ)gp_mshdl.$(OBJ)
++$(GLD)mshandle.dev: $(ECHOGS_XE) $(mshandle_)
++	$(SETMOD) $(GLD)mshandle $(mshandle_)
++	$(ADDMOD) $(GLD)mshandle -iodev handle
++
++$(GLOBJ)gp_mshdl.$(OBJ): $(GLSRC)gp_mshdl.c $(AK)\
++ $(ctype__h) $(errno__h) $(stdio__h) $(string__h)\
++ $(gsmemory_h) $(gstypes_h) $(gxiodev_h) $(gserrors_h)
++	$(GLCC) $(GLO_)gp_mshdl.$(OBJ) $(C_) $(GLSRC)gp_mshdl.c
++
++# Define MS-Windows printer (file system) as a separable feature.
++
++msprinter_=$(GLOBJ)gp_msprn.$(OBJ)
++msxpsprinter_=$(GLOBJ)xpsprint.$(OBJ)
++
++$(GLD)msprinter_0.dev: $(ECHOGS_XE) $(msprinter_)
++	$(SETMOD) $(GLD)msprinter_0 $(msprinter_)
++	$(ADDMOD) $(GLD)msprinter_0 -iodev printer
++
++$(GLD)msprinter_1.dev: $(ECHOGS_XE) $(msprinter_) $(msxpsprinter_) \
++ $(DD)xpswrite.dev
++	$(SETMOD) $(GLD)msprinter_1 $(msprinter_) $(msxpsprinter_)
++	$(ADDMOD) $(GLD)msprinter_1 -iodev printer
++
++$(GLD)msprinter.dev: $(GLD)msprinter_$(XPSPRINT).dev
++	$(CP_) $(GLD)msprinter_$(XPSPRINT).dev $(GLD)msprinter.dev
++
++$(GLOBJ)gp_msprn.$(OBJ): $(GLSRC)gp_msprn.c $(AK)\
++ $(ctype__h) $(errno__h) $(stdio__h) $(string__h)\
++ $(gsmemory_h) $(gstypes_h) $(gxiodev_h)
++	$(GLCCWIN) $(GLO_)gp_msprn.$(OBJ) $(C_) $(GLSRC)gp_msprn.c
++
++# The XPS printer
++$(GLOBJ)xpsprint.$(OBJ): $(GLSRC)xpsprint.cpp $(windows__h) $(string__h) \
++ $(gx_h) $(gserrors_h)
++	$(GLCCWINXPSPRINT) $(GLO_)xpsprint.$(OBJ) $(C_) $(GLSRC)xpsprint.cpp
++
++# Define MS-Windows polling as a separable feature
++# because it is not needed by the gslib.
++mspoll_=$(GLOBJ)gp_mspol.$(OBJ)
++$(GLD)mspoll.dev: $(ECHOGS_XE) $(mspoll_)
++	$(SETMOD) $(GLD)mspoll $(mspoll_)
++
++$(GLOBJ)gp_mspol.$(OBJ): $(GLSRC)gp_mspol.c $(AK)\
++ $(gx_h) $(gp_h) $(gpcheck_h)
++	$(GLCCWIN) $(GLO_)gp_mspol.$(OBJ) $(C_) $(GLSRC)gp_mspol.c
++
++# end of w32.mak