libbytesize: update to 2.8.

This commit is contained in:
triallax 2023-06-13 21:47:38 +01:00 committed by Andrew J. Hesford
parent 63fe158064
commit 333ee475f7
2 changed files with 28 additions and 6 deletions

View File

@ -0,0 +1,17 @@
diff --git a/tests/locale_utils.py b/tests/locale_utils.py
index 7e4f369..c16f1bd 100644
--- a/tests/locale_utils.py
+++ b/tests/locale_utils.py
@@ -4,7 +4,11 @@ import subprocess
"""Helper functions, decorators,... for working with locales"""
def get_avail_locales():
- return {loc.decode(errors="replace").strip() for loc in subprocess.check_output(["locale", "-a"]).split()}
+ try:
+ return {loc.decode(errors="replace").strip() for loc in subprocess.check_output(["locale", "-a"]).split()}
+ except FileNotFoundError:
+ # musl and some other libc's don't support locales beyond what POSIX requires.
+ return {"C.UTF-8"}
def missing_locales(required, available):

View File

@ -1,9 +1,9 @@
# Template file for 'libbytesize'
pkgname=libbytesize
version=2.7
version=2.8
revision=1
build_style=gnu-configure
hostmakedepends="gettext python3"
hostmakedepends="pkg-config gettext python3"
makedepends="mpfr-devel pcre2-devel"
checkdepends="python3-six"
short_desc="Library for operations with sizes in bytes"
@ -12,9 +12,12 @@ license="LGPL-2.1-or-later"
homepage="https://github.com/storaged-project/libbytesize"
changelog="https://raw.githubusercontent.com/storaged-project/libbytesize/master/NEWS.rst"
distfiles="https://github.com/storaged-project/libbytesize/releases/download/${version}/libbytesize-${version}.tar.gz"
checksum=8bae8287af6ef5624c320f70defdcd84ddc0c2057d3b59a5871897f27697811e
# checks fails in libbytesize_unittest.sh
make_check=no
checksum=d87aef5a37e189b1cc827530e0feafa6529331fcbe2aabf330a01ad8ec95e1a0
pre_check() {
# Requires python3-pocketlint, which is not packaged yet.
vsed -e 's/canary_tests.sh$//g' -i tests/Makefile
}
libbytesize-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
@ -30,6 +33,8 @@ libbytesize-python3_package() {
depends="python3-six ${sourcepkg}>=${version}_${revision}"
short_desc+=" - Python3 bindings"
pkg_install() {
vmove usr/lib/python3*
vmove "usr/lib/python3*"
# Requires the Python module.
vmove usr/bin/bscalc
}
}