[Buildroot] [PATCH 2/5] package/ncurses: fix shared-only libs

Samuel Martin s.martin49 at gmail.com
Sun Dec 14 16:49:20 UTC 2014


Yann,

On Sun, Dec 14, 2014 at 5:04 PM, Yann E. MORIN <yann.morin.1998 at free.fr> wrote:
> For a shared-only build, do not create the symlinks to the static
> libraries, sonce they do not exist.

s/sonce/since/

>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
> ---
>  package/ncurses/ncurses.mk | 20 +++++++++-----------
>  1 file changed, 9 insertions(+), 11 deletions(-)
>
> diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk
> index f54f379..ec64663 100644
> --- a/package/ncurses/ncurses.mk
> +++ b/package/ncurses/ncurses.mk
> @@ -47,8 +47,7 @@ ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
>  NCURSES_CONF_OPTS += --enable-widec
>  NCURSES_LIB_SUFFIX = w
>
> -ifeq ($(BR2_STATIC_LIBS),y)
> -define NCURSES_LINK_LIBS
> +define NCURSES_LINK_LIBS_STATIC
>         for lib in $(NCURSES_LIBS-y); do \
>                 ln -sf $${lib}$(NCURSES_LIB_SUFFIX).a \
>                         $(1)/usr/lib/$${lib}.a; \
> @@ -56,23 +55,22 @@ define NCURSES_LINK_LIBS
>         ln -sf libncurses$(NCURSES_LIB_SUFFIX).a \
>                 $(1)/usr/lib/libcurses.a
>  endef
> -else
> -define NCURSES_LINK_LIBS
> +
> +define NCURSES_LINK_LIBS_SHARED
>         for lib in $(NCURSES_LIBS-y); do \
> -               ln -sf $${lib}$(NCURSES_LIB_SUFFIX).a \
> -                       $(1)/usr/lib/$${lib}.a; \
>                 ln -sf $${lib}$(NCURSES_LIB_SUFFIX).so \
>                         $(1)/usr/lib/$${lib}.so; \
>         done
> -       ln -sf libncurses$(NCURSES_LIB_SUFFIX).a \
> -               $(1)/usr/lib/libcurses.a
>         ln -sf libncurses$(NCURSES_LIB_SUFFIX).so \
>                 $(1)/usr/lib/libcurses.so
>  endef
> -endif
>
> -NCURSES_LINK_TARGET_LIBS = $(call NCURSES_LINK_LIBS, $(TARGET_DIR))
> -NCURSES_LINK_STAGING_LIBS = $(call NCURSES_LINK_LIBS, $(STAGING_DIR))
> +NCURSES_LINK_TARGET_LIBS = \
> +       $(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_STATIC,$(TARGET_DIR))) \
> +       $(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_SHARED,$(TARGET_DIR)))
> +NCURSES_LINK_STAGING_LIBS = \
> +       $(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_STATIC,$(STAGING_DIR))) \
> +       $(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_SHARED,$(STAGING_DIR)))
>
>  NCURSES_POST_INSTALL_STAGING_HOOKS += NCURSES_LINK_STAGING_LIBS
>
> --
> 1.9.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

Otherwise:
Reviewed-by: Samuel Martin <s.martin49 at gmail.com>

-- 
Samuel



More information about the buildroot mailing list