All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] indent: Upgrade to 2.2.12
@ 2019-02-26  2:45 mingli.yu
  2019-02-27  1:36 ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: mingli.yu @ 2019-02-26  2:45 UTC (permalink / raw)
  To: raj.khem, openembedded-devel

From: Mingli Yu <mingli.yu@windriver.com>

Add two patches to fix the build error.

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 ...01-Makefile.am-remove-regression-dir.patch | 67 +++++++++++++++++++
 ...ent.c-correct-the-check-for-locale.h.patch | 40 +++++++++++
 .../{indent_2.2.10.bb => indent_2.2.12.bb}    |  9 ++-
 3 files changed, 113 insertions(+), 3 deletions(-)
 create mode 100644 meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch
 create mode 100644 meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch
 rename meta-oe/recipes-extended/indent/{indent_2.2.10.bb => indent_2.2.12.bb} (68%)

diff --git a/meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch b/meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch
new file mode 100644
index 000000000..357d77d83
--- /dev/null
+++ b/meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch
@@ -0,0 +1,67 @@
+From 27bda5ee884e79d6d0e76955124d2b0c5798d6cf Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Mon, 25 Feb 2019 00:34:17 -0800
+Subject: [PATCH] Makefile.am: remove regression dir
+
+Remove regression dir to fix below do_compile
+error:
+| Making all in regression
+| /bin/sh: line 20: cd: regression: No such file or directory
+| Makefile:451: recipe for target 'all-recursive' failed
+
+BTW, it should be safe not to cover regression dir
+as there is no Makefile.in under ${S}/regression
+and the content of ${S}/regression/Makefile as below.
+-------------------------------------
+all:
+
+install:
+
+check:
+        ./TEST
+
+distclean: clean
+
+maintainer-clean: clean
+
+distdir:
+
+clean:
+        @rm -rf output
+
+.PHONY: all install
+-------------------------------------
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ Makefile.am | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index ba37a42..548fea7 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,7 +1,7 @@
+ ## Process this file with automake to produce Makefile.in
+ AUTOMAKE_OPTIONS = no-texinfo.tex
+ 
+-SUBDIRS = intl src doc po man regression
++SUBDIRS = intl src doc po man
+ 
+ BUILT_SOURCES = 
+ 
+@@ -13,8 +13,7 @@ EXTRA_DIST = 	README.md \
+ 		aclocal/UTIMBUF.m4 \
+ 		miscel/Makefile.mingw32 \
+ 		miscel/README.vc++ \
+-		bootstrap \
+-		regression
++		bootstrap
+ 
+ DISTCLEANFILES=config/config.cache config/config.log config.h
+ 
+-- 
+2.17.1
+
diff --git a/meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch b/meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch
new file mode 100644
index 000000000..7df7ecb38
--- /dev/null
+++ b/meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch
@@ -0,0 +1,40 @@
+From 75369ce004ec0f5e46a432fa1dac8cfc7ae1ef8d Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Sun, 24 Feb 2019 22:35:08 -0800
+Subject: [PATCH] src/indent.c: correct the check for locale.h
+
+Adjust to check HAVE_LC_MESSAGES or HAVE_LOCALE_H
+to determine whether include locale.h or not to
+fix below issue:
+
+| ../../indent-2.2.12/src/indent.c: In function 'main':
+| ../../indent-2.2.12/src/indent.c:1062:5: error: implicit declaration of function 'setlocale'; did you mean 'setstate'? [-Werror=implicit-function-declaration]
+|      setlocale(LC_ALL, "");
+|      ^~~~~~~~~
+|      setstate
+| ../../indent-2.2.12/src/indent.c:1062:5: error: nested extern declaration of 'setlocale' [-Werror=nested-externs]
+| ../../indent-2.2.12/src/indent.c:1062:15: error: 'LC_ALL' undeclared (first use in this function)
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ src/indent.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/indent.c b/src/indent.c
+index 4d666e2..0c2780b 100644
+--- a/src/indent.c
++++ b/src/indent.c
+@@ -71,7 +71,7 @@
+ #include <string.h>
+ #include <ctype.h>
+ #include <stdlib.h>
+-#ifdef HAVE_LOCALE_H
++#if defined(HAVE_LC_MESSAGES) || defined(HAVE_LOCALE_H)
+ #include <locale.h>
+ #endif
+ #include "indent.h"
+-- 
+2.17.1
+
diff --git a/meta-oe/recipes-extended/indent/indent_2.2.10.bb b/meta-oe/recipes-extended/indent/indent_2.2.12.bb
similarity index 68%
rename from meta-oe/recipes-extended/indent/indent_2.2.10.bb
rename to meta-oe/recipes-extended/indent/indent_2.2.12.bb
index d25e8e317..eda388e37 100644
--- a/meta-oe/recipes-extended/indent/indent_2.2.10.bb
+++ b/meta-oe/recipes-extended/indent/indent_2.2.12.bb
@@ -11,9 +11,12 @@ LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 DEPENDS = "virtual/gettext"
 
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz"
-SRC_URI[md5sum] = "be35ea62705733859fbf8caf816d8959"
-SRC_URI[sha256sum] = "8a9b41be5bfcab5d8c1be74204b10ae78789fc3deabea0775fdced8677292639"
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
+           file://0001-src-indent.c-correct-the-check-for-locale.h.patch \
+           file://0001-Makefile.am-remove-regression-dir.patch \
+"
+SRC_URI[md5sum] = "4764b6ac98f6654a35da117b8e5e8e14"
+SRC_URI[sha256sum] = "e77d68c0211515459b8812118d606812e300097cfac0b4e9fb3472664263bb8b"
 
 inherit autotools gettext
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [meta-oe][PATCH] indent: Upgrade to 2.2.12
  2019-02-26  2:45 [meta-oe][PATCH] indent: Upgrade to 2.2.12 mingli.yu
@ 2019-02-27  1:36 ` Khem Raj
  2019-02-27  2:03   ` Yu, Mingli
  2019-04-22  9:06   ` [meta-oe][PATCH v2] " mingli.yu
  0 siblings, 2 replies; 4+ messages in thread
From: Khem Raj @ 2019-02-27  1:36 UTC (permalink / raw)
  To: Mingli Yu; +Cc: openembeded-devel

Native version fails to build on ubuntu 14.04

https://errors.yoctoproject.org/Errors/Details/230511/

On Mon, Feb 25, 2019 at 6:45 PM <mingli.yu@windriver.com> wrote:
>
> From: Mingli Yu <mingli.yu@windriver.com>
>
> Add two patches to fix the build error.
>
> Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> ---
>  ...01-Makefile.am-remove-regression-dir.patch | 67 +++++++++++++++++++
>  ...ent.c-correct-the-check-for-locale.h.patch | 40 +++++++++++
>  .../{indent_2.2.10.bb => indent_2.2.12.bb}    |  9 ++-
>  3 files changed, 113 insertions(+), 3 deletions(-)
>  create mode 100644 meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch
>  create mode 100644 meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch
>  rename meta-oe/recipes-extended/indent/{indent_2.2.10.bb => indent_2.2.12.bb} (68%)
>
> diff --git a/meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch b/meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch
> new file mode 100644
> index 000000000..357d77d83
> --- /dev/null
> +++ b/meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch
> @@ -0,0 +1,67 @@
> +From 27bda5ee884e79d6d0e76955124d2b0c5798d6cf Mon Sep 17 00:00:00 2001
> +From: Mingli Yu <mingli.yu@windriver.com>
> +Date: Mon, 25 Feb 2019 00:34:17 -0800
> +Subject: [PATCH] Makefile.am: remove regression dir
> +
> +Remove regression dir to fix below do_compile
> +error:
> +| Making all in regression
> +| /bin/sh: line 20: cd: regression: No such file or directory
> +| Makefile:451: recipe for target 'all-recursive' failed
> +
> +BTW, it should be safe not to cover regression dir
> +as there is no Makefile.in under ${S}/regression
> +and the content of ${S}/regression/Makefile as below.
> +-------------------------------------
> +all:
> +
> +install:
> +
> +check:
> +        ./TEST
> +
> +distclean: clean
> +
> +maintainer-clean: clean
> +
> +distdir:
> +
> +clean:
> +        @rm -rf output
> +
> +.PHONY: all install
> +-------------------------------------
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> +---
> + Makefile.am | 5 ++---
> + 1 file changed, 2 insertions(+), 3 deletions(-)
> +
> +diff --git a/Makefile.am b/Makefile.am
> +index ba37a42..548fea7 100644
> +--- a/Makefile.am
> ++++ b/Makefile.am
> +@@ -1,7 +1,7 @@
> + ## Process this file with automake to produce Makefile.in
> + AUTOMAKE_OPTIONS = no-texinfo.tex
> +
> +-SUBDIRS = intl src doc po man regression
> ++SUBDIRS = intl src doc po man
> +
> + BUILT_SOURCES =
> +
> +@@ -13,8 +13,7 @@ EXTRA_DIST =         README.md \
> +               aclocal/UTIMBUF.m4 \
> +               miscel/Makefile.mingw32 \
> +               miscel/README.vc++ \
> +-              bootstrap \
> +-              regression
> ++              bootstrap
> +
> + DISTCLEANFILES=config/config.cache config/config.log config.h
> +
> +--
> +2.17.1
> +
> diff --git a/meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch b/meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch
> new file mode 100644
> index 000000000..7df7ecb38
> --- /dev/null
> +++ b/meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch
> @@ -0,0 +1,40 @@
> +From 75369ce004ec0f5e46a432fa1dac8cfc7ae1ef8d Mon Sep 17 00:00:00 2001
> +From: Mingli Yu <mingli.yu@windriver.com>
> +Date: Sun, 24 Feb 2019 22:35:08 -0800
> +Subject: [PATCH] src/indent.c: correct the check for locale.h
> +
> +Adjust to check HAVE_LC_MESSAGES or HAVE_LOCALE_H
> +to determine whether include locale.h or not to
> +fix below issue:
> +
> +| ../../indent-2.2.12/src/indent.c: In function 'main':
> +| ../../indent-2.2.12/src/indent.c:1062:5: error: implicit declaration of function 'setlocale'; did you mean 'setstate'? [-Werror=implicit-function-declaration]
> +|      setlocale(LC_ALL, "");
> +|      ^~~~~~~~~
> +|      setstate
> +| ../../indent-2.2.12/src/indent.c:1062:5: error: nested extern declaration of 'setlocale' [-Werror=nested-externs]
> +| ../../indent-2.2.12/src/indent.c:1062:15: error: 'LC_ALL' undeclared (first use in this function)
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> +---
> + src/indent.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/indent.c b/src/indent.c
> +index 4d666e2..0c2780b 100644
> +--- a/src/indent.c
> ++++ b/src/indent.c
> +@@ -71,7 +71,7 @@
> + #include <string.h>
> + #include <ctype.h>
> + #include <stdlib.h>
> +-#ifdef HAVE_LOCALE_H
> ++#if defined(HAVE_LC_MESSAGES) || defined(HAVE_LOCALE_H)
> + #include <locale.h>
> + #endif
> + #include "indent.h"
> +--
> +2.17.1
> +
> diff --git a/meta-oe/recipes-extended/indent/indent_2.2.10.bb b/meta-oe/recipes-extended/indent/indent_2.2.12.bb
> similarity index 68%
> rename from meta-oe/recipes-extended/indent/indent_2.2.10.bb
> rename to meta-oe/recipes-extended/indent/indent_2.2.12.bb
> index d25e8e317..eda388e37 100644
> --- a/meta-oe/recipes-extended/indent/indent_2.2.10.bb
> +++ b/meta-oe/recipes-extended/indent/indent_2.2.12.bb
> @@ -11,9 +11,12 @@ LICENSE = "GPLv3"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
>  DEPENDS = "virtual/gettext"
>
> -SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz"
> -SRC_URI[md5sum] = "be35ea62705733859fbf8caf816d8959"
> -SRC_URI[sha256sum] = "8a9b41be5bfcab5d8c1be74204b10ae78789fc3deabea0775fdced8677292639"
> +SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
> +           file://0001-src-indent.c-correct-the-check-for-locale.h.patch \
> +           file://0001-Makefile.am-remove-regression-dir.patch \
> +"
> +SRC_URI[md5sum] = "4764b6ac98f6654a35da117b8e5e8e14"
> +SRC_URI[sha256sum] = "e77d68c0211515459b8812118d606812e300097cfac0b4e9fb3472664263bb8b"
>
>  inherit autotools gettext
>
> --
> 2.17.1
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-oe][PATCH] indent: Upgrade to 2.2.12
  2019-02-27  1:36 ` Khem Raj
@ 2019-02-27  2:03   ` Yu, Mingli
  2019-04-22  9:06   ` [meta-oe][PATCH v2] " mingli.yu
  1 sibling, 0 replies; 4+ messages in thread
From: Yu, Mingli @ 2019-02-27  2:03 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembeded-devel



On 2019年02月27日 09:36, Khem Raj wrote:
> Native version fails to build on ubuntu 14.04

Okay, I will take a look.

>
> https://errors.yoctoproject.org/Errors/Details/230511/
>
> On Mon, Feb 25, 2019 at 6:45 PM <mingli.yu@windriver.com> wrote:
>>
>> From: Mingli Yu <mingli.yu@windriver.com>
>>
>> Add two patches to fix the build error.
>>
>> Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
>> ---
>>   ...01-Makefile.am-remove-regression-dir.patch | 67 +++++++++++++++++++
>>   ...ent.c-correct-the-check-for-locale.h.patch | 40 +++++++++++
>>   .../{indent_2.2.10.bb => indent_2.2.12.bb}    |  9 ++-
>>   3 files changed, 113 insertions(+), 3 deletions(-)
>>   create mode 100644 meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch
>>   create mode 100644 meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch
>>   rename meta-oe/recipes-extended/indent/{indent_2.2.10.bb => indent_2.2.12.bb} (68%)
>>
>> diff --git a/meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch b/meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch
>> new file mode 100644
>> index 000000000..357d77d83
>> --- /dev/null
>> +++ b/meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch
>> @@ -0,0 +1,67 @@
>> +From 27bda5ee884e79d6d0e76955124d2b0c5798d6cf Mon Sep 17 00:00:00 2001
>> +From: Mingli Yu <mingli.yu@windriver.com>
>> +Date: Mon, 25 Feb 2019 00:34:17 -0800
>> +Subject: [PATCH] Makefile.am: remove regression dir
>> +
>> +Remove regression dir to fix below do_compile
>> +error:
>> +| Making all in regression
>> +| /bin/sh: line 20: cd: regression: No such file or directory
>> +| Makefile:451: recipe for target 'all-recursive' failed
>> +
>> +BTW, it should be safe not to cover regression dir
>> +as there is no Makefile.in under ${S}/regression
>> +and the content of ${S}/regression/Makefile as below.
>> +-------------------------------------
>> +all:
>> +
>> +install:
>> +
>> +check:
>> +        ./TEST
>> +
>> +distclean: clean
>> +
>> +maintainer-clean: clean
>> +
>> +distdir:
>> +
>> +clean:
>> +        @rm -rf output
>> +
>> +.PHONY: all install
>> +-------------------------------------
>> +
>> +Upstream-Status: Pending
>> +
>> +Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
>> +---
>> + Makefile.am | 5 ++---
>> + 1 file changed, 2 insertions(+), 3 deletions(-)
>> +
>> +diff --git a/Makefile.am b/Makefile.am
>> +index ba37a42..548fea7 100644
>> +--- a/Makefile.am
>> ++++ b/Makefile.am
>> +@@ -1,7 +1,7 @@
>> + ## Process this file with automake to produce Makefile.in
>> + AUTOMAKE_OPTIONS = no-texinfo.tex
>> +
>> +-SUBDIRS = intl src doc po man regression
>> ++SUBDIRS = intl src doc po man
>> +
>> + BUILT_SOURCES =
>> +
>> +@@ -13,8 +13,7 @@ EXTRA_DIST =         README.md \
>> +               aclocal/UTIMBUF.m4 \
>> +               miscel/Makefile.mingw32 \
>> +               miscel/README.vc++ \
>> +-              bootstrap \
>> +-              regression
>> ++              bootstrap
>> +
>> + DISTCLEANFILES=config/config.cache config/config.log config.h
>> +
>> +--
>> +2.17.1
>> +
>> diff --git a/meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch b/meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch
>> new file mode 100644
>> index 000000000..7df7ecb38
>> --- /dev/null
>> +++ b/meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch
>> @@ -0,0 +1,40 @@
>> +From 75369ce004ec0f5e46a432fa1dac8cfc7ae1ef8d Mon Sep 17 00:00:00 2001
>> +From: Mingli Yu <mingli.yu@windriver.com>
>> +Date: Sun, 24 Feb 2019 22:35:08 -0800
>> +Subject: [PATCH] src/indent.c: correct the check for locale.h
>> +
>> +Adjust to check HAVE_LC_MESSAGES or HAVE_LOCALE_H
>> +to determine whether include locale.h or not to
>> +fix below issue:
>> +
>> +| ../../indent-2.2.12/src/indent.c: In function 'main':
>> +| ../../indent-2.2.12/src/indent.c:1062:5: error: implicit declaration of function 'setlocale'; did you mean 'setstate'? [-Werror=implicit-function-declaration]
>> +|      setlocale(LC_ALL, "");
>> +|      ^~~~~~~~~
>> +|      setstate
>> +| ../../indent-2.2.12/src/indent.c:1062:5: error: nested extern declaration of 'setlocale' [-Werror=nested-externs]
>> +| ../../indent-2.2.12/src/indent.c:1062:15: error: 'LC_ALL' undeclared (first use in this function)
>> +
>> +Upstream-Status: Pending
>> +
>> +Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
>> +---
>> + src/indent.c | 2 +-
>> + 1 file changed, 1 insertion(+), 1 deletion(-)
>> +
>> +diff --git a/src/indent.c b/src/indent.c
>> +index 4d666e2..0c2780b 100644
>> +--- a/src/indent.c
>> ++++ b/src/indent.c
>> +@@ -71,7 +71,7 @@
>> + #include <string.h>
>> + #include <ctype.h>
>> + #include <stdlib.h>
>> +-#ifdef HAVE_LOCALE_H
>> ++#if defined(HAVE_LC_MESSAGES) || defined(HAVE_LOCALE_H)
>> + #include <locale.h>
>> + #endif
>> + #include "indent.h"
>> +--
>> +2.17.1
>> +
>> diff --git a/meta-oe/recipes-extended/indent/indent_2.2.10.bb b/meta-oe/recipes-extended/indent/indent_2.2.12.bb
>> similarity index 68%
>> rename from meta-oe/recipes-extended/indent/indent_2.2.10.bb
>> rename to meta-oe/recipes-extended/indent/indent_2.2.12.bb
>> index d25e8e317..eda388e37 100644
>> --- a/meta-oe/recipes-extended/indent/indent_2.2.10.bb
>> +++ b/meta-oe/recipes-extended/indent/indent_2.2.12.bb
>> @@ -11,9 +11,12 @@ LICENSE = "GPLv3"
>>   LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
>>   DEPENDS = "virtual/gettext"
>>
>> -SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz"
>> -SRC_URI[md5sum] = "be35ea62705733859fbf8caf816d8959"
>> -SRC_URI[sha256sum] = "8a9b41be5bfcab5d8c1be74204b10ae78789fc3deabea0775fdced8677292639"
>> +SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
>> +           file://0001-src-indent.c-correct-the-check-for-locale.h.patch \
>> +           file://0001-Makefile.am-remove-regression-dir.patch \
>> +"
>> +SRC_URI[md5sum] = "4764b6ac98f6654a35da117b8e5e8e14"
>> +SRC_URI[sha256sum] = "e77d68c0211515459b8812118d606812e300097cfac0b4e9fb3472664263bb8b"
>>
>>   inherit autotools gettext
>>
>> --
>> 2.17.1
>>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [meta-oe][PATCH v2] indent: Upgrade to 2.2.12
  2019-02-27  1:36 ` Khem Raj
  2019-02-27  2:03   ` Yu, Mingli
@ 2019-04-22  9:06   ` mingli.yu
  1 sibling, 0 replies; 4+ messages in thread
From: mingli.yu @ 2019-04-22  9:06 UTC (permalink / raw)
  To: openembedded-devel, raj.khem

From: Mingli Yu <mingli.yu@windriver.com>

Add two patches to fix the build error.

Add -Wno-error=unused-value for native build
to silence below error:
| In file included from ../../indent-2.2.12/src/indent.h:60:0,
                 from ../../indent-2.2.12/src/indent.c:77:
| ../../indent-2.2.12/src/indent.c: In function 'main':
| ../../indent-2.2.12/src/libgettext.h:88:5: error: statement with no effect [-Werror=unused-value]
     ((void) (Domainname), (const char *) (Dirname))
     ^
| ../../indent-2.2.12/src/indent.c:1064:5: note: in expansion of macro 'bindtextdomain'
     bindtextdomain(PACKAGE, LOCALEDIR);

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 ...01-Makefile.am-remove-regression-dir.patch | 67 +++++++++++++++++++
 ...ent.c-correct-the-check-for-locale.h.patch | 40 +++++++++++
 .../{indent_2.2.10.bb => indent_2.2.12.bb}    | 11 ++-
 3 files changed, 115 insertions(+), 3 deletions(-)
 create mode 100644 meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch
 create mode 100644 meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch
 rename meta-oe/recipes-extended/indent/{indent_2.2.10.bb => indent_2.2.12.bb} (65%)

diff --git a/meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch b/meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch
new file mode 100644
index 000000000..357d77d83
--- /dev/null
+++ b/meta-oe/recipes-extended/indent/indent/0001-Makefile.am-remove-regression-dir.patch
@@ -0,0 +1,67 @@
+From 27bda5ee884e79d6d0e76955124d2b0c5798d6cf Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Mon, 25 Feb 2019 00:34:17 -0800
+Subject: [PATCH] Makefile.am: remove regression dir
+
+Remove regression dir to fix below do_compile
+error:
+| Making all in regression
+| /bin/sh: line 20: cd: regression: No such file or directory
+| Makefile:451: recipe for target 'all-recursive' failed
+
+BTW, it should be safe not to cover regression dir
+as there is no Makefile.in under ${S}/regression
+and the content of ${S}/regression/Makefile as below.
+-------------------------------------
+all:
+
+install:
+
+check:
+        ./TEST
+
+distclean: clean
+
+maintainer-clean: clean
+
+distdir:
+
+clean:
+        @rm -rf output
+
+.PHONY: all install
+-------------------------------------
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ Makefile.am | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index ba37a42..548fea7 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,7 +1,7 @@
+ ## Process this file with automake to produce Makefile.in
+ AUTOMAKE_OPTIONS = no-texinfo.tex
+ 
+-SUBDIRS = intl src doc po man regression
++SUBDIRS = intl src doc po man
+ 
+ BUILT_SOURCES = 
+ 
+@@ -13,8 +13,7 @@ EXTRA_DIST = 	README.md \
+ 		aclocal/UTIMBUF.m4 \
+ 		miscel/Makefile.mingw32 \
+ 		miscel/README.vc++ \
+-		bootstrap \
+-		regression
++		bootstrap
+ 
+ DISTCLEANFILES=config/config.cache config/config.log config.h
+ 
+-- 
+2.17.1
+
diff --git a/meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch b/meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch
new file mode 100644
index 000000000..7df7ecb38
--- /dev/null
+++ b/meta-oe/recipes-extended/indent/indent/0001-src-indent.c-correct-the-check-for-locale.h.patch
@@ -0,0 +1,40 @@
+From 75369ce004ec0f5e46a432fa1dac8cfc7ae1ef8d Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Sun, 24 Feb 2019 22:35:08 -0800
+Subject: [PATCH] src/indent.c: correct the check for locale.h
+
+Adjust to check HAVE_LC_MESSAGES or HAVE_LOCALE_H
+to determine whether include locale.h or not to
+fix below issue:
+
+| ../../indent-2.2.12/src/indent.c: In function 'main':
+| ../../indent-2.2.12/src/indent.c:1062:5: error: implicit declaration of function 'setlocale'; did you mean 'setstate'? [-Werror=implicit-function-declaration]
+|      setlocale(LC_ALL, "");
+|      ^~~~~~~~~
+|      setstate
+| ../../indent-2.2.12/src/indent.c:1062:5: error: nested extern declaration of 'setlocale' [-Werror=nested-externs]
+| ../../indent-2.2.12/src/indent.c:1062:15: error: 'LC_ALL' undeclared (first use in this function)
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ src/indent.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/indent.c b/src/indent.c
+index 4d666e2..0c2780b 100644
+--- a/src/indent.c
++++ b/src/indent.c
+@@ -71,7 +71,7 @@
+ #include <string.h>
+ #include <ctype.h>
+ #include <stdlib.h>
+-#ifdef HAVE_LOCALE_H
++#if defined(HAVE_LC_MESSAGES) || defined(HAVE_LOCALE_H)
+ #include <locale.h>
+ #endif
+ #include "indent.h"
+-- 
+2.17.1
+
diff --git a/meta-oe/recipes-extended/indent/indent_2.2.10.bb b/meta-oe/recipes-extended/indent/indent_2.2.12.bb
similarity index 65%
rename from meta-oe/recipes-extended/indent/indent_2.2.10.bb
rename to meta-oe/recipes-extended/indent/indent_2.2.12.bb
index d25e8e317..f2891df50 100644
--- a/meta-oe/recipes-extended/indent/indent_2.2.10.bb
+++ b/meta-oe/recipes-extended/indent/indent_2.2.12.bb
@@ -11,12 +11,17 @@ LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 DEPENDS = "virtual/gettext"
 
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz"
-SRC_URI[md5sum] = "be35ea62705733859fbf8caf816d8959"
-SRC_URI[sha256sum] = "8a9b41be5bfcab5d8c1be74204b10ae78789fc3deabea0775fdced8677292639"
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
+           file://0001-src-indent.c-correct-the-check-for-locale.h.patch \
+           file://0001-Makefile.am-remove-regression-dir.patch \
+"
+SRC_URI[md5sum] = "4764b6ac98f6654a35da117b8e5e8e14"
+SRC_URI[sha256sum] = "e77d68c0211515459b8812118d606812e300097cfac0b4e9fb3472664263bb8b"
 
 inherit autotools gettext
 
+CFLAGS_class-native += " -Wno-error=unused-value"
+
 FILES_${PN}-doc += "/usr/doc/indent/indent.html"
 
 BBCLASSEXTEND = "native"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-22  9:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-26  2:45 [meta-oe][PATCH] indent: Upgrade to 2.2.12 mingli.yu
2019-02-27  1:36 ` Khem Raj
2019-02-27  2:03   ` Yu, Mingli
2019-04-22  9:06   ` [meta-oe][PATCH v2] " mingli.yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.