All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] ghostscript: add patches to make it run cross compile platform
@ 2011-05-20 12:19 Kang Kai
  2011-05-20 12:19 ` [PATCH 1/1] ghostscript: fix run failure on mpc8315e Kang Kai
  0 siblings, 1 reply; 4+ messages in thread
From: Kang Kai @ 2011-05-20 12:19 UTC (permalink / raw)
  To: sgw; +Cc: poky

From: Kang Kai <kai.kang@windriver.com>

Hi Saul,

When test lsb on ppc find that gs can't run. The root cause is gs determines some target configuration
on build system. According to the document of ghostscript,
http://pages.cs.wisc.edu/~ghost/doc/cvs/Make.htm#Cross-compiling
when cross compile ghostscript need some manual work.
So import patches from WindRiver Linux to make sure ghostscript can be cross compiled.

The following changes since commit 7706d5d844db2725f4118207d90e302679eacdfe:

  linux-yocto/meta-yocto: fix gcc 4.6.0 compilation failures (2011-05-19 17:33:50 -0700)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib.git kangkai/distro
  http://git.pokylinux.org/cgit.cgi//log/?h=kangkai/distro

Kang Kai (1):
  ghostscript: fix run failure on mpc8315e

 .../ghostscript-8.64-mips64n32-build.patch         |  113 +++++++++++++++++++
 .../ghostscript/ghostscript-8.64-ppc32-build.patch |  113 +++++++++++++++++++
 .../ghostscript/ghostscript-8.64-x86-build.patch   |  115 ++++++++++++++++++++
 .../ghostscript-8.64-x86_64-build.patch            |  113 +++++++++++++++++++
 .../ghostscript/ghostscript-9.02-arm-build.patch   |  109 +++++++++++++++++++
 .../ghostscript/ghostscript_9.02.bb                |   17 +++-
 6 files changed, 577 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-mips64n32-build.patch
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-ppc32-build.patch
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-x86-build.patch
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-x86_64-build.patch
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-arm-build.patch

-- 
1.7.5.1.300.gc565c



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] ghostscript: fix run failure on mpc8315e
  2011-05-20 12:19 [PATCH 0/1] ghostscript: add patches to make it run cross compile platform Kang Kai
@ 2011-05-20 12:19 ` Kang Kai
  2011-05-20 16:18   ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Kang Kai @ 2011-05-20 12:19 UTC (permalink / raw)
  To: sgw; +Cc: poky

From: Kang Kai <kai.kang@windriver.com>

When run gs on mpc8315, it fails with:
GPL Ghostscript 9.02: ./psi/interp.c(291): Fatal error -20 in gs_interp_init!
It is caused by cross compile.

Accoding to the ghostscript document on:
http://pages.cs.wisc.edu/~ghost/doc/cvs/Make.htm#Cross-compiling
it needs some manual work, so import patches from WindRiver Linux.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 .../ghostscript-8.64-mips64n32-build.patch         |  113 +++++++++++++++++++
 .../ghostscript/ghostscript-8.64-ppc32-build.patch |  113 +++++++++++++++++++
 .../ghostscript/ghostscript-8.64-x86-build.patch   |  115 ++++++++++++++++++++
 .../ghostscript-8.64-x86_64-build.patch            |  113 +++++++++++++++++++
 .../ghostscript/ghostscript-9.02-arm-build.patch   |  109 +++++++++++++++++++
 .../ghostscript/ghostscript_9.02.bb                |   17 +++-
 6 files changed, 577 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-mips64n32-build.patch
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-ppc32-build.patch
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-x86-build.patch
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-x86_64-build.patch
 create mode 100644 meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-arm-build.patch

diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-mips64n32-build.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-mips64n32-build.patch
new file mode 100644
index 0000000..9618754
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-mips64n32-build.patch
@@ -0,0 +1,113 @@
+import patch from windriver linux to cross compile on mips
+
+Upstream-status: Pending
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+
+# Author: Chi Xu <chi.xu@windriver.com>
+# Date: Feb 26 2010
+# Summary: Generate arch.h for mips64n32 and mips64
+#
+
+diff -Nru ghostscript-8.64.orig/base/lib.mak ghostscript-8.64/base/lib.mak
+--- ghostscript-8.64.orig/base/lib.mak	2010-02-10 10:30:02.000000000 +0800
++++ ghostscript-8.64/base/lib.mak	2010-02-24 09:31:04.000000000 +0800
+@@ -50,8 +50,8 @@
+ stdpre_h=$(GLSRC)stdpre.h $(stdpn_h)
+ stdint__h=$(GLSRC)stdint_.h $(std_h)
+
+-$(GLGEN)arch.h : $(GENARCH_XE)
+-	$(EXP)$(GENARCH_XE) $(GLGEN)arch.h
++##$(GLGEN)arch.h : $(GENARCH_XE)
++##	$(EXP)$(GENARCH_XE) $(GLGEN)arch.h
+
+ # Platform interfaces
+
+diff -Nru ghostscript-8.64.orig/obj/arch.h ghostscript-8.64/obj/arch.h
+--- ghostscript-8.64.orig/obj/arch.h	1970-01-01 08:00:00.000000000 +0800
++++ ghostscript-8.64/obj/arch.h	2010-02-24 09:30:25.000000000 +0800
+@@ -0,0 +1,40 @@
++/* Parameters derived from machine and compiler architecture. */
++/* This file is generated mechanically by genarch.c. */
++
++	 /* ---------------- Scalar alignments ---------------- */
++
++#define ARCH_ALIGN_SHORT_MOD 2
++#define ARCH_ALIGN_INT_MOD 4
++#define ARCH_ALIGN_LONG_MOD 4
++#define ARCH_ALIGN_PTR_MOD 4
++#define ARCH_ALIGN_FLOAT_MOD 4
++#define ARCH_ALIGN_DOUBLE_MOD 8
++
++	 /* ---------------- Scalar sizes ---------------- */
++
++#define ARCH_LOG2_SIZEOF_CHAR 0
++#define ARCH_LOG2_SIZEOF_SHORT 1
++#define ARCH_LOG2_SIZEOF_INT 2
++#define ARCH_LOG2_SIZEOF_LONG 2
++#define ARCH_LOG2_SIZEOF_LONG_LONG 3
++#define ARCH_SIZEOF_GX_COLOR_INDEX 8
++#define ARCH_SIZEOF_PTR 4
++#define ARCH_SIZEOF_FLOAT 4
++#define ARCH_SIZEOF_DOUBLE 8
++#define ARCH_FLOAT_MANTISSA_BITS 24
++#define ARCH_DOUBLE_MANTISSA_BITS 53
++
++	 /* ---------------- Unsigned max values ---------------- */
++
++#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
++#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
++#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
++#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
++
++	 /* ---------------- Miscellaneous ---------------- */
++
++#define ARCH_IS_BIG_ENDIAN 1
++#define ARCH_PTRS_ARE_SIGNED 0
++#define ARCH_FLOATS_ARE_IEEE 1
++#define ARCH_ARITH_RSHIFT 2
++#define ARCH_DIV_NEG_POS_TRUNCATES 1
+diff -Nru ghostscript-8.64.orig/soobj/arch.h ghostscript-8.64/soobj/arch.h
+--- ghostscript-8.64.orig/soobj/arch.h	1970-01-01 08:00:00.000000000 +0800
++++ ghostscript-8.64/soobj/arch.h	2010-02-24 09:30:32.000000000 +0800
+@@ -0,0 +1,40 @@
++/* Parameters derived from machine and compiler architecture. */
++/* This file is generated mechanically by genarch.c. */
++
++	 /* ---------------- Scalar alignments ---------------- */
++
++#define ARCH_ALIGN_SHORT_MOD 2
++#define ARCH_ALIGN_INT_MOD 4
++#define ARCH_ALIGN_LONG_MOD 4
++#define ARCH_ALIGN_PTR_MOD 4
++#define ARCH_ALIGN_FLOAT_MOD 4
++#define ARCH_ALIGN_DOUBLE_MOD 8
++
++	 /* ---------------- Scalar sizes ---------------- */
++
++#define ARCH_LOG2_SIZEOF_CHAR 0
++#define ARCH_LOG2_SIZEOF_SHORT 1
++#define ARCH_LOG2_SIZEOF_INT 2
++#define ARCH_LOG2_SIZEOF_LONG 2
++#define ARCH_LOG2_SIZEOF_LONG_LONG 3
++#define ARCH_SIZEOF_GX_COLOR_INDEX 8
++#define ARCH_SIZEOF_PTR 4
++#define ARCH_SIZEOF_FLOAT 4
++#define ARCH_SIZEOF_DOUBLE 8
++#define ARCH_FLOAT_MANTISSA_BITS 24
++#define ARCH_DOUBLE_MANTISSA_BITS 53
++
++	 /* ---------------- Unsigned max values ---------------- */
++
++#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
++#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
++#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
++#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
++
++	 /* ---------------- Miscellaneous ---------------- */
++
++#define ARCH_IS_BIG_ENDIAN 1
++#define ARCH_PTRS_ARE_SIGNED 0
++#define ARCH_FLOATS_ARE_IEEE 1
++#define ARCH_ARITH_RSHIFT 2
++#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-ppc32-build.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-ppc32-build.patch
new file mode 100644
index 0000000..0f3571d
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-ppc32-build.patch
@@ -0,0 +1,113 @@
+import patch from windriver linux to cross compile on ppc32
+
+Upstream-status: Pending
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+
+# Author: Chi Xu <chi.xu@windriver.com>
+# Date: Feb 26 2010
+# Summary: Generate arch.h for ppc32
+#
+
+diff -Nru ghostscript-8.64.orig/base/lib.mak ghostscript-8.64/base/lib.mak
+--- ghostscript-8.64.orig/base/lib.mak	2010-02-10 10:30:02.000000000 +0800
++++ ghostscript-8.64/base/lib.mak	2010-02-10 10:56:21.000000000 +0800
+@@ -50,8 +50,8 @@
+ stdpre_h=$(GLSRC)stdpre.h $(stdpn_h)
+ stdint__h=$(GLSRC)stdint_.h $(std_h)
+
+-$(GLGEN)arch.h : $(GENARCH_XE)
+-	$(EXP)$(GENARCH_XE) $(GLGEN)arch.h
++##$(GLGEN)arch.h : $(GENARCH_XE)
++##	$(EXP)$(GENARCH_XE) $(GLGEN)arch.h
+
+ # Platform interfaces
+
+diff -Nru ghostscript-8.64.orig/obj/arch.h ghostscript-8.64/obj/arch.h
+--- ghostscript-8.64.orig/obj/arch.h	1970-01-01 08:00:00.000000000 +0800
++++ ghostscript-8.64/obj/arch.h	2010-02-10 10:31:44.000000000 +0800
+@@ -0,0 +1,40 @@
++/* Parameters derived from machine and compiler architecture. */
++/* This file is generated mechanically by genarch.c. */
++
++	 /* ---------------- Scalar alignments ---------------- */
++
++#define ARCH_ALIGN_SHORT_MOD 2
++#define ARCH_ALIGN_INT_MOD 4
++#define ARCH_ALIGN_LONG_MOD 4
++#define ARCH_ALIGN_PTR_MOD 4
++#define ARCH_ALIGN_FLOAT_MOD 4
++#define ARCH_ALIGN_DOUBLE_MOD 8
++
++	 /* ---------------- Scalar sizes ---------------- */
++
++#define ARCH_LOG2_SIZEOF_CHAR 0
++#define ARCH_LOG2_SIZEOF_SHORT 1
++#define ARCH_LOG2_SIZEOF_INT 2
++#define ARCH_LOG2_SIZEOF_LONG 2
++#define ARCH_LOG2_SIZEOF_LONG_LONG 3
++#define ARCH_SIZEOF_GX_COLOR_INDEX 8
++#define ARCH_SIZEOF_PTR 4
++#define ARCH_SIZEOF_FLOAT 4
++#define ARCH_SIZEOF_DOUBLE 8
++#define ARCH_FLOAT_MANTISSA_BITS 24
++#define ARCH_DOUBLE_MANTISSA_BITS 53
++
++	 /* ---------------- Unsigned max values ---------------- */
++
++#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
++#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
++#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
++#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
++
++	 /* ---------------- Miscellaneous ---------------- */
++
++#define ARCH_IS_BIG_ENDIAN 1
++#define ARCH_PTRS_ARE_SIGNED 0
++#define ARCH_FLOATS_ARE_IEEE 1
++#define ARCH_ARITH_RSHIFT 2
++#define ARCH_DIV_NEG_POS_TRUNCATES 1
+diff -Nru ghostscript-8.64.orig/soobj/arch.h ghostscript-8.64/soobj/arch.h
+--- ghostscript-8.64.orig/soobj/arch.h	1970-01-01 08:00:00.000000000 +0800
++++ ghostscript-8.64/soobj/arch.h	2010-02-10 10:31:24.000000000 +0800
+@@ -0,0 +1,40 @@
++/* Parameters derived from machine and compiler architecture. */
++/* This file is generated mechanically by genarch.c. */
++
++	 /* ---------------- Scalar alignments ---------------- */
++
++#define ARCH_ALIGN_SHORT_MOD 2
++#define ARCH_ALIGN_INT_MOD 4
++#define ARCH_ALIGN_LONG_MOD 4
++#define ARCH_ALIGN_PTR_MOD 4
++#define ARCH_ALIGN_FLOAT_MOD 4
++#define ARCH_ALIGN_DOUBLE_MOD 8
++
++	 /* ---------------- Scalar sizes ---------------- */
++
++#define ARCH_LOG2_SIZEOF_CHAR 0
++#define ARCH_LOG2_SIZEOF_SHORT 1
++#define ARCH_LOG2_SIZEOF_INT 2
++#define ARCH_LOG2_SIZEOF_LONG 2
++#define ARCH_LOG2_SIZEOF_LONG_LONG 3
++#define ARCH_SIZEOF_GX_COLOR_INDEX 8
++#define ARCH_SIZEOF_PTR 4
++#define ARCH_SIZEOF_FLOAT 4
++#define ARCH_SIZEOF_DOUBLE 8
++#define ARCH_FLOAT_MANTISSA_BITS 24
++#define ARCH_DOUBLE_MANTISSA_BITS 53
++
++	 /* ---------------- Unsigned max values ---------------- */
++
++#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
++#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
++#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
++#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
++
++	 /* ---------------- Miscellaneous ---------------- */
++
++#define ARCH_IS_BIG_ENDIAN 1
++#define ARCH_PTRS_ARE_SIGNED 0
++#define ARCH_FLOATS_ARE_IEEE 1
++#define ARCH_ARITH_RSHIFT 2
++#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-x86-build.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-x86-build.patch
new file mode 100644
index 0000000..257cc30
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-x86-build.patch
@@ -0,0 +1,115 @@
+import patch from windriver linux to cross compile on x86
+
+Upstream-status: Pending
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+
+# Author: Chi Xu <chi.xu@windriver.com>
+# Date: Feb 26 2010
+# Summary: Generate arch.h for x86
+#
+
+diff -Nru ghostscript-8.64.orig/base/lib.mak ghostscript-8.64/base/lib.mak
+--- ghostscript-8.64.orig/base/lib.mak	2010-02-10 10:30:02.000000000 +0800
++++ ghostscript-8.64/base/lib.mak	2010-02-11 17:55:02.000000000 +0800
+@@ -50,8 +50,8 @@
+ stdpre_h=$(GLSRC)stdpre.h $(stdpn_h)
+ stdint__h=$(GLSRC)stdint_.h $(std_h)
+
+-$(GLGEN)arch.h : $(GENARCH_XE)
+-	$(EXP)$(GENARCH_XE) $(GLGEN)arch.h
++##$(GLGEN)arch.h : $(GENARCH_XE)
++##	$(EXP)$(GENARCH_XE) $(GLGEN)arch.h
+
+ # Platform interfaces
+
+diff -Nru ghostscript-8.64.orig/obj/arch.h ghostscript-8.64/obj/arch.h
+--- ghostscript-8.64.orig/obj/arch.h	1970-01-01 08:00:00.000000000 +0800
++++ ghostscript-8.64/obj/arch.h	2010-02-11 17:54:08.000000000 +0800
+@@ -0,0 +1,41 @@
++/* Parameters derived from machine and compiler architecture. */
++/* This file is generated mechanically by genarch.c. */
++
++	 /* ---------------- Scalar alignments ---------------- */
++
++#define ARCH_ALIGN_SHORT_MOD 2
++#define ARCH_ALIGN_INT_MOD 4
++#define ARCH_ALIGN_LONG_MOD 4
++#define ARCH_ALIGN_PTR_MOD 4
++#define ARCH_ALIGN_FLOAT_MOD 4
++#define ARCH_ALIGN_DOUBLE_MOD 4
++
++	 /* ---------------- Scalar sizes ---------------- */
++
++#define ARCH_LOG2_SIZEOF_CHAR 0
++#define ARCH_LOG2_SIZEOF_SHORT 1
++#define ARCH_LOG2_SIZEOF_INT 2
++#define ARCH_LOG2_SIZEOF_LONG 2
++#define ARCH_LOG2_SIZEOF_LONG_LONG 3
++#define ARCH_SIZEOF_GX_COLOR_INDEX 8
++#define ARCH_SIZEOF_PTR 4
++#define ARCH_SIZEOF_FLOAT 4
++#define ARCH_SIZEOF_DOUBLE 8
++#define ARCH_FLOAT_MANTISSA_BITS 24
++#define ARCH_DOUBLE_MANTISSA_BITS 53
++
++	 /* ---------------- Unsigned max values ---------------- */
++
++#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
++#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
++#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
++#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
++
++	 /* ---------------- Miscellaneous ---------------- */
++
++#define ARCH_IS_BIG_ENDIAN 0
++#define ARCH_PTRS_ARE_SIGNED 0
++#define ARCH_FLOATS_ARE_IEEE 1
++#define ARCH_ARITH_RSHIFT 2
++#define ARCH_DIV_NEG_POS_TRUNCATES 1
++
+diff -Nru ghostscript-8.64.orig/soobj/arch.h ghostscript-8.64/soobj/arch.h
+--- ghostscript-8.64.orig/soobj/arch.h	1970-01-01 08:00:00.000000000 +0800
++++ ghostscript-8.64/soobj/arch.h	2010-02-11 17:54:17.000000000 +0800
+@@ -0,0 +1,41 @@
++/* Parameters derived from machine and compiler architecture. */
++/* This file is generated mechanically by genarch.c. */
++
++	 /* ---------------- Scalar alignments ---------------- */
++
++#define ARCH_ALIGN_SHORT_MOD 2
++#define ARCH_ALIGN_INT_MOD 4
++#define ARCH_ALIGN_LONG_MOD 4
++#define ARCH_ALIGN_PTR_MOD 4
++#define ARCH_ALIGN_FLOAT_MOD 4
++#define ARCH_ALIGN_DOUBLE_MOD 4
++
++	 /* ---------------- Scalar sizes ---------------- */
++
++#define ARCH_LOG2_SIZEOF_CHAR 0
++#define ARCH_LOG2_SIZEOF_SHORT 1
++#define ARCH_LOG2_SIZEOF_INT 2
++#define ARCH_LOG2_SIZEOF_LONG 2
++#define ARCH_LOG2_SIZEOF_LONG_LONG 3
++#define ARCH_SIZEOF_GX_COLOR_INDEX 8
++#define ARCH_SIZEOF_PTR 4
++#define ARCH_SIZEOF_FLOAT 4
++#define ARCH_SIZEOF_DOUBLE 8
++#define ARCH_FLOAT_MANTISSA_BITS 24
++#define ARCH_DOUBLE_MANTISSA_BITS 53
++
++	 /* ---------------- Unsigned max values ---------------- */
++
++#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
++#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
++#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
++#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
++
++	 /* ---------------- Miscellaneous ---------------- */
++
++#define ARCH_IS_BIG_ENDIAN 0
++#define ARCH_PTRS_ARE_SIGNED 0
++#define ARCH_FLOATS_ARE_IEEE 1
++#define ARCH_ARITH_RSHIFT 2
++#define ARCH_DIV_NEG_POS_TRUNCATES 1
++
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-x86_64-build.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-x86_64-build.patch
new file mode 100644
index 0000000..ddce1c5
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-8.64-x86_64-build.patch
@@ -0,0 +1,113 @@
+import patch from windriver linux to cross compile on x86_64
+
+Upstream-status: Pending
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+
+# Author: Chi Xu <chi.xu@windriver.com>
+# Date: Feb 26 2010
+# Summary: Generate arch.h for x86_64
+#
+
+diff -Nru ghostscript-8.64.orig/base/lib.mak ghostscript-8.64/base/lib.mak
+--- ghostscript-8.64.orig/base/lib.mak	2010-02-10 10:30:02.000000000 +0800
++++ ghostscript-8.64/base/lib.mak	2010-02-21 14:04:54.000000000 +0800
+@@ -50,8 +50,8 @@
+ stdpre_h=$(GLSRC)stdpre.h $(stdpn_h)
+ stdint__h=$(GLSRC)stdint_.h $(std_h)
+
+-$(GLGEN)arch.h : $(GENARCH_XE)
+-	$(EXP)$(GENARCH_XE) $(GLGEN)arch.h
++##$(GLGEN)arch.h : $(GENARCH_XE)
++##	$(EXP)$(GENARCH_XE) $(GLGEN)arch.h
+
+ # Platform interfaces
+
+diff -Nru ghostscript-8.64.orig/obj/arch.h ghostscript-8.64/obj/arch.h
+--- ghostscript-8.64.orig/obj/arch.h	1970-01-01 08:00:00.000000000 +0800
++++ ghostscript-8.64/obj/arch.h	2010-02-21 14:06:08.000000000 +0800
+@@ -0,0 +1,40 @@
++/* Parameters derived from machine and compiler architecture. */
++/* This file is generated mechanically by genarch.c. */
++
++	 /* ---------------- Scalar alignments ---------------- */
++
++#define ARCH_ALIGN_SHORT_MOD 2
++#define ARCH_ALIGN_INT_MOD 4
++#define ARCH_ALIGN_LONG_MOD 8
++#define ARCH_ALIGN_PTR_MOD 8
++#define ARCH_ALIGN_FLOAT_MOD 4
++#define ARCH_ALIGN_DOUBLE_MOD 8
++
++	 /* ---------------- Scalar sizes ---------------- */
++
++#define ARCH_LOG2_SIZEOF_CHAR 0
++#define ARCH_LOG2_SIZEOF_SHORT 1
++#define ARCH_LOG2_SIZEOF_INT 2
++#define ARCH_LOG2_SIZEOF_LONG 3
++#define ARCH_LOG2_SIZEOF_LONG_LONG 3
++#define ARCH_SIZEOF_GX_COLOR_INDEX 8
++#define ARCH_SIZEOF_PTR 8
++#define ARCH_SIZEOF_FLOAT 4
++#define ARCH_SIZEOF_DOUBLE 8
++#define ARCH_FLOAT_MANTISSA_BITS 24
++#define ARCH_DOUBLE_MANTISSA_BITS 53
++
++	 /* ---------------- Unsigned max values ---------------- */
++
++#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
++#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
++#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
++#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
++
++	 /* ---------------- Miscellaneous ---------------- */
++
++#define ARCH_IS_BIG_ENDIAN 0
++#define ARCH_PTRS_ARE_SIGNED 0
++#define ARCH_FLOATS_ARE_IEEE 1
++#define ARCH_ARITH_RSHIFT 2
++#define ARCH_DIV_NEG_POS_TRUNCATES 1
+diff -Nru ghostscript-8.64.orig/soobj/arch.h ghostscript-8.64/soobj/arch.h
+--- ghostscript-8.64.orig/soobj/arch.h	1970-01-01 08:00:00.000000000 +0800
++++ ghostscript-8.64/soobj/arch.h	2010-02-21 14:06:21.000000000 +0800
+@@ -0,0 +1,40 @@
++/* Parameters derived from machine and compiler architecture. */
++/* This file is generated mechanically by genarch.c. */
++
++	 /* ---------------- Scalar alignments ---------------- */
++
++#define ARCH_ALIGN_SHORT_MOD 2
++#define ARCH_ALIGN_INT_MOD 4
++#define ARCH_ALIGN_LONG_MOD 8
++#define ARCH_ALIGN_PTR_MOD 8
++#define ARCH_ALIGN_FLOAT_MOD 4
++#define ARCH_ALIGN_DOUBLE_MOD 8
++
++	 /* ---------------- Scalar sizes ---------------- */
++
++#define ARCH_LOG2_SIZEOF_CHAR 0
++#define ARCH_LOG2_SIZEOF_SHORT 1
++#define ARCH_LOG2_SIZEOF_INT 2
++#define ARCH_LOG2_SIZEOF_LONG 3
++#define ARCH_LOG2_SIZEOF_LONG_LONG 3
++#define ARCH_SIZEOF_GX_COLOR_INDEX 8
++#define ARCH_SIZEOF_PTR 8
++#define ARCH_SIZEOF_FLOAT 4
++#define ARCH_SIZEOF_DOUBLE 8
++#define ARCH_FLOAT_MANTISSA_BITS 24
++#define ARCH_DOUBLE_MANTISSA_BITS 53
++
++	 /* ---------------- Unsigned max values ---------------- */
++
++#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
++#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
++#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
++#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
++
++	 /* ---------------- Miscellaneous ---------------- */
++
++#define ARCH_IS_BIG_ENDIAN 0
++#define ARCH_PTRS_ARE_SIGNED 0
++#define ARCH_FLOATS_ARE_IEEE 1
++#define ARCH_ARITH_RSHIFT 2
++#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-arm-build.patch b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-arm-build.patch
new file mode 100644
index 0000000..cce0ab4
--- /dev/null
+++ b/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-arm-build.patch
@@ -0,0 +1,109 @@
+create the arch.h on mpc8315e and make it as patch, just to help
+cross compile on arm platform
+
+Upstream-status: Pending
+
+Signed-off-by: Kang Kai <kai.kang@windriver.com>
+
+diff -Nru ghostscript-9.02.orig/base/lib.mak ghostscript-9.02/base/lib.mak
+--- ghostscript-9.02.orig/base/lib.mak	2010-02-10 10:30:02.000000000 +0800
++++ ghostscript-9.02/base/lib.mak	2010-02-11 17:55:02.000000000 +0800
+@@ -50,8 +50,8 @@
+ stdpre_h=$(GLSRC)stdpre.h $(stdpn_h)
+ stdint__h=$(GLSRC)stdint_.h $(std_h)
+
+-$(GLGEN)arch.h : $(GENARCH_XE)
+-	$(EXP)$(GENARCH_XE) $(GLGEN)arch.h
++##$(GLGEN)arch.h : $(GENARCH_XE)
++##	$(EXP)$(GENARCH_XE) $(GLGEN)arch.h
+
+ # Platform interfaces
+
+diff -Nru ghostscript-9.02.orig/obj/arch.h ghostscript-9.02/obj/arch.h
+--- ghostscript-9.02.orig/obj/arch.h	1970-01-01 08:00:00.000000000 +0800
++++ ghostscript-9.02/obj/arch.h	2010-02-11 17:54:08.000000000 +0800
+@@ -0,0 +1,40 @@
++/* Parameters derived from machine and compiler architecture. */
++/* This file is generated mechanically by genarch.c. */
++
++	 /* ---------------- Scalar alignments ---------------- */
++
++#define ARCH_ALIGN_SHORT_MOD 2
++#define ARCH_ALIGN_INT_MOD 4
++#define ARCH_ALIGN_LONG_MOD 4
++#define ARCH_ALIGN_PTR_MOD 4
++#define ARCH_ALIGN_FLOAT_MOD 4
++#define ARCH_ALIGN_DOUBLE_MOD 8
++
++	 /* ---------------- Scalar sizes ---------------- */
++
++#define ARCH_LOG2_SIZEOF_CHAR 0
++#define ARCH_LOG2_SIZEOF_SHORT 1
++#define ARCH_LOG2_SIZEOF_INT 2
++#define ARCH_LOG2_SIZEOF_LONG 2
++#define ARCH_LOG2_SIZEOF_LONG_LONG 3
++#define ARCH_SIZEOF_GX_COLOR_INDEX 8
++#define ARCH_SIZEOF_PTR 4
++#define ARCH_SIZEOF_FLOAT 4
++#define ARCH_SIZEOF_DOUBLE 8
++#define ARCH_FLOAT_MANTISSA_BITS 24
++#define ARCH_DOUBLE_MANTISSA_BITS 53
++
++	 /* ---------------- Unsigned max values ---------------- */
++
++#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
++#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
++#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
++#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
++
++	 /* ---------------- Miscellaneous ---------------- */
++
++#define ARCH_IS_BIG_ENDIAN 0
++#define ARCH_PTRS_ARE_SIGNED 0
++#define ARCH_FLOATS_ARE_IEEE 1
++#define ARCH_ARITH_RSHIFT 2
++#define ARCH_DIV_NEG_POS_TRUNCATES 1
+diff -Nru ghostscript-9.02.orig/soobj/arch.h ghostscript-9.02/soobj/arch.h
+--- ghostscript-9.02.orig/soobj/arch.h	1970-01-01 08:00:00.000000000 +0800
++++ ghostscript-9.02/soobj/arch.h	2010-02-11 17:54:17.000000000 +0800
+@@ -0,0 +1,40 @@
++/* Parameters derived from machine and compiler architecture. */
++/* This file is generated mechanically by genarch.c. */
++
++	 /* ---------------- Scalar alignments ---------------- */
++
++#define ARCH_ALIGN_SHORT_MOD 2
++#define ARCH_ALIGN_INT_MOD 4
++#define ARCH_ALIGN_LONG_MOD 4
++#define ARCH_ALIGN_PTR_MOD 4
++#define ARCH_ALIGN_FLOAT_MOD 4
++#define ARCH_ALIGN_DOUBLE_MOD 8
++
++	 /* ---------------- Scalar sizes ---------------- */
++
++#define ARCH_LOG2_SIZEOF_CHAR 0
++#define ARCH_LOG2_SIZEOF_SHORT 1
++#define ARCH_LOG2_SIZEOF_INT 2
++#define ARCH_LOG2_SIZEOF_LONG 2
++#define ARCH_LOG2_SIZEOF_LONG_LONG 3
++#define ARCH_SIZEOF_GX_COLOR_INDEX 8
++#define ARCH_SIZEOF_PTR 4
++#define ARCH_SIZEOF_FLOAT 4
++#define ARCH_SIZEOF_DOUBLE 8
++#define ARCH_FLOAT_MANTISSA_BITS 24
++#define ARCH_DOUBLE_MANTISSA_BITS 53
++
++	 /* ---------------- Unsigned max values ---------------- */
++
++#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
++#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
++#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
++#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
++
++	 /* ---------------- Miscellaneous ---------------- */
++
++#define ARCH_IS_BIG_ENDIAN 0
++#define ARCH_PTRS_ARE_SIGNED 0
++#define ARCH_FLOATS_ARE_IEEE 1
++#define ARCH_ARITH_RSHIFT 2
++#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.02.bb b/meta/recipes-extended/ghostscript/ghostscript_9.02.bb
index dcdedad..fbbf181 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_9.02.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.02.bb
@@ -15,19 +15,24 @@ SECTION = "console/utils"
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=d151214b3131251dfc9d858593acbd24"
 
-PR = "r0"
+PR = "r1"
 
-DEPENDS = "tiff ${PN}-native"
+DEPENDS = "${PN}-native tiff jpeg fontconfig cups"
 DEPENDS_virtclass-native = ""
 
 SRC_URI = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.bz2 \
            file://ghostscript-9.02-prevent_recompiling.patch \
            "
+SRC_URI_append_powerpc = "file://ghostscript-8.64-ppc32-build.patch"
+SRC_URI_append_i586 = "file://ghostscript-8.64-x86-build.patch"
+SRC_URI_append_x86_64 = "file://ghostscript-8.64-x86_64-build.patch"
+SRC_URI_append_mips = "file://ghostscript-8.64-mips64n32-build.patch"
+SRC_URI_append_arm = "file://ghostscript-9.02-arm-build.patch"
 
 SRC_URI[md5sum] = "f67151444bd56a7904579fc75a083dd6"
 SRC_URI[sha256sum] = "03ea2cad13a36f8f9160912012b79619a826e7148fada6d3531feb25409ee05a"
 
-EXTRA_OECONF = "--with-system-libtiff --without-jbig2dec --without-jasper --x-includes=${STAGING_DIR_HOST}/usr/include/X11 --x-libraries=${STAGING_DIR_HOST}/usr/lib"
+EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec --without-jasper --with-fontpath=${datadir}/fonts"
 
 inherit autotools
 
@@ -42,6 +47,12 @@ do_configure () {
     done
 }
 
+do_install_append () {
+    mkdir -p ${D}${datadir}/ghostscript/${PV}/
+    cp -r Resource ${D}${datadir}/ghostscript/${PV}/
+    cp -r iccprofiles ${D}${datadir}/ghostscript/${PV}/
+}
+
 python do_patch_virtclass-native () {
     pass
 }
-- 
1.7.5.1.300.gc565c



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] ghostscript: fix run failure on mpc8315e
  2011-05-20 12:19 ` [PATCH 1/1] ghostscript: fix run failure on mpc8315e Kang Kai
@ 2011-05-20 16:18   ` Richard Purdie
  2011-05-21  1:36     ` Kang Kai
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2011-05-20 16:18 UTC (permalink / raw)
  To: Kang Kai; +Cc: poky

Hi,

On Fri, 2011-05-20 at 20:19 +0800, Kang Kai wrote:
> From: Kang Kai <kai.kang@windriver.com>
> 
> When run gs on mpc8315, it fails with:
> GPL Ghostscript 9.02: ./psi/interp.c(291): Fatal error -20 in gs_interp_init!
> It is caused by cross compile.
> 
> Accoding to the ghostscript document on:
> http://pages.cs.wisc.edu/~ghost/doc/cvs/Make.htm#Cross-compiling
> it needs some manual work, so import patches from WindRiver Linux.
> 
> Signed-off-by: Kang Kai <kai.kang@windriver.com>

There is a way to do this more neatly within OE. You can create a
directory structure of:

recipes-extended/ghostscriptghostscript-9.02/powerpc/objarch.h
recipes-extended/ghostscriptghostscript-9.02/powerpc/soobjarch.h
recipes-extended/ghostscriptghostscript-9.02/i586/objarch.h
recipes-extended/ghostscriptghostscript-9.02/i586/soobjarch.h
recipes-extended/ghostscriptghostscript-9.02/mips/objarch.h
recipes-extended/ghostscriptghostscript-9.02/mips/soobjarch.h
recipes-extended/ghostscriptghostscript-9.02/x86_64/objarch.h
recipes-extended/ghostscriptghostscript-9.02/x86_64/soobjarch.h
recipes-extended/ghostscriptghostscript-9.02/arm/objarch.h
recipes-extended/ghostscriptghostscript-9.02/arm/soobjarch.h

Then just add file://objarch.h and file://soobjarch.h to SRC_URI and a

do_configure_prepend () {
     cp ${WORKDIR}/objarch.h ${S}/obj/arch.h
     cp ${WORKDIR}/soobjarch.h ${S}/soobj/arch.h
}

and the rest will happen automatically (you'll still need the lib.mak
bit of the patch applied unconditionally).

Cheers,

Richard



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] ghostscript: fix run failure on mpc8315e
  2011-05-20 16:18   ` Richard Purdie
@ 2011-05-21  1:36     ` Kang Kai
  0 siblings, 0 replies; 4+ messages in thread
From: Kang Kai @ 2011-05-21  1:36 UTC (permalink / raw)
  To: Richard Purdie; +Cc: poky

Hi Richard,
> Hi,
>
> On Fri, 2011-05-20 at 20:19 +0800, Kang Kai wrote:
>> From: Kang Kai<kai.kang@windriver.com>
>>
>> When run gs on mpc8315, it fails with:
>> GPL Ghostscript 9.02: ./psi/interp.c(291): Fatal error -20 in gs_interp_init!
>> It is caused by cross compile.
>>
>> Accoding to the ghostscript document on:
>> http://pages.cs.wisc.edu/~ghost/doc/cvs/Make.htm#Cross-compiling
>> it needs some manual work, so import patches from WindRiver Linux.
>>
>> Signed-off-by: Kang Kai<kai.kang@windriver.com>
> There is a way to do this more neatly within OE. You can create a
> directory structure of:
>
> recipes-extended/ghostscriptghostscript-9.02/powerpc/objarch.h
> recipes-extended/ghostscriptghostscript-9.02/powerpc/soobjarch.h
> recipes-extended/ghostscriptghostscript-9.02/i586/objarch.h
> recipes-extended/ghostscriptghostscript-9.02/i586/soobjarch.h
> recipes-extended/ghostscriptghostscript-9.02/mips/objarch.h
> recipes-extended/ghostscriptghostscript-9.02/mips/soobjarch.h
> recipes-extended/ghostscriptghostscript-9.02/x86_64/objarch.h
> recipes-extended/ghostscriptghostscript-9.02/x86_64/soobjarch.h
> recipes-extended/ghostscriptghostscript-9.02/arm/objarch.h
> recipes-extended/ghostscriptghostscript-9.02/arm/soobjarch.h
>
> Then just add file://objarch.h and file://soobjarch.h to SRC_URI and a
>
> do_configure_prepend () {
>       cp ${WORKDIR}/objarch.h ${S}/obj/arch.h
>       cp ${WORKDIR}/soobjarch.h ${S}/soobj/arch.h
> }
>
> and the rest will happen automatically (you'll still need the lib.mak
> bit of the patch applied unconditionally).
Thanks, I will update the pull request.

> Cheers,
>
> Richard
>
Regards,
Kai



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-21  1:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-20 12:19 [PATCH 0/1] ghostscript: add patches to make it run cross compile platform Kang Kai
2011-05-20 12:19 ` [PATCH 1/1] ghostscript: fix run failure on mpc8315e Kang Kai
2011-05-20 16:18   ` Richard Purdie
2011-05-21  1:36     ` Kang Kai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.