[Buildroot] [PATCH] "libdir" variable is not set correctly in (generated) $(STAGING_DIR)/usr/lib/libSDL.la

julien.boibessot at free.fr julien.boibessot at free.fr
Wed Jan 27 14:54:30 UTC 2010

From: Julien Boibessot <julien.boibessot at armadeus.com>

"libdir" is set to "/xxx/output/build/staging_dir/usr/xxx/output/build/staging_dir/usr/lib"
instead of "/xxx/output/build/staging_dir/usr/lib". This prevents other apps to link against SDL.
This patch try to correct/workaround that (is it the best way to do it ?).

Signed-off-by: Julien Boibessot <julien.boibessot at armadeus.com>
 package/sdl/sdl.mk |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/package/sdl/sdl.mk b/package/sdl/sdl.mk
index 959be7e..60eccaa 100644
--- a/package/sdl/sdl.mk
+++ b/package/sdl/sdl.mk
@@ -97,6 +97,9 @@ $(STAGING_DIR)/usr/lib/libSDL.so: $(SDL_DIR)/.compiled
 # use correct rpath for linking
 	$(SED) 's^libdir=\$${exec_prefix}^libdir=/usr^' \
+# set correct libdir path in libSDL.la
+	$(SED) "s^libdir='$(STAGING_DIR)/usr^libdir='^" \
+		$(STAGING_DIR)/usr/lib/libSDL.la
 	touch -c $@
 $(TARGET_DIR)/usr/lib/libSDL.so: $(STAGING_DIR)/usr/lib/libSDL.so

More information about the buildroot mailing list