dev-libs/libbytesize: Add from Gentoo

It's from Gentoo commit abbb7f41bc9912de890db2cfc8eff0f41ded3850.
This commit is contained in:
Krish Jain 2023-07-16 04:26:00 +05:30 committed by Krish Jain
parent 17a4e47bc6
commit b5809e6234
6 changed files with 312 additions and 0 deletions

View File

@ -0,0 +1,3 @@
DIST libbytesize-2.7.tar.gz 445367 BLAKE2B de5e48b4e17364308c19bbf8e8d68f88ee9e79c9b99d77a81f9f7a1b65e09c2af0ca1ae28ac30ad1b1820335afc1aa4a2596cff487cfd770f04fda0fb38258cd SHA512 3f2bdebad1e145227d7c81b25b8832ab9f984513c35d81254f68c0cb50b1883f3b96fbb258d7c8223fb284d79dc4ec8b01beae3f7687cded629b269ef5b7210e
DIST libbytesize-2.8.tar.gz 458581 BLAKE2B 55726f5a83ecda96be58bd5fe650555b0ebd210d73673b7ced6476689c7d37a5d9107f917ac8b0b15b4e2e8cee0a0da8711e718baa07de166979f44287432a14 SHA512 96543b75dd5a3409e0316b46725409bc5b04acb0d6c85875bbc2eb8cfd842c543ace99ffe84c09c16daa3fd1346d2aa64df20ed171bb4540642fdba7499922ca
DIST libbytesize-2.9.tar.gz 458737 BLAKE2B d2e47b520cf2669131816f069d8ebeb946be02bc04acc676579f12e798fcb2aa176fd25e6bb77dd1e6b274ec0762498df5df18d88c627653accc426a7e268f36 SHA512 6def6bebe33344e6d6ce1a636bcd200a9d28ed5c4e5ce5dfbfd94c4d92ba37512ef1ee4f12716af0d6a402d5285e60df1ee629ecf31cf7d0b59990c524384fd1

View File

@ -0,0 +1,24 @@
https://bugs.gentoo.org/744286
--- libbytesize-2.4/configure.ac
+++ libbytesize-2.4/configure.ac
@@ -6,7 +6,7 @@
# This needs to be set before initializing automake
AC_DISABLE_STATIC
-AM_INIT_AUTOMAKE([foreign -Wall -Werror -Wno-syntax -Wno-portability])
+AM_INIT_AUTOMAKE([foreign -Wall -Wno-syntax -Wno-portability])
AC_CONFIG_MACRO_DIR([m4])
# Check for the gettext programs
--- libbytesize-2.4/src/Makefile.am
+++ libbytesize-2.4/src/Makefile.am
@@ -2,7 +2,7 @@
LDADD = $(LIBINTL)
lib_LTLIBRARIES = libbytesize.la
-libbytesize_la_CFLAGS = -Wall -Wextra -Werror -Wno-overflow -D_GNU_SOURCE
+libbytesize_la_CFLAGS = -Wall -Wextra -Wno-overflow -D_GNU_SOURCE
libbytesize_la_LIBADD = -lgmp -lmpfr $(PCRE2_LIBS)
libbytesize_la_LDFLAGS = -version-info 1:0:0
libbytesize_la_SOURCES = bs_size.c bs_size.h gettext.h

View File

@ -0,0 +1,92 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
inherit autotools python-r1
DESCRIPTION="Tiny library providing a C \"class\" for working with arbitrary big sizes in bytes"
HOMEPAGE="https://github.com/storaged-project/libbytesize"
SRC_URI="https://github.com/storaged-project/libbytesize/releases/download/${PV}/${P}.tar.gz"
LICENSE="LGPL-2+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
IUSE="doc python test tools"
REQUIRED_USE="
python? ( ${PYTHON_REQUIRED_USE} )
tools? ( python )
"
RDEPEND="
dev-libs/gmp:0=
dev-libs/mpfr:=
dev-libs/libpcre2:=
python? ( ${PYTHON_DEPS} )
"
DEPEND="${RDEPEND}"
BDEPEND="
sys-devel/gettext
doc? (
dev-util/gtk-doc
virtual/pkgconfig
)
test? (
dev-python/pocketlint[${PYTHON_USEDEP}]
dev-python/polib[${PYTHON_USEDEP}]
)
"
DOCS=( README.md )
RESTRICT="test"
PATCHES=(
"${FILESDIR}/${PN}-2.4-no_Werror.patch"
)
python_do() {
if use python ; then
python_foreach_impl run_in_build_dir "$@"
else
"$@"
fi
}
src_prepare() {
default
eautoreconf
}
src_configure() {
local myeconfargs=(
$(use_with doc gtk-doc)
$(use_with python python3)
$(use_with tools)
)
local ECONF_SOURCE="${S}"
python_do econf "${myeconfargs[@]}"
}
src_compile() {
python_do emake
}
src_test() {
python_do emake check
}
install_helper() {
emake DESTDIR="${D}" install
use python && python_optimize
}
src_install() {
python_do install_helper
einstalldocs
find "${ED}" -name "*.la" -type f -delete || die
}

