photivo-0_pre20131115.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit qt4-r2
  5. DESCRIPTION="Photo processor for RAW and Bitmap images"
  6. HOMEPAGE="http://www.photivo.org"
  7. SRC_URI="https://dev.gentoo.org/~hwoarang/distfiles/${P}.tar.gz"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="gimp"
  12. RDEPEND="dev-qt/qtcore:4
  13. dev-qt/qtgui:4
  14. || ( virtual/jpeg:62 media-libs/jpeg:62 )
  15. media-gfx/exiv2
  16. media-libs/tiff
  17. media-libs/libpng
  18. media-libs/cimg
  19. media-libs/lcms:2
  20. >=media-libs/lensfun-0.2.8-r1
  21. sci-libs/fftw:3.0
  22. media-libs/liblqr
  23. media-gfx/graphicsmagick[q16,-lcms]
  24. gimp? ( media-gfx/gimp )"
  25. DEPEND="${RDEPEND}"
  26. S=${WORKDIR}/${PN}-${PV/0_pre/}
  27. src_prepare() {
  28. # remove ccache dependency and fix lensfun header path
  29. local File
  30. for File in $(find "${S}" -type f); do
  31. if grep -sq ccache ${File}; then
  32. sed -e 's/ccache//' -i "${File}"
  33. fi
  34. if grep -sq "lensfun.h" ${File}; then
  35. sed -e 's/lensfun\.h/lensfun\/lensfun.h/' -i ${File}
  36. fi
  37. done
  38. # useless check (no pkgconfig file is provided)
  39. sed -e "/PKGCONFIG += CImg/d" \
  40. -i photivoProject/photivoProject.pro || die
  41. qt4-r2_src_prepare
  42. }
  43. src_configure() {
  44. local config="WithSystemCImg"
  45. if use gimp ; then
  46. config+=" WithGimp"
  47. fi
  48. eqmake4 "CONFIG+=${config}"
  49. }
  50. src_install() {
  51. qt4-r2_src_install
  52. if use gimp; then
  53. exeinto $(gimptool-2.0 --gimpplugindir)/plug-ins
  54. doexe ptGimp
  55. doexe "mm extern photivo.py"
  56. fi
  57. }