mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
extra/x265 to 1.8-1
This commit is contained in:
parent
675b48272a
commit
24bbba2081
2 changed files with 81 additions and 44 deletions
|
@ -1,14 +1,14 @@
|
|||
# $Id$
|
||||
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
|
||||
# Contributor: kfgz <kfgz at interia pl>
|
||||
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
|
||||
# Contributor: kfgz <kfgz@interia.pl>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - patch to attempt fixing ARM hackery by bandwagoning developers
|
||||
# - compile with -fPIC on AArch64
|
||||
|
||||
pkgname=x265
|
||||
pkgver=1.7
|
||||
pkgrel=2
|
||||
pkgver=1.8
|
||||
pkgrel=1
|
||||
pkgdesc='Open Source H265/HEVC video encoder'
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://bitbucket.org/multicoreware/x265'
|
||||
|
@ -16,25 +16,75 @@ license=('GPL')
|
|||
depends=('gcc-libs')
|
||||
makedepends=('yasm' 'cmake')
|
||||
provides=('libx265.so')
|
||||
source=($pkgname-$pkgver.tar.bz2::$url/get/$pkgver.tar.bz2
|
||||
source=("https://bitbucket.org/multicoreware/x265/downloads/x265_${pkgver}.tar.gz"
|
||||
arm.patch)
|
||||
md5sums=('d6020c277b05ab44f8222342aaa9c99f'
|
||||
'9c773543b7a1f2b54f02f588725a8201')
|
||||
md5sums=('8b7ef9bc0b5bd26965d05a4508effeed'
|
||||
'4c04f99e474df7f54f0b9db8ee1bb1f6')
|
||||
|
||||
prepare() {
|
||||
cd multicoreware-x265-*
|
||||
cd x265_11047
|
||||
|
||||
patch -p1 -i ../arm.patch
|
||||
|
||||
for d in 8 $([[ $CARCH == 'x86_64' ]] && echo "10 12"); do
|
||||
if [[ -d build-$d ]]; then
|
||||
rm -rf build-$d
|
||||
fi
|
||||
mkdir build-$d
|
||||
done
|
||||
}
|
||||
|
||||
build() {
|
||||
cd multicoreware-x265-*/build/linux
|
||||
[[ $CARCH == x86_64 ]] && LDFLAGS+=',-z,noexecstack'
|
||||
[[ $CARCH == aarch64 ]] && CFLAGS+=' -fPIC' && CXXFLAGS+=' -fPIC'
|
||||
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr ../../source
|
||||
make
|
||||
if [[ $CARCH == x86_64 ]]; then
|
||||
|
||||
cd x265_11047/build-12
|
||||
|
||||
cmake ../source \
|
||||
-DCMAKE_INSTALL_PREFIX='/usr' \
|
||||
-DHIGH_BIT_DEPTH='TRUE' \
|
||||
-DMAIN12='TRUE' \
|
||||
-DEXPORT_C_API='FALSE' \
|
||||
-DENABLE_CLI='FALSE' \
|
||||
-DENABLE_SHARED='FALSE'
|
||||
make
|
||||
|
||||
cd ../build-10
|
||||
|
||||
cmake ../source \
|
||||
-DCMAKE_INSTALL_PREFIX='/usr' \
|
||||
-DHIGH_BIT_DEPTH='TRUE' \
|
||||
-DEXPORT_C_API='FALSE' \
|
||||
-DENABLE_CLI='FALSE' \
|
||||
-DENABLE_SHARED='FALSE'
|
||||
make
|
||||
|
||||
cd ../build-8
|
||||
|
||||
ln -s ../build-10/libx265.a libx265_main10.a
|
||||
ln -s ../build-12/libx265.a libx265_main12.a
|
||||
|
||||
cmake ../source \
|
||||
-DCMAKE_INSTALL_PREFIX='/usr' \
|
||||
-DENABLE_SHARED='TRUE' \
|
||||
-DEXTRA_LIB='x265_main10.a;x265_main12.a' \
|
||||
-DEXTRA_LINK_FLAGS='-L.' \
|
||||
-DLINKED_10BIT='TRUE' \
|
||||
-DLINKED_12BIT='TRUE'
|
||||
make
|
||||
|
||||
else
|
||||
|
||||
cd x265_11047/build-8
|
||||
|
||||
cmake ../source \
|
||||
-DCMAKE_INSTALL_PREFIX='/usr' \
|
||||
-DENABLE_SHARED='TRUE'
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
package() {
|
||||
cd multicoreware-x265-*/build/linux
|
||||
make DESTDIR="$pkgdir" install
|
||||
cd x265_11047/build-8
|
||||
|
||||
make DESTDIR="${pkgdir}" install
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
diff -urN a/source/CMakeLists.txt b/source/CMakeLists.txt
|
||||
--- a/source/CMakeLists.txt 2015-02-10 14:15:13.000000000 -0700
|
||||
+++ b/source/CMakeLists.txt 2015-02-12 06:25:01.334927114 -0700
|
||||
@@ -46,10 +46,18 @@
|
||||
set(X64 1)
|
||||
add_definitions(-DX86_64=1)
|
||||
endif()
|
||||
--- a/source/CMakeLists.txt 2015-09-22 02:10:07.000000000 -0600
|
||||
+++ b/source/CMakeLists.txt 2015-10-11 08:11:59.385611550 -0600
|
||||
@@ -56,10 +56,22 @@
|
||||
message(STATUS "Detected POWER target processor")
|
||||
set(POWER 1)
|
||||
add_definitions(-DX265_ARCH_POWER=1)
|
||||
+elseif(${SYSPROC} MATCHES "armv5.*")
|
||||
+ message(STATUS "Detected ARMV5 system processor")
|
||||
+ set(ARMV5 1)
|
||||
|
@ -19,12 +19,16 @@ diff -urN a/source/CMakeLists.txt b/source/CMakeLists.txt
|
|||
+elseif(${SYSPROC} STREQUAL "armv7l")
|
||||
+ message(STATUS "Detected ARMV7 system processor")
|
||||
+ set(ARMV7 1)
|
||||
+ add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1 -DHAVE_NEON=0)
|
||||
+elseif(${SYSPROC} STREQUAL "aarch64")
|
||||
+ message(STATUS "Detected AArch64 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}")
|
||||
@@ -133,8 +141,8 @@
|
||||
if(X86 AND NOT X64)
|
||||
@@ -169,8 +181,8 @@
|
||||
elseif(X86 AND NOT X64)
|
||||
add_definitions(-march=i686)
|
||||
endif()
|
||||
- if(ARM)
|
||||
|
@ -32,11 +36,11 @@ diff -urN a/source/CMakeLists.txt b/source/CMakeLists.txt
|
|||
+ if(ARMV7)
|
||||
+ add_definitions(-fPIC)
|
||||
endif()
|
||||
check_cxx_compiler_flag(-Wno-narrowing CC_HAS_NO_NARROWING)
|
||||
check_cxx_compiler_flag(-Wno-array-bounds CC_HAS_NO_ARRAY_BOUNDS)
|
||||
if(FPROFILE_GENERATE)
|
||||
if(INTEL_CXX)
|
||||
diff -urN a/source/common/cpu.cpp b/source/common/cpu.cpp
|
||||
--- a/source/common/cpu.cpp 2015-02-10 14:15:13.000000000 -0700
|
||||
+++ b/source/common/cpu.cpp 2015-02-12 06:25:01.334927114 -0700
|
||||
--- a/source/common/cpu.cpp 2015-09-22 02:10:07.000000000 -0600
|
||||
+++ b/source/common/cpu.cpp 2015-10-11 07:48:42.745386369 -0600
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <machine/cpu.h>
|
||||
#endif
|
||||
|
@ -46,20 +50,3 @@ diff -urN a/source/common/cpu.cpp b/source/common/cpu.cpp
|
|||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
static sigjmp_buf jmpbuf;
|
||||
@@ -340,7 +340,6 @@
|
||||
}
|
||||
|
||||
canjump = 1;
|
||||
- x265_cpu_neon_test();
|
||||
canjump = 0;
|
||||
signal(SIGILL, oldsig);
|
||||
#endif // if !HAVE_NEON
|
||||
@@ -356,7 +355,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