commit:     bae8948c83b015ea65a7542ab3499d241a001905
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Thu Jan 11 20:00:25 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Jan 16 08:38:25 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bae8948c

app-arch/libdeflate: new ebuild

Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34767
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-arch/libdeflate/Manifest               |  1 +
 app-arch/libdeflate/libdeflate-1.19.ebuild | 42 ++++++++++++++++++++++++++++++
 app-arch/libdeflate/libdeflate-9999.ebuild | 42 ++++++++++++++++++++++++++++++
 app-arch/libdeflate/metadata.xml           | 21 +++++++++++++++
 4 files changed, 106 insertions(+)

diff --git a/app-arch/libdeflate/Manifest b/app-arch/libdeflate/Manifest
new file mode 100644
index 000000000000..859a59b4af99
--- /dev/null
+++ b/app-arch/libdeflate/Manifest
@@ -0,0 +1 @@
+DIST libdeflate-1.19.tar.gz 187684 BLAKE2B 
6d3c58b4095f91f64c25e09a062f1d7e68cd43b4dffc2de6484cd941ede4bffd8a82dd3af08eda6c94ad4120d40809c1d6a1814c28bad5387dfbaad418b93070
 SHA512 
fe57542a0d28ad61d70bef9b544bb6805f9f30930b16432712b3b1caab041f1f4e64315a4306a0635b96c2632239c5af0e45a3915581d0b89975729fc2e95613

diff --git a/app-arch/libdeflate/libdeflate-1.19.ebuild 
b/app-arch/libdeflate/libdeflate-1.19.ebuild
new file mode 100644
index 000000000000..ef8f83f51db6
--- /dev/null
+++ b/app-arch/libdeflate/libdeflate-1.19.ebuild
@@ -0,0 +1,42 @@
+# 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"
+IUSE="+gzip static-libs +utils +zlib test"
+RESTRICT="!test? ( test )"
+
+src_configure() {
+       local mycmakeargs=(
+               -DLIBDEFLATE_BUILD_SHARED_LIB="yes"
+               -DLIBDEFLATE_BUILD_STATIC_LIB="$(usex static-libs)"
+               -DLIBDEFLATE_USE_SHARED_LIB="$(usex !static-libs)"
+
+               -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..ef8f83f51db6
--- /dev/null
+++ b/app-arch/libdeflate/libdeflate-9999.ebuild
@@ -0,0 +1,42 @@
+# 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"
+IUSE="+gzip static-libs +utils +zlib test"
+RESTRICT="!test? ( test )"
+
+src_configure() {
+       local mycmakeargs=(
+               -DLIBDEFLATE_BUILD_SHARED_LIB="yes"
+               -DLIBDEFLATE_BUILD_STATIC_LIB="$(usex static-libs)"
+               -DLIBDEFLATE_USE_SHARED_LIB="$(usex !static-libs)"
+
+               -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..e81e4a11f128
--- /dev/null
+++ b/app-arch/libdeflate/metadata.xml
@@ -0,0 +1,21 @@
+<?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>[email protected]</email>
+               <name>Paul Zander</name>
+       </maintainer>
+       <maintainer type="project" proxied="proxy">
+               <email>[email protected]</email>
+               <name>Proxy Maintainers</name>
+       </maintainer>
+       <use>
+               <flag name="gzip">Support the gzip format</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

Reply via email to