mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
added extra/x265
This commit is contained in:
parent
18519f0702
commit
ea3f3f5e26
2 changed files with 102 additions and 0 deletions
37
extra/x265/PKGBUILD
Normal file
37
extra/x265/PKGBUILD
Normal file
|
@ -0,0 +1,37 @@
|
|||
# $Id$
|
||||
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
|
||||
# Contributor: kfgz <kfgz at interia pl>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - patch to attempt fixing ARM hackery by bandwagoning developers
|
||||
|
||||
pkgname=x265
|
||||
pkgver=0.8
|
||||
pkgrel=2
|
||||
pkgdesc='Open Source H265/HEVC video encoder'
|
||||
arch=('i686' 'x86_64')
|
||||
license=('GPL')
|
||||
depends=('gcc-libs')
|
||||
makedepends=('yasm' 'cmake')
|
||||
url='https://bitbucket.org/multicoreware/x265'
|
||||
source=($url/get/$pkgver.tar.bz2
|
||||
arm.patch)
|
||||
md5sums=('0c690dfad024e87f6b617e6fc2f354eb'
|
||||
'9e90fdd64e551be7b76922606d0c8210')
|
||||
|
||||
prepare() {
|
||||
cd multicoreware-x265-*
|
||||
patch -p1 -i ../arm.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd multicoreware-x265-*/build/linux
|
||||
[[ $CARCH == x86_64 ]] && LDFLAGS+=',-z,noexecstack'
|
||||
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr ../../source
|
||||
make VERBOSE=1
|
||||
}
|
||||
|
||||
package() {
|
||||
cd multicoreware-x265-*/build/linux
|
||||
make DESTDIR="$pkgdir" install
|
||||
}
|
65
extra/x265/arm.patch
Normal file
65
extra/x265/arm.patch
Normal file
|
@ -0,0 +1,65 @@
|
|||
diff -urN a/source/CMakeLists.txt b/source/CMakeLists.txt
|
||||
--- a/source/CMakeLists.txt 2014-03-03 14:43:00.000000000 -0700
|
||||
+++ b/source/CMakeLists.txt 2014-03-29 22:29:24.983771019 -0600
|
||||
@@ -37,10 +37,18 @@
|
||||
set(X64 1)
|
||||
add_definitions(-DX86_64=1)
|
||||
endif()
|
||||
+elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv5.*")
|
||||
+ message(STATUS "Detected ARMV5 system processor")
|
||||
+ set(ARMV5 1)
|
||||
+ add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=0 -DHAVE_NEON=0)
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv6l")
|
||||
- message(STATUS "Detected ARM system processor")
|
||||
- set(ARM 1)
|
||||
- add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1)
|
||||
+ message(STATUS "Detected ARMV6 system processor")
|
||||
+ set(ARMV6 1)
|
||||
+ add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1 -DHAVE_NEON=0)
|
||||
+elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l")
|
||||
+ message(STATUS "Detected ARMV7 system processor")
|
||||
+ set(ARMV7 1)
|
||||
+ add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1 -DHAVE_NEON=0)
|
||||
else()
|
||||
message(STATUS "CMAKE_SYSTEM_PROCESSOR value `${CMAKE_SYSTEM_PROCESSOR}` is unknown")
|
||||
message(STATUS "Please add this value near ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}")
|
||||
@@ -121,8 +129,8 @@
|
||||
if(X86 AND NOT X64)
|
||||
add_definitions(-march=i686)
|
||||
endif()
|
||||
- if(ARM)
|
||||
- add_definitions(-march=armv6 -mfloat-abi=hard -mfpu=vfp)
|
||||
+ if(ARMV7)
|
||||
+ add_definitions(-fPIC)
|
||||
endif()
|
||||
endif(GCC)
|
||||
|
||||
diff -urN a/source/common/cpu.cpp b/source/common/cpu.cpp
|
||||
--- a/source/common/cpu.cpp 2014-03-03 14:43:00.000000000 -0700
|
||||
+++ b/source/common/cpu.cpp 2014-03-29 22:50:44.303843187 -0600
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <machine/cpu.h>
|
||||
#endif
|
||||
|
||||
-#if X265_ARCH_ARM && !defined(HAVE_NEON)
|
||||
+#if X265_ARCH_ARM && (!defined(HAVE_NEON) || HAVE_NEON==0)
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
static sigjmp_buf jmpbuf;
|
||||
@@ -343,7 +343,6 @@
|
||||
}
|
||||
|
||||
canjump = 1;
|
||||
- x265_cpu_neon_test();
|
||||
canjump = 0;
|
||||
signal(SIGILL, oldsig);
|
||||
#endif // if !HAVE_NEON
|
||||
@@ -359,7 +358,7 @@
|
||||
// which may result in incorrect detection and the counters stuck enabled.
|
||||
// right now Apple does not seem to support performance counters for this test
|
||||
#ifndef __MACH__
|
||||
- flags |= x265_cpu_fast_neon_mrc_test() ? X265_CPU_FAST_NEON_MRC : 0;
|
||||
+ //flags |= x265_cpu_fast_neon_mrc_test() ? X265_CPU_FAST_NEON_MRC : 0;
|
||||
#endif
|
||||
// TODO: write dual issue test? currently it's A8 (dual issue) vs. A9 (fast mrc)
|
||||
#endif // if HAVE_ARMV6
|
Loading…
Reference in a new issue