package/pkgconf: bump to version 2.3.0

Rebase only prefix subset of variables patch.

Drop revert main assume modversion patch which is now upstream.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
James Hilliard
2024-10-30 13:00:17 -06:00
committed by Thomas Petazzoni
parent b1ce2522b4
commit a3b2bc8e16
5 changed files with 42 additions and 86 deletions

View File

@@ -1023,7 +1023,6 @@ package/pistache/0001-src-common-transport.cc-fallback-value-for-RUSAGE_TH.patch
package/pistache/0002-src-server-listener.cc-fix-libressl-build.patch lib_patch.Upstream package/pistache/0002-src-server-listener.cc-fix-libressl-build.patch lib_patch.Upstream
package/pixman/0001-Disable-tests.patch lib_patch.Upstream package/pixman/0001-Disable-tests.patch lib_patch.Upstream
package/pkgconf/0001-Only-prefix-with-the-sysroot-a-subset-of-variables.patch lib_patch.Upstream package/pkgconf/0001-Only-prefix-with-the-sysroot-a-subset-of-variables.patch lib_patch.Upstream
package/pkgconf/0002-Revert-main-assume-modversion-insted-of-version-if-o.patch lib_patch.Upstream
package/pkgconf/pkg-config.in Shellcheck package/pkgconf/pkg-config.in Shellcheck
package/poke/0001-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch lib_patch.Upstream package/poke/0001-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch lib_patch.Upstream
package/policycoreutils/0001-Add-DESTDIR-to-all-paths-that-use-an-absolute-path.patch lib_patch.Upstream package/policycoreutils/0001-Add-DESTDIR-to-all-paths-that-use-an-absolute-path.patch lib_patch.Upstream

View File

