Accepting request 99215 from home:pgajdos:libpng15
- build also against libpng15 * libpng15.patch OBS-URL: https://build.opensuse.org/request/show/99215 OBS-URL: https://build.opensuse.org/package/show/M17N/xemacs?expand=0&rev=36
This commit is contained in:
parent
294bf6d3b0
commit
a4f1b72b5d
89
xemacs-libpng15.patch
Normal file
89
xemacs-libpng15.patch
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
Index: xemacs-beta-b604d235f028/src/glyphs-eimage.c
|
||||||
|
===================================================================
|
||||||
|
--- xemacs-beta-b604d235f028.orig/src/glyphs-eimage.c
|
||||||
|
+++ xemacs-beta-b604d235f028/src/glyphs-eimage.c
|
||||||
|
@@ -887,7 +887,8 @@ png_instantiate (Lisp_Object image_insta
|
||||||
|
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
|
||||||
|
struct png_unwind_data unwind;
|
||||||
|
int speccount = specpdl_depth ();
|
||||||
|
- int height, width;
|
||||||
|
+ png_uint_32 height, width;
|
||||||
|
+ int bit_depth, color_type;
|
||||||
|
struct png_memory_storage tbr; /* Data to be read */
|
||||||
|
|
||||||
|
/* PNG variables */
|
||||||
|
@@ -955,8 +956,7 @@ png_instantiate (Lisp_Object image_insta
|
||||||
|
int y, padding;
|
||||||
|
Binbyte **row_pointers;
|
||||||
|
UINT_64_BIT pixels_sq;
|
||||||
|
- height = info_ptr->height;
|
||||||
|
- width = info_ptr->width;
|
||||||
|
+ png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL);
|
||||||
|
pixels_sq = (UINT_64_BIT) width * (UINT_64_BIT) height;
|
||||||
|
if (pixels_sq > ((size_t) -1) / 3)
|
||||||
|
signal_image_error ("PNG image too large to instantiate", instantiator);
|
||||||
|
@@ -1018,29 +1018,29 @@ png_instantiate (Lisp_Object image_insta
|
||||||
|
/* Now that we're using EImage, ask for 8bit RGB triples for any type
|
||||||
|
of image*/
|
||||||
|
/* convert palette images to RGB */
|
||||||
|
- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
|
||||||
|
+ if (color_type == PNG_COLOR_TYPE_PALETTE)
|
||||||
|
png_set_palette_to_rgb (png_ptr);
|
||||||
|
/* convert grayscale images to RGB */
|
||||||
|
- else if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY ||
|
||||||
|
- info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
|
||||||
|
+ else if (color_type == PNG_COLOR_TYPE_GRAY ||
|
||||||
|
+ color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
|
||||||
|
png_set_gray_to_rgb (png_ptr);
|
||||||
|
/* pad images with depth < 8 bits */
|
||||||
|
- else if (info_ptr->bit_depth < 8)
|
||||||
|
+ else if (bit_depth < 8)
|
||||||
|
{
|
||||||
|
- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY)
|
||||||
|
+ if (color_type == PNG_COLOR_TYPE_GRAY)
|
||||||
|
png_set_expand (png_ptr);
|
||||||
|
else
|
||||||
|
png_set_packing (png_ptr);
|
||||||
|
}
|
||||||
|
/* strip 16-bit depth files down to 8 bits */
|
||||||
|
- if (info_ptr->bit_depth == 16)
|
||||||
|
+ if (bit_depth == 16)
|
||||||
|
png_set_strip_16 (png_ptr);
|
||||||
|
/* strip alpha channel
|
||||||
|
#### shouldn't we handle this?
|
||||||
|
first call png_read_update_info in case above transformations
|
||||||
|
have generated an alpha channel */
|
||||||
|
png_read_update_info(png_ptr, info_ptr);
|
||||||
|
- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
|
||||||
|
+ if (color_type & PNG_COLOR_MASK_ALPHA)
|
||||||
|
png_set_strip_alpha (png_ptr);
|
||||||
|
|
||||||
|
png_read_image (png_ptr, row_pointers);
|
||||||
|
@@ -1050,19 +1050,22 @@ png_instantiate (Lisp_Object image_insta
|
||||||
|
* into the glyph code, where you can get to it from lisp
|
||||||
|
* anyway. - WMP */
|
||||||
|
{
|
||||||
|
- int i;
|
||||||
|
+ int i, num_text;
|
||||||
|
+ png_textp text_ptr;
|
||||||
|
DECLARE_EISTRING (key);
|
||||||
|
DECLARE_EISTRING (text);
|
||||||
|
-
|
||||||
|
- for (i = 0 ; i < info_ptr->num_text ; i++)
|
||||||
|
+
|
||||||
|
+ png_get_text(png_ptr, info_ptr, &text_ptr, &num_text);
|
||||||
|
+
|
||||||
|
+ for (i = 0 ; i < num_text ; i++)
|
||||||
|
{
|
||||||
|
/* How paranoid do I have to be about no trailing NULLs, and
|
||||||
|
using (int)info_ptr->text[i].text_length, and strncpy and a temp
|
||||||
|
string somewhere? */
|
||||||
|
eireset(key);
|
||||||
|
eireset(text);
|
||||||
|
- eicpy_ext(key, info_ptr->text[i].key, Qbinary);
|
||||||
|
- eicpy_ext(text, info_ptr->text[i].text, Qbinary);
|
||||||
|
+ eicpy_ext(key, text_ptr[i].key, Qbinary);
|
||||||
|
+ eicpy_ext(text, text_ptr[i].text, Qbinary);
|
||||||
|
|
||||||
|
warn_when_safe (Qpng, Qinfo, "%s - %s",
|
||||||
|
eidata(key), eidata(text));
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 6 09:49:17 UTC 2012 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- build also against libpng15
|
||||||
|
* libpng15.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jan 4 16:17:08 CET 2012 - dmueller@suse.de
|
Wed Jan 4 16:17:08 CET 2012 - dmueller@suse.de
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
Name: xemacs
|
Name: xemacs
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: canna-devel
|
BuildRequires: canna-devel
|
||||||
@ -98,6 +99,9 @@ Patch51: bnc502716-fontmenu.patch
|
|||||||
Patch52: bnc502716-xft.patch
|
Patch52: bnc502716-xft.patch
|
||||||
Patch54: bnc558764_avoid-xft-if-absent.patch
|
Patch54: bnc558764_avoid-xft-if-absent.patch
|
||||||
Patch55: changeset-dec62ca5a899.patch
|
Patch55: changeset-dec62ca5a899.patch
|
||||||
|
# PATCH-FIX-UPSTREAM pngtoico-libpng15.patch -- pgajdos@suse.com; build with libpng15; didn't sent to upstream
|
||||||
|
# build against libpng14 should not be affected, otherwise please let me know
|
||||||
|
Patch56: xemacs-libpng15.patch
|
||||||
Patch292811: bugzilla-292811-make-x-make-font-bold-italic-xft-work.patch
|
Patch292811: bugzilla-292811-make-x-make-font-bold-italic-xft-work.patch
|
||||||
Patch301352: bugzilla-301352-fix-wrong-incrementing-in-macros.patch
|
Patch301352: bugzilla-301352-fix-wrong-incrementing-in-macros.patch
|
||||||
%define _default_patch_fuzz 2
|
%define _default_patch_fuzz 2
|
||||||
@ -187,6 +191,7 @@ echo Use xfs, that is XFontSet support for internationalized menubar.
|
|||||||
%endif
|
%endif
|
||||||
%patch54 -p0
|
%patch54 -p0
|
||||||
%patch55 -p0
|
%patch55 -p0
|
||||||
|
%patch56 -p1
|
||||||
%patch292811 -p1
|
%patch292811 -p1
|
||||||
%patch301352 -p1
|
%patch301352 -p1
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
Loading…
Reference in New Issue
Block a user