[gentoo-commits] repo/gentoo:master commit in: dev-libs/libbytesize/, dev-libs/libbytesize/files/

2021-12-24 Thread Sam James
commit: 6ec85a4304ce9b45eecdd1410efff909ea1044fa
Author: Sam James  gentoo  org>
AuthorDate: Fri Dec 24 07:58:24 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Dec 24 08:01:48 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ec85a43

dev-libs/libbytesize: fix Bashism in configure

Reported upstream:
```
checking for python3... 
/var/tmp/portage/dev-libs/libbytesize-2.6/temp/python3.10/bin/python3
/var/tmp/portage/dev-libs/libbytesize-2.6/work/libbytesize-2.6/configure: 
14435: test: 
x/var/tmp/portage/dev-libs/libbytesize-2.6/temp/python3.10/bin/python3: 
unexpected operator
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
```

Signed-off-by: Sam James  gentoo.org>

 .../files/libbytesize-2.6-configure-bashism.patch  | 31 ++
 dev-libs/libbytesize/libbytesize-2.5.ebuild|  2 +-
 dev-libs/libbytesize/libbytesize-2.6.ebuild|  1 +
 3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/dev-libs/libbytesize/files/libbytesize-2.6-configure-bashism.patch 
b/dev-libs/libbytesize/files/libbytesize-2.6-configure-bashism.patch
new file mode 100644
index ..5fe0f095eaca
--- /dev/null
+++ b/dev-libs/libbytesize/files/libbytesize-2.6-configure-bashism.patch
@@ -0,0 +1,31 @@
+https://github.com/storaged-project/libbytesize/pull/102
+
+From: Sam James 
+Date: Fri, 24 Dec 2021 07:58:47 +
+Subject: [PATCH] build: avoid bashisms in configure
+
+configure needs to be executable by a POSIX-compliant shell (/bin/sh)
+and while this is often Bash, which tolerates non-POSIX statements, it
+might sometimes be e.g. dash which doesn't.
+
+Signed-off-by: Sam James 
+--- a/configure.ac
 b/configure.ac
+@@ -59,7 +59,7 @@ AC_ARG_WITH([python3],
+ AC_SUBST(WITH_PYTHON3, 0)
+ if test "x$with_python3" != "xno"; then
+ AC_PATH_PROG([python3], [python3], [no])
+-AS_IF([test "x$python3" == "xno"],
++AS_IF([test "x$python3" = "xno"],
+ [if test "x$with_python3" = "xyes"; then
+   LIBBYTESIZE_SOFT_FAILURE([Python3 support requested, but python3 is not 
available])
+   fi],
+@@ -77,7 +77,7 @@ AC_ARG_WITH([gtk-doc],
+ AC_SUBST(WITH_GTK_DOC, 0)
+ if test "x$with_gtk_doc" != "xno"; then
+ AC_PATH_PROG([gtkdoc_scan], [gtkdoc-scan], [no])
+-AS_IF([test "x$gtkdoc_scan" == "xno"],
++AS_IF([test "x$gtkdoc_scan" = "xno"],
+ [if test "x$with_gtk_doc" = "xyes"; then
+   LIBBYTESIZE_SOFT_FAILURE([Building documentation with gtk-doc 
requested, but not available])
+   fi],

diff --git a/dev-libs/libbytesize/libbytesize-2.5.ebuild 
b/dev-libs/libbytesize/libbytesize-2.5.ebuild
index 4450525879d7..9afd519fb6c1 100644
--- a/dev-libs/libbytesize/libbytesize-2.5.ebuild
+++ b/dev-libs/libbytesize/libbytesize-2.5.ebuild
@@ -66,7 +66,7 @@ src_configure() {
$(use_with tools)
)
local ECONF_SOURCE="${S}"
-   python_do econf "${myeconfargs[@]}"
+   CONFIG_SHELL="${BROOT}/bin/bash" python_do econf "${myeconfargs[@]}"
 }
 
 src_compile() {

diff --git a/dev-libs/libbytesize/libbytesize-2.6.ebuild 
b/dev-libs/libbytesize/libbytesize-2.6.ebuild
index 98b3c0db2b73..84be8f1ddd9e 100644
--- a/dev-libs/libbytesize/libbytesize-2.6.ebuild
+++ b/dev-libs/libbytesize/libbytesize-2.6.ebuild
@@ -44,6 +44,7 @@ RESTRICT="test"
 
 PATCHES=(
"${FILESDIR}/${PN}-2.4-no_Werror.patch"
+   "${FILESDIR}/${PN}-2.6-configure-bashism.patch"
 )
 
 python_do() {



[gentoo-commits] repo/gentoo:master commit in: dev-libs/libbytesize/, dev-libs/libbytesize/files/

2020-09-23 Thread Lars Wendler
commit: 21c239f3bfb548ecb34effaa32214d454c1275bc
Author: Lars Wendler  gentoo  org>
AuthorDate: Wed Sep 23 12:44:35 2020 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Wed Sep 23 13:06:01 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21c239f3

dev-libs/libbytesize: Don't build with "-Werror" by default

Closes: https://bugs.gentoo.org/744286
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Lars Wendler  gentoo.org>

 .../files/libbytesize-2.4-no_Werror.patch  | 24 ++
 dev-libs/libbytesize/libbytesize-2.3.ebuild| 11 +-
 dev-libs/libbytesize/libbytesize-2.4.ebuild| 11 +-
 3 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/dev-libs/libbytesize/files/libbytesize-2.4-no_Werror.patch 
b/dev-libs/libbytesize/files/libbytesize-2.4-no_Werror.patch
new file mode 100644
index 000..827bebe3ec9
--- /dev/null
+++ b/dev-libs/libbytesize/files/libbytesize-2.4-no_Werror.patch
@@ -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

diff --git a/dev-libs/libbytesize/libbytesize-2.3.ebuild 
b/dev-libs/libbytesize/libbytesize-2.3.ebuild
index bdb2d302c57..e63686f1943 100644
--- a/dev-libs/libbytesize/libbytesize-2.3.ebuild
+++ b/dev-libs/libbytesize/libbytesize-2.3.ebuild
@@ -5,7 +5,7 @@ EAPI=7
 
 PYTHON_COMPAT=( python3_{6,7,8} )
 
-inherit python-r1
+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;
@@ -42,6 +42,10 @@ 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 "$@"
@@ -50,6 +54,11 @@ python_do() {
fi
 }
 
+src_prepare() {
+   default
+   eautoreconf
+}
+
 src_configure() {
local myeconfargs=(
$(use_with doc gtk-doc)

diff --git a/dev-libs/libbytesize/libbytesize-2.4.ebuild 
b/dev-libs/libbytesize/libbytesize-2.4.ebuild
index 0d91bc5f999..7f18f969f36 100644
--- a/dev-libs/libbytesize/libbytesize-2.4.ebuild
+++ b/dev-libs/libbytesize/libbytesize-2.4.ebuild
@@ -5,7 +5,7 @@ EAPI=7
 
 PYTHON_COMPAT=( python3_{6,7,8} )
 
-inherit python-r1
+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;
@@ -42,6 +42,10 @@ 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 "$@"
@@ -50,6 +54,11 @@ python_do() {
fi
 }
 
+src_prepare() {
+   default
+   eautoreconf
+}
+
 src_configure() {
local myeconfargs=(
$(use_with doc gtk-doc)