smtube-16.3.0.ebuild 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PLOCALES="bg cs da de en_GB en es eu fr gl he_IL hr hu it ja ko ms nn_NO pl pt_BR pt ru sq sr tr uk zh_CN zh_TW"
  5. PLOCALE_BACKUP="en"
  6. inherit l10n qmake-utils
  7. DESCRIPTION="YouTube Browser for SMPlayer"
  8. HOMEPAGE="http://smplayer.sourceforge.net/smtube"
  9. SRC_URI="mirror://sourceforge/smplayer/${P}.tar.bz2"
  10. KEYWORDS="~amd64 ~x86"
  11. LICENSE="GPL-2+"
  12. SLOT="0"
  13. IUSE="qt5"
  14. # Deps in makefile seemed to be -core, -network, -script, -gui, -webkit, but the
  15. # given packages seem to be deprecated...
  16. DEPEND="qt5? ( dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtwebkit:5 dev-qt/qtscript:5 )
  17. !qt5? ( dev-qt/qtcore:4 dev-qt/qtgui:4 dev-qt/qtwebkit:4 dev-qt/qtscript:4 )"
  18. RDEPEND="${DEPEND}
  19. || ( media-video/smplayer[streaming] media-video/mpv media-video/mplayer media-video/vlc media-video/totem media-video/gnome-mplayer )"
  20. gen_translation() {
  21. lrelease ${PN}_${1}.ts
  22. eend $? || die "failed to generate $1 translation"
  23. }
  24. src_compile() {
  25. if use qt5; then
  26. eqmake5 src/${PN}.pro
  27. else
  28. eqmake4 src/${PN}.pro
  29. fi
  30. emake
  31. cd "${S}"/src/translations
  32. l10n_for_each_locale_do gen_translation
  33. }
  34. install_locale() {
  35. insinto /usr/share/${PN}/translations
  36. doins "${S}"/src/translations/${PN}_${1}.qm
  37. eend $? || die "failed to install $1 translation"
  38. }
  39. src_install() {
  40. dobin ${PN}
  41. domenu ${PN}.desktop
  42. newicon icons/${PN}_64.png ${PN}.png
  43. dodoc Changelog
  44. l10n_for_each_locale_do install_locale
  45. }