From d3887e9f15fade5c6dbbd79a11bb5a54a3e18c6a Mon Sep 17 00:00:00 2001 From: Arthur Zamarin Date: Sun, 24 Oct 2021 09:53:06 +0300 Subject: dev-libs/crc32c: fix for arm64 without crc32 On arm64, the build system decided if the current CPU supports crc32 instructions, but forcing the compiler to support it and then checking if it compiles. By removing the forcing, we really check if the arch supports it. Bit thanks to Sam James for testing and finding the issue in build system. Closes: https://bugs.gentoo.org/818874 Signed-off-by: Arthur Zamarin --- dev-libs/crc32c/crc32c-1.1.2-r1.ebuild | 41 ++++++++++++++++++++++++++++++++++ dev-libs/crc32c/crc32c-1.1.2.ebuild | 39 -------------------------------- 2 files changed, 41 insertions(+), 39 deletions(-) create mode 100644 dev-libs/crc32c/crc32c-1.1.2-r1.ebuild delete mode 100644 dev-libs/crc32c/crc32c-1.1.2.ebuild (limited to 'dev-libs/crc32c') diff --git a/dev-libs/crc32c/crc32c-1.1.2-r1.ebuild b/dev-libs/crc32c/crc32c-1.1.2-r1.ebuild new file mode 100644 index 000000000000..e7e06e01ec2a --- /dev/null +++ b/dev-libs/crc32c/crc32c-1.1.2-r1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="CRC32C implementation with support for CPU-specific acceleration instructions" +HOMEPAGE="https://github.com/google/crc32c" +SRC_URI="https://github.com/google/crc32c/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND="test? ( dev-cpp/gtest )" + +PATCHES=( + "${FILESDIR}/${PN}-1.1.1-system-testdeps.patch" +) + +DOCS=( README.md ) + +src_prepare() { + sed -e '/-Werror/d' \ + -e '/-march=armv8/d' \ + -i CMakeLists.txt || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DCRC32C_BUILD_TESTS=$(usex test) + -DCRC32C_BUILD_BENCHMARKS=OFF + -DCRC32C_USE_GLOG=OFF + ) + + cmake_src_configure +} diff --git a/dev-libs/crc32c/crc32c-1.1.2.ebuild b/dev-libs/crc32c/crc32c-1.1.2.ebuild deleted file mode 100644 index 6eee30bb278d..000000000000 --- a/dev-libs/crc32c/crc32c-1.1.2.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit cmake - -DESCRIPTION="CRC32C implementation with support for CPU-specific acceleration instructions" -HOMEPAGE="https://github.com/google/crc32c" -SRC_URI="https://github.com/google/crc32c/archive/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~riscv ~sparc ~x86" -IUSE="test" -RESTRICT="!test? ( test )" - -BDEPEND="test? ( dev-cpp/gtest )" - -PATCHES=( - "${FILESDIR}/${PN}-1.1.1-system-testdeps.patch" -) - -DOCS=( README.md ) - -src_prepare() { - sed -e '/-Werror/d' -i CMakeLists.txt || die - cmake_src_prepare -} - -src_configure() { - local mycmakeargs=( - -DCRC32C_BUILD_TESTS=$(usex test) - -DCRC32C_BUILD_BENCHMARKS=OFF - -DCRC32C_USE_GLOG=OFF - ) - - cmake_src_configure -} -- cgit v1.2.3