gimp-2.8.14-r3.ebuild 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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 bzip2 curl dbus debug doc exif gnome postscript jpeg jpeg2k lcms cpu_flags_x86_mmx mng pdf png python smp cpu_flags_x86_sse svg tiff udev 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. >=x11-libs/gdk-pixbuf-2.24.1:2
  21. >=x11-libs/cairo-1.10.2
  22. >=x11-libs/pango-1.29.4
  23. xpm? ( x11-libs/libXpm )
  24. >=media-libs/freetype-2.1.7
  25. >=media-libs/fontconfig-2.2.0
  26. sys-libs/zlib
  27. dev-libs/libxml2
  28. dev-libs/libxslt
  29. x11-themes/hicolor-icon-theme
  30. >=media-libs/babl-0.1.10
  31. >=media-libs/gegl-0.2.0:0
  32. aalib? ( media-libs/aalib )
  33. alsa? ( media-libs/alsa-lib )
  34. aqua? ( x11-libs/gtk-mac-integration )
  35. curl? ( net-misc/curl )
  36. dbus? ( dev-libs/dbus-glib )
  37. gnome? ( gnome-base/gvfs )
  38. jpeg? ( virtual/jpeg:0 )
  39. jpeg2k? ( media-libs/jasper:= )
  40. exif? ( >=media-libs/libexif-0.6.15 )
  41. lcms? ( >=media-libs/lcms-2.2:2 )
  42. mng? ( media-libs/libmng )
  43. pdf? ( >=app-text/poppler-0.12.4[cairo] )
  44. png? ( >=media-libs/libpng-1.2.37:0 )
  45. python? (
  46. ${PYTHON_DEPS}
  47. >=dev-python/pygtk-2.10.4:2[${PYTHON_USEDEP}]
  48. )
  49. tiff? ( >=media-libs/tiff-3.5.7:0 )
  50. svg? ( >=gnome-base/librsvg-2.36.0:2 )
  51. wmf? ( >=media-libs/libwmf-0.2.8 )
  52. x11-libs/libXcursor
  53. sys-libs/zlib
  54. bzip2? ( app-arch/bzip2 )
  55. postscript? ( app-text/ghostscript-gpl )
  56. udev? ( virtual/libgudev:= )"
  57. DEPEND="${RDEPEND}
  58. sys-apps/findutils
  59. virtual/pkgconfig
  60. >=dev-util/intltool-0.40.1
  61. >=sys-devel/gettext-0.19
  62. doc? ( >=dev-util/gtk-doc-1 )
  63. >=sys-devel/libtool-2.2
  64. >=sys-devel/automake-1.11
  65. dev-util/gtk-doc-am" # due to our call to eautoreconf below (bug #386453)
  66. DOCS="AUTHORS ChangeLog* HACKING NEWS README*"
  67. S="${WORKDIR}"/${P}
  68. REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
  69. pkg_setup() {
  70. G2CONF="--enable-default-binary \
  71. --disable-silent-rules \
  72. $(use_with !aqua x) \
  73. $(use_with aalib aa) \
  74. $(use_with alsa) \
  75. $(use_enable altivec) \
  76. $(use_with bzip2) \
  77. $(use_with curl libcurl) \
  78. $(use_with dbus) \
  79. $(use_with gnome gvfs) \
  80. --without-webkit \
  81. $(use_with jpeg libjpeg) \
  82. $(use_with jpeg2k libjasper) \
  83. $(use_with exif libexif) \
  84. $(use_with lcms lcms lcms2) \
  85. $(use_with postscript gs) \
  86. $(use_enable cpu_flags_x86_mmx mmx) \
  87. $(use_with mng libmng) \
  88. $(use_with pdf poppler) \
  89. $(use_with png libpng) \
  90. $(use_enable python) \
  91. $(use_enable smp mp) \
  92. $(use_enable cpu_flags_x86_sse sse) \
  93. $(use_with svg librsvg) \
  94. $(use_with tiff libtiff) \
  95. $(use_with udev gudev) \
  96. $(use_with wmf) \
  97. --with-xmc \
  98. $(use_with xpm libxpm) \
  99. --without-xvfb-run"
  100. if use python; then
  101. python-single-r1_pkg_setup
  102. fi
  103. }
  104. src_prepare() {
  105. epatch "${FILESDIR}"/${P}-blend-center.patch # bug 558878
  106. epatch "${FILESDIR}"/${PN}-2.7.4-no-deprecation.patch # bug 395695, comment 9 and 16
  107. epatch "${FILESDIR}"/${PN}-2.8.10-clang.patch # bug 449370 compile with clang
  108. epatch "${FILESDIR}"/${PN}-2.9.2-CVE-2016-4994.patch # bug 586666
  109. sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die #494864
  110. eautoreconf # If you remove this: remove dev-util/gtk-doc-am from DEPEND, too
  111. gnome2_src_prepare
  112. }
  113. _clean_up_locales() {
  114. einfo "Cleaning up locales..."
  115. for lang in ${LANGS}; do
  116. use "linguas_${lang}" && {
  117. einfo "- keeping ${lang}"
  118. continue
  119. }
  120. rm -Rf "${ED}"/usr/share/locale/"${lang}" || die
  121. done
  122. }
  123. src_test() {
  124. Xemake check
  125. }
  126. src_install() {
  127. gnome2_src_install
  128. if use python; then
  129. python_optimize
  130. fi
  131. # Workaround for bug #321111 to give GIMP the least
  132. # precedence on PDF documents by default
  133. mv "${ED}"/usr/share/applications/{,zzz-}gimp.desktop || die
  134. prune_libtool_files --all
  135. # Prevent dead symlink gimp-console.1 from downstream man page compression (bug #433527)
  136. local gimp_app_version=$(get_version_component_range 1-2)
  137. mv "${ED}"/usr/share/man/man1/gimp-console{-${gimp_app_version},}.1 || die
  138. _clean_up_locales
  139. }
  140. pkg_postinst() {
  141. gnome2_pkg_postinst
  142. }
  143. pkg_postrm() {
  144. gnome2_pkg_postrm
  145. }