Skip to contentSkip to conversation

package/xscreensaver: fix linking with intl

PATCH Superseded Romain Naour 2 participants 2 messages Aug 25, 2014 – Aug 26, 2014

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/xscreensaver: fix linking with intl

xscreensaver doesn't build with (e)glibc toolchain when gettext package is selected.

With (e)glibc libintl is provided by the libc whereas with uClibc it's provided by gettext.

Linking with intl is only needed if the toolchain needs gettext.

Fixes:
http://autobuild.buildroot.net/results/39b/39b6ad07ad59d87afeca6e427c69f580bed35700/build-end.log

---
V2:
Select gettext package only when the toolchain needs gettext (Thomas Petazzoni) (ie: when BR2_NEEDS_GETTEXT is set)
Build tested with an glibc based toolchain and without gettext package selected. Build tested with an uClibc based toolchain and with gettext package selected.

---
 package/xscreensaver/Config.in       | 1 +
 package/xscreensaver/xscreensaver.mk | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)
package/xscreensaver/Config.in +1 -0
index e2534a6..11c01ae 100644
@@ -10,6 +10,7 @@ config BR2_PACKAGE_XSCREENSAVER
 	select BR2_PACKAGE_JPEG
 	select BR2_PACKAGE_XLIB_LIBX11
 	select BR2_PACKAGE_XLIB_LIBXT
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	help
 	  XScreenSaver is the standard screen saver collection shipped on most
 	  Linux and Unix systems running the X11 Window System.
package/xscreensaver/xscreensaver.mk +3 -2
index 0e84d27..dba15bf 100644
@@ -12,9 +12,10 @@ XSCREENSAVER_LICENSE = MIT-like GPLv2+
 XSCREENSAVER_LICENSE_FILES = hacks/screenhack.h hacks/glx/chessmodels.h
 
 XSCREENSAVER_DEPENDENCIES = jpeg libglade libgtk2 xlib_libX11 xlib_libXt \
-	$(if $(BR2_PACKAGE_GETTEXT),gettext)
+	$(if $(BR2_NEEDS_GETTEXT),gettext)
 
-XSCREENSAVER_CONF_ENV = $(if $(BR2_PACKAGE_GETTEXT),LIBS=-lintl)
+# Linking with intl is only needed when the toolchain needs gettext
+XSCREENSAVER_CONF_ENV = $(if $(BR2_NEEDS_GETTEXT),LIBS=-lintl)
 
 # otherwise we end up with host include/library dirs passed to the
 # compiler/linker
Signature · 1 line
1.9.3
#1 lore raw

PATCH v2 1/1 package/xscreensaver: fix linking with intl

Dear Romain Naour,

package/xscreensaver/Config.in config BR2_PACKAGE_XSCREENSAVER · line 13

Quoted 1 line · Romain Naour
package/xscreensaver/Config.in +1 -0
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT

Have you verified if it's really BR2_NEEDS_GETTEXT or BR2_NEEDS_GETTEXT_IF_LOCALE that should be used?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com