| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/media-gfx/gimp/gimp-2.6.11-r6.ebuild,v 1.4 2012/05/05 07:00:18 jdhore Exp $
|
| 4 |
|
| 5 |
EAPI="3"
|
| 6 |
|
| 7 |
PYTHON_DEPEND="python? 2:2.5"
|
| 8 |
|
| 9 |
inherit eutils gnome2 fdo-mime multilib python
|
| 10 |
|
| 11 |
DESCRIPTION="GNU Image Manipulation Program"
|
| 12 |
HOMEPAGE="http://www.gimp.org/"
|
| 13 |
SRC_URI="
|
| 14 |
http://dev.gentoo.org/~jlec/distfiles/${P}-underlinking.patch.xz
|
| 15 |
mirror://gimp/v2.6/${P}.tar.bz2"
|
| 16 |
|
| 17 |
LICENSE="GPL-2"
|
| 18 |
SLOT="2"
|
| 19 |
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
| 20 |
|
| 21 |
IUSE="alsa aalib altivec curl dbus debug doc exif gnome jpeg lcms mmx mng pdf png python smp sse svg tiff webkit wmf"
|
| 22 |
|
| 23 |
RDEPEND="
|
| 24 |
>=dev-libs/glib-2.18.1:2
|
| 25 |
dev-libs/libxml2
|
| 26 |
dev-libs/libxslt
|
| 27 |
>=media-libs/fontconfig-2.2.0
|
| 28 |
>=media-libs/freetype-2.1.7
|
| 29 |
>=media-libs/gegl-0.0.22 <media-libs/gegl-0.2
|
| 30 |
>=x11-libs/gtk+-2.12.5:2
|
| 31 |
x11-libs/libXpm
|
| 32 |
>=x11-libs/pango-1.18.0
|
| 33 |
sys-libs/zlib
|
| 34 |
x11-themes/hicolor-icon-theme
|
| 35 |
aalib? ( media-libs/aalib )
|
| 36 |
alsa? ( media-libs/alsa-lib )
|
| 37 |
curl? ( net-misc/curl )
|
| 38 |
dbus? ( dev-libs/dbus-glib )
|
| 39 |
exif? ( >=media-libs/libexif-0.6.15 )
|
| 40 |
gnome? ( gnome-base/gvfs )
|
| 41 |
jpeg? ( virtual/jpeg:0 )
|
| 42 |
lcms? ( =media-libs/lcms-1* )
|
| 43 |
mng? ( media-libs/libmng )
|
| 44 |
pdf? ( >=app-text/poppler-0.12.3-r3[cairo] )
|
| 45 |
png? ( >=media-libs/libpng-1.2.2:0 )
|
| 46 |
python? ( >=dev-python/pygtk-2.10.4:2 )
|
| 47 |
svg? ( >=gnome-base/librsvg-2.8.0:2 )
|
| 48 |
tiff? ( >=media-libs/tiff-3.5.7:0 )
|
| 49 |
webkit? ( net-libs/webkit-gtk:2 )
|
| 50 |
wmf? ( >=media-libs/libwmf-0.2.8 )"
|
| 51 |
DEPEND="${RDEPEND}
|
| 52 |
>=dev-util/intltool-0.40
|
| 53 |
virtual/pkgconfig
|
| 54 |
>=sys-devel/gettext-0.17
|
| 55 |
doc? ( >=dev-util/gtk-doc-1 )"
|
| 56 |
|
| 57 |
DOCS="AUTHORS ChangeLog* HACKING NEWS README*"
|
| 58 |
|
| 59 |
pkg_setup() {
|
| 60 |
G2CONF="--enable-default-binary \
|
| 61 |
--with-x \
|
| 62 |
$(use_with aalib aa) \
|
| 63 |
$(use_with alsa) \
|
| 64 |
$(use_enable altivec) \
|
| 65 |
$(use_with curl libcurl) \
|
| 66 |
$(use_with dbus) \
|
| 67 |
--without-hal \
|
| 68 |
$(use_with gnome gvfs) \
|
| 69 |
--without-gnomevfs \
|
| 70 |
$(use_with webkit) \
|
| 71 |
$(use_with jpeg libjpeg) \
|
| 72 |
$(use_with exif libexif) \
|
| 73 |
$(use_with lcms) \
|
| 74 |
$(use_enable mmx) \
|
| 75 |
$(use_with mng libmng) \
|
| 76 |
$(use_with pdf poppler) \
|
| 77 |
$(use_with png libpng) \
|
| 78 |
$(use_enable python) \
|
| 79 |
$(use_enable smp mp) \
|
| 80 |
$(use_enable sse) \
|
| 81 |
$(use_with svg librsvg) \
|
| 82 |
$(use_with tiff libtiff) \
|
| 83 |
$(use_with wmf)"
|
| 84 |
|
| 85 |
if use python; then
|
| 86 |
python_set_active_version 2
|
| 87 |
python_pkg_setup
|
| 88 |
fi
|
| 89 |
}
|
| 90 |
|
| 91 |
src_prepare() {
|
| 92 |
# security fixes from upstream, see
|
| 93 |
# https://bugzilla.gnome.org/show_bug.cgi?id=639203
|
| 94 |
epatch "${FILESDIR}"/gimp-CVE-2010-4540-to-4543.diff
|
| 95 |
|
| 96 |
# security fix from upstream, see
|
| 97 |
# https://bugs.gentoo.org/show_bug.cgi?id=379289
|
| 98 |
epatch "${FILESDIR}"/${P}-cve-2011-2896.patch
|
| 99 |
|
| 100 |
# fixes for libpng 1.5 (incomplete), see
|
| 101 |
# https://bugzilla.gnome.org/show_bug.cgi?id=640409
|
| 102 |
epatch "${FILESDIR}"/gimp-libpng15-v2.diff
|
| 103 |
|
| 104 |
# don't use empty, removed header
|
| 105 |
# https://bugs.gentoo.org/show_bug.cgi?id=377075
|
| 106 |
epatch "${FILESDIR}"/gimp-curl-headers.diff
|
| 107 |
|
| 108 |
# apply file-uri patch by upstream
|
| 109 |
# https://bugs.gentoo.org/show_bug.cgi?id=372941
|
| 110 |
# https://bugzilla.gnome.org/show_bug.cgi?id=653980#c6
|
| 111 |
epatch "${FILESDIR}"/${P}-file-uri.patch
|
| 112 |
|
| 113 |
# fix compilation against poppler 0.17/0.18
|
| 114 |
# https://bugs.gentoo.org/show_bug.cgi?id=384903
|
| 115 |
epatch "${FILESDIR}"/${P}-poppler-0.17.patch
|
| 116 |
|
| 117 |
# fix underlinking detected by usage of gold linker
|
| 118 |
# https://bugs.gentoo.org/show_bug.cgi?id=367605
|
| 119 |
epatch "${WORKDIR}"/${P}-underlinking.patch
|
| 120 |
|
| 121 |
echo '#!/bin/sh' > py-compile
|
| 122 |
gnome2_src_prepare
|
| 123 |
}
|
| 124 |
|
| 125 |
src_install() {
|
| 126 |
gnome2_src_install
|
| 127 |
|
| 128 |
if use python; then
|
| 129 |
python_convert_shebangs -r $(python_get_version) "${ED}"
|
| 130 |
python_need_rebuild
|
| 131 |
fi
|
| 132 |
|
| 133 |
# Workaround for bug #321111 to give GIMP the least
|
| 134 |
# precedence on PDF documents by default
|
| 135 |
mv "${D}"/usr/share/applications/{,zzz-}gimp.desktop || die
|
| 136 |
}
|
| 137 |
|
| 138 |
pkg_postinst() {
|
| 139 |
gnome2_pkg_postinst
|
| 140 |
|
| 141 |
use python && python_mod_optimize /usr/$(get_libdir)/gimp/2.0/python \
|
| 142 |
/usr/$(get_libdir)/gimp/2.0/plug-ins
|
| 143 |
}
|
| 144 |
|
| 145 |
pkg_postrm() {
|
| 146 |
gnome2_pkg_postrm
|
| 147 |
|
| 148 |
use python && python_mod_cleanup /usr/$(get_libdir)/gimp/2.0/python \
|
| 149 |
/usr/$(get_libdir)/gimp/2.0/plug-ins
|
| 150 |
}
|