pqiv-2.7.4-r1.ebuild 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit linux-info flag-o-matic toolchain-funcs fdo-mime
  5. DESCRIPTION="powerful GTK 3 based command-line image viewer with a minimal UI"
  6. HOMEPAGE="https://github.com/phillipberndt/pqiv http://www.pberndt.com/Programme/Linux/pqiv/"
  7. SRC_URI="https://github.com/phillipberndt/pqiv/archive/${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="archive ffmpeg imagemagick kernel_linux libav pdf postscript"
  12. RDEPEND="
  13. >=dev-libs/glib-2.8:2
  14. >=x11-libs/cairo-1.6
  15. x11-libs/gtk+:3
  16. archive? ( app-arch/libarchive:0= )
  17. ffmpeg? (
  18. !libav? ( media-video/ffmpeg:0= )
  19. libav? ( media-video/libav:0= )
  20. )
  21. imagemagick? ( media-gfx/imagemagick:0= )
  22. pdf? ( app-text/poppler:0= )
  23. postscript? ( app-text/libspectre:0= )
  24. "
  25. DEPEND="${RDEPEND}
  26. virtual/pkgconfig"
  27. pkg_setup() {
  28. if use kernel_linux; then
  29. CONFIG_CHECK="~INOTIFY_USER"
  30. linux-info_pkg_setup
  31. fi
  32. }
  33. src_prepare() {
  34. default
  35. sed -i \
  36. -e "s:/lib/:/$(get_libdir)/:g" \
  37. GNUmakefile || die
  38. # bug #603506
  39. append-ldflags -Wl,--disable-new-dtags
  40. }
  41. src_configure() {
  42. local backends="gdkpixbuf"
  43. use archive && backends="${backends},archive,archive_cbx"
  44. use ffmpeg || use libav && backends="${backends},libav"
  45. use imagemagick && backends="${backends},wand"
  46. use pdf && backends="${backends},poppler"
  47. use postscript && backends="${backends},spectre"
  48. ./configure \
  49. --backends-build=shared \
  50. --backends=${backends} \
  51. --prefix="${EPREFIX}/usr" \
  52. --destdir="${ED}" \
  53. || die
  54. }
  55. src_compile() {
  56. tc-export CC
  57. emake VERBOSE=1 CFLAGS="${CFLAGS}"
  58. }
  59. pkg_postinst() {
  60. fdo-mime_desktop_database_update
  61. }
  62. pkg_postrm() {
  63. fdo-mime_desktop_database_update
  64. }