diff options
Diffstat (limited to 'dev-libs/crc32c')
-rw-r--r-- | dev-libs/crc32c/Manifest | 8 | ||||
-rw-r--r-- | dev-libs/crc32c/crc32c-1.0.6-r1.ebuild (renamed from dev-libs/crc32c/crc32c-1.0.6.ebuild) | 14 | ||||
-rw-r--r-- | dev-libs/crc32c/crc32c-1.1.1.ebuild | 40 | ||||
-rw-r--r-- | dev-libs/crc32c/files/crc32c-1.0.6-fix-big-endian.patch | 29 | ||||
-rw-r--r-- | dev-libs/crc32c/files/crc32c-1.1.1-system-testdeps.patch | 21 | ||||
-rw-r--r-- | dev-libs/crc32c/metadata.xml | 4 |
6 files changed, 109 insertions, 7 deletions
diff --git a/dev-libs/crc32c/Manifest b/dev-libs/crc32c/Manifest index 2910b6ab1c40..11e2e3d17151 100644 --- a/dev-libs/crc32c/Manifest +++ b/dev-libs/crc32c/Manifest @@ -1,3 +1,7 @@ +AUX crc32c-1.0.6-fix-big-endian.patch 1743 BLAKE2B c4da7347ca01507c92c4ea587afb24322a09faba43b60b3c80a5fa9e9c9a4311aff2bcfd25f0afd85e3444cbceb6b4339b930be7122b315191c07f0866332f39 SHA512 442f333f9ec0e57a4dbab3a7e31028adec4d201c945000cc2ad8e3d8f7cfd94a0295a885d7e25ccd7e56eb30d38568c6f3b145138e64e3b332bf311da02e32b4 +AUX crc32c-1.1.1-system-testdeps.patch 755 BLAKE2B 5eedd88abddcb93e33dd4dd37b442608921dd6d015fd0909a789bbc6b36301dfdb0de7c6a9cb7c804db82ca6dad5efe1359406bccdaf24019ab33b9789b4bad1 SHA512 110425199b18dfd4265315fcdc78cb876b18c2abbaf796c1ef6fb035b8e901a159bd38a84efd51112b932f3c93525c95963406c43f9796827dcbe5e70ea967ac DIST crc32c-1.0.6.tar.gz 29596 BLAKE2B 5806e0a48cb3048c9b07abb75eb232491483176bbeb98bc11ad1b0ef7d4ce89929ad20b0354906fd67e8773541f9913f3948f1db9a3f3987fe7e2ca67e9d2467 SHA512 c30f6510d6348f15dcdddc06e375f21a69681cd615483d67628b32de747e5e98200fa49faf7e3fc30a1302991fd1f9c9a706c9eb4e13c9c6c09e74066474ea7b -EBUILD crc32c-1.0.6.ebuild 585 BLAKE2B 4f81121ed2fa64b27606d86d8ffcf6ef54e3cffcca62c7b3a7425c3f7e1ff0706ddbe480412fcba8b1ab903419cc3b06b1ae94d4c2d04b8cca63cae7fe18f042 SHA512 000cb3d70e1c01ea60abfbd2c8d030de752af20a494ac04a7acb592882036be98dc5bb067a39219577c0ac9510f26ec4e7ff0a4f26f3eb071423668866d6b207 -MISC metadata.xml 247 BLAKE2B fad006bd63156a3ffcdfe9e4c216b806d3b341fa5b7e8de2608ad51674b482493f7d0fabdeb6010ce0c41aef65a55abe404b8ba5ba7d72f36822b7d96d58182b SHA512 189f876175728dfb474cf2ccb122ebfe48b068cc5fd65a3cfed7dad947dd9ce0fc7c89ce5c0982fdee5262025236b7d5cccf48b55c67c5cd33e84910c28e0b46 +DIST crc32c-1.1.1.tar.gz 29829 BLAKE2B 5ffb0809e80d1fad81a77d96683d44142a7d84fc15ce18070cdcdb12fd9b67f7ec732a53d8af7dc4b77add859bf64c4fa8bc52a593830de931a7bd12c60498cc SHA512 c276160ec960a38cd535c998336472694819bc6eb37beb711bd43a31441d1808c8a14d3a1f0eccc780785b19f739a4a51f923867a20b0707c465e0cc03f457e9 +EBUILD crc32c-1.0.6-r1.ebuild 703 BLAKE2B 3443d226948d7357e5db97f791a96abf123a4e99573dfed1d3d15a3ed4547f43d8f9e2ed6aa72edbd373770c822582123ac162a197d70016365d489f0b6e5781 SHA512 87923213b411d5ca4c92cadd3d18aa61965e1d50f18c84d9ffbd7a2f789d9353629b768824debd9a1cbb1fb5aedf90e0e216482e907bac63ff684e7a4f61f9a3 +EBUILD crc32c-1.1.1.ebuild 858 BLAKE2B 4a0e2b78bd5703afcfe4655cb6d9e9d5214996bb458134c1138ed418a7a1eeab7a60fe0f2f45c710b549874ae69f046b7de100b277d1698748129a325bd78d85 SHA512 739035fd5a383c25661214f55400470b5563827c94379e138fd223bdb3fae39102bddbb54f6d98a2abb56c566d4f67c531ef19b3a0eb109e16306df85f5e50a8 +MISC metadata.xml 250 BLAKE2B 60856bf83d348f165520d89ff8e41cfff66d5bb82259b087d1810c88b1bb3001a1da90f015123bbeb46d8ba5a004aa557f4d1853118914afc589a2a2ce37e1e4 SHA512 d1a03e43deacb398d245a7825cb11fd06be5ef19cd7e861e1ed837e09df25b1d350090145de1f49ecce51dd27a73c46476a70c1607bd6ec2a274b0b660b25b5a diff --git a/dev-libs/crc32c/crc32c-1.0.6.ebuild b/dev-libs/crc32c/crc32c-1.0.6-r1.ebuild index 73fcf18bbb89..53b6e710e340 100644 --- a/dev-libs/crc32c/crc32c-1.0.6.ebuild +++ b/dev-libs/crc32c/crc32c-1.0.6-r1.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit cmake-utils +inherit cmake DESCRIPTION="CRC32C implementation with support for CPU-specific acceleration instructions" HOMEPAGE="https://github.com/google/crc32c" @@ -12,10 +12,18 @@ SRC_URI="https://github.com/google/crc32c/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="amd64 ~riscv x86" -IUSE="" + +PATCHES=( + "${FILESDIR}/${P}-fix-big-endian.patch" +) DOCS=( README.md ) +src_prepare() { + sed -e '/-Werror/d' -i CMakeLists.txt || die + cmake_src_prepare +} + src_configure() { local mycmakeargs=( -DCRC32C_BUILD_TESTS=OFF @@ -23,5 +31,5 @@ src_configure() { -DCRC32C_USE_GLOG=OFF ) - cmake-utils_src_configure + cmake_src_configure } diff --git a/dev-libs/crc32c/crc32c-1.1.1.ebuild b/dev-libs/crc32c/crc32c-1.1.1.ebuild new file mode 100644 index 000000000000..857f734525dc --- /dev/null +++ b/dev-libs/crc32c/crc32c-1.1.1.ebuild @@ -0,0 +1,40 @@ +# 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 ~ppc64 ~riscv ~sparc ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND="test? ( dev-cpp/gtest )" + +PATCHES=( + "${FILESDIR}/${PN}-1.0.6-fix-big-endian.patch" + "${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 +} diff --git a/dev-libs/crc32c/files/crc32c-1.0.6-fix-big-endian.patch b/dev-libs/crc32c/files/crc32c-1.0.6-fix-big-endian.patch new file mode 100644 index 000000000000..3bd09930946a --- /dev/null +++ b/dev-libs/crc32c/files/crc32c-1.0.6-fix-big-endian.patch @@ -0,0 +1,29 @@ +From: Pieter Wuille <github-sipa@wuille.net> +Date: Thu, 18 Jun 2020 21:05:38 -0700 +Subject: [PATCH] Fix (unused) ReadUint64LE for BE machines (#41) + +--- a/src/crc32c_read_le.h ++++ b/src/crc32c_read_le.h +@@ -30,14 +30,14 @@ inline uint32_t ReadUint32LE(const uint8_t* buffer) { + // Reads a little-endian 64-bit integer from a 64-bit-aligned buffer. + inline uint64_t ReadUint64LE(const uint8_t* buffer) { + #if BYTE_ORDER_BIG_ENDIAN +- return ((static_cast<uint32_t>(static_cast<uint8_t>(buffer[0]))) | +- (static_cast<uint32_t>(static_cast<uint8_t>(buffer[1])) << 8) | +- (static_cast<uint32_t>(static_cast<uint8_t>(buffer[2])) << 16) | +- (static_cast<uint32_t>(static_cast<uint8_t>(buffer[3])) << 24) | +- (static_cast<uint32_t>(static_cast<uint8_t>(buffer[4])) << 32) | +- (static_cast<uint32_t>(static_cast<uint8_t>(buffer[5])) << 40) | +- (static_cast<uint32_t>(static_cast<uint8_t>(buffer[6])) << 48) | +- (static_cast<uint32_t>(static_cast<uint8_t>(buffer[7])) << 56)); ++ return ((static_cast<uint64_t>(static_cast<uint8_t>(buffer[0]))) | ++ (static_cast<uint64_t>(static_cast<uint8_t>(buffer[1])) << 8) | ++ (static_cast<uint64_t>(static_cast<uint8_t>(buffer[2])) << 16) | ++ (static_cast<uint64_t>(static_cast<uint8_t>(buffer[3])) << 24) | ++ (static_cast<uint64_t>(static_cast<uint8_t>(buffer[4])) << 32) | ++ (static_cast<uint64_t>(static_cast<uint8_t>(buffer[5])) << 40) | ++ (static_cast<uint64_t>(static_cast<uint8_t>(buffer[6])) << 48) | ++ (static_cast<uint64_t>(static_cast<uint8_t>(buffer[7])) << 56)); + #else // !BYTE_ORDER_BIG_ENDIAN + uint64_t result; + // This should be optimized to a single instruction. diff --git a/dev-libs/crc32c/files/crc32c-1.1.1-system-testdeps.patch b/dev-libs/crc32c/files/crc32c-1.1.1-system-testdeps.patch new file mode 100644 index 000000000000..da513c5d4eda --- /dev/null +++ b/dev-libs/crc32c/files/crc32c-1.1.1-system-testdeps.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8490728..c7f0952 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -315,15 +315,7 @@ if(CRC32C_BUILD_TESTS) + set(install_gmock OFF) + + # This project is tested using GoogleTest. +- add_subdirectory("third_party/googletest") +- +- # GoogleTest triggers a missing field initializers warning. +- if(CRC32C_HAVE_NO_MISSING_FIELD_INITIALIZERS) +- set_property(TARGET gtest +- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers) +- set_property(TARGET gmock +- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers) +- endif(CRC32C_HAVE_NO_MISSING_FIELD_INITIALIZERS) ++ find_package(GTest REQUIRED) + + add_executable(crc32c_tests "") + target_sources(crc32c_tests diff --git a/dev-libs/crc32c/metadata.xml b/dev-libs/crc32c/metadata.xml index 76f45cdee0f4..dbc3daf2032a 100644 --- a/dev-libs/crc32c/metadata.xml +++ b/dev-libs/crc32c/metadata.xml @@ -2,7 +2,7 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> - <email>perfinion@gentoo.org</email> - <name>Jason Zaman</name> + <email>arthurzam@gentoo.org</email> + <name>Arthur Zamarin</name> </maintainer> </pkgmetadata> |