mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
extra/x265 fixes
This commit is contained in:
parent
77fa32c980
commit
13cda9c890
2 changed files with 49 additions and 35 deletions
|
@ -19,12 +19,14 @@ provides=('libx265.so')
|
|||
source=("https://bitbucket.org/multicoreware/x265/downloads/x265_${pkgver}.tar.gz"
|
||||
arm.patch)
|
||||
md5sums=('a4f16c0f054f002d6d8c9c6f7fb03026'
|
||||
'4c04f99e474df7f54f0b9db8ee1bb1f6')
|
||||
'6b7074bb7a250d0cb7de33905996dd5c')
|
||||
|
||||
prepare() {
|
||||
cd x265_${pkgver}
|
||||
|
||||
patch -p1 -i ../arm.patch
|
||||
[[ $CARCH == "aarch64" ]] && CFLAGS+=" -fPIC" && CXXFLAGS+=" -fPIC"
|
||||
[[ $CARCH == "arm" ]] && CONFIG="-DENABLE_ASSEMBLY=OFF"
|
||||
|
||||
for d in 8 $([[ $CARCH == 'x86_64' ]] && echo "10 12"); do
|
||||
if [[ -d build-$d ]]; then
|
||||
|
@ -78,7 +80,8 @@ build() {
|
|||
|
||||
cmake ../source \
|
||||
-DCMAKE_INSTALL_PREFIX='/usr' \
|
||||
-DENABLE_SHARED='TRUE'
|
||||
-DENABLE_SHARED='TRUE' \
|
||||
$CONFIG
|
||||
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -1,46 +1,57 @@
|
|||
diff -urN a/source/CMakeLists.txt b/source/CMakeLists.txt
|
||||
--- 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)
|
||||
+ add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=0 -DHAVE_NEON=0)
|
||||
elseif(${SYSPROC} STREQUAL "armv6l")
|
||||
--- a/source/CMakeLists.txt 2016-07-13 07:53:26.000000000 -0600
|
||||
+++ b/source/CMakeLists.txt 2016-07-23 09:47:41.615318333 -0600
|
||||
@@ -41,7 +41,7 @@
|
||||
# System architecture detection
|
||||
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC)
|
||||
set(X86_ALIASES x86 i386 i686 x86_64 amd64)
|
||||
-set(ARM_ALIASES armv6l armv7l)
|
||||
+set(ARM_ALIASES armv5tel armv6l armv7l)
|
||||
list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
|
||||
list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
|
||||
set(POWER_ALIASES ppc64 ppc64le)
|
||||
@@ -66,9 +66,17 @@
|
||||
else()
|
||||
set(CROSS_COMPILE_ARM 0)
|
||||
endif()
|
||||
- message(STATUS "Detected ARM target processor")
|
||||
- set(ARM 1)
|
||||
+ if(${SYSPROC} MATCHES "armv5.*")
|
||||
+ message(STATUS "Detected ARMV5 system processor")
|
||||
+ add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=0 -DHAVE_NEON=0)
|
||||
+ elseif(${SYSPROC} STREQUAL "armv6l")
|
||||
+ message(STATUS "Detected ARMV6 system processor")
|
||||
+ add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1 -DHAVE_NEON=0)
|
||||
+ elseif(${SYSPROC} STREQUAL "armv7l")
|
||||
+ message(STATUS "Detected ARMV7 system processor")
|
||||
+ add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1 -DHAVE_NEON=0 -fPIC)
|
||||
+ endif()
|
||||
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(${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}")
|
||||
@@ -169,8 +181,8 @@
|
||||
elseif(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)
|
||||
@@ -186,18 +194,6 @@
|
||||
add_definitions(-march=i686)
|
||||
endif()
|
||||
endif()
|
||||
- if(ARM AND CROSS_COMPILE_ARM)
|
||||
- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
|
||||
- elseif(ARM)
|
||||
- find_package(Neon)
|
||||
- if(CPU_HAS_NEON)
|
||||
- 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)
|
||||
- endif()
|
||||
- endif()
|
||||
- add_definitions(${ARM_ARGS})
|
||||
if(FPROFILE_GENERATE)
|
||||
if(INTEL_CXX)
|
||||
add_definitions(-prof-gen -prof-dir="${CMAKE_CURRENT_BINARY_DIR}")
|
||||
diff -urN a/source/common/cpu.cpp b/source/common/cpu.cpp
|
||||
--- 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
|
||||
--- a/source/common/cpu.cpp 2016-07-13 07:53:26.000000000 -0600
|
||||
+++ b/source/common/cpu.cpp 2016-07-23 09:39:15.075352729 -0600
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <machine/cpu.h>
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue