From 35ad1bd3c5c520008e6091b2d2e7fd1f000ee864 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 22 Mar 2021 00:33:29 +0100 Subject: [PATCH] - move more host-autotools-packages to package dir --- make/host-tools.mk | 36 +----------------------------------- package/pkgconf/pkgconf.mk | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 35 deletions(-) create mode 100644 package/pkgconf/pkgconf.mk diff --git a/make/host-tools.mk b/make/host-tools.mk index d53f6cdf..84a61a74 100644 --- a/make/host-tools.mk +++ b/make/host-tools.mk @@ -26,44 +26,10 @@ host-tools: $(BUILD_DIR) $(HOST_DIR) \ # ----------------------------------------------------------------------------- -pkg-config-preqs: - @PATH=$(subst $(HOST_DIR)/bin:$(HOST_DIR)/sbin:,,$(PATH)); \ - if ! pkg-config --exists glib-2.0; then \ - echo "pkg-config and glib2-devel packages are needed for building cross-pkg-config."; false; \ - fi - -# ----------------------------------------------------------------------------- - -HOST_PKG_CONFIG = $(HOST_DIR)/bin/pkg-config - -# ----------------------------------------------------------------------------- - -HOST_PKGCONF_VERSION = 1.7.3 -HOST_PKGCONF_DIR = pkgconf-$(HOST_PKGCONF_VERSION) -HOST_PKGCONF_SOURCE = pkgconf-$(HOST_PKGCONF_VERSION).tar.gz -HOST_PKGCONF_SITE = https://distfiles.dereferenced.org/pkgconf - -$(DL_DIR)/$(HOST_PKGCONF_SOURCE): - $(download) $(HOST_PKGCONF_SITE)/$(HOST_PKGCONF_SOURCE) - -host-pkgconf: $(DL_DIR)/$(HOST_PKGCONF_SOURCE) | $(HOST_DIR) pkg-config-preqs - $(REMOVE)/$(PKG_DIR) - $(UNTAR)/$(PKG_SOURCE) - $(CHDIR)/$(PKG_DIR); \ - $(APPLY_PATCHES); \ - $(HOST_CONFIGURE);\ - $(MAKE); \ - $(MAKE) install - $(INSTALL_EXEC) $(PKG_FILES_DIR)/pkg-config.in $(HOST_PKG_CONFIG) - $(REMOVE)/$(PKG_DIR) - $(TOUCH) - -# ----------------------------------------------------------------------------- - PKG_CONFIG_DEPENDENCIES = host-pkgconf $(PKG_CONFIG): $(PKG_CONFIG_DEPENDENCIES) | $(HOST_DIR) - ln -sf pkg-config $(@) + ln -sf $(HOST_PKG_CONFIG) $(@) # ----------------------------------------------------------------------------- diff --git a/package/pkgconf/pkgconf.mk b/package/pkgconf/pkgconf.mk new file mode 100644 index 00000000..074a465d --- /dev/null +++ b/package/pkgconf/pkgconf.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# pkgconf +# +################################################################################ + +PKGCONF_VERSION = 1.7.3 +PKGCONF_DIR = pkgconf-$(PKGCONF_VERSION) +PKGCONF_SOURCE = pkgconf-$(PKGCONF_VERSION).tar.gz +PKGCONF_SITE = https://distfiles.dereferenced.org/pkgconf + +# ----------------------------------------------------------------------------- + +HOST_PKGCONF_VERSION = $(PKGCONF_VERSION) +HOST_PKGCONF_DIR = $(PKGCONF_DIR) +HOST_PKGCONF_SOURCE = $(PKGCONF_SOURCE) +HOST_PKGCONF_SITE = $(PKGCONF_SITE) + +HOST_PKG_CONFIG = $(HOST_DIR)/bin/pkg-config + +define HOST_PKGCONF_INSTALL_PKG_CONFIG + $(INSTALL_EXEC) $(PKG_FILES_DIR)/pkg-config.in $(HOST_PKG_CONFIG) +endef +HOST_PKGCONF_HOST_FINALIZE_HOOKS += HOST_PKGCONF_INSTALL_PKG_CONFIG + +host-pkgconf: | $(HOST_DIR) + $(call host-autotools-package)