From 2d98ac7635f457e5f1c74fa9f7cd8227cb059c35 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Thu, 18 May 2023 04:50:40 +0200 Subject: dev-libs/c-blosc2: Backport a header fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/906644 Signed-off-by: Michał Górny --- dev-libs/c-blosc2/c-blosc2-2.9.1-r1.ebuild | 65 ++++++++++++++++++++++ dev-libs/c-blosc2/c-blosc2-2.9.1.ebuild | 60 -------------------- .../c-blosc2/files/c-blosc2-2.9.1-header.patch | 26 +++++++++ 3 files changed, 91 insertions(+), 60 deletions(-) create mode 100644 dev-libs/c-blosc2/c-blosc2-2.9.1-r1.ebuild delete mode 100644 dev-libs/c-blosc2/c-blosc2-2.9.1.ebuild create mode 100644 dev-libs/c-blosc2/files/c-blosc2-2.9.1-header.patch (limited to 'dev-libs/c-blosc2') diff --git a/dev-libs/c-blosc2/c-blosc2-2.9.1-r1.ebuild b/dev-libs/c-blosc2/c-blosc2-2.9.1-r1.ebuild new file mode 100644 index 000000000000..842752b8909c --- /dev/null +++ b/dev-libs/c-blosc2/c-blosc2-2.9.1-r1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Blocking, shuffling and lossless compression library" +HOMEPAGE=" + https://www.blosc.org/c-blosc2/c-blosc2.html + https://github.com/Blosc/c-blosc2/ +" +SRC_URI=" + https://github.com/Blosc/c-blosc2/archive/v${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="BSD" +SLOT="0/1" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="test zlib zstd" +REQUIRED_USE="test? ( zlib zstd )" +RESTRICT="!test? ( test )" + +DEPEND=" + >=app-arch/lz4-1.7.5:= + zlib? ( sys-libs/zlib:= ) + zstd? ( app-arch/zstd:= ) +" +RDEPEND=" + ${DEPEND} +" + +PATCHES=( + # https://bugs.gentoo.org/906644 + "${FILESDIR}/${P}-header.patch" +) + +src_configure() { + # remove bundled libs (just in case) + rm -rf internal-complibs || die + + local mycmakeargs=( + -DBUILD_STATIC=OFF + -DBUILD_TESTS=$(usex test) + -DBUILD_BENCHMARKS=OFF + -DBUILD_EXAMPLES=OFF + -DBUILD_FUZZERS=OFF + -DDEACTIVATE_ZLIB=$(usex !zlib) + -DDEACTIVATE_ZSTD=$(usex !zstd) + -DPREFER_EXTERNAL_LZ4=ON + -DPREFER_EXTERNAL_ZLIB=ON + -DPREFER_EXTERNAL_ZSTD=ON + + # upstream overrides CMAKE_C_FLAGS, preventing ${CFLAGS} defaults + # from applying, https://github.com/Blosc/c-blosc2/issues/433 + -DCMAKE_C_FLAGS="${CFLAGS}" + ) + cmake_src_configure +} + +src_test() { + # Tests fail in parallel, https://github.com/Blosc/c-blosc2/issues/432 + MAKEOPTS=-j1 cmake_src_test +} diff --git a/dev-libs/c-blosc2/c-blosc2-2.9.1.ebuild b/dev-libs/c-blosc2/c-blosc2-2.9.1.ebuild deleted file mode 100644 index 1a7c40ef0f55..000000000000 --- a/dev-libs/c-blosc2/c-blosc2-2.9.1.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake - -DESCRIPTION="Blocking, shuffling and lossless compression library" -HOMEPAGE=" - https://www.blosc.org/c-blosc2/c-blosc2.html - https://github.com/Blosc/c-blosc2/ -" -SRC_URI=" - https://github.com/Blosc/c-blosc2/archive/v${PV}.tar.gz - -> ${P}.gh.tar.gz -" - -LICENSE="BSD" -SLOT="0/1" -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" -IUSE="test zlib zstd" -REQUIRED_USE="test? ( zlib zstd )" -RESTRICT="!test? ( test )" - -DEPEND=" - >=app-arch/lz4-1.7.5:= - zlib? ( sys-libs/zlib:= ) - zstd? ( app-arch/zstd:= ) -" -RDEPEND=" - ${DEPEND} -" - -src_configure() { - # remove bundled libs (just in case) - rm -rf internal-complibs || die - - local mycmakeargs=( - -DBUILD_STATIC=OFF - -DBUILD_TESTS=$(usex test) - -DBUILD_BENCHMARKS=OFF - -DBUILD_EXAMPLES=OFF - -DBUILD_FUZZERS=OFF - -DDEACTIVATE_ZLIB=$(usex !zlib) - -DDEACTIVATE_ZSTD=$(usex !zstd) - -DPREFER_EXTERNAL_LZ4=ON - -DPREFER_EXTERNAL_ZLIB=ON - -DPREFER_EXTERNAL_ZSTD=ON - - # upstream overrides CMAKE_C_FLAGS, preventing ${CFLAGS} defaults - # from applying, https://github.com/Blosc/c-blosc2/issues/433 - -DCMAKE_C_FLAGS="${CFLAGS}" - ) - cmake_src_configure -} - -src_test() { - # Tests fail in parallel, https://github.com/Blosc/c-blosc2/issues/432 - MAKEOPTS=-j1 cmake_src_test -} diff --git a/dev-libs/c-blosc2/files/c-blosc2-2.9.1-header.patch b/dev-libs/c-blosc2/files/c-blosc2-2.9.1-header.patch new file mode 100644 index 000000000000..5ec28e936de7 --- /dev/null +++ b/dev-libs/c-blosc2/files/c-blosc2-2.9.1-header.patch @@ -0,0 +1,26 @@ +From 04035a3759b8c100e4808918e44a3eaef4969875 Mon Sep 17 00:00:00 2001 +From: Dimitri Papadopoulos + <3234522+DimitriPapadopoulos@users.noreply.github.com> +Date: Sat, 13 May 2023 21:40:32 +0200 +Subject: [PATCH] BLOSC_STUNE is not defined in c-blosc + +Therefore, do not guard it with BLOSC_H, the include guard of blosc.h +from previous version c-blosc. +--- + include/blosc2.h | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/include/blosc2.h b/include/blosc2.h +index dc6d1fc7..ef035f07 100644 +--- a/include/blosc2.h ++++ b/include/blosc2.h +@@ -211,9 +211,7 @@ enum { + * @brief Codes for the different tunes shipped with Blosc + */ + enum { +-#ifndef BLOSC_H + BLOSC_STUNE = 0, +-#endif // BLOSC_H + BLOSC_LAST_TUNE = 1, + //!< Determine the last tune defined by Blosc. + BLOSC_LAST_REGISTERED_TUNE = BLOSC2_GLOBAL_REGISTERED_TUNE_START + BLOSC2_GLOBAL_REGISTERED_TUNES - 1, -- cgit v1.2.3-65-gdbad