From: <abe...@us...> - 2016-04-29 17:29:58
|
Revision: 7660 http://sourceforge.net/p/astlinux/code/7660 Author: abelbeck Date: 2016-04-29 17:29:56 +0000 (Fri, 29 Apr 2016) Log Message: ----------- build system, use pkgconf for pkg-config HOST-only package. This is what Buildroot now uses. Modified Paths: -------------- branches/1.0/package/pkg-config/Config.in branches/1.0/package/pkg-config/pkg-config.mk Added Paths: ----------- branches/1.0/package/pkg-config/pkg-config-0001-Fix-all-variables-sysroot-prefix-problem.patch branches/1.0/package/pkg-config/pkg-config.in Removed Paths: ------------- branches/1.0/package/pkg-config/pkg-config-0.25-add-with-sysroot.patch branches/1.0/package/pkg-config/pkg-config-0.25-fix-variable.patch Modified: branches/1.0/package/pkg-config/Config.in =================================================================== --- branches/1.0/package/pkg-config/Config.in 2016-04-29 13:58:40 UTC (rev 7659) +++ branches/1.0/package/pkg-config/Config.in 2016-04-29 17:29:56 UTC (rev 7660) @@ -1,14 +1,11 @@ config BR2_PACKAGE_PKG_CONFIG bool "pkg-config" - depends on BR2_USE_WCHAR # glib2 - select BR2_PACKAGE_LIBGLIB2 help - pkg-config is a system for managing library compile/link - flags that works with automake and autoconf. It replaces - the ubiquitous *-config scripts you may have seen with a - single tool. + pkgconf is a program which helps to configure compiler and linker + flags for development frameworks. It is similar to pkg-config, + but was written from scratch in the summer of 2011 to replace + pkg-config, which now needs itself to build itself - http://www.freedesktop.org/software/pkgconfig/ + https://github.com/pkgconf/pkgconf -comment "pkg-config requires a toolchain with WCHAR support" - depends on !BR2_USE_WCHAR + **HOST Only** Deleted: branches/1.0/package/pkg-config/pkg-config-0.25-add-with-sysroot.patch =================================================================== --- branches/1.0/package/pkg-config/pkg-config-0.25-add-with-sysroot.patch 2016-04-29 13:58:40 UTC (rev 7659) +++ branches/1.0/package/pkg-config/pkg-config-0.25-add-with-sysroot.patch 2016-04-29 17:29:56 UTC (rev 7660) @@ -1,78 +0,0 @@ -[PATCH] Add compiled in default sysroot - -Similar to the --with-pc-path option. It works just like the existing -PKG_CONFIG_SYSROOT_DIR environment variable, but compiled in. -The environment variable overrides this default setting if set. - -Signed-off-by: Peter Korsgaard <ja...@su...> ---- - Makefile.am | 6 +++++- - configure.in | 6 ++++++ - main.c | 9 +++++++-- - 3 files changed, 18 insertions(+), 3 deletions(-) - -Index: pkg-config-0.25/Makefile.am -=================================================================== ---- pkg-config-0.25.orig/Makefile.am -+++ pkg-config-0.25/Makefile.am -@@ -28,8 +28,12 @@ EXTRA_DIST = $(m4_DATA) $(man_MANS) READ - bin_PROGRAMS = pkg-config - AM_CFLAGS=@WARN_CFLAGS@ - -+if USE_SYSROOT -+sysroot_includes = -DPKG_CONFIG_SYSROOT="\"$(sysroot)\"" -+endif -+ - INCLUDES=-DPKG_CONFIG_PC_PATH="\"$(pc_path)\"" $(included_glib_includes) \ -- $(popt_includes) -+ $(popt_includes) $(sysroot_includes) - - pkg_config_SOURCES= \ - pkg.h \ -Index: pkg-config-0.25/configure.in -=================================================================== ---- pkg-config-0.25.orig/configure.in -+++ pkg-config-0.25/configure.in -@@ -32,6 +32,12 @@ fi - - PKG_CONFIG_FIND_PC_PATH - -+AC_ARG_WITH(sysroot, -+ [ --with-sysroot Use sysroot <dir> by default ], -+ [ sysroot="$withval" ]) -+ -+AC_SUBST([sysroot]) -+AM_CONDITIONAL(USE_SYSROOT, test "x$sysroot" != "x") - # - # Code taken from gtk+-2.0's configure.in. - # -Index: pkg-config-0.25/main.c -=================================================================== ---- pkg-config-0.25.orig/main.c -+++ pkg-config-0.25/main.c -@@ -36,10 +36,14 @@ - #undef STRICT - #endif - -+#ifndef PKG_CONFIG_SYSROOT -+#define PKG_CONFIG_SYSROOT NULL -+#endif -+ - static int want_debug_spew = 0; - static int want_verbose_errors = 0; - static int want_stdout_errors = 0; --char *pcsysrootdir = NULL; -+char *pcsysrootdir = PKG_CONFIG_SYSROOT; - - void - debug_spew (const char *format, ...) -@@ -311,7 +315,8 @@ main (int argc, char **argv) - add_search_dirs(PKG_CONFIG_PC_PATH, G_SEARCHPATH_SEPARATOR_S); - } - -- pcsysrootdir = getenv ("PKG_CONFIG_SYSROOT_DIR"); -+ if (getenv ("PKG_CONFIG_SYSROOT_DIR")) -+ pcsysrootdir = getenv ("PKG_CONFIG_SYSROOT_DIR"); - if (pcsysrootdir) - { - define_global_variable ("pc_sysrootdir", pcsysrootdir); Deleted: branches/1.0/package/pkg-config/pkg-config-0.25-fix-variable.patch =================================================================== --- branches/1.0/package/pkg-config/pkg-config-0.25-fix-variable.patch 2016-04-29 13:58:40 UTC (rev 7659) +++ branches/1.0/package/pkg-config/pkg-config-0.25-fix-variable.patch 2016-04-29 17:29:56 UTC (rev 7660) @@ -1,30 +0,0 @@ -[PATCH] prefix sysroot to include/libdir path variables - -Prefix includedir / libdir variable values with sysroot if a variable is -requested (--variable=<name>), similar to how it's done for -I / -L flags. - -This is sometimes used to find header files (E.G. in gst-plugins configure), -so ensure the sysroot'ed files are used. - -Signed-off-by: Peter Korsgaard <ja...@su...> ---- - main.c | 6 +++++ - 1 file changed, 6 insertions(+) - -Index: pkg-config-0.25/main.c -=================================================================== ---- pkg-config-0.25.orig/main.c -+++ pkg-config-0.25/main.c -@@ -700,6 +700,12 @@ - if (variable_name) - { - char *str = packages_get_var (packages, variable_name); -+ /* include/lib variable? */ -+ if (pcsysrootdir && -+ (!strcmp(variable_name, "includedir") || -+ !strcmp(variable_name, "mapdir") || -+ !strcmp(variable_name, "libdir"))) -+ printf ("%s/", pcsysrootdir); - printf ("%s", str); - g_free (str); - need_newline = TRUE; Added: branches/1.0/package/pkg-config/pkg-config-0001-Fix-all-variables-sysroot-prefix-problem.patch =================================================================== --- branches/1.0/package/pkg-config/pkg-config-0001-Fix-all-variables-sysroot-prefix-problem.patch (rev 0) +++ branches/1.0/package/pkg-config/pkg-config-0001-Fix-all-variables-sysroot-prefix-problem.patch 2016-04-29 17:29:56 UTC (rev 7660) @@ -0,0 +1,57 @@ +From abc7a780f2a52a1aa3ee288e17140b817b545cc3 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias <gu...@za...> +Date: Mon, 2 Nov 2015 18:38:00 -0300 +Subject: [PATCH] Fix all-variables sysroot prefix problem + +According to the pkg-config specifications (or rather documentation) +only the -L/-I directory entries should be sysroot-prefixed. + +We also need to prefix the mapdir/sdkdir variables since they're used by +xorg and expected that way. + +Also allow prefixing for includedir and libdir since in some silly cases +the directories may be requested barebones via pkg-config +--variable=includedir libfool for example. + +Signed-off-by: Gustavo Zacarias <gu...@za...> +--- + main.c | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/main.c b/main.c +index 6947126..52d16c2 100644 +--- a/main.c ++++ b/main.c +@@ -313,9 +313,12 @@ print_variable(pkg_t *pkg, void *data, unsigned int flags) + memset(req->buf, 0, sizeof(req->buf)); + + if (*var == '/' && (flags & PKGF_MUNGE_SYSROOT_PREFIX) && +- (sysroot_dir != NULL && strncmp(var, sysroot_dir, strlen(sysroot_dir)))) +- strlcat(req->buf, sysroot_dir, sizeof(req->buf)); +- ++ (sysroot_dir != NULL && strncmp(var, sysroot_dir, strlen(sysroot_dir))) && ++ (!strcmp(req->variable, "includedir") || \ ++ !strcmp(req->variable, "libdir") || \ ++ !strcmp(req->variable, "mapdir") || \ ++ !strcmp(req->variable, "sdkdir"))) ++ strlcat(req->buf, sysroot_dir, sizeof(req->buf)); + strlcat(req->buf, var, sizeof(req->buf)); + return; + } +@@ -323,8 +326,12 @@ print_variable(pkg_t *pkg, void *data, unsigned int flags) + strlcat(req->buf, " ", sizeof(req->buf)); + + if (*var == '/' && (flags & PKGF_MUNGE_SYSROOT_PREFIX) && +- (sysroot_dir != NULL && strncmp(var, sysroot_dir, strlen(sysroot_dir)))) +- strlcat(req->buf, sysroot_dir, sizeof(req->buf)); ++ (sysroot_dir != NULL && strncmp(var, sysroot_dir, strlen(sysroot_dir))) && ++ (!strcmp(req->variable, "includedir") || \ ++ !strcmp(req->variable, "libdir") || \ ++ !strcmp(req->variable, "mapdir") || \ ++ !strcmp(req->variable, "sdkdir"))) ++ strlcat(req->buf, sysroot_dir, sizeof(req->buf)); + + strlcat(req->buf, var, sizeof(req->buf)); + } +-- +2.4.10 Added: branches/1.0/package/pkg-config/pkg-config.in =================================================================== --- branches/1.0/package/pkg-config/pkg-config.in (rev 0) +++ branches/1.0/package/pkg-config/pkg-config.in 2016-04-29 17:29:56 UTC (rev 7660) @@ -0,0 +1,2 @@ +#!/bin/sh +PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-@PKG_CONFIG_LIBDIR@} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:-@STAGING_DIR@} $(dirname $0)/pkgconf @STATIC@ $@ Modified: branches/1.0/package/pkg-config/pkg-config.mk =================================================================== --- branches/1.0/package/pkg-config/pkg-config.mk 2016-04-29 13:58:40 UTC (rev 7659) +++ branches/1.0/package/pkg-config/pkg-config.mk 2016-04-29 17:29:56 UTC (rev 7660) @@ -1,24 +1,37 @@ ############################################################# # -# pkgconfig +# pkg-config # ############################################################# -PKG_CONFIG_VERSION = 0.25 -PKG_CONFIG_SOURCE = pkg-config-$(PKG_CONFIG_VERSION).tar.gz -PKG_CONFIG_SITE = http://pkgconfig.freedesktop.org/releases/ -PKG_CONFIG_DEPENDENCIES = libglib2 +PKG_CONFIG_VERSION = 0.9.12 +PKG_CONFIG_SOURCE = pkgconf-$(PKG_CONFIG_VERSION).tar.bz2 +PKG_CONFIG_SITE = https://github.com/pkgconf/pkgconf/releases/download/pkgconf-$(PKG_CONFIG_VERSION) -PKG_CONFIG_CONF_OPT = --with-installed-glib +define HOST_PKG_CONFIG_INSTALL_WRAPPER + $(INSTALL) -m 0755 -D package/pkg-config/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 -HOST_PKG_CONFIG_CONF_OPT = \ - --with-pc-path="$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig" \ - --with-sysroot="$(STAGING_DIR)" \ - --disable-static +define HOST_PKG_CONFIG_STATIC + $(SED) 's,@STATIC@,--static,' $(HOST_DIR)/usr/bin/pkg-config +endef -HOST_PKG_CONFIG_AUTORECONF = YES +define HOST_PKG_CONFIG_SHARED + $(SED) 's,@STATIC@,,' $(HOST_DIR)/usr/bin/pkg-config +endef -$(eval $(call AUTOTARGETS,package,pkg-config)) +HOST_PKG_CONFIG_POST_INSTALL_HOOKS += HOST_PKG_CONFIG_INSTALL_WRAPPER + +ifeq ($(BR2_PREFER_STATIC_LIB),y) +HOST_PKG_CONFIG_POST_INSTALL_HOOKS += HOST_PKG_CONFIG_STATIC +else +HOST_PKG_CONFIG_POST_INSTALL_HOOKS += HOST_PKG_CONFIG_SHARED +endif + $(eval $(call AUTOTARGETS,package,pkg-config,host)) -PKG_CONFIG_HOST_BINARY:=$(HOST_DIR)/usr/bin/pkg-config +PKG_CONFIG_HOST_BINARY = $(HOST_DIR)/usr/bin/pkg-config This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |