From 49a764352cb9128f59bd44025c293b89ca131085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Thu, 30 May 2019 10:47:39 +0200 Subject: [PATCH] dialog: fix "no blanks" issue w/ BE targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jürgen Buchmüller --- srcpkgs/dialog/patches/trim-blank.patch | 21 +++++++++++++++++++++ srcpkgs/dialog/template | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/dialog/patches/trim-blank.patch diff --git a/srcpkgs/dialog/patches/trim-blank.patch b/srcpkgs/dialog/patches/trim-blank.patch new file mode 100644 index 0000000000..9888ed2e78 --- /dev/null +++ b/srcpkgs/dialog/patches/trim-blank.patch @@ -0,0 +1,21 @@ +Source: @pullmoll +Upstream: no (should be queried) +Reason: fix issue with dialog dropping blanks (BE targets) + +The conversion of isblank() to int is vague thus use constants. +Pre decrement the dst ptr and test for it being greater than base. + +--- util.c 2018-06-22 01:47:10.000000000 +0200 ++++ util.c 2019-05-30 10:35:00.517648968 +0200 +@@ -2330,9 +2330,9 @@ + static bool + trim_blank(char *base, char *dst) + { +- int count = isblank(UCH(*dst)); ++ int count = isblank(UCH(*dst)) ? 1 : 0; + +- while (dst-- != base) { ++ while (--dst > base) { + if (*dst == '\n') { + break; + } else if (isblank(UCH(*dst))) { diff --git a/srcpkgs/dialog/template b/srcpkgs/dialog/template index b7e83a4686..d333d70ade 100644 --- a/srcpkgs/dialog/template +++ b/srcpkgs/dialog/template @@ -3,7 +3,7 @@ pkgname=dialog _distver=1.3 _date=20190211 version="${_distver}.${_date}" -revision=1 +revision=2 wrksrc="${pkgname}-${_distver}-${_date}" build_style=gnu-configure configure_args="--with-ncursesw --disable-nls"