Patchwork package/dvb-apps: requires iconv

login
register
mail settings
Submitter Yann E. MORIN
Date Jan. 12, 2013, 12:53 p.m.
Message ID <1357995215-26554-1-git-send-email-yann.morin.1998@free.fr>
Download mbox | patch
Permalink /patch/211494/
State Accepted
Headers show

Comments

Yann E. MORIN - Jan. 12, 2013, 12:53 p.m.
Use libiconv if the toolchain does not have locales.

Fixes (for example):
    http://autobuild.buildroot.net/results/c5776c95ac128f7c7eadc2fe746ad89f8c1ef49a

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/dvb-apps/Config.in   |    1 +
 package/dvb-apps/dvb-apps.mk |    8 +++++++-
 2 files changed, 8 insertions(+), 1 deletions(-)
Peter Korsgaard - Jan. 12, 2013, 1:29 p.m.
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

Hi,

 Yann> +++ b/package/dvb-apps/dvb-apps.mk
 Yann> @@ -20,10 +20,16 @@ DVB_APPS_LICENSE        = unknown (probably public domain)
 
 Yann>  ifeq ($(BR2_PACKAGE_DVB_APPS_UTILS),y)
 Yann>  # Utilitiess are selected, build and install everything
 Yann> +
 Yann> +ifeq ($(BR2_ENABLE_LOCALE),)
 Yann> +DVB_APPS_DEPENDENCIES    = libiconv
 Yann> +DVB_APPS_LDFLAGS         = $(TARGET_LDFLAGS) -liconv
 Yann> +endif
 Yann> +
 Yann>  DVB_APPS_INSTALL_STAGING = YES
 
 Yann>  define DVB_APPS_BUILD_CMDS
 Yann> -	$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) V=1
 Yann> +	$(TARGET_CONFIGURE_OPTS) LDFLAGS="$(DVB_APPS_LDFLAGS)" $(MAKE) -C $(@D) V=1

Ehh, so if you have locale you pass an empty LDFLAGS?
Yann E. MORIN - Jan. 12, 2013, 1:36 p.m.
Peter, All,

On Saturday 12 January 2013 Peter Korsgaard wrote:
> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
>  Yann> +++ b/package/dvb-apps/dvb-apps.mk
>  Yann> @@ -20,10 +20,16 @@ DVB_APPS_LICENSE        = unknown (probably public domain)
>  
>  Yann>  ifeq ($(BR2_PACKAGE_DVB_APPS_UTILS),y)
>  Yann>  # Utilitiess are selected, build and install everything
>  Yann> +
>  Yann> +ifeq ($(BR2_ENABLE_LOCALE),)
>  Yann> +DVB_APPS_DEPENDENCIES    = libiconv
>  Yann> +DVB_APPS_LDFLAGS         = $(TARGET_LDFLAGS) -liconv
>  Yann> +endif
>  Yann> +
>  Yann>  DVB_APPS_INSTALL_STAGING = YES
>  
>  Yann>  define DVB_APPS_BUILD_CMDS
>  Yann> -	$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) V=1
>  Yann> +	$(TARGET_CONFIGURE_OPTS) LDFLAGS="$(DVB_APPS_LDFLAGS)" $(MAKE) -C $(@D) V=1
> 
> Ehh, so if you have locale you pass an empty LDFLAGS?

Strangely enough, this build fine with a toolchain with or without
locales. :-(

OK, break, will come back to this later... :-/

Regards,
Yann E. MORIN.
Peter Korsgaard - Jan. 12, 2013, 6:56 p.m.
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

Hi,

 Yann> define DVB_APPS_BUILD_CMDS
 Yann> -	$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) V=1
 Yann> +	$(TARGET_CONFIGURE_OPTS) LDFLAGS="$(DVB_APPS_LDFLAGS)" $(MAKE) -C $(@D) V=1
 >> 
 >> Ehh, so if you have locale you pass an empty LDFLAGS?

 Yann> Strangely enough, this build fine with a toolchain with or without
 Yann> locales. :-(

Well, yes - By default TARGET_LDFLAGS is empty, so it normally doesn't
really matter.

 Yann> OK, break, will come back to this later... :-/

Don't worry - I've fixed this up and committed, thanks.

Patch

diff --git a/package/dvb-apps/Config.in b/package/dvb-apps/Config.in
index ca8dc54..7f76330 100644
--- a/package/dvb-apps/Config.in
+++ b/package/dvb-apps/Config.in
@@ -14,6 +14,7 @@  comment "dvb-apps utils needs LARGEFILE support in the toolchain"
 config BR2_PACKAGE_DVB_APPS_UTILS
 	bool "dvb-apps utilities"
 	depends on BR2_LARGEFILE
+	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
 	  A small number of DVB test and utility programs,
 	  including szap and dvbscan.
diff --git a/package/dvb-apps/dvb-apps.mk b/package/dvb-apps/dvb-apps.mk
index f914799..0f32af5 100644
--- a/package/dvb-apps/dvb-apps.mk
+++ b/package/dvb-apps/dvb-apps.mk
@@ -20,10 +20,16 @@  DVB_APPS_LICENSE        = unknown (probably public domain)
 
 ifeq ($(BR2_PACKAGE_DVB_APPS_UTILS),y)
 # Utilitiess are selected, build and install everything
+
+ifeq ($(BR2_ENABLE_LOCALE),)
+DVB_APPS_DEPENDENCIES    = libiconv
+DVB_APPS_LDFLAGS         = $(TARGET_LDFLAGS) -liconv
+endif
+
 DVB_APPS_INSTALL_STAGING = YES
 
 define DVB_APPS_BUILD_CMDS
-	$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) V=1
+	$(TARGET_CONFIGURE_OPTS) LDFLAGS="$(DVB_APPS_LDFLAGS)" $(MAKE) -C $(@D) V=1
 endef
 
 define DVB_APPS_INSTALL_STAGING_CMDS