gimp-2.9.2-r2.ebuild 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit versionator virtualx autotools eutils gnome2 fdo-mime multilib python-single-r1
  6. DESCRIPTION="GNU Image Manipulation Program"
  7. HOMEPAGE="http://www.gimp.org/"
  8. SRC_URI="mirror://gimp/v$(get_version_component_range 1-2)/${P}.tar.bz2"
  9. LICENSE="GPL-3 LGPL-3"
  10. SLOT="2"
  11. KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
  12. 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"
  13. IUSE="alsa aalib altivec aqua debug doc openexr gnome postscript jpeg2k cpu_flags_x86_mmx mng pdf python smp cpu_flags_x86_sse svg tiff udev webkit wmf xpm"
  14. for lang in ${LANGS}; do
  15. IUSE+=" linguas_${lang}"
  16. done
  17. RDEPEND=">=dev-libs/glib-2.30.2:2
  18. >=dev-libs/atk-2.2.0
  19. >=x11-libs/gtk+-2.24.10:2
  20. dev-util/gtk-update-icon-cache
  21. >=x11-libs/gdk-pixbuf-2.31:2
  22. >=x11-libs/cairo-1.12.2
  23. >=x11-libs/pango-1.29.4
  24. xpm? ( x11-libs/libXpm )
  25. >=media-libs/freetype-2.1.7
  26. >=media-libs/harfbuzz-0.9.19
  27. >=media-libs/gexiv2-0.6.1
  28. >=media-libs/fontconfig-2.2.0
  29. sys-libs/zlib
  30. dev-libs/libxml2
  31. dev-libs/libxslt
  32. x11-themes/hicolor-icon-theme
  33. >=media-libs/babl-0.1.14
  34. >=media-libs/gegl-0.3.6:0.3[cairo]
  35. >=dev-libs/glib-2.43
  36. aalib? ( media-libs/aalib )
  37. alsa? ( media-libs/alsa-lib )
  38. aqua? ( x11-libs/gtk-mac-integration )
  39. gnome? ( gnome-base/gvfs )
  40. webkit? ( >=net-libs/webkit-gtk-1.6.1:2 )
  41. virtual/jpeg:0
  42. jpeg2k? ( media-libs/jasper:= )
  43. >=media-libs/lcms-2.2:2
  44. mng? ( media-libs/libmng )
  45. openexr? ( >=media-libs/openexr-1.6.1 )
  46. pdf? ( >=app-text/poppler-0.12.4[cairo] >=app-text/poppler-data-0.4.7 )
  47. >=media-libs/libpng-1.2.37:0
  48. python? (
  49. ${PYTHON_DEPS}
  50. >=dev-python/pygtk-2.10.4:2[${PYTHON_USEDEP}]
  51. )
  52. tiff? ( >=media-libs/tiff-3.5.7:0 )
  53. svg? ( >=gnome-base/librsvg-2.36.0:2 )
  54. wmf? ( >=media-libs/libwmf-0.2.8 )
  55. x11-libs/libXcursor
  56. sys-libs/zlib
  57. app-arch/bzip2
  58. >=app-arch/xz-utils-5.0.0
  59. postscript? ( app-text/ghostscript-gpl )
  60. udev? ( virtual/libgudev:= )"
  61. DEPEND="${RDEPEND}
  62. sys-apps/findutils
  63. virtual/pkgconfig
  64. >=dev-util/intltool-0.40.1
  65. >=sys-devel/gettext-0.19
  66. doc? ( >=dev-util/gtk-doc-1 )
  67. >=sys-devel/libtool-2.2
  68. >=sys-devel/automake-1.11
  69. dev-util/gtk-doc-am" # due to our call to eautoreconf below (bug #386453)
  70. DOCS="AUTHORS ChangeLog* HACKING NEWS README*"
  71. S="${WORKDIR}"/${P}
  72. REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
  73. pkg_setup() {
  74. G2CONF="--enable-default-binary \
  75. --disable-silent-rules \
  76. $(use_with !aqua x) \
  77. --without-libmypaint \
  78. $(use_with aalib aa) \
  79. $(use_with alsa) \
  80. $(use_enable altivec) \
  81. $(use_with webkit) \
  82. $(use_with jpeg2k libjasper) \
  83. $(use_with postscript gs) \
  84. $(use_enable cpu_flags_x86_mmx mmx) \
  85. $(use_with mng libmng) \
  86. $(use_with openexr) \
  87. $(use_with pdf poppler) \
  88. $(use_enable python) \
  89. $(use_enable smp mp) \
  90. $(use_enable cpu_flags_x86_sse sse) \
  91. $(use_with svg librsvg) \
  92. $(use_with tiff libtiff) \
  93. $(use_with udev gudev) \
  94. $(use_with wmf) \
  95. --with-xmc \
  96. $(use_with xpm libxpm) \
  97. --without-xvfb-run"
  98. if use python; then
  99. python-single-r1_pkg_setup
  100. fi
  101. }
  102. src_prepare() {
  103. epatch "${FILESDIR}"/${PN}-2.9.2-version.patch
  104. epatch "${FILESDIR}"/${PN}-2.9.2-no-deprecation.patch # bug 395695, comment 9 and 16
  105. epatch "${FILESDIR}"/${PN}-2.9.2-gegl-0.3.8.patch # bug 586828
  106. epatch "${FILESDIR}"/${P}-CVE-2016-4994.patch # bug 586666
  107. sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die #494864
  108. eautoreconf # If you remove this: remove dev-util/gtk-doc-am from DEPEND, too
  109. gnome2_src_prepare
  110. }
  111. src_configure() {
  112. gnome2_src_configure \
  113. GDBUS_CODEGEN=/bin/false
  114. }
  115. src_compile() {
  116. # Bugs #569738 and #591214
  117. local nv
  118. for nv in /dev/nvidia-uvm /dev/nvidiactl /dev/nvidia{0..9} ; do
  119. # We do not check for existence as they may show up later
  120. # https://bugs.gentoo.org/show_bug.cgi?id=569738#c21
  121. addwrite "${nv}"
  122. done
  123. addwrite /dev/dri/ # bug #574038
  124. addwrite /dev/ati/ # bug 589198
  125. addwrite /proc/mtrr # bug 589198
  126. export XDG_DATA_DIRS=/usr/share # bug 587004
  127. gnome2_src_compile
  128. }
  129. _clean_up_locales() {
  130. einfo "Cleaning up locales..."
  131. for lang in ${LANGS}; do
  132. use "linguas_${lang}" && {
  133. einfo "- keeping ${lang}"
  134. continue
  135. }
  136. rm -Rf "${ED}"/usr/share/locale/"${lang}" || die
  137. done
  138. }
  139. src_test() {
  140. Xemake check
  141. }
  142. src_install() {
  143. gnome2_src_install
  144. if use python; then
  145. python_optimize
  146. fi
  147. # Workaround for bug #321111 to give GIMP the least
  148. # precedence on PDF documents by default
  149. mv "${ED}"/usr/share/applications/{,zzz-}gimp.desktop || die
  150. prune_libtool_files --all
  151. # Prevent dead symlink gimp-console.1 from downstream man page compression (bug #433527)
  152. local gimp_app_version=$(get_version_component_range 1-2)
  153. mv "${ED}"/usr/share/man/man1/gimp-console{-${gimp_app_version},}.1 || die
  154. _clean_up_locales
  155. }
  156. pkg_postinst() {
  157. gnome2_pkg_postinst
  158. }
  159. pkg_postrm() {
  160. gnome2_pkg_postrm
  161. }