From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 17C0413835A for ; Sun, 24 May 2020 20:25:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D3E13E0995; Sun, 24 May 2020 20:25:16 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A9749E0995 for ; Sun, 24 May 2020 20:25:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 63B7D34F06A for ; Sun, 24 May 2020 20:25:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5BE6B264 for ; Sun, 24 May 2020 20:25:11 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1590351829.e2661dbb76e81cc081c1220350c11e0a82401dd4.whissi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/x265/files/, media-libs/x265/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/x265/files/x265-3.3-arm.patch media-libs/x265/files/x265-3.3-neon.patch media-libs/x265/files/x265-3.3-ppc64.patch media-libs/x265/x265-3.3.ebuild X-VCS-Directories: media-libs/x265/ media-libs/x265/files/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: e2661dbb76e81cc081c1220350c11e0a82401dd4 X-VCS-Branch: master Date: Sun, 24 May 2020 20:25:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: df13cf36-de7a-4741-a0b0-42bf48372f2b X-Archives-Hash: dadc1392fa6d1925da2ae13d15fbd3cf commit: e2661dbb76e81cc081c1220350c11e0a82401dd4 Author: Thomas Deutschmann gentoo org> AuthorDate: Sun May 24 14:58:19 2020 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sun May 24 20:23:49 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2661dbb media-libs/x265: migrate to EAPI=7 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Thomas Deutschmann gentoo.org> media-libs/x265/files/x265-3.3-arm.patch | 34 ++++++++++++++++++++++++++ media-libs/x265/files/x265-3.3-neon.patch | 16 ++++++++++++ media-libs/x265/files/x265-3.3-ppc64.patch | 15 ++++++++++++ media-libs/x265/x265-3.3.ebuild | 39 +++++++++++++++++------------- 4 files changed, 87 insertions(+), 17 deletions(-) diff --git a/media-libs/x265/files/x265-3.3-arm.patch b/media-libs/x265/files/x265-3.3-arm.patch new file mode 100644 index 00000000000..7e7c8c58b72 --- /dev/null +++ b/media-libs/x265/files/x265-3.3-arm.patch @@ -0,0 +1,34 @@ +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}) diff --git a/media-libs/x265/files/x265-3.3-neon.patch b/media-libs/x265/files/x265-3.3-neon.patch new file mode 100644 index 00000000000..316e670febe --- /dev/null +++ b/media-libs/x265/files/x265-3.3-neon.patch @@ -0,0 +1,16 @@ +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 diff --git a/media-libs/x265/files/x265-3.3-ppc64.patch b/media-libs/x265/files/x265-3.3-ppc64.patch new file mode 100644 index 00000000000..8e739e3fab1 --- /dev/null +++ b/media-libs/x265/files/x265-3.3-ppc64.patch @@ -0,0 +1,15 @@ +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) diff --git a/media-libs/x265/x265-3.3.ebuild b/media-libs/x265/x265-3.3.ebuild index 41f53bc131e..9fc0159bc00 100644 --- a/media-libs/x265/x265-3.3.ebuild +++ b/media-libs/x265/x265-3.3.ebuild @@ -1,7 +1,7 @@ # 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 @@ -25,19 +25,22 @@ IUSE="+10bit +12bit cpu_flags_arm_neon numa pic power8 test" 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 @@ -61,11 +64,11 @@ src_unpack() { # 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() { @@ -117,9 +120,9 @@ 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+=( @@ -133,6 +136,7 @@ x265_variant_src_configure() { *) die "Unknown variant: ${MULTIBUILD_VARIANT}";; esac + cmake-utils_src_configure popd >/dev/null || die } @@ -140,8 +144,9 @@ x265_variant_src_configure() { 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) @@ -173,7 +178,7 @@ multilib_src_compile() { } 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."