From d3d63f48f6e508340457ccd5910a091037950015 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Jun 18 2010 14:42:33 +0000 Subject: backport fix for saving indexed PNM files (#605615) --- diff --git a/.cvsignore b/.cvsignore index 7b9922c..f67a080 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ gimp-2.6.8.tar.bz2 +gimp-2.6.8-4-automake.patch.bz2 diff --git a/gimp-2.6.8-gold.patch b/gimp-2.6.8-gold.patch new file mode 100644 index 0000000..d4e61df --- /dev/null +++ b/gimp-2.6.8-gold.patch @@ -0,0 +1,616 @@ +From 4dcab3c2904353c0a175765657316bbfc78af0d2 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Thu, 25 Feb 2010 18:04:18 +0100 +Subject: [PATCH] patch: gold + +Squashed commit of the following: + +commit afd331aca4c7cb4a0b53c7b0276253aab82424ae +Author: Nils Philippsen +Date: Thu Feb 25 15:11:04 2010 +0100 + + selection-to-path: explicitly specify library dependencies + +commit db8abcd13a4d553d1f3e50e6fb0cc19a7c9f6ae5 +Author: Nils Philippsen +Date: Thu Feb 25 15:11:04 2010 +0100 + + pagecurl: explicitly specify library dependencies + +commit 9d4e2aad81e339ae3e2971b7c12d3ae12bd60220 +Author: Nils Philippsen +Date: Thu Feb 25 15:11:04 2010 +0100 + + map-object: explicitly specify library dependencies + +commit 257047325c0fb9297d764f34a6d4742fcfb837b7 +Author: Nils Philippsen +Date: Thu Feb 25 15:11:04 2010 +0100 + + lighting: explicitly specify library dependencies + +commit 709c245217a301652c1e5a3a288f5ae7c101aa33 +Author: Nils Philippsen +Date: Thu Feb 25 15:11:04 2010 +0100 + + imagemap: explicitly specify library dependencies + +commit a40311f72b994c5ffb37a206e7d40ffc099c8205 +Author: Nils Philippsen +Date: Thu Feb 25 15:11:04 2010 +0100 + + ifs-compose: explicitly specify library dependencies + +commit aebab1503e2065fe7665abd5818def52603e2eec +Author: Nils Philippsen +Date: Thu Feb 25 15:11:04 2010 +0100 + + gradient-flare: explicitly specify library dependencies + +commit 0c7c425d1acdfecf64b453681df25cb08e344338 +Author: Nils Philippsen +Date: Thu Feb 25 15:11:04 2010 +0100 + + gimpressionist: explicitly specify library dependencies + +commit 2822fbfd9c0c1c099047d99d41ae9de8c8d52dc3 +Author: Nils Philippsen +Date: Thu Feb 25 15:11:04 2010 +0100 + + gfig: explicitly specify library dependencies + +commit 4c0fd7d3f63f25a112271422cecef1b8958a94f9 +Author: Nils Philippsen +Date: Thu Feb 25 15:11:04 2010 +0100 + + fractal-explorer: explicitly specify library dependencies + +commit 17e154a2856d0e97ebd76c706b6238fb3b40e74e +Author: Nils Philippsen +Date: Thu Feb 25 15:36:20 2010 +0100 + + flame: explicitly specify library dependencies + +commit f7fadce58851854abb1ed54ce0141c8dc0434c12 +Author: Nils Philippsen +Date: Thu Feb 25 15:11:04 2010 +0100 + + color-rotate: explicitly specify library dependencies + +commit abbb6a2472e7e31e3aaa30c772f8f5dbaaf476c5 +Author: Nils Philippsen +Date: Wed Feb 24 15:40:50 2010 +0100 + + script-fu: explicitly specify library dependencies + +commit da5ee1fe718d9bbbda6c786ebf0f4ded43a7a246 +Author: Manish Singh +Date: Wed Sep 9 17:41:20 2009 -0700 + + Explicit shared lib deps to support gold + + (attempted cherry-picking from commit + 15497c1d6808b1ea479574b0b3e132484f7f172f, resolved conflicts) + + Signed-off-by: Nils Philippsen + +commit 7cae0f249a5d2110a596f3fb22cdd33b07b05f1c +Author: Manish Singh +Date: Sun May 24 10:42:39 2009 -0700 + + Explicitly specify library dependencies at link time, so we can use gold. + (cherry picked from commit 582cb0f14eb9f145bd2a2f5c9fda12309ae0229f) + + Signed-off-by: Nils Philippsen +--- + libgimpthumb/Makefile.am | 5 ++++- + plug-ins/color-rotate/Makefile.am | 12 +++++++----- + plug-ins/common/Makefile.am | 11 ++++++----- + plug-ins/common/mkgen.pl | 11 ++++++----- + plug-ins/flame/Makefile.am | 12 +++++++----- + plug-ins/fractal-explorer/Makefile.am | 12 +++++++----- + plug-ins/gfig/Makefile.am | 12 +++++++----- + plug-ins/gimpressionist/Makefile.am | 12 +++++++----- + plug-ins/gradient-flare/Makefile.am | 12 +++++++----- + plug-ins/help-browser/Makefile.am | 1 + + plug-ins/ifs-compose/Makefile.am | 12 +++++++----- + plug-ins/imagemap/Makefile.am | 12 +++++++----- + plug-ins/lighting/Makefile.am | 12 +++++++----- + plug-ins/map-object/Makefile.am | 12 +++++++----- + plug-ins/metadata/Makefile.am | 5 ++++- + plug-ins/pagecurl/Makefile.am | 12 +++++++----- + plug-ins/script-fu/Makefile.am | 14 ++++++++------ + plug-ins/selection-to-path/Makefile.am | 12 +++++++----- + 18 files changed, 113 insertions(+), 78 deletions(-) + +diff --git a/libgimpthumb/Makefile.am b/libgimpthumb/Makefile.am +index 2e7b531..ee26219 100644 +--- a/libgimpthumb/Makefile.am ++++ b/libgimpthumb/Makefile.am +@@ -86,7 +86,10 @@ noinst_PROGRAMS = gimp-thumbnail-list + + gimp_thumbnail_list_SOURCES = gimp-thumbnail-list.c + +-gimp_thumbnail_list_LDADD = libgimpthumb-$(GIMP_API_VERSION).la ++gimp_thumbnail_list_LDADD = \ ++ libgimpthumb-$(GIMP_API_VERSION).la \ ++ $(GDK_PIXBUF_LIBS) \ ++ $(GLIB_LIBS) + + + install-data-local: install-ms-lib install-libtool-import-lib +diff --git a/plug-ins/color-rotate/Makefile.am b/plug-ins/color-rotate/Makefile.am +index c713c8c..f7e11b7 100644 +--- a/plug-ins/color-rotate/Makefile.am ++++ b/plug-ins/color-rotate/Makefile.am +@@ -1,16 +1,18 @@ + ## Process this file with automake to produce Makefile.in + ++if OS_WIN32 ++mwindows = -mwindows ++else ++libm = -lm ++endif ++ + libgimpui = $(top_builddir)/libgimp/libgimpui-$(GIMP_API_VERSION).la + libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la + libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la + libgimp = $(top_builddir)/libgimp/libgimp-$(GIMP_API_VERSION).la + libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la + libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la +-libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la +- +-if OS_WIN32 +-mwindows = -mwindows +-endif ++libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la $(libm) + + AM_LDFLAGS = $(mwindows) + +diff --git a/plug-ins/common/Makefile.am b/plug-ins/common/Makefile.am +index 66dc6dd..d58ecee 100644 +--- a/plug-ins/common/Makefile.am ++++ b/plug-ins/common/Makefile.am +@@ -7,21 +7,22 @@ + ## Modify those two files instead of this one; for most + ## plug-ins you should only need to modify plugin-defs.pl. + ++if OS_WIN32 ++mwindows = -mwindows ++else ++libm = -lm ++endif + + libgimp = $(top_builddir)/libgimp/libgimp-$(GIMP_API_VERSION).la + libgimpbase = $(top_builddir)/libgimpbase/libgimpbase-$(GIMP_API_VERSION).la + libgimpcolor = $(top_builddir)/libgimpcolor/libgimpcolor-$(GIMP_API_VERSION).la + libgimpconfig = $(top_builddir)/libgimpconfig/libgimpconfig-$(GIMP_API_VERSION).la +-libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la ++libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la $(libm) + libgimpmodule = $(top_builddir)/libgimpmodule/libgimpmodule-$(GIMP_API_VERSION).la + libgimpui = $(top_builddir)/libgimp/libgimpui-$(GIMP_API_VERSION).la + libgimpwidgets = $(top_builddir)/libgimpwidgets/libgimpwidgets-$(GIMP_API_VERSION).la + + +-if OS_WIN32 +-mwindows = -mwindows +-endif +- + AM_LDFLAGS = $(mwindows) + + libexecdir = $(gimpplugindir)/plug-ins +diff --git a/plug-ins/common/mkgen.pl b/plug-ins/common/mkgen.pl +index 40b4b74..b0cd786 100755 +--- a/plug-ins/common/mkgen.pl ++++ b/plug-ins/common/mkgen.pl +@@ -51,21 +51,22 @@ print MK < +Date: Wed, 24 Mar 2010 18:08:01 +0100 +Subject: [PATCH] patch: gtk219 + +Squashed commit of the following: + +commit 726878e604e663488757a3220246c2054f54b843 +Author: Nils Philippsen +Date: Wed Mar 24 15:43:10 2010 +0100 + + 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. +--- + app/display/gimpstatusbar.c | 32 +++++++++++++++++++++++++------- + 1 files changed, 25 insertions(+), 7 deletions(-) + +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); +-- +1.6.6.1 + diff --git a/gimp-2.6.8-indexed-pnm.patch b/gimp-2.6.8-indexed-pnm.patch new file mode 100644 index 0000000..9cc983e --- /dev/null +++ b/gimp-2.6.8-indexed-pnm.patch @@ -0,0 +1,54 @@ +From 2bb143afdefb20b51ed6643f84e4862482d0e7dc Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Fri, 18 Jun 2010 16:20:51 +0200 +Subject: [PATCH] patch: indexed-pnm + +Squashed commit of the following: + +commit 83e5714e44d4c14ff162de2450a311dcbeb10ce7 +Author: Sven Neumann +Date: Sat Jan 9 12:12:12 2010 +0100 + + Bug 606372 - Saving to .ppm fails on indexed colorspace + + Don't change the pointer to the colormap and then attempt to free it. + (cherry picked from commit b883d59411dfde28fb0704fa2790e602999f7f6f) +--- + plug-ins/common/file-pnm.c | 11 ++++++----- + 1 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/plug-ins/common/file-pnm.c b/plug-ins/common/file-pnm.c +index 2cd8443..8359f0a 100644 +--- a/plug-ins/common/file-pnm.c ++++ b/plug-ins/common/file-pnm.c +@@ -1103,13 +1103,14 @@ save_image (const gchar *filename, + } + else + { +- gint i; ++ const guchar *c = cmap; ++ gint i; + + for (i = 0; i < num_colors; i++) + { +- red[i] = *cmap++; +- grn[i] = *cmap++; +- blu[i] = *cmap++; ++ red[i] = *c++; ++ grn[i] = *c++; ++ blu[i] = *c++; + } + + rowinfo.red = red; +@@ -1155,7 +1156,7 @@ save_image (const gchar *filename, + d = data; + } + +- (*saverow)(&rowinfo, d); ++ saverow (&rowinfo, d); + d += xres * (np ? np : 1); + + if ((ypos % 20) == 0) +-- +1.7.0.1 + diff --git a/gimp-2.6.8-never-stack-trace-desktop.patch b/gimp-2.6.8-never-stack-trace-desktop.patch new file mode 100644 index 0000000..d342992 --- /dev/null +++ b/gimp-2.6.8-never-stack-trace-desktop.patch @@ -0,0 +1,32 @@ +From 0939c40c21d6750e5d65f2c2b34bf8caaad263f5 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Mon, 19 Apr 2010 18:05:41 +0200 +Subject: [PATCH] patch: never-stack-trace-desktop + +Squashed commit of the following: + +commit 9cb13a72dea56cc16d92b2c71ae16803d229b4ec +Author: Nils Philippsen +Date: Mon Apr 19 18:04:19 2010 +0200 + + add --stack-trace-mode=never to desktop file +--- + desktop/gimp.desktop.in.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/desktop/gimp.desktop.in.in b/desktop/gimp.desktop.in.in +index 776e4ee..639e987 100644 +--- a/desktop/gimp.desktop.in.in ++++ b/desktop/gimp.desktop.in.in +@@ -4,7 +4,7 @@ Type=Application + _Name=GNU Image Manipulation Program + _GenericName=Image Editor + _Comment=Create images and edit photographs +-Exec=@GIMP_COMMAND@ %U ++Exec=@GIMP_COMMAND@ --stack-trace-mode=never %U + TryExec=gimp-@GIMP_APP_VERSION@ + Icon=gimp + Terminal=false +-- +1.6.6.1 + diff --git a/gimp.spec b/gimp.spec index 20edbb4..ec09b87 100644 --- a/gimp.spec +++ b/gimp.spec @@ -31,7 +31,7 @@ Summary: GNU Image Manipulation Program Name: gimp Epoch: 2 Version: 2.6.8 -Release: 1%{?dist} +Release: 8%{?dist} %define binver 2.6 %define gimp_lang_ver 20 %define interfacever 2.0 @@ -99,7 +99,6 @@ BuildRequires: findutils BuildRequires: lcms-devel >= 1.16 %endif -Requires: gimp-libs-%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: glib2 >= 2.16.1 Requires: gtk2 >= 2.12.5 Requires: pango >= 1.18.0 @@ -115,8 +114,7 @@ Requires: gimp-print-plugin Requires: hicolor-icon-theme Requires: pygtk2 >= 2.10.4 Requires: xdg-utils -Requires: gimp-libs-%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release} -Provides: gimp-%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: gimp-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Source0: ftp://ftp.gimp.org/pub/gimp/v%{binver}/gimp-%{version}.tar.bz2 Source1: gimp-plugin-mgr.in @@ -128,6 +126,16 @@ Patch1: gimp-2.6.7-jpeg-units.patch # https://bugzilla.gnome.org/show_bug.cgi?id=556896 # "Dialogs don't get minimized with single image window" Patch2: gimp-2.6.6-minimize-dialogs.patch +# backport: fix building with "gold" linker +Patch3: gimp-2.6.8-gold.patch +# backport: statusbar code needed for GTK+ >= 2.19.1 (#559726) +Patch4: gimp-2.6.8-gtk219.patch +# distro-specific: add --stack-trace-mode=never to desktop file +Patch5: gimp-2.6.8-never-stack-trace-desktop.patch +# backport: fix saving indexed PNM files (#605615) +Patch6: gimp-2.6.8-indexed-pnm.patch +# Makefile.in files generated by Makefile.am changed in patches +Patch10: gimp-2.6.8-4-automake.patch.bz2 %description GIMP (GNU Image Manipulation Program) is a powerful image composition and @@ -142,7 +150,7 @@ with multi-level undo. Summary: GIMP libraries Group: System Environment/Libraries License: LGPLv2+ -Provides: gimp-libs-%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release} +Provides: gimp-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %description libs The gimp-libs package contains shared libraries needed for the GNU Image @@ -152,10 +160,11 @@ Manipulation Program (GIMP). Summary: GIMP plugin and extension development kit Group: Development/Libraries License: LGPLv2+ -Requires: gimp-libs-%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: gimp-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: gimp-devel-tools = %{?epoch:%{epoch}:}%{version}-%{release} Requires: gtk2-devel Requires: glib2-devel +Requires: gtk-doc Requires: pkgconfig %description devel @@ -178,7 +187,7 @@ Summary: GIMP help browser plug-in Group: Applications/Multimedia License: GPLv2+ Obsoletes: gimp < 2:2.6.0-3 -Requires: gimp-%{_arch} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: gimp%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %description help-browser The gimp-help-browser package contains a lightweight help browser plugin for @@ -209,6 +218,11 @@ EOF %patch0 -p1 -b .xdg-open %patch1 -p1 -b .jpeg-units %patch2 -p1 -b .minimize-dialogs +%patch3 -p1 -b .gold +%patch4 -p1 -b .gtk219 +%patch5 -p1 -b .never-stack-trace-desktop +%patch6 -p1 -b .indexed-pnm +%patch10 -p1 -b .automake %build # if [ ! -f configure ]; then @@ -499,6 +513,34 @@ fi %{_libdir}/gimp/%{interfacever}/plug-ins/help-browser %changelog +* Fri Jun 18 2010 Nils Philippsen - 2:2.6.8-8 +- backport fix for saving indexed PNM files (#605615) + +* Mon Apr 19 2010 Nils Philippsen - 2:2.6.8-7 +- add --stack-trace-mode=never to desktop file + +* Wed Mar 24 2010 Nils Philippsen - 2:2.6.8-6 +- backport: statusbar code needed for GTK+ >= 2.19.1 (#559726) + +* Fri Feb 26 2010 Nils Philippsen - 2:2.6.8-5 +- require gtk-doc in devel package + +* Thu Feb 25 2010 Nils Philippsen - 2:2.6.8-4 +- add missing explicit libraries + +* Wed Feb 24 2010 Nils Philippsen +- backport: fix building with "gold" linker +- add more explicit libraries + +* Wed Jan 27 2010 Nils Philippsen - 2:2.6.8-3 +- remove wrong dependency (#558836) + +* Mon Jan 25 2010 Nils Philippsen - 2:2.6.8-2 +- rebuild against new babl + +* Wed Jan 20 2010 Nils Philippsen +- use %%_isa instead of %%_arch for architecture-specific dependencies + * Fri Dec 11 2009 Nils Philippsen - 2:2.6.8-1 - version 2.6.8 diff --git a/sources b/sources index 71e9928..4304f9d 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ a4d9462c9420954824a80c9b1963f9d9 gimp-2.6.8.tar.bz2 +b6e5b83adbc9ed543c697149757a5545 gimp-2.6.8-4-automake.patch.bz2