PKGBUILDs/ffmpeg/mingw-w64/PKGBUILD

104 lines
3.6 KiB
Bash
Raw Normal View History

2016-07-20 01:10:26 +02:00
# Maintainer: Karl-Felix Glatzer <karl.glatzer@gmx.de>
2016-04-11 22:25:17 +02:00
# Contributor: Martchus <martchus@gmx.net>
2016-09-11 23:56:34 +02:00
# This version includes the programs and supports libfdk-aac in contrast to the
# version found in the AUR.
2016-04-11 22:25:17 +02:00
2016-09-11 23:56:34 +02:00
_name=ffmpeg
pkgname=mingw-w64-ffmpeg
2017-12-20 19:57:24 +01:00
pkgver=3.4.1
2018-01-04 20:24:24 +01:00
pkgrel=2
epoch=1
2016-08-09 20:30:36 +02:00
pkgdesc='Complete solution to record, convert and stream audio and video (mingw-w64)'
arch=('any')
2016-08-09 20:30:36 +02:00
url='https://ffmpeg.org/'
2016-09-11 23:56:34 +02:00
license=('GPL3' 'custom:libfdk-aac')
2016-07-20 01:10:26 +02:00
depends=('mingw-w64-crt' 'mingw-w64-bzip2' 'mingw-w64-fontconfig' 'mingw-w64-fribidi' 'mingw-w64-gmp' 'mingw-w64-gnutls'
'mingw-w64-gsm' 'mingw-w64-lame' 'mingw-w64-libass' 'mingw-w64-dcadec' 'mingw-w64-libbluray' 'mingw-w64-libmodplug'
2016-08-31 23:12:54 +02:00
'mingw-w64-libsoxr' 'mingw-w64-libtheora' 'mingw-w64-vid.stab' 'mingw-w64-libwebp' 'mingw-w64-libvorbis'
2018-01-04 20:24:24 +01:00
'mingw-w64-libvpx' 'mingw-w64-libxml2' 'mingw-w64-opencore-amr' 'mingw-w64-openjpeg2' 'mingw-w64-opus' 'mingw-w64-libssh'
2016-12-02 11:34:22 +01:00
'mingw-w64-schroedinger' 'mingw-w64-libfdk-aac' 'mingw-w64-sdl2' 'mingw-w64-speex' 'mingw-w64-x264' 'mingw-w64-xvidcore'
2016-08-31 23:12:54 +02:00
'mingw-w64-zlib' 'mingw-w64-x265')
options=(!strip !buildflags staticlibs)
makedepends=('mingw-w64-gcc' 'mingw-w64-pkg-config' 'yasm')
source=(https://ffmpeg.org/releases/ffmpeg-${pkgver}.tar.xz{,.asc}
2017-12-20 19:57:24 +01:00
'fs56089.patch')
2016-09-11 23:56:34 +02:00
validpgpkeys=('FCF986EA15E6E293A5644F10B4322F04D67658D8') # ffmpeg-devel
sha256sums=('98b97e1b908dfeb6aeb6d407e5a5eacdfc253a40c2d195f5867ed2d1d46ea957'
'SKIP'
2017-12-20 19:57:24 +01:00
'0bfcd12d1992903f21c146ae56d9ad89b52818cfb2303197ee905347c25a5427')
2016-08-31 23:12:54 +02:00
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
prepare() {
cd ffmpeg-${pkgver}
2017-12-20 19:57:24 +01:00
# https://bugs.archlinux.org/task/56089
# Backport of http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=a606f27f4c610708fa96e35eed7b7537d3d8f712
patch -Np1 -i ../fs56089.patch
}
build() {
for _arch in ${_architectures}; do
mkdir -p "${srcdir}"/build-${_arch} && cd "${srcdir}"/build-${_arch}
2016-09-11 23:56:34 +02:00
"${srcdir}"/${_name}-${pkgver}/configure \
2016-03-11 19:25:41 +01:00
--prefix="/usr/${_arch}" \
--enable-cross-compile \
--cross-prefix="${_arch}-" \
--target-os=mingw32 \
--arch=${_arch%%-*} \
--disable-debug \
--enable-static \
--disable-stripping \
--enable-avisynth \
--enable-avresample \
--enable-fontconfig \
2016-07-20 01:10:26 +02:00
--enable-gmp \
2016-03-11 19:25:41 +01:00
--enable-gnutls \
--enable-gpl \
--enable-libass \
--enable-libbluray \
--enable-libfreetype \
--enable-libfribidi \
--enable-libgsm \
--enable-libmodplug \
--enable-libmp3lame \
--enable-libopencore_amrnb \
--enable-libopencore_amrwb \
--enable-libopenjpeg \
--enable-libopus \
--enable-libschroedinger \
--enable-libsoxr \
--enable-libspeex \
--enable-libssh \
--enable-libtheora \
--enable-libvidstab \
--enable-libvorbis \
--enable-libvpx \
--enable-libwebp \
2018-01-04 20:24:24 +01:00
--enable-libxml2 \
2016-03-11 19:25:41 +01:00
--enable-libx264 \
--enable-libx265 \
--enable-libxvid \
--enable-zlib \
--enable-shared \
--enable-version3 \
2016-08-31 23:12:54 +02:00
--enable-libfdk_aac \
--enable-nonfree \
2016-03-11 19:25:41 +01:00
--disable-doc
make
done
}
package() {
for _arch in ${_architectures}; do
cd "${srcdir}"/build-${_arch}
make DESTDIR="$pkgdir" install
${_arch}-strip --strip-all "${pkgdir}"/usr/${_arch}/bin/*.exe
${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
mv "${pkgdir}"/usr/${_arch}/bin/*.lib "${pkgdir}"/usr/${_arch}/lib/
done
}
# vim:set ts=2 sw=2 et: