summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-05-22 13:38:53 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-05-22 13:38:53 +0000
commitede51034c926bc2319fe15ec03d654d4a464cc3d (patch)
tree708aefed4c54c73b080fe343a95bc3023519c957
parente2ac44c772d819a90954e7b1001d9f77a34ea3bf (diff)
downloadaports-ede51034c926bc2319fe15ec03d654d4a464cc3d.tar.bz2
aports-ede51034c926bc2319fe15ec03d654d4a464cc3d.tar.xz
teseting/gimp: new aport
GNU Image Manipulation Program http://www.gimp.org/
-rw-r--r--testing/gimp/APKBUILD46
-rw-r--r--testing/gimp/gtk-2.19-statusbar.patch67
-rw-r--r--testing/gimp/libpng-1.4.patch26
3 files changed, 139 insertions, 0 deletions
diff --git a/testing/gimp/APKBUILD b/testing/gimp/APKBUILD
new file mode 100644
index 00000000..171766f5
--- /dev/null
+++ b/testing/gimp/APKBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=gimp
+pkgver=2.6.8
+pkgrel=0
+pkgdesc="GNU Image Manipulation Program"
+url="http://www.gimp.org/"
+license="GPL"
+makedepends="gtk+-dev libxpm-dev libxmu-dev librsvg-dev dbus-glib-dev
+ libexif-dev desktop-file-utils intltool gegl-dev tiff-dev
+ jpeg-dev libpng-dev curl-dev"
+install=
+subpackages="$pkgname-dev $pkgname-doc"
+source="ftp://ftp.$pkgname.org/pub/$pkgname/v2.6/$pkgname-$pkgver.tar.bz2
+ libpng-1.4.patch
+ gtk-2.19-statusbar.patch"
+
+prepare() {
+ cd "$srcdir"/$pkgname-$pkgver
+ patch -Np1 -i "../libpng-1.4.patch" || return 1
+ patch -Np1 -i "$srcdir"/gtk-2.19-statusbar.patch || return 1
+}
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --enable-mp \
+ --enable-gimp-console \
+ --enable-gimp-remote \
+ --disable-devel-docs \
+ --disable-python \
+ --without-gvfs \
+ --without-gnomevfs \
+ --with-gif-compression=lzw \
+ --without-aa || return 1
+ make || return 1
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make DESTDIR="$pkgdir" install || return 1
+ ln -s gimptool-2.0 "$pkgdir/usr/bin/gimptool" || return 1
+}
+md5sums="a4d9462c9420954824a80c9b1963f9d9 gimp-2.6.8.tar.bz2
+211eccab51593526e852816e647f7da4 libpng-1.4.patch
+8be7d21231e3032e4723cf86588375c0 gtk-2.19-statusbar.patch"
diff --git a/testing/gimp/gtk-2.19-statusbar.patch b/testing/gimp/gtk-2.19-statusbar.patch
new file mode 100644
index 00000000..8bc278b4
--- /dev/null
+++ b/testing/gimp/gtk-2.19-statusbar.patch
@@ -0,0 +1,67 @@
+From 501c4f65f08c111df0654cb887d95c2c06e82710 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Wed, 24 Mar 2010 17:08:01 +0000
+Subject: backport statusbar code needed for GTK+ >= 2.19.1
+
+Use the hbox that is provided via gtk_statusbar_get_message_area()
+since GTK+ 2.19.1.
+---
+diff --git a/app/display/gimpstatusbar.c b/app/display/gimpstatusbar.c
+index 5e89427..36651cd 100644
+--- a/app/display/gimpstatusbar.c
++++ b/app/display/gimpstatusbar.c
+@@ -49,6 +49,9 @@
+ /* maximal width of the string holding the cursor-coordinates */
+ #define CURSOR_LEN 256
+
++/* the spacing of the hbox */
++#define HBOX_SPACING 1
++
+ /* spacing between the icon and the statusbar label */
+ #define ICON_SPACING 2
+
+@@ -152,6 +155,7 @@ static void
+ gimp_statusbar_init (GimpStatusbar *statusbar)
+ {
+ GtkWidget *hbox;
++ GtkWidget *label;
+ GtkWidget *image;
+ GimpUnitStore *store;
+
+@@ -171,13 +175,27 @@ gimp_statusbar_init (GimpStatusbar *statusbar)
+ statusbar->progress_active = FALSE;
+ statusbar->progress_shown = FALSE;
+
+- /* remove the label and insert a hbox */
+- gtk_container_remove (GTK_CONTAINER (GTK_STATUSBAR (statusbar)->frame),
+- g_object_ref (GTK_STATUSBAR (statusbar)->label));
+-
+- hbox = gtk_hbox_new (FALSE, 1);
+- gtk_container_add (GTK_CONTAINER (GTK_STATUSBAR (statusbar)->frame), hbox);
+- gtk_widget_show (hbox);
++ label = g_object_ref (GTK_STATUSBAR (statusbar)->label);
++
++ /* remove the message area or label and insert a hbox */
++#if GTK_CHECK_VERSION (2, 19, 1)
++ {
++ hbox = gtk_statusbar_get_message_area (GTK_STATUSBAR (statusbar));
++ gtk_box_set_spacing (GTK_BOX (hbox), HBOX_SPACING);
++ gtk_container_remove (GTK_CONTAINER (hbox), label);
++ }
++#else
++ {
++ GtkWidget *label_parent;
++
++ label_parent = gtk_widget_get_parent (label);
++ gtk_container_remove (GTK_CONTAINER (label_parent), label);
++
++ hbox = gtk_hbox_new (FALSE, HBOX_SPACING);
++ gtk_container_add (GTK_CONTAINER (label_parent), hbox);
++ gtk_widget_show (hbox);
++ }
++#endif
+
+ statusbar->cursor_label = gtk_label_new ("8888, 8888");
+ gtk_misc_set_alignment (GTK_MISC (statusbar->cursor_label), 0.5, 0.5);
+--
+cgit v0.8.3.1
diff --git a/testing/gimp/libpng-1.4.patch b/testing/gimp/libpng-1.4.patch
new file mode 100644
index 00000000..8f7963d2
--- /dev/null
+++ b/testing/gimp/libpng-1.4.patch
@@ -0,0 +1,26 @@
+diff -Naur gimp-2.7.0-orig/plug-ins/file-ico/ico-load.c gimp-2.7.0/plug-ins/file-ico/ico-load.c
+--- gimp-2.7.0-orig/plug-ins/file-ico/ico-load.c 2010-01-18 19:01:46.000000000 -0500
++++ gimp-2.7.0/plug-ins/file-ico/ico-load.c 2010-01-18 19:14:43.000000000 -0500
+@@ -286,14 +286,22 @@
+ switch (color_type)
+ {
+ case PNG_COLOR_TYPE_GRAY:
++#if PNG_LIBPNG_VER < 10400
+ png_set_gray_1_2_4_to_8 (png_ptr);
++#else
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
++#endif
+ if ( bit_depth == 16 )
+ png_set_strip_16 (png_ptr);
+ png_set_gray_to_rgb (png_ptr);
+ png_set_add_alpha (png_ptr, 0xff, PNG_FILLER_AFTER);
+ break;
+ case PNG_COLOR_TYPE_GRAY_ALPHA:
++#if PNG_LIBPNG_VER < 10400
+ png_set_gray_1_2_4_to_8 (png_ptr);
++#else
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
++#endif
+ if ( bit_depth == 16 )
+ png_set_strip_16 (png_ptr);
+ png_set_gray_to_rgb (png_ptr);