package/rtmpdump: Fix makefile when GnuTLS is used
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sat, 17 Oct 2015 09:45:58 +0000 (11:45 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 17 Oct 2015 14:25:41 +0000 (16:25 +0200)
In librtmp/Makefile the variable CRYPTO defaults to OpenSSL. When
building with GnuTLS support instead, librtmp.pc includes wrong
libraries:

$ grep Req output/staging/usr/lib/pkgconfig/librtmp.pc
Requires: libssl,libcrypto

using this defconfig

BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_PACKAGE_GNUTLS=y
BR2_PACKAGE_RTMPDUMP=y

Pass RTMPDUMP_CRYPTO also to INSTALL_*_CMDS to fix this problem.
Patch supposed by Thomas:
http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/129525

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/rtmpdump/rtmpdump.mk

index 6e0685e57798783bb9b687e9426df384ee1881a0..ad4308c5b6dd2a2d9076e1dc4671a4b2bd712a66 100644 (file)
@@ -32,22 +32,25 @@ else
 RTMPDUMP_SHARED = "SHARED="
 endif
 
+RTMPDUMP_MAKE_FLAGS = \
+       CRYPTO=$(RTMPDUMP_CRYPTO) \
+       prefix=/usr \
+       $(RTMPDUMP_SHARED)
+
 define RTMPDUMP_BUILD_CMDS
-       $(MAKE) CRYPTO=$(RTMPDUMP_CRYPTO) \
-               prefix=/usr \
+       $(MAKE) $(RTMPDUMP_MAKE_FLAGS) \
                XCFLAGS="$(RTMPDUMP_CFLAGS)" \
                XLDFLAGS="$(TARGET_LDFLAGS)" \
                CROSS_COMPILE="$(TARGET_CROSS)" \
-               $(RTMPDUMP_SHARED) \
                -C $(@D)/librtmp
 endef
 
 define RTMPDUMP_INSTALL_STAGING_CMDS
-       $(MAKE) prefix=/usr -C $(@D)/librtmp install DESTDIR=$(STAGING_DIR) $(RTMPDUMP_SHARED)
+       $(MAKE) -C $(@D)/librtmp install DESTDIR=$(STAGING_DIR) $(RTMPDUMP_MAKE_FLAGS)
 endef
 
 define RTMPDUMP_INSTALL_TARGET_CMDS
-       $(MAKE) prefix=/usr -C $(@D)/librtmp install DESTDIR=$(TARGET_DIR) $(RTMPDUMP_SHARED)
+       $(MAKE) -C $(@D)/librtmp install DESTDIR=$(TARGET_DIR) $(RTMPDUMP_MAKE_FLAGS)
 endef
 
 $(eval $(generic-package))