diff options
Diffstat (limited to 'community/x264/APKBUILD')
-rw-r--r-- | community/x264/APKBUILD | 51 |
1 files changed, 35 insertions, 16 deletions
diff --git a/community/x264/APKBUILD b/community/x264/APKBUILD index bad77ce526e..28853419997 100644 --- a/community/x264/APKBUILD +++ b/community/x264/APKBUILD @@ -1,42 +1,55 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=x264 -pkgver=20210211 -_gitcommit=b86ae3c66f51ac9eab5ab7ad09a9d62e67961b8a +# Upstream doesn't do releases; track branch "stable" +# https://code.videolan.org/videolan/x264/-/tree/stable. +# The minor version corresponds the ABI version. If it needs to be bumbed, +# abuild will alert you. +pkgver=0.164_git20231001 +_gitrev=31e19f92f00c7003fa115047ce50978bc98c3a0d pkgrel=0 pkgdesc="Free library for encoding H264/AVC video streams" -url="http://www.videolan.org/developers/x264.html" +url="https://www.videolan.org/developers/x264.html" arch="all" license="GPL-2.0-or-later" -makedepends="libx11-dev bash nasm coreutils perl" -subpackages="$pkgname-dev $pkgname-libs" -source="$pkgname-$pkgver.tar.gz::https://code.videolan.org/videolan/x264/-/archive/$_gitcommit/x264-$_gitcommit.tar.gz" -builddir="$srcdir/$pkgname-$_gitcommit" +makedepends=" + bash + coreutils + libx11-dev + nasm + perl + " +subpackages="$pkgname-dev $pkgname-libs $pkgname-bash-completion" +source="$pkgname-$_gitrev.tar.gz::https://code.videolan.org/videolan/x264/-/archive/$_gitrev/x264-$_gitrev.tar.gz" +builddir="$srcdir/$pkgname-$_gitrev" prepare() { default_prepare - update_config_guess update_config_sub + + local abi; abi=$(sed -n 's/^#define X264_BUILD \([1-9][0-9]*\).*$/\1/p' x264.h) + if [ "${pkgver%_*}" != "0.$abi" ]; then + error "ABI version has been changed to $abi!" + error "Bump pkgver to 0.${abi}_${pkgver##*_} and rebuild all dependent packages" + return 1 + fi } build() { local asmopts= case "$CARCH" in # x86 assembly contains TEXTRELs - x86) asmopts="--disable-asm";; - - # mips targets are soft-float - mips*) asmopts="--disable-asm";; + x86) asmopts="--disable-asm";; esac # note: not autotools - CFLAGS="${CFLAGS/-Os/}" ./configure \ + CFLAGS="${CFLAGS/-Os/} -flto=auto" ./configure \ --host=$CHOST \ --prefix=/usr \ + --enable-lto \ --enable-shared \ --enable-static \ $asmopts \ - --enable-pic \ - --extra-cflags=-fno-aggressive-loop-optimizations + --enable-pic make } @@ -48,6 +61,12 @@ package() { make DESTDIR="$pkgdir" \ bindir=/usr/bin libdir=/usr/lib includedir=/usr/include \ install + + mkdir -p "$pkgdir"/usr/share/bash-completion/completions + mv "$builddir"/tools/bash-autocomplete.sh \ + "$pkgdir"/usr/share/bash-completion/completions/x264 } -sha512sums="c77c2af15eca614fc636b906c1679c52fe79eb84e3ea9eaac9c570ff9210574f7ec0d1656e7f856054d2297e019a47b8a9f5e21b87c67c1e599897e57cc62d41 x264-20210211.tar.gz" +sha512sums=" +707ff486677a1b5502d6d8faa588e7a03b0dee45491c5cba89341be4be23d3f2e48272c3b11d54cfc7be1b8bf4a3dfc3c3bb6d9643a6b5a2ed77539c85ecf294 x264-31e19f92f00c7003fa115047ce50978bc98c3a0d.tar.gz +" |