[arch-commits] Commit in xfig/trunk (PKGBUILD xfig-3.2.5b-libpng-1.5.patch)

Eric Bélanger eric at archlinux.org
Thu Jan 19 04:43:28 UTC 2012


    Date: Wednesday, January 18, 2012 @ 23:43:28
  Author: eric
Revision: 146900

upgpkg: xfig 3.2.5b-6

Rebuild against libpng 1.5 and libtiff 4.0

Added:
  xfig/trunk/xfig-3.2.5b-libpng-1.5.patch
Modified:
  xfig/trunk/PKGBUILD

------------------------------+
 PKGBUILD                     |   32 +++++++++---------
 xfig-3.2.5b-libpng-1.5.patch |   70 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+), 15 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-01-19 04:20:31 UTC (rev 146899)
+++ PKGBUILD	2012-01-19 04:43:28 UTC (rev 146900)
@@ -1,9 +1,9 @@
 # $Id$
-# Maintainer: Eric Belanger <eric at archlinux.org>
+# Maintainer: Eric Bélanger <eric at archlinux.org>
 
 pkgname=xfig
 pkgver=3.2.5b
-pkgrel=5
+pkgrel=6
 pkgdesc="An interactive drawing tool"
 arch=('i686' 'x86_64')
 url="http://www.xfig.org/userman/"
@@ -17,19 +17,20 @@
 	xfig-3.2.4-redhat.patch xfig-3.2.5-color-resources.patch \
         xfig-3.2.5-enable-Xaw3d.patch xfig-3.2.5-urwfonts.patch \
         xfig-3.2.5-fhs.patch xfig-3.2.5-missing-protos.patch \
-        xfig.3.2.5-modularX.patch xfig-3.2.5b-fix-eps-reading.patch LICENSE xfig.desktop)
-md5sums=('499b0ce103a6b353453bf7e327f9a3b9' '5c2bc208c8ee852bc9ffa00dcbfd8241'\
-         'a4b91e4aaf48ed07f4a579a1f692ef82' '46c6fb15d26c9fe03e558bdacc0b0a53'\
-         'c5b7dc054063f02c6bfcd132dae82b6f' 'b532871c792716465e3b05967bcfba10'\
-         'de059a6b8ce287942c7da35d19ee46f3' '7347389f7fdecd582579845df0c0b664'\
-         'fa14e85b5365d07ca8deca9ea47d4e6a' 'f405b7a96f3401c12153fe6170a7d8f1'\
-         '8ac2de637c9148aa4a32978910822230')
-sha1sums=('0730d7e6bc217c0de02682efb0078821512bb542' '926ad99c7221baa4aa9e9737722958860b2700fc'\
-         'b7c03fb70066ff476a4039a8c0f8930c15edef68' '33bff26b42ce164e79de11808b5b34b363f0d59f'\
-         'e595ccdbe293ea0fdecbf59a2192ae57ced2c8eb' '39bec6bac9746b643b05fd1286826113ede07ff6'\
-         'bd76cd50be6a5789cfd6f182309cfd7056be04f3' 'a1285f4e61ad2eec040460ab03e8022098e7f78e'\
-         '12a64ddaf65a73e23ef74f31483515a0e262768c' '31edf4cfab708820ea3f114d095dfef5aa88e5aa'\
-         '9011b8fa6143e37525b28cc9800a3bf2d6b008d2')
+        xfig.3.2.5-modularX.patch xfig-3.2.5b-fix-eps-reading.patch \
+        xfig-3.2.5b-libpng-1.5.patch LICENSE xfig.desktop)
+sha1sums=('0730d7e6bc217c0de02682efb0078821512bb542'
+          '926ad99c7221baa4aa9e9737722958860b2700fc'
+          'b7c03fb70066ff476a4039a8c0f8930c15edef68'
+          '33bff26b42ce164e79de11808b5b34b363f0d59f'
+          'e595ccdbe293ea0fdecbf59a2192ae57ced2c8eb'
+          '39bec6bac9746b643b05fd1286826113ede07ff6'
+          'bd76cd50be6a5789cfd6f182309cfd7056be04f3'
+          'a1285f4e61ad2eec040460ab03e8022098e7f78e'
+          '12a64ddaf65a73e23ef74f31483515a0e262768c'
+          '83032eb61c8dc96d5fc509a1ce632528457d4598'
+          '31edf4cfab708820ea3f114d095dfef5aa88e5aa'
+          '9011b8fa6143e37525b28cc9800a3bf2d6b008d2')
 
 build() {
   cd "${srcdir}/${pkgname}.${pkgver}"
@@ -41,6 +42,7 @@
   patch -p1 < ../xfig-3.2.5-urwfonts.patch
   patch -p1 < ../xfig-3.2.5-missing-protos.patch
   patch -p1 < ../xfig-3.2.5b-fix-eps-reading.patch
+  patch -p1 < ../xfig-3.2.5b-libpng-1.5.patch
   chmod 755 Libraries
 
   xmkmf

Added: xfig-3.2.5b-libpng-1.5.patch
===================================================================
--- xfig-3.2.5b-libpng-1.5.patch	                        (rev 0)
+++ xfig-3.2.5b-libpng-1.5.patch	2012-01-19 04:43:28 UTC (rev 146900)
@@ -0,0 +1,70 @@
+Index: xfig.3.2.5b/f_readpng.c
+===================================================================
+--- xfig.3.2.5b.orig/f_readpng.c
++++ xfig.3.2.5b/f_readpng.c
+@@ -73,7 +73,7 @@ read_png(FILE *file, int filetype, F_pic
+     }
+ 
+     /* set long jump recovery 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);
+ 	close_picfile(file,filetype);
+@@ -90,15 +90,17 @@ read_png(FILE *file, int filetype, F_pic
+     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 */
+ 	background.red   = x_bg_color.red >> 8;
+@@ -136,7 +138,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_MINOR < 5
+ 	    png_set_dither(png_ptr, palette, num_palette, 256, histogram, 0);
++#else
++	    png_set_quantize(png_ptr, palette, num_palette, 256, histogram, 0);
++#endif
+ 	}
+     }
+     if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
+Index: xfig.3.2.5b/f_wrpng.c
+===================================================================
+--- xfig.3.2.5b.orig/f_wrpng.c
++++ xfig.3.2.5b/f_wrpng.c
+@@ -20,6 +20,7 @@
+ #include "w_msgpanel.h"
+ #include "w_setup.h"
+ #include <png.h>
++#include <zlib.h>
+ 
+ /*
+  * Write PNG file from rgb data
+@@ -59,7 +60,7 @@ write_png(FILE *file, unsigned char *dat
+     }
+ 
+     /* set long jump recovery 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_write_struct(&png_ptr, &info_ptr);
+ 	return False;




More information about the arch-commits mailing list