Accepting request 134007 from Publishing
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/134007 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/htmldoc?expand=0&rev=15
This commit is contained in:
commit
cce8162aa7
114
htmldoc-libpng15.diff
Normal file
114
htmldoc-libpng15.diff
Normal file
@ -0,0 +1,114 @@
|
||||
http://lists.pld-linux.org/mailman/pipermail/pld-cvs-commit/Week-of-Mon-20120206/332669.html
|
||||
--- htmldoc/image.cxx.orig Wed May 31 13:00:02 2006
|
||||
+++ htmldoc/image.cxx Wed Jul 6 15:22:43 2011
|
||||
@@ -1472,6 +1472,9 @@ image_load_png(image_t *img, /* I - Image pointer */
|
||||
png_bytep *rows; /* PNG row pointers */
|
||||
uchar *inptr, /* Input pixels */
|
||||
*outptr; /* Output pixels */
|
||||
+ png_bytep trans_alpha;
|
||||
+ int num_trans;
|
||||
+ png_color_16p trans_color;
|
||||
|
||||
|
||||
/*
|
||||
@@ -1499,7 +1502,7 @@ image_load_png(image_t *img, /* I - Image pointer */
|
||||
|
||||
rows = NULL;
|
||||
|
||||
- if (setjmp(pp->jmpbuf))
|
||||
+ if (setjmp(png_jmpbuf(pp)))
|
||||
{
|
||||
progress_error(HD_ERROR_BAD_FORMAT, "PNG file contains errors!");
|
||||
|
||||
@@ -1526,7 +1529,7 @@ image_load_png(image_t *img, /* I - Image pointer */
|
||||
|
||||
png_read_info(pp, info);
|
||||
|
||||
- if (info->color_type & PNG_COLOR_MASK_PALETTE)
|
||||
+ if (png_get_color_type(pp, info) & PNG_COLOR_MASK_PALETTE)
|
||||
{
|
||||
png_set_expand(pp);
|
||||
|
||||
@@ -1535,15 +1538,15 @@ image_load_png(image_t *img, /* I - Image pointer */
|
||||
if (Encryption)
|
||||
img->use ++;
|
||||
}
|
||||
- else if (info->bit_depth < 8)
|
||||
+ else if (png_get_bit_depth(pp, info) < 8)
|
||||
{
|
||||
png_set_packing(pp);
|
||||
png_set_expand(pp);
|
||||
}
|
||||
- else if (info->bit_depth == 16)
|
||||
+ else if (png_get_bit_depth(pp, info) == 16)
|
||||
png_set_strip_16(pp);
|
||||
|
||||
- if (info->color_type & PNG_COLOR_MASK_COLOR)
|
||||
+ if (png_get_color_type(pp, info) & PNG_COLOR_MASK_COLOR)
|
||||
{
|
||||
depth = 3;
|
||||
img->depth = gray ? 1 : 3;
|
||||
@@ -1554,10 +1557,11 @@ image_load_png(image_t *img, /* I - Image pointer */
|
||||
img->depth = 1;
|
||||
}
|
||||
|
||||
- img->width = info->width;
|
||||
- img->height = info->height;
|
||||
+ img->width = png_get_image_width(pp, info);
|
||||
+ img->height = png_get_image_height(pp, info);
|
||||
|
||||
- if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
|
||||
+ png_get_tRNS(pp, info, &trans_alpha, &num_trans, &trans_color);
|
||||
+ if ((png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA) || num_trans)
|
||||
{
|
||||
if ((PSLevel == 0 && PDFVersion >= 14) || PSLevel == 3)
|
||||
image_need_mask(img, 8);
|
||||
@@ -1571,14 +1575,14 @@ image_load_png(image_t *img, /* I - Image pointer */
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("color_type=0x%04x, depth=%d, img->width=%d, img->height=%d, img->depth=%d\n",
|
||||
- info->color_type, depth, img->width, img->height, img->depth);
|
||||
- if (info->color_type & PNG_COLOR_MASK_COLOR)
|
||||
+ png_get_color_type(pp, info), depth, img->width, img->height, img->depth);
|
||||
+ if (png_get_color_type(pp, info) & PNG_COLOR_MASK_COLOR)
|
||||
puts(" COLOR");
|
||||
else
|
||||
puts(" GRAYSCALE");
|
||||
- if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
|
||||
+ if ((png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA) || num_trans)
|
||||
puts(" ALPHA");
|
||||
- if (info->color_type & PNG_COLOR_MASK_PALETTE)
|
||||
+ if (png_get_color_type(pp, info) & PNG_COLOR_MASK_PALETTE)
|
||||
puts(" PALETTE");
|
||||
#endif // DEBUG
|
||||
|
||||
@@ -1594,9 +1598,9 @@ image_load_png(image_t *img, /* I - Image pointer */
|
||||
* Allocate pointers...
|
||||
*/
|
||||
|
||||
- rows = (png_bytep *)calloc(info->height, sizeof(png_bytep));
|
||||
+ rows = (png_bytep *)calloc(png_get_image_height(pp, info), sizeof(png_bytep));
|
||||
|
||||
- for (i = 0; i < (int)info->height; i ++)
|
||||
+ for (i = 0; i < (int)png_get_image_height(pp, info); i ++)
|
||||
rows[i] = img->pixels + i * img->width * depth;
|
||||
|
||||
/*
|
||||
@@ -1610,7 +1614,7 @@ image_load_png(image_t *img, /* I - Image pointer */
|
||||
* Generate the alpha mask as necessary...
|
||||
*/
|
||||
|
||||
- if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
|
||||
+ if ((png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA) || num_trans)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
for (inptr = img->pixels, i = 0; i < img->height; i ++)
|
||||
@@ -1639,7 +1643,7 @@ image_load_png(image_t *img, /* I - Image pointer */
|
||||
* Reformat the data as necessary for the reader...
|
||||
*/
|
||||
|
||||
- if (gray && info->color_type & PNG_COLOR_MASK_COLOR)
|
||||
+ if (gray && png_get_color_type(pp, info) & PNG_COLOR_MASK_COLOR)
|
||||
{
|
||||
/*
|
||||
* Greyscale output needed...
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 4 14:51:24 UTC 2012 - pgajdos@suse.com
|
||||
|
||||
- builds also against libpng15
|
||||
* libpng15.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 20 20:49:25 UTC 2011 - coolo@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package htmldoc
|
||||
#
|
||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -35,6 +35,8 @@ Source: %{name}-%{version}-source.tar.bz2
|
||||
Patch: %{name}-docpath.diff
|
||||
Patch1: htmldoc_CVE-2009-3050_535943.diff
|
||||
Patch2: htmldoc-fortify.diff
|
||||
# link to libpng15.patch sent to mike@easysw.com
|
||||
Patch3: htmldoc-libpng15.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%define DOCDIR %{_datadir}/doc/packages/%{name}
|
||||
|
||||
@ -48,6 +50,7 @@ printed.
|
||||
%patch
|
||||
%patch1 -p1
|
||||
%patch2
|
||||
%patch3
|
||||
|
||||
%build
|
||||
export CFLAGS="${RPM_OPT_FLAGS} -fno-strict-aliasing"
|
||||
|
Loading…
Reference in New Issue
Block a user