From 877d4a525ce91a1a513dfa81e225457cbce356af Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Oct 09 2014 15:51:14 +0000 Subject: Fix png reading (rhbz#1150330) --- diff --git a/xfig-3.2.5-libpng16.patch b/xfig-3.2.5-libpng16.patch new file mode 100644 index 0000000..1bb5eb5 --- /dev/null +++ b/xfig-3.2.5-libpng16.patch @@ -0,0 +1,13 @@ +--- a/f_readpng.c 2014-09-15 13:25:26.290813563 +0200 ++++ a/f_readpng.c 2014-09-15 14:04:10.241297027 +0200 +@@ -90,8 +90,8 @@ + png_get_IHDR(png_ptr, info_ptr, &w, &h, &bit_depth, &color_type, + &interlace_type, &compression_type, &filter_type); + +- png_fixed_point gamma = 0.45; +- png_get_gAMA_fixed(png_ptr,info_ptr,&gamma); ++ double gamma = 0.45455; ++ png_get_gAMA(png_ptr,info_ptr,&gamma); + png_set_gamma(png_ptr, 2.2, gamma); + + if (png_get_valid(png_ptr,info_ptr,PNG_INFO_bKGD)) { diff --git a/xfig.spec b/xfig.spec index 8914a62..bbfb5cc 100644 --- a/xfig.spec +++ b/xfig.spec @@ -3,7 +3,7 @@ Summary: An X Window System tool for drawing basic vector graphics Name: xfig Version: 3.2.5 -Release: 44.c%{?dist} +Release: 45.c%{?dist} License: MIT Group: Applications/Multimedia URL: http://www.xfig.org/ @@ -24,6 +24,7 @@ Patch6: 38_formatstring.patch Patch7: 39_add_xfig_man_html.patch Patch8: 40_fix_dash_list_for_different_styles.patch Patch9: xfig-3.2.5-rhbz1046102.patch +patch10: xfig-3.2.5-libpng16.patch BuildRequires: libjpeg-devel BuildRequires: libpng-devel @@ -98,6 +99,7 @@ Files common to both the plain Xaw and the Xaw3d version of xfig. %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 iconv -f ISO-8859-1 -t UTF8 CHANGES > tmp; touch -r CHANGES tmp; mv tmp CHANGES rm Doc/html/images/sav1a0.tmp @@ -109,7 +111,7 @@ chmod -x `find -type f` xmkmf # make sure cmdline option parsing still works despite us renaming the binary sed -i 's/"xfig"/"xfig-plain"/' main.c -make CDEBUGFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fno-strength-reduce -fno-strict-aliasing" +make CDEBUGFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_DEFAULT_SOURCE -fno-strength-reduce -fno-strict-aliasing" mv xfig xfig-plain make distclean @@ -118,7 +120,7 @@ mv Imakefile.with-Xaw3d Imakefile xmkmf # make sure cmdline option parsing still works despite us renaming the binary sed -i 's/"xfig-plain"/"xfig-Xaw3d"/' main.c -make CDEBUGFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fno-strength-reduce -fno-strict-aliasing" +make CDEBUGFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_DEFAULT_SOURCE -fno-strength-reduce -fno-strict-aliasing" %install @@ -180,6 +182,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Oct 9 2014 Hans de Goede - 3.2.5-45.c +- Fix png reading (rhbz#1150330) + * Mon Aug 18 2014 Fedora Release Engineering - 3.2.5-44.c - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild @@ -468,7 +473,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : * Sat Jan 06 2001 Florian La Roche - only require /usr/bin/netscape if not on S390 -* Tue Dec 20 2000 Yukihiro Nakai +* Wed Dec 20 2000 Yukihiro Nakai - Delete enable_japanese macro and set i18n default. - Fix Japanese translation in .desktop file