Diff deadbeef-1.9.6_beta1 with a deadbeef-9999

/var/lib/layman/calculate/media-sound/deadbeef/deadbeef-9999.ebuild 2019-05-14 00:57:04.000000000 +0300
1
# Copyright 2021-2023 Gentoo Authors
1
# Copyright 1999-2019 Gentoo Foundation
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=8
4
EAPI="7"
5 5

  
6
inherit autotools xdg flag-o-matic toolchain-funcs plocale
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"
7 8

  
8
MY_PV=${PV/_/-}
9
DL_PV=$(ver_cut 1-2)
9
PLOCALE_BACKUP="en_GB"
10 10

  
11
DESCRIPTION="DeaDBeeF is a modular audio player similar to foobar2000"
12
HOMEPAGE="https://deadbeef.sourceforge.io/"
13
SRC_URI="https://sourceforge.net/projects/${PN}/files/travis/linux/${DL_PV}/deadbeef-${MY_PV}.tar.bz2/download
14
	-> ${P}.tar.bz2"
15
S="${WORKDIR}"/${PN}-${MY_PV}
16

  
17
LICENSE="
18
	GPL-2
19
	LGPL-2.1
11
inherit autotools eutils git-r3 gnome2-utils l10n xdg-utils
12

  
13
EGIT_REPO_URI="https://github.com/Alexey-Yakovenko/${PN}.git"
14
EGIT_BRANCH="master"
15

  
16
KEYWORDS=""
17

  
18
DESCRIPTION="foobar2k-like music player"
19
HOMEPAGE="http://deadbeef.sourceforge.net"
20

  
21
LICENSE="BSD
22
	UNICODE
23
	ZLIB
24
	aac? ( GPL-1 GPL-2 )
25
	adplug? ( LGPL-2.1 ZLIB )
26
	alac? ( MIT GPL-2 )
27
	alsa? ( GPL-2 )
28
	cdda? ( GPL-2 LGPL-2 GPL-3 )
29
	cdparanoia? ( GPL-2 )
30
	cover? ( ZLIB )
31
	converter? ( GPL-2 )
32
	curl? ( curl ZLIB )
33
	dts? ( GPL-2 )
34
	dumb? ( DUMB-0.9.3 ZLIB )
35
	equalizer? ( GPL-2 )
36
	ffmpeg? ( GPL-2 )
37
	flac? ( BSD )
38
	gme? ( LGPL-2.1 )
39
	gtk2? ( GPL-2 )
40
	gtk3? ( GPL-2 )
41
	hotkeys? ( ZLIB )
42
	lastfm? ( GPL-2 )
43
	libav? ( GPL-2 )
44
	libnotify? ( GPL-2 )
45
	libsamplerate? ( GPL-2 )
46
	m3u? ( ZLIB )
47
	mac? ( GPL-2 )
48
	mad? ( GPL-2 ZLIB )
49
	midi? ( LGPL-2.1 ZLIB )
50
	mms? ( GPL-2 ZLIB )
51
	mono2stereo? ( ZLIB )
52
	mpg123? ( LGPL-2.1 ZLIB )
53
	musepack? ( BSD ZLIB )
54
	nullout? ( ZLIB )
55
	opus? ( ZLIB )
56
	oss? ( GPL-2 )
57
	playlist-browser? ( ZLIB )
58
	psf? ( BSD GPL-1 MAME ZLIB )
59
	pulseaudio? ( GPL-2 )
60
	shell-exec? ( GPL-2 )
61
	shn? ( shorten ZLIB )
62
	sid? ( GPL-2 )
63
	sndfile? ( GPL-2 LGPL-2 )
64
	tta? ( BSD ZLIB )
65
	vorbis? ( BSD ZLIB )
66
	vtx? ( GPL-2 ZLIB )
20 67
	wavpack? ( BSD )
21
"
68
	wma? ( GPL-2 LGPL-2 ZLIB )
69
	zip? ( ZLIB )"
