summaryrefslogtreecommitdiff
path: root/user/x264/APKBUILD
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-21 05:07:04 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-21 05:07:04 -0500
commitd274815522f71653ed3092057fc91a5962f2bd88 (patch)
tree3c0d68afb57b83d51cbf359910fc8efb33edc156 /user/x264/APKBUILD
parent431b9523232f4597adb749835299dcf717caf0b5 (diff)
downloadpackages-d274815522f71653ed3092057fc91a5962f2bd88.tar.gz
packages-d274815522f71653ed3092057fc91a5962f2bd88.tar.bz2
packages-d274815522f71653ed3092057fc91a5962f2bd88.tar.xz
packages-d274815522f71653ed3092057fc91a5962f2bd88.zip
user/x264: pull in, fix up somewhat
Diffstat (limited to 'user/x264/APKBUILD')
-rw-r--r--user/x264/APKBUILD53
1 files changed, 53 insertions, 0 deletions
diff --git a/user/x264/APKBUILD b/user/x264/APKBUILD
new file mode 100644
index 000000000..81412a1bb
--- /dev/null
+++ b/user/x264/APKBUILD
@@ -0,0 +1,53 @@
+# Maintainer:
+pkgname=x264
+pkgver=20170930
+pkgrel=0
+pkgdesc="Library for encoding H264/AVC video streams"
+url="https://www.videolan.org/developers/x264.html"
+arch="all"
+license="GPL-2.0+"
+options="textrels"
+makedepends="bash coreutils libx11-dev perl"
+[ $CARCH == x86_64 ] && makedepends="$makedepends yasm"
+subpackages="$pkgname-dev $pkgname-libs"
+source="ftp://ftp.videolan.org/pub/x264/snapshots/x264-snapshot-$pkgver-2245-stable.tar.bz2"
+builddir="$srcdir/$pkgname-snapshot-$pkgver-2245-stable"
+
+build() {
+ cd "$builddir"
+
+ local asmopts=
+ case "$CARCH" in
+ # ppc requires AltiVec, we run on G3s
+ ppc) asmopts="--disable-asm" ;;
+ # VSX was added in power8
+ ppc64) asmopts="--disable-vsx" ;;
+ esac
+
+ # note: not autotools
+ CFLAGS="${CFLAGS/-Os/}" ./configure \
+ --host=$CHOST \
+ --prefix=/usr \
+ --enable-shared \
+ --enable-static \
+ $asmopts \
+ --enable-pic \
+ --extra-cflags=-fno-aggressive-loop-optimizations
+ make
+}
+
+check() {
+ cd "$builddir"
+
+ ./x264 --version
+}
+
+package() {
+ cd "$builddir"
+
+ make DESTDIR="$pkgdir" \
+ bindir=/usr/bin libdir=/usr/lib includedir=/usr/include \
+ install
+}
+
+sha512sums="7f0d33f2955dbc8958ad739cfe69b9083ea376d21a4af469a6a44c8db8089859cf0a94018a1cdea49ce4c3b4a1b635cc304208d0492d901fd99a1337ac2c5d57 x264-snapshot-20170930-2245-stable.tar.bz2"