version 2.10.0

- build without help-browser (#1375809)
- build with OpenEXR support
- build with webp support
- don't BR: webkitgtk-devel
- explicitly require perl for building
- update runtime dependency versions
- remove obsolete build deps: gnome-keyring-devel, libgnomeui-devel
- don't run appdata test which requires network access
This commit is contained in:
Nils Philippsen 2018-04-28 23:43:55 +02:00
parent 282605dda7
commit 5fcbb4ca6b
14 changed files with 241 additions and 10649 deletions

1
.gitignore vendored
View File

@ -23,3 +23,4 @@ gimp-2.6.10-1-autoreconf.patch.bz2
/gimp-2.8.18.tar.bz2 /gimp-2.8.18.tar.bz2
/gimp-2.8.20.tar.bz2 /gimp-2.8.20.tar.bz2
/gimp-2.8.22.tar.bz2 /gimp-2.8.22.tar.bz2
/gimp-2.10.0.tar.bz2

View File

@ -0,0 +1,25 @@
diff -up gimp-2.10.0/etc/gimprc.in.cm-system-monitor-profile-by-default gimp-2.10.0/etc/gimprc.in
--- gimp-2.10.0/etc/gimprc.in.cm-system-monitor-profile-by-default 2018-04-28 17:21:37.050632773 +0200
+++ gimp-2.10.0/etc/gimprc.in 2018-04-28 17:22:37.399518036 +0200
@@ -306,9 +306,9 @@
# Defines the color management behavior. This is a parameter list.
#
-# (color-management
+(color-management
# (mode display)
-# (display-profile-from-gdk no)
+ (display-profile-from-gdk no)
# (display-rendering-intent relative-colorimetric)
# (display-use-black-point-compensation yes)
# (display-optimize yes)
@@ -317,7 +317,8 @@
# (simulation-optimize yes)
# (simulation-gamut-check no)
# (out-of-gamut-color (color-rgb 1.000000 0.000000 1.000000))
-# (display-module "CdisplayLcms"))
+# (display-module "CdisplayLcms")
+)
# Keep a permanent record of all opened and saved files in the Recent
# Documents list. Possible values are yes and no.

View File

@ -0,0 +1,11 @@
diff -up gimp-2.10.0/etc/gimprc.in.external-help-browser gimp-2.10.0/etc/gimprc.in
--- gimp-2.10.0/etc/gimprc.in.external-help-browser 2018-04-28 17:25:02.483242200 +0200
+++ gimp-2.10.0/etc/gimprc.in 2018-04-28 17:25:28.048193595 +0200
@@ -753,6 +753,7 @@
# web-browser.
#
# (help-browser gimp)
+(help-browser webbrowser)
# When enabled, a search of actions will also return inactive actions.
# Possible values are yes and no.

View File

@ -1,48 +0,0 @@
From 9a3f047f90a79e96af54a73090313a670b2685d3 Mon Sep 17 00:00:00 2001
From: Nils Philippsen <nils@redhat.com>
Date: Mon, 19 Nov 2012 18:26:16 +0100
Subject: [PATCH] patch: cm-system-monitor-profile-by-default
Squashed commit of the following:
commit 1430096d27ba12566739fadf96302c9a4ce8f98b
Author: Nils Philippsen <nils@redhat.com>
Date: Mon Nov 19 18:25:28 2012 +0100
color mgmt: fix syntax error
commit eb78c3a0cfd7ff796110fcd3cd161ca11005fca5
Author: Richard Hughes <hughsient@gmail.com>
Date: Thu Nov 15 12:12:12 2012 +0100
color mgmt: try to use the system monitor profile by default
---
etc/gimprc | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/etc/gimprc b/etc/gimprc
index 8306571..1511cd6 100644
--- a/etc/gimprc
+++ b/etc/gimprc
@@ -285,14 +285,15 @@
# Defines the color management behavior. This is a parameter list.
#
-# (color-management
+(color-management
# (mode display)
-# (display-profile-from-gdk no)
+ (display-profile-from-gdk yes)
# (display-rendering-intent perceptual)
# (simulation-rendering-intent perceptual)
# (simulation-gamut-check no)
# (out-of-gamut-color (color-rgb 0.501961 0.501961 0.501961))
-# (display-module "CdisplayLcms"))
+# (display-module "CdisplayLcms")
+)
# How to handle embedded color profiles when opening a file. Possible values
# are ask, keep and convert.
--
1.7.11.7

View File

@ -1,13 +0,0 @@
diff -urNp old/plug-ins/common/file-gbr.c new/plug-ins/common/file-gbr.c
--- old/plug-ins/common/file-gbr.c 2018-01-04 12:13:17.553757864 +0100
+++ new/plug-ins/common/file-gbr.c 2018-01-04 12:18:01.723635742 +0100
@@ -443,7 +443,8 @@ load_image (const gchar *filename,
{
gchar *temp = g_new (gchar, bn_size);
- if ((read (fd, temp, bn_size)) < bn_size)
+ if ((read (fd, temp, bn_size)) < bn_size ||
+ temp[bn_size - 1] != '\0')
{
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
_("Error in GIMP brush file '%s'"),

View File

@ -1,130 +0,0 @@
diff -urNp old/plug-ins/file-fli/fli.c new/plug-ins/file-fli/fli.c
--- old/plug-ins/file-fli/fli.c 2018-01-04 12:19:54.714139464 +0100
+++ new/plug-ins/file-fli/fli.c 2018-01-04 12:34:18.568323629 +0100
@@ -25,6 +25,8 @@
#include "config.h"
+#include <glib/gstdio.h>
+
#include <string.h>
#include <stdio.h>
@@ -461,23 +463,27 @@ void fli_read_brun(FILE *f, s_fli_header
unsigned short yc;
unsigned char *pos;
for (yc=0; yc < fli_header->height; yc++) {
- unsigned short xc, pc, pcnt;
+ unsigned short pc, pcnt;
+ size_t n, xc;
pc=fli_read_char(f);
xc=0;
pos=framebuf+(fli_header->width * yc);
+ n=(size_t)fli_header->width * (fli_header->height-yc);
for (pcnt=pc; pcnt>0; pcnt--) {
unsigned short ps;
ps=fli_read_char(f);
if (ps & 0x80) {
unsigned short len;
- for (len=-(signed char)ps; len>0; len--) {
+ for (len=-(signed char)ps; len>0 && xc<n; len--) {
pos[xc++]=fli_read_char(f);
}
} else {
unsigned char val;
+ size_t len;
+ len=MIN(n-xc,ps);
val=fli_read_char(f);
- memset(&(pos[xc]), val, ps);
- xc+=ps;
+ memset(&(pos[xc]), val, len);
+ xc+=len;
}
}
}
@@ -564,25 +570,34 @@ void fli_read_lc(FILE *f, s_fli_header *
memcpy(framebuf, old_framebuf, fli_header->width * fli_header->height);
firstline = fli_read_short(f);
numline = fli_read_short(f);
+ if (numline > fli_header->height || fli_header->height-numline < firstline)
+ return;
+
for (yc=0; yc < numline; yc++) {
- unsigned short xc, pc, pcnt;
+ unsigned short pc, pcnt;
+ size_t n, xc;
pc=fli_read_char(f);
xc=0;
pos=framebuf+(fli_header->width * (firstline+yc));
+ n=(size_t)fli_header->width * (fli_header->height-firstline-yc);
for (pcnt=pc; pcnt>0; pcnt--) {
unsigned short ps,skip;
skip=fli_read_char(f);
ps=fli_read_char(f);
- xc+=skip;
+ xc+=MIN(n-xc,skip);
if (ps & 0x80) {
unsigned char val;
+ size_t len;
ps=-(signed char)ps;
val=fli_read_char(f);
- memset(&(pos[xc]), val, ps);
- xc+=ps;
+ len=MIN(n-xc,ps);
+ memset(&(pos[xc]), val, len);
+ xc+=len;
} else {
- fread(&(pos[xc]), ps, 1, f);
- xc+=ps;
+ size_t len;
+ len=MIN(n-xc,ps);
+ fread(&(pos[xc]), len, 1, f);
+ xc+=len;
}
}
}
@@ -689,7 +704,8 @@ void fli_read_lc_2(FILE *f, s_fli_header
yc=0;
numline = fli_read_short(f);
for (lc=0; lc < numline; lc++) {
- unsigned short xc, pc, pcnt, lpf, lpn;
+ unsigned short pc, pcnt, lpf, lpn;
+ size_t n, xc;
pc=fli_read_short(f);
lpf=0; lpn=0;
while (pc & 0x8000) {
@@ -700,26 +716,30 @@ void fli_read_lc_2(FILE *f, s_fli_header
}
pc=fli_read_short(f);
}
+ yc=MIN(yc, fli_header->height);
xc=0;
pos=framebuf+(fli_header->width * yc);
+ n=(size_t)fli_header->width * (fli_header->height-yc);
for (pcnt=pc; pcnt>0; pcnt--) {
unsigned short ps,skip;
skip=fli_read_char(f);
ps=fli_read_char(f);
- xc+=skip;
+ xc+=MIN(n-xc,skip);
if (ps & 0x80) {
unsigned char v1,v2;
ps=-(signed char)ps;
v1=fli_read_char(f);
v2=fli_read_char(f);
- while (ps>0) {
+ while (ps>0 && xc+1<n) {
pos[xc++]=v1;
pos[xc++]=v2;
ps--;
}
} else {
- fread(&(pos[xc]), ps, 2, f);
- xc+=ps << 1;
+ size_t len;
+ len=MIN((n-xc)/2,ps);
+ fread(&(pos[xc]), len, 2, f);
+ xc+=len << 1;
}
}
if (lpf) pos[xc]=lpn;

View File

@ -1,25 +0,0 @@
diff -urNp old/plug-ins/common/file-tga.c new/plug-ins/common/file-tga.c
--- old/plug-ins/common/file-tga.c 2018-01-04 12:36:22.333754882 +0100
+++ new/plug-ins/common/file-tga.c 2018-01-04 12:40:46.943070295 +0100
@@ -564,12 +564,17 @@ load_image (const gchar *filename,
}
break;
case TGA_TYPE_COLOR:
- if (info.bpp != 15 && info.bpp != 16 &&
- info.bpp != 24 && info.bpp != 32)
+ if ((info.bpp != 15 && info.bpp != 16 &&
+ info.bpp != 24 && info.bpp != 32) ||
+ ((info.bpp == 15 || info.bpp == 24) &&
+ info.alphaBits != 0) ||
+ (info.bpp == 16 && info.alphaBits != 1 &&
+ info.alphaBits != 0) ||
+ (info.bpp == 32 && info.alphaBits != 8))
{
- g_message ("Unhandled sub-format in '%s' (type = %u, bpp = %u)",
+ g_message ("Unhandled sub-format in '%s' (type = %u, bpp = %u, alpha = %u)",
gimp_filename_to_utf8 (filename),
- info.imageType, info.bpp);
+ info.imageType, info.bpp, info.alphaBits);
return -1;
}
break;

View File

@ -1,16 +0,0 @@
diff -urNp old/plug-ins/common/file-psp.c new/plug-ins/common/file-psp.c
--- old/plug-ins/common/file-psp.c 2018-01-04 11:58:46.928253797 +0100
+++ new/plug-ins/common/file-psp.c 2018-01-04 12:03:42.141874067 +0100
@@ -913,6 +913,12 @@ read_creator_block (FILE *f,
g_message ("Error reading creator keyword data");
return -1;
}
+ if (string[length - 1] != '\0')
+ {
+ g_message ("Creator keyword data not nul-terminated");
+ g_free (string);
+ return -1;
+ }
switch (keyword)
{
case PSP_CRTR_FLD_CRT_DATE:

View File

@ -1,13 +0,0 @@
diff -urNp old/app/xcf/xcf.c new/app/xcf/xcf.c
--- old/app/xcf/xcf.c 2017-04-30 23:47:39.000000000 +0200
+++ new/app/xcf/xcf.c 2018-01-04 11:56:31.399888783 +0100
@@ -318,7 +318,8 @@ xcf_load_invoker (GimpProcedure *pr
{
info.file_version = 0;
}
- else if (id[9] == 'v')
+ else if (id[9] == 'v' &&
+ id[13] == '\0')
{
info.file_version = atoi (id + 10);
}

View File

@ -1,19 +0,0 @@
diff -urNp old/plug-ins/common/file-psp.c new/plug-ins/common/file-psp.c
--- old/plug-ins/common/file-psp.c 2018-01-04 12:04:14.636811394 +0100
+++ new/plug-ins/common/file-psp.c 2018-01-04 12:12:41.717877789 +0100
@@ -1777,6 +1777,15 @@ load_image (const gchar *filename,
{
block_start = ftell (f);
+ if (block_start + block_total_len > st.st_size)
+ {
+ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ _("Could not open '%s' for reading: %s"),
+ gimp_filename_to_utf8 (filename),
+ _("invalid block size"));
+ goto error;
+ }
+
if (id == PSP_IMAGE_BLOCK)
{
if (block_number != 0)

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +0,0 @@
diff -up gimp-2.8.6/etc/gimprc.external-help-browser gimp-2.8.6/etc/gimprc
--- gimp-2.8.6/etc/gimprc.external-help-browser 2013-07-02 12:04:11.011774506 +0200
+++ gimp-2.8.6/etc/gimprc 2013-07-02 12:04:25.408824028 +0200
@@ -671,7 +671,7 @@
# Sets the browser used by the help system. Possible values are gimp and
# web-browser.
#
-# (help-browser gimp)
+(help-browser web-browser)
# When enabled, the online user manual will be used by the help system.
# Otherwise the locally installed copy is used. Possible values are yes and

373
gimp.spec
View File

@ -1,54 +1,40 @@
# Set this to 0 in stable, 1 in (SONAME-wise) unstable releases
%global unstable 0
#### options: #### options:
# Use the following --with/--without <option> switches to control how the # Use the following --with/--without <option> switches to control how the
# package will be built: # package will be built:
# #
# lcms: lcms support # lcms: lcms support
%bcond_without lcms %bcond_without lcms
# python: python support # mp: multi processor support
%bcond_without python
# mp: multi processor support
%bcond_without mp %bcond_without mp
# static: build static libraries # static: build static libraries
%bcond_with static %bcond_with static
# print: build the print plugin (if you don't build it externally) # default_binary: install unversioned binary
%bcond_without print %if ! %unstable
# gutenprint: require gutenprint-plugin (instead of gimp-print-plugin) if %bcond_without default_binary
# internal print plugin isn't built %else
%bcond_without gutenprint %bcond_with default_binary
# convenience: install convenience symlinks %endif
%bcond_without convenience # aalib: build with AAlib (ASCII art gfx library)
# gudev: use gudev to discover special input devices
# use gudev from Fedora 15/RHEL7 on
%bcond_without gudev
# aalib: build with AAlib (ASCII art gfx library)
%if 0%{?rhel} %if 0%{?rhel}
# don't use aalib on RHEL # don't use aalib on RHEL
%bcond_with aalib %bcond_with aalib
%else %else
%bcond_without aalib %bcond_without aalib
%endif %endif
# hardening: use various compiler/linker flags to harden binaries against # don't build webkit-based help browser by default
# certain types of exploits
%bcond_without hardening
# poppler: use from version 0.20 on which is GPLv2/GPLv3 dual-licensed
# use from Fedora 18/RHEL
%bcond_without poppler
# helpbrowser build webkit-based help browser
%if 0%{?rhel} || 0%{?fedora} >= 26
%bcond_with helpbrowser %bcond_with helpbrowser
%else
%bcond_without helpbrowser
%endif
# hardcode python interpreter in python plug-ins # hardcode python interpreter in python plug-ins
%bcond_without hardcoded_python %bcond_without hardcoded_python
# webp support
%bcond_without webp
# skip tests known to be problematic in a specific version # skip tests known to be problematic in a specific version
#global skip_checks_version X.Y.Z #global skip_checks_version X.Y.Z
#global skip_checks test1 test2 test3 #global skip_checks test1 test2 test3
# Set this to 0 in stable, 1 in (SONAME-wise) unstable releases
%global unstable 0
# Set this in pre-releases (e.g. release candidates) # Set this in pre-releases (e.g. release candidates)
#global prerel RC1 #global prerel RC1
@ -74,8 +60,8 @@
Summary: GNU Image Manipulation Program Summary: GNU Image Manipulation Program
Name: gimp Name: gimp
Epoch: 2 Epoch: 2
Version: 2.8.22 Version: 2.10.0
Release: %{?prerelprefix}6%{dotprerel}%{dotgitrev}%{?dist} Release: %{?prerelprefix}1%{dotprerel}%{dotgitrev}%{?dist}
# Compute some version related macros. # Compute some version related macros.
# Ugly, need to get quoting percent signs straight. # Ugly, need to get quoting percent signs straight.
@ -94,96 +80,105 @@ Release: %{?prerelprefix}6%{dotprerel}%{dotgitrev}%{?dist}
%global lib_micro 0 %global lib_micro 0
%endif # unstable %endif # unstable
%if %{with poppler} %if %unstable
%global os_bindir %{_bindir}
%global os_datadir %{_datadir}
%undefine _prefix
%undefine _sysconfdir
%global _prefix /opt/gimp-%{major}.%{minor}
%global _sysconfdir %{_prefix}/etc
%endif
# poppler is "GPLv2 or GPLv3" which makes plug-ins linking to libpoppler such # poppler is "GPLv2 or GPLv3" which makes plug-ins linking to libpoppler such
# as file-pdf-load GPLv3-only # as file-pdf-load GPLv3-only
License: GPLv3+ and GPLv3 License: GPLv3+ and GPLv3
%else
License: GPLv3+
%endif
URL: http://www.gimp.org/ URL: http://www.gimp.org/
%if %{with aalib} %if %{with aalib}
BuildRequires: aalib-devel BuildRequires: aalib-devel
%endif %endif
BuildRequires: alsa-lib-devel >= 1.0.0 BuildRequires: alsa-lib-devel >= 1.0.0
BuildRequires: atk-devel >= 2.2.0 BuildRequires: atk-devel >= 2.2.0
BuildRequires: babl-devel >= 0.1.10 BuildRequires: babl-devel >= 0.1.46
BuildRequires: bzip2-devel BuildRequires: bzip2-devel
BuildRequires: cairo-devel >= 1.10.2 BuildRequires: cairo-devel >= 1.12.2
BuildRequires: curl-devel >= 7.15.1 BuildRequires: fontconfig-devel >= 2.12.4
BuildRequires: dbus-glib-devel >= 0.70
BuildRequires: fontconfig-devel >= 2.2.0
BuildRequires: freetype-devel >= 2.1.7 BuildRequires: freetype-devel >= 2.1.7
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gdk-pixbuf2-devel >= 2.24.1 BuildRequires: gdk-pixbuf2-devel >= 2.30.8
BuildRequires: gegl-devel >= 0.2.0 BuildRequires: gegl
%if 0%{?fedora} > 27 || 0%{?rhel} >= 8 BuildRequires: gegl04-devel >= 0.4.0
BuildRequires: libgs-devel BuildRequires: libgs-devel
%else BuildRequires: glib2-devel >= 2.54.2
BuildRequires: ghostscript-devel
%endif
BuildRequires: glib2-devel >= 2.30.2
BuildRequires: gtk2-devel >= 2.24.10 BuildRequires: gtk2-devel >= 2.24.10
BuildRequires: gtk-doc >= 1.0 BuildRequires: gtk-doc >= 1.0
BuildRequires: harfbuzz-devel >= 0.9.19
BuildRequires: iso-codes-devel BuildRequires: iso-codes-devel
BuildRequires: jasper-devel BuildRequires: jasper-devel
%if %{with lcms} BuildRequires: lcms2-devel >= 2.8
BuildRequires: lcms2-devel >= 2.2
%endif
BuildRequires: libappstream-glib BuildRequires: libappstream-glib
BuildRequires: libexif-devel >= 0.6.15 BuildRequires: libgexiv2-devel >= 0.10.6
%if %{with gudev}
BuildRequires: libgudev1-devel >= 167 BuildRequires: libgudev1-devel >= 167
%else
BuildRequires: hal-devel >= 0.5.7
%endif
BuildRequires: libjpeg-devel BuildRequires: libjpeg-devel
BuildRequires: libmng-devel BuildRequires: libmng-devel
BuildRequires: libpng-devel >= 1.2.37 BuildRequires: libpng-devel >= 1.6.25
BuildRequires: librsvg2-devel >= 2.36.0 BuildRequires: librsvg2-devel >= 2.40.6
BuildRequires: libtiff-devel BuildRequires: libtiff-devel
BuildRequires: libwmf-devel >= 0.2.8 %if %{with webp}
BuildRequires: pango-devel >= 1.29.4 BuildRequires: libwebp-devel >= 0.6.0
%if %{with poppler}
BuildRequires: poppler-glib-devel >= 0.20.0
%endif %endif
BuildRequires: python2-devel BuildRequires: libwmf-devel >= 0.2.8
BuildRequires: libmypaint-devel >= 1.3.0
BuildRequires: mypaint-brushes-devel >= 1.3.0
BuildRequires: OpenEXR-devel >= 1.6.1
BuildRequires: openjpeg2-devel >= 2.1.0
BuildRequires: pango-devel >= 1.29.4
BuildRequires: perl >= 5.10.0
BuildRequires: poppler-glib-devel >= 0.44.0
BuildRequires: poppler-data-devel >= 0.4.7
BuildRequires: pycairo-devel >= 1.0.2
BuildRequires: pygtk2-devel >= 2.10.4 BuildRequires: pygtk2-devel >= 2.10.4
BuildRequires: pygobject2-devel BuildRequires: pygobject2-devel
BuildRequires: python2-devel >= 2.5.0
%if %{with helpbrowser} %if %{with helpbrowser}
BuildRequires: webkitgtk-devel >= 1.6.1 BuildRequires: webkitgtk-devel >= 1.6.1
%endif %endif
BuildRequires: xz-devel >= 5.0.0
BuildRequires: zlib-devel BuildRequires: zlib-devel
BuildRequires: libX11-devel BuildRequires: libX11-devel
BuildRequires: libXmu-devel BuildRequires: libXmu-devel
BuildRequires: libXpm-devel BuildRequires: libXpm-devel
BuildRequires: chrpath >= 0.13-5 BuildRequires: chrpath >= 0.13-5
BuildRequires: intltool BuildRequires: intltool >= 0.40.1
BuildRequires: gettext BuildRequires: gettext >= 0.19
BuildRequires: pkgconfig BuildRequires: pkgconfig
Requires: babl%{?_isa} >= 0.1.10 %if %unstable
Requires: gegl%{?_isa} >= 0.2.0 BuildRequires: desktop-file-utils
Requires: glib2 >= 2.28.8 BuildRequires: ImageMagick
Requires: gtk2 >= 2.24.7 %endif
Requires: pango >= 1.29.4
Requires: babl%{?_isa} >= 0.1.46
Requires: gegl04%{?_isa} >= 0.4.0
Requires: fontconfig >= 2.12.4
Requires: freetype >= 2.1.7 Requires: freetype >= 2.1.7
Requires: fontconfig >= 2.2.0 Requires: glib2 >= 2.54.0
%if ! %{with print} Requires: gtk2 >= 2.24.10
%if %{with gutenprint}
Requires: gutenprint-plugin
%else
Requires: gimp-print-plugin
%endif
%endif
Requires: hicolor-icon-theme Requires: hicolor-icon-theme
Recommends: mypaint-brushes
Requires: pango >= 1.29.4
Requires: pygtk2 >= 2.10.4 Requires: pygtk2 >= 2.10.4
Requires: xdg-utils Requires: xdg-utils
Requires: gimp-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
%if ! %{with helpbrowser} %if %{with helpbrowser}
Obsoletes: gimp-help-browser < %{?epoch:%{epoch}:}%{version}-%{release} Recommends: %{name}-help-browser = %{epoch}:%{version}-%{release}
Conflicts: gimp-help-browser < %{?epoch:%{epoch}:}%{version}-%{release} %else
Obsoletes: %{name}-help-browser < %{epoch}:%{version}-%{release}
Conflicts: %{name}-help-browser < %{epoch}:%{version}-%{release}
%endif
%if ! %unstable
Obsoletes: %{name}-unstable < %{epoch}:%{major}.%{minor}
Conflicts: %{name}-unstable < %{epoch}:%{major}.%{minor}
%endif %endif
Source0: http://download.gimp.org/pub/gimp/v%{binver}/gimp-%{version}%{dashprerel}.tar.bz2 Source0: http://download.gimp.org/pub/gimp/v%{binver}/gimp-%{version}%{dashprerel}.tar.bz2
@ -194,26 +189,15 @@ Patch0: gimp-%{version}%{dashprerel}-git%{gitrev}.patch.bz2
# Try using the system monitor profile for color management by default. # Try using the system monitor profile for color management by default.
# Fedora specific. # Fedora specific.
Patch1: gimp-2.8.2-cm-system-monitor-profile-by-default.patch Patch1: gimp-2.10.0-cm-system-monitor-profile-by-default.patch
#Fix screenshot feature in wayland
Patch2: gimp-2.8.22-fix-screenshot-in-wayland.patch
#Reported CVE
Patch3: gimp-2.8.22-CVE-2017-17784.patch
Patch4: gimp-2.8.22-CVE-2017-17785.patch
Patch5: gimp-2.8.22-CVE-2017-17786.patch
Patch6: gimp-2.8.22-CVE-2017-17787.patch
Patch7: gimp-2.8.22-CVE-2017-17788.patch
Patch8: gimp-2.8.22-CVE-2017-17789.patch
# use external help browser directly if help browser plug-in is not built # use external help browser directly if help browser plug-in is not built
Patch100: gimp-2.8.6-external-help-browser.patch Patch100: gimp-2.10.0-external-help-browser.patch
%description %description
GIMP (GNU Image Manipulation Program) is a powerful image composition and GIMP (GNU Image Manipulation Program) is a powerful image composition and
editing program, which can be extremely useful for creating logos and other editing program, which can be extremely useful for creating logos and other
graphics for webpages. GIMP has many of the tools and filters you would expect graphics for web pages. GIMP has many of the tools and filters you would expect
to find in similar commercial offerings, and some interesting extras as well. to find in similar commercial offerings, and some interesting extras as well.
GIMP provides a large image manipulation toolbox, including channel operations GIMP provides a large image manipulation toolbox, including channel operations
and layers, effects, sub-pixel imaging and anti-aliasing, and conversions, all and layers, effects, sub-pixel imaging and anti-aliasing, and conversions, all
@ -222,66 +206,72 @@ with multi-level undo.
%package libs %package libs
Summary: GIMP libraries Summary: GIMP libraries
License: LGPLv3+ License: LGPLv3+
%if ! %unstable
Obsoletes: %{name}-unstable-libs < %{epoch}:%{major}.%{minor}
Conflicts: %{name}-unstable-libs < %{epoch}:%{major}.%{minor}
%endif
%description libs %description libs
The gimp-libs package contains shared libraries needed for the GNU Image The %{name}-libs package contains shared libraries needed for the GNU Image
Manipulation Program (GIMP). Manipulation Program (GIMP).
%package devel %package devel
Summary: GIMP plugin and extension development kit Summary: GIMP plugin and extension development kit
License: LGPLv3+ License: LGPLv3+
Requires: gimp-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
Requires: gimp-devel-tools = %{?epoch:%{epoch}:}%{version}-%{release} Requires: %{name}-devel-tools = %{epoch}:%{version}-%{release}
Requires: gtk2-devel Requires: gtk2-devel
Requires: glib2-devel Requires: glib2-devel
Requires: pkgconfig Requires: pkgconfig
Requires: rpm >= 4.11.0 Requires: rpm >= 4.11.0
%if ! %unstable
Obsoletes: %{name}-unstable-devel < %{epoch}:%{major}.%{minor}
Conflicts: %{name}-unstable-devel < %{epoch}:%{major}.%{minor}
%endif
%description devel %description devel
The gimp-devel package contains the static libraries and header files The %{name}-devel package contains the static libraries and header files
for writing GNU Image Manipulation Program (GIMP) plug-ins and for writing GNU Image Manipulation Program (GIMP) plug-ins and
extensions. extensions.
%package devel-tools %package devel-tools
Summary: GIMP plugin and extension development tools Summary: GIMP plugin and extension development tools
License: LGPLv3+ License: LGPLv3+
Requires: gimp-devel = %{?epoch:%{epoch}:}%{version}-%{release} Requires: %{name}-devel = %{epoch}:%{version}-%{release}
%if ! %unstable
Obsoletes: %{name}-unstable-devel-tools < %{epoch}:%{major}.%{minor}
Conflicts: %{name}-unstable-devel-tools < %{epoch}:%{major}.%{minor}
%endif
%description devel-tools %description devel-tools
The gimp-devel-tools package contains gimptool, a helper program to build GNU The %{name}-devel-tools package contains gimptool, a helper program to
Image Manipulation Program (GIMP) plug-ins and extensions. build GNU Image Manipulation Program (GIMP) plug-ins and extensions.
%if %{with helpbrowser} %if %{with helpbrowser}
%package help-browser %package help-browser
Summary: GIMP help browser plug-in Summary: GIMP help browser plug-in
License: GPLv3+ License: GPLv3+
Requires: gimp%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%if ! %unstable
Obsoletes: %{name}-unstable-help-browser < %{epoch}:%{major}.%{minor}
Conflicts: %{name}-unstable-help-browser < %{epoch}:%{major}.%{minor}
%endif
%description help-browser %description help-browser
The gimp-help-browser package contains a lightweight help browser plugin for The %{name}-help-browser package contains a lightweight help browser plugin for
viewing GIMP online help. viewing GIMP online help.
%endif %endif
%prep %prep
cat << EOF cat << EOF
--- 8< --- Build options --------------------------------------------------- --- 8< --- Build options ---------------------------------------------------
LCMS support: %{with lcms} LCMS support: %{with lcms}
Python support: %{with python} MP support: %{with mp}
MP support: %{with mp} build static libs: %{with static}
build static libs: %{with static} install default binary: %{with default_binary}
build internal print plugin: %{with print} build ASCII art plugin %{with aalib}
include convenience symlinks: %{with convenience} build help browser: %{with helpbrowser}
build the print plugin: %{with print} hardcode python interpreter: %{with hardcoded_python}
use gudev: %{with gudev}
%if ! %{with print}
prefer gutenprint over (external) gimp-print plugin:
%{with gutenprint}
%endif
build ASCII art plugin %{with aalib}
harden binaries: %{with hardening}
use poppler: %{with poppler}
build help browser: %{with helpbrowser}
hardcode python interpreter %{with hardcoded_python}
--- >8 --------------------------------------------------------------------- --- >8 ---------------------------------------------------------------------
EOF EOF
@ -292,36 +282,20 @@ EOF
%endif %endif
%patch1 -p1 -b .cm-system-monitor-profile-by-default %patch1 -p1 -b .cm-system-monitor-profile-by-default
%patch2 -p1 -b .fix-screenshot-in-wayland
%patch3 -p1 -b .CVE-17784
%patch4 -p1 -b .CVE-17785
%patch5 -p1 -b .CVE-17786
%patch6 -p1 -b .CVE-17787
%patch7 -p1 -b .CVE-17788
%patch8 -p1 -b .CVE-17789
%if ! %{with helpbrowser} %if ! %{with helpbrowser}
%patch100 -p1 -b .external-help-browser %patch100 -p1 -b .external-help-browser
%endif %endif
%build %build
#allow python2 package for RHEL-8 # allow python2 package for RHEL-8
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1 export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
%if %{with hardening}
# Use hardening compiler/linker flags because gimp is likely to deal with files # Use hardening compiler/linker flags because gimp is likely to deal with files
# coming from untrusted sources # coming from untrusted sources
# used from Fedora 16/RHEL7
%global _hardened_build 1 %global _hardened_build 1
%endif
%configure \ %configure \
CFLAGS="$CFLAGS -fno-strict-aliasing" \
CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" \
%if %{with python}
--enable-python \ --enable-python \
%else
--disable-python \
%endif
%if %{with mp} %if %{with mp}
--enable-mp \ --enable-mp \
%else %else
@ -332,11 +306,7 @@ export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
%else %else
--disable-static \ --disable-static \
%endif %endif
%if %{with print}
--with-print \ --with-print \
%else
--without-print \
%endif
%if %{with lcms} %if %{with lcms}
--with-lcms=lcms2 \ --with-lcms=lcms2 \
%else %else
@ -348,30 +318,33 @@ export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
%else %else
--without-aa \ --without-aa \
%endif %endif
%if %{with gudev}
--with-gudev --without-hal \ --with-gudev --without-hal \
%else
--with-hal --without-gudev \
%endif
%ifos linux %ifos linux
--with-linux-input \ --with-linux-input \
%endif %endif
%if use_poppler
--with-poppler \ --with-poppler \
%else
--without-poppler \
%endif
%if %{with helpbrowser} %if %{with helpbrowser}
--with-webkit \ --with-webkit \
%else %else
--without-webkit \ --without-webkit \
%endif
%if %{with webp}
--with-webp \
%else
--without-webp \
%endif
%if %{with default_binary}
--enable-default-binary=yes \
%else
--enable-default-binary=no \
%endif %endif
--with-libtiff --with-libjpeg --with-libpng --with-libmng --with-libjasper \ --with-libtiff --with-libjpeg --with-libpng --with-libmng --with-libjasper \
--with-libexif --with-librsvg --with-libxpm --with-gvfs --with-alsa \ --with-libexif --with-librsvg --with-libxpm --with-gvfs --with-alsa \
--with-dbus --with-script-fu --with-cairo-pdf --with-dbus --with-script-fu --with-cairo-pdf --without-appdata-test
make %{?_smp_mflags} make %{?_smp_mflags}
%if ! %{unstable}
# Generate RPM macros from pkg-config data: # Generate RPM macros from pkg-config data:
# %%_gimp_datadir -- toplevel directory for brushes, gradients, scripts, ... # %%_gimp_datadir -- toplevel directory for brushes, gradients, scripts, ...
# %%_gimp_libdir -- toplevel directory for modules, plug-ins, ... # %%_gimp_libdir -- toplevel directory for modules, plug-ins, ...
@ -415,20 +388,13 @@ cat << EOF > macros.gimp
%%_gimp_scriptdir ${_gimp_scriptdir} %%_gimp_scriptdir ${_gimp_scriptdir}
%%_gimp_plugindir ${_gimp_plugindir} %%_gimp_plugindir ${_gimp_plugindir}
EOF EOF
%endif
%install %install
make DESTDIR=%{buildroot} install make DESTDIR=%{buildroot} install
%if ! %unstable
install -D -m0644 macros.gimp %{buildroot}%{_rpmconfigdir}/macros.d/macros.gimp install -D -m0644 macros.gimp %{buildroot}%{_rpmconfigdir}/macros.d/macros.gimp
%endif
# Update the screenshot shown in the software center
#
# NOTE: It would be *awesome* if this file was pushed upstream.
#
# See http://people.freedesktop.org/~hughsient/appdata/#screenshots for more details.
#
appstream-util replace-screenshots %{buildroot}%{_datadir}/appdata/gimp.appdata.xml \
https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/gimp/a.png \
https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/gimp/b.png
# remove rpaths # remove rpaths
find %buildroot -type f -print0 | xargs -0 -L 20 chrpath --delete --keepgoing 2>/dev/null || : find %buildroot -type f -print0 | xargs -0 -L 20 chrpath --delete --keepgoing 2>/dev/null || :
@ -470,8 +436,8 @@ cat gimp%{gettext_version}.lang gimp%{gettext_version}-std-plug-ins.lang gimp%{g
# #
cat gimp-plugin-files gimp-all.lang > gimp.files cat gimp-plugin-files gimp-all.lang > gimp.files
%if %{with convenience} %if %{with default_binary}
# install convenience symlinks # install default binary symlinks
ln -snf gimp-%{binver} %{buildroot}%{_bindir}/gimp ln -snf gimp-%{binver} %{buildroot}%{_bindir}/gimp
ln -snf gimp-%{binver}.1 %{buildroot}%{_mandir}/man1/gimp.1 ln -snf gimp-%{binver}.1 %{buildroot}%{_mandir}/man1/gimp.1
ln -snf gimp-console-%{binver} %{buildroot}/%{_bindir}/gimp-console ln -snf gimp-console-%{binver} %{buildroot}/%{_bindir}/gimp-console
@ -491,6 +457,50 @@ grep -E -rl '^#!\s*%{_bindir}/env\s+python' --include=\*.py "%{buildroot}" |
done done
%endif %endif
%if %unstable
# install stuff in system locations
# script wrappers for executables
mkdir -p %{buildroot}%{os_bindir}
pushd %{buildroot}%{_bindir}
for exe in *-%{major}.%{minor}; do
cat << EOF > "%{buildroot}%{os_bindir}/$exe"
#!/bin/sh
export LD_LIBRARY_PATH=%{_libdir}
exec %{_bindir}/$exe "\$@"
EOF
chmod 755 %{buildroot}%{os_bindir}/"$exe"
done
popd
# desktop file -- mention version/unstable, use custom icon
desktop-file-install --dir=%{buildroot}%{os_datadir}/applications \
--set-name="GIMP %major.%minor (unstable)" \
--set-icon="gimp-%major.%minor" \
%{buildroot}%{_datadir}/applications/gimp.desktop
mv -f %{buildroot}%{os_datadir}/applications/gimp.desktop \
%{buildroot}%{os_datadir}/applications/gimp-%major.%minor.desktop
# icons -- overlay major.minor version
pushd %{buildroot}%{_datadir}/icons/hicolor
for srcicon in */apps/gimp.png; do
geo=${srcicon%%%%/*}
dim=${geo%%x*}
ps=$((5+$dim/6))
sw=$(($dim/50+1))
o=$(($dim/26+1))
destdir="%{buildroot}%{os_datadir}/icons/hicolor/$geo/apps"
desticon="$destdir/gimp-%{major}.%{minor}.png"
mkdir -p "$destdir"
convert "$srcicon" \
-gravity northeast -pointsize $ps -strokewidth $sw \
-stroke black -annotate +$o+$(($o+$ps)) %{major}.%{minor} \
-stroke none -fill white -annotate +$o+$(($o+$ps)) %{major}.%{minor} \
"$desticon"
done
popd
%endif
%check %check
# skip tests known to be problematic in a specific version # skip tests known to be problematic in a specific version
%if "%{version}" == "%{?skip_checks_version}" %if "%{version}" == "%{?skip_checks_version}"
@ -505,7 +515,7 @@ EOF
done done
popd popd
%endif %endif
make check make check %{?_smp_mflags}
%ldconfig_scriptlets libs %ldconfig_scriptlets libs
@ -514,11 +524,13 @@ make check
%doc AUTHORS ChangeLog NEWS README %doc AUTHORS ChangeLog NEWS README
%doc docs/*.xcf* %doc docs/*.xcf*
%{_datadir}/applications/*.desktop %{_datadir}/applications/*.desktop
%{_datadir}/appdata/*.appdata.xml %{_datadir}/metainfo/*.appdata.xml
%{_datadir}/metainfo/*.metainfo.xml
%dir %{_datadir}/gimp %dir %{_datadir}/gimp
%dir %{_datadir}/gimp/%{lib_api_version} %dir %{_datadir}/gimp/%{lib_api_version}
%{_datadir}/gimp/%{lib_api_version}/dynamics/ %{_datadir}/gimp/%{lib_api_version}/dynamics/
%{_datadir}/gimp/%{lib_api_version}/file-raw/
%{_datadir}/gimp/%{lib_api_version}/menus/ %{_datadir}/gimp/%{lib_api_version}/menus/
%{_datadir}/gimp/%{lib_api_version}/tags/ %{_datadir}/gimp/%{lib_api_version}/tags/
%{_datadir}/gimp/%{lib_api_version}/tips/ %{_datadir}/gimp/%{lib_api_version}/tips/
@ -530,8 +542,10 @@ make check
%dir %{_libdir}/gimp/%{lib_api_version}/interpreters %dir %{_libdir}/gimp/%{lib_api_version}/interpreters
%dir %{_libdir}/gimp/%{lib_api_version}/modules %dir %{_libdir}/gimp/%{lib_api_version}/modules
%dir %{_libdir}/gimp/%{lib_api_version}/plug-ins %dir %{_libdir}/gimp/%{lib_api_version}/plug-ins
%exclude %{_libdir}/gimp/%{lib_api_version}/plug-ins/help-browser
%dir %{_libdir}/gimp/%{lib_api_version}/python %dir %{_libdir}/gimp/%{lib_api_version}/python
%if %{with helpbrowser}
%exclude %{_libdir}/gimp/%{lib_api_version}/plug-ins/help-browser
%endif
%{_datadir}/gimp/%{lib_api_version}/brushes/ %{_datadir}/gimp/%{lib_api_version}/brushes/
%{_datadir}/gimp/%{lib_api_version}/fractalexplorer/ %{_datadir}/gimp/%{lib_api_version}/fractalexplorer/
@ -539,6 +553,7 @@ make check
%{_datadir}/gimp/%{lib_api_version}/gflare/ %{_datadir}/gimp/%{lib_api_version}/gflare/
%{_datadir}/gimp/%{lib_api_version}/gimpressionist/ %{_datadir}/gimp/%{lib_api_version}/gimpressionist/
%{_datadir}/gimp/%{lib_api_version}/gradients/ %{_datadir}/gimp/%{lib_api_version}/gradients/
%{_datadir}/gimp/%{lib_api_version}/icons/
%{_datadir}/gimp/%{lib_api_version}/images/ %{_datadir}/gimp/%{lib_api_version}/images/
%{_datadir}/gimp/%{lib_api_version}/palettes/ %{_datadir}/gimp/%{lib_api_version}/palettes/
%{_datadir}/gimp/%{lib_api_version}/patterns/ %{_datadir}/gimp/%{lib_api_version}/patterns/
@ -558,22 +573,29 @@ make check
%{_bindir}/gimp-%{binver} %{_bindir}/gimp-%{binver}
%{_bindir}/gimp-console-%{binver} %{_bindir}/gimp-console-%{binver}
%if %{with convenience} %if %{with default_binary}
%{_bindir}/gimp %{_bindir}/gimp
%{_bindir}/gimp-console %{_bindir}/gimp-console
%endif %endif
%{_libexecdir}/gimp-debug-tool-%{lib_api_version}
%{_mandir}/man1/gimp-%{binver}.1* %{_mandir}/man1/gimp-%{binver}.1*
%{_mandir}/man1/gimp-console-%{binver}.1* %{_mandir}/man1/gimp-console-%{binver}.1*
%{_mandir}/man5/gimprc-%{binver}.5* %{_mandir}/man5/gimprc-%{binver}.5*
%if %{with convenience} %if %{with default_binary}
%{_mandir}/man1/gimp.1* %{_mandir}/man1/gimp.1*
%{_mandir}/man1/gimp-console.1* %{_mandir}/man1/gimp-console.1*
%{_mandir}/man5/gimprc.5* %{_mandir}/man5/gimprc.5*
%endif %endif
%{_datadir}/icons/hicolor/*/apps/gimp.png %{_datadir}/icons/hicolor/*/apps/gimp.png
%if %unstable
%{os_bindir}/*-%{major}.%{minor}
%{os_datadir}/applications/gimp-%{major}.%{minor}.desktop
%{os_datadir}/icons/hicolor/*/apps/gimp-%{major}.%{minor}.png
%endif
%files libs %files libs
%license COPYING %license COPYING
@ -616,13 +638,15 @@ make check
%{_datadir}/aclocal/*.m4 %{_datadir}/aclocal/*.m4
%{_includedir}/gimp-%{lib_api_version} %{_includedir}/gimp-%{lib_api_version}
%{_libdir}/pkgconfig/* %{_libdir}/pkgconfig/*
%if ! %unstable
%{_rpmconfigdir}/macros.d/macros.gimp %{_rpmconfigdir}/macros.d/macros.gimp
%endif
%files devel-tools %files devel-tools
%{_bindir}/gimptool-%{lib_api_version} %{_bindir}/gimptool-%{lib_api_version}
%{_mandir}/man1/gimptool-%{lib_api_version}.1* %{_mandir}/man1/gimptool-%{lib_api_version}.1*
%if %{with convenience} %if %{with default_binary}
%{_bindir}/gimptool %{_bindir}/gimptool
%{_mandir}/man1/gimptool.1* %{_mandir}/man1/gimptool.1*
%endif %endif
@ -633,6 +657,15 @@ make check
%endif %endif
%changelog %changelog
* Sat Apr 28 2018 Nils Philippsen <nils@tiptoe.de> - 2:2.10.0-1
- version 2.10.0
- update dependency versions
- build with OpenEXR support
- build with webp support
- explicitly require perl for building
- remove obsolete build deps: gnome-keyring-devel, libgnomeui-devel
- don't run appdata test which requires network access
* Fri Mar 09 2018 Josef Ridky <jridky@redhat.com> - 2:2.8.22-6 * Fri Mar 09 2018 Josef Ridky <jridky@redhat.com> - 2:2.8.22-6
- remove unused gnome-keyring and libgnomeui-devel requirements - remove unused gnome-keyring and libgnomeui-devel requirements

View File

@ -1 +1 @@
SHA512 (gimp-2.8.22.tar.bz2) = 84a78d428282538b606b3cd1ff571e52c3d828fceade171b2012bc1cdcb85919fc7734e7e6c45ed3a8683657fa580412b32c1b511b8a512172a8c1df930493e6 SHA512 (gimp-2.10.0.tar.bz2) = a87cf5b3604addcf9d5e50f3d9d1acbbce8ed9e2a025e19bda37ce941acb471fa5e0fe8f71a74671581fce47aaa36a11b94dd96621465168630b97209d0d02fa