diff --git a/gimp-2.4.0-xdg-open.patch b/gimp-2.4.0-xdg-open.patch new file mode 100644 index 0000000..d8b501c --- /dev/null +++ b/gimp-2.4.0-xdg-open.patch @@ -0,0 +1,24 @@ +diff -up gimp-2.4.0/app/config/gimpguiconfig.c.xdg-open gimp-2.4.0/app/config/gimpguiconfig.c +--- gimp-2.4.0/app/config/gimpguiconfig.c.xdg-open 2007-05-21 10:56:29.000000000 +0200 ++++ gimp-2.4.0/app/config/gimpguiconfig.c 2007-10-24 10:43:49.000000000 +0200 +@@ -40,7 +40,7 @@ + #ifdef G_OS_WIN32 + # define DEFAULT_WEB_BROWSER "not used on Windows" + #else +-# define DEFAULT_WEB_BROWSER "firefox %s" ++# define DEFAULT_WEB_BROWSER "xdg-open %s" + #endif + + +diff -up gimp-2.4.0/etc/gimprc.xdg-open gimp-2.4.0/etc/gimprc +--- gimp-2.4.0/etc/gimprc.xdg-open 2007-10-22 21:45:59.000000000 +0200 ++++ gimp-2.4.0/etc/gimprc 2007-10-24 10:43:58.000000000 +0200 +@@ -625,7 +625,7 @@ + # appended to the command with a space separating the two. This is a single + # filename. + # +-# (web-browser "firefox %s") ++# (web-browser "xdg-open %s") + + # The window type hint that is set on the toolbox. This may affect how your + # window manager decorates and handles the toolbox window. Possible values diff --git a/gimp.spec b/gimp.spec index f931bd4..44e3201 100644 --- a/gimp.spec +++ b/gimp.spec @@ -22,8 +22,10 @@ %if 0%{?fedora}%{?rhel} == 0 || 0%{?fedora} >= 7 || 0%{?rhel} >= 6 %define _enable_gutenprint 0%{!?_without_gutenprint:1} +%define _enable_xdg_open 0%{!?_without_xdg_open:1} %else %define _enable_gutenprint 0%{?_with_gutenprint:1} +%define _enable_xdg_open 0%{?_with_xdg_open:1} %endif %if 0%{?fedora}%{?rhel} == 0 || 0%{?fedora} >= 8 || 0%{?rhel} >= 6 @@ -32,6 +34,7 @@ %define _enable_print 0%{?_with_print:1} %endif +%if 0%{?fedora}%{?rhel} == 0 || 0%{?fedora} >= 7 || 0%{?rhel} >= 6 %define _enable_python 0%{!?_without_python:1} %define _enable_mp 0%{!?_without_mp:1} %define _enable_static 0%{!?_without_static:1} @@ -109,12 +112,18 @@ Requires: gimp-print-plugin %endif %endif Requires(post): /usr/bin/update-desktop-database -Requires(post): hicolor-icon-theme Requires(postun): /usr/bin/update-desktop-database -Requires(postun): hicolor-icon-theme +Requires: hicolor-icon-theme +%if %_enable_xdg_open +Requires: xdg-utils +%else +Requires: htmlview +%endif + Source0: ftp://ftp.gimp.org/pub/gimp/v%{binver}/gimp-%{version}.tar.bz2 Source1: gimp-plugin-mgr.in Patch0: gimp-2.3.18-htmlview.patch +Patch1: gimp-2.4.0-xdg-open.patch %description GIMP (GNU Image Manipulation Program) is a powerful image composition and @@ -165,7 +174,11 @@ include convenience symlinks: %_enable_convenience EOF %setup -q -n gimp-%{version} +%if %_enable_xdg_open +%patch1 -p1 -b .xdg-open +%else %patch0 -p1 -b .htmlview +%endif %build LIBAA="disable"; export LIBAA @@ -286,8 +299,8 @@ fi %post /usr/bin/update-desktop-database %{_datadir}/applications touch --no-create %{_datadir}/icons/hicolor -if [ -x /usr/bin/gtk-update-icon-cache ]; then - gtk-update-icon-cache -q %{_datadir}/icons/hicolor +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi # Then re-add the symlinks %{_sbindir}/gimp-plugin-mgr --install '*' || : @@ -303,8 +316,8 @@ if [ "$1" = "0" ]; then /usr/bin/update-desktop-database %{_datadir}/applications || : fi touch --no-create %{_datadir}/icons/hicolor -if [ -x /usr/bin/gtk-update-icon-cache ]; then - gtk-update-icon-cache -q %{_datadir}/icons/hicolor || : +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi %post libs -p /sbin/ldconfig @@ -429,6 +442,10 @@ fi %changelog * Wed Oct 24 2007 Nils Philippsen - 2:2.4.0-1 - version 2.4.0 +- use xdg-open instead of htmlview on Fedora 7 and later +- change hicolor-icon-theme requirement to be "uncolored" (without + "(post)"/"(postun)") +- don't let gtk-update-icon-cache fail scriptlets * Fri Sep 07 2007 Nils Philippsen - 2:2.4.0-0.rc3.2 - build internal print plugin, don't require external print plugins on Fedora 8