aboutsummaryrefslogtreecommitdiffstats
path: root/community/ffmpeg/APKBUILD
blob: 210a6b679c833fc38272e85c4a45d06207e21975 (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
# Contributor: Sergei Lukin <sergej.lukin@gmail.com>
# Contributor: Ɓukasz Jendrysik <scadu@yandex.com>
# Contributor: Jakub Skrzypnik <j.skrzypnik@openmailbox.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ffmpeg
pkgver=4.4.1
pkgrel=3
pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix"
url="https://ffmpeg.org/"
arch="all"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
options="!check" # tests/data/hls-lists.append.m3u8 fails
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
makedepends="
	alsa-lib-dev
	aom-dev
	bzip2-dev
	coreutils
	gnutls-dev
	imlib2-dev
	lame-dev
	libass-dev
	libsrt-dev
	libssh-dev
	libtheora-dev
	libva-dev
	libvdpau-dev
	libvorbis-dev
	libvpx-dev
	libwebp-dev
	libxfixes-dev
	opus-dev
	perl-dev
	sdl2-dev
	soxr-dev
	v4l-utils-dev
	x264-dev
	x265-dev
	xvidcore-dev
	yasm
	zlib-dev
	dav1d-dev
	vidstab-dev
	vulkan-loader-dev
	"
checkdepends="rsync"
source="https://ffmpeg.org/releases/ffmpeg-$pkgver.tar.xz
	0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
	0001-ffbuild-libversion.sh-add-shebang.patch
	"

# secfixes:
#   4.4.1-r0:
#     - CVE-2020-20446
#     - CVE-2020-20453
#     - CVE-2020-22015
#     - CVE-2020-22019
#     - CVE-2020-22021
#     - CVE-2020-22037
#     - CVE-2021-38114
#     - CVE-2021-38171
#     - CVE-2021-38291
#   4.4-r1:
#     - CVE-2021-33815
#   4.4-r0:
#     - CVE-2020-20450
#     - CVE-2020-21041
#     - CVE-2020-22038
#     - CVE-2020-22042
#     - CVE-2020-24020
#     - CVE-2021-30123
#   4.3.2-r0:
#     - CVE-2020-35964
#     - CVE-2020-35965
#   4.3.1-r0:
#     - CVE-2020-14212
#   4.3-r0:
#     - CVE-2020-13904
#     - CVE-2020-12284
#   4.2.1-r0:
#     - CVE-2019-15942
#   4.2-r0:
#     - CVE-2019-17539
#     - CVE-2019-17542
#   4.1.4-r0:
#     - CVE-2019-12730
#   4.1.3-r0:
#     - CVE-2019-9718
#     - CVE-2019-9721
#     - CVE-2019-11338
#     - CVE-2019-11339
#   4.1.1-r0:
#     - CVE-2019-1000016
#   4.1-r0:
#     - CVE-2018-13305
#     - CVE-2018-15822
#   4.0.2-r0:
#     - CVE-2018-13301
#     - CVE-2018-13303
#     - CVE-2018-13304
#     - CVE-2018-1999010
#     - CVE-2018-1999011
#     - CVE-2018-1999012
#     - CVE-2018-1999013
#     - CVE-2018-1999014
#     - CVE-2018-1999015
#   4.0.1-r0:
#     - CVE-2018-12459
#     - CVE-2018-12460
#   4.0.0-r0:
#     - CVE-2018-6912
#     - CVE-2018-7757
#     - CVE-2018-9841
#   3.4.4-r0:
#     - CVE-2018-14395
#   3.4.3-r0:
#     - CVE-2018-7557
#     - CVE-2018-7751
#     - CVE-2018-10001
#     - CVE-2018-12458
#     - CVE-2018-13300
#     - CVE-2018-13302
#     - CVE-2018-14394
#   3.3.4-r0:
#     - CVE-2017-14054
#     - CVE-2017-14055
#     - CVE-2017-14056
#     - CVE-2017-14057
#     - CVE-2017-14058
#     - CVE-2017-14059
#     - CVE-2017-14169
#     - CVE-2017-14170
#     - CVE-2017-14171
#     - CVE-2017-14222
#     - CVE-2017-14223
#     - CVE-2017-14225

# This is a huge library of audio/video codecs; performance matters,
# compiling it with -Os doesn't make sense.
export CFLAGS=${CFLAGS/-Os/}
export CPPFLAGS=${CPPFLAGS/-Os/}
export CXXFLAGS=${CXXFLAGS/-Os/}

build() {
	local _dbg="--disable-debug"
	local _asm=""
	[ -n "$DEBUG" ] && _dbg="--enable-debug"

	case "$CARCH" in
	x86) _asm="--disable-asm" ;;
	mips*) _asm="--disable-asm --disable-inline-asm --disable-mipsdsp --disable-mipsdspr2 --disable-msa --disable-msa2 --disable-mipsfpu --disable-mips64r6 --disable-mips64r2" ;;
	esac

	./configure \
		--prefix=/usr \
		--enable-avresample \
		--enable-avfilter \
		--enable-gnutls \
		--enable-gpl \
		--enable-libass \
		--enable-libmp3lame \
		--enable-libvorbis \
		--enable-libvpx \
		--enable-libxvid \
		--enable-libx264 \
		--enable-libx265 \
		--enable-libtheora \
		--enable-libv4l2 \
		--enable-libdav1d \
		--enable-lto \
		--enable-postproc \
		--enable-pic \
		--enable-pthreads \
		--enable-shared \
		--enable-libxcb \
		--enable-libsrt \
		--enable-libssh \
		--enable-libvidstab \
		--disable-stripping \
		--disable-static \
		--disable-librtmp \
		--enable-libaom \
		--enable-libopus \
		--enable-libsoxr \
		--enable-libwebp \
		--enable-vaapi \
		--enable-vdpau \
		--enable-vulkan \
		$_asm $_dbg
	make
	${CC:-gcc} -o tools/qt-faststart $CFLAGS tools/qt-faststart.c
	make doc/ffmpeg.1 doc/ffplay.1
}

# https://ffmpeg.org/fate.html
check() {
	./configure \
		--samples=fate-suite/
	make fate-rsync
	make fate-list
	make fate
}

package() {
	make DESTDIR="$pkgdir" install install-man
	install -D -m755 tools/qt-faststart "$pkgdir/usr/bin/qt-faststart"
#	strip --strip-debug "$pkgdir"/usr/lib/*.a
}

libs() {
	pkgdesc="Libraries for ffmpeg"
	replaces="ffmpeg"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/lib "$subpkgdir"/usr
}

sha512sums="
c651c120b71db6991ffc54abc291986e7d35d776203af327f9a28853d1d0af468ca0956e2d3d893f55a211f70a40c041d5aa9aa9664ef581302b27494be9374e  ffmpeg-4.4.1.tar.xz
1047a23eda51b576ac200d5106a1cd318d1d5291643b3a69e025c0a7b6f3dbc9f6eb0e1e6faa231b7e38c8dd4e49a54f7431f87a93664da35825cc2e9e8aedf4  0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
38443b570cf32b2ba8ffa9ecc5480425c7da9f93f9773fbb3f9ec5f603b369b6225f4329a1b1f34d0ef30b2c9730f25ff9cff31315ed0a89a600df8e53bd54bf  0001-ffbuild-libversion.sh-add-shebang.patch
"