Skip to content

Commit

Permalink
app-arch/libdeflate: new ebuild
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
Closes: #34767
Signed-off-by: Florian Schmaus <flow@gentoo.org>
  • Loading branch information
negril authored and Flowdalic committed Jan 16, 2024
1 parent 7bd4e85 commit bae8948
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-arch/libdeflate/Manifest
@@ -0,0 +1 @@
DIST libdeflate-1.19.tar.gz 187684 BLAKE2B 6d3c58b4095f91f64c25e09a062f1d7e68cd43b4dffc2de6484cd941ede4bffd8a82dd3af08eda6c94ad4120d40809c1d6a1814c28bad5387dfbaad418b93070 SHA512 fe57542a0d28ad61d70bef9b544bb6805f9f30930b16432712b3b1caab041f1f4e64315a4306a0635b96c2632239c5af0e45a3915581d0b89975729fc2e95613
42 changes: 42 additions & 0 deletions 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
}
42 changes: 42 additions & 0 deletions 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
}
21 changes: 21 additions & 0 deletions 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>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="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>

0 comments on commit bae8948

Please sign in to comment.