1 |
|
# Copyright 1999-2019 Gentoo Foundation
|
|
1 |
# Copyright 2021-2023 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI="7"
|
|
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
PLOCALES="be bg bn ca cs da de el en_GB es et eu fa fi fr gl he hr hu id it ja kk km lg
|
7 |
|
lt nl pl pt pt_BR ro ru si_LK sk sl sr sr@latin sv te tr ug uk vi zh_CN zh_TW"
|
8 |
|
|
9 |
|
PLOCALE_BACKUP="en_GB"
|
10 |
|
|
11 |
|
inherit autotools gnome2-utils l10n xdg-utils
|
|
6 |
inherit autotools xdg flag-o-matic toolchain-funcs plocale
|
12 |
7 |
|
|
8 |
DESCRIPTION="DeaDBeeF is a modular audio player similar to foobar2000"
|
|
9 |
HOMEPAGE="https://deadbeef.sourceforge.io/"
|
13 |
10 |
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
|
14 |
11 |
|
15 |
|
KEYWORDS="~amd64 ~x86"
|
16 |
|
|
17 |
|
DESCRIPTION="foobar2k-like music player"
|
18 |
|
HOMEPAGE="http://deadbeef.sourceforge.net"
|
19 |
|
|
20 |
|
LICENSE="BSD
|
21 |
|
UNICODE
|
22 |
|
ZLIB
|
23 |
|
aac? ( GPL-1 GPL-2 )
|
24 |
|
adplug? ( LGPL-2.1 ZLIB )
|
25 |
|
alac? ( MIT GPL-2 )
|
26 |
|
alsa? ( GPL-2 )
|
27 |
|
cdda? ( GPL-2 LGPL-2 GPL-3 )
|
28 |
|
cdparanoia? ( GPL-2 )
|
29 |
|
cover? ( ZLIB )
|
30 |
|
converter? ( GPL-2 )
|
31 |
|
curl? ( curl ZLIB )
|
32 |
|
dts? ( GPL-2 )
|
33 |
|
dumb? ( DUMB-0.9.3 ZLIB )
|
34 |
|
equalizer? ( GPL-2 )
|
35 |
|
ffmpeg? ( GPL-2 )
|
36 |
|
flac? ( BSD )
|
37 |
|
gme? ( LGPL-2.1 )
|
38 |
|
gtk2? ( GPL-2 )
|
39 |
|
gtk3? ( GPL-2 )
|
40 |
|
hotkeys? ( ZLIB )
|
41 |
|
lastfm? ( GPL-2 )
|
42 |
|
libav? ( GPL-2 )
|
43 |
|
libnotify? ( GPL-2 )
|
44 |
|
libsamplerate? ( GPL-2 )
|
45 |
|
m3u? ( ZLIB )
|
46 |
|
mac? ( GPL-2 )
|
47 |
|
mad? ( GPL-2 ZLIB )
|
48 |
|
midi? ( LGPL-2.1 ZLIB )
|
49 |
|
mms? ( GPL-2 ZLIB )
|
50 |
|
mono2stereo? ( ZLIB )
|
51 |
|
mpg123? ( LGPL-2.1 ZLIB )
|
52 |
|
musepack? ( BSD ZLIB )
|
53 |
|
nullout? ( ZLIB )
|
54 |
|
opus? ( ZLIB )
|
55 |
|
oss? ( GPL-2 )
|
56 |
|
playlist-browser? ( ZLIB )
|
57 |
|
psf? ( BSD GPL-1 MAME ZLIB )
|
58 |
|
pulseaudio? ( GPL-2 )
|
59 |
|
shell-exec? ( GPL-2 )
|
60 |
|
shn? ( shorten ZLIB )
|
61 |
|
sid? ( GPL-2 )
|
62 |
|
sndfile? ( GPL-2 LGPL-2 )
|
63 |
|
tta? ( BSD ZLIB )
|
64 |
|
vorbis? ( BSD ZLIB )
|
65 |
|
vtx? ( GPL-2 ZLIB )
|
|
12 |
LICENSE="
|
|
13 |
GPL-2
|
|
14 |
LGPL-2.1
|
66 |
15 |
wavpack? ( BSD )
|
67 |
|
wma? ( GPL-2 LGPL-2 ZLIB )
|
68 |
|
zip? ( ZLIB )"
|
69 |
|
|
|
16 |
"
|
70 |
17 |
SLOT="0"
|
|
18 |
KEYWORDS="amd64 ~riscv x86"
|
|
19 |
IUSE="aac alsa cdda converter cover dts ffmpeg flac +hotkeys lastfm libretro libsamplerate mp3 musepack nls notify +nullout opus oss pulseaudio pipewire sc68 shellexec +supereq threads vorbis wavpack"
|
71 |
20 |
|
72 |
|
IUSE="+alsa +flac +gtk2 +hotkeys +m3u +mad +mp3 +sndfile +vorbis
|
73 |
|
aac adplug alac cdda cdparanoia converter cover cover-imlib2 cover-network curl dts dumb equalizer
|
74 |
|
ffmpeg gme gtk3 lastfm libav libnotify libsamplerate mac midi mms mono2stereo mpg123 musepack nls
|
75 |
|
nullout opus oss playlist-browser psf pulseaudio replaygain-scanner sc68 shell-exec shn sid tta unity vtx wavpack wma zip"
|
76 |
|
|
77 |
|
REQUIRED_USE="cdparanoia? ( cdda )
|
78 |
|
converter? ( || ( gtk2 gtk3 ) )
|
79 |
|
cover-imlib2? ( cover )
|
80 |
|
cover-network? ( cover curl )
|
81 |
|
cover? ( || ( gtk2 gtk3 ) )
|
82 |
|
ffmpeg? ( !libav )
|
83 |
|
lastfm? ( curl )
|
84 |
|
libav? ( !ffmpeg )
|
85 |
|
mp3? ( || ( mad mpg123 ) )
|
86 |
|
playlist-browser? ( || ( gtk2 gtk3 ) )
|
87 |
|
shell-exec? ( || ( gtk2 gtk3 ) )
|
88 |
|
|| ( alsa oss pulseaudio nullout )"
|
89 |
|
|
90 |
|
PDEPEND="media-plugins/deadbeef-plugins-meta:0"
|
91 |
|
|
92 |
|
RDEPEND="dev-libs/glib:2
|
93 |
|
aac? ( media-libs/faad2:0 )
|
94 |
|
adplug? ( media-libs/adplug:0 )
|
95 |
|
alsa? ( media-libs/alsa-lib:0 )
|
96 |
|
alac? ( media-libs/faad2:0 )
|
97 |
|
cdda? ( dev-libs/libcdio:0=
|
98 |
|
media-libs/libcddb:0 )
|
99 |
|
cdparanoia? ( dev-libs/libcdio-paranoia:0 )
|
100 |
|
cover? ( cover-imlib2? ( media-libs/imlib2:0 )
|
101 |
|
media-libs/libpng:0=
|
102 |
|
virtual/jpeg:0
|
103 |
|
x11-libs/gdk-pixbuf:2[jpeg] )
|
104 |
|
curl? ( net-misc/curl:0 )
|
105 |
|
ffmpeg? ( media-video/ffmpeg:0= )
|
106 |
|
libav? ( media-video/libav:0= )
|
107 |
|
flac? ( media-libs/flac:0 )
|
108 |
|
gme? ( sys-libs/zlib:0 )
|
109 |
|
gtk2? ( dev-libs/atk:0
|
110 |
|
dev-libs/jansson:0
|
111 |
|
x11-libs/cairo:0
|
112 |
|
x11-libs/gtk+:2
|
113 |
|
x11-libs/pango:0 )
|
114 |
|
gtk3? ( dev-libs/jansson:0
|
115 |
|
x11-libs/gtk+:3 )
|
116 |
|
hotkeys? ( x11-libs/libX11:0 )
|
117 |
|
libnotify? ( sys-apps/dbus:0 )
|
118 |
|
libsamplerate? ( media-libs/libsamplerate:0 )
|
119 |
|
mad? ( media-libs/libmad:0 )
|
120 |
|
midi? ( media-sound/timidity-freepats:0 )
|
121 |
|
mpg123? ( media-sound/mpg123:0 )
|
122 |
|
opus? ( media-libs/opusfile:0 )
|
123 |
|
psf? ( sys-libs/zlib:0 )
|
124 |
|
pulseaudio? ( media-sound/pulseaudio:0 )
|
125 |
|
sndfile? ( media-libs/libsndfile:0 )
|
126 |
|
vorbis? ( media-libs/libogg:0
|
127 |
|
media-libs/libvorbis:0 )
|
128 |
|
wavpack? ( media-sound/wavpack:0 )
|
129 |
|
zip? ( dev-libs/libzip:0 )"
|
130 |
|
|
131 |
|
DEPEND="${RDEPEND}
|
132 |
|
virtual/pkgconfig:0
|
133 |
|
nls? ( dev-util/intltool:0
|
134 |
|
virtual/libintl:0 )
|
135 |
|
mac? ( x86? ( dev-lang/yasm:0 )
|
136 |
|
amd64? ( dev-lang/yasm:0 ) )"
|
137 |
|
|
138 |
|
S="${WORKDIR}/${P}"
|
|
21 |
REQUIRED_USE="
|
|
22 |
|| ( alsa oss pulseaudio pipewire nullout )
|
|
23 |
"
|
|
24 |
|
|
25 |
DEPEND="
|
|
26 |
x11-libs/gtk+:3
|
|
27 |
net-misc/curl:=
|
|
28 |
dev-libs/jansson:=
|
|
29 |
aac? ( media-libs/faad2 )
|
|
30 |
alsa? ( media-libs/alsa-lib )
|
|
31 |
cdda? (
|
|
32 |
dev-libs/libcdio:=
|
|
33 |
media-libs/libcddb
|
|
34 |
dev-libs/libcdio-paranoia:=
|
|
35 |
)
|
|
36 |
cover? (
|
|
37 |
media-libs/imlib2[jpeg,png]
|
|
38 |
)
|
|
39 |
dts? ( media-libs/libdca )
|
|
40 |
ffmpeg? ( media-video/ffmpeg:= )
|
|
41 |
flac? (
|
|
42 |
media-libs/flac:=
|
|
43 |
media-libs/libogg
|
|
44 |
)
|
|
45 |
libsamplerate? ( media-libs/libsamplerate )
|
|
46 |
mp3? ( media-sound/mpg123 )
|
|
47 |
musepack? ( media-sound/musepack-tools )
|
|
48 |
nls? ( virtual/libintl )
|
|
49 |
notify? (
|
|
50 |
sys-apps/dbus
|
|
51 |
)
|
|
52 |
opus? ( media-libs/opusfile )
|
|
53 |
pulseaudio? ( media-libs/libpulse )
|
|
54 |
pipewire? ( media-video/pipewire )
|
|
55 |
vorbis? ( media-libs/libvorbis )
|
|
56 |
wavpack? ( media-sound/wavpack )
|
|
57 |
dev-libs/libdispatch:=
|
|
58 |
"
|
|
59 |
|
|
60 |
RDEPEND="${DEPEND}"
|
|
61 |
BDEPEND="
|
|
62 |
dev-util/intltool
|
|
63 |
sys-devel/gettext
|
|
64 |
sys-devel/clang
|
|
65 |
sys-devel/llvm
|
|
66 |
virtual/pkgconfig
|
|
67 |
"
|
|
68 |
|
|
69 |
PATCHES=(
|
|
70 |
"${FILESDIR}/deadbeef-1.9.2-drop-Werror.patch"
|
|
71 |
)
|
139 |
72 |
|
140 |
73 |
src_prepare() {
|
141 |
|
if ! use_if_iuse linguas_ru ; then
|
142 |
|
eapply "${FILESDIR}/${P}-remove-ru-help-translation.patch"
|
143 |
|
rm -v "${S}/translation/help.ru.txt" || die
|
144 |
|
fi
|
145 |
|
|
146 |
|
if use midi ; then
|
147 |
|
# set default gentoo path
|
148 |
|
sed -e 's;/etc/timidity++/timidity-freepats.cfg;/usr/share/timidity/freepats/timidity.cfg;g' \
|
149 |
|
-i "${S}/plugins/wildmidi/wildmidiplug.c" || die
|
150 |
|
fi
|
|
74 |
default
|
151 |
75 |
|
152 |
|
if ! use unity ; then
|
153 |
|
# remove unity trash
|
154 |
|
eapply "${FILESDIR}/${P}-remove-unity-trash.patch"
|
155 |
|
fi
|
|
76 |
drop_from_linguas() {
|
|
77 |
sed "/${1}/d" -i "${S}/po/LINGUAS" || die
|
|
78 |
}
|
|
79 |
|
|
80 |
drop_and_stub() {
|
|
81 |
rm -rf "${1}"
|
|
82 |
mkdir "${1}"
|
|
83 |
cat > "${1}/Makefile.in" <<-EOF
|
|
84 |
all: nothing
|
|
85 |
install: nothing
|
|
86 |
nothing:
|
|
87 |
EOF
|
|
88 |
}
|
156 |
89 |
|
157 |
|
eapply_user
|
|
90 |
plocale_for_each_disabled_locale drop_from_linguas || die
|
158 |
91 |
|
159 |
|
config_rpath_update "${S}/config.rpath"
|
|
92 |
eautopoint --force
|
160 |
93 |
eautoreconf
|
161 |
|
}
|
162 |
94 |
|
163 |
|
src_configure() {
|
164 |
|
if use ffmpeg && ! use libav ; then
|
165 |
|
ffmpeg_configure="$(use_enable ffmpeg)"
|
166 |
|
elif use libav && ! use ffmpeg ; then
|
167 |
|
ffmpeg_configure="$(use_enable libav ffmpeg)"
|
168 |
|
fi
|
|
95 |
# Get rid of bundled gettext. (Avoid build failures with musl)
|
|
96 |
use elibc_musl || drop_and_stub "${S}/intl"
|
169 |
97 |
|
170 |
|
econf --disable-coreaudio \
|
171 |
|
--disable-portable \
|
172 |
|
--disable-static \
|
173 |
|
"${ffmpeg_configure}" \
|
174 |
|
$(use_enable aac) \
|
175 |
|
$(use_enable adplug) \
|
176 |
|
$(use_enable alac) \
|
177 |
|
$(use_enable alsa) \
|
178 |
|
$(use_enable cdda) \
|
179 |
|
$(use_enable cdparanoia cdda-paranoia) \
|
180 |
|
$(use_enable converter) \
|
181 |
|
$(use_enable cover artwork) \
|
182 |
|
$(use_enable cover-imlib2 artwork-imlib2) \
|
183 |
|
$(use_enable cover-network artwork-network) \
|
184 |
|
$(use_enable curl vfs-curl) \
|
185 |
|
$(use_enable dts dca) \
|
186 |
|
$(use_enable dumb) \
|
187 |
|
$(use_enable equalizer supereq) \
|
188 |
|
$(use_enable flac) \
|
189 |
|
$(use_enable gme) \
|
190 |
|
$(use_enable gtk2) \
|
191 |
|
$(use_enable gtk3) \
|
192 |
|
$(use_enable hotkeys) \
|
193 |
|
$(use_enable lastfm lfm) \
|
194 |
|
$(use_enable libnotify notify) \
|
195 |
|
$(use_enable libsamplerate src) \
|
196 |
|
$(use_enable m3u) \
|
197 |
|
$(use_enable mac ffap) \
|
198 |
|
$(use_enable mad libmad) \
|
199 |
|
$(use_enable midi wildmidi) \
|
200 |
|
$(use_enable mms) \
|
201 |
|
$(use_enable mono2stereo) \
|
202 |
|
$(use_enable mpg123 libmpg123) \
|
203 |
|
$(use_enable musepack) \
|
204 |
|
$(use_enable nls) \
|
205 |
|
$(use_enable nullout) \
|
206 |
|
$(use_enable opus) \
|
207 |
|
$(use_enable oss) \
|
208 |
|
$(use_enable playlist-browser pltbrowser) \
|
209 |
|
$(use_enable psf) \
|
210 |
|
$(use_enable pulseaudio pulse) \
|
211 |
|
$(use_enable replaygain-scanner rgscanner) \
|
212 |
|
$(use_enable sc68) \
|
213 |
|
$(use_enable shell-exec shellexecui) \
|
214 |
|
$(use_enable shn) \
|
215 |
|
$(use_enable sid) \
|
216 |
|
$(use_enable sndfile) \
|
217 |
|
$(use_enable tta) \
|
218 |
|
$(use_enable vorbis) \
|
219 |
|
$(use_enable vtx) \
|
220 |
|
$(use_enable wavpack) \
|
221 |
|
$(use_enable wma) \
|
222 |
|
$(use_enable zip vfs-zip)
|
223 |
|
}
|
|
98 |
# Plugins that are undesired for whatever reason, candidates for unbundling and such.
|
|
99 |
for i in adplug alac dumb ffap mms gme mono2stereo psf shn sid soundtouch wma; do
|
|
100 |
drop_and_stub "${S}/plugins/${i}"
|
|
101 |
done
|
224 |
102 |
|
225 |
|
pkg_preinst() {
|
226 |
|
if use gtk2 || use gtk3 ; then
|
227 |
|
gnome2_icon_savelist
|
228 |
|
fi
|
|
103 |
rm -rf "${S}/plugins/rg_scanner/ebur128"
|
229 |
104 |
}
|
230 |
105 |
|
231 |
|
pkg_postinst() {
|
232 |
|
xdg_desktop_database_update
|
233 |
|
xdg_mimeinfo_database_update
|
|
106 |
src_configure () {
|
|
107 |
if ! tc-is-clang; then
|
|
108 |
AR=llvm-ar
|
|
109 |
CC=${CHOST}-clang
|
|
110 |
CXX=${CHOST}-clang++
|
|
111 |
NM=llvm-nm
|
|
112 |
RANLIB=llvm-ranlib
|
|
113 |
|
|
114 |
strip-unsupported-flags
|
|
115 |
fi
|
|
116 |
|
|
117 |
export HOST_CC="$(tc-getBUILD_CC)"
|
|
118 |
export HOST_CXX="$(tc-getBUILD_CXX)"
|
|
119 |
tc-export CC CXX LD AR NM OBJDUMP RANLIB PKG_CONFIG
|
|
120 |
|
|
121 |
local myconf=(
|
|
122 |
"--disable-staticlink"
|
|
123 |
"--disable-portable"
|
|
124 |
"--disable-rpath"
|
|
125 |
|
|
126 |
"--disable-libmad"
|
|
127 |
"--disable-gtk2"
|
|
128 |
"--disable-adplug"
|
|
129 |
"--disable-coreaudio"
|
|
130 |
"--disable-dumb"
|
|
131 |
"--disable-alac"
|
|
132 |
"--disable-ffap"
|
|
133 |
"--disable-gme"
|
|
134 |
"--disable-mms"
|
|
135 |
"--disable-mono2stereo"
|
|
136 |
"--disable-psf"
|
|
137 |
"--disable-rgscanner"
|
|
138 |
"--disable-shn"
|
|
139 |
"--disable-sid"
|
|
140 |
"--disable-sndfile"
|
|
141 |
"--disable-soundtouch"
|
|
142 |
"--disable-tta"
|
|
143 |
"--disable-vfs-zip"
|
|
144 |
"--disable-vtx"
|
|
145 |
"--disable-wildmidi"
|
|
146 |
"--disable-wma"
|
|
147 |
|
|
148 |
"$(use_enable alsa)"
|
|
149 |
"$(use_enable oss)"
|
|
150 |
"$(use_enable pulseaudio pulse)"
|
|
151 |
"$(use_enable mp3)"
|
|
152 |
"$(use_enable mp3 libmpg123)"
|
|
153 |
"$(use_enable nls)"
|
|
154 |
"$(use_enable vorbis)"
|
|
155 |
"$(use_enable threads)"
|
|
156 |
"$(use_enable flac)"
|
|
157 |
"$(use_enable supereq)"
|
|
158 |
"$(use_enable cdda)"
|
|
159 |
"$(use_enable cdda cdda-paranoia)"
|
|
160 |
"$(use_enable aac)"
|
|
161 |
"$(use_enable cover artwork)"
|
|
162 |
"$(use_enable cover artwork-network)"
|
|
163 |
"$(use_enable dts dca)"
|
|
164 |
"$(use_enable ffmpeg)"
|
|
165 |
"$(use_enable converter)"
|
|
166 |
"$(use_enable musepack)"
|
|
167 |
"$(use_enable notify)"
|
|
168 |
"$(use_enable nullout)"
|
|
169 |
"$(use_enable opus)"
|
|
170 |
"$(use_enable pulseaudio pulse)"
|
|
171 |
"$(use_enable pipewire)"
|
|
172 |
"$(use_enable sc68)"
|
|
173 |
"$(use_enable shellexec)"
|
|
174 |
"$(use_enable shellexec shellexecui)"
|
|
175 |
"$(use_enable lastfm lfm)"
|
|
176 |
"$(use_enable libretro)"
|
|
177 |
"$(use_enable libsamplerate src)"
|
|
178 |
"$(use_enable wavpack)"
|
|
179 |
|
|
180 |
"--enable-gtk3"
|
|
181 |
"--enable-vfs-curl"
|
|
182 |
"--enable-shared"
|
|
183 |
"--enable-m3u"
|
|
184 |
"--enable-pltbrowser"
|
|
185 |
)
|
234 |
186 |
|
235 |
|
if use gtk2 || use gtk3 ; then
|
236 |
|
gnome2_icon_cache_update
|
237 |
|
fi
|
|
187 |
econf "${myconf[@]}"
|
238 |
188 |
}
|
239 |
189 |
|
240 |
|
pkg_postrm() {
|
241 |
|
xdg_desktop_database_update
|
242 |
|
xdg_mimeinfo_database_update
|
|
190 |
src_install() {
|
|
191 |
default
|
243 |
192 |
|
244 |
|
if use gtk2 || use gtk3 ; then
|
245 |
|
gnome2_icon_cache_update
|
246 |
|
fi
|
|
193 |
find "${ED}" -name '*.la' -delete || die
|
247 |
194 |
}
|