PKGBUILDs/ffmpeg/custom/PKGBUILD

253 lines
5.1 KiB
Bash
Raw Permalink Normal View History

# Maintainer: Martchus <martchus@gmx.net>
# Contributor: Ben Widawsky <ben@bwidawsk.net>
2016-02-03 18:15:24 +01:00
# Contributor: Rob McCathie <korrode at gmail>
# Contributor: Ionut Biru <ibiru@archlinux.org>
2016-11-01 16:49:13 +01:00
# Contributor: Bartomiej Piotrowski <bpiotrowski@archlinux.org>
2016-02-03 18:15:24 +01:00
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
# Contributor: Paul Mattal <paul@archlinux.org>
_name=ffmpeg
pkgname=ffmpeg-custom
2024-05-28 23:46:09 +02:00
pkgver=7.0
2024-01-08 19:34:24 +01:00
pkgrel=1
2016-02-03 18:15:24 +01:00
epoch=1
pkgdesc='Complete solution to record, convert and stream audio and video (with more features enabled than regular ffmpeg)'
arch=('x86_64')
2016-04-11 22:25:17 +02:00
url='https://ffmpeg.org/'
2016-02-03 18:15:24 +01:00
license=('GPL3' 'custom:libfdk-aac')
depends=(
alsa-lib
aom
bzip2
cairo
fontconfig
fribidi
glib2
glibc
gmp
gnutls
gsm
jack
lame
libass.so
libavc1394
libbluray.so
libbs2b.so
2019-08-07 19:13:22 +02:00
libdav1d.so
libdrm
2024-05-28 23:46:09 +02:00
libdvdnav
libdvdread
libfreetype.so
libgl
libharfbuzz.so
libiec61883
libjxl.so
libmodplug
2023-03-07 21:02:41 +01:00
libopenmpt.so
libplacebo.so
libpulse
2020-07-21 22:02:34 +02:00
librav1e.so
libraw1394
2021-05-05 00:51:01 +02:00
librsvg-2.so
librubberband.so
libsoxr
libssh
libtheora
libva-drm.so
libva-x11.so
libva.so
libvdpau
libvidstab.so
libvorbis.so
libvorbisenc.so
libvpx.so
libwebp
libx11
libx264.so
libx265.so
libxcb
libxext
libxml2
libxv
2024-05-28 23:46:09 +02:00
mbedtls
libxvidcore.so
libzimg.so
ocl-icd
2023-10-07 01:46:26 +02:00
onevpl
opencore-amr
openjpeg2
opus
sdl2
snappy
speex
srt
svt-av1
v4l-utils
vmaf
2023-10-07 01:46:26 +02:00
vulkan-icd-loader
xz
zlib
libfdk-aac
#glslang - see note below
)
makedepends=(
amf-headers
2020-07-21 22:02:34 +02:00
avisynthplus
clang
ffnvcodec-headers
frei0r-plugins
git
ladspa
mesa
nasm
opencl-headers
vulkan-headers
opencl-clhpp
openal
)
optdepends=(
'avisynthplus: AviSynthPlus support'
'frei0r-plugins: Frei0r video effects support'
2023-10-07 01:46:26 +02:00
'intel-media-sdk: Intel QuickSync support (legacy)'
'onevpl-intel-gpu: Intel QuickSync support'
'ladspa: LADSPA filters'
2020-04-20 00:12:13 +02:00
'nvidia-utils: Nvidia NVDEC/NVENC support'
'onevpl-intel-gpu: Intel QuickSync support'
)
provides=(
libavcodec.so
libavdevice.so
libavfilter.so
libavformat.so
libavutil.so
libpostproc.so
libswresample.so
libswscale.so
"ffmpeg=$pkgver"
"ffmpeg-librsvg=$pkgver"
)
2016-02-03 18:15:24 +01:00
conflicts=("$_name")
options=(
debug
)
2024-05-28 23:46:09 +02:00
_tag=fa053f314a0150bebe073438867e454182909c53
source=(
git+https://git.ffmpeg.org/ffmpeg.git#tag=${_tag}
2022-01-25 18:19:45 +01:00
add-av_stream_get_first_dts-for-chromium.patch
)
2024-05-28 23:46:09 +02:00
b2sums=('4b2057fb68a0137bf149779beee3b7066835216a830896d4de4d31d0c00c2ab13419d4a3f0ccba1ab6d0cb063bdc91f2fc35d5916ddd65288c327880cbdefc41'
'555274228e09a233d92beb365d413ff5c718a782008075552cafb2130a3783cf976b51dfe4513c15777fb6e8397a34122d475080f2c4483e8feea5c0d878e6de')
validpgpkeys=(DD1EC9E8DE085C629B3E1846B18E8928B3948D64) # Michael Niedermayer <michael@niedermayer.cc>
2016-02-03 18:15:24 +01:00
prepare() {
cd ffmpeg
2022-02-18 10:24:59 +01:00
patch -Np1 -i ../add-av_stream_get_first_dts-for-chromium.patch # https://crbug.com/1251779
}
2022-01-25 18:19:45 +01:00
2022-02-18 10:24:59 +01:00
pkgver() {
cd ffmpeg
git describe --tags | sed 's/^n//'
}
2016-02-03 18:15:24 +01:00
build() {
2018-07-27 12:58:49 +02:00
cd $_name
2016-02-03 18:15:24 +01:00
./configure \
2019-09-15 00:39:13 +02:00
--prefix=/usr \
2016-02-03 18:15:24 +01:00
--disable-debug \
--disable-static \
--disable-stripping \
--enable-amf \
--enable-avisynth \
--enable-cuda-llvm \
--enable-lto \
2016-02-03 18:15:24 +01:00
--enable-fontconfig \
--enable-frei0r \
2016-07-20 01:10:26 +02:00
--enable-gmp \
2016-02-03 18:15:24 +01:00
--enable-gpl \
--enable-ladspa \
--enable-libaom \
2016-02-03 18:15:24 +01:00
--enable-libass \
--enable-libbluray \
--enable-libbs2b \
2019-08-07 19:13:22 +02:00
--enable-libdav1d \
2024-05-28 23:46:09 +02:00
--enable-libdrm \
--enable-libdvdnav \
--enable-libdvdread \
2016-02-03 18:15:24 +01:00
--enable-libfreetype \
--enable-libfribidi \
2018-07-27 12:58:49 +02:00
--enable-libiec61883 \
--enable-libjack \
--enable-libjxl \
--enable-libmodplug \
2016-02-03 18:15:24 +01:00
--enable-libgsm \
--enable-libharfbuzz \
2016-02-03 18:15:24 +01:00
--enable-libmp3lame \
--enable-libopencore_amrnb \
--enable-libopencore_amrwb \
--enable-libopenjpeg \
2023-03-07 21:02:41 +01:00
--enable-libopenmpt \
2016-02-03 18:15:24 +01:00
--enable-libopus \
--enable-libplacebo \
2016-02-03 18:15:24 +01:00
--enable-libpulse \
2020-07-21 22:02:34 +02:00
--enable-librav1e \
2021-05-05 00:51:01 +02:00
--enable-librsvg \
--enable-librubberband \
--enable-libsnappy \
2016-02-03 18:15:24 +01:00
--enable-libsoxr \
--enable-libspeex \
--enable-libsrt \
2016-02-03 18:15:24 +01:00
--enable-libssh \
--enable-libsvtav1 \
2016-02-03 18:15:24 +01:00
--enable-libtheora \
--enable-libv4l2 \
--enable-libvidstab \
--enable-libvmaf \
2016-02-03 18:15:24 +01:00
--enable-libvorbis \
2023-10-07 01:46:26 +02:00
--enable-libvpl \
2016-02-03 18:15:24 +01:00
--enable-libvpx \
--enable-libwebp \
--enable-libx264 \
--enable-libx265 \
2017-04-13 23:40:43 +02:00
--enable-libxcb \
2018-01-04 20:24:24 +01:00
--enable-libxml2 \
2016-02-03 18:15:24 +01:00
--enable-libxvid \
--enable-libzimg \
2024-05-28 23:46:09 +02:00
--enable-mbedtls \
--enable-nvdec \
--enable-nvenc \
--enable-opencl \
--enable-opengl \
--enable-omx \
2016-02-03 18:15:24 +01:00
--enable-shared \
--enable-version3 \
--enable-vulkan \
2016-02-03 18:15:24 +01:00
--enable-libfdk_aac \
--enable-vaapi \
--enable-vdpau \
--enable-openal \
2016-02-03 18:15:24 +01:00
--enable-nonfree
# note: removing --enable-libglslang for now due to "ERROR: libglslang not found"
2016-02-03 18:15:24 +01:00
make
make tools/qt-faststart
2018-04-25 22:14:03 +02:00
make doc/ff{mpeg,play}.1
2016-02-03 18:15:24 +01:00
cp /usr/share/licenses/libfdk-aac/NOTICE .
}
package() {
2018-07-27 12:58:49 +02:00
cd $_name
2016-02-03 18:15:24 +01:00
make DESTDIR="${pkgdir}" install install-man
install -Dm 755 tools/qt-faststart "${pkgdir}"/usr/bin/
install -d "$pkgdir/usr/share/licenses/$pkgname"
install -m 0644 NOTICE "$pkgdir/usr/share/licenses/$pkgname/NOTICE"
}
# vim: ts=2 sw=2 et: