summaryrefslogtreecommitdiff
path: root/extra/transfig
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-02-06 23:14:50 +0000
committerroot <root@rshg054.dnsready.net>2012-02-06 23:14:50 +0000
commit1fa6edfba8d1e31ca1c0d59e8202cd3c62ccf393 (patch)
tree8d7ccc2dc9d08a4c3cde26aa01c887e9a0fc2fa1 /extra/transfig
parentbdb5b3e66f6afa586ea147f69af5e4ba388f7615 (diff)
Mon Feb 6 23:14:50 UTC 2012
Diffstat (limited to 'extra/transfig')
-rw-r--r--extra/transfig/PKGBUILD41
-rw-r--r--extra/transfig/transfig-3.2.5d-libpng-1.5.patch39
2 files changed, 60 insertions, 20 deletions
diff --git a/extra/transfig/PKGBUILD b/extra/transfig/PKGBUILD
index 6a223da76..a17e6047f 100644
--- a/extra/transfig/PKGBUILD
+++ b/extra/transfig/PKGBUILD
@@ -1,36 +1,37 @@
-# $Id: PKGBUILD 81063 2010-05-26 10:19:14Z jgc $
-# Contributor: Eric Belanger <eric@archlinux.org>
-# Contributor: J. Santiago Hirschfeld <jsantiagoh@yahoo.com.ar>
-# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+# $Id: PKGBUILD 148944 2012-02-05 11:57:10Z ibiru $
+# Maintainer: Eric BĂ©langer <eric@archlinux.org>
pkgname=transfig
-pkgver=3.2.5c
-pkgrel=3
+pkgver=3.2.5d
+pkgrel=1
pkgdesc="Format conversion utility that can be used with xfig"
arch=('i686' 'x86_64')
url="http://www.xfig.org"
license=('custom')
depends=('libpng' 'libxpm')
makedepends=('imake')
-source=(http://downloads.sourceforge.net/mcj/${pkgname}.${pkgver}.tar.gz LICENSE)
-md5sums=('0cc55ed6b4ae67a3e610e501acd694f9' 'a0b2ea903821c46dbc77afefc06d1aa4')
-sha1sums=('20013b350e81400943cd91744173445d7bd4d98e' 'b8b712871615308b8b6add92f86d218437d652f2')
+source=(http://downloads.sourceforge.net/mcj/${pkgname}.${pkgver}.tar.gz LICENSE \
+ transfig-3.2.5d-libpng-1.5.patch)
+sha1sums=('90ff277cc9b3fa0d0313052fcf5e3ffad8652abc'
+ 'b8b712871615308b8b6add92f86d218437d652f2'
+ '9f9f332b0b31e58e59542bc1568df9617b71710a')
build() {
- cd ${srcdir}/${pkgname}.${pkgver}
- sed -i 's/XCOMM USELATEX2E = -DLATEX2E/USELATEX2E = -DLATEX2E/' transfig/Imakefile || return 1
- sed -i 's/XCOMM USEINLINE = -DUSE_INLINE/USEINLINE = -DUSE_INLINE/' fig2dev/Imakefile || return 1
+ cd "${srcdir}/${pkgname}.${pkgver}"
+ sed -i 's/XCOMM USELATEX2E = -DLATEX2E/USELATEX2E = -DLATEX2E/' transfig/Imakefile
+ sed -i 's/XCOMM USEINLINE = -DUSE_INLINE/USEINLINE = -DUSE_INLINE/' fig2dev/Imakefile
+ patch -p1 -i ../transfig-3.2.5d-libpng-1.5.patch
- xmkmf || return 1
- make FIG2DEV_LIBDIR=/usr/share/fig2dev Makefiles || return 1
- make FIG2DEV_LIBDIR=/usr/share/fig2dev XFIGLIBDIR=/usr/share/xfig || return 1
+ xmkmf
+ make FIG2DEV_LIBDIR=/usr/share/fig2dev Makefiles
+ make FIG2DEV_LIBDIR=/usr/share/fig2dev XFIGLIBDIR=/usr/share/xfig
}
package() {
- cd ${srcdir}/${pkgname}.${pkgver}
+ cd "${srcdir}/${pkgname}.${pkgver}"
- make DESTDIR=${pkgdir} XFIGLIBDIR=/usr/share/xfig \
- FIG2DEV_LIBDIR=/usr/share/fig2dev MANPATH=/usr/share/man \
- install install.man || return 1
- install -Dm644 ../LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE || return 1
+ make DESTDIR="${pkgdir}" XFIGLIBDIR=/usr/share/xfig \
+ FIG2DEV_LIBDIR=/usr/share/fig2dev MANPATH=/usr/share/man \
+ install install.man
+ install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
diff --git a/extra/transfig/transfig-3.2.5d-libpng-1.5.patch b/extra/transfig/transfig-3.2.5d-libpng-1.5.patch
new file mode 100644
index 000000000..e6f15e43e
--- /dev/null
+++ b/extra/transfig/transfig-3.2.5d-libpng-1.5.patch
@@ -0,0 +1,39 @@
+http://bugs.gentoo.org/show_bug.cgi?id=356751
+
+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) {