diff mbox

[1/1] package/minidlna: Fix static compile

Message ID 1437763107-19489-1-git-send-email-bernd.kuhls@t-online.de
State Accepted
Headers show

Commit Message

Bernd Kuhls July 24, 2015, 6:38 p.m. UTC
Fixes
http://autobuild.buildroot.net/results/aeb/aeb5481526497a01ada8ee9403f282a2374b0383/
http://autobuild.buildroot.net/results/255/25536df514477f3210caf4af27f2f107683f7fb2/
http://autobuild.buildroot.net/results/fa1/fa11cb360190b02d08e74997b0abc73079760dfa/
and many others

This is a follow-up for these patches:
http://patchwork.ozlabs.org/patch/493360/
http://patchwork.ozlabs.org/patch/416007/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/minidlna/minidlna.mk |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Yann E. MORIN July 25, 2015, 12:40 p.m. UTC | #1
Bernd, all,

On 2015-07-24 20:38 +0200, Bernd Kuhls spake thusly:
> Fixes
> http://autobuild.buildroot.net/results/aeb/aeb5481526497a01ada8ee9403f282a2374b0383/
> http://autobuild.buildroot.net/results/255/25536df514477f3210caf4af27f2f107683f7fb2/
> http://autobuild.buildroot.net/results/fa1/fa11cb360190b02d08e74997b0abc73079760dfa/
> and many others
> 
> This is a follow-up for these patches:
> http://patchwork.ozlabs.org/patch/493360/
> http://patchwork.ozlabs.org/patch/416007/
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[yann.morin.1998@free.fr: build-tested the first build failre]
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  package/minidlna/minidlna.mk |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/package/minidlna/minidlna.mk b/package/minidlna/minidlna.mk
> index 3a9ad41..e0b5da1 100644
> --- a/package/minidlna/minidlna.mk
> +++ b/package/minidlna/minidlna.mk
> @@ -17,8 +17,10 @@ MINIDLNA_DEPENDENCIES = \
>  ifeq ($(BR2_STATIC_LIBS),y)
>  # the configure script / Makefile forgets to link with some of the dependent
>  # libraries breaking static linking, so help it along
> -MINIDLNA_CONF_ENV = \
> -	LIBS='-lavformat -lavcodec -lavutil -logg -lz -lpthread -lm'
> +MINIDLNA_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs --static libavcodec`
> +MINIDLNA_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs --static libexif`
> +MINIDLNA_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs --static libvorbis`
> +MINIDLNA_CONF_ENV += LIBS="$(MINIDLNA_STATIC_LIBS) $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)"
>  else
>  MINIDLNA_CONF_OPTS = \
>  	--disable-static
> -- 
> 1.7.10.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Thomas Petazzoni July 26, 2015, 1:17 p.m. UTC | #2
Dear Bernd Kuhls,

On Fri, 24 Jul 2015 20:38:27 +0200, Bernd Kuhls wrote:
> Fixes
> http://autobuild.buildroot.net/results/aeb/aeb5481526497a01ada8ee9403f282a2374b0383/
> http://autobuild.buildroot.net/results/255/25536df514477f3210caf4af27f2f107683f7fb2/
> http://autobuild.buildroot.net/results/fa1/fa11cb360190b02d08e74997b0abc73079760dfa/
> and many others
> 
> This is a follow-up for these patches:
> http://patchwork.ozlabs.org/patch/493360/
> http://patchwork.ozlabs.org/patch/416007/
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
>  package/minidlna/minidlna.mk |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Applied after some changes:

    [Thomas:
      - don't pass --static to pkg-config, since our pkg-config wrapper
        already passes it automatically when BR2_STATIC_LIBS=y.
      - make only one call to pkg-config for all three libraries
      - put the libintl logic separately from the definition of
        MINIDLNA_CONF_ENV.]

Thanks!

Thomas
diff mbox

Patch

diff --git a/package/minidlna/minidlna.mk b/package/minidlna/minidlna.mk
index 3a9ad41..e0b5da1 100644
--- a/package/minidlna/minidlna.mk
+++ b/package/minidlna/minidlna.mk
@@ -17,8 +17,10 @@  MINIDLNA_DEPENDENCIES = \
 ifeq ($(BR2_STATIC_LIBS),y)
 # the configure script / Makefile forgets to link with some of the dependent
 # libraries breaking static linking, so help it along
-MINIDLNA_CONF_ENV = \
-	LIBS='-lavformat -lavcodec -lavutil -logg -lz -lpthread -lm'
+MINIDLNA_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs --static libavcodec`
+MINIDLNA_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs --static libexif`
+MINIDLNA_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs --static libvorbis`
+MINIDLNA_CONF_ENV += LIBS="$(MINIDLNA_STATIC_LIBS) $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)"
 else
 MINIDLNA_CONF_OPTS = \
 	--disable-static