diff options
author | root <root@rshg054.dnsready.net> | 2012-02-06 23:14:50 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-02-06 23:14:50 +0000 |
commit | 1fa6edfba8d1e31ca1c0d59e8202cd3c62ccf393 (patch) | |
tree | 8d7ccc2dc9d08a4c3cde26aa01c887e9a0fc2fa1 /extra/xfig | |
parent | bdb5b3e66f6afa586ea147f69af5e4ba388f7615 (diff) |
Mon Feb 6 23:14:50 UTC 2012
Diffstat (limited to 'extra/xfig')
-rw-r--r-- | extra/xfig/PKGBUILD | 36 | ||||
-rw-r--r-- | extra/xfig/xfig-3.2.5b-libpng-1.5.patch | 70 |
2 files changed, 89 insertions, 17 deletions
diff --git a/extra/xfig/PKGBUILD b/extra/xfig/PKGBUILD index 45c07d0dc..0527c33ee 100644 --- a/extra/xfig/PKGBUILD +++ b/extra/xfig/PKGBUILD @@ -1,14 +1,14 @@ -# $Id: PKGBUILD 101110 2010-11-28 02:40:08Z eric $ -# Maintainer: Eric Belanger <eric@archlinux.org> +# $Id: PKGBUILD 148664 2012-02-05 11:46:09Z ibiru $ +# Maintainer: Eric BĂ©langer <eric@archlinux.org> pkgname=xfig pkgver=3.2.5b -pkgrel=5 +pkgrel=7 pkgdesc="An interactive drawing tool" arch=('i686' 'x86_64') url="http://www.xfig.org/userman/" license=('custom') -depends=('libpng' 'libjpeg' 'xaw3d' 'libxi' 'desktop-file-utils' 'gsfonts') +depends=('libpng' 'libjpeg' 'xaw3d>=1.6' 'libxi' 'desktop-file-utils' 'gsfonts' 'libxpm') makedepends=('imake') optdepends=('transfig: to use the frontend to convert fig files') options=('!makeflags' '!emptydirs') @@ -17,19 +17,20 @@ source=(http://downloads.sourceforge.net/mcj/${pkgname}.${pkgver}.full.tar.gz \ 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 @@ build() { 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 diff --git a/extra/xfig/xfig-3.2.5b-libpng-1.5.patch b/extra/xfig/xfig-3.2.5b-libpng-1.5.patch new file mode 100644 index 000000000..7d9c3f15e --- /dev/null +++ b/extra/xfig/xfig-3.2.5b-libpng-1.5.patch @@ -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; |