1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 )
7 inherit versionator virtualx autotools eutils gnome2 multilib python-single-r1
9 DESCRIPTION="GNU Image Manipulation Program"
10 HOMEPAGE="https://www.gimp.org/"
11 SRC_URI="mirror://gimp/v$(get_version_component_range 1-2)/${P}.tar.bz2"
12 LICENSE="GPL-3 LGPL-3"
14 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc64 ~x86"
16 LANGS="am ar ast az be bg br ca ca@valencia cs csb 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 ms my nb nds ne nl nn oc pa pl pt pt_BR ro ru rw si sk sl sr sr@latin sv ta te th tr tt uk vi xh yi zh_CN zh_HK zh_TW"
17 IUSE="alsa aalib altivec aqua debug doc openexr gnome postscript jpeg2k cpu_flags_x86_mmx mng pdf python smp cpu_flags_x86_sse udev vector-icons webp wmf xpm"
19 for lang in ${LANGS}; do
20 IUSE+=" linguas_${lang}"
23 RDEPEND=">=dev-libs/glib-2.40.0:2
25 >=x11-libs/gtk+-2.24.10:2
26 dev-util/gtk-update-icon-cache
27 >=x11-libs/gdk-pixbuf-2.31:2
28 >=x11-libs/cairo-1.12.2
29 >=x11-libs/pango-1.29.4
30 xpm? ( x11-libs/libXpm )
31 >=media-libs/freetype-2.1.7
32 >=media-libs/harfbuzz-0.9.19
33 >=media-libs/gexiv2-0.10.6
34 >=media-libs/libmypaint-1.3.0[gegl]
35 >=media-libs/fontconfig-2.2.0
39 x11-themes/hicolor-icon-theme
40 >=media-libs/babl-0.1.30
41 >=media-libs/gegl-0.3.20:0.3[cairo]
43 aalib? ( media-libs/aalib )
44 alsa? ( media-libs/alsa-lib )
45 aqua? ( x11-libs/gtk-mac-integration )
46 gnome? ( gnome-base/gvfs )
48 jpeg2k? ( media-libs/jasper:= )
49 >=media-libs/lcms-2.7:2
50 mng? ( media-libs/libmng )
51 openexr? ( >=media-libs/openexr-1.6.1 )
52 pdf? ( >=app-text/poppler-0.44[cairo] >=app-text/poppler-data-0.4.7 )
53 >=media-libs/libpng-1.6.25:0
56 >=dev-python/pygtk-2.10.4:2[${PYTHON_USEDEP}]
57 >=dev-python/pycairo-1.0.2[${PYTHON_USEDEP}]
59 >=media-libs/tiff-3.5.7:0
60 >=gnome-base/librsvg-2.40.6:2
61 webp? ( >=media-libs/libwebp-0.6.0 )
62 wmf? ( >=media-libs/libwmf-0.2.8 )
63 net-libs/glib-networking[ssl]
67 >=app-arch/xz-utils-5.0.0
68 postscript? ( app-text/ghostscript-gpl )
69 udev? ( virtual/libgudev:= )"
73 >=dev-util/intltool-0.40.1
74 >=sys-devel/gettext-0.19
75 doc? ( >=dev-util/gtk-doc-1 )
76 >=sys-devel/libtool-2.2
77 >=sys-devel/automake-1.11
78 dev-util/gtk-doc-am" # due to our call to eautoreconf below (bug #386453)
80 DOCS="AUTHORS ChangeLog* HACKING NEWS README*"
82 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
86 python-single-r1_pkg_setup
91 eapply "${FILESDIR}"/${P}-underlinking.patch # from 629304
94 sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die #494864
95 sed 's:-DGIMP_DISABLE_DEPRECATED:-DGIMP_protect_DISABLE_DEPRECATED:g' -i configure.ac || die #615144
96 eautoreconf # If you remove this: remove dev-util/gtk-doc-am from DEPEND, too
100 sed 's:-DGIMP_protect_DISABLE_DEPRECATED:-DGIMP_DISABLE_DEPRECATED:g' -i configure || die #615144
101 fgrep -q GIMP_DISABLE_DEPRECATED configure || die #615144, self-test
106 GEGL=${EPREFIX}/usr/bin/gegl-0.3
107 GDBUS_CODEGEN=${EPREFIX}/bin/false
109 --enable-default-binary
110 --disable-silent-rules
115 $(use_enable altivec)
118 $(use_with jpeg2k libjasper)
119 $(use_with postscript gs)
120 $(use_enable cpu_flags_x86_mmx mmx)
121 $(use_with mng libmng)
124 $(use_with pdf poppler)
127 $(use_enable cpu_flags_x86_sse sse)
128 $(use_with udev gudev)
131 $(use_with xpm libxpm)
132 $(use_enable vector-icons)
136 gnome2_src_configure "${myconf[@]}"
140 # Bugs #569738 and #591214
142 for nv in /dev/nvidia-uvm /dev/nvidiactl /dev/nvidia{0..9} ; do
143 # We do not check for existence as they may show up later
144 # https://bugs.gentoo.org/show_bug.cgi?id=569738#c21
147 addwrite /dev/dri/ # bug #574038
148 addwrite /dev/ati/ # bug 589198
149 addwrite /proc/mtrr # bug 589198
151 export XDG_DATA_DIRS=${EPREFIX}/usr/share # bug 587004
155 _clean_up_locales() {
156 einfo "Cleaning up locales..."
157 for lang in ${LANGS}; do
158 use "linguas_${lang}" && {
159 einfo "- keeping ${lang}"
162 rm -Rf "${ED}"/usr/share/locale/"${lang}" || die
177 # Workaround for bug #321111 to give GIMP the least
178 # precedence on PDF documents by default
179 mv "${ED}"/usr/share/applications/{,zzz-}gimp.desktop || die
181 prune_libtool_files --all
183 # Prevent dead symlink gimp-console.1 from downstream man page compression (bug #433527)
184 local gimp_app_version=$(get_version_component_range 1-2)
185 mv "${ED}"/usr/share/man/man1/gimp-console{-${gimp_app_version},}.1 || die