kmplayer-0.12.0b.ebuild 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. EGIT_BRANCH="0.12"
  5. KDE_HANDBOOK="true"
  6. inherit kde5
  7. DESCRIPTION="Video player plugin for Konqueror and basic MPlayer frontend"
  8. HOMEPAGE="https://kmplayer.kde.org"
  9. SRC_URI="mirror://kde/stable/${PN}/${EGIT_BRANCH}/${P}.tar.bz2"
  10. LICENSE="GPL-2 FDL-1.2 LGPL-2.1"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE="cairo npp"
  13. CDEPEND="
  14. $(add_frameworks_dep kbookmarks)
  15. $(add_frameworks_dep kcompletion)
  16. $(add_frameworks_dep kconfig)
  17. $(add_frameworks_dep kconfigwidgets)
  18. $(add_frameworks_dep kcoreaddons)
  19. $(add_frameworks_dep kdelibs4support)
  20. $(add_frameworks_dep ki18n)
  21. $(add_frameworks_dep kiconthemes)
  22. $(add_frameworks_dep kio)
  23. $(add_frameworks_dep kmediaplayer)
  24. $(add_frameworks_dep kparts)
  25. $(add_frameworks_dep ktextwidgets)
  26. $(add_frameworks_dep kwidgetsaddons)
  27. $(add_frameworks_dep kxmlgui)
  28. $(add_qt_dep qtdbus)
  29. $(add_qt_dep qtgui)
  30. $(add_qt_dep qtsvg)
  31. $(add_qt_dep qtwidgets)
  32. $(add_qt_dep qtx11extras)
  33. $(add_qt_dep qtxml)
  34. media-libs/phonon[qt5]
  35. x11-libs/libX11
  36. x11-libs/libxcb
  37. cairo? ( x11-libs/cairo[xcb] )
  38. npp? (
  39. dev-libs/dbus-glib
  40. dev-libs/glib:2
  41. www-plugins/adobe-flash:*
  42. >=x11-libs/gtk+-2.10.14:2
  43. )
  44. "
  45. DEPEND="${CDEPEND}
  46. sys-devel/gettext
  47. "
  48. RDEPEND="${CDEPEND}
  49. media-video/mplayer
  50. !media-video/kmplayer:4
  51. "
  52. src_prepare() {
  53. if use npp; then
  54. sed -i src/kmplayer_part.desktop \
  55. -e ":^MimeType: s:=:=application/x-shockwave-flash;:" || die
  56. fi
  57. kde5_src_prepare
  58. }
  59. src_configure() {
  60. # 0.12: expat build broken, check in later releases
  61. local mycmakeargs=(
  62. -DKMPLAYER_BUILT_WITH_EXPAT=OFF
  63. -DKMPLAYER_BUILT_WITH_CAIRO=$(usex cairo)
  64. -DKMPLAYER_BUILT_WITH_NPP=$(usex npp)
  65. )
  66. kde5_src_configure
  67. }
  68. src_install() {
  69. kde5_src_install
  70. if use npp; then
  71. kwriteconfig5 --file "${ED}/usr/share/config/kmplayerrc" --group "application/x-shockwave-flash" --key player npp
  72. kwriteconfig5 --file "${ED}/usr/share/config/kmplayerrc" --group "application/x-shockwave-flash" --key plugin /usr/lib/nsbrowser/plugins/libflashplayer.so
  73. fi
  74. }