From 415856bdd4f48ab4f2732996f0bae58595092bbe Mon Sep 17 00:00:00 2001 From: Parabola Date: Tue, 5 Apr 2011 14:26:38 +0000 Subject: Tue Apr 5 14:26:38 UTC 2011 --- community/mtpaint/PKGBUILD | 25 +++++++++++++++++++++++++ community/mtpaint/libpng14.patch | 21 +++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 community/mtpaint/PKGBUILD create mode 100644 community/mtpaint/libpng14.patch (limited to 'community/mtpaint') diff --git a/community/mtpaint/PKGBUILD b/community/mtpaint/PKGBUILD new file mode 100644 index 000000000..770c55e33 --- /dev/null +++ b/community/mtpaint/PKGBUILD @@ -0,0 +1,25 @@ +# $Id: PKGBUILD 9274 2010-01-24 22:45:51Z foutrelis $ +# Maintainer: Roman Kyrylych +# Contributor: yosh64 + +pkgname=mtpaint +pkgver=3.31 +pkgrel=4 +pkgdesc="A simple GTK2 painting program designed for creating icons and pixel based artwork." +arch=('i686' 'x86_64') +url="http://mtpaint.sourceforge.net" +license=('GPL') +depends=('gtk2' 'giflib' 'openjpeg') +source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2 + libpng14.patch) +md5sums=('fbe34eb25f96b6092403115f1f6ab387' + 'f84245ae1e26bd734740306b09024bb8') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + patch -Np1 -i "$srcdir/libpng14.patch" || return 1 + ./configure --prefix=/usr --mandir=/usr/share/man/man1 man intl gif jpeg tiff + make || return 1 + make DESTDIR=$pkgdir install +} diff --git a/community/mtpaint/libpng14.patch b/community/mtpaint/libpng14.patch new file mode 100644 index 000000000..7df3b2127 --- /dev/null +++ b/community/mtpaint/libpng14.patch @@ -0,0 +1,21 @@ +diff -upr mtpaint-3.31.orig/src/png.c mtpaint-3.31/src/png.c +--- mtpaint-3.31.orig/src/png.c 2010-01-25 00:43:07.000000000 +0200 ++++ mtpaint-3.31/src/png.c 2010-01-25 00:43:39.000000000 +0200 +@@ -539,7 +539,7 @@ static int load_png(char *file_name, ls_ + if (settings->bpp == 3) + { + png_set_strip_16(png_ptr); +- png_set_gray_1_2_4_to_8(png_ptr); ++ png_set_expand_gray_1_2_4_to_8(png_ptr); + png_set_palette_to_rgb(png_ptr); + png_set_gray_to_rgb(png_ptr); + +@@ -644,7 +644,7 @@ static int load_png(char *file_name, ls_ + png_set_strip_alpha(png_ptr); + png_set_packing(png_ptr); + if ((color_type == PNG_COLOR_TYPE_GRAY) && (bit_depth < 8)) +- png_set_gray_1_2_4_to_8(png_ptr); ++ png_set_expand_gray_1_2_4_to_8(png_ptr); + for (i = 0; i < height; i++) + { + row_pointers[i] = settings->img[CHN_IMAGE] + i * width; -- cgit v1.2.3-54-g00ecf