gimp-9999.ebuild 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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 virtualx autotools eutils gnome2 fdo-mime multilib python-single-r1 git-r3
  6. EGIT_REPO_URI="git://git.gnome.org/gimp"
  7. DESCRIPTION="GNU Image Manipulation Program"
  8. HOMEPAGE="http://www.gimp.org/"
  9. SRC_URI=""
  10. LICENSE="GPL-3 LGPL-3"
  11. SLOT="2"
  12. KEYWORDS=""
  13. 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"
  14. IUSE="alsa aalib altivec aqua debug doc openexr gnome postscript jpeg2k cpu_flags_x86_mmx mng pdf python smp cpu_flags_x86_sse udev wmf xpm"
  15. for lang in ${LANGS}; do
  16. IUSE+=" linguas_${lang}"
  17. done
  18. RDEPEND=">=dev-libs/glib-2.40.0:2
  19. >=dev-libs/atk-2.2.0
  20. >=x11-libs/gtk+-2.24.10:2
  21. dev-util/gtk-update-icon-cache
  22. >=x11-libs/gdk-pixbuf-2.31:2
  23. >=x11-libs/cairo-1.12.2
  24. >=x11-libs/pango-1.29.4
  25. xpm? ( x11-libs/libXpm )
  26. >=media-libs/freetype-2.1.7
  27. >=media-libs/harfbuzz-0.9.19
  28. >=media-libs/gexiv2-0.6.1
  29. >=media-libs/fontconfig-2.2.0
  30. sys-libs/zlib
  31. dev-libs/libxml2
  32. dev-libs/libxslt
  33. x11-themes/hicolor-icon-theme
  34. >=media-libs/babl-0.1.14
  35. >=media-libs/gegl-0.3.4:0.3[cairo]
  36. >=dev-libs/glib-2.43
  37. aalib? ( media-libs/aalib )
  38. alsa? ( media-libs/alsa-lib )
  39. aqua? ( x11-libs/gtk-mac-integration )
  40. gnome? ( gnome-base/gvfs )
  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. >=media-libs/tiff-3.5.7:0
  53. >=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. dev-util/gdbus-codegen
  63. sys-apps/findutils
  64. virtual/pkgconfig
  65. >=dev-util/intltool-0.40.1
  66. >=sys-devel/gettext-0.19
  67. doc? ( >=dev-util/gtk-doc-1 )
  68. >=sys-devel/libtool-2.2
  69. >=sys-devel/autoconf-2.54
  70. >=sys-devel/automake-1.11
  71. dev-util/gtk-doc-am" # due to our call to eautoreconf below (bug #386453)
  72. DOCS="AUTHORS ChangeLog* HACKING NEWS README*"
  73. REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
  74. pkg_setup() {
  75. G2CONF="--enable-default-binary \
  76. --disable-silent-rules \
  77. $(use_with !aqua x) \
  78. $(use_with aalib aa) \
  79. $(use_with alsa) \
  80. $(use_enable altivec) \
  81. --without-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 udev gudev) \
  92. $(use_with wmf) \
  93. --with-xmc \
  94. $(use_with xpm libxpm) \
  95. --without-xvfb-run"
  96. if use python; then
  97. python-single-r1_pkg_setup
  98. fi
  99. }
  100. src_prepare() {
  101. sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die #494864
  102. echo '#!/bin/sh' > py-compile
  103. chmod a+x py-compile || die
  104. sed -i -e 's:\$srcdir/configure:#:g' autogen.sh
  105. local myconf
  106. if ! use doc; then
  107. myconf="${myconf} --disable-gtk-doc"
  108. fi
  109. ./autogen.sh ${myconf} || die
  110. # Fix "libtoolize --force" of autogen.sh (bug #476626)
  111. rm install-sh ltmain.sh || die
  112. _elibtoolize --copy --install || die
  113. gnome2_src_prepare
  114. }
  115. src_configure() {
  116. GEGL=/usr/bin/gegl-0.3 gnome2_src_configure
  117. }
  118. src_compile() {
  119. # Bugs #569738 and #591214
  120. local nv
  121. for nv in /dev/nvidia-uvm /dev/nvidiactl /dev/nvidia{0..9} ; do
  122. # We do not check for existence as they may show up later
  123. # https://bugs.gentoo.org/show_bug.cgi?id=569738#c21
  124. addwrite "${nv}"
  125. done
  126. addwrite /dev/dri/ # bug #574038
  127. addwrite /dev/ati/ # bug 589198
  128. addwrite /proc/mtrr # bug 589198
  129. export XDG_DATA_DIRS=/usr/share # bug 587004
  130. gnome2_src_compile
  131. }
  132. _clean_up_locales() {
  133. einfo "Cleaning up locales..."
  134. for lang in ${LANGS}; do
  135. use "linguas_${lang}" && {
  136. einfo "- keeping ${lang}"
  137. continue
  138. }
  139. rm -Rf "${ED}"/usr/share/locale/"${lang}" || die
  140. done
  141. }
  142. src_test() {
  143. Xemake check
  144. }
  145. src_install() {
  146. gnome2_src_install
  147. if use python; then
  148. python_optimize
  149. fi
  150. # Workaround for bug #321111 to give GIMP the least
  151. # precedence on PDF documents by default
  152. mv "${ED}"/usr/share/applications/{,zzz-}gimp.desktop || die
  153. prune_libtool_files --all
  154. # Prevent dead symlink gimp-console.1 from downstream man page compression (bug #433527)
  155. mv "${ED}"/usr/share/man/man1/gimp-console{-*,}.1 || die
  156. _clean_up_locales
  157. }
  158. pkg_postinst() {
  159. gnome2_pkg_postinst
  160. }
  161. pkg_postrm() {
  162. gnome2_pkg_postrm
  163. }