Skip to contentSkip to conversation

madplay: fixes build when toolchain has locale support

PATCH New julien.boibessot at free.fr 2 participants 2 messages Feb 10, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 madplay: fixes build when toolchain has locale support

From: Julien Boibessot <[email protected]>

Otherwise build fails in intl/relocatable.c with:
./relocatable.c: In function 'libintl_relocate':
./relocatable.c:402:40: error: 'INSTALLPREFIX' undeclared (first use in this function) ./relocatable.c:402:40: note: each undeclared identifier is reported only once for each function it appears in

---
 package/madplay/Config.in  |    1 +
 package/madplay/madplay.mk |    6 ++++++
 2 files changed, 7 insertions(+), 0 deletions(-)
package/madplay/Config.in +1 -0
index 3baeaa0..d83fac6 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_MADPLAY
 	bool "madplay"
 	select BR2_PACKAGE_LIBMAD
 	select BR2_PACKAGE_LIBID3TAG
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Command-line front-end to libmad, a high-quality MPEG audio decoder.
 	  It currently supports MPEG-1 and the MPEG-2 extension to lower
package/madplay/madplay.mk +6 -0
index 35aa651..79d57de 100644
@@ -11,6 +11,12 @@ MADPLAY_LICENSE_FILES = COPYING COPYRIGHT
 MADPLAY_LIBTOOL_PATCH = NO
 MADPLAY_DEPENDENCIES = libmad libid3tag
 
+ifeq ($(BR2_PACKAGE_GETTEXT),y)
+MADPLAY_DEPENDENCIES += gettext
+else
+MADPLAY_CONF_OPT += --disable-nls
+endif
+
 # Check if ALSA is built, then we should configure after alsa-lib so
 # ./configure can find alsa-lib.
 ifeq ($(BR2_PACKAGE_MADPLAY_ALSA),y)
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 madplay: fixes build when toolchain has locale support

Quoted 31 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"julien" == julien boibessot <[email protected]> writes:

From: Julien Boibessot <[email protected]>
Otherwise build fails in intl/relocatable.c with:
./relocatable.c: In function 'libintl_relocate':
./relocatable.c:402:40: error: 'INSTALLPREFIX' undeclared (first use in this function) ./relocatable.c:402:40: note: each undeclared identifier is reported only once for each function it appears in

---
 package/madplay/Config.in  |    1 +
 package/madplay/madplay.mk |    6 ++++++
 2 files changed, 7 insertions(+), 0 deletions(-)
package/madplay/Config.in +1 -0
index 3baeaa0..d83fac6 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_MADPLAY
 	bool "madplay"
 	select BR2_PACKAGE_LIBMAD
 	select BR2_PACKAGE_LIBID3TAG
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	  Command-line front-end to libmad, a high-quality MPEG audio decoder.
 	  It currently supports MPEG-1 and the MPEG-2 extension to lower
package/madplay/madplay.mk +0 -0
index 35aa651..79d57de 100644

package/madplay/madplay.mk MADPLAY_LICENSE_FILES = COPYING COPYRIGHT · line 18

Quoted 8 lines
package/madplay/madplay.mk +5 -0
@@ -11,6 +11,12 @@ MADPLAY_LICENSE_FILES = COPYING COPYRIGHT
 MADPLAY_LIBTOOL_PATCH = NO
 MADPLAY_DEPENDENCIES = libmad libid3tag
 
+ifeq ($(BR2_PACKAGE_GETTEXT),y)
+MADPLAY_DEPENDENCIES += gettext
+else
+MADPLAY_CONF_OPT += --disable-nls
+endif

The 'else' part is not needed as we already pass --disable-nls in the !locale case, and toolchains with locale support but not defining BR2_NEEDS_GETTEXT_IF_LOCALE (E.G. glibc) support the gettext functionality.

Committed with that fixed, thanks.

Quoted 11 lines
package/madplay/madplay.mk +1 -0
+
 # Check if ALSA is built, then we should configure after alsa-lib so
 # ./configure can find alsa-lib.
 ifeq ($(BR2_PACKAGE_MADPLAY_ALSA),y)
Signature · 6 lines
1.7.5.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 1 line
Bye, Peter Korsgaard