Patch sdl-config rpath setting rather than setting exec-prefix and
using DESTDIR as the SDL makefile uses prefix for some files,
and exec-prefix for others leading to double $(STAGING_DIR) prefix.
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR)/usr \
- --exec-prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-pulseaudio=no \
touch $@
$(STAGING_DIR)/usr/lib/libSDL.so: $(SDL_DIR)/.compiled
- $(MAKE) DESTDIR=$(STAGING_DIR) -C $(SDL_DIR) install
-# sdl-config uses -Lexec_prefix/lib instead of -Lprefix/lib - fix it
- $(SED) 's^-L\$${exec_prefix}^-L\$${prefix}^' \
+ $(MAKE) -C $(SDL_DIR) install
+# use correct rpath for linking
+ $(SED) 's^libdir=\$${exec_prefix}^libdir=/usr^' \
$(STAGING_DIR)/usr/bin/sdl-config
touch -c $@