summaryrefslogtreecommitdiff
path: root/system/vlc/APKBUILD
blob: 95a9b9fead93041f8abcc1abec16bc6a886f650d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=vlc
pkgver=3.0.1
_pkgver=${pkgver/_/-}
_ver=${_pkgver%[a-z]}
pkgrel=0
pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player"
triggers="vlc-libs.trigger=/usr/lib/vlc/plugins"
pkgusers="vlc"
pkggroups="vlc"
url="https://www.videolan.org/vlc/"
arch="all"
license="GPL-2.0-or-later"
options="!checkroot textrel"
subpackages="$pkgname-dev
	$pkgname-doc
	$pkgname-qt
	$pkgname-xorg
	$pkgname-daemon::noarch
	$pkgname-libs
	$pkgname-plugins

	$pkgname-plugins-access:plugins_access
	$pkgname-plugins-access_output:plugins_access_output
	$pkgname-plugins-audio_filter:plugins_audio_filter
	$pkgname-plugins-audio_mixer:plugins_audio_mixer
	$pkgname-plugins-audio_output:plugins_audio_output
	$pkgname-plugins-codec:plugins_codec
	$pkgname-plugins-control:plugins_control
	$pkgname-plugins-demux:plugins_demux
	$pkgname-plugins-gui:plugins_gui
	$pkgname-plugins-lua:plugins_lua
	$pkgname-plugins-meta_engine:plugins_meta_engine
	$pkgname-plugins-misc:plugins_misc
	$pkgname-plugins-mux:plugins_mux
	$pkgname-plugins-notify:plugins_notify
	$pkgname-plugins-packetizer:plugins_packetizer
	$pkgname-plugins-services_discovery:plugins_services_discovery
	$pkgname-plugins-stream_filter:plugins_stream_filter
	$pkgname-plugins-stream_out:plugins_stream_out
	$pkgname-plugins-text_renderer:plugins_text_renderer
	$pkgname-plugins-video_chroma:plugins_video_chroma
	$pkgname-plugins-video_filter:plugins_video_filter
	$pkgname-plugins-video_output:plugins_video_output
	$pkgname-plugins-visualization:plugins_visualization"
depends="ttf-dejavu $pkgname-plugins"
makedepends="
	a52dec-dev
	alsa-lib-dev
	automake
	autoconf
	bison
	libtool
	dbus-dev
	faad2-dev
	ffmpeg-dev
	flac-dev
	flex
	fluidsynth-dev
	freetype-dev
	fribidi-dev
	gtk+3.0-dev
	libbluray-dev>=0.2.1 libbluray-dev<20100000
	libavc1394-dev
	libcddb-dev
	libdc1394-dev>=2.1.0
	libdca-dev
	libdvbpsi-dev
	libdvdnav-dev
	libdvdread-dev
	libgcrypt-dev
	libice-dev
	libmad-dev
	libmatroska-dev
	libmpeg2-dev
	libnotify-dev
	libogg-dev
	libraw1394-dev>=2.0.1
	librsvg-dev
	libshout-dev
	libsm-dev
	libtheora-dev
	libva-dev
	libvdpau-dev
	libvorbis-dev
	libvpx-dev
	libx11-dev
	libxext-dev
	libxinerama-dev
	libxml2-dev
	libxpm-dev
	libxv-dev
	live-media-dev>=2012.01.26
	lua5.2-dev
	mesa-dev
	ncurses-dev
	opus-dev
	pkgconfig
	pulseaudio-dev
	qt5-qtbase-dev
	qt5-qtsvg-dev
	sdl2-dev
	speex-dev
	speexdsp-dev
	sysfsutils-dev
	taglib-dev
	eudev-dev
	v4l-utils-dev
	wayland-protocols
	x264-dev
	x265-dev
	xcb-util-renderutil-dev
	xcb-util-keysyms-dev
	xdg-utils
	"
source="http://get.videolan.org/vlc/$_ver/vlc-$_ver.tar.xz
	omxil-rpi-codecs.patch
	check-headless.patch
	disable-sub-autodetect-fuzzy-1-test.patch
	fribidi-update.patch
	tar-compat.patch
	test-s390x.patch
	vlc-libs.trigger"

builddir="$srcdir"/$pkgname-$_ver

prepare() {
	default_prepare
	 NOCONFIGURE=1 ./bootstrap
}

