summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDet2016-01-06 21:49:50 +0200
committerDet2016-01-06 21:49:50 +0200
commit4a7ad36ff4ed48e81903637a727624cfb8850dac (patch)
treea8d56432cd35c9729f47cc29b0ede22dc5952498
parent6d2ca3d1bfb60b46066de5c690665981e8215585 (diff)
downloadaur-4a7ad36ff4ed48e81903637a727624cfb8850dac.tar.gz
Sync with [extra]/x264 + ease updating 8-bit/10-bit x264
-rw-r--r--.SRCINFO30
-rw-r--r--PKGBUILD94
2 files changed, 103 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2aa27f73fffa..ef87101ad5c5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,16 @@
+# Generated by mksrcinfo v8
+# Wed Jan 6 19:49:49 UTC 2016
pkgbase = x264-git
- pkgdesc = H.264 video encoder and library
- pkgver = 0.r2377.1ca7bb9
- pkgrel = 2
+ pkgver = 148.20151011.r2638
+ pkgrel = 1
url = http://www.videolan.org/developers/x264.html
arch = i686
arch = x86_64
license = GPL
- makedepends = git
makedepends = yasm
+ makedepends = git
+ makedepends = ffmpeg
+ makedepends = l-smash
depends = glibc
provides = x264
provides = libx264
@@ -17,4 +20,23 @@ pkgbase = x264-git
md5sums = SKIP
pkgname = x264-git
+ pkgdesc = CLI tools for encoding H264/AVC video streams (Git)
+ depends = ffmpeg
+ depends = liblsmash.so
+ provides = x264-10bit
+ provides = x264
+ conflicts = x264-10bit
+ conflicts = x264
+ replaces = x264-10bit
+ replaces = x264
+
+pkgname = libx264-git
+ pkgdesc = Library for encoding H264/AVC video streams (Git)
+ provides = libx264.so
+ provides = x264-dev
+ provides = libx264
+ conflicts = x264-dev
+ conflicts = libx264
+ replaces = x264-dev
+ replaces = libx264
diff --git a/PKGBUILD b/PKGBUILD
index 83bb1a7399bd..f8b33dcdb264 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,41 +1,101 @@
-# Maintainer: PelPix <kylebloss[at]pelpix[dot]info>
+# Maintainer: Det <nimetonmaili at-gmail a-dot com>
+# Contributor: PelPix <kylebloss[at]pelpix[dot]info>
# Contributor: DrZaius <lou[at]fakeoutdoorsman.com>
# Contributor: zhuqin <zhuqin83[at]gmail>
# Contributor: pressh <pressh[at]gmail>
-pkgname=x264-git
-_gitname="x264"
-pkgver=0.r2377.1ca7bb9
-pkgrel=2
-pkgdesc="H.264 video encoder and library"
+# Build 10-bit x264 instead of 8-bit? (Better quality, but slower.)
+# For comparison, see, e.g.: https://gist.github.com/l4n9th4n9/4459997
+
+_10bit=0 # "1" to enable. This will be auto-detected afterwards.
+
+# To revert, uninstall 'libx264-10bit-git', or use:
+
+_8bit=0
+
+pkgname=('x264-git' 'libx264-git' 'libx264-10bit-git')
+_gitname=x264
+pkgver=148.20151011.r2638
+pkgrel=1
arch=('i686' 'x86_64')
+url="http://www.videolan.org/developers/x264.html"
license=('GPL')
depends=('glibc')
-makedepends=('git' 'yasm')
-url="http://www.videolan.org/developers/x264.html"
+makedepends=('yasm' 'git' 'ffmpeg' 'l-smash')
conflicts=('x264' 'libx264')
provides=('x264' 'libx264')
source=('git://git.videolan.org/x264.git')
md5sums=('SKIP')
+# Use the 10-bit version?
+if [[ $_10bit = 1 ]] || ([[ $_8bit != 1 ]] && pacman -Q libx264-10bit-git &>/dev/null); then
+ pkgname=('x264-git' 'libx264-10bit-git')
+ _10bit=1
+elif [[ $_8bit = 1 ]] || pacman -Q libx264-git &>/dev/null; then
+ pkgname=('x264-git' 'libx264-git')
+fi
+
pkgver() {
cd $_gitname
- printf "0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ _ver=$(grep '#define X264_BUILD' x264.h | cut -d' ' -f3)
+ _date=$(git log -1 --format="%cd" --date=short | tr -d -)
+ _commits=$(git rev-list --count HEAD)
+
+ echo $_ver.$_date.r$_commits
+}
+
+prepare() {
+ rm -rf $_gitname-10bit
+ cp -r $_gitname $_gitname-10bit
}
build() {
cd $_gitname
- ./configure --enable-shared
+ msg2 "Configuring x264..."
+ ./configure --prefix=/usr \
+ --enable-shared --enable-pic
+
+ msg2 "Making x264..."
+ make
+
+ cd ../$_gitname-10bit
+
+ msg2 "Configuring x264 (10-bit)..."
+ ./configure --prefix=/usr \
+ --enable-shared --enable-pic \
+ --bit-depth=10
+
+ msg2 "Making x264 (10-bit)..."
make
}
-package() {
- cd $_gitname
+package_x264-git() {
+ pkgdesc='CLI tools for encoding H264/AVC video streams (Git)'
+ depends=('ffmpeg' 'liblsmash.so')
+ provides=('x264-10bit' 'x264')
+ conflicts=('x264-10bit' 'x264')
+ replaces=('x264-10bit' 'x264')
+
+ make -C $_gitname DESTDIR="$pkgdir" install-cli
+ install -Dm755 $_gitname-10bit/x264 "$pkgdir"/usr/bin/x264-10bit
+}
+
+package_libx264-git() {
+ pkgdesc='Library for encoding H264/AVC video streams (Git)'
+ provides=('libx264.so' 'x264-dev' 'libx264')
+ conflicts=('x264-dev' 'libx264')
+ replaces=('x264-dev' 'libx264')
- make DESTDIR="$pkgdir" \
- bindir=/usr/bin \
- libdir=/usr/lib \
- includedir=/usr/include \
- install
+ install -d "$pkgdir"/usr/lib
+ make -C $_gitname DESTDIR="$pkgdir" install-lib-shared
}
+
+package_libx264-10bit-git() {
+ pkgdesc='Library for encoding H264/AVC video streams - 10bit-depth (Git)'
+ provides=('libx264.so' 'libx264' 'x264-dev' 'libx264-10bit')
+ conflicts=('libx264' 'x264-dev' 'libx264-10bit')
+
+ install -d "$pkgdir"/usr/lib
+ make -C $_gitname-10bit DESTDIR="$pkgdir" install-lib-shared
+} \ No newline at end of file