summaryrefslogtreecommitdiff
path: root/dev-python/crc32c
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/crc32c
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'dev-python/crc32c')
-rw-r--r--dev-python/crc32c/Manifest1
-rw-r--r--dev-python/crc32c/crc32c-2.8.ebuild46
-rw-r--r--dev-python/crc32c/metadata.xml8
3 files changed, 55 insertions, 0 deletions
diff --git a/dev-python/crc32c/Manifest b/dev-python/crc32c/Manifest
new file mode 100644
index 000000000000..36d9e6e808a8
--- /dev/null
+++ b/dev-python/crc32c/Manifest
@@ -0,0 +1 @@
+DIST crc32c-2.8.tar.gz 48179 BLAKE2B 8a4a91d068fe2baed4f4f089fef77ef9f3fd24d0e10c029500740f04b09150eeeea761fe919968253bbf83bb084a91b2ae0a0cc9f3db509701e75f67110858ab SHA512 10f139333f912d62dee4b6c21590b3182c3e6652e31aceb1bdec28ca8817ef8aa26abec3f44e6a271cb5c4f8c4abd8942b56e4642a9ab434cb41866c1ce03e19
diff --git a/dev-python/crc32c/crc32c-2.8.ebuild b/dev-python/crc32c/crc32c-2.8.ebuild
new file mode 100644
index 000000000000..cf928382f494
--- /dev/null
+++ b/dev-python/crc32c/crc32c-2.8.ebuild
@@ -0,0 +1,46 @@
+# Copyright 2024-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="CRC32c algorithm in hardware and software"
+HOMEPAGE="
+ https://github.com/ICRAR/crc32c/
+ https://pypi.org/project/crc32c/
+"
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~sparc ~x86"
+# NB: these don't affect the build, they are only used for tests
+IUSE="cpu_flags_arm_crc32 cpu_flags_x86_sse4_2"
+
+EPYTEST_PLUGINS=()
+distutils_enable_tests pytest
+
+python_test() {
+ local -x CRC32C_SW_MODE
+
+ # force = run "software" code (i.e. unoptimized)
+ # none = run "hardware" code (i.e. SSE4.2 / ARMv8 CRC32)
+ for CRC32C_SW_MODE in none force; do
+ if [[ ${CRC32C_SW_MODE} == none ]]; then
+ if ! use cpu_flags_arm_crc32 && ! use cpu_flags_x86_sse4_2; then
+ continue
+ fi
+
+ # the test suite just skips all tests, so double-check
+ "${EPYTHON}" -c "import crc32c" ||
+ die "Importing crc32c failed (accelerated code path broken?)"
+ fi
+
+ einfo "Testing with CRC32C_SW_MODE=${CRC32C_SW_MODE}"
+ epytest
+ done
+}
diff --git a/dev-python/crc32c/metadata.xml b/dev-python/crc32c/metadata.xml
new file mode 100644
index 000000000000..988ae9a6a6fe
--- /dev/null
+++ b/dev-python/crc32c/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ </maintainer>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>