70

  
22 71
SLOT="0"
23
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 vorbis wavpack"
24 72

  
25
REQUIRED_USE="
26
	|| ( alsa oss pulseaudio pipewire nullout )
27
"
28

  
29
DEPEND="
30
	>=app-accessibility/at-spi2-core-2.46.0
31
	dev-libs/glib:2
32
	dev-libs/jansson:=
33
	dev-libs/libdispatch
34
	net-misc/curl
35
	x11-libs/cairo
36
	x11-libs/gdk-pixbuf:2
37
	x11-libs/gtk+:3
38
	x11-libs/libX11
39
	x11-libs/pango
40
	aac? ( media-libs/faad2 )
41
	alsa? ( media-libs/alsa-lib )
42
	cdda? (
43
		dev-libs/libcdio:=
44
		media-libs/libcddb
45
		media-sound/cdparanoia
46
	)
47
	cover? ( media-libs/imlib2[jpeg,png] )
48
	dts? ( media-libs/libdca )
49
	ffmpeg? ( media-video/ffmpeg:= )
50
	flac? (
51
		media-libs/flac:=
52
		media-libs/libogg
53
	)
54
	libsamplerate? ( media-libs/libsamplerate )
55
	mp3? ( media-sound/mpg123 )
56
	musepack? ( media-sound/musepack-tools )
57
	nls? ( virtual/libintl )
58
	notify? ( sys-apps/dbus )
59
	opus? ( media-libs/opusfile )
60
	pulseaudio? ( media-libs/libpulse )
61
	pipewire? ( media-video/pipewire:= )
62
	vorbis? ( media-libs/libvorbis )
63
	wavpack? ( media-sound/wavpack )
64
"
65

  
66
RDEPEND="${DEPEND}"
67
BDEPEND="
68
	dev-util/intltool
69
	sys-devel/clang
70
	>=sys-devel/gettext-0.21
71
	sys-devel/llvm
72
	virtual/pkgconfig
73
"
74

  
75
PATCHES=(
76
	"${FILESDIR}"/${PN}-1.9.6-drop-Werror.patch
77
	"${FILESDIR}"/${PN}-1.9.6-update-gettext.patch
78
	"${FILESDIR}"/${PN}-1.9.6-fix-desktop-launcher.patch
79
)
73
IUSE="+alsa +flac +gtk2 +hotkeys +m3u +mad +mp3 +sndfile +vorbis
74
	aac adplug alac cdda cdparanoia converter cover cover-imlib2 cover-network curl dts dumb equalizer
75
	ffmpeg gme gtk3 lastfm libav libnotify libsamplerate mac midi mms mono2stereo mpg123 musepack nls
76
	nullout opus oss playlist-browser psf pulseaudio replaygain-scanner sc68 shell-exec shn sid tta unity vtx wavpack wma zip"
77

  
78
REQUIRED_USE="cdparanoia? ( cdda )
79
	converter? ( || ( gtk2 gtk3 ) )
80
	cover-imlib2? ( cover )
81
	cover-network? ( cover curl )
82
	cover? ( || ( gtk2 gtk3 ) )
83
	ffmpeg? ( !libav )
84
	lastfm? ( curl )
85
	libav? ( !ffmpeg )
86
	mp3? ( || ( mad mpg123 ) )
87
	playlist-browser? ( || ( gtk2 gtk3 ) )
88
	shell-exec? ( || ( gtk2 gtk3 ) )
89
	|| ( alsa oss pulseaudio nullout )"
90

  
91
PDEPEND="media-plugins/deadbeef-plugins-meta:0"
92

  
93
RDEPEND="dev-libs/glib:2
94
	aac? ( media-libs/faad2:0 )
95
	adplug? ( media-libs/adplug:0 )
96
	alsa? ( media-libs/alsa-lib:0 )
97
	alac? ( media-libs/faad2:0 )
98
	cdda? ( dev-libs/libcdio:0=
99
		media-libs/libcddb:0 )
100
	cdparanoia? ( dev-libs/libcdio-paranoia:0 )
101
	cover? ( cover-imlib2? ( media-libs/imlib2:0 )
102
		media-libs/libpng:0=
103
		virtual/jpeg:0
104
		x11-libs/gdk-pixbuf:2[jpeg] )
105
	curl? ( net-misc/curl:0 )
106
	ffmpeg? ( media-video/ffmpeg:0= )
107
	libav? ( media-video/libav:0= )
108
	flac? ( media-libs/flac:0 )
109
	gme? ( sys-libs/zlib:0 )
110
	gtk2? ( dev-libs/atk:0
111
		dev-libs/jansson:0
112
		x11-libs/cairo:0
113
		x11-libs/gtk+:2
114
		x11-libs/pango:0 )
115
	gtk3? ( dev-libs/jansson:0
116
		x11-libs/gtk+:3 )
117
	hotkeys? ( x11-libs/libX11:0 )
118
	libnotify? ( sys-apps/dbus:0 )
119
	libsamplerate? ( media-libs/libsamplerate:0 )
120
	mad? ( media-libs/libmad:0 )
121
	midi? ( media-sound/timidity-freepats:0 )
122
	mpg123? ( media-sound/mpg123:0 )
123
	opus? ( media-libs/opusfile:0 )
124
	psf? ( sys-libs/zlib:0 )
125
	pulseaudio? ( media-sound/pulseaudio:0 )
126
	sndfile? ( media-libs/libsndfile:0 )
127
	vorbis? ( media-libs/libogg:0
128
		media-libs/libvorbis:0 )
129
	wavpack? ( media-sound/wavpack:0 )
130
	zip? ( dev-libs/libzip:0 )"
131

  
132
DEPEND="${RDEPEND}
133
	virtual/pkgconfig:0
134
	nls? ( dev-util/intltool:0
135
		virtual/libintl:0 )
136
	mac? ( x86? ( dev-lang/yasm:0 )
137
		amd64? ( dev-lang/yasm:0 ) )"
80 138

  
81 139
src_prepare() {
82
	default
140
	if ! use_if_iuse linguas_ru ; then
141
		eapply "${FILESDIR}/${P}-remove-ru-help-translation.patch"
142
		rm -v "${S}/translation/help.ru.txt" || die
143
	fi
83 144

  
84
	drop_from_linguas() {
85
		sed "/${1}/d" -i "${S}/po/LINGUAS" || die
86
	}
87

  
88
	drop_and_stub() {
89
		einfo drop_and_stub "${1}"
90
		rm -r "${1}" || die
91
		mkdir "${1}" || die
92
		cat > "${1}/Makefile.in" <<-EOF || die
93
			all: nothing
94
			install: nothing
95
			nothing:
96
		EOF
97
	}
145
	if use midi ; then
146
		# set default gentoo path
147
		sed -e 's;/etc/timidity++/timidity-freepats.cfg;/usr/share/timidity/freepats/timidity.cfg;g' \
148
			-i "${S}/plugins/wildmidi/wildmidiplug.c" || die
149
	fi
150

  
151
	if ! use unity ; then
152
		# remove unity trash
153
		eapply "${FILESDIR}/${P}-remove-unity-trash.patch"
154
	fi
98 155

  
99
	plocale_for_each_disabled_locale drop_from_linguas || die
156
	eapply_user
100 157

  
101
	eautopoint --force
158
	config_rpath_update "${S}/config.rpath"
102 159
	eautoreconf
160
}
103 161

  
104
	# Get rid of bundled gettext. (Avoid build failures with musl)
105
	drop_and_stub "${S}/intl"
162
src_configure() {
163
	if use ffmpeg && ! use libav ; then
164
		ffmpeg_configure="$(use_enable ffmpeg)"
165
	elif use libav && ! use ffmpeg ; then
166
		ffmpeg_configure="$(use_enable libav ffmpeg)"
167
	fi
106 168

  
107
	# Plugins that are undesired for whatever reason, candidates for unbundling and such.
108
	for i in adplug alac dumb ffap mms gme mono2stereo psf shn sid soundtouch wma; do
109
		drop_and_stub "${S}/plugins/${i}"
110
	done
169
	econf --disable-coreaudio \
170
		--disable-portable \
171
		--disable-static \
172
		--docdir=/usr/share/${PN} \
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
}
111 224

  
112
	rm -r "${S}/plugins/rg_scanner/ebur128" || die
225
pkg_preinst() {
226
	if use gtk2 || use gtk3 ; then
227
		gnome2_icon_savelist
228
	fi
113 229
}
114 230

  
115
src_configure () {
116
	if ! tc-is-clang; then
117
		AR=llvm-ar
118
		CC=${CHOST}-clang
119
		CXX=${CHOST}-clang++
120
		NM=llvm-nm
121
		RANLIB=llvm-ranlib
122

  
123
		strip-unsupported-flags
124
	fi
125

  
126
	export HOST_CC="$(tc-getBUILD_CC)"
127
	export HOST_CXX="$(tc-getBUILD_CXX)"
128
	tc-export CC CXX LD AR NM OBJDUMP RANLIB PKG_CONFIG
129

  
130
	local myconf=(
131
		"--disable-staticlink"
132
		"--disable-portable"
133
		"--disable-rpath"
134

  
135
		"--disable-libmad"
136
		"--disable-gtk2"
137
		"--disable-adplug"
138
		"--disable-coreaudio"
139
		"--disable-dumb"
140
		"--disable-alac"
141
		"--disable-ffap"
142
		"--disable-gme"
143
		"--disable-mms"
144
		"--disable-mono2stereo"
145
		"--disable-psf"
146
		"--disable-rgscanner"
147
		"--disable-shn"
148
		"--disable-sid"
149
		"--disable-sndfile"
150
		"--disable-soundtouch"
151
		"--disable-tta"
152
		"--disable-vfs-zip"
153
		"--disable-vtx"
154
		"--disable-wildmidi"
155
		"--disable-wma"
156

  
157
		"$(use_enable alsa)"
158
		"$(use_enable oss)"
159
		"$(use_enable pulseaudio pulse)"
160
		"$(use_enable mp3)"
161
		"$(use_enable mp3 libmpg123)"
162
		"$(use_enable nls)"
163
		"$(use_enable vorbis)"
164
		"$(use_enable flac)"
165
		"$(use_enable supereq)"
166
		"$(use_enable cdda)"
167
		"$(use_enable cdda cdda-paranoia)"
168
		"$(use_enable aac)"
169
		"$(use_enable cover artwork)"
170
		"$(use_enable cover artwork-network)"
171
		"$(use_enable dts dca)"
172
		"$(use_enable ffmpeg)"
173
		"$(use_enable converter)"
174
		"$(use_enable musepack)"
175
		"$(use_enable notify)"
176
		"$(use_enable nullout)"
177
		"$(use_enable opus)"
178
		"$(use_enable pulseaudio pulse)"
179
		"$(use_enable pipewire)"
180
		"$(use_enable sc68)"
181
		"$(use_enable shellexec)"
182
		"$(use_enable shellexec shellexecui)"
183
		"$(use_enable lastfm lfm)"
184
		"$(use_enable libretro)"
185
		"$(use_enable libsamplerate src)"
186
		"$(use_enable wavpack)"
187

  
188
		"--enable-gtk3"
189
		"--enable-vfs-curl"
190
		"--enable-shared"
191
		"--enable-m3u"
192
		"--enable-pltbrowser"
193
	)
231
pkg_postinst() {
232
	xdg_desktop_database_update
233
	xdg_mimeinfo_database_update
194 234

  
195
	econf "${myconf[@]}"
235
	if use gtk2 || use gtk3 ; then
236
		gnome2_icon_cache_update
237
	fi
196 238
}
197 239

  
198
src_install() {
199
	default
240
pkg_postrm() {
241
	xdg_desktop_database_update
242
	xdg_mimeinfo_database_update
200 243

  
201
	find "${ED}" -name '*.la' -delete || die
244
	if use gtk2 || use gtk3 ; then
245
		gnome2_icon_cache_update
246
	fi
202 247
}
Thank you!