add Gentoo patch to fix compilation with libpng 1.5
This commit is contained in:
parent
4c3fb5996a
commit
37f4aaced2
37
transfig-3.2.5-libpng.patch
Normal file
37
transfig-3.2.5-libpng.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
Index: transfig.3.2.5d/fig2dev/dev/readpng.c
|
||||||
|
===================================================================
|
||||||
|
--- transfig.3.2.5d.orig/fig2dev/dev/readpng.c
|
||||||
|
+++ transfig.3.2.5d/fig2dev/dev/readpng.c
|
||||||
|
@@ -62,7 +62,7 @@ read_png(file,filetype,pic,llx,lly)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* set long jump here */
|
||||||
|
- if (setjmp(png_ptr->jmpbuf)) {
|
||||||
|
+ if (setjmp(png_jmpbuf(png_ptr))) {
|
||||||
|
/* if we get here there was a problem reading the file */
|
||||||
|
png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
|
||||||
|
return 0;
|
||||||
|
@@ -78,15 +78,17 @@ read_png(file,filetype,pic,llx,lly)
|
||||||
|
png_get_IHDR(png_ptr, info_ptr, &w, &h, &bit_depth, &color_type,
|
||||||
|
&interlace_type, &compression_type, &filter_type);
|
||||||
|
|
||||||
|
- if (info_ptr->valid & PNG_INFO_gAMA)
|
||||||
|
- png_set_gamma(png_ptr, 2.2, info_ptr->gamma);
|
||||||
|
- else
|
||||||
|
- png_set_gamma(png_ptr, 2.2, 0.45);
|
||||||
|
+ png_fixed_point gamma = 0.45;
|
||||||
|
+ png_get_gAMA_fixed(png_ptr,info_ptr,&gamma);
|
||||||
|
+ png_set_gamma(png_ptr, 2.2, gamma);
|
||||||
|
|
||||||
|
- if (info_ptr->valid & PNG_INFO_bKGD)
|
||||||
|
+ if (png_get_valid(png_ptr,info_ptr,PNG_INFO_bKGD)) {
|
||||||
|
/* set the background to the one supplied */
|
||||||
|
- png_set_background(png_ptr, &info_ptr->background,
|
||||||
|
+ png_color_16p background;
|
||||||
|
+ png_get_bKGD(png_ptr,info_ptr,&background);
|
||||||
|
+ png_set_background(png_ptr, background,
|
||||||
|
PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
|
||||||
|
+ }
|
||||||
|
else {
|
||||||
|
/* blend the canvas background using the alpha channel */
|
||||||
|
if (bgspec) {
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Utility for converting FIG files (made by xfig) to other formats
|
Summary: Utility for converting FIG files (made by xfig) to other formats
|
||||||
Name: transfig
|
Name: transfig
|
||||||
Version: 3.2.5d
|
Version: 3.2.5d
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://www.xfig.org/
|
URL: http://www.xfig.org/
|
||||||
@ -12,6 +12,7 @@ Patch0: transfig-3.2.5-optflags.patch
|
|||||||
Patch1: transfig-3.2.5-modularX.patch
|
Patch1: transfig-3.2.5-modularX.patch
|
||||||
Patch2: transfig-3.2.5-bitmap.patch
|
Patch2: transfig-3.2.5-bitmap.patch
|
||||||
Patch3: transfig-3.2.5d-bz728825.patch
|
Patch3: transfig-3.2.5d-bz728825.patch
|
||||||
|
Patch4: transfig-3.2.5-libpng.patch
|
||||||
|
|
||||||
Requires: ghostscript
|
Requires: ghostscript
|
||||||
Requires: bc
|
Requires: bc
|
||||||
@ -40,6 +41,7 @@ figures into certain graphics languages.
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
|
%patch4 -p1 -b .libpng
|
||||||
|
|
||||||
# fix source permissions
|
# fix source permissions
|
||||||
find -type f -exec chmod -x {} \;
|
find -type f -exec chmod -x {} \;
|
||||||
@ -77,6 +79,9 @@ rm -rf %{buildroot}
|
|||||||
%{_datadir}/fig2dev
|
%{_datadir}/fig2dev
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 14 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 1:3.2.5d-6
|
||||||
|
- add Gentoo patch to fix compilation with libpng 1.5
|
||||||
|
|
||||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.2.5d-5
|
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.2.5d-5
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user