[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#57675] [PATCH 03/10] gnu: Add crc32c.
From: |
Hilton Chain |
Subject: |
[bug#57675] [PATCH 03/10] gnu: Add crc32c. |
Date: |
Mon, 26 Sep 2022 21:30:49 +0800 |
* gnu/packages/cpp.scm (crc32c): New variable.
* gnu/packages/patches/crc32c-unbundle-googletest.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add patch.
---
gnu/local.mk | 1 +
gnu/packages/cpp.scm | 30 +++++++++++++++++++
.../patches/crc32c-unbundle-googletest.patch | 21 +++++++++++++
3 files changed, 52 insertions(+)
create mode 100644 gnu/packages/patches/crc32c-unbundle-googletest.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 4e982dc6e3..44c13c4744 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -997,6 +997,7 @@ dist_patch_DATA =
\
%D%/packages/patches/cpuinfo-system-libraries.patch \
%D%/packages/patches/cpulimit-with-glib-2.32.patch \
%D%/packages/patches/crawl-upgrade-saves.patch \
+ %D%/packages/patches/crc32c-unbundle-googletest.patch \
%D%/packages/patches/crda-optional-gcrypt.patch \
%D%/packages/patches/clucene-contribs-lib.patch \
%D%/packages/patches/cube-nocheck.patch \
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 5e0646444c..f8b3cd2f23 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1916,3 +1916,33 @@ (define-public cpp-mustache
templated string type for compatibility with any STL-like string (std::string,
std::wstring, etc).")
(license license:boost1.0)))
+
+(define-public crc32c
+ (package
+ (name "crc32c")
+ (version "1.1.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/google/crc32c")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0966lyy3w5cnrs0c0fkma4hga51k54hns72l4n76944awqssap7j"))
+ (patches (search-patches "crc32c-unbundle-googletest.patch"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON"
+ "-DCRC32C_BUILD_BENCHMARKS=OFF"
+ "-DCRC32C_USE_GLOG=OFF")))
+ (native-inputs (list googletest))
+ (home-page "https://github.com/google/crc32c")
+ (synopsis
+ "CRC32C implementation with support for CPU-specific acceleration
+ instructions")
+ (description
+ "This project collects a few CRC32C implementations under an umbrella
+that dispatches to a suitable implementation based on the host computer's
+hardware capabilities.")
+ (license license:bsd-3)))
diff --git a/gnu/packages/patches/crc32c-unbundle-googletest.patch
b/gnu/packages/patches/crc32c-unbundle-googletest.patch
new file mode 100644
index 0000000000..da513c5d4e
--- /dev/null
+++ b/gnu/packages/patches/crc32c-unbundle-googletest.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
--
2.37.3
- [bug#57675] [PATCH v11 7/8] gnu: telegram-desktop: Update to 4.2.0., (continued)
- [bug#57675] [PATCH v11 7/8] gnu: telegram-desktop: Update to 4.2.0., Hilton Chain, 2022/09/24
- [bug#57675] [PATCH v11 7/8] gnu: telegram-desktop: Update to 4.2.0., Liliana Marie Prikler, 2022/09/25
- [bug#57675] [PATCH v11 7/8] gnu: telegram-desktop: Update to 4.2.0., Hilton Chain, 2022/09/25
- [bug#57675] [PATCH v11 7/8] gnu: telegram-desktop: Update to 4.2.0., Liliana Marie Prikler, 2022/09/25
- [bug#57675] [PATCH v11 7/8] gnu: telegram-desktop: Update to 4.2.0., Hilton Chain, 2022/09/25
- [bug#57675] [PATCH v11 7/8] gnu: telegram-desktop: Update to 4.2.0., Hilton Chain, 2022/09/25
- [bug#57675] [PATCH v11 5/8] gnu: webrtc-for-telegram-desktop: Update to 621f3da5., Liliana Marie Prikler, 2022/09/24
[bug#57675] [PATCH 00/10] gnu: telegram-desktop: Update to 4.2.2., Hilton Chain, 2022/09/26
- [bug#57675] [PATCH 01/10] gnu: kcoreaddons: Update to 5.98.0., Hilton Chain, 2022/09/26
- [bug#57675] [PATCH 02/10] gnu: Add abseil-cpp-cxxstd17., Hilton Chain, 2022/09/26
- [bug#57675] [PATCH 03/10] gnu: Add crc32c.,
Hilton Chain <=
- [bug#57675] [PATCH 04/10] gnu: webrtc-for-telegram-desktop: Update to 621f3da5., Hilton Chain, 2022/09/26
- [bug#57675] [PATCH 05/10] gnu: webrtc-for-telegram-desktop: Order inputs alphabetically., Hilton Chain, 2022/09/26
- [bug#57675] [PATCH 06/10] gnu: Remove libvpx-for-telegram-desktop., Hilton Chain, 2022/09/26
- [bug#57675] [PATCH 07/10] gnu: Add libdispatch., Hilton Chain, 2022/09/26
- [bug#57675] [PATCH 08/10] gnu: telegram-desktop: Update to 4.2.2., Hilton Chain, 2022/09/26
- [bug#57675] [PATCH 09/10] gnu: telegram-desktop: Order inputs alphabetically., Hilton Chain, 2022/09/26
- [bug#57675] [PATCH 10/10] gnu: telegram: Remove unused variables., Hilton Chain, 2022/09/26
- [bug#57675] [PATCH 08/10] gnu: telegram-desktop: Update to 4.2.2., Liliana Marie Prikler, 2022/09/27
- bug#57675: [PATCH 08/10] gnu: telegram-desktop: Update to 4.2.2., Liliana Marie Prikler, 2022/09/28
- [bug#57675] [PATCH 08/10] gnu: telegram-desktop: Update to 4.2.2., Hilton Chain, 2022/09/29