From 913cd5c35ac1382f79a858c94214f88eb69c397b Mon Sep 17 00:00:00 2001 From: kn Date: Wed, 14 Dec 2022 15:48:54 +0000 Subject: [PATCH] Import devel/crc32c Initially ported to avoid the bundled copy in net/tg_owt, but other ports can probably pick it up as well. Feedback OK sthen tb --- Collection of CRC32C implementations that dispatches to one suitable to the hardware. CRC32C is the cyclic redundancy check that uses the iSCSI polynomial specified in RFC 3720. --- devel/crc32c/Makefile | 29 +++++++++++++++++++++++++++++ devel/crc32c/distinfo | 2 ++ devel/crc32c/pkg/DESCR | 3 +++ devel/crc32c/pkg/PLIST | 9 +++++++++ 4 files changed, 43 insertions(+) create mode 100644 devel/crc32c/Makefile create mode 100644 devel/crc32c/distinfo create mode 100644 devel/crc32c/pkg/DESCR create mode 100644 devel/crc32c/pkg/PLIST diff --git a/devel/crc32c/Makefile b/devel/crc32c/Makefile new file mode 100644 index 00000000000..8797a63b0ed --- /dev/null +++ b/devel/crc32c/Makefile @@ -0,0 +1,29 @@ +COMMENT = CRC32 implementation in hardware +CATEGORIES = devel + +GH_ACCOUNT = google +GH_PROJECT = crc32c +GH_TAGNAME = 1.1.2 + +MAINTAINER = Klemens Nanni + +# BSD 3-clause +PERMIT_PACKAGE = Yes + +SHARED_LIBS += crc32c 0.0 # 1.1.0 + +# C++11 +COMPILER = base-clang ports-gcc + +WANTLIB += ${COMPILER_LIBCXX} m + +MODULES = devel/cmake + +CONFIGURE_ARGS += -DBUILD_SHARED_LIBS=ON + +# all three expect bundled but nonexistent sources +CONFIGURE_ARGS += -DCRC32C_BUILD_TESTS=OFF \ + -DCRC32C_BUILD_BENCHMARKS=OFF \ + -DCRC32C_USE_GLOG=OFF + +.include diff --git a/devel/crc32c/distinfo b/devel/crc32c/distinfo new file mode 100644 index 00000000000..310785bf577 --- /dev/null +++ b/devel/crc32c/distinfo @@ -0,0 +1,2 @@ +SHA256 (crc32c-1.1.2.tar.gz) = rAeEBRMHK3/OvaboIQaKoEiJAY8k4Q5GGBBo+yFNflY= +SIZE (crc32c-1.1.2.tar.gz) = 29819 diff --git a/devel/crc32c/pkg/DESCR b/devel/crc32c/pkg/DESCR new file mode 100644 index 00000000000..cfc8b8f8eeb --- /dev/null +++ b/devel/crc32c/pkg/DESCR @@ -0,0 +1,3 @@ +Collection of CRC32C implementations that dispatches to one suitable to +the hardware. CRC32C is the cyclic redundancy check that uses the iSCSI +polynomial specified in RFC 3720. diff --git a/devel/crc32c/pkg/PLIST b/devel/crc32c/pkg/PLIST new file mode 100644 index 00000000000..90eac9f6242 --- /dev/null +++ b/devel/crc32c/pkg/PLIST @@ -0,0 +1,9 @@ +include/crc32c/ +include/crc32c/crc32c.h +lib/cmake/ +lib/cmake/Crc32c/ +lib/cmake/Crc32c/Crc32cConfig.cmake +lib/cmake/Crc32c/Crc32cConfigVersion.cmake +lib/cmake/Crc32c/Crc32cTargets${MODCMAKE_BUILD_SUFFIX} +lib/cmake/Crc32c/Crc32cTargets.cmake +@lib lib/libcrc32c.so.${LIBcrc32c_VERSION}