summaryrefslogtreecommitdiff
path: root/community/mtpaint
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
committerroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
commit7a65a910b77ad191d69881098c47f9b0c852d92e (patch)
tree9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/mtpaint
parent60da6abff6c9577a783d72865f11de7a585e912e (diff)
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/mtpaint')
-rw-r--r--community/mtpaint/PKGBUILD51
-rw-r--r--community/mtpaint/libpng15.patch21
-rw-r--r--community/mtpaint/mtpaint.install13
3 files changed, 85 insertions, 0 deletions
diff --git a/community/mtpaint/PKGBUILD b/community/mtpaint/PKGBUILD
new file mode 100644
index 000000000..5717f5822
--- /dev/null
+++ b/community/mtpaint/PKGBUILD
@@ -0,0 +1,51 @@
+# $Id: PKGBUILD 94929 2013-08-01 07:01:24Z bpiotrowski $
+# Maintainer: Alexander Rødseth <rodseth@gmail.com>
+# Contributor: Roman Kyrylych <roman@archlinux.org>
+# Contributor: yosh64 <yosh64.at.gmail.dot.com>
+
+pkgname=mtpaint
+pkgver=3.40
+pkgrel=8
+pkgdesc='Simple paint program for creating icons and pixel based artwork'
+arch=('x86_64' 'i686')
+url='http://mtpaint.sourceforge.net/'
+license=('GPL3')
+depends=('gtk2' 'giflib' 'openjpeg' 'desktop-file-utils' 'lcms2')
+makedepends=('setconf')
+install='mtpaint.install'
+source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2"
+ 'libpng15.patch')
+sha256sums=('ef321d2b404839c7b909bdf5283eb22a37fbdd35b4cc9e380ddc400573d7c890'
+ 'be51d45d1146d6c61d1c2c12d1712134da5048dd7314e2741ff336cac6838de3')
+
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ patch -Np1 -i '../libpng15.patch'
+ sed -i 's:openjpeg.h:openjpeg-1.5/openjpeg.h:' src/png.c
+ sed -i 's:EGifOpenFileName(file_name, FALSE):EGifOpenFileName(file_name, FALSE, NULL):' src/png.c
+ sed -i 's:DGifOpenFileName(file_name):DGifOpenFileName(file_name, NULL):g' src/png.c
+ sed -i 's:MakeMapObject(:GifMakeMapObject(:g' src/png.c
+ sed -i 's:FreeMapObject(:GifFreeMapObject(:g' src/png.c
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ export CFLAGS="`pkg-config gtk+-2.0 --cflags` $CFLAGS"
+ ./configure --prefix=/usr --mandir=/usr/share/man man intl gif jpeg tiff
+ sed -i 's:-lpng:-lpng -lgif:' _conf.txt
+ sed -i 's:ungif:gif:g' _conf.txt
+ setconf _conf.txt CC 'gcc -w'
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+ install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+}
+
+# vim:set ts=2 sw=2 et:
+
diff --git a/community/mtpaint/libpng15.patch b/community/mtpaint/libpng15.patch
new file mode 100644
index 000000000..7df3b2127
--- /dev/null
+++ b/community/mtpaint/libpng15.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;
diff --git a/community/mtpaint/mtpaint.install b/community/mtpaint/mtpaint.install
new file mode 100644
index 000000000..ad97d7bab
--- /dev/null
+++ b/community/mtpaint/mtpaint.install
@@ -0,0 +1,13 @@
+post_upgrade() {
+ update-desktop-database -q
+}
+
+post_install() {
+ post_upgrade
+}
+
+post_remove() {
+ post_upgrade
+}
+
+# vim:set ts=2 sw=2 et: