goldendict-1.5.0_rc2-r1.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. MY_PV=${PV^^}
  5. MY_PV=${MY_PV/_/-}
  6. inherit eutils qmake-utils
  7. DESCRIPTION="Feature-rich dictionary lookup program"
  8. HOMEPAGE="http://goldendict.org/"
  9. SRC_URI="https://github.com/${PN}/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
  10. LICENSE="GPL-3"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86"
  13. IUSE="debug ffmpeg libav"
  14. RDEPEND="
  15. app-arch/bzip2
  16. >=app-text/hunspell-1.2:=
  17. dev-libs/eb
  18. dev-libs/lzo
  19. dev-qt/qtcore:5
  20. dev-qt/qtgui:5
  21. dev-qt/qthelp:5
  22. dev-qt/qtnetwork:5
  23. dev-qt/qtprintsupport:5
  24. dev-qt/qtsingleapplication[qt5]
  25. dev-qt/qtsvg:5
  26. dev-qt/qtwebkit:5
  27. dev-qt/qtwidgets:5
  28. dev-qt/qtx11extras:5
  29. dev-qt/qtxml:5
  30. media-libs/libvorbis
  31. media-libs/tiff:0
  32. sys-libs/zlib
  33. x11-libs/libX11
  34. x11-libs/libXtst
  35. ffmpeg? (
  36. media-libs/libao
  37. libav? ( media-video/libav:0= )
  38. !libav? ( media-video/ffmpeg:0= )
  39. )
  40. "
  41. DEPEND="${RDEPEND}
  42. dev-qt/linguist-tools:5
  43. virtual/pkgconfig
  44. "
  45. PATCHES=( "${FILESDIR}/${PN}-1.5.0-qtsingleapplication-unbundle.patch" )
  46. S="${WORKDIR}/${PN}-${MY_PV}"
  47. src_prepare() {
  48. default
  49. # fix installation path
  50. sed -i \
  51. -e '/PREFIX = /s:/usr/local:/usr:' \
  52. ${PN}.pro || die
  53. # add trailing semicolon
  54. sed -i -e '/^Categories/s/$/;/' redist/${PN}.desktop || die
  55. }
  56. src_configure() {
  57. local myconf=()
  58. if ! use ffmpeg && ! use libav ; then
  59. myconf+=( DISABLE_INTERNAL_PLAYER=1 )
  60. fi
  61. eqmake5 "${myconf[@]}"
  62. }
  63. src_install() {
  64. dobin ${PN}
  65. domenu redist/${PN}.desktop
  66. doicon redist/icons/${PN}.png
  67. insinto /usr/share/apps/${PN}/locale
  68. doins locale/*.qm
  69. insinto /usr/share/${PN}/help
  70. doins help/*.qch
  71. }