Bump buildroot to 2019.02

This commit is contained in:
2019-03-28 22:49:48 +01:00
parent 5598b1b762
commit 920d307141
5121 changed files with 78550 additions and 46132 deletions

View File

@@ -1,64 +0,0 @@
From aa6bbc09e68426592faf722630fe92b6ede75bc8 Mon Sep 17 00:00:00 2001
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
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 <gustavo@zacarias.com.ar>
Added pkgdatadir to the list of to-be-prefixed variables.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
main.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/main.c b/main.c
index 6947126..ce5e18f 100644
--- a/main.c
+++ b/main.c
@@ -313,9 +313,13 @@ 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, "pkgdatadir") || \
+ !strcmp(req->variable, "sdkdir")))
+ strlcat(req->buf, sysroot_dir, sizeof(req->buf));
strlcat(req->buf, var, sizeof(req->buf));
return;
}
@@ -323,8 +327,13 @@ 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, "pkgdatadir") || \
+ !strcmp(req->variable, "sdkdir")))
+ strlcat(req->buf, sysroot_dir, sizeof(req->buf));
strlcat(req->buf, var, sizeof(req->buf));
}
--
2.4.10

View File

@@ -0,0 +1,142 @@
From 267a57022699453e8d8f517519df25ac6bf6ac4e Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Sun, 16 Dec 2018 11:52:18 +0100
Subject: [PATCH] Only prefix with the sysroot a subset of variables
The standard logic of pkg-config is to prefix all absolute paths by
the sysroot defined in PKG_CONFIG_SYSROOT_DIR. However, while some
paths (like includedir, libdir, and paths used in -L and -I options)
indeed need to be prefixed by the sysroot, it is not necessarily the
case for paths that are used on the target. If they get prefixed by
the sysroot, the runtime path on the target is incorrect.
Unfortunately, pkg-config doesn't have a sense of which path needs to
be prefixed by the sysroot, and which path should not be prefixed by
the sysroot.
So, let's simply have a whitelist of paths that should be prefixed:
includedir, libdir, mapdir, pkgdatadir and sdkdir. This list of
variables was collected over years of Buildroot development. All other
paths are not prefixed by the sysroot.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
libpkgconf/tuple.c | 60 ++++++++++++++++++++++++++++++++--------------
1 file changed, 42 insertions(+), 18 deletions(-)
diff --git a/libpkgconf/tuple.c b/libpkgconf/tuple.c
index 8523709..7cd2fff 100644
--- a/libpkgconf/tuple.c
+++ b/libpkgconf/tuple.c
@@ -160,6 +160,18 @@ dequote(const char *value)
return buf;
}
+static char *
+pkgconf_tuple_parse_sysroot(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value, bool add_sysroot);
+
+const char *sysrooted_keys[] = {
+ "includedir",
+ "libdir",
+ "mapdir",
+ "pkgdatadir",
+ "sdkdir",
+ NULL,
+};
+
/*
* !doc
*
@@ -180,6 +192,8 @@ pkgconf_tuple_add(const pkgconf_client_t *client, pkgconf_list_t *list, const ch
{
char *dequote_value;
pkgconf_tuple_t *tuple = calloc(sizeof(pkgconf_tuple_t), 1);
+ bool add_sysroot = false;
+ int i;
pkgconf_tuple_find_delete(list, key);
@@ -187,9 +201,13 @@ pkgconf_tuple_add(const pkgconf_client_t *client, pkgconf_list_t *list, const ch
PKGCONF_TRACE(client, "adding tuple to @%p: %s => %s (parsed? %d)", list, key, dequote_value, parse);
+ for (i = 0; sysrooted_keys[i] != NULL; i++)
+ if (!strcmp(key, sysrooted_keys[i]))
+ add_sysroot = true;
+
tuple->key = strdup(key);
if (parse)
- tuple->value = pkgconf_tuple_parse(client, list, dequote_value);
+ tuple->value = pkgconf_tuple_parse_sysroot(client, list, dequote_value, add_sysroot);
else
tuple->value = strdup(dequote_value);
@@ -233,27 +251,14 @@ pkgconf_tuple_find(const pkgconf_client_t *client, pkgconf_list_t *list, const c
return NULL;
}
-/*
- * !doc
- *
- * .. c:function:: char *pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value)
- *
- * Parse an expression for variable substitution.
- *
- * :param pkgconf_client_t* client: The pkgconf client object to access.
- * :param pkgconf_list_t* list: The variable list to search for variables (along side the global variable list).
- * :param char* value: The ``key=value`` string to parse.
- * :return: the variable data with any variables substituted
- * :rtype: char *
- */
-char *
-pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value)
+static char *
+pkgconf_tuple_parse_sysroot(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value, bool add_sysroot)
{
char buf[PKGCONF_BUFSIZE];
const char *ptr;
char *bptr = buf;
- if (*value == '/' && client->sysroot_dir != NULL && strncmp(value, client->sysroot_dir, strlen(client->sysroot_dir)))
+ if (add_sysroot && *value == '/' && client->sysroot_dir != NULL && strncmp(value, client->sysroot_dir, strlen(client->sysroot_dir)))
bptr += pkgconf_strlcpy(buf, client->sysroot_dir, sizeof buf);
for (ptr = value; *ptr != '\0' && bptr - buf < PKGCONF_BUFSIZE; ptr++)
@@ -293,7 +298,7 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const
if (kv != NULL)
{
- parsekv = pkgconf_tuple_parse(client, vars, kv);
+ parsekv = pkgconf_tuple_parse_sysroot(client, vars, kv, add_sysroot);
strncpy(bptr, parsekv, PKGCONF_BUFSIZE - (bptr - buf));
bptr += strlen(parsekv);
@@ -338,6 +343,25 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const
return strdup(buf);
}
+/*
+ * !doc
+ *
+ * .. c:function:: char *pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value)
+ *
+ * Parse an expression for variable substitution.
+ *
+ * :param pkgconf_client_t* client: The pkgconf client object to access.
+ * :param pkgconf_list_t* list: The variable list to search for variables (along side the global variable list).
+ * :param char* value: The ``key=value`` string to parse.
+ * :return: the variable data with any variables substituted
+ * :rtype: char *
+ */
+char *
+pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value)
+{
+ return pkgconf_tuple_parse_sysroot(client, vars, value, true);
+}
+
/*
* !doc
*
--
2.19.2

View File

@@ -0,0 +1,45 @@
From 4ccef40918a539905a2951bfb81cf8dba4a245c6 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Wed, 2 Jan 2019 18:15:50 +0100
Subject: [PATCH] Revert "main: assume --modversion insted of --version if
other flags or module names are provided"
This reverts commit 12a0eb124cea85586e57f33c91a1e4c73459eef6, as it
causes pkg-config to assume --modversion is used when something as
simple as 'pkg-config --static --version' is used, leading to a
failure instead of the expected behavior: the one of "pkg-config
--version".
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
cli/main.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/cli/main.c b/cli/main.c
index b52cc85..c5acc10 100644
--- a/cli/main.c
+++ b/cli/main.c
@@ -955,18 +955,8 @@ main(int argc, char *argv[])
if ((want_flags & PKG_VERSION) == PKG_VERSION)
{
- if (argc > 2)
- {
- fprintf(stderr, "%s: --version specified with other options or module names, assuming --modversion.\n", argv[0]);
-
- want_flags &= ~PKG_VERSION;
- want_flags |= PKG_MODVERSION;
- }
- else
- {
- version();
- return EXIT_SUCCESS;
- }
+ version();
+ return EXIT_SUCCESS;
}
if ((want_flags & PKG_HELP) == PKG_HELP)
--
2.20.1

View File

@@ -7,4 +7,4 @@ config BR2_PACKAGE_PKGCONF
2011 to replace pkg-config, which now needs itself to build
itself
https://github.com/pkgconf/pkgconf
http://pkgconf.org/

View File

@@ -1,2 +1,2 @@
# Locally calculated
sha256 7ec8b516e655e247f4ba976837cee808134785819ab8f538f652fe919cc6c09f pkgconf-0.9.12.tar.bz2
sha256 d3468308553c94389dadfd10c4d1067269052b5364276a9d24a643c88485f715 pkgconf-1.5.3.tar.xz

View File

@@ -4,9 +4,9 @@
#
################################################################################
PKGCONF_VERSION = 0.9.12
PKGCONF_SITE = https://github.com/pkgconf/pkgconf/releases/download/pkgconf-$(PKGCONF_VERSION)
PKGCONF_SOURCE = pkgconf-$(PKGCONF_VERSION).tar.bz2
PKGCONF_VERSION = 1.5.3
PKGCONF_SITE = https://distfiles.dereferenced.org/pkgconf
PKGCONF_SOURCE = pkgconf-$(PKGCONF_VERSION).tar.xz
PKGCONF_LICENSE = pkgconf license
PKGCONF_LICENSE_FILES = COPYING