/[gentoo-x86]/media-gfx/gimp/gimp-2.6.12-r5.ebuild
Gentoo

Contents of /media-gfx/gimp/gimp-2.6.12-r5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations) (download)
Sat Sep 29 04:55:48 2012 UTC (18 months, 3 weeks ago) by blueness
Branch: MAIN
Changes since 1.5: +2 -2 lines
stable ppc, bug #434580

(Portage version: 2.1.11.9/cvs/Linux x86_64)

1 sping 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 blueness 1.6 # $Header: /var/cvsroot/gentoo-x86/media-gfx/gimp/gimp-2.6.12-r5.ebuild,v 1.5 2012/09/28 17:01:17 xarthisius Exp $
4 sping 1.1
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/${PN}-2.6.11-underlinking.patch.xz
15     mirror://gimp/v2.6/${P}.tar.bz2"
16    
17     LICENSE="GPL-2"
18     SLOT="2"
19 blueness 1.6 KEYWORDS="~alpha amd64 hppa ~ia64 ppc ppc64 ~sparc x86"
20 sping 1.1
21     LANGS="am ar ast az be bg ca ca@valencia cs da de dz el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja ka kk km kn ko lt lv mk ml mr ms my nb nds ne nl nn oc or pa pl pt pt_BR ro ru rw si sk sl sr sr@latin sv ta th tr tt uk vi xh yi zh_CN zh_HK zh_TW"
22     IUSE="alsa aalib altivec curl dbus debug doc exif gnome jpeg lcms mmx mng pdf png python smp sse svg tiff webkit wmf"
23    
24     for lang in ${LANGS}; do
25     IUSE+=" linguas_${lang}"
26     done
27    
28     RDEPEND="
29     >=dev-libs/glib-2.18.1:2
30     dev-libs/libxml2
31     dev-libs/libxslt
32     >=media-libs/fontconfig-2.2.0
33     >=media-libs/freetype-2.1.7
34     >=media-libs/gegl-0.0.22 <media-libs/gegl-0.2
35     >=x11-libs/gtk+-2.12.5:2
36     x11-libs/libXpm
37     >=x11-libs/pango-1.18.0
38     sys-libs/zlib
39     x11-themes/hicolor-icon-theme
40     aalib? ( media-libs/aalib )
41     alsa? ( media-libs/alsa-lib )
42     curl? ( net-misc/curl )
43     dbus? ( dev-libs/dbus-glib )
44     exif? ( >=media-libs/libexif-0.6.15 )
45     gnome? ( gnome-base/gvfs )
46     jpeg? ( virtual/jpeg:0 )
47     lcms? ( =media-libs/lcms-1* )
48     mng? ( media-libs/libmng )
49     pdf? ( >=app-text/poppler-0.12.3-r3[cairo] )
50     png? ( >=media-libs/libpng-1.2.2:0 )
51     python? ( >=dev-python/pygtk-2.10.4:2 )
52     svg? ( >=gnome-base/librsvg-2.8.0:2 )
53     tiff? ( >=media-libs/tiff-3.5.7:0 )
54     webkit? ( net-libs/webkit-gtk:2 )
55     wmf? ( >=media-libs/libwmf-0.2.8 )"
56     DEPEND="${RDEPEND}
57     >=dev-util/intltool-0.40
58     virtual/pkgconfig
59     >=sys-devel/gettext-0.17
60     doc? ( >=dev-util/gtk-doc-1 )"
61    
62     DOCS="AUTHORS ChangeLog* HACKING NEWS README*"
63    
64     pkg_setup() {
65     G2CONF="--enable-default-binary \
66     --with-x \
67     $(use_with aalib aa) \
68     $(use_with alsa) \
69     $(use_enable altivec) \
70     $(use_with curl libcurl) \
71     $(use_with dbus) \
72     --without-hal \
73     $(use_with gnome gvfs) \
74     --without-gnomevfs \
75     $(use_with webkit) \
76     $(use_with jpeg libjpeg) \
77     $(use_with exif libexif) \
78     $(use_with lcms) \
79     $(use_enable mmx) \
80     $(use_with mng libmng) \
81     $(use_with pdf poppler) \
82     $(use_with png libpng) \
83     $(use_enable python) \
84     $(use_enable smp mp) \
85     $(use_enable sse) \
86     $(use_with svg librsvg) \
87     $(use_with tiff libtiff) \
88     $(use_with wmf)"
89    
90     if use python; then
91     python_set_active_version 2
92     python_pkg_setup
93     fi
94     }
95    
96     src_prepare() {
97     # don't use empty, removed header
98     # https://bugs.gentoo.org/show_bug.cgi?id=377075
99     epatch "${FILESDIR}"/gimp-curl-headers.diff
100    
101     # apply file-uri patch by upstream
102     # https://bugs.gentoo.org/show_bug.cgi?id=372941
103     # https://bugzilla.gnome.org/show_bug.cgi?id=653980#c6
104     epatch "${FILESDIR}"/${PN}-2.6.11-file-uri.patch
105    
106     # fix test suite
107     # https://bugs.gentoo.org/show_bug.cgi?id=406625
108     epatch "${FILESDIR}"/${P}-potfiles-skip.patch
109    
110     # buffer overflow patch backport
111     # https://bugs.gentoo.org/show_bug.cgi?id=418425
112     epatch "${FILESDIR}"/${P}-CVE-2012-2763.patch
113    
114     # CEL and GIF plug-ins: Heap-based buffer overflows (CVE-2012-{3403,3481})
115     # https://bugs.gentoo.org/show_bug.cgi?id=434580
116     # Patches from Fedora <http://pkgs.fedoraproject.org/cgit/gimp.git/tree/?h=f16>
117     epatch "${FILESDIR}"/${P}-CVE-2012-3403.patch
118     epatch "${FILESDIR}"/${P}-CVE-2012-3481.patch
119    
120     # DoS via .fit files (CVE-2012-3236)
121     # https://bugs.gentoo.org/show_bug.cgi?id=428708
122     # https://bugzilla.gnome.org/show_bug.cgi?id=676804
123     epatch "${FILESDIR}"/${P}-CVE-2012-3236.patch
124    
125     echo '#!/bin/sh' > py-compile
126     gnome2_src_prepare
127     }
128    
129     _clean_up_locales() {
130     elog "Cleaning up locales..."
131     for lang in ${LANGS}; do
132     use "linguas_${lang}" && {
133     elog "- keeping ${lang}"
134     continue
135     }
136     rm -Rf "${D}"/usr/share/locale/"${lang}" || die
137     done
138     }
139    
140     src_install() {
141     gnome2_src_install
142    
143     if use python; then
144     python_convert_shebangs -r $(python_get_version) "${ED}"
145     python_need_rebuild
146     fi
147    
148     # Workaround for bug #321111 to give GIMP the least
149     # precedence on PDF documents by default
150     mv "${D}"/usr/share/applications/{,zzz-}gimp.desktop || die
151    
152     find "${D}" -name '*.la' -delete || die
153    
154     _clean_up_locales
155     }
156    
157     pkg_postinst() {
158     gnome2_pkg_postinst
159    
160     use python && python_mod_optimize /usr/$(get_libdir)/gimp/2.0/python \
161     /usr/$(get_libdir)/gimp/2.0/plug-ins
162     }
163    
164     pkg_postrm() {
165     gnome2_pkg_postrm
166    
167     use python && python_mod_cleanup /usr/$(get_libdir)/gimp/2.0/python \
168     /usr/$(get_libdir)/gimp/2.0/plug-ins
169     }

  ViewVC Help
Powered by ViewVC 1.1.20