summaryrefslogtreecommitdiff
path: root/user/vlc/APKBUILD
blob: 8085ebcb548df8aa0c9b11adcb6e25e517e074f9 (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
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=vlc
pkgver=3.0.17.3
pkgrel=2
pkgdesc="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+"
options="textrel"
subpackages="$pkgname-dev $pkgname-doc $pkgname-qt $pkgname-pulse
	$pkgname-daemon::noarch $pkgname-libs $pkgname-lang"
depends="ttf-dejavu xdg-utils"
# Generic dependencies, then X11, then multimedia libraries
makedepends="autoconf automake bison eudev-dev flex libarchive-dev
	libgcrypt-dev libtool libxml2-dev lua5.3-dev ncurses-dev sysfsutils-dev

	dbus-dev freetype-dev fribidi-dev gtk+3.0-dev libice-dev libnotify-dev
	libjpeg-turbo-dev libsm-dev libx11-dev libxext-dev libxinerama-dev
	libxpm-dev libxv-dev mesa-dev qt5-qtbase-dev qt5-qtsvg-dev sdl2-dev
	qt5-qtx11extras-dev xcb-util-keysyms-dev xcb-util-renderutil-dev
	xdg-utils

	a52dec-dev alsa-lib-dev faad2-dev ffmpeg-dev flac-dev fluidsynth-dev
	gstreamer-dev gst-plugins-base-dev libaacs-dev libavc1394-dev
	libbluray-dev>=0.2.1 libbluray-dev<20100000 libcddb-dev libdc1394-dev
	libdca-dev libdvbpsi-dev libdvdnav-dev libdvdread-dev libmad-dev
	libmatroska-dev libmodplug-dev libmpeg2-dev libmtp-dev libogg-dev
	libraw1394-dev>=2.0.1 librsvg-dev libshout-dev libtheora-dev libva-dev
	libvdpau-dev libvorbis-dev live-media-dev opus-dev pulseaudio-dev
	speex-dev speexdsp-dev taglib-dev v4l-utils-dev x264-dev x265-dev"
replaces="vlc-plugins vlc-xorg"
source="https://get.videolan.org/vlc/$pkgver/vlc-$pkgver.tar.xz
	check-headless.patch
	disable-sub-autodetect-fuzzy-1-test.patch
	endian-fix.patch
	fix-testing.patch
	lua.patch
	omxil-rpi-codecs.patch
	tar-compat.patch
	test-s390x.patch

	$pkgname.initd
	$pkgname.confd
	"

# secfixes: vlc_media_player
#   3.0.4-r2:
#     - CVE-2018-19857
#   3.0.8-r0:
#     - CVE-2019-13602
#     - CVE-2019-13615
#     - CVE-2019-13962
#     - CVE-2019-14437
#     - CVE-2019-14438
#     - CVE-2019-14498
#     - CVE-2019-14533
#     - CVE-2019-14534
#     - CVE-2019-14535
#     - CVE-2019-14776
#     - CVE-2019-14777
#     - CVE-2019-14778
#     - CVE-2019-14970

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

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

	case "$CARCH" in
	arm*) _arch_opts="--enable-omxil --enable-omxil-vout --enable-rpi-omxil" ;;
	aarch64) _arch_opts="--enable-neon" ;;
	ppc64*) _arch_opts="--enable-altivec" ;;
	ppc) _arch_opts="--disable-altivec" ;;
	x86* | pmmx) _arch_opts="--disable-mmx --disable-sse" ;;
	esac

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

	make
}

package() {
	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() {
	make check
}

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

pulse() {
	pkgdesc="PulseAudio support for VLC"
	depends=""
	install_if="vlc=$pkgver-r$pkgrel pulseaudio"
	mkdir -p "$subpkgdir"/usr/lib/vlc
	mv "$pkgdir"/usr/lib/vlc/libvlc_pulse* "$subpkgdir"/usr/lib/vlc/
}

qt() {
	pkgdesc="Qt frontend for VLC"
	depends="vlc=$pkgver-r$pkgrel"
	install_if="vlc=$pkgver-r$pkgrel qt5-qtbase-x11"
	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/
}

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 "$srcdir"/vlc.initd "$subpkgdir"/etc/init.d/vlc
	install -D -m664 "$srcdir"/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
}

sha512sums="99095b39ed600c3a89ebc0d377a2fc2522b3623a56b0f6de2df50a3c6e0148c67c28c0f2d8dec28bbdf5c62cf29b3579429a79ed00440570643778a9871022b6  vlc-3.0.17.3.tar.xz
22d80df599b8b65a5439cefbb7140af8e9530f326d54945da3769af65f37518b99ec2cc8647aafd2763324a0698280915afe043cc87e5720c4694881ed35bffa  check-headless.patch
e214b407235cb3afb8bec93f20c9b42957b57e6fd3960679d3d4235e77762e03e64d03c01f00ef63d589e7c85aaad02ce6abbeeccd66b1867bc92451a5b5e9b0  disable-sub-autodetect-fuzzy-1-test.patch
e063c727d952465bbea33f669db49190427521dc8e2291e9a5cbb0f5e8e879bd3ba76855e44bd4630948e30c4329d27bd928f95de20fe1050d5e839778a4d012  endian-fix.patch
63adb16b3a1927ee3de27ac339cbfbbaa346a69928c527f883259d1e03b5cb59f26a55feeda767837b448c455de584abcb53dc733b2845c0cc13621d72e7f6fd  fix-testing.patch
35f83e38a6a0dd1e3c37e3dc6d63b1406d2f9454ed246854c1408d6f35ad74b743c5b0dbc19442bab65aad4268707ffa85bfda9e72b2d711c1d3412d955bf150  lua.patch
e13e398b7bfd977f6e099bcb6cf8dc5cd5bad6dea3eff715881826246dc4329468846084aff2576de2b7fd28d3f06e7c327a6e4511a28d22e5cd198a81146c89  omxil-rpi-codecs.patch
3557686d76ab26fd401cb8758944b23173e6983f55b34d923d6808a2cc1f8efa9d0de58ab3b1664c713a579d1a94c4fcd8d731327eebd23c599bf037571e5406  tar-compat.patch
c0107655249687655846a9547ca1a5670b9207443180600e7a149c69ffb96d7226787c19b018d4033db9b284c1a5faa8d7d42188ed40c3b8bb051256febf11c5  test-s390x.patch
55e245190b443dde9c7215ea5210612fcca164900a9a4b025ccf0d1e3fc5206d00b52355b256974421e37c609875627f1db19f0f5a084511aec0daf677ecc9d6  vlc.initd
d89190dca1b8b2c3faca5863dc6c7e6eb24e05178e6f75ed752fd3c6a73cb8a42d2625b6e56453296b7096ea868be642ecd42745dac20e7f13fc67dd3c3c7c49  vlc.confd"