View File

@ -0,0 +1,92 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..11} )
inherit autotools python-r1
DESCRIPTION="Tiny library providing a C \"class\" for working with arbitrary big sizes in bytes"
HOMEPAGE="https://github.com/storaged-project/libbytesize"
SRC_URI="https://github.com/storaged-project/libbytesize/releases/download/${PV}/${P}.tar.gz"
LICENSE="LGPL-2+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ~mips ~ppc ppc64 ~riscv sparc x86"
IUSE="doc python test tools"
REQUIRED_USE="
python? ( ${PYTHON_REQUIRED_USE} )
tools? ( python )
"
RDEPEND="
dev-libs/gmp:0=
dev-libs/mpfr:=
dev-libs/libpcre2:=
python? ( ${PYTHON_DEPS} )
"
DEPEND="${RDEPEND}"
BDEPEND="
sys-devel/gettext
doc? (
dev-util/gtk-doc
virtual/pkgconfig
)
test? (
dev-python/pocketlint[${PYTHON_USEDEP}]
dev-python/polib[${PYTHON_USEDEP}]
)
"
DOCS=( README.md )
RESTRICT="test"
PATCHES=(
"${FILESDIR}/${PN}-2.4-no_Werror.patch"
)
python_do() {
if use python ; then
python_foreach_impl run_in_build_dir "$@"
else
"$@"
fi
}
src_prepare() {
default
eautoreconf
}
src_configure() {
local myeconfargs=(
$(use_with doc gtk-doc)
$(use_with python python3)
$(use_with tools)
)
local ECONF_SOURCE="${S}"
python_do econf "${myeconfargs[@]}"
}
src_compile() {
python_do emake
}
src_test() {
python_do emake check
}
install_helper() {
emake DESTDIR="${D}" install
use python && python_optimize
}
src_install() {
python_do install_helper
einstalldocs
find "${ED}" -name "*.la" -type f -delete || die
}

View File

@ -0,0 +1,90 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..11} )
inherit autotools python-r1
DESCRIPTION="Tiny library providing a C \"class\" for working with arbitrary big sizes in bytes"
HOMEPAGE="https://github.com/storaged-project/libbytesize"
SRC_URI="https://github.com/storaged-project/libbytesize/releases/download/${PV}/${P}.tar.gz"
LICENSE="LGPL-2+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
IUSE="doc python test tools"
RESTRICT="!test? ( test )"
REQUIRED_USE="
python? ( ${PYTHON_REQUIRED_USE} )
tools? ( python )
"
RDEPEND="
dev-libs/gmp:=
dev-libs/mpfr:=
dev-libs/libpcre2:=
python? ( ${PYTHON_DEPS} )
"
DEPEND="${RDEPEND}"
BDEPEND="
sys-devel/gettext
doc? (
dev-util/gtk-doc
virtual/pkgconfig
)
test? (
dev-python/pocketlint[${PYTHON_USEDEP}]
dev-python/polib[${PYTHON_USEDEP}]
)
"
DOCS=( README.md )
PATCHES=(
"${FILESDIR}/${PN}-2.4-no_Werror.patch"
)
python_do() {
if use python ; then
python_foreach_impl run_in_build_dir "$@"
else
"$@"
fi
}
src_prepare() {
default
eautoreconf
}
src_configure() {
local myeconfargs=(
$(use_with doc gtk-doc)
$(use_with python python3)
$(use_with tools)
)
local ECONF_SOURCE="${S}"
python_do econf "${myeconfargs[@]}"
}
src_compile() {
python_do emake
}
src_test() {
python_do emake check
}
install_helper() {
emake DESTDIR="${D}" install
use python && python_optimize
}
src_install() {
python_do install_helper
einstalldocs
find "${ED}" -name "*.la" -type f -delete || die
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<use>
<flag name="tools">Build bscalc python CLI tool</flag>
</use>
<upstream>
<remote-id type="github">storaged-project/libbytesize</remote-id>
</upstream>
</pkgmetadata>