From 82e1a29c70bab2b22b9f5abe1bc5b7e834dc4cc4 Mon Sep 17 00:00:00 2001 From: lars Date: Wed, 17 Mar 2010 23:43:04 +0000 Subject: [PATCH] [packages] Fix linking of libsdl_{mixer,sound} git-svn-id: svn://svn.openwrt.org/openwrt/packages@20257 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- libs/libsdl_mixer/Makefile | 2 ++ libs/libsdl_mixer/patches/001-fix-linking.patch | 17 +++++++++++++++++ libs/libsdl_sound/Makefile | 2 ++ 3 files changed, 21 insertions(+) create mode 100644 libs/libsdl_mixer/patches/001-fix-linking.patch diff --git a/libs/libsdl_mixer/Makefile b/libs/libsdl_mixer/Makefile index 25e13e068..0b6bcd9f9 100644 --- a/libs/libsdl_mixer/Makefile +++ b/libs/libsdl_mixer/Makefile @@ -20,6 +20,8 @@ PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk +TARGET_LDFLAGS += -Wl,-rpath-link,$(STAGING_DIR)/usr/lib + define Package/libsdl-mixer SECTION:=libs CATEGORY:=Libraries diff --git a/libs/libsdl_mixer/patches/001-fix-linking.patch b/libs/libsdl_mixer/patches/001-fix-linking.patch new file mode 100644 index 000000000..a7b1fb1f0 --- /dev/null +++ b/libs/libsdl_mixer/patches/001-fix-linking.patch @@ -0,0 +1,17 @@ +diff --git a/Makefile.in b/Makefile.in +index 76fdd3c..3ab4939 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -75,10 +75,10 @@ $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS) + $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) + + $(objects)/playwave$(EXE): $(objects)/playwave.lo $(objects)/$(TARGET) +- $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET) ++ $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) + + $(objects)/playmus$(EXE): $(objects)/playmus.lo $(objects)/$(TARGET) +- $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET) ++ $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playmus.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) + + install: all install-hdrs install-lib #install-bin + install-hdrs: diff --git a/libs/libsdl_sound/Makefile b/libs/libsdl_sound/Makefile index 52587ae29..836b4fce0 100644 --- a/libs/libsdl_sound/Makefile +++ b/libs/libsdl_sound/Makefile @@ -20,6 +20,8 @@ PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk +TARGET_LDFLAGS += -Wl,-rpath-link,$(STAGING_DIR)/usr/lib + define Package/libsdl-sound SECTION:=libs CATEGORY:=Libraries