From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WLm2ACSzMWOPFgAAbAwnHQ (envelope-from ) for ; Mon, 26 Sep 2022 16:11:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EFJ2OyOzMWOMZQEAG6o9tA (envelope-from ) for ; Mon, 26 Sep 2022 16:11:47 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A2B4D2D60D for ; Mon, 26 Sep 2022 16:11:47 +0200 (CEST) Received: from localhost ([::1]:50876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocopm-0003j8-Cn for larch@yhetil.org; Mon, 26 Sep 2022 10:11:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocoDK-0003Du-Te for guix-patches@gnu.org; Mon, 26 Sep 2022 09:32:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50587) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocoDK-0004Tz-DL for guix-patches@gnu.org; Mon, 26 Sep 2022 09:32:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ocoDK-0005jz-2F for guix-patches@gnu.org; Mon, 26 Sep 2022 09:32:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57675] [PATCH 03/10] gnu: Add crc32c. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 26 Sep 2022 13:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57675@debbugs.gnu.org Cc: Liliana Marie Prikler Received: via spool by 57675-submit@debbugs.gnu.org id=B57675.166419907622002 (code B ref 57675); Mon, 26 Sep 2022 13:32:02 +0000 Received: (at 57675) by debbugs.gnu.org; 26 Sep 2022 13:31:16 +0000 Received: from localhost ([127.0.0.1]:49662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocoCZ-0005io-L3 for submit@debbugs.gnu.org; Mon, 26 Sep 2022 09:31:16 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:58342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ocoCY-0005ib-7y for 57675@debbugs.gnu.org; Mon, 26 Sep 2022 09:31:14 -0400 Date: Mon, 26 Sep 2022 21:30:49 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1664199068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5+GEB4hXt6uW+xDIxCo2RyaY2nkv5Mt4dainrY7aeEk=; b=rjGh3QOd8hrndh9scJOu6fFKJ4TiUQwP3nQz4z8yex6B/fPK9sTDKZ6/SH1TZGGCDK1Uh+ JQ7isKctyFbrQHZenIX+7S1UfMTZMmGk/JP6gWu+gkC2EbhmhjqG9H8jbrXyZ84Zh6rwZ9 esJ3yo6P/ZaUvIsIFVWkX7l+NkuIX6qkCkZaUFw9SJDPgSCXksTo7kjAO2I29bZ5f1Pu9Q CiGCKELpLbrPgDEZU5pvQWS+DhxY6aG5sLx9VwJAWR8Gqmxzbv9XoO4lst+zabqsuuRpyu 12Acph2qMRXFQH6KX4rjr7AgLxVMxkghfzr/MRTrMFSblPzXOZh1os9fSNY6zw== Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches From: Hilton Chain via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664201507; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=5+GEB4hXt6uW+xDIxCo2RyaY2nkv5Mt4dainrY7aeEk=; b=p0BsmhJH5zhAkU54EVzioRXwioYMcDO1Bz2fGSAE/klV3OPuN6Q0bzldJUniblEnmBoqJS lL64OUf1XURLhY4FVyW/4se28lsgIkdkmsI2yya+AfTszm/E62HYrCmSuULZ4RIdTESOFx cnVQgwBvGlN6g0pMlR7HmT7MuIG1WAJh1sZLME+IQzQ5ch/aZCctAZ9h07t/ZJtY0qFdTQ 1KLcY3mjugb5NuiKY4Yp0LNooSNP0VE4mzn+P33v97KaK5vDjNavL1zirA0Crz7a2k9B9O aVrlI6+WOAdJ8rVeTxYedAK3vGLoAdVYuFENejzOghflww76N7UnPovdq7uQRw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664201507; a=rsa-sha256; cv=none; b=MSgVuGLEDR2+jDL67d5voYByycBqvlxVJeKH3s73stuh3VoyiaWkA5c3CDEx2Hke+WChtx hOTit76an7ihy/hLjHwOQ4+occWzzHz/9WURajs57iyYeuwhxndnm13HC4LORWgSUHSebn wiPqKS8BRDU1LU3KpB5BmhmXKw1g/6r6W8QI3Z/wa6CvTyZWbAwakvgN9wFN7rpsyZsSf2 Uo3R15JweSq+vbpsMkTqBeagbWDGTOaGpDSKU+WOsvSPAuLqyCGNBO1Rr0FUPF45s2Xr5m 4l3Wov7j0MZYzbVJfmJrEtKw21FNS6laTo+t+rH4b+xJqjTSaVdNy2/12NQV5Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=rjGh3QOd; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.14 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=rjGh3QOd; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A2B4D2D60D X-Spam-Score: -2.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: fZg51isyVv8k * 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