All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/ushare: fix build without msgfmt
@ 2021-08-22  8:57 Fabrice Fontaine
  2021-08-25 19:33 ` Arnout Vandecappelle
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2021-08-22  8:57 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Fix the following build failure without /usr/bin/msgfmt raised since the
addition of ushare in commit 74097fd659154499612f21fabeda4e3e7c8fdbfc:

make[3]: Entering directory `/home/buildroot/autobuild/run/instance-3/output-1/build/ushare-2.1/po'
/usr/bin/msgfmt -c --statistics -o fr.gmo fr.po
make[3]: /usr/bin/msgfmt: Command not found

To fix this build failure, set GMSGFMT to $(HOST_DIR)/bin/msgfmt and
don't build po files if NLS is disabled

Fixes:
 - http://autobuild.buildroot.org/results/9f6b5b8f38386135bacd2d8f6e97c1fea77bbe69

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...-t-build-po-files-if-NLS-is-disabled.patch | 47 +++++++++++++++++++
 package/ushare/ushare.mk                      |  5 +-
 2 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100644 package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch

diff --git a/package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch b/package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch
new file mode 100644
index 0000000000..f0fa89998f
--- /dev/null
+++ b/package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch
@@ -0,0 +1,47 @@
+From 977171781f5d49e61b46c0241fb67cbb7d666498 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 22 Aug 2021 10:44:48 +0200
+Subject: [PATCH] Don't build po files if NLS is disabled
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/ddugovic/uShare/pull/12]
+---
+ Makefile  | 7 +++++--
+ configure | 1 +
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index ebd8f91..6686cfd 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,10 +14,13 @@ EXTRADIST = AUTHORS \
+ 	    THANKS \
+ 	    TODO \
+ 
+-SUBDIRS = po \
+-	  scripts \
++SUBDIRS = scripts \
+ 	  src \
+ 
++ifeq ($(NLS),yes)
++SUBDIRS += po
++endif
++
+ all:
+ 	for subdir in $(SUBDIRS); do \
+ 	  $(MAKE) -C $$subdir $@; \
+diff --git a/configure b/configure
+index 4a3efe0..162a776 100755
+--- a/configure
++++ b/configure
+@@ -723,6 +723,7 @@ append_config "LDFLAGS=$LDFLAGS"
+ append_config "INSTALL=$INSTALL"
+ 
+ append_config "DEBUG=$debug"
++append_config "NLS=$nls"
+ 
+ 
+ echolog "Creating $CONFIG_H ..."
+-- 
+2.32.0
+
diff --git a/package/ushare/ushare.mk b/package/ushare/ushare.mk
index a4c9711600..7c7359c385 100644
--- a/package/ushare/ushare.mk
+++ b/package/ushare/ushare.mk
@@ -18,8 +18,11 @@ USHARE_CONF_OPTS = \
 	--sysconfdir=/etc \
 	--disable-strip
 
+USHARE_MAKE_OPTS = LDFLAGS="$(TARGET_LDFLAGS) $(USHARE_LDFLAGS)"
+
 ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
 USHARE_CONF_OPTS += --disable-nls
+USHARE_MAKE_OPTS += GMSGFMT="$(HOST_DIR)/bin/msgfmt"
 endif
 
 define USHARE_CONFIGURE_CMDS
@@ -31,7 +34,7 @@ define USHARE_CONFIGURE_CMDS
 endef
 
 define USHARE_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) LDFLAGS="$(TARGET_LDFLAGS) $(USHARE_LDFLAGS)" -C $(@D)
+	$(TARGET_MAKE_ENV) $(MAKE) $(USHARE_MAKE_OPTS) -C $(@D)
 endef
 
 define USHARE_INSTALL_TARGET_CMDS
-- 
2.32.0

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/ushare: fix build without msgfmt
  2021-08-22  8:57 [Buildroot] [PATCH 1/1] package/ushare: fix build without msgfmt Fabrice Fontaine