build() {
	local _arch_opts=
	cd "$builddir"
	export CFLAGS="$CFLAGS -D_GNU_SOURCE"

	case "$CARCH" in
	arm*) _arch_opts="--enable-omxil --enable-omxil-vout --enable-rpi-omxil" ;;
	ppc64*) _arch_opts="--enable-altivec" ;;
	esac

	LUA=lua5.2 \
	LUAC=luac5.2 \
	BUILDCC="${CC:-gcc} -std=c99" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-mmx \
		--disable-sse \
		--enable-nls \
		--enable-optimizations \
		--enable-optimize-memory \
		--disable-rpath \
		--enable-a52 \
		--enable-avcodec \
		--enable-avformat \
		--enable-bluray \
		--enable-cdda \
		--enable-dbus \
		--enable-dc1394 \
		--enable-dca \
		--enable-dvbpsi \
		--enable-dvdread \
		--enable-dvdnav \
		--enable-faad \
		--enable-flac \
		--enable-fluidsynth \
		--enable-jpeg \
		--enable-libcddb \
		--enable-libmpeg2 \
		--enable-libva \
		--enable-live555 \
		--enable-mad \
		--enable-merge-ffmpeg \
		--enable-notify \
		--enable-ncurses \
		--enable-ogg \
		--enable-opus \
		--enable-png \
		--enable-pulse \
		--enable-qt \
		--enable-realrtsp \
		--enable-shout \
		--enable-skins2 \
		--enable-speex \
		--enable-sout \
		--enable-taglib \
		--enable-theora \
		--enable-udev \
		--enable-v4l2 \
		--enable-vdpau \
		--enable-vlm \
		--enable-vorbis \
		--enable-vpx \
		--enable-wma-fixed \
		--enable-x264 \
		--enable-x265 \
		--enable-xvideo \
		$_arch_opts

	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	# delete cache as it's autocreated by trigger
	rm -rf "$pkgdir"/usr/lib/vlc/plugins/plugins.dat
	# delete unneeded mozilla and kde support files
	rm -rf "$pkgdir"/usr/lib/mozilla
	rm -rf "$pkgdir"/usr/share/kde4
}

check() {
	cd "$builddir"
	make check
}

plugins() {
	pkgdesc="$pkgname all plugins meta package"
	depends="$pkgname-plugins-access
		$pkgname-plugins-access_output
		$pkgname-plugins-audio_filter
		$pkgname-plugins-audio_mixer
		$pkgname-plugins-audio_output
		$pkgname-plugins-codec
		$pkgname-plugins-control
		$pkgname-plugins-demux
		$pkgname-plugins-gui
		$pkgname-plugins-lua
		$pkgname-plugins-meta_engine
		$pkgname-plugins-misc
		$pkgname-plugins-mux
		$pkgname-plugins-notify
		$pkgname-plugins-packetizer
		$pkgname-plugins-services_discovery
		$pkgname-plugins-stream_filter
		$pkgname-plugins-stream_out
		$pkgname-plugins-text_renderer
		$pkgname-plugins-video_chroma
		$pkgname-plugins-video_filter
		$pkgname-plugins-video_output
		$pkgname-plugins-visualization"
	mkdir -p "$subpkgdir"
}

