PKGBUILDs/extra/x264/PKGBUILD

84 lines
1.5 KiB
Bash
Raw Normal View History

2013-11-17 18:42:39 +00:00
# $Id$
2016-02-27 15:06:22 +00:00
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
2011-01-19 00:41:46 +00:00
# Contributor: damir <damir@archlinux.org>
# Contributor: Paul Mattal <paul@archlinux.org>
2012-02-07 13:45:40 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2015-07-16 05:19:14 +00:00
# - configure needs --disable-asm to build on non-AArch64
2017-05-19 13:37:03 +00:00
# - --disable-lto
2011-01-19 00:41:46 +00:00
2018-08-16 12:26:07 +00:00
pkgname=x264
2019-03-31 17:51:33 +00:00
pkgver=157.r72db4377
pkgrel=1
2015-03-08 21:18:22 +00:00
epoch=2
2018-08-16 12:26:07 +00:00
pkgdesc='Open Source H264/AVC video encoder'
2019-03-31 17:51:33 +00:00
arch=(x86_64)
url=https://www.videolan.org/developers/x264.html
license=(GPL)
2018-08-16 12:26:07 +00:00
depends=(
2019-03-31 17:51:33 +00:00
libavcodec.so
libavformat.so
libavutil.so
liblsmash.so
libswscale.so
2018-08-16 12:26:07 +00:00
)
2019-03-31 17:51:33 +00:00
makedepends=(
git
ffmpeg
l-smash
nasm
)
provides=(
libx264
libx264.so
)
conflicts=(
libx264
libx264-10bit
libx264-all
)
replaces=(
libx264
libx264-10bit
libx264-all
)
source=(git+https://code.videolan.org/videolan/x264.git#commit=72db437770fd1ce3961f624dd57a8e75ff65ae0b)
sha256sums=(SKIP)
2011-01-19 00:41:46 +00:00
2014-03-29 16:21:56 +00:00
pkgver() {
2018-08-16 12:26:07 +00:00
cd x264
2016-02-27 15:06:22 +00:00
2014-03-29 16:21:56 +00:00
local _ver=$(grep '#define X264_BUILD' x264.h | cut -d' ' -f3)
2018-08-16 12:26:07 +00:00
local _rev=$(git rev-parse --short HEAD)
2014-03-29 16:21:56 +00:00
2018-08-16 12:26:07 +00:00
echo ${_ver}.r${_rev}
2014-03-29 16:21:56 +00:00
}
2014-08-07 11:07:38 +00:00
prepare() {
2018-08-16 12:26:07 +00:00
if [[ -d build ]]; then
rm -rf build
fi
mkdir build
2014-08-07 11:07:38 +00:00
}
2013-08-01 13:02:31 +00:00
build() {
2018-08-16 12:26:07 +00:00
cd build
2014-06-05 00:23:45 +00:00
2018-08-16 12:26:07 +00:00
[[ $CARCH != "aarch64" ]] && CONFIG="--disable-asm"
2017-05-19 12:55:51 +00:00
2018-08-16 12:26:07 +00:00
../x264/configure \
2019-03-31 17:51:33 +00:00
--prefix=/usr \
2018-08-16 12:26:07 +00:00
--enable-shared \
--enable-pic \
--disable-lto $CONFIG
make
2017-05-19 12:55:51 +00:00
}
2018-08-16 12:26:07 +00:00
package() {
make -C build DESTDIR="${pkgdir}" install-cli install-lib-shared
2011-01-19 00:41:46 +00:00
}
2016-02-27 15:06:22 +00:00
# vim: ts=2 sw=2 et: