diff options
Diffstat (limited to 'poky/meta/recipes-extended/ghostscript')
39 files changed, 1686 insertions, 0 deletions
diff --git a/poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch b/poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch new file mode 100644 index 000000000..c3e44fe86 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch @@ -0,0 +1,38 @@ +From 5ef8b85bc98f3bd9a15d5f47e24d3e23ae27c265 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Mon, 18 Jan 2016 01:00:30 -0500 +Subject: [PATCH] configure.ac: do not check local png source + +In oe-core, it did not need to compile local libpng +source in ghostscript, so do not check local png +source, and directly check the existance of shared +libpng library. + +Upstream-Status: Inappropriate [OE-Core specific] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index bf6d3f5..01df03f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -930,11 +930,11 @@ AC_SUBST(ZLIBDIR) + AC_SUBST(FT_SYS_ZLIB) + + dnl png for the png output device; it also requires zlib +-LIBPNGDIR=src ++LIBPNGDIR=$srcdir/libpng + PNGDEVS='' + PNGDEVS_ALL='png48 png16m pnggray pngmono pngmonod png256 png16 pngalpha' + AC_MSG_CHECKING([for local png library source]) +-if test -f $srcdir/libpng/pngread.c; then ++if false; then + AC_MSG_RESULT([yes]) + SHARE_LIBPNG=0 + LIBPNGDIR=$srcdir/libpng +-- +2.8.1 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-11714.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-11714.patch new file mode 100644 index 000000000..84983c5ae --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-11714.patch @@ -0,0 +1,61 @@ +From 671fd59eb657743aa86fbc1895cb15872a317caa Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Thu, 6 Jul 2017 14:54:02 +0100 +Subject: [PATCH] Bug 698158: prevent trying to reloc a freed object + +In the token reader, we pass the scanner state structure around as a +t_struct ref on the Postscript operand stack. + +But we explicitly free the scanner state when we're done, which leaves a +dangling reference on the operand stack and, unless that reference gets +overwritten before the next garbager run, we can end up with the garbager +trying to deal with an already freed object - that can cause a crash, or +memory corruption. +--- + psi/ztoken.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +--- end of original header + +CVE: CVE-2017-11714 + +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + +diff --git a/psi/ztoken.c b/psi/ztoken.c +index 4dba7c5..af1ceeb 100644 +--- a/psi/ztoken.c ++++ b/psi/ztoken.c +@@ -107,6 +107,12 @@ token_continue(i_ctx_t *i_ctx_p, scanner_state * pstate, bool save) + int code; + ref token; + ++ /* Since we might free pstate below, and we're dealing with ++ * gc memory referenced by the stack, we need to explicitly ++ * remove the reference to pstate from the stack, otherwise ++ * the garbager will fall over ++ */ ++ make_null(osp); + /* Note that gs_scan_token may change osp! */ + pop(1); /* remove the file or scanner state */ + again: +@@ -183,8 +189,14 @@ ztokenexec_continue(i_ctx_t *i_ctx_p) + static int + tokenexec_continue(i_ctx_t *i_ctx_p, scanner_state * pstate, bool save) + { +- os_ptr op; ++ os_ptr op = osp; + int code; ++ /* Since we might free pstate below, and we're dealing with ++ * gc memory referenced by the stack, we need to explicitly ++ * remove the reference to pstate from the stack, otherwise ++ * the garbager will fall over ++ */ ++ make_null(osp); + /* Note that gs_scan_token may change osp! */ + pop(1); + again: +-- +1.7.9.5 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-5951.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-5951.patch new file mode 100644 index 000000000..62cc1342a --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-5951.patch @@ -0,0 +1,44 @@ +From bfa6b2ecbe48edc69a7d9d22a12419aed25960b8 Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Thu, 6 Apr 2017 16:44:54 +0100 +Subject: [PATCH] Bug 697548: use the correct param list enumerator + +When we encountered dictionary in a ref_param_list, we were using the enumerator +for the "parent" param_list, rather than the enumerator for the param_list +we just created for the dictionary. That parent was usually the stack +list enumerator, and caused a segfault. + +Using the correct enumerator works better. + +Upstream-Status: Backport +CVE: CVE-2017-5951 + +Signed-off-by: Catalin Enache <catalin.enache@windriver.com> +--- + psi/iparam.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/psi/iparam.c b/psi/iparam.c +index 4e63b6d..b2fa85f 100644 +--- a/psi/iparam.c ++++ b/psi/iparam.c +@@ -770,12 +770,13 @@ ref_param_read_typed(gs_param_list * plist, gs_param_name pkey, + gs_param_enumerator_t enumr; + gs_param_key_t key; + ref_type keytype; ++ dict_param_list *dlist = (dict_param_list *) pvalue->value.d.list; + + param_init_enumerator(&enumr); +- if (!(*((iparam_list *) plist)->enumerate) +- ((iparam_list *) pvalue->value.d.list, &enumr, &key, &keytype) ++ if (!(*(dlist->enumerate)) ++ ((iparam_list *) dlist, &enumr, &key, &keytype) + && keytype == t_integer) { +- ((dict_param_list *) pvalue->value.d.list)->int_keys = 1; ++ dlist->int_keys = 1; + pvalue->type = gs_param_type_dict_int_keys; + } + } +-- +2.10.2 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-7207.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-7207.patch new file mode 100644 index 000000000..a05dc02c6 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-7207.patch @@ -0,0 +1,39 @@ +From 0e88bee1304993668fede72498d656a2dd33a35e Mon Sep 17 00:00:00 2001 +From: Ken Sharp <ken.sharp@artifex.com> +Date: Mon, 20 Mar 2017 09:34:11 +0000 +Subject: [PATCH] Ensure a device has raster memory, before trying to read it. + +Bug #697676 "Null pointer dereference in mem_get_bits_rectangle()" + +This is only possible by abusing/mis-using Ghostscript-specific +language extensions, so cannot happen in a general PostScript program. + +Nevertheless, Ghostscript should not crash. So this commit checks the +memory device to see if raster memory has been allocated, before trying +to read from it. + +Upstream-Status: Backport +CVE: CVE-2017-7207 + +Author: Ken Sharp <ken.sharp@artifex.com> +Signed-off-by: Catalin Enache <catalin.enache@windriver.com> +--- + base/gdevmem.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/base/gdevmem.c b/base/gdevmem.c +index 41108ba..183f96d 100644 +--- a/base/gdevmem.c ++++ b/base/gdevmem.c +@@ -605,6 +605,8 @@ mem_get_bits_rectangle(gx_device * dev, const gs_int_rect * prect, + GB_PACKING_CHUNKY | GB_COLORS_NATIVE | GB_ALPHA_NONE; + return_error(gs_error_rangecheck); + } ++ if (mdev->line_ptrs == 0x00) ++ return_error(gs_error_rangecheck); + if ((w <= 0) | (h <= 0)) { + if ((w | h) < 0) + return_error(gs_error_rangecheck); +-- +2.10.2 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-7975.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-7975.patch new file mode 100644 index 000000000..e406086e8 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-7975.patch @@ -0,0 +1,37 @@ +From b39be1019b4acc1aa50c6026463c543332e95a31 Mon Sep 17 00:00:00 2001 +From: Catalin Enache <catalin.enache@windriver.com> +Date: Mon, 8 May 2017 16:18:14 +0300 + +Subject: [PATCH] Bug 697693: Prevent SEGV due to integer overflow. + +While building a Huffman table, the start and end points were susceptible +to integer overflow. + +Thank you to Jiaqi for finding this issue and suggesting a patch. + +Upstream-Status: Backport +CVE: CVE-2017-7975 + +Signed-off-by: Catalin Enache <catalin.enache@windriver.com> + +Contents of this patch were extracted from a larger patch which addressed +two CVE's. The context (location of {) was also modified to apply to +ghostscript 9.21. + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + + +--- a/jbig2dec/jbig2_huffman.c ++++ b/jbig2dec/jbig2_huffman.c +@@ -421,8 +421,8 @@ jbig2_build_huffman_table(Jbig2Ctx *ctx, + + if (PREFLEN == CURLEN) { + int RANGELEN = lines[CURTEMP].RANGELEN; +- int start_j = CURCODE << shift; +- int end_j = (CURCODE + 1) << shift; ++ uint32_t start_j = CURCODE << shift; ++ uint32_t end_j = (CURCODE + 1) << shift; + byte eflags = 0; + + if (end_j > max_j) { + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9216.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9216.patch new file mode 100644 index 000000000..1caeb3ef5 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9216.patch @@ -0,0 +1,36 @@ +From 3ebffb1d96ba0cacec23016eccb4047dab365853 Mon Sep 17 00:00:00 2001 +From: Shailesh Mistry <shailesh.mistry@hotmail.co.uk> +Date: Wed, 24 May 2017 19:29:57 +0100 +Subject: [PATCH] Bug 697934: Fix SEGV due to error code being ignored. + +The return code from jbig2_decode_text_region was being ignored so the +code continued to try and parse the invalid file using incomplete/empty +structures. + +Upstream-Status: Backport +CVE: CVE-2017-9216 + +Signed-off-by: Catalin Enache <catalin.enache@windriver.com> +--- + jbig2dec/jbig2_symbol_dict.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/jbig2dec/jbig2_symbol_dict.c b/jbig2dec/jbig2_symbol_dict.c +index 3cc1731..672425d 100644 +--- a/jbig2dec/jbig2_symbol_dict.c ++++ b/jbig2dec/jbig2_symbol_dict.c +@@ -493,8 +493,10 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx, + } + + /* multiple symbols are handled as a text region */ +- jbig2_decode_text_region(ctx, segment, tparams, (const Jbig2SymbolDict * const *)refagg_dicts, ++ code = jbig2_decode_text_region(ctx, segment, tparams, (const Jbig2SymbolDict * const *)refagg_dicts, + n_refagg_dicts, image, data, size, GR_stats, as, ws); ++ if (code < 0) ++ goto cleanup4; + + SDNEWSYMS->glyphs[NSYMSDECODED] = image; + refagg_dicts[0]->glyphs[params->SDNUMINSYMS + NSYMSDECODED] = jbig2_image_clone(ctx, SDNEWSYMS->glyphs[NSYMSDECODED]); +-- +2.10.2 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9611.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9611.patch new file mode 100644 index 000000000..58ef04d1f --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9611.patch @@ -0,0 +1,34 @@ +From c7c55972758a93350882c32147801a3485b010fe Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Mon, 12 Jun 2017 13:08:40 +0100 +Subject: [PATCH] Bug 698024: bounds check zone pointer in Ins_MIRP() + +--- + base/ttinterp.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- end of original header + +CVE: CVE-2017-9611 + +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + +diff --git a/base/ttinterp.c b/base/ttinterp.c +index e56aec6..f6a6d95 100644 +--- a/base/ttinterp.c ++++ b/base/ttinterp.c +@@ -3858,7 +3858,8 @@ static int nInstrCount=0; + /* XXX: UNDOCUMENTED! cvt[-1] = 0 always */ + + if ( BOUNDS( args[0], CUR.zp1.n_points ) || +- BOUNDS( args[1]+1, CUR.cvtSize+1 ) ) ++ BOUNDS( args[1]+1, CUR.cvtSize+1 ) || ++ BOUNDS(CUR.GS.rp0, CUR.zp0.n_points) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; +-- +1.7.9.5 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9612.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9612.patch new file mode 100644 index 000000000..b737cc56b --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9612.patch @@ -0,0 +1,35 @@ +From 98f6da60b9d463c617e631fc254cf6d66f2e8e3c Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Mon, 12 Jun 2017 13:15:17 +0100 +Subject: [PATCH] Bug 698026: bounds check zone pointers in Ins_IP() + +--- + base/ttinterp.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- end of original header + +CVE: CVE-2017-9612 + +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + +diff --git a/base/ttinterp.c b/base/ttinterp.c +index f6a6d95..e7c9d68 100644 +--- a/base/ttinterp.c ++++ b/base/ttinterp.c +@@ -4129,7 +4129,9 @@ static int nInstrCount=0; + Int point; + (void)args; + +- if ( CUR.top < CUR.GS.loop ) ++ if ( CUR.top < CUR.GS.loop || ++ BOUNDS(CUR.GS.rp1, CUR.zp0.n_points) || ++ BOUNDS(CUR.GS.rp2, CUR.zp1.n_points)) + { + CUR.error = TT_Err_Invalid_Reference; + return; +-- +1.7.9.5 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9726.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9726.patch new file mode 100644 index 000000000..3e6c65699 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9726.patch @@ -0,0 +1,33 @@ +From 7755e67116e8973ee0e3b22d653df026a84fa01b Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Thu, 15 Jun 2017 08:58:31 +0100 +Subject: [PATCH] Bug 698055: bounds check zone pointer in Ins_MDRP + +--- + base/ttinterp.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- end of original header + +CVE: CVE-2017-9726 + +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] + +Signed-off-by: Joe Slater <joe.slater@windriver.com> +diff --git a/base/ttinterp.c b/base/ttinterp.c +index e7c9d68..af457e8 100644 +--- a/base/ttinterp.c ++++ b/base/ttinterp.c +@@ -3770,7 +3770,8 @@ static int nInstrCount=0; + + point = (Int)args[0]; + +- if ( BOUNDS( args[0], CUR.zp1.n_points ) ) ++ if ( BOUNDS( args[0], CUR.zp1.n_points ) || ++ BOUNDS( CUR.GS.rp0, CUR.zp0.n_points) ) + { + /* Current version of FreeType silently ignores this out of bounds error + * and drops the instruction, see bug #691121 +-- +1.7.9.5 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9727.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9727.patch new file mode 100644 index 000000000..a2f7bfa50 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9727.patch @@ -0,0 +1,35 @@ +From 937ccd17ac65935633b2ebc06cb7089b91e17e6b Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Thu, 15 Jun 2017 09:05:20 +0100 +Subject: [PATCH] Bug 698056: make bounds check in gx_ttfReader__Read more + robust + +--- + base/gxttfb.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- end of original header + +CVE: CVE-2017-9727 + +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + +diff --git a/base/gxttfb.c b/base/gxttfb.c +index 0e9a444..e1561af 100644 +--- a/base/gxttfb.c ++++ b/base/gxttfb.c +@@ -79,7 +79,8 @@ static void gx_ttfReader__Read(ttfReader *self, void *p, int n) + if (!r->error) { + if (r->extra_glyph_index != -1) { + q = r->glyph_data.bits.data + r->pos; +- r->error = (r->glyph_data.bits.size - r->pos < n ? ++ r->error = ((r->pos >= r->glyph_data.bits.size || ++ r->glyph_data.bits.size - r->pos < n) ? + gs_note_error(gs_error_invalidfont) : 0); + if (r->error == 0) + memcpy(p, q, n); +-- +1.7.9.5 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9739.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9739.patch new file mode 100644 index 000000000..69a94df7b --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9739.patch @@ -0,0 +1,37 @@ +From c501a58f8d5650c8ba21d447c0d6f07eafcb0f15 Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Fri, 16 Jun 2017 08:29:25 +0100 +Subject: [PATCH] Bug 698063: Bounds check Ins_JMPR + +--- + base/ttinterp.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- end of original header + +CVE: CVE-2017-9739 + +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + +diff --git a/base/ttinterp.c b/base/ttinterp.c +index af457e8..adf3f0c 100644 +--- a/base/ttinterp.c ++++ b/base/ttinterp.c +@@ -1794,6 +1794,12 @@ static int nInstrCount=0; + + static void Ins_JMPR( INS_ARG ) + { ++ if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) ++ { ++ CUR.error = TT_Err_Invalid_Reference; ++ return; ++ } ++ + CUR.IP += (Int)(args[0]); + CUR.step_ins = FALSE; + +-- +1.7.9.5 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9835.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9835.patch new file mode 100644 index 000000000..7c65690c6 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/CVE-2017-9835.patch @@ -0,0 +1,125 @@ +From cfde94be1d4286bc47633c6e6eaf4e659bd78066 Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Wed, 7 Jun 2017 14:55:12 +0100 +Subject: [PATCH] Bug 697985: bounds check the array allocations methods + +The clump allocator has four allocation functions that use 'number of elements' +and 'size of elements' parameters (rather than a simple 'number of bytes'). + +Those need specific bounds checking. +--- + base/gsalloc.c | 42 ++++++++++++++++++++++++++++-------------- + 1 file changed, 28 insertions(+), 14 deletions(-) + +--- end of original header + +CVE: CVE-2017-9835 + +Upstream-Status: Backport [git://git.ghostscript.com/ghostpdl.git] + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + +diff --git a/base/gsalloc.c b/base/gsalloc.c +index 741ba00..10c04dd 100644 +--- a/base/gsalloc.c ++++ b/base/gsalloc.c +@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, + alloc_trace("|+<.", imem, cname, pstype, size, obj); + return obj; + } ++ ++static inline bool ++alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) ++{ ++ int64_t s = (int64_t)num_elements * elt_size; ++ if (s > max_uint) { ++ return false; ++ } ++ *lsize = (ulong)s; ++ return true; ++} ++ + static byte * + i_alloc_byte_array(gs_memory_t * mem, uint num_elements, uint elt_size, + client_name_t cname) + { + gs_ref_memory_t * const imem = (gs_ref_memory_t *)mem; + obj_header_t *obj; +- ++ ulong lsize; + #ifdef MEMENTO + if (Memento_failThisEvent()) + return NULL; + #endif +- +- obj = alloc_obj(imem, (ulong) num_elements * elt_size, ++ if (alloc_array_check_size(num_elements, elt_size, &lsize) == false) ++ return NULL; ++ obj = alloc_obj(imem, lsize, + &st_bytes, ALLOC_DIRECT, cname); + + if_debug6m('A', mem, "[a%d:+b.]%s -bytes-*(%lu=%u*%u) = 0x%lx\n", +@@ -1275,13 +1288,14 @@ i_alloc_byte_array_immovable(gs_memory_t * mem, uint num_elements, + { + gs_ref_memory_t * const imem = (gs_ref_memory_t *)mem; + obj_header_t *obj; +- ++ ulong lsize; + #ifdef MEMENTO + if (Memento_failThisEvent()) + return NULL; + #endif +- +- obj = alloc_obj(imem, (ulong) num_elements * elt_size, ++ if (alloc_array_check_size(num_elements, elt_size, &lsize) == false) ++ return NULL; ++ obj = alloc_obj(imem, lsize, + &st_bytes, ALLOC_IMMOVABLE | ALLOC_DIRECT, + cname); + +@@ -1297,7 +1311,7 @@ i_alloc_struct_array(gs_memory_t * mem, uint num_elements, + { + gs_ref_memory_t * const imem = (gs_ref_memory_t *)mem; + obj_header_t *obj; +- ++ ulong lsize; + #ifdef MEMENTO + if (Memento_failThisEvent()) + return NULL; +@@ -1311,9 +1325,9 @@ i_alloc_struct_array(gs_memory_t * mem, uint num_elements, + return NULL; /* fail */ + } + #endif +- obj = alloc_obj(imem, +- (ulong) num_elements * pstype->ssize, +- pstype, ALLOC_DIRECT, cname); ++ if (alloc_array_check_size(num_elements, pstype->ssize, &lsize) == false) ++ return NULL; ++ obj = alloc_obj(imem, lsize, pstype, ALLOC_DIRECT, cname); + if_debug7m('A', mem, "[a%d:+<.]%s %s*(%lu=%u*%u) = 0x%lx\n", + alloc_trace_space(imem), client_name_string(cname), + struct_type_name_string(pstype), +@@ -1327,16 +1341,16 @@ i_alloc_struct_array_immovable(gs_memory_t * mem, uint num_elements, + { + gs_ref_memory_t * const imem = (gs_ref_memory_t *)mem; + obj_header_t *obj; +- ++ ulong lsize; + #ifdef MEMENTO + if (Memento_failThisEvent()) + return NULL; + #endif + + ALLOC_CHECK_SIZE(mem,pstype); +- obj = alloc_obj(imem, +- (ulong) num_elements * pstype->ssize, +- pstype, ALLOC_IMMOVABLE | ALLOC_DIRECT, cname); ++ if (alloc_array_check_size(num_elements, pstype->ssize, &lsize) == false) ++ return NULL; ++ obj = alloc_obj(imem, lsize, pstype, ALLOC_IMMOVABLE | ALLOC_DIRECT, cname); + if_debug7m('A', mem, "[a%d|+<.]%s %s*(%lu=%u*%u) = 0x%lx\n", + alloc_trace_space(imem), client_name_string(cname), + struct_type_name_string(pstype), +-- +1.7.9.5 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h b/poky/meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h new file mode 100644 index 000000000..a05de29de --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/aarch64/objarch.h @@ -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/poky/meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h b/poky/meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h new file mode 100644 index 000000000..e8772cd95 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/arm/objarch.h @@ -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/poky/meta/recipes-extended/ghostscript/ghostscript/armeb/objarch.h b/poky/meta/recipes-extended/ghostscript/ghostscript/armeb/objarch.h new file mode 100644 index 000000000..359097f35 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/armeb/objarch.h @@ -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/poky/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch new file mode 100644 index 000000000..c4794e7d8 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/avoid-host-contamination.patch @@ -0,0 +1,19 @@ +Remove hardcode path refer to host to avoid host contamination. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +--- +diff --git a/devices/devs.mak b/devices/devs.mak +index 3070d2e..df663f0 100644 +--- a/devices/devs.mak ++++ b/devices/devs.mak +@@ -546,7 +546,7 @@ $(DEVOBJ)gdevxalt.$(OBJ) : $(DEVSRC)gdevxalt.c $(GDEVX) $(math__h) $(memory__h)\ + ### NON PORTABLE, ONLY UNIX WITH GCC SUPPORT + + $(DEVOBJ)X11.so : $(x11alt_) $(x11_) $(DEVS_MAK) $(MAKEDIRS) +- $(CCLD) $(LDFLAGS) -shared -o $(DEVOBJ)X11.so $(x11alt_) $(x11_) -L/usr/X11R6/lib -lXt -lSM -lICE -lXext -lX11 $(XLIBDIRS) ++ $(CCLD) $(LDFLAGS) -shared -o $(DEVOBJ)X11.so $(x11alt_) $(x11_) -lXt -lSM -lICE -lXext -lX11 $(XLIBDIRS) + + ###### --------------- Memory-buffered printer devices --------------- ###### + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch new file mode 100644 index 000000000..d97d4ecd7 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/base-genht.c-add-a-preprocessor-define-to-allow-fope.patch @@ -0,0 +1,36 @@ +base/genht.c: add a preprocessor define to allow fopen calling + +The commit in upstream: +http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=773c69e46e70bdd5482676437dafd2ca83397643 + +Replace all fopen calls with gp_fopen and add a preprocessor define so +that any unintential calls directly to fopen will cause an error. + +Only exceptions are those in the platform specific code, and mkromfs.c. +This patch add a preprocessor define to allow fopen calling in base/genht.c. + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + base/genht.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/base/genht.c b/base/genht.c +index 4b04085..cc82fff 100644 +--- a/base/genht.c ++++ b/base/genht.c +@@ -16,6 +16,10 @@ + + /* Generate C code for compiling halftones into ROM. */ + #include "malloc_.h" ++ ++/* prevent gp.h from defining fopen */ ++#define fopen fopen ++ + #include "stdio_.h" + #include "string_.h" + #include "gscdefs.h" +-- +1.8.1.2 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch new file mode 100644 index 000000000..a1c9368cc --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/cups-no-gcrypt.patch @@ -0,0 +1,31 @@ +Subject: [PATCH] Don't build-depend on libgcrypt, as nothing is used from it + +Backported from http://www.cups.org/strfiles.php/3308/cups-no-gcrypt.patch + +This addresses the cryto dependency seen during build. + +Upstream-Status: Backport + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> + +Rebase the patch to ghostscript-9.15 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + cups/libs/cups/http-private.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/cups/libs/cups/http-private.h b/cups/libs/cups/http-private.h +index 99a85c3..a674852 100644 +--- a/cups/libs/cups/http-private.h ++++ b/cups/libs/cups/http-private.h +@@ -80,7 +80,6 @@ typedef int socklen_t; + # elif defined HAVE_GNUTLS + # include <gnutls/gnutls.h> + # include <gnutls/x509.h> +-# include <gcrypt.h> + # elif defined(HAVE_CDSASSL) + # include <CoreFoundation/CoreFoundation.h> + # include <Security/Security.h> +-- +1.9.1 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch new file mode 100644 index 000000000..b4c14ea23 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.02-genarch.patch @@ -0,0 +1,29 @@ +Import patch from windriver linux for cross compilation, and split patches +into oe way under different directories such as i586, powerpc etc according +to Richard's opinion. + +Upstream-Status: Pending + +Signed-off-by: Kang Kai <kai.kang@windriver.com> +Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> + +# Author: Chi Xu <chi.xu@windriver.com> +# Date: Feb 26 2010 +# Summary: Generate arch.h for ppc32 +# + +Index: ghostscript-9.21/base/lib.mak +=================================================================== +--- ghostscript-9.21.orig/base/lib.mak ++++ ghostscript-9.21/base/lib.mak +@@ -73,8 +73,8 @@ arch_h=$(GLGEN)arch.h + stdpre_h=$(GLSRC)stdpre.h + stdint__h=$(GLSRC)stdint_.h $(std_h) + +-$(GLGEN)arch.h : $(GENARCH_XE) +- $(EXP)$(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE) ++##$(GLGEN)arch.h : $(GENARCH_XE) ++## $(EXP)$(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE) + + # Platform interfaces + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch new file mode 100644 index 000000000..3ec395640 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.15-parallel-make.patch @@ -0,0 +1,40 @@ +From 14937d9247330065359ca0fb648c28dfa5c3b224 Mon Sep 17 00:00:00 2001 +From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> +Date: Tue, 13 Dec 2016 18:16:41 +0900 +Subject: [PATCH] ghostscript-9.15-parallel-make + +From 767bdf8a412b0cce2b734998e9b7e55abeaf932c Mon Sep 17 00:00:00 2001 +From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> +Date: Tue, 13 Dec 2016 17:55:54 +0900 +Subject: [PATCH] Robert Yang <liezhi.yang@windriver.com> Date: Fri, 30 Jan +2015 00:40:22 -0800 Subject: [PATCH] contrib.mak: fix for parallel build + +Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> +Upstream-Status: Pending +--- + contrib/contrib.mak | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/contrib/contrib.mak b/contrib/contrib.mak +index 55415b3..0b6b5ae 100644 +--- a/contrib/contrib.mak ++++ b/contrib/contrib.mak +@@ -1099,6 +1099,7 @@ $(DEVOBJ)dviprlib.$(OBJ) : $(JAPSRC)dviprlib.c $(JAPSRC)dviprlib.h \ + $(DEVCC) $(O_)$@ $(C_) $(JAPSRC)dviprlib.c + + extra-dmprt-install: install-libdata ++ mkdir -p $(DESTDIR)$(gsdatadir)$(D)lib + $(INSTALL_DATA) $(JAPSRC)dmp_init.ps $(DESTDIR)$(gsdatadir)$(D)lib || exit 1 + $(INSTALL_DATA) $(JAPSRC)dmp_site.ps $(DESTDIR)$(gsdatadir)$(D)lib || exit 1 + $(INSTALL_DATA) $(JAPSRC)escp_24.src $(DESTDIR)$(gsdatadir)$(D)lib || exit 1 +@@ -1267,6 +1268,7 @@ $(DEVOBJ)gdevalps.$(OBJ) : $(JAPSRC)gdevalps.c $(PDEVH) \ + ### ----------------- Additional .upp files ---------------- ### + + extra-upp-install: install-libdata ++ mkdir -p $(DESTDIR)$(gsdatadir)$(D)lib + for f in $(CONTRIBSRC)uniprint$(D)*.upp; do \ + $(INSTALL_DATA) $$f $(DESTDIR)$(gsdatadir)$(D)lib || exit 1; \ + done +-- +2.7.4 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch new file mode 100644 index 000000000..d78648200 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.16-Werror-return-type.patch @@ -0,0 +1,30 @@ +From 5d5c83c89be0cff29dde2267fa168e6f7146be8c Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Mon, 4 May 2015 22:31:48 -0700 +Subject: [PATCH] base/gendev.c: fix for -Werror=return-type + +Fixed: +base/gendev.c:80:1: error: return type defaults to 'int' [-Werror=return-type] + +Upstream-Status: Pending + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- + base/gendev.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/base/gendev.c b/base/gendev.c +index 68a745f..8058b5a 100644 +--- a/base/gendev.c ++++ b/base/gendev.c +@@ -77,6 +77,7 @@ static const char *indent_item = ""; + /* Forward definitions */ + void add_entry(config *, const char *, const char *, bool); + ++int + main(int argc, char *argv[]) + { + config conf; +-- +1.7.9.5 + diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch new file mode 100644 index 000000000..bff3e6176 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-native-fix-disable-system-libtiff.patch @@ -0,0 +1,37 @@ +ghostscript-native:fix disable-system-libtiff + +Modify configure to add the check to make sure +ghostscrip could work while system-libtiff is +disabled. + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> + +Updated to apply to ghostscript 9.21. + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + +Upstream-Status: Pending + + + +--- a/configure.ac ++++ b/configure.ac +@@ -1259,6 +1259,7 @@ case "x$with_system_libtiff" in + esac + + if test x"$SHARE_LIBTIFF" = x"0" ; then ++ if test -e $LIBTIFFDIR/configure; then + echo "Running libtiff configure script..." + olddir=`pwd` + if ! test -d "$LIBTIFFCONFDIR" ; then +@@ -1272,6 +1273,10 @@ if test x"$SHARE_LIBTIFF" = x"0" ; then + cd "$olddir" + echo + echo "Continuing with Ghostscript configuration..." ++ else ++ AC_MSG_NOTICE([Could not find local copy of libtiff. ++Disabling tiff output devices.]) ++ fi + fi + + AC_SUBST(SHARE_LIBTIFF) diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch new file mode 100644 index 000000000..f2c6d04e0 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/ghostscript-9.21-prevent_recompiling.patch @@ -0,0 +1,96 @@ +Just use commands provided by ghostscript-native, preventing recompile them when +compile ghostscript. +Way to enable cross compile. + +Upstream-Status: Pending + +Signed-off-by: Kang Kai <kai.kang@windriver.com> +Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> + +Rebase to 9.19 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> + +Rebase to 9.21 +Signed-off-by: Joe Slater <joe.slater@windriver.com> + +--- a/base/unix-aux.mak ++++ b/base/unix-aux.mak +@@ -66,45 +66,45 @@ $(GLOBJ)gp_sysv.$(OBJ): $(GLSRC)gp_sysv. + + # -------------------------- Auxiliary programs --------------------------- # + +-$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS) +- ++#$(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS) ++# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(ECHOGS_XE) $(GLSRC)echogs.c $(AUXEXTRALIBS) ++# + # On the RS/6000 (at least), compiling genarch.c with gcc with -O + # produces a buggy executable. +-$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS) +- +-$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS) +- +-$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS) +- +-$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS) +- ++#$(GENARCH_XE): $(GLSRC)genarch.c $(AK) $(GENARCH_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) ++# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENARCH_XE) $(GLSRC)genarch.c $(AUXEXTRALIBS) ++# ++#$(GENCONF_XE): $(GLSRC)genconf.c $(AK) $(GENCONF_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) ++# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENCONF_XE) $(GLSRC)genconf.c $(AUXEXTRALIBS) ++# ++#$(GENDEV_XE): $(GLSRC)gendev.c $(AK) $(GENDEV_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) ++# $(CCAUX_) $(I_)$(GLSRCDIR)$(_I) $(O_)$(GENDEV_XE) $(GLSRC)gendev.c $(AUXEXTRALIBS) ++# ++#$(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) ++# $(CCAUX_) $(GENHT_CFLAGS) $(O_)$(GENHT_XE) $(GLSRC)genht.c $(AUXEXTRALIBS) ++# + # To get GS to use the system zlib, you remove/hide the gs/zlib directory + # which means that the mkromfs build can't find the zlib source it needs. + # So it's split into two targets, one using the zlib source directly..... +-MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ +- $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ +- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) +- +-$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(GENOPTAUX) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS) +- ++#MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ ++# $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ ++# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) ++# ++#$(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(UNIX_AUX_MAK) $(MAKEDIRS) ++# $(CCAUX_) $(GENOPTAUX) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS) ++# + # .... and one using the zlib library linked via the command line +-MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \ +- $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ +- $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ +- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) +- +-$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(GENOPTAUX) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) +- +-$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) +- ++#MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \ ++# $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ ++# $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ ++# $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) ++# ++#$(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(UNIX_AUX_MAK) $(MAKEDIRS) ++# $(CCAUX_) $(GENOPTAUX) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) ++# ++#$(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(UNIX_AUX_MAK) $(MAKEDIRS) ++# $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) ++# + # Query the environment to construct gconfig_.h. + # These are all defined conditionally (except the JasPER one), so that + # they can be overridden by settings from the configure script. diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h b/poky/meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h new file mode 100644 index 000000000..5817b7a6d --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/i586/objarch.h @@ -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/poky/meta/recipes-extended/ghostscript/ghostscript/i686 b/poky/meta/recipes-extended/ghostscript/ghostscript/i686 new file mode 120000 index 000000000..87aaca590 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/i686 @@ -0,0 +1 @@ +i586
\ No newline at end of file diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/microblazeeb/objarch.h b/poky/meta/recipes-extended/ghostscript/ghostscript/microblazeeb/objarch.h new file mode 100644 index 000000000..63232fdfa --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/microblazeeb/objarch.h @@ -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 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 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/poky/meta/recipes-extended/ghostscript/ghostscript/microblazeel/objarch.h b/poky/meta/recipes-extended/ghostscript/ghostscript/microblazeel/objarch.h new file mode 100644 index 000000000..3ec810168 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/microblazeel/objarch.h @@ -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 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/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarchn32eb/objarch.h b/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarchn32eb/objarch.h new file mode 100644 index 000000000..0d0a16bfa --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarchn32eb/objarch.h @@ -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 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/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarchn32el/objarch.h b/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarchn32el/objarch.h new file mode 100644 index 000000000..a05de29de --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarchn32el/objarch.h @@ -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/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarchn64eb/objarch.h b/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarchn64eb/objarch.h new file mode 100644 index 000000000..0d0a16bfa --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarchn64eb/objarch.h @@ -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 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/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarchn64el/objarch.h b/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarchn64el/objarch.h new file mode 100644 index 000000000..a05de29de --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarchn64el/objarch.h @@ -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/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarcho32eb/objarch.h b/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarcho32eb/objarch.h new file mode 100644 index 000000000..b8b637cca --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarcho32eb/objarch.h @@ -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 4 +#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/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarcho32el/objarch.h b/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarcho32el/objarch.h new file mode 100644 index 000000000..29f90ddf8 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/mipsarcho32el/objarch.h @@ -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 4 +#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/poky/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch b/poky/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch new file mode 100644 index 000000000..5a7eab1c2 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/mkdir-p.patch @@ -0,0 +1,36 @@ +ghostscript: allow directories to be created more than once + +When doing parallel builds, we might try to create directories +more than once. This should not cause an error. + +Upstream-Status: Pending + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + + +--- a/base/unix-end.mak ++++ b/base/unix-end.mak +@@ -17,15 +17,14 @@ + UNIX_END_MAK=$(GLSRC)unix-end.mak $(TOP_MAKEFILES) + # Define the rule for building standard configurations. + directories: $(UNIX_END_MAK) +- @if test "$(BINDIR)" != "" -a ! -d $(BINDIR); then mkdir $(BINDIR); fi +- @if test "$(GLGENDIR)" != "" -a ! -d $(GLGENDIR); then mkdir $(GLGENDIR); fi +- @if test "$(GLOBJDIR)" != "" -a ! -d $(GLOBJDIR); then mkdir $(GLOBJDIR); fi +- @if test "$(DEVGENDIR)" != "" -a ! -d $(DEVGENDIR); then mkdir $(DEVGENDIR); fi +- @if test "$(DEVOBJDIR)" != "" -a ! -d $(DEVOBJDIR); then mkdir $(DEVOBJDIR); fi +- @if test "$(AUXDIR)" != "" -a ! -d $(AUXDIR); then mkdir $(AUXDIR); fi +- @if test "$(PSGENDIR)" != "" -a ! -d $(PSGENDIR); then mkdir $(PSGENDIR); fi +- @if test "$(PSGENDIR)" != "" -a ! -d $(PSGENDIR)/cups; then mkdir $(PSGENDIR)/cups; fi +- @if test "$(PSOBJDIR)" != "" -a ! -d $(PSOBJDIR); then mkdir $(PSOBJDIR); fi ++ @if test "$(BINDIR)" != "" -a ! -d $(BINDIR); then mkdir -p $(BINDIR); fi ++ @if test "$(GLGENDIR)" != "" -a ! -d $(GLGENDIR); then mkdir -p $(GLGENDIR); fi ++ @if test "$(GLOBJDIR)" != "" -a ! -d $(GLOBJDIR); then mkdir -p $(GLOBJDIR); fi ++ @if test "$(DEVGENDIR)" != "" -a ! -d $(DEVGENDIR); then mkdir -p $(DEVGENDIR); fi ++ @if test "$(DEVOBJDIR)" != "" -a ! -d $(DEVOBJDIR); then mkdir -p $(DEVOBJDIR); fi ++ @if test "$(AUXDIR)" != "" -a ! -d $(AUXDIR); then mkdir -p $(AUXDIR); fi ++ @if test "$(PSGENDIR)" != "" -a ! -d $(PSGENDIR)/cups; then mkdir -p $(PSGENDIR)/cups; fi ++ @if test "$(PSOBJDIR)" != "" -a ! -d $(PSOBJDIR); then mkdir -p $(PSOBJDIR); fi + + + gs: .gssubtarget $(UNIX_END_MAK) diff --git a/poky/meta/recipes-extended/ghostscript/ghostscript/nios2/objarch.h b/poky/meta/recipes-extended/ghostscript/ghostscript/nios2/objarch.h new file mode 100644 index 000000000..3ec810168 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/nios2/objarch.h @@ -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 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/poky/meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h b/poky/meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h new file mode 100644 index 000000000..359097f35 --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/powerpc/objarch.h @@ -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/poky/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h b/poky/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h new file mode 100644 index 000000000..0d0a16bfa --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/powerpc64/objarch.h @@ -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 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/poky/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h b/poky/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h new file mode 100644 index 000000000..a05de29de --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript/x86-64/objarch.h @@ -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/poky/meta/recipes-extended/ghostscript/ghostscript_9.21.bb b/poky/meta/recipes-extended/ghostscript/ghostscript_9.21.bb new file mode 100644 index 000000000..50ec7e20c --- /dev/null +++ b/poky/meta/recipes-extended/ghostscript/ghostscript_9.21.bb @@ -0,0 +1,136 @@ +SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter" +DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing. Usually as \ +a back-end to a program such as ghostview, it can display PostScript and PDF \ +documents in an X11 environment. \ +\ +Furthermore, it can render PostScript and PDF files as graphics to be printed \ +on non-PostScript printers. Supported printers include common \ +dot-matrix, inkjet and laser models. \ +" +HOMEPAGE = "http://www.ghostscript.com" +SECTION = "console/utils" + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://LICENSE;md5=70dc2bac4d0ce4448da873cd86b123fc" + +DEPENDS = "ghostscript-native tiff jpeg fontconfig cups libpng" +DEPENDS_class-native = "libpng-native" + +UPSTREAM_CHECK_URI = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases" +UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar" + +SRC_URI_BASE = "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs921/${BPN}-${PV}.tar.gz \ + file://ghostscript-9.15-parallel-make.patch \ + file://ghostscript-9.16-Werror-return-type.patch \ + file://do-not-check-local-libpng-source.patch \ + file://avoid-host-contamination.patch \ + file://mkdir-p.patch \ +" + +SRC_URI = "${SRC_URI_BASE} \ + file://ghostscript-9.21-prevent_recompiling.patch \ + file://ghostscript-9.02-genarch.patch \ + file://objarch.h \ + file://cups-no-gcrypt.patch \ + file://CVE-2017-7207.patch \ + file://CVE-2017-5951.patch \ + file://CVE-2017-7975.patch \ + file://CVE-2017-9216.patch \ + file://CVE-2017-9611.patch \ + file://CVE-2017-9612.patch \ + file://CVE-2017-9739.patch \ + file://CVE-2017-9726.patch \ + file://CVE-2017-9727.patch \ + file://CVE-2017-9835.patch \ + file://CVE-2017-11714.patch \ + " + +SRC_URI_class-native = "${SRC_URI_BASE} \ + file://ghostscript-9.21-native-fix-disable-system-libtiff.patch \ + file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \ + " + +SRC_URI[md5sum] = "5f213281761d2750fcf27476c404d17f" +SRC_URI[sha256sum] = "02bceadbc4dddeb6f2eec9c8b1623d945d355ca11b8b4df035332b217d58ce85" + +# Put something like +# +# PACKAGECONFIG_append_pn-ghostscript = " x11" +# +# in local.conf to enable building with X11. Be careful. The order +# of the overrides matters! +# +#PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" +PACKAGECONFIG_class-native = "" + +PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR}, \ + --without-x, virtual/libx11 libxext libxt gtk+3\ + " + +EXTRA_OECONF = "--with-system-libtiff --without-jbig2dec \ + --with-fontpath=${datadir}/fonts \ + --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups \ + --with-cups-datadir=${datadir}/cups \ + CUPSCONFIG="${STAGING_BINDIR_CROSS}/cups-config" \ + " + +EXTRA_OECONF_append_mipsarcho32 = " --with-large_color_index=0" + +# Explicity disable libtiff, fontconfig, +# freetype, cups for ghostscript-native +EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \ + --without-jbig2dec \ + --with-fontpath=${datadir}/fonts \ + --without-libidn --disable-fontconfig \ + --disable-freetype --disable-cups" + +# This has been fixed upstream but for now we need to subvert the check for time.h +# http://bugs.ghostscript.com/show_bug.cgi?id=692443 +# http://bugs.ghostscript.com/show_bug.cgi?id=692426 +CFLAGS += "-DHAVE_SYS_TIME_H=1" +BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1" + +inherit autotools + +do_configure_prepend () { + mkdir -p obj + mkdir -p soobj + if [ -e ${WORKDIR}/objarch.h ]; then + cp ${WORKDIR}/objarch.h obj/arch.h + fi +} + +do_configure_append () { + # copy tools from the native ghostscript build + if [ "${PN}" != "ghostscript-native" ]; then + mkdir -p obj/aux soobj + for i in genarch genconf mkromfs echogs gendev genht; do + cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i + done + fi +} + +do_install_append () { + mkdir -p ${D}${datadir}/ghostscript/${PV}/ + cp -r ${S}/Resource ${D}${datadir}/ghostscript/${PV}/ + cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/ +} + +do_compile_class-native () { + mkdir -p obj + for i in genarch genconf mkromfs echogs gendev genht; do + oe_runmake obj/aux/$i + done +} + +do_install_class-native () { + install -d ${D}${bindir}/ghostscript-${PV} + for i in genarch genconf mkromfs echogs gendev genht; do + install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i + done +} + +BBCLASSEXTEND = "native" + +# ghostscript does not supports "arc" +COMPATIBLE_HOST = "^(?!arc).*" |