diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-06-09 10:51:47 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-06-09 10:51:47 +0000 |
commit | adc5620bbc8d8a161e972309783cce2ae410b93e (patch) | |
tree | f3e878cb2efbd1b21c85af1aa71be072e1969ad6 | |
parent | 0b9e930043cefb129176959b37a587869d64ffea (diff) | |
download | packages-adc5620bbc8d8a161e972309783cce2ae410b93e.tar.gz packages-adc5620bbc8d8a161e972309783cce2ae410b93e.tar.bz2 packages-adc5620bbc8d8a161e972309783cce2ae410b93e.tar.xz packages-adc5620bbc8d8a161e972309783cce2ae410b93e.zip |
user/x265: now with 100% more overly-dramatic ARM support
-rw-r--r-- | user/x265/APKBUILD | 52 | ||||
-rw-r--r-- | user/x265/x265-unbreak-my-arm.patch | 27 |
2 files changed, 79 insertions, 0 deletions
diff --git a/user/x265/APKBUILD b/user/x265/APKBUILD new file mode 100644 index 000000000..80f3fae39 --- /dev/null +++ b/user/x265/APKBUILD @@ -0,0 +1,52 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: A. Wilcox <awilfox@adelielinux.org> +pkgname=x265 +pkgver=2.6 +pkgrel=0 +pkgdesc="Open Source H265/HEVC video encoder" +url="http://x265.org" +arch="all" +license="GPL" +options="textrels" +makedepends="cmake yasm" # 2.6+ will use nasm instead of yasm +subpackages="$pkgname-dev" +source="$pkgname-$pkgver.tar.gz::https://bitbucket.org/multicoreware/$pkgname/downloads/${pkgname}_${pkgver}.tar.gz + x265-unbreak-my-arm.patch" +builddir="$srcdir/${pkgname}_v$pkgver" + +build() { + cd "$builddir"/build/linux + + # It has textrel on x86 so we disable asm. + local cmake_opts="" + case "$CARCH" in + x86) cmake_opts="-DENABLE_ASSEMBLY=OFF";; + ppc*) cmake_opts="-DENABLE_ALTIVEC=OFF -DCPU_POWER8=OFF";; + esac + + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + $cmake_opts \ + ../../source + make +} + +check() { + cd "$builddir"/build/linux + + # LEAVE THIS. + # every breakage so far has been SIGILL, which IS detected by this. + # LEAVE IT! + ./x265 --version +} + +package() { + cd "$builddir"/build/linux + + make DESTDIR="$pkgdir" install +} + +sha512sums="35c3716313e3dfd1555dd725b60f2b3b00a615d8b8d8267439722b52021d47e34eebf94b837b92a92d40c7ffab7b3198d6391365d62672b257c0a87d1db8a736 x265-2.6.tar.gz +ac3ecc613fe4da11672de8f397b5541fe2af29b7dd91a48859bfe8824934a5966c41ca30de242564c46f1a0cdd2a0da9331d9f547fc21120066fb3c45347c4c4 x265-unbreak-my-arm.patch" diff --git a/user/x265/x265-unbreak-my-arm.patch b/user/x265/x265-unbreak-my-arm.patch new file mode 100644 index 000000000..f9fe658fd --- /dev/null +++ b/user/x265/x265-unbreak-my-arm.patch @@ -0,0 +1,27 @@ +unbreak my arrrrrrrrrrrrrrrrm +say you'll run on me again +undo this hurt you caused +when you built with neon +and sigill'd on erin + +uncry these tears +i cried so many nights +unbreak my arrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrm +myyyyyyyyy arm... + +--- x265_v2.6/source/CMakeLists.txt.old 2017-11-29 03:21:40.000000000 +0000 ++++ x265_v2.6/source/CMakeLists.txt 2018-06-09 10:34:57.239447833 +0000 +@@ -226,11 +226,11 @@ + set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC) + elseif(ARM) + find_package(Neon) +- if(CPU_HAS_NEON) ++ if(CPU_HAS_NEON AND NATIVE_BUILD) + set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC) + add_definitions(-DHAVE_NEON) + else() +- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm) ++ set(ARM_ARGS -mfloat-abi=hard) + endif() + endif() + add_definitions(${ARM_ARGS}) |