_mv() {
	local dir=${1%/*}
	mkdir -p "$subpkgdir"/$dir
	mv "$1" "$subpkgdir"/$dir/
}

qt() {
	pkgdesc="Qt frontend for VLC"
	depends="vlc-xorg=$pkgver-r$pkgrel"
	cd "$pkgdir"
	# scan for elf files that directly or indirectly depends on
	# libQt* libraries
	cd "$pkgdir"
	for i in $(find . -type f ); do
		if ldd $i 2>/dev/null | grep -q "libQt"; then
			_mv "$i" || return 1
		fi
	done
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/qvlc \
		"$subpkgdir"/usr/bin/
}

xorg() {
	pkgdesc="Video LAN X.org support"
	depends="xdg-utils vlc=$pkgver-r$pkgrel"

	# scan for elf files that directly or indirectly depends on
	# libX* libraries
	cd "$pkgdir"
	for i in $(find . -type f ); do
		if ldd $i 2>/dev/null | grep -E -q "libX|x11|libxcb|libGL"; then
			echo $i | grep libavcodec_plugin.so || _mv "$i" || return 1
		fi
	done

	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/svlc \
		"$subpkgdir"/usr/bin

	mkdir -p "$subpkgdir"/usr/share/vlc
	mv "$pkgdir"/usr/share/applications \
		"$pkgdir"/usr/share/icons \
		"$subpkgdir"/usr/share/

	mv "$pkgdir"/usr/share/vlc/skins2 \
		"$subpkgdir"/usr/share/vlc
}

daemon() {
	pkgdesc="Support for running VLC as a daemon"
	install="vlc-daemon.pre-install"
	depends="vlc=$pkgver-r$pkgrel"

	mkdir -p "$subpkgdir"
	cd "$pkgdir"
	install -D -m755 ../../vlc.initd $subpkgdir/etc/init.d/vlc
	install -D -m664 ../../vlc.confd $subpkgdir/etc/conf.d/vlc
	install -d -o vlc -g vlc "$subpkgdir"/var/log/vlc
}

libs() {
	depends=
	mkdir -p "$subpkgdir"/usr/lib/vlc
	mv "$pkgdir"/usr/lib/vlc/vlc-cache-gen \
		"$subpkgdir"/usr/lib/vlc/
	default_libs
}

_mv_plugins() {
	local plugin=$1
	pkgdesc="$pkgname $plugin plugin"
	depends=
	mkdir -p "$subpkgdir"/usr/lib/vlc/plugins
	mv "$pkgdir"/usr/lib/vlc/plugins/"$plugin" \
		"$subpkgdir"/usr/lib/vlc/plugins
}

plugins_access()		{ _mv_plugins access; }
plugins_access_output()		{ _mv_plugins access_output; }
plugins_audio_filter()		{ _mv_plugins audio_filter; }
plugins_audio_mixer()		{ _mv_plugins audio_mixer; }
plugins_audio_output()		{ _mv_plugins audio_output; }
plugins_codec()			{ _mv_plugins codec; }
plugins_control()		{ _mv_plugins control; }
plugins_demux()			{ _mv_plugins demux; }
plugins_gui()			{ _mv_plugins gui; }
plugins_lua()			{ _mv_plugins lua; }
plugins_meta_engine()		{ _mv_plugins meta_engine; }
plugins_misc()			{ _mv_plugins misc; }
plugins_mux()			{ _mv_plugins mux; }
plugins_notify()		{ _mv_plugins notify; }
plugins_packetizer()		{ _mv_plugins packetizer; }
plugins_services_discovery()	{ _mv_plugins services_discovery; }
plugins_stream_filter()		{ _mv_plugins stream_filter; }
plugins_stream_out()		{ _mv_plugins stream_out; }
plugins_text_renderer()		{ _mv_plugins text_renderer; }
plugins_video_chroma()		{ _mv_plugins video_chroma; }
plugins_video_filter()		{ _mv_plugins video_filter; }
plugins_video_output()		{ _mv_plugins video_output; }
plugins_visualization()		{ _mv_plugins visualization; }

sha512sums="f2ba7586e8fb8c04484e62809265ec998e875b1eff03262bbf463370277a318816cbb8d260901c774e59443393b16b040cb714019c80e051578008abbf91b13c  vlc-3.0.1.tar.xz
e13e398b7bfd977f6e099bcb6cf8dc5cd5bad6dea3eff715881826246dc4329468846084aff2576de2b7fd28d3f06e7c327a6e4511a28d22e5cd198a81146c89  omxil-rpi-codecs.patch
22d80df599b8b65a5439cefbb7140af8e9530f326d54945da3769af65f37518b99ec2cc8647aafd2763324a0698280915afe043cc87e5720c4694881ed35bffa  check-headless.patch
e214b407235cb3afb8bec93f20c9b42957b57e6fd3960679d3d4235e77762e03e64d03c01f00ef63d589e7c85aaad02ce6abbeeccd66b1867bc92451a5b5e9b0  disable-sub-autodetect-fuzzy-1-test.patch
3338531d385f76d9eedf10498d1b0b78565c531eedb3018d4500e377815f9ccbfcc16ec398cb8559bcc624f65b61d376125c4a5e6880cbad90ec9880dd4b9ce5  fribidi-update.patch
a117ca4d7fd66a5f959fdeaddfdce2f8442fe9f2c13995bb7f4792a7745c00813813aa962f76e957e3b0735344a5dc000e0644ce09f23458802a2932231655c3  tar-compat.patch
c0107655249687655846a9547ca1a5670b9207443180600e7a149c69ffb96d7226787c19b018d4033db9b284c1a5faa8d7d42188ed40c3b8bb051256febf11c5  test-s390x.patch
b67b6e21e9d4027aef1006e6057f9ba8e65ce3895b08f7b911b1675cff9bc423f64ee2c187c584860e9e5d4635a30408a7781add9694d9bba753eac37f357406  vlc-libs.trigger"