diff options
Diffstat (limited to 'app-arch/libdeflate')
-rw-r--r-- | app-arch/libdeflate/Manifest | 2 | ||||
-rw-r--r-- | app-arch/libdeflate/files/libdeflate-1.19-make-gzip-tests-conditional.patch | 37 | ||||
-rw-r--r-- | app-arch/libdeflate/libdeflate-1.19.ebuild | 59 | ||||
-rw-r--r-- | app-arch/libdeflate/libdeflate-1.20.ebuild | 59 | ||||
-rw-r--r-- | app-arch/libdeflate/libdeflate-9999.ebuild | 59 | ||||
-rw-r--r-- | app-arch/libdeflate/metadata.xml | 22 |
6 files changed, 238 insertions, 0 deletions
diff --git a/app-arch/libdeflate/Manifest b/app-arch/libdeflate/Manifest new file mode 100644 index 000000000000..280c6644dba1 --- /dev/null +++ b/app-arch/libdeflate/Manifest @@ -0,0 +1,2 @@ +DIST libdeflate-1.19.tar.gz 187684 BLAKE2B 6d3c58b4095f91f64c25e09a062f1d7e68cd43b4dffc2de6484cd941ede4bffd8a82dd3af08eda6c94ad4120d40809c1d6a1814c28bad5387dfbaad418b93070 SHA512 fe57542a0d28ad61d70bef9b544bb6805f9f30930b16432712b3b1caab041f1f4e64315a4306a0635b96c2632239c5af0e45a3915581d0b89975729fc2e95613 +DIST libdeflate-1.20.tar.gz 194212 BLAKE2B b3633f1068f36bf346e1f435c67259612ad5ed1571e83f1bbc4a58c6a67b3eadca85e0abb2d2d47f180dd2ff01c5891c8b3958a63ddbcc2447106f2e5cb3c0fe SHA512 5ebe6af9ce81872cba508d1f0aa087ddeb0e0f0c8e6360da66b8a9db2a76203dafbf3d3f6b3b791618ea9c6d0231fab5b4a55badb31a4480fb4174b9445c658b diff --git a/app-arch/libdeflate/files/libdeflate-1.19-make-gzip-tests-conditional.patch b/app-arch/libdeflate/files/libdeflate-1.19-make-gzip-tests-conditional.patch new file mode 100644 index 000000000000..ae290f3f69d2 --- /dev/null +++ b/app-arch/libdeflate/files/libdeflate-1.19-make-gzip-tests-conditional.patch @@ -0,0 +1,37 @@ +Only build these when the user enables zlib and gzip support +diff --git a/programs/CMakeLists.txt b/programs/CMakeLists.txt +index e707a25..fcfaf12 100644 +--- a/programs/CMakeLists.txt ++++ b/programs/CMakeLists.txt +@@ -80,22 +80,28 @@ if(LIBDEFLATE_BUILD_TESTS) + target_link_libraries(libdeflate_test_utils PUBLIC + libdeflate_prog_utils ZLIB::ZLIB) + ++ if(LIBDEFLATE_GZIP_SUPPORT AND LIBDEFLATE_ZLIB_SUPPORT) + # Build the benchmark and checksum programs. + add_executable(benchmark benchmark.c) + target_link_libraries(benchmark PRIVATE libdeflate_test_utils) + add_executable(checksum checksum.c) + target_link_libraries(checksum PRIVATE libdeflate_test_utils) ++ endif() + + # Build the unit test programs and register them with CTest. + set(UNIT_TEST_PROGS +- test_checksums + test_custom_malloc + test_incomplete_codes + test_invalid_streams + test_litrunlen_overflow + test_overread + test_slow_decompression +- test_trailing_bytes + ) ++ if(LIBDEFLATE_GZIP_SUPPORT AND LIBDEFLATE_ZLIB_SUPPORT) ++ list(APPEND UNIT_TEST_PROGS ++ test_checksums ++ test_trailing_bytes ++ ) ++ endif() + foreach(PROG ${UNIT_TEST_PROGS}) + add_executable(${PROG} ${PROG}.c) + target_link_libraries(${PROG} PRIVATE libdeflate_test_utils) diff --git a/app-arch/libdeflate/libdeflate-1.19.ebuild b/app-arch/libdeflate/libdeflate-1.19.ebuild new file mode 100644 index 000000000000..b637d83a6dfe --- /dev/null +++ b/app-arch/libdeflate/libdeflate-1.19.ebuild @@ -0,0 +1,59 @@ +# Copyright 2019-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Heavily optimized DEFLATE/zlib/gzip (de)compression" +HOMEPAGE="https://github.com/ebiggers/libdeflate" + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ebiggers/libdeflate.git" +else + SRC_URI="https://github.com/ebiggers/libdeflate/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc x86" +fi + +LICENSE="MIT" +SLOT="0" +# the zlib USE-flag enables support for zlib +# the test USE-flag programs depend on sys-libs/zlib for comparison tests +IUSE="+gzip +utils +zlib test" + +RESTRICT=" + !test? ( test ) +" + +REQUIRED_USE=" + utils? ( gzip ) +" + +DEPEND=" + test? ( sys-libs/zlib ) +" + +PATCHES=( + "${FILESDIR}/${PN}-1.19-make-gzip-tests-conditional.patch" +) + +src_configure() { + local mycmakeargs=( + -DLIBDEFLATE_BUILD_SHARED_LIB="yes" + -DLIBDEFLATE_BUILD_STATIC_LIB="no" + -DLIBDEFLATE_USE_SHARED_LIB="yes" + + -DLIBDEFLATE_COMPRESSION_SUPPORT="yes" + -DLIBDEFLATE_DECOMPRESSION_SUPPORT="yes" + + -DLIBDEFLATE_BUILD_GZIP="$(usex gzip "$(usex utils)" )" + -DLIBDEFLATE_GZIP_SUPPORT="$(usex gzip)" + + -DLIBDEFLATE_ZLIB_SUPPORT="$(usex zlib)" + + -DLIBDEFLATE_BUILD_TESTS="$(usex test)" + ) + + cmake_src_configure +} diff --git a/app-arch/libdeflate/libdeflate-1.20.ebuild b/app-arch/libdeflate/libdeflate-1.20.ebuild new file mode 100644 index 000000000000..19e1b432a064 --- /dev/null +++ b/app-arch/libdeflate/libdeflate-1.20.ebuild @@ -0,0 +1,59 @@ +# Copyright 2019-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Heavily optimized DEFLATE/zlib/gzip (de)compression" +HOMEPAGE="https://github.com/ebiggers/libdeflate" + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ebiggers/libdeflate.git" +else + SRC_URI="https://github.com/ebiggers/libdeflate/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +LICENSE="MIT" +SLOT="0" +# the zlib USE-flag enables support for zlib +# the test USE-flag programs depend on sys-libs/zlib for comparison tests +IUSE="+gzip +utils +zlib test" + +RESTRICT=" + !test? ( test ) +" + +REQUIRED_USE=" + utils? ( gzip ) +" + +DEPEND=" + test? ( sys-libs/zlib ) +" + +PATCHES=( + "${FILESDIR}/${PN}-1.19-make-gzip-tests-conditional.patch" +) + +src_configure() { + local mycmakeargs=( + -DLIBDEFLATE_BUILD_SHARED_LIB="yes" + -DLIBDEFLATE_BUILD_STATIC_LIB="no" + -DLIBDEFLATE_USE_SHARED_LIB="yes" + + -DLIBDEFLATE_COMPRESSION_SUPPORT="yes" + -DLIBDEFLATE_DECOMPRESSION_SUPPORT="yes" + + -DLIBDEFLATE_BUILD_GZIP="$(usex gzip "$(usex utils)" )" + -DLIBDEFLATE_GZIP_SUPPORT="$(usex gzip)" + + -DLIBDEFLATE_ZLIB_SUPPORT="$(usex zlib)" + + -DLIBDEFLATE_BUILD_TESTS="$(usex test)" + ) + + cmake_src_configure +} diff --git a/app-arch/libdeflate/libdeflate-9999.ebuild b/app-arch/libdeflate/libdeflate-9999.ebuild new file mode 100644 index 000000000000..2ed3a652def2 --- /dev/null +++ b/app-arch/libdeflate/libdeflate-9999.ebuild @@ -0,0 +1,59 @@ +# Copyright 2019-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Heavily optimized DEFLATE/zlib/gzip (de)compression" +HOMEPAGE="https://github.com/ebiggers/libdeflate" + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ebiggers/libdeflate.git" +else + SRC_URI="https://github.com/ebiggers/libdeflate/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="MIT" +SLOT="0" +# the zlib USE-flag enables support for zlib +# the test USE-flag programs depend on sys-libs/zlib for comparison tests +IUSE="+gzip +utils +zlib test" + +RESTRICT=" + !test? ( test ) +" + +REQUIRED_USE=" + utils? ( gzip ) +" + +DEPEND=" + test? ( sys-libs/zlib ) +" + +PATCHES=( + "${FILESDIR}/${PN}-1.19-make-gzip-tests-conditional.patch" +) + +src_configure() { + local mycmakeargs=( + -DLIBDEFLATE_BUILD_SHARED_LIB="yes" + -DLIBDEFLATE_BUILD_STATIC_LIB="no" + -DLIBDEFLATE_USE_SHARED_LIB="yes" + + -DLIBDEFLATE_COMPRESSION_SUPPORT="yes" + -DLIBDEFLATE_DECOMPRESSION_SUPPORT="yes" + + -DLIBDEFLATE_BUILD_GZIP="$(usex gzip "$(usex utils)" )" + -DLIBDEFLATE_GZIP_SUPPORT="$(usex gzip)" + + -DLIBDEFLATE_ZLIB_SUPPORT="$(usex zlib)" + + -DLIBDEFLATE_BUILD_TESTS="$(usex test)" + ) + + cmake_src_configure +} diff --git a/app-arch/libdeflate/metadata.xml b/app-arch/libdeflate/metadata.xml new file mode 100644 index 000000000000..17956aa98f85 --- /dev/null +++ b/app-arch/libdeflate/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-wanted --> + <maintainer type="person" proxied="yes"> + <email>negril.nx+gentoo@gmail.com</email> + <name>Paul Zander</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="gzip">Support the gzip format</flag> + <flag name="test">Build the test programs (requires <pkg>sys-libs/zlib</pkg>)</flag> + <flag name="utils">Build the libdeflate-gzip program</flag> + <flag name="zlib">Support the zlib format</flag> + </use> + <upstream> + <remote-id type="github">ebiggers/libdeflate</remote-id> + </upstream> +</pkgmetadata>
\ No newline at end of file |