From f49f52cea4d37fc8a0cd030167de4482cc4b09b8 Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Sat, 12 Jan 2013 22:41:29 +0100 Subject: Host tools: New package: replace pkg-config with pkgconf Signed-off-by: Abdoulaye Walsimou Gaye --- kconfig/pkgconf.kconfig | 48 ++++++++++++++++++++++++++++++++ kconfig/pkgconfig.kconfig | 48 -------------------------------- kconfig/toolchain.kconfig | 4 +-- mk/buildsystem.mk | 1 + mk/packages.mk | 4 +-- mk/pkgconf.mk | 70 +++++++++++++++++++++++++++++++++++++++++++++++ mk/pkgconfig.mk | 57 -------------------------------------- 7 files changed, 123 insertions(+), 109 deletions(-) create mode 100644 kconfig/pkgconf.kconfig delete mode 100644 kconfig/pkgconfig.kconfig create mode 100644 mk/pkgconf.mk delete mode 100644 mk/pkgconfig.mk diff --git a/kconfig/pkgconf.kconfig b/kconfig/pkgconf.kconfig new file mode 100644 index 0000000..4fb6306 --- /dev/null +++ b/kconfig/pkgconf.kconfig @@ -0,0 +1,48 @@ +################################################################################ +# Embtoolkit +# Copyright(C) 2011-2012 Abdoulaye Walsimou GAYE +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################ +# +# \file pkgconf.kconfig +# \brief pkgconf.kconfig of Embtoolkit. +# \author Abdoulaye Walsimou GAYE +# \date January 2011 +################################################################################ + +config EMBTK_HAVE_PKGCONF + bool + default y + select EMBTK_PKGCONF_NEED_AUTORECONF + help + pkgconf for host tools. + +config EMBTK_PKGCONF_VERSION_STRING + string + default "0.8.9" + +config EMBTK_PKGCONF_VERSION_GIT + bool + +config EMBTK_PKGCONF_GIT_SITE + string + default "git://github.com/pkgconf/pkgconf.git" + depends on EMBTK_PKGCONF_VERSION_GIT + +config EMBTK_PKGCONF_NEED_PATCH + bool +config EMBTK_PKGCONF_NEED_AUTORECONF + bool diff --git a/kconfig/pkgconfig.kconfig b/kconfig/pkgconfig.kconfig deleted file mode 100644 index 60383db..0000000 --- a/kconfig/pkgconfig.kconfig +++ /dev/null @@ -1,48 +0,0 @@ -################################################################################ -# Embtoolkit -# Copyright(C) 2011-2012 Abdoulaye Walsimou GAYE -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -################################################################################ -# -# \file pkgconfig.kconfig -# \brief pkgconfig.kconfig of Embtoolkit. -# \author Abdoulaye Walsimou GAYE -# \date January 2011 -################################################################################ - -config EMBTK_HAVE_PKGCONFIG - bool - default y - help - pkgconfig for host tools. - -config EMBTK_PKGCONFIG_VERSION_STRING - string - default "0.25" - -config EMBTK_PKGCONFIG_VERSION_GIT - bool - -config EMBTK_PKGCONFIG_GIT_SITE - string - default "git://anongit.freedesktop.org/pkg-config" - depends on EMBTK_PKGCONFIG_VERSION_GIT - -config EMBTK_PKGCONFIG_NEED_PATCH - bool -config EMBTK_PKGCONFIG_NEED_AUTORECONF - bool - default y if EMBTK_PKGCONFIG_VERSION_GIT diff --git a/kconfig/toolchain.kconfig b/kconfig/toolchain.kconfig index 49469d2..911eb79 100644 --- a/kconfig/toolchain.kconfig +++ b/kconfig/toolchain.kconfig @@ -167,9 +167,9 @@ source kconfig/autoconf.kconfig source kconfig/automake.kconfig # -# pkg-config +# pkgconf # -source kconfig/pkgconfig.kconfig +source kconfig/pkgconf.kconfig # # fakeroot diff --git a/mk/buildsystem.mk b/mk/buildsystem.mk index f1ef0ca..50bc526 100644 --- a/mk/buildsystem.mk +++ b/mk/buildsystem.mk @@ -48,6 +48,7 @@ embtk_dldir := $(or $(__embtk_dldir),$(EMBTK_ROOT)/dl) define __embtk_kconfig_buildrun + PKG_CONFIG_PATH=$(EMBTK_HOST_PKG_CONFIG_PATH) \ $(MAKE) -f scripts/Makefile.build \ obj=$(EMBTK_ROOT)/scripts/kconfig \ EMBTK_DEFAULT_DL="$(EMBTK_ROOT)/dl/" \ diff --git a/mk/packages.mk b/mk/packages.mk index 97cd8db..56248cd 100644 --- a/mk/packages.mk +++ b/mk/packages.mk @@ -24,7 +24,7 @@ ################################################################################ ROOTFS_COMPONENTS-y := -HOSTTOOLS_COMPONENTS-y := mkimage_install pkgconfig_install +HOSTTOOLS_COMPONENTS-y := mkimage_install pkgconf_install # # Common include for target and host # @@ -44,7 +44,7 @@ HOSTTOOLS_COMPONENTS-$(CONFIG_EMBTK_HOST_HAVE_LIBELF) += libelf_host_install include mk/makedevs.mk include mk/mkimage.mk include mk/mtd-utils.mk -include mk/pkgconfig.mk +include mk/pkgconf.mk include mk/squashfs.mk # zlib_host diff --git a/mk/pkgconf.mk b/mk/pkgconf.mk new file mode 100644 index 0000000..cdbee38 --- /dev/null +++ b/mk/pkgconf.mk @@ -0,0 +1,70 @@ +################################################################################ +# Copyright(C) 2013 Abdoulaye Walsimou GAYE +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################ +# +# \file pkgconf.mk +# \brief pkgconf.mk of Embtoolkit +# \author Abdoulaye Walsimou GAYE +# \date January 2013 +################################################################################ + +PKGCONF_NAME := pkgconf +PKGCONF_VERSION := $(call embtk_get_pkgversion,pkgconf) +PKGCONF_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/packages-mirror +PKGCONF_PACKAGE := pkgconf-$(PKGCONF_VERSION).tar.gz +PKGCONF_SRC_DIR := $(embtk_toolsb)/pkgconf-$(PKGCONF_VERSION) +PKGCONF_BUILD_DIR := $(embtk_toolsb)/pkgconf-$(PKGCONF_VERSION) + +PKGCONFIG_BIN := $(embtk_htools)/usr/bin/pkg-config +export PKGCONFIG_BIN + +# +# PKG_CONFIG_PATH for target packages +# +__EMBTK_PKG_CONFIG_PATH := $(embtk_sysroot)/usr/$(LIBDIR)/pkgconfig +__EMBTK_PKG_CONFIG_PATH += $(embtk_sysroot)/usr/share/pkgconfig +EMBTK_PKG_CONFIG_PATH := $(subst $(embtk_space),:,$(__EMBTK_PKG_CONFIG_PATH)) +EMBTK_PKG_CONFIG_LIBDIR := $(EMBTK_PKG_CONFIG_PATH) + +export PKGCONFIG_BIN EMBTK_PKG_CONFIG_PATH + +# +# PKG_CONFIG_PATH for host packages +# +__EMBTK_HOST_PKG_CONFIG_PATH := $(embtk_htools)/usr/lib/pkgconfig/ +__EMBTK_HOST_PKG_CONFIG_PATH += /usr/lib/pkgconfig/ /usr/share/pkgconfig/ +__EMBTK_HOST_PKG_CONFIG_PATH += /usr/local/lib/pkgconfig/ /usr/local/share/pkgconfig/ +__EMBTK_HOST_PKG_CONFIG_PATH += $(dir $(shell find /usr/lib -type f -name '*.pc')) +__EMBTK_HOST_PKG_CONFIG_PATH += $(dir $(shell find /usr/local/lib -type f -name '*.pc')) +EMBTK_HOST_PKG_CONFIG_PATH := $(subst $(embtk_space),:,$(sort $(__EMBTK_HOST_PKG_CONFIG_PATH))) + +export EMBTK_HOST_PKG_CONFIG_PATH + +# +# pkgconf install +# +PKGCONF_PREFIX := /usr +PKGCONF_DESTDIR := $(embtk_htools) + +define embtk_install_pkgconf + $(call __embtk_install_hostpkg,pkgconf) +endef + +define embtk_postinstall_pkgconf + [ -e $(call __embtk_pkg_dotinstalled_f,pkgcong) ] || \ + cd $(embtk_htools)/usr/bin/; ln -sf pkgconf pkg-config +endef diff --git a/mk/pkgconfig.mk b/mk/pkgconfig.mk deleted file mode 100644 index c012170..0000000 --- a/mk/pkgconfig.mk +++ /dev/null @@ -1,57 +0,0 @@ -################################################################################ -# Copyright(C) 2009-2012 Abdoulaye Walsimou GAYE -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -################################################################################ -# -# \file pkgconfig.mk -# \brief pkgconfig.mk of Embtoolkit -# \author Abdoulaye Walsimou GAYE -# \date October 2009 -################################################################################ - -PKGCONFIG_NAME := pkg-config -PKGCONFIG_VERSION := $(call embtk_get_pkgversion,pkgconfig) -PKGCONFIG_SITE := http://pkgconfig.freedesktop.org/releases -PKGCONFIG_PACKAGE := pkg-config-$(PKGCONFIG_VERSION).tar.gz -PKGCONFIG_SRC_DIR := $(embtk_toolsb)/pkg-config-$(PKGCONFIG_VERSION) -PKGCONFIG_BUILD_DIR := $(embtk_toolsb)/pkg-config-$(PKGCONFIG_VERSION) - -PKGCONFIG_BIN := $(embtk_htools)/usr/bin/pkg-config - -__EMBTK_PKG_CONFIG_PATH := $(embtk_sysroot)/usr/$(LIBDIR)/pkgconfig -__EMBTK_PKG_CONFIG_PATH += $(embtk_sysroot)/usr/share/pkgconfig -EMBTK_PKG_CONFIG_PATH := $(subst $(embtk_space),:,$(__EMBTK_PKG_CONFIG_PATH)) -EMBTK_PKG_CONFIG_LIBDIR := $(EMBTK_PKG_CONFIG_PATH) - -__EMBTK_HOST_PKG_CONFIG_PATH := $(embtk_htools)/usr/lib/pkgconfig/ -__EMBTK_HOST_PKG_CONFIG_PATH += /usr/lib/pkgconfig/ /usr/share/pkgconfig/ -__EMBTK_HOST_PKG_CONFIG_PATH += /usr/local/lib/pkgconfig/ /usr/local/share/pkgconfig/ -__EMBTK_HOST_PKG_CONFIG_PATH += $(dir $(shell find /usr/lib -type f -name '*.pc')) -__EMBTK_HOST_PKG_CONFIG_PATH += $(dir $(shell find /usr/local/lib -type f -name '*.pc')) -EMBTK_HOST_PKG_CONFIG_PATH := $(subst $(embtk_space),:,$(sort $(__EMBTK_HOST_PKG_CONFIG_PATH))) - -PKGCONFIG_CONFIGURE_OPTS := --with-pc-path="$(EMBTK_HOST_PKG_CONFIG_PATH)" -PKGCONFIG_CONFIGURE_OPTS += --with-internal-glib - -export PKGCONFIG_BIN EMBTK_PKG_CONFIG_PATH EMBTK_PKG_CONFIG_LIBDIR -export EMBTK_HOST_PKG_CONFIG_PATH - -PKGCONFIG_PREFIX := /usr -PKGCONFIG_DESTDIR := $(embtk_htools) - -define embtk_install_pkgconfig - $(call __embtk_install_hostpkg,pkgconfig) -endef -- cgit v1.2.3