audacious-plugins-3.7.1.ebuild 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils
  5. MY_P="${P/_/-}"
  6. S="${WORKDIR}/${MY_P}"
  7. DESCRIPTION="Audacious Player - Your music, your way, no exceptions"
  8. HOMEPAGE="http://audacious-media-player.org/"
  9. SRC_URI="!gtk3? ( http://distfiles.audacious-media-player.org/${MY_P}.tar.bz2 )
  10. gtk3? ( http://distfiles.audacious-media-player.org/${MY_P}-gtk3.tar.bz2 )"
  11. LICENSE="GPL-2"
  12. SLOT="0"
  13. KEYWORDS="alpha amd64 ~arm ~hppa ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
  14. IUSE="aac +adplug alsa bs2b cdda cue ffmpeg flac fluidsynth gnome http gtk gtk3 jack
  15. lame libnotify libsamplerate lirc mms mp3 nls pulseaudio qt5 scrobbler sdl sid sndfile vorbis wavpack"
  16. REQUIRED_USE="
  17. ?? ( gtk gtk3 qt5 )
  18. "
  19. RDEPEND="app-arch/unzip
  20. >=dev-libs/dbus-glib-0.60
  21. dev-libs/libxml2:2
  22. media-libs/libmodplug
  23. ~media-sound/audacious-${PV}
  24. ( || ( >=dev-libs/glib-2.32.2[utils] dev-util/gdbus-codegen ) )
  25. aac? ( >=media-libs/faad2-2.7 )
  26. adplug? ( media-libs/adplug )
  27. alsa? ( >=media-libs/alsa-lib-1.0.16 )
  28. bs2b? ( media-libs/libbs2b )
  29. cdda? ( >=media-libs/libcddb-1.2.1
  30. dev-libs/libcdio-paranoia )
  31. cue? ( media-libs/libcue )
  32. ffmpeg? ( >=virtual/ffmpeg-0.7.3 )
  33. flac? ( >=media-libs/libvorbis-1.0
  34. >=media-libs/flac-1.2.1-r1 )
  35. fluidsynth? ( media-sound/fluidsynth )
  36. http? ( >=net-libs/neon-0.26.4 )
  37. gtk? ( x11-libs/gtk+:2 )
  38. gtk3? ( x11-libs/gtk+:3
  39. media-libs/adplug )
  40. qt5? ( dev-qt/qtcore:5
  41. dev-qt/qtgui:5
  42. dev-qt/qtmultimedia:5
  43. dev-qt/qtwidgets:5
  44. media-libs/adplug )
  45. jack? ( >=media-libs/bio2jack-0.4
  46. media-sound/jack-audio-connection-kit )
  47. lame? ( media-sound/lame )
  48. libnotify? ( x11-libs/libnotify )
  49. libsamplerate? ( media-libs/libsamplerate )
  50. lirc? ( app-misc/lirc )
  51. mms? ( >=media-libs/libmms-0.3 )
  52. mp3? ( >=media-sound/mpg123-1.12.1 )
  53. pulseaudio? ( >=media-sound/pulseaudio-0.9.3 )
  54. scrobbler? ( net-misc/curl )
  55. sdl? ( media-libs/libsdl[sound] )
  56. sid? ( >=media-libs/libsidplayfp-1.0.0 )
  57. sndfile? ( >=media-libs/libsndfile-1.0.17-r1 )
  58. vorbis? ( >=media-libs/libvorbis-1.2.0
  59. >=media-libs/libogg-1.1.3 )
  60. wavpack? ( >=media-sound/wavpack-4.50.1-r1 )"
  61. DEPEND="${RDEPEND}
  62. nls? ( dev-util/intltool )
  63. virtual/pkgconfig"
  64. mp3_warning() {
  65. if ! use mp3 ; then
  66. ewarn "MP3 support is optional, you may want to enable the mp3 USE-flag"
  67. fi
  68. }
  69. src_unpack() {
  70. default
  71. if use gtk3 ; then
  72. mv "${MY_P}-gtk3" "${MY_P}"
  73. fi
  74. }
  75. src_prepare() {
  76. has_version "<dev-libs/glib-2.32" && \
  77. cd "${S}"/src/mpris2 && \
  78. gdbus-codegen --interface-prefix org.mpris. \
  79. --c-namespace Mpris --generate-c-code object-core mpris2.xml && \
  80. gdbus-codegen --interface-prefix org.mpris. \
  81. --c-namespace Mpris \
  82. --generate-c-code object-player mpris2-player.xml && \
  83. cd "${S}"
  84. }
  85. src_configure() {
  86. mp3_warning
  87. if use qt5 ;then
  88. notify="--disable-notify"
  89. elif use libnotify ;then
  90. notify="--enable-notify"
  91. fi
  92. if use gtk ;then
  93. gtk="--enable-gtk"
  94. elif use gtk3 ;then
  95. gtk="--enable-gtk"
  96. else
  97. gtk="--disable-gtk"
  98. fi
  99. if use ffmpeg && has_version media-video/ffmpeg ; then
  100. ffmpeg="--with-ffmpeg=ffmpeg"
  101. elif use ffmpeg && has_version media-video/libav ; then
  102. ffmpeg="--with-ffmpeg=libav"
  103. else
  104. ffmpeg="--with-ffmpeg=none"
  105. fi
  106. econf \
  107. ${ffmpeg} \
  108. ${gtk} \
  109. ${notify} \
  110. --enable-modplug \
  111. --enable-statusicon \
  112. --disable-soxr \
  113. $(use_enable adplug) \
  114. $(use_enable aac) \
  115. $(use_enable alsa) \
  116. $(use_enable bs2b) \
  117. $(use_enable cdda cdaudio) \
  118. $(use_enable cue) \
  119. $(use_enable flac flacng) \
  120. $(use_enable fluidsynth amidiplug) \
  121. $(use_enable flac filewriter_flac) \
  122. $(use_enable http neon) \
  123. $(use_enable jack) \
  124. $(use_enable gnome gnomeshortcuts) \
  125. $(use_enable lame filewriter_mp3) \
  126. $(use_enable libsamplerate resample) \
  127. $(use_enable lirc) \
  128. $(use_enable mms) \
  129. $(use_enable mp3) \
  130. $(use_enable nls) \
  131. $(use_enable pulseaudio pulse) \
  132. $(use_enable qt5 qt) \
  133. $(use_enable scrobbler scrobbler2) \
  134. $(use_enable sdl sdlout) \
  135. $(use_enable sid) \
  136. $(use_enable sndfile) \
  137. $(use_enable vorbis) \
  138. $(use_enable wavpack)
  139. }