phonon-4.9.1.ebuild 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. if [[ ${PV} != *9999* ]]; then
  5. SRC_URI="mirror://kde/stable/phonon/${PV}/${P}.tar.xz"
  6. KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
  7. else
  8. EGIT_REPO_URI=( "git://anongit.kde.org/${PN}" )
  9. inherit git-r3
  10. fi
  11. inherit cmake-multilib multibuild qmake-utils
  12. DESCRIPTION="KDE multimedia API"
  13. HOMEPAGE="https://phonon.kde.org/"
  14. LICENSE="|| ( LGPL-2.1 LGPL-3 )"
  15. SLOT="0"
  16. IUSE="aqua debug designer gstreamer pulseaudio +qt4 qt5 +vlc zeitgeist"
  17. REQUIRED_USE="
  18. || ( qt4 qt5 )
  19. zeitgeist? ( qt4 )
  20. "
  21. RDEPEND="
  22. !!dev-qt/qtphonon:4
  23. qt4? (
  24. dev-qt/qtcore:4[${MULTILIB_USEDEP}]
  25. dev-qt/qtdbus:4[${MULTILIB_USEDEP}]
  26. dev-qt/qtgui:4[${MULTILIB_USEDEP}]
  27. designer? ( dev-qt/designer:4[${MULTILIB_USEDEP}] )
  28. )
  29. qt5? (
  30. dev-qt/qtcore:5
  31. dev-qt/qtdbus:5
  32. dev-qt/qtgui:5
  33. dev-qt/qtwidgets:5
  34. designer? ( dev-qt/designer:5 )
  35. )
  36. pulseaudio? (
  37. dev-libs/glib:2[${MULTILIB_USEDEP}]
  38. >=media-sound/pulseaudio-0.9.21[glib,${MULTILIB_USEDEP}]
  39. )
  40. zeitgeist? ( dev-libs/libqzeitgeist )
  41. "
  42. DEPEND="${RDEPEND}
  43. virtual/pkgconfig[${MULTILIB_USEDEP}]
  44. qt5? ( kde-frameworks/extra-cmake-modules:5 )
  45. "
  46. PDEPEND="
  47. aqua? ( media-libs/phonon-qt7 )
  48. gstreamer? ( >=media-libs/phonon-gstreamer-4.9.0[qt4?,qt5?] )
  49. vlc? ( >=media-libs/phonon-vlc-0.9.0[qt4?,qt5?] )
  50. "
  51. PATCHES=( "${FILESDIR}/${PN}-4.7.0-plugin-install.patch" )
  52. pkg_setup() {
  53. MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
  54. }
  55. multilib_src_configure() {
  56. local mycmakeargs=(
  57. -DPHONON_BUILD_DESIGNER_PLUGIN=$(usex designer)
  58. -DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=TRUE
  59. -DWITH_GLIB2=$(usex pulseaudio)
  60. -DWITH_PulseAudio=$(usex pulseaudio)
  61. $(multilib_is_native_abi && echo -DWITH_QZeitgeist=$(usex zeitgeist) || echo -DWITH_QZeitgeist=OFF)
  62. -DQT_QMAKE_EXECUTABLE="$(${QT_MULTIBUILD_VARIANT}_get_bindir)"/qmake
  63. )
  64. if [[ ${QT_MULTIBUILD_VARIANT} = qt4 ]]; then
  65. mycmakeargs+=( -DPHONON_BUILD_PHONON4QT5=OFF )
  66. fi
  67. if [[ ${QT_MULTIBUILD_VARIANT} = qt5 ]]; then
  68. mycmakeargs+=( -DPHONON_BUILD_PHONON4QT5=ON )
  69. fi
  70. cmake-utils_src_configure
  71. }
  72. src_configure() {
  73. myconfigure() {
  74. local QT_MULTIBUILD_VARIANT=${MULTIBUILD_VARIANT}
  75. if [[ ${QT_MULTIBUILD_VARIANT} = qt4 ]]; then
  76. cmake-multilib_src_configure
  77. elif [[ ${QT_MULTIBUILD_VARIANT} = qt5 ]]; then
  78. multilib_src_configure
  79. fi
  80. }
  81. multibuild_foreach_variant myconfigure
  82. }
  83. src_compile() {
  84. mycompile() {
  85. if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
  86. cmake-multilib_src_compile
  87. elif [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
  88. cmake-utils_src_compile
  89. fi
  90. }
  91. multibuild_foreach_variant mycompile
  92. }
  93. src_test() {
  94. mytest() {
  95. if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
  96. cmake-multilib_src_test
  97. elif [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
  98. cmake-utils_src_test
  99. fi
  100. }
  101. multibuild_foreach_variant mytest
  102. }
  103. src_install() {
  104. myinstall() {
  105. if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then
  106. cmake-multilib_src_install
  107. elif [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then
  108. cmake-utils_src_install
  109. fi
  110. }
  111. multibuild_foreach_variant myinstall
  112. }