Yocto Project Discussions
 help / color / mirror / Atom feed
From: "Andr? Draszik" <git@andred.net>
To: yocto@yoctoproject.org
Subject: [yocto][meta-gplv2][PATCH] grep: fix builds with gettext 0.20.x (musl)
Date: Mon,  6 Jan 2020 10:19:34 +0000	[thread overview]
Message-ID: <20200106101934.36110-1-git@andred.net> (raw)

Update patch to also AC_CHECK_FUNCS([setlocale]).
Various #include <locale.h> are guarded by the outcome of that,
and otherwise compilation fails, e.g.:
| ../../grep-2.5.1a/src/dfa.c:1366:34: error: 'LC_COLLATE' undeclared (first use in this function); did you mean 'REG_ECOLLATE'?
|  1366 |   hard_LC_COLLATE = hard_locale (LC_COLLATE);
|       |                                  ^~~~~~~~~~
|       |                                  REG_ECOLLATE

It appears that this test used to be triggered by (implied with)
the old gettext version, but now it isn't.

Signed-off-by: André Draszik <git@andred.net>
---
 .../0001-Fix-builds-with-gettext-0.20.patch   | 35 ++++++++++++++++---
 1 file changed, 30 insertions(+), 5 deletions(-)

diff --git a/recipes-extended/grep/grep-2.5.1a/0001-Fix-builds-with-gettext-0.20.patch b/recipes-extended/grep/grep-2.5.1a/0001-Fix-builds-with-gettext-0.20.patch
index a8042eb..ee9a6b1 100644
--- a/recipes-extended/grep/grep-2.5.1a/0001-Fix-builds-with-gettext-0.20.patch
+++ b/recipes-extended/grep/grep-2.5.1a/0001-Fix-builds-with-gettext-0.20.patch
@@ -1,14 +1,27 @@
-From e11be23d694c8bd4e62252874d163d06b6de3117 Mon Sep 17 00:00:00 2001
+From cd814b2203a1b5e71eaf97c3b9efedc94b680a19 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Tue, 17 Dec 2019 16:46:05 +0100
 Subject: [PATCH] Fix builds with gettext 0.20
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+André:
+Updated patch to also AC_CHECK_FUNCS([setlocale]).
+Various #include <locale.h> are guarded by the outcome of that,
+and otherwise compilation fails, e.g.:
+| ../../grep-2.5.1a/src/dfa.c:1366:34: error: 'LC_COLLATE' undeclared (first use in this function); did you mean 'REG_ECOLLATE'?
+|  1366 |   hard_LC_COLLATE = hard_locale (LC_COLLATE);
+|       |                                  ^~~~~~~~~~
+|       |                                  REG_ECOLLATE
 
 Upstream-Status: Inappropriate [fixing an old version]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Signed-off-by: André Draszik <git@andred.net>
 ---
  Makefile.am  | 2 +-
- configure.in | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
+ configure.in | 4 +++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/Makefile.am b/Makefile.am
 index e4b58c4..a851b9d 100644
@@ -24,10 +37,19 @@ index e4b58c4..a851b9d 100644
  EXTRA_DIST = TODO README README-alpha PATCHES.AC PATCHES.AM
  
 diff --git a/configure.in b/configure.in
-index 2fa6c71..c042a10 100644
+index 2fa6c71..e1e04ea 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -70,7 +70,7 @@ esac
+@@ -48,6 +48,8 @@ AC_FUNC_ALLOCA
+ AC_FUNC_CLOSEDIR_VOID
+ AC_FUNC_MMAP
+ 
++AC_CHECK_FUNCS([setlocale])
++
+ dnl getpagesize is checked for by AC_FUNC_MMAP.
+ AC_CHECK_FUNCS(btowc isascii memmove setmode strerror wctype mbrtowc)
+ AC_REPLACE_FUNCS(memchr stpcpy strtoul atexit fnmatch)
+@@ -70,7 +72,7 @@ esac
  
  dnl I18N feature
  ALL_LINGUAS="cs de el eo es et fr gl hr id it ja ko nl no pl pt_BR ru sl sv"
@@ -36,3 +58,6 @@ index 2fa6c71..c042a10 100644
  
  dnl DOS file name convention
  dnl sets HAVE_DOS_FILE_NAMES
+-- 
+2.23.0.rc1
+
-- 
2.23.0.rc1


                 reply	other threads:[~2020-01-06 10:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200106101934.36110-1-git@andred.net \
    --to=git@andred.net \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox