PKGBUILDs/extra/x264/PKGBUILD

66 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
pkgver=155.r0a84d986
2018-05-12 16:44:26 +00:00
pkgrel=2
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'
2018-01-11 13:41:14 +00:00
arch=('x86_64')
2017-05-19 12:55:51 +00:00
url='https://www.videolan.org/developers/x264.html'
2011-01-19 00:41:46 +00:00
license=('GPL')
2018-08-16 12:26:07 +00:00
depends=(
'libavcodec.so' 'libavformat.so' 'libavutil.so' 'liblsmash.so'
'libswscale.so'
)
2018-01-11 13:41:14 +00:00
makedepends=('git' 'ffmpeg' 'l-smash' 'nasm')
2018-08-16 12:26:07 +00:00
provides=('libx264' 'libx264.so')
conflicts=('libx264' 'libx264-10bit' 'libx264-all')
replaces=('libx264' 'libx264-10bit' 'libx264-all')
_commit='0a84d986e7020f8344f00752e3600b9769cc1e85'
2017-05-19 12:55:51 +00:00
source=("git+https://git.videolan.org/git/x264.git#commit=${_commit}")
2016-02-27 15:06:22 +00:00
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 \
--prefix='/usr' \
--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: