qiv-2.3.1.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit toolchain-funcs eutils fdo-mime gnome2-utils
  5. DESCRIPTION="Quick Image Viewer"
  6. HOMEPAGE="http://spiegl.de/qiv/"
  7. SRC_URI="http://spiegl.de/qiv/download/${P}.tgz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~mips ~x86"
  11. IUSE="exif lcms magic"
  12. RDEPEND=">=x11-libs/gtk+-2.12:2
  13. media-libs/imlib2[X]
  14. exif? ( media-libs/libexif )
  15. lcms? ( media-libs/lcms:2 )
  16. magic? ( sys-apps/file )"
  17. DEPEND="${RDEPEND}
  18. virtual/pkgconfig"
  19. src_prepare() {
  20. sed -i \
  21. -e 's:$(CC) $(CFLAGS):$(CC) $(LDFLAGS) $(CFLAGS):' \
  22. Makefile || die
  23. if ! use exif ; then
  24. sed -i 's/^EXIF =/#\0/' Makefile || die
  25. fi
  26. if ! use lcms ; then
  27. sed -i 's/^LCMS =/#\0/' Makefile || die
  28. fi
  29. if ! use magic ; then
  30. sed -i 's/^MAGIC =/#\0/' Makefile || die
  31. fi
  32. }
  33. src_compile() {
  34. emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
  35. }
  36. src_install() {
  37. dobin qiv
  38. doman qiv.1
  39. dodoc Changelog contrib/qiv-command.example README README.TODO
  40. domenu qiv.desktop
  41. doicon qiv.png
  42. }
  43. pkg_postinst() {
  44. fdo-mime_desktop_database_update
  45. gnome2_icon_cache_update
  46. }
  47. pkg_postrm() {
  48. fdo-mime_desktop_database_update
  49. gnome2_icon_cache_update
  50. }