@@ -1,4 +1,4 @@
From 267a57022699453e8d8f517519df25ac6bf6ac4e Mon Sep 17 00:00:00 2001 From c1f9e60f46f2207f9dd07dd290ad5a2da05ad41d Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Sun, 16 Dec 2018 11:52:18 +0100 Date: Sun, 16 Dec 2018 11:52:18 +0100
Subject: [PATCH] Only prefix with the sysroot a subset of variables Subject: [PATCH] Only prefix with the sysroot a subset of variables
@@ -23,19 +23,19 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[Updated to include gobject-introspection paths] [Updated to include gobject-introspection paths]
Signed-off-by: Adam Duskett <aduskett@gmail.com> Signed-off-by: Adam Duskett <aduskett@gmail.com>
--- ---
libpkgconf/tuple.c | 60 ++++++++++++++++++++++++++++++++-------------- libpkgconf/tuple.c | 65 ++++++++++++++++++++++++++++++++--------------
1 file changed, 42 insertions(+), 18 deletions(-) 1 file changed, 46 insertions(+), 19 deletions(-)
diff --git a/libpkgconf/tuple.c b/libpkgconf/tuple.c diff --git a/libpkgconf/tuple.c b/libpkgconf/tuple.c
index 8523709..7cd2fff 100644 index 83f6a47..a2aa427 100644
--- a/libpkgconf/tuple.c --- a/libpkgconf/tuple.c
+++ b/libpkgconf/tuple.c +++ b/libpkgconf/tuple.c
@@ -161,6 +161,21 @@ dequote(const char *value) @@ -178,6 +178,21 @@ dequote(const char *value)
return buf; return buf;
} }
+static char * +static char *
+pkgconf_tuple_parse_sysroot(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value, bool add_sysroot); +pkgconf_tuple_parse_sysroot(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value, unsigned int flags, bool add_sysroot);
+ +
+const char *sysrooted_keys[] = { +const char *sysrooted_keys[] = {
+ "g_ir_scanner", + "g_ir_scanner",
@@ -49,21 +49,19 @@ index 8523709..7cd2fff 100644
+ NULL, + NULL,
+}; +};
+ +
/* static const char *
* !doc find_sysroot(const pkgconf_client_t *client, pkgconf_list_t *vars)
* {
@@ -181,6 +193,8 @@ pkgconf_tuple_add(const pkgconf_client_t *client, pkgconf_list_t *list, const ch @@ -237,14 +252,20 @@ pkgconf_tuple_add(const pkgconf_client_t *client, pkgconf_list_t *list, const ch
{ {
char *dequote_value; char *dequote_value;
pkgconf_tuple_t *tuple = calloc(sizeof(pkgconf_tuple_t), 1); pkgconf_tuple_t *tuple = calloc(1, sizeof(pkgconf_tuple_t));
+ bool add_sysroot = false; + bool add_sysroot = false;
+ int i; + int i;
pkgconf_tuple_find_delete(list, key); pkgconf_tuple_find_delete(list, key);
@@ -188,9 +202,13 @@ pkgconf_tuple_add(const pkgconf_client_t *client, pkgconf_list_t *list, const ch dequote_value = dequote(value);
PKGCONF_TRACE(client, "adding tuple to @%p: %s => %s (parsed? %d)", list, key, dequote_value, parse);
+ for (i = 0; sysrooted_keys[i] != NULL; i++) + for (i = 0; sysrooted_keys[i] != NULL; i++)
+ if (!strcmp(key, sysrooted_keys[i])) + if (!strcmp(key, sysrooted_keys[i]))
@@ -71,77 +69,81 @@ index 8523709..7cd2fff 100644
+ +
tuple->key = strdup(key); tuple->key = strdup(key);
if (parse) if (parse)
- tuple->value = pkgconf_tuple_parse(client, list, dequote_value); - tuple->value = pkgconf_tuple_parse(client, list, dequote_value, flags);
+ tuple->value = pkgconf_tuple_parse_sysroot(client, list, dequote_value, add_sysroot); + tuple->value = pkgconf_tuple_parse_sysroot(client, list, dequote_value, flags, add_sysroot);
else else
tuple->value = strdup(dequote_value); tuple->value = strdup(dequote_value);
@@ -234,27 +252,14 @@ pkgconf_tuple_find(const pkgconf_client_t *client, pkgconf_list_t *list, const c @@ -294,22 +315,8 @@ pkgconf_tuple_find(const pkgconf_client_t *client, pkgconf_list_t *list, const c
return NULL; return NULL;
} }
-/* -/*
- * !doc - * !doc
- * - *
- * .. c:function:: char *pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value) - * .. c:function:: char *pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value, unsigned int flags)
- * - *
- * Parse an expression for variable substitution. - * Parse an expression for variable substitution.
- * - *
- * :param pkgconf_client_t* client: The pkgconf client object to access. - * :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 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. - * :param char* value: The ``key=value`` string to parse.
- * :param uint flags: Any flags to consider while parsing.
- * :return: the variable data with any variables substituted - * :return: the variable data with any variables substituted
- * :rtype: char * - * :rtype: char *
- */ - */
-char * -char *
-pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value) -pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value, unsigned int flags)
+static char * +static char *
+pkgconf_tuple_parse_sysroot(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value, bool add_sysroot) +pkgconf_tuple_parse_sysroot(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value, unsigned int flags, bool add_sysroot)
{ {
char buf[PKGCONF_BUFSIZE]; char buf[PKGCONF_BUFSIZE];
const char *ptr; const char *ptr;
char *bptr = buf; @@ -318,7 +325,7 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const
if (!(client->flags & PKGCONF_PKG_PKGF_FDO_SYSROOT_RULES) &&
(!(flags & PKGCONF_PKG_PROPF_UNINSTALLED) || (client->flags & PKGCONF_PKG_PKGF_PKGCONF1_SYSROOT_RULES)))
{
- 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);
}
- if (*value == '/' && client->sysroot_dir != NULL && strncmp(value, client->sysroot_dir, strlen(client->sysroot_dir))) @@ -381,7 +388,7 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const
+ 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++)
@@ -294,7 +299,7 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const
if (kv != NULL)
{ {
- parsekv = pkgconf_tuple_parse(client, vars, kv); size_t nlen;
+ parsekv = pkgconf_tuple_parse_sysroot(client, vars, kv, add_sysroot);
strncpy(bptr, parsekv, PKGCONF_BUFSIZE - (bptr - buf)); - parsekv = pkgconf_tuple_parse(client, vars, kv, flags);
bptr += strlen(parsekv); + parsekv = pkgconf_tuple_parse_sysroot(client, vars, kv, flags, add_sysroot);
@@ -339,6 +344,25 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const nlen = pkgconf_strlcpy(bptr, parsekv, remain);
free(parsekv);
@@ -432,6 +439,26 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const
return strdup(buf); return strdup(buf);
} }
+/* +/*
+ * !doc + * !doc
+ * + *
+ * .. c:function:: char *pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value) + * .. c:function:: char *pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value, unsigned int flags)
+ * + *
+ * Parse an expression for variable substitution. + * Parse an expression for variable substitution.
+ * + *
+ * :param pkgconf_client_t* client: The pkgconf client object to access. + * :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 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. + * :param char* value: The ``key=value`` string to parse.
+ * :param uint flags: Any flags to consider while parsing.
+ * :return: the variable data with any variables substituted + * :return: the variable data with any variables substituted
+ * :rtype: char * + * :rtype: char *
+ */ + */
+char * +char *
+pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value) +pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value, unsigned int flags)
+{ +{
+ return pkgconf_tuple_parse_sysroot(client, vars, value, true); + return pkgconf_tuple_parse_sysroot(client, vars, value, flags, true);
+} +}
+ +
/* /*
* !doc * !doc
* *
-- --
2.19.2 2.34.1

View File

@@ -1,45 +0,0 @@
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
@@ -1002,18 +1002,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

@@ -1,3 +1,3 @@
# Locally calculated # Locally calculated
sha256 61f0b31b0d5ea0e862b454a80c170f57bad47879c0c42bd8de89200ff62ea210 pkgconf-1.6.3.tar.xz sha256 3a9080ac51d03615e7c1910a0a2a8df08424892b5f13b0628a204d3fcce0ea8b pkgconf-2.3.0.tar.xz
sha256 07ee94b50a41ee3fc4e13a9b9c60b26fc28488494c465639f7e5f07a3952ec04 COPYING sha256 07ee94b50a41ee3fc4e13a9b9c60b26fc28488494c465639f7e5f07a3952ec04 COPYING

View File

@@ -4,7 +4,7 @@
# #
################################################################################ ################################################################################
PKGCONF_VERSION = 1.6.3 PKGCONF_VERSION = 2.3.0
PKGCONF_SITE = https://distfiles.ariadne.space/pkgconf PKGCONF_SITE = https://distfiles.ariadne.space/pkgconf
PKGCONF_SOURCE = pkgconf-$(PKGCONF_VERSION).tar.xz PKGCONF_SOURCE = pkgconf-$(PKGCONF_VERSION).tar.xz
PKGCONF_LICENSE = pkgconf license PKGCONF_LICENSE = pkgconf license