@ 2021-08-25 19:33 ` Arnout Vandecappelle
  2021-08-25 19:34   ` Arnout Vandecappelle
  2021-08-25 19:43   ` Fabrice Fontaine
  0 siblings, 2 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2021-08-25 19:33 UTC (permalink / raw)
  To: Fabrice Fontaine, buildroot



On 22/08/2021 10:57, Fabrice Fontaine wrote:
> Fix the following build failure without /usr/bin/msgfmt raised since the
> addition of ushare in commit 74097fd659154499612f21fabeda4e3e7c8fdbfc:
> 
> make[3]: Entering directory `/home/buildroot/autobuild/run/instance-3/output-1/build/ushare-2.1/po'
> /usr/bin/msgfmt -c --statistics -o fr.gmo fr.po
> make[3]: /usr/bin/msgfmt: Command not found
> 
> To fix this build failure, set GMSGFMT to $(HOST_DIR)/bin/msgfmt and
> don't build po files if NLS is disabled
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/9f6b5b8f38386135bacd2d8f6e97c1fea77bbe69
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...-t-build-po-files-if-NLS-is-disabled.patch | 47 +++++++++++++++++++
>  package/ushare/ushare.mk                      |  5 +-
>  2 files changed, 51 insertions(+), 1 deletion(-)
>  create mode 100644 package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch
> 
> diff --git a/package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch b/package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch
> new file mode 100644
> index 0000000000..f0fa89998f
> --- /dev/null
> +++ b/package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch
> @@ -0,0 +1,47 @@
> +From 977171781f5d49e61b46c0241fb67cbb7d666498 Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Sun, 22 Aug 2021 10:44:48 +0200
> +Subject: [PATCH] Don't build po files if NLS is disabled
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Upstream status: https://github.com/ddugovic/uShare/pull/12]
> +---
> + Makefile  | 7 +++++--
> + configure | 1 +
> + 2 files changed, 6 insertions(+), 2 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index ebd8f91..6686cfd 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -14,10 +14,13 @@ EXTRADIST = AUTHORS \
> + 	    THANKS \
> + 	    TODO \
> + 
> +-SUBDIRS = po \
> +-	  scripts \
> ++SUBDIRS = scripts \
> + 	  src \
> + 
> ++ifeq ($(NLS),yes)
> ++SUBDIRS += po
> ++endif
> ++
> + all:
> + 	for subdir in $(SUBDIRS); do \
> + 	  $(MAKE) -C $$subdir $@; \
> +diff --git a/configure b/configure
> +index 4a3efe0..162a776 100755
> +--- a/configure
> ++++ b/configure
> +@@ -723,6 +723,7 @@ append_config "LDFLAGS=$LDFLAGS"
> + append_config "INSTALL=$INSTALL"
> + 
> + append_config "DEBUG=$debug"
> ++append_config "NLS=$nls"
> + 
> + 
> + echolog "Creating $CONFIG_H ..."
> +-- 
> +2.32.0
> +
> diff --git a/package/ushare/ushare.mk b/package/ushare/ushare.mk
> index a4c9711600..7c7359c385 100644
> --- a/package/ushare/ushare.mk
> +++ b/package/ushare/ushare.mk
> @@ -18,8 +18,11 @@ USHARE_CONF_OPTS = \
>  	--sysconfdir=/etc \
>  	--disable-strip
>  
> +USHARE_MAKE_OPTS = LDFLAGS="$(TARGET_LDFLAGS) $(USHARE_LDFLAGS)"
> +
>  ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
>  USHARE_CONF_OPTS += --disable-nls
> +USHARE_MAKE_OPTS += GMSGFMT="$(HOST_DIR)/bin/msgfmt"

 This looks fishy... If NLS is disabled, there's no dependency that makes sure
that gettext is built before ushare (or at all). Conversely, if gettext is
enabled, shouldn't we specify GMSGFMT?

 Regards,
 Arnout

>  endif
>  
>  define USHARE_CONFIGURE_CMDS
> @@ -31,7 +34,7 @@ define USHARE_CONFIGURE_CMDS
>  endef
>  
>  define USHARE_BUILD_CMDS
> -	$(TARGET_MAKE_ENV) $(MAKE) LDFLAGS="$(TARGET_LDFLAGS) $(USHARE_LDFLAGS)" -C $(@D)
> +	$(TARGET_MAKE_ENV) $(MAKE) $(USHARE_MAKE_OPTS) -C $(@D)
>  endef
>  
>  define USHARE_INSTALL_TARGET_CMDS
> 
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/ushare: fix build without msgfmt
  2021-08-25 19:33 ` Arnout Vandecappelle
@ 2021-08-25 19:34   ` Arnout Vandecappelle
  2021-08-25 19:43   ` Fabrice Fontaine
  1 sibling, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2021-08-25 19:34 UTC (permalink / raw)
  To: Fabrice Fontaine, buildroot



On 25/08/2021 21:33, Arnout Vandecappelle wrote:
> 
> 
> On 22/08/2021 10:57, Fabrice Fontaine wrote:
>> Fix the following build failure without /usr/bin/msgfmt raised since the
>> addition of ushare in commit 74097fd659154499612f21fabeda4e3e7c8fdbfc:
>>
>> make[3]: Entering directory `/home/buildroot/autobuild/run/instance-3/output-1/build/ushare-2.1/po'
>> /usr/bin/msgfmt -c --statistics -o fr.gmo fr.po
>> make[3]: /usr/bin/msgfmt: Command not found
>>
>> To fix this build failure, set GMSGFMT to $(HOST_DIR)/bin/msgfmt and
>> don't build po files if NLS is disabled
>>
>> Fixes:
>>  - http://autobuild.buildroot.org/results/9f6b5b8f38386135bacd2d8f6e97c1fea77bbe69
>>
>> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>> ---
>>  ...-t-build-po-files-if-NLS-is-disabled.patch | 47 +++++++++++++++++++
>>  package/ushare/ushare.mk                      |  5 +-
>>  2 files changed, 51 insertions(+), 1 deletion(-)
>>  create mode 100644 package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch
>>
>> diff --git a/package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch b/package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch
>> new file mode 100644
>> index 0000000000..f0fa89998f
>> --- /dev/null
>> +++ b/package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch
>> @@ -0,0 +1,47 @@
>> +From 977171781f5d49e61b46c0241fb67cbb7d666498 Mon Sep 17 00:00:00 2001
>> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>> +Date: Sun, 22 Aug 2021 10:44:48 +0200
>> +Subject: [PATCH] Don't build po files if NLS is disabled
>> +
>> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>> +[Upstream status: https://github.com/ddugovic/uShare/pull/12]
>> +---
>> + Makefile  | 7 +++++--
>> + configure | 1 +
>> + 2 files changed, 6 insertions(+), 2 deletions(-)
>> +
>> +diff --git a/Makefile b/Makefile
>> +index ebd8f91..6686cfd 100644
>> +--- a/Makefile
>> ++++ b/Makefile
>> +@@ -14,10 +14,13 @@ EXTRADIST = AUTHORS \
>> + 	    THANKS \
>> + 	    TODO \
>> + 
>> +-SUBDIRS = po \
>> +-	  scripts \
>> ++SUBDIRS = scripts \
>> + 	  src \
>> + 
>> ++ifeq ($(NLS),yes)
>> ++SUBDIRS += po
>> ++endif
>> ++
>> + all:
>> + 	for subdir in $(SUBDIRS); do \
>> + 	  $(MAKE) -C $$subdir $@; \
>> +diff --git a/configure b/configure
>> +index 4a3efe0..162a776 100755
>> +--- a/configure
>> ++++ b/configure
>> +@@ -723,6 +723,7 @@ append_config "LDFLAGS=$LDFLAGS"
>> + append_config "INSTALL=$INSTALL"
>> + 
>> + append_config "DEBUG=$debug"
>> ++append_config "NLS=$nls"
>> + 
>> + 
>> + echolog "Creating $CONFIG_H ..."
>> +-- 
>> +2.32.0
>> +
>> diff --git a/package/ushare/ushare.mk b/package/ushare/ushare.mk
>> index a4c9711600..7c7359c385 100644
>> --- a/package/ushare/ushare.mk
>> +++ b/package/ushare/ushare.mk
>> @@ -18,8 +18,11 @@ USHARE_CONF_OPTS = \
>>  	--sysconfdir=/etc \
>>  	--disable-strip
>>  
>> +USHARE_MAKE_OPTS = LDFLAGS="$(TARGET_LDFLAGS) $(USHARE_LDFLAGS)"
>> +
>>  ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
>>  USHARE_CONF_OPTS += --disable-nls
>> +USHARE_MAKE_OPTS += GMSGFMT="$(HOST_DIR)/bin/msgfmt"
> 
>  This looks fishy... If NLS is disabled, there's no dependency that makes sure
> that gettext is built before ushare (or at all). Conversely, if gettext is
> enabled, shouldn't we specify GMSGFMT?

 Oh and also, we prefer explicit --enable-nls.

 Regards,
 Arnout

> 
>  Regards,
>  Arnout
> 
>>  endif
>>  
>>  define USHARE_CONFIGURE_CMDS
>> @@ -31,7 +34,7 @@ define USHARE_CONFIGURE_CMDS
>>  endef
>>  
>>  define USHARE_BUILD_CMDS
>> -	$(TARGET_MAKE_ENV) $(MAKE) LDFLAGS="$(TARGET_LDFLAGS) $(USHARE_LDFLAGS)" -C $(@D)
>> +	$(TARGET_MAKE_ENV) $(MAKE) $(USHARE_MAKE_OPTS) -C $(@D)
>>  endef
>>  
>>  define USHARE_INSTALL_TARGET_CMDS
>>
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/ushare: fix build without msgfmt
  2021-08-25 19:33 ` Arnout Vandecappelle
  2021-08-25 19:34   ` Arnout Vandecappelle
@ 2021-08-25 19:43   ` Fabrice Fontaine
  2021-08-25 20:40     ` Arnout Vandecappelle
  1 sibling, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2021-08-25 19:43 UTC (permalink / raw)
  To: Arnout Vandecappelle; +Cc: Buildroot Mailing List

Le mer. 25 août 2021 à 21:33, Arnout Vandecappelle <arnout@mind.be> a écrit :
>
>
>
> On 22/08/2021 10:57, Fabrice Fontaine wrote:
> > Fix the following build failure without /usr/bin/msgfmt raised since the
> > addition of ushare in commit 74097fd659154499612f21fabeda4e3e7c8fdbfc:
> >
> > make[3]: Entering directory `/home/buildroot/autobuild/run/instance-3/output-1/build/ushare-2.1/po'
> > /usr/bin/msgfmt -c --statistics -o fr.gmo fr.po
> > make[3]: /usr/bin/msgfmt: Command not found
> >
> > To fix this build failure, set GMSGFMT to $(HOST_DIR)/bin/msgfmt and
> > don't build po files if NLS is disabled
> >
> > Fixes:
> >  - http://autobuild.buildroot.org/results/9f6b5b8f38386135bacd2d8f6e97c1fea77bbe69
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >  ...-t-build-po-files-if-NLS-is-disabled.patch | 47 +++++++++++++++++++
> >  package/ushare/ushare.mk                      |  5 +-
> >  2 files changed, 51 insertions(+), 1 deletion(-)
> >  create mode 100644 package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch
> >
> > diff --git a/package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch b/package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch
> > new file mode 100644
> > index 0000000000..f0fa89998f
> > --- /dev/null
> > +++ b/package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch
> > @@ -0,0 +1,47 @@
> > +From 977171781f5d49e61b46c0241fb67cbb7d666498 Mon Sep 17 00:00:00 2001
> > +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > +Date: Sun, 22 Aug 2021 10:44:48 +0200
> > +Subject: [PATCH] Don't build po files if NLS is disabled
> > +
> > +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > +[Upstream status: https://github.com/ddugovic/uShare/pull/12]
> > +---
> > + Makefile  | 7 +++++--
> > + configure | 1 +
> > + 2 files changed, 6 insertions(+), 2 deletions(-)
> > +
> > +diff --git a/Makefile b/Makefile
> > +index ebd8f91..6686cfd 100644
> > +--- a/Makefile
> > ++++ b/Makefile
> > +@@ -14,10 +14,13 @@ EXTRADIST = AUTHORS \
> > +         THANKS \
> > +         TODO \
> > +
> > +-SUBDIRS = po \
> > +-      scripts \
> > ++SUBDIRS = scripts \
> > +       src \
> > +
> > ++ifeq ($(NLS),yes)
> > ++SUBDIRS += po
> > ++endif
> > ++
> > + all:
> > +     for subdir in $(SUBDIRS); do \
> > +       $(MAKE) -C $$subdir $@; \
> > +diff --git a/configure b/configure
> > +index 4a3efe0..162a776 100755
> > +--- a/configure
> > ++++ b/configure
> > +@@ -723,6 +723,7 @@ append_config "LDFLAGS=$LDFLAGS"
> > + append_config "INSTALL=$INSTALL"
> > +
> > + append_config "DEBUG=$debug"
> > ++append_config "NLS=$nls"
> > +
> > +
> > + echolog "Creating $CONFIG_H ..."
> > +--
> > +2.32.0
> > +
> > diff --git a/package/ushare/ushare.mk b/package/ushare/ushare.mk
> > index a4c9711600..7c7359c385 100644
> > --- a/package/ushare/ushare.mk
> > +++ b/package/ushare/ushare.mk
> > @@ -18,8 +18,11 @@ USHARE_CONF_OPTS = \
> >       --sysconfdir=/etc \
> >       --disable-strip
> >
> > +USHARE_MAKE_OPTS = LDFLAGS="$(TARGET_LDFLAGS) $(USHARE_LDFLAGS)"
> > +
> >  ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
> >  USHARE_CONF_OPTS += --disable-nls
> > +USHARE_MAKE_OPTS += GMSGFMT="$(HOST_DIR)/bin/msgfmt"
>
>  This looks fishy... If NLS is disabled, there's no dependency that makes sure
> that gettext is built before ushare (or at all). Conversely, if gettext is
> enabled, shouldn't we specify GMSGFMT?
It's already handled by (TARGET_NLS_DEPENDENCIES) at line 9 of
ushare.mk but I can always define GMSGFMT if you prefer.
I'll also set --enable-nls even if this is not needed to fix the build
failure as NLS is enabled by default.
>
>  Regards,
>  Arnout
>
> >  endif
> >
> >  define USHARE_CONFIGURE_CMDS
> > @@ -31,7 +34,7 @@ define USHARE_CONFIGURE_CMDS
> >  endef
> >
> >  define USHARE_BUILD_CMDS
> > -     $(TARGET_MAKE_ENV) $(MAKE) LDFLAGS="$(TARGET_LDFLAGS) $(USHARE_LDFLAGS)" -C $(@D)
> > +     $(TARGET_MAKE_ENV) $(MAKE) $(USHARE_MAKE_OPTS) -C $(@D)
> >  endef
> >
> >  define USHARE_INSTALL_TARGET_CMDS
> >
Best Regards,

Fabrice
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/ushare: fix build without msgfmt
  2021-08-25 19:43   ` Fabrice Fontaine
@ 2021-08-25 20:40     ` Arnout Vandecappelle
  0 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2021-08-25 20:40 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Buildroot Mailing List



On 25/08/2021 21:43, Fabrice Fontaine wrote:
> Le mer. 25 août 2021 à 21:33, Arnout Vandecappelle <arnout@mind.be> a écrit :
>>
>>
>>
>> On 22/08/2021 10:57, Fabrice Fontaine wrote:
>>> Fix the following build failure without /usr/bin/msgfmt raised since the
>>> addition of ushare in commit 74097fd659154499612f21fabeda4e3e7c8fdbfc:
>>>
>>> make[3]: Entering directory `/home/buildroot/autobuild/run/instance-3/output-1/build/ushare-2.1/po'
>>> /usr/bin/msgfmt -c --statistics -o fr.gmo fr.po
>>> make[3]: /usr/bin/msgfmt: Command not found
>>>
>>> To fix this build failure, set GMSGFMT to $(HOST_DIR)/bin/msgfmt and
>>> don't build po files if NLS is disabled
>>>
>>> Fixes:
>>>  - http://autobuild.buildroot.org/results/9f6b5b8f38386135bacd2d8f6e97c1fea77bbe69
>>>
>>> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>>> ---
>>>  ...-t-build-po-files-if-NLS-is-disabled.patch | 47 +++++++++++++++++++
>>>  package/ushare/ushare.mk                      |  5 +-
>>>  2 files changed, 51 insertions(+), 1 deletion(-)
>>>  create mode 100644 package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch
>>>
>>> diff --git a/package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch b/package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch
>>> new file mode 100644
>>> index 0000000000..f0fa89998f
>>> --- /dev/null
>>> +++ b/package/ushare/0001-Don-t-build-po-files-if-NLS-is-disabled.patch
>>> @@ -0,0 +1,47 @@
>>> +From 977171781f5d49e61b46c0241fb67cbb7d666498 Mon Sep 17 00:00:00 2001
>>> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>>> +Date: Sun, 22 Aug 2021 10:44:48 +0200
>>> +Subject: [PATCH] Don't build po files if NLS is disabled
>>> +
>>> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>>> +[Upstream status: https://github.com/ddugovic/uShare/pull/12]
>>> +---
>>> + Makefile  | 7 +++++--
>>> + configure | 1 +
>>> + 2 files changed, 6 insertions(+), 2 deletions(-)
>>> +
>>> +diff --git a/Makefile b/Makefile
>>> +index ebd8f91..6686cfd 100644
>>> +--- a/Makefile
>>> ++++ b/Makefile
>>> +@@ -14,10 +14,13 @@ EXTRADIST = AUTHORS \
>>> +         THANKS \
>>> +         TODO \
>>> +
>>> +-SUBDIRS = po \
>>> +-      scripts \
>>> ++SUBDIRS = scripts \
>>> +       src \
>>> +
>>> ++ifeq ($(NLS),yes)
>>> ++SUBDIRS += po
>>> ++endif
>>> ++
>>> + all:
>>> +     for subdir in $(SUBDIRS); do \
>>> +       $(MAKE) -C $$subdir $@; \
>>> +diff --git a/configure b/configure
>>> +index 4a3efe0..162a776 100755
>>> +--- a/configure
>>> ++++ b/configure
>>> +@@ -723,6 +723,7 @@ append_config "LDFLAGS=$LDFLAGS"
>>> + append_config "INSTALL=$INSTALL"
>>> +
>>> + append_config "DEBUG=$debug"
>>> ++append_config "NLS=$nls"
>>> +
>>> +
>>> + echolog "Creating $CONFIG_H ..."
>>> +--
>>> +2.32.0
>>> +
>>> diff --git a/package/ushare/ushare.mk b/package/ushare/ushare.mk
>>> index a4c9711600..7c7359c385 100644
>>> --- a/package/ushare/ushare.mk
>>> +++ b/package/ushare/ushare.mk
>>> @@ -18,8 +18,11 @@ USHARE_CONF_OPTS = \
>>>       --sysconfdir=/etc \
>>>       --disable-strip
>>>
>>> +USHARE_MAKE_OPTS = LDFLAGS="$(TARGET_LDFLAGS) $(USHARE_LDFLAGS)"
>>> +
>>>  ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
>>>  USHARE_CONF_OPTS += --disable-nls
>>> +USHARE_MAKE_OPTS += GMSGFMT="$(HOST_DIR)/bin/msgfmt"
>>
>>  This looks fishy... If NLS is disabled, there's no dependency that makes sure
>> that gettext is built before ushare (or at all). Conversely, if gettext is
>> enabled, shouldn't we specify GMSGFMT?
> It's already handled by (TARGET_NLS_DEPENDENCIES) at line 9 of

 AFAIK TARGET_NLS_DEPENDENCIES contains gettext only if NLS is enabled. But this
condition is when NLS is *disabled*.


 I would expect something like:

ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
USHARE_CONF_OPTS += --enable-nls
SHARE_MAKE_OPTS += GMSGFMT="$(HOST_DIR)/bin/msgfmt"
else
USHARE_CONF_OPTS += --disable-nls
endif


 Regards,
 Arnout

> ushare.mk but I can always define GMSGFMT if you prefer.
> I'll also set --enable-nls even if this is not needed to fix the build
> failure as NLS is enabled by default.
>>
>>  Regards,
>>  Arnout
>>
>>>  endif
>>>
>>>  define USHARE_CONFIGURE_CMDS
>>> @@ -31,7 +34,7 @@ define USHARE_CONFIGURE_CMDS
>>>  endef
>>>
>>>  define USHARE_BUILD_CMDS
>>> -     $(TARGET_MAKE_ENV) $(MAKE) LDFLAGS="$(TARGET_LDFLAGS) $(USHARE_LDFLAGS)" -C $(@D)
>>> +     $(TARGET_MAKE_ENV) $(MAKE) $(USHARE_MAKE_OPTS) -C $(@D)
>>>  endef
>>>
>>>  define USHARE_INSTALL_TARGET_CMDS
>>>
> Best Regards,
> 
> Fabrice
> 
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-08-25 20:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-22  8:57 [Buildroot] [PATCH 1/1] package/ushare: fix build without msgfmt Fabrice Fontaine
2021-08-25 19:33 ` Arnout Vandecappelle
2021-08-25 19:34   ` Arnout Vandecappelle
2021-08-25 19:43   ` Fabrice Fontaine
2021-08-25 20:40     ` Arnout Vandecappelle

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.