nomacs-3.4-r1.ebuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils fdo-mime
  5. DESCRIPTION="Qt-based image viewer"
  6. HOMEPAGE="http://www.nomacs.org/"
  7. SRC_URI="https://github.com/${PN}/${PN}/archive/3.4.tar.gz -> ${P}.tar.gz"
  8. LICENSE="GPL-3+"
  9. SLOT="0"
  10. KEYWORDS="amd64 ~amd64-linux"
  11. IUSE="+jpeg opencv raw tiff zip"
  12. REQUIRED_USE="
  13. raw? ( opencv )
  14. tiff? ( opencv )
  15. "
  16. RDEPEND="
  17. dev-qt/qtconcurrent:5
  18. dev-qt/qtcore:5
  19. dev-qt/qtgui:5[jpeg?]
  20. dev-qt/qtnetwork:5
  21. dev-qt/qtprintsupport:5
  22. dev-qt/qtsvg:5
  23. dev-qt/qtwidgets:5
  24. >=media-gfx/exiv2-0.25:=
  25. opencv? ( media-libs/opencv:=[-qt4(-)] )
  26. raw? ( >=media-libs/libraw-0.14:= )
  27. tiff? ( media-libs/tiff:0 )
  28. zip? ( >=dev-libs/quazip-0.7.2[qt5] )
  29. "
  30. DEPEND="${RDEPEND}
  31. dev-qt/linguist-tools:5
  32. virtual/pkgconfig
  33. "
  34. S="${WORKDIR}/${P}/ImageLounge"
  35. PATCHES=( "${FILESDIR}/${P}-no-opencv.patch" ) # bug 592134
  36. src_prepare() {
  37. default
  38. # fix build with quazip-0.7.2 - bug 598354
  39. sed -i -e "s/find_package(QuaZIP/find_package(QuaZip5/" cmake/Unix.cmake || die
  40. sed -e "s/include <quazip/&5/" \
  41. -i src/DkLoader/DkImageLoader.cpp \
  42. -i src/DkLoader/DkImageContainer.cpp \
  43. -i src/DkLoader/DkBasicLoader.cpp \
  44. -i src/DkGui/DkDialog.cpp || die
  45. }
  46. src_configure() {
  47. local mycmakeargs=(
  48. -DENABLE_OPENCV=$(usex opencv)
  49. -DENABLE_RAW=$(usex raw)
  50. -DENABLE_TIFF=$(usex tiff)
  51. -DENABLE_QUAZIP=$(usex zip)
  52. -DUSE_SYSTEM_QUAZIP=ON
  53. )
  54. cmake-utils_src_configure
  55. }
  56. pkg_postinst() {
  57. fdo-mime_desktop_database_update
  58. }
  59. pkg_postrm() {
  60. fdo-mime_desktop_database_update
  61. }