kumquat-buildroot/package/pkgconf/pkgconf.mk
Thomas Petazzoni 665e13c85e Rename BR2_PREFER_STATIC_LIB to BR2_STATIC_LIBS
Since a while, the semantic of BR2_PREFER_STATIC_LIB has been changed
from "prefer static libraries when possible" to "use only static
libraries". The former semantic didn't make much sense, since the user
had absolutely no control/idea of which package would use static
libraries, and which packages would not. Therefore, for quite some
time, we have been starting to enforce that BR2_PREFER_STATIC_LIB
should really build everything with static libraries.

As a consequence, this patch renames BR2_PREFER_STATIC_LIB to
BR2_STATIC_LIBS, and adjust the Config.in option accordingly.

This also helps preparing the addition of other options to select
shared, shared+static or just static.

Note that we have verified that this commit can be reproduced by
simply doing a global rename of BR2_PREFER_STATIC_LIB to
BR2_STATIC_LIBS plus adding BR2_PREFER_STATIC_LIB to Config.in.legacy.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-12-11 22:48:13 +01:00

46 lines
1.3 KiB
Makefile

################################################################################
#
# pkgconf
#
################################################################################
PKGCONF_VERSION = 0.8.9
PKGCONF_SITE = http://rabbit.dereferenced.org/~nenolod/distfiles
PKGCONF_SOURCE = pkgconf-$(PKGCONF_VERSION).tar.bz2
PKGCONF_LICENSE = pkgconf license
PKGCONF_LICENSE_FILES = COPYING
PKG_CONFIG_HOST_BINARY = $(HOST_DIR)/usr/bin/pkg-config
define PKGCONF_LINK_PKGCONFIG
ln -sf pkgconf $(TARGET_DIR)/usr/bin/pkg-config
endef
define HOST_PKGCONF_INSTALL_WRAPPER
$(INSTALL) -m 0755 -D package/pkgconf/pkg-config.in \
$(HOST_DIR)/usr/bin/pkg-config
$(SED) 's,@PKG_CONFIG_LIBDIR@,$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig,' \
-e 's,@STAGING_DIR@,$(STAGING_DIR),' \
$(HOST_DIR)/usr/bin/pkg-config
endef
define HOST_PKGCONF_STATIC
$(SED) 's,@STATIC@,--static,' $(HOST_DIR)/usr/bin/pkg-config
endef
define HOST_PKGCONF_SHARED
$(SED) 's,@STATIC@,,' $(HOST_DIR)/usr/bin/pkg-config
endef
PKGCONF_POST_INSTALL_TARGET_HOOKS += PKGCONF_LINK_PKGCONFIG
HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_INSTALL_WRAPPER
ifeq ($(BR2_STATIC_LIBS),y)
HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_STATIC
else
HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_SHARED
endif
$(eval $(autotools-package))
$(eval $(host-autotools-package))