From: Sebastian Pipping Date: Fri, 2 Sep 2011 17:39:02 +0000 (+0000) Subject: media-gfx/gimp: Apply file-uri patch by upstream (bug #372941) X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=2b5cc1a2301cb1f8428ce198d5dd8d5babbc01fa;p=gentoo.git media-gfx/gimp: Apply file-uri patch by upstream (bug #372941) Package-Manager: portage-2.1.10.11/cvs/Linux x86_64 --- diff --git a/media-gfx/gimp/ChangeLog b/media-gfx/gimp/ChangeLog index a09653c6bd9f..e29d78b626df 100644 --- a/media-gfx/gimp/ChangeLog +++ b/media-gfx/gimp/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-gfx/gimp # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/gimp/ChangeLog,v 1.333 2011/09/02 15:58:38 sping Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/gimp/ChangeLog,v 1.334 2011/09/02 17:39:01 sping Exp $ + +*gimp-2.6.11-r3 (02 Sep 2011) + + 02 Sep 2011; Sebastian Pipping +gimp-2.6.11-r3.ebuild, + +files/gimp-2.6.11-file-uri.patch: + Apply file-uri patch by upstream (bug #372941) 02 Sep 2011; Sebastian Pipping gimp-2.7.3.ebuild, gimp-9999.ebuild: diff --git a/media-gfx/gimp/Manifest b/media-gfx/gimp/Manifest index cba2df187868..2aad7fa6dce6 100644 --- a/media-gfx/gimp/Manifest +++ b/media-gfx/gimp/Manifest @@ -1,6 +1,7 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 +AUX gimp-2.6.11-file-uri.patch 2209 RMD160 17cd5c7b454e7f64f7ed50cec4d9fe160ce7f2fc SHA1 77b3f6f50934a70f2ac938cfa0a1876ee72c2d14 SHA256 cb9da632417fcc866c047104cfbe25b5b9964fa5e65e333c042fdf23c19e692f AUX gimp-2.7.3-glib-2.29.patch 478 RMD160 24895c62b2ad03247a8bc47d79cd55059188b283 SHA1 c4b8719c7904f4b1349e40ca1e409367a9f5997a SHA256 76a2bac5fbcaacbef592e6c137e12b72320f38224c3c9a717b82f6c34404bbdc AUX gimp-CVE-2010-4540-to-4543.diff 5678 RMD160 0947a979ae64b2520967a6e8c3493aa37e425c3d SHA1 9b9cae60c775d4312552434373618c6cb9188e3e SHA256 b1fb9d83959cfc8e7a1ebf5d8812454686d618463010bbc0e802a1476e58305f AUX gimp-curl-headers.diff 358 RMD160 b3c5d4120a203280ae9625a11de0ff5d3330dbc3 SHA1 46f694eb7d01a9d952e5651bb8c2ec22c62ccbd4 SHA256 34c706af2ba690be90ef6d0f68fef552b90fdf3a6ff0290e7d5fc02024b76b6f @@ -10,14 +11,15 @@ DIST gimp-2.6.11.tar.bz2 16473561 RMD160 a116377499e58dc2bfe231ab3c057d0be94091f DIST gimp-2.7.3.tar.bz2 18206530 RMD160 5740b1b62b0fca255d0ca046477c21ab9c57a5ca SHA1 bea6edc3423774ace8dd86222314f4ef2278cdd8 SHA256 669811e66c6a5dffdca0df3f39f699b3a013aa5634447d9b90268f4068a8a4d9 EBUILD gimp-2.6.11-r1.ebuild 3248 RMD160 324ff1505eeed9d839cc9695df3289dff0e5bf6e SHA1 b163b4ce5567abeb087b4f50eb4bfc2bb431a040 SHA256 07c2eafd3ce4e49f05a7b154b30be3f40a069e6617e1538c5e97d901dc424925 EBUILD gimp-2.6.11-r2.ebuild 3259 RMD160 0f869b84f27b578b0c50da27545afc724ec236fc SHA1 4159ab5be4c896576ab9ca18d5b68b544665d23a SHA256 437a9aeff3e6c03814f0ce2912b8037e2005876aee294be79804a7765aa29180 +EBUILD gimp-2.6.11-r3.ebuild 3442 RMD160 6c00cf7623c95dd96c2ff7ff4dbc20b85f0626ee SHA1 78a5a60ff16cbe6b60db16c141ad5c330247ab68 SHA256 8ef54a8f1812a0f951c621c1adfc556629c65cd151411679bb197a9202a3c406 EBUILD gimp-2.7.3.ebuild 3230 RMD160 6b38a0a065ec8425f8a4f148091d9592654df883 SHA1 ac744bc74f5f667dde7f81b51c2119e417bf2f8c SHA256 7158983e329c36765e33024aef0559640ea49a9f1e6bcca25508129d7663a2e4 EBUILD gimp-9999.ebuild 3443 RMD160 b8468c1dd4625ab3267f66af056eac8a89596c53 SHA1 010d83b218f0ae999a81e683ea0e4ededf0fed00 SHA256 464b8c58ff4a11584d3eda30aa2c18be662e94a0cd7edac9532fc7b6e56cca4d -MISC ChangeLog 45583 RMD160 95013ebf90c1b9992d1823d49c0b075ec4825df1 SHA1 56f642d106ace582fd9b45b045f755ddb0b84631 SHA256 6ca8fff6e0649fbf05aae9c1ece863138d085f81223d45e5b8791fd8e657799c +MISC ChangeLog 45777 RMD160 cea66fd7ad7dcaab4c7f572d8877f7eea53ac9b3 SHA1 d75007c37a2ba6c0266d9a2356b32d6b313219f4 SHA256 1235c767f3bc38f4ff73f6f923ceeff70b9368efc5f3263a73fd42c17b0fda0f MISC metadata.xml 366 RMD160 5ae566a82314bb47784051f6ca13fc1a9ecd137e SHA1 dce399814102ba9802439497439e2e00ecc3b82e SHA256 380bccccb72b527f81e02fd37b41b584316fcd7c802b959b8eae27fcef0c0db5 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) -iEYEARECAAYFAk5g/TEACgkQsAvGakAaFgDIxwCffboULhE34N8Wxz52AgnpCxpd -2xgAoMrDc89fU+AW2J42fpV2Wc6Xe8aC -=aDnY +iEYEARECAAYFAk5hFLIACgkQsAvGakAaFgDLkgCbB2GmPmbPxXMwe1PYrc0YTKqG +KoAAoKiJQZHr3WyUwUi2/omal+sQVmBo +=dNRa -----END PGP SIGNATURE----- diff --git a/media-gfx/gimp/files/gimp-2.6.11-file-uri.patch b/media-gfx/gimp/files/gimp-2.6.11-file-uri.patch new file mode 100644 index 000000000000..2d3f161e064b --- /dev/null +++ b/media-gfx/gimp/files/gimp-2.6.11-file-uri.patch @@ -0,0 +1,79 @@ +--- plug-ins/file-uri/uri-backend-libcurl.c.orig 2011-09-01 09:06:13.307741499 -0500 ++++ plug-ins/file-uri/uri-backend-libcurl.c 2011-09-01 09:09:09.066152187 -0500 +@@ -62,7 +62,7 @@ + + vinfo = curl_version_info (CURLVERSION_NOW); + +- protocols = g_string_new ("http:,ftp:"); ++ protocols = g_string_new ("http:,ftp:,gopher:"); + + if (vinfo->features & CURL_VERSION_SSL) + { +@@ -153,6 +153,11 @@ + CURL *curl_handle; + CURLcode result; + gint response_code; ++ gchar *eff_url = NULL; ++ gchar *proto = NULL; ++ gboolean is_http = FALSE; ++ gboolean is_ftp = FALSE; ++ gboolean is_gopher = FALSE; + + gimp_progress_init (_("Connecting to server")); + +@@ -194,13 +199,52 @@ + + curl_easy_getinfo (curl_handle, CURLINFO_RESPONSE_CODE, &response_code); + +- if (response_code != 200) ++ /* protocol could be not specified in provided uri ++ get complete url guessed by curl */ ++ curl_easy_getinfo (curl_handle, CURLINFO_EFFECTIVE_URL, &eff_url); ++ ++ /* detect uri protocol */ ++ if (! g_ascii_strncasecmp (eff_url, "http://", 7)) ++ { ++ is_http = TRUE; ++ proto = "HTTP"; ++ } ++ else ++ if (! g_ascii_strncasecmp (eff_url, "https://", 8)) ++ { ++ is_http = TRUE; ++ proto = "HTTPS"; ++ } ++ else ++ if (! g_ascii_strncasecmp (eff_url, "ftp://", 6)) ++ { ++ is_ftp = TRUE; ++ proto = "FTP"; ++ } ++ else ++ if (! g_ascii_strncasecmp (eff_url, "ftps://", 7)) ++ { ++ is_ftp = TRUE; ++ proto = "FTPS"; ++ } ++ else ++ if (! g_ascii_strncasecmp (eff_url ,"gopher://", 9)) ++ { ++ is_gopher = TRUE; ++ proto = "GOPHER"; ++ } ++ else ++ { ++ proto = "UNKNOWN"; ++ } ++ ++ if (! ((is_http && response_code == 200) || (is_ftp && response_code == 226) || (is_gopher))) + { + fclose (out_file); + g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED, +- _("Opening '%s' for reading resulted in HTTP " ++ _("Opening '%s' for reading resulted in %s " + "response code: %d"), +- uri, response_code); ++ uri, proto, response_code); + curl_easy_cleanup (curl_handle); + return FALSE; + } diff --git a/media-gfx/gimp/gimp-2.6.11-r3.ebuild b/media-gfx/gimp/gimp-2.6.11-r3.ebuild new file mode 100644 index 000000000000..54d02fea17e1 --- /dev/null +++ b/media-gfx/gimp/gimp-2.6.11-r3.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/gimp/gimp-2.6.11-r3.ebuild,v 1.1 2011/09/02 17:39:02 sping Exp $ + +EAPI="3" +PYTHON_DEPEND="python? 2:2.5" + +inherit eutils gnome2 fdo-mime multilib python + +DESCRIPTION="GNU Image Manipulation Program" +HOMEPAGE="http://www.gimp.org/" +SRC_URI="mirror://gimp/v2.6/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="2" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" + +IUSE="alsa aalib altivec curl dbus debug doc exif gnome jpeg lcms mmx mng pdf png python smp sse svg tiff webkit wmf" + +RDEPEND=">=dev-libs/glib-2.18.1:2 + >=x11-libs/gtk+-2.12.5:2 + >=x11-libs/pango-1.18.0 + x11-libs/libXpm + >=media-libs/freetype-2.1.7 + >=media-libs/fontconfig-2.2.0 + sys-libs/zlib + dev-libs/libxml2 + dev-libs/libxslt + x11-misc/xdg-utils + x11-themes/hicolor-icon-theme + >=media-libs/gegl-0.0.22 + aalib? ( media-libs/aalib ) + alsa? ( media-libs/alsa-lib ) + curl? ( net-misc/curl ) + dbus? ( dev-libs/dbus-glib ) + gnome? ( gnome-base/gvfs ) + webkit? ( net-libs/webkit-gtk:2 ) + jpeg? ( virtual/jpeg:0 ) + exif? ( >=media-libs/libexif-0.6.15 ) + lcms? ( =media-libs/lcms-1* ) + mng? ( media-libs/libmng ) + pdf? ( >=app-text/poppler-0.12.3-r3[cairo] ) + png? ( >=media-libs/libpng-1.2.2:0 ) + python? ( >=dev-python/pygtk-2.10.4:2 ) + tiff? ( >=media-libs/tiff-3.5.7 ) + svg? ( >=gnome-base/librsvg-2.8.0:2 ) + wmf? ( >=media-libs/libwmf-0.2.8 )" +DEPEND="${RDEPEND} + >=dev-util/pkgconfig-0.12.0 + >=dev-util/intltool-0.40 + >=sys-devel/gettext-0.17 + doc? ( >=dev-util/gtk-doc-1 )" + +DOCS="AUTHORS ChangeLog* HACKING NEWS README*" + +pkg_setup() { + G2CONF="--enable-default-binary \ + --with-x \ + $(use_with aalib aa) \ + $(use_with alsa) \ + $(use_enable altivec) \ + $(use_with curl libcurl) \ + $(use_with dbus) \ + --without-hal \ + $(use_with gnome gvfs) \ + --without-gnomevfs \ + $(use_with webkit) \ + $(use_with jpeg libjpeg) \ + $(use_with exif libexif) \ + $(use_with lcms) \ + $(use_enable mmx) \ + $(use_with mng libmng) \ + $(use_with pdf poppler) \ + $(use_with png libpng) \ + $(use_enable python) \ + $(use_enable smp mp) \ + $(use_enable sse) \ + $(use_with svg librsvg) \ + $(use_with tiff libtiff) \ + $(use_with wmf)" + + if use python; then + python_set_active_version 2 + python_pkg_setup + fi +} + +src_prepare() { + # security fixes from upstream, see + # https://bugzilla.gnome.org/show_bug.cgi?id=639203 + epatch "${FILESDIR}"/gimp-CVE-2010-4540-to-4543.diff + + # fixes for libpng 1.5 (incomplete), see + # https://bugzilla.gnome.org/show_bug.cgi?id=640409 + epatch "${FILESDIR}"/gimp-libpng15-v2.diff + + # don't use empty, removed header + # https://bugs.gentoo.org/show_bug.cgi?id=377075 + epatch "${FILESDIR}"/gimp-curl-headers.diff + + # apply file-uri patch by upstream + # https://bugs.gentoo.org/show_bug.cgi?id=372941 + # https://bugzilla.gnome.org/show_bug.cgi?id=653980#c6 + epatch "${FILESDIR}"/${P}-file-uri.patch + + echo '#!/bin/sh' > py-compile + gnome2_src_prepare +} + +src_install() { + gnome2_src_install + + if use python; then + python_convert_shebangs -r $(python_get_version) "${ED}" + python_need_rebuild + fi +} + +pkg_postinst() { + gnome2_pkg_postinst + + use python && python_mod_optimize /usr/$(get_libdir)/gimp/2.0/python \ + /usr/$(get_libdir)/gimp/2.0/plug-ins +} + +pkg_postrm() { + gnome2_pkg_postrm + + use python && python_mod_cleanup /usr/$(get_libdir)/gimp/2.0/python \ + /usr/$(get_libdir)/gimp/2.0/plug-ins +}