SHA256
1
0
forked from pool/xfig
Dr. Werner Fink 2010-04-20 15:54:50 +00:00 committed by Git OBS Bridge
parent fa8e5a4ab5
commit 60890bdc02
3 changed files with 21 additions and 0 deletions

14
xfig.3.2.5b-libpng14.dif Normal file
View File

@ -0,0 +1,14 @@
--- f_readpng.c
+++ f_readpng.c 2010-04-20 15:45:02.627072958 +0000
@@ -136,7 +136,11 @@ read_png(FILE *file, int filetype, F_pic
if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)) {
png_get_hIST(png_ptr, info_ptr, &histogram);
+#if (PNG_LIBPNG_VER_MAJOR > 1 || (PNG_LIBPNG_VER_MAJOR == 1 && (PNG_LIBPNG_VER_MINOR > 4))) || defined(png_set_quantize)
+ png_set_quantize(png_ptr, palette, num_palette, 256, histogram, 0);
+#else
png_set_dither(png_ptr, palette, num_palette, 256, histogram, 0);
+#endif
}
}
if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Apr 20 17:24:01 CEST 2010 - werner@suse.de
- Add compatibility switch for libpng 1.4 or higher
-------------------------------------------------------------------
Mon Apr 19 11:29:36 CEST 2010 - sndirsch@suse.de

View File

@ -47,6 +47,7 @@ Patch5: xfig.3.2.5b-null.dif
Patch6: xfig.3.2.5b-locale.dif
Patch7: xfig.3.2.5b-fixes.dif
Patch8: xfig.3.2.5b-pspdftex.dif
Patch9: xfig.3.2.5b-libpng14.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)}
%if "%_exec_prefix" == "/usr/X11R6"
@ -92,6 +93,7 @@ find -type f | xargs -r chmod a-x,go-w
%patch6 -p0 -b .locale
%patch7 -p0 -b .fixes
%patch8 -p0 -b .pspdftex
%patch9 -p0 -b .libpng14
cp %{S:1} .
%build