--- /dev/null
+More aliases for ARM.
+Do not force CFLAGS for ARM.
+
+Index: source/CMakeLists.txt
+===================================================================
+--- old/CMakeLists.txt
++++ new/CMakeLists.txt
+@@ -41,7 +41,7 @@ SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_
+ # 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 armv6l armv6j armv7l armv7a)
+ list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
+ list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
+ set(POWER_ALIASES ppc64 ppc64le)
+@@ -208,15 +208,11 @@ if(GCC)
+ endif()
+ endif()
+ endif()
+- if(ARM AND CROSS_COMPILE_ARM)
+- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
+- elseif(ARM)
++ if(ARM)
+ find_package(Neon)
+ if(CPU_HAS_NEON)
+- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
++ set(ARM_ARGS -mfpu=neon)
+ add_definitions(-DHAVE_NEON)
+- else()
+- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
+ endif()
+ endif()
+ add_definitions(${ARM_ARGS})
--- /dev/null
+These functions are only built when enabling assembly on ARM; use proper check
+to avoid undefined symbols.
+
+Index: source/common/primitives.cpp
+===================================================================
+--- old/common/primitives.cpp
++++ new/common/primitives.cpp
+@@ -270,7 +270,7 @@ void PFX(cpu_emms)(void) {}
+ void PFX(cpu_cpuid)(uint32_t, uint32_t *eax, uint32_t *, uint32_t *, uint32_t *) { *eax = 0; }
+ void PFX(cpu_xgetbv)(uint32_t, uint32_t *, uint32_t *) {}
+
+-#if X265_ARCH_ARM == 0
++#if X265_ARCH_ARM == 0 || !defined(ENABLE_ASSEMBLY)
+ void PFX(cpu_neon_test)(void) {}
+ int PFX(cpu_fast_neon_mrc_test)(void) { return 0; }
+ #endif // X265_ARCH_ARM
--- /dev/null
+More complete ppc64 matches.
+
+Index: x265_2.2/source/CMakeLists.txt
+===================================================================
+--- old/CMakeLists.txt
++++ new/CMakeLists.txt
+@@ -44,7 +44,7 @@ set(X86_ALIASES x86 i386 i686 x86_64 amd
+ set(ARM_ALIASES armv6l armv6j armv7l armv7a)
+ list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
+ list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
+-set(POWER_ALIASES ppc64 ppc64le)
++set(POWER_ALIASES ppc64 ppc64le powerpc64 powerpc64le)
+ list(FIND POWER_ALIASES "${SYSPROC}" POWERMATCH)
+ if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1")
+ set(X86 1)
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI="7"
inherit cmake-utils multilib-minimal multilib multibuild flag-o-matic
RESTRICT="test"
ASM_DEPEND=">=dev-lang/yasm-1.2.0"
-RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- abi_x86_32? ( ${ASM_DEPEND} )
+
+BDEPEND="abi_x86_32? ( ${ASM_DEPEND} )
abi_x86_64? ( ${ASM_DEPEND} )"
+RDEPEND="numa? ( >=sys-process/numactl-2.0.10-r1[${MULTILIB_USEDEP}] )"
+
+DEPEND="${RDEPEND}"
+
PATCHES=(
- "${FILESDIR}/arm.patch"
- "${FILESDIR}/neon.patch"
- "${FILESDIR}/ppc64.patch"
+ "${FILESDIR}"/${PN}-3.3-arm.patch
+ "${FILESDIR}"/${PN}-3.3-neon.patch
+ "${FILESDIR}"/${PN}-3.3-ppc64.patch
)
src_unpack() {
- if [[ ${PV} = 9999* ]]; then
+ if [[ ${PV} = 9999* ]] ; then
mercurial_src_unpack
# Can't set it at global scope due to mercurial.eclass limitations...
export S=${WORKDIR}/${P}/source
# allow disabling it: "main" *MUST* come last in the following list.
x265_get_variants() {
- local variants=""
- use 12bit && variants+="main12 "
- use 10bit && variants+="main10 "
- variants+="main"
- echo "${variants}"
+ local -a variants=()
+ use 12bit && variants+=( main12 )
+ use 10bit && variants+=( main10 )
+ variants+=( main )
+ echo "${variants[@]}"
}
x265_variant_src_configure() {
if (( "${#MULTIBUILD_VARIANTS[@]}" > 1 )) ; then
local myvariants=( "${MULTIBUILD_VARIANTS[@]}" )
unset myvariants[${#MULTIBUILD_VARIANTS[@]}-1]
- local liblist=""
+ local liblist="" v=
for v in "${myvariants[@]}" ; do
- ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die
+ ln -s "${BUILD_DIR%-*}-${v}/libx265.a" "libx265_${v}.a" || die
liblist+="libx265_${v}.a;"
done
mycmakeargs+=(
*)
die "Unknown variant: ${MULTIBUILD_VARIANT}";;
esac
+
cmake-utils_src_configure
popd >/dev/null || die
}
multilib_src_configure() {
append-cflags -fPIC
append-cxxflags -fPIC
+
local myabicmakeargs=(
- $(cmake-utils_use_enable test TESTS)
+ -DENABLE_TESTS=$(usex test ON OFF)
$(multilib_is_native_abi || echo "-DENABLE_CLI=OFF")
-DENABLE_LIBNUMA=$(usex numa ON OFF)
-DCPU_POWER8=$(usex power8 ON OFF)
}
x265_variant_src_test() {
- if [ -x "${BUILD_DIR}/test/TestBench" ] ; then
+ if [[ -x "${BUILD_DIR}/test/TestBench" ]] ; then
"${BUILD_DIR}/test/TestBench" || die
else
einfo "Unit tests check only assembly."