fbreader-0.99.4-r2.ebuild 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils multilib
  5. DESCRIPTION="E-Book Reader. Supports many e-book formats"
  6. HOMEPAGE="http://www.fbreader.org/"
  7. SRC_URI="http://www.fbreader.org/files/desktop/${PN}-sources-${PV}.tgz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 ~arm ~ppc x86"
  11. IUSE="debug"
  12. RDEPEND="
  13. app-arch/bzip2
  14. dev-libs/expat
  15. dev-libs/liblinebreak
  16. dev-libs/fribidi
  17. dev-db/sqlite
  18. net-misc/curl
  19. sys-libs/zlib
  20. dev-qt/qtcore:4[ssl]
  21. dev-qt/qtgui:4
  22. "
  23. DEPEND="${RDEPEND}
  24. virtual/pkgconfig
  25. "
  26. src_prepare() {
  27. # Still use linebreak instead of new unibreak
  28. sed -e "s:-lunibreak:-llinebreak:" \
  29. -i makefiles/config.mk zlibrary/text/Makefile || die "fixing libunibreak failed"
  30. # Let portage decide about the compiler
  31. sed -e "/^CC = /d" \
  32. -i makefiles/arch/desktop.mk || die "removing CC line failed"
  33. # let portage strip the binary
  34. sed -e '/@strip/d' \
  35. -i fbreader/desktop/Makefile || die
  36. # Respect *FLAGS
  37. sed -e "s/^CFLAGS = -pipe/CFLAGS +=/" \
  38. -i makefiles/arch/desktop.mk || die "CFLAGS sed failed"
  39. sed -e "/^ CFLAGS +=/ d" \
  40. -i makefiles/config.mk || die "CFLAGS sed failed"
  41. sed -e "/^ LDFLAGS += -s$/ d" \
  42. -i makefiles/config.mk || die "sed failed"
  43. sed -e "/^LDFLAGS =$/ d" \
  44. -i makefiles/arch/desktop.mk || die "sed failed"
  45. echo "TARGET_ARCH = desktop" > makefiles/target.mk
  46. echo "LIBDIR = /usr/$(get_libdir)" >> makefiles/target.mk
  47. echo "UI_TYPE = qt4" >> makefiles/target.mk
  48. sed -e 's:MOC = moc-qt4:MOC = /usr/bin/moc:' \
  49. -i makefiles/arch/desktop.mk || die "updating desktop.mk failed"
  50. if use debug; then
  51. echo "TARGET_STATUS = debug" >> makefiles/target.mk
  52. else
  53. echo "TARGET_STATUS = release" >> makefiles/target.mk
  54. fi
  55. # bug #452636
  56. epatch "${FILESDIR}"/${P}.patch
  57. # bug #515698
  58. epatch "${FILESDIR}"/${P}-qreal-cast.patch
  59. # bug #516794
  60. epatch "${FILESDIR}"/${P}-mimetypes.patch
  61. # bug #437262
  62. epatch "${FILESDIR}"/${P}-ld-bfd.patch
  63. # bug #592588
  64. epatch "${FILESDIR}"/${P}-gcc6.patch
  65. }
  66. src_compile() {
  67. # bug #484516
  68. emake -j1
  69. }
  70. src_install() {
  71. default
  72. dosym /usr/bin/FBReader /usr/bin/fbreader
  73. }