Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package pkgconf for openSUSE:Factory checked 
in at 2021-08-28 22:31:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pkgconf (Old)
 and      /work/SRC/openSUSE:Factory/.pkgconf.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pkgconf"

Sat Aug 28 22:31:03 2021 rev:12 rq:913762 version:1.8.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/pkgconf/pkgconf.changes  2021-07-15 
23:59:03.238149542 +0200
+++ /work/SRC/openSUSE:Factory/.pkgconf.new.1899/pkgconf.changes        
2021-08-28 22:31:04.942102935 +0200
@@ -1,0 +2,11 @@
+Mon Aug 23 09:18:29 UTC 2021 - Callum Farmer <gm...@opensuse.org>
+
+- Update to version 1.8.0:
+  + Fix a minor memory leak relating to cross-personalities
+  + Fix some edge cases with --redefine-prefix
+  + Do not prepend sysroot_dir if the .pc file does not exist
+    in the sysroot
+  + Do not perform path filtering on default system include
+    and library path lists.
+
+-------------------------------------------------------------------

Old:
----
  pkgconf-1.7.4.tar.xz

New:
----
  pkgconf-1.8.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pkgconf.spec ++++++
--- /var/tmp/diff_new_pack.VmEv2j/_old  2021-08-28 22:31:05.666103740 +0200
+++ /var/tmp/diff_new_pack.VmEv2j/_new  2021-08-28 22:31:05.670103745 +0200
@@ -45,7 +45,7 @@
 %global devname lib%{name}-devel
 
 Name:           pkgconf
-Version:        1.7.4
+Version:        1.8.0
 Release:        0
 Summary:        Package compiler and linker metadata toolkit
 License:        ISC

++++++ pkgconf-1.7.4.tar.xz -> pkgconf-1.8.0.tar.xz ++++++
++++ 10726 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pkgconf-1.7.4/NEWS new/pkgconf-1.8.0/NEWS
--- old/pkgconf-1.7.4/NEWS      2021-03-18 14:03:21.000000000 +0100
+++ new/pkgconf-1.8.0/NEWS      2021-07-25 04:19:35.000000000 +0200
@@ -1,8 +1,37 @@
 Changes from previous version of pkgconf
 ========================================
 
+Changes from 1.7.4 to 1.8.0:
+----------------------------
+
+* This is the last planned maintenance branch.  I see pkgconf as basically
+  a finished tool at this point, and very few people were ultimately interested
+  in libpkgconf.  So, from here on out, it will just be bug fixes only and
+  very minor enhancements.
+
+* Bug fixes:
+  - Improved path handling on Windows to conform to what the MSYS2
+    and Cygwin teams were already modifying pkgconf to do.
+    Patches by Christoph Reiter.
+  - Fix a minor memory leak relating to cross-personalities.
+    Patch by Stone Tickle.
+  - Fix static builds for Windows on Meson.
+    Patch by Alexander Neumann.
+  - Fix some edge cases with --redefine-prefix.
+    Patch by midipix.
+  - Do not prepend sysroot_dir if the .pc file does not exist in the
+    sysroot.
+    Patch by Sandro Mani.
+  - Do not perform path filtering on default system include and library
+    path lists.  This fixes consistency with other mechanisms that modify
+    these path lists.
+
+* Enhancements:
+  - Document the --validate option in the manpage.
+    Patch by orbea.
+
 Changes from 1.7.3 to 1.7.4:
----------------------------
+----------------------------
 
 * Bug fixes:
   - Fix null-dereference crash when pulling a malformed 'uninstalled'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pkgconf-1.7.4/README.md new/pkgconf-1.8.0/README.md
--- old/pkgconf-1.7.4/README.md 2021-03-18 13:52:28.000000000 +0100
+++ new/pkgconf-1.8.0/README.md 2021-07-25 03:45:16.000000000 +0200
@@ -60,6 +60,10 @@
 
 ## compatibility with pkg-config
 
+I really hate that I have to have this section, I like being a nice person, 
but we
+unfortunately have to say this because otherwise we get passive-aggressive 
people who
+try to argue with us about what pkg-config compatibility means.
+
 We do not provide bug-level compatibility with pkg-config.
 
 What that means is, if you feel that there is a legitimate regression versus 
pkg-config,
@@ -67,6 +71,17 @@
 the [pkg-config tutorial][fd-tut], as most likely fixing them to follow the 
specified
 rules will solve the problem.
 
+Additionally, **we do not consider pkgconf doing what you tell it to do, when 
pkg-config
+fails to do so, to be a bug**.
+
+If, for example, you use environment variables such as 
`PKG_CONFIG_SYSTEM_[INCLUDE|LIBRARY]_PATH`
+and then find yourself surprised that `pkgconf` is stripping `-I` and `-L` 
flags relating
+to those paths, it's not a `pkgconf` problem -- `pkgconf` is doing exactly 
what you told
+it to do.
+
+We will reject bugs like this, and if you choose to violate our [Code of 
Conduct](CODE_OF_CONDUCT.md)
+by demanding we fix your non-bug, we will fix the problem by banning you from 
the repo instead.
+
 ## compiling `pkgconf` and `libpkgconf` on UNIX
 
 pkgconf is basically compiled the same way any other autotools-based project is
@@ -119,8 +134,8 @@
 
 ## contacts
 
-You can report bugs at <https://todo.sr.ht/~kaniini/pkgconf>.
+You can report bugs at <https://github.com/pkgconf/pkgconf/issues>.
 
 There is a mailing list at <https://lists.sr.ht/~kaniini/pkgconf>.
 
-You can contact us via IRC at `#pkgconf` at `irc.freenode.net`.
+You can contact us via IRC at `#pkgconf` at `irc.oftc.net`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pkgconf-1.7.4/cli/main.c new/pkgconf-1.8.0/cli/main.c
--- old/pkgconf-1.7.4/cli/main.c        2021-03-18 13:35:50.000000000 +0100
+++ new/pkgconf-1.8.0/cli/main.c        2021-07-25 03:45:16.000000000 +0200
@@ -802,6 +802,7 @@
        char *want_env_prefix = NULL;
        unsigned int want_client_flags = PKGCONF_PKG_PKGF_NONE;
        pkgconf_cross_personality_t *personality;
+       bool opened_error_msgout = false;
 
        want_flags = 0;
 
@@ -1027,8 +1028,10 @@
        error_msgout = stderr;
        if ((want_flags & PKG_ERRORS_ON_STDOUT) == PKG_ERRORS_ON_STDOUT)
                error_msgout = stdout;
-       if ((want_flags & PKG_SILENCE_ERRORS) == PKG_SILENCE_ERRORS)
+       if ((want_flags & PKG_SILENCE_ERRORS) == PKG_SILENCE_ERRORS) {
                error_msgout = fopen(PATH_DEV_NULL, "w");
+               opened_error_msgout = true;
+       }
 
        if ((want_flags & PKG_IGNORE_CONFLICTS) == PKG_IGNORE_CONFLICTS || 
getenv("PKG_CONFIG_IGNORE_CONFLICTS") != NULL)
                want_client_flags |= PKGCONF_PKG_PKGF_SKIP_CONFLICTS;
@@ -1454,10 +1457,13 @@
                printf("\n");
 
 out:
+       pkgconf_cross_personality_deinit(personality);
        pkgconf_client_deinit(&pkg_client);
 
        if (logfile_out != NULL)
                fclose(logfile_out);
+       if (opened_error_msgout)
+               fclose(error_msgout);
 
        return ret;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pkgconf-1.7.4/configure.ac new/pkgconf-1.8.0/configure.ac
--- old/pkgconf-1.7.4/configure.ac      2021-03-18 13:57:23.000000000 +0100
+++ new/pkgconf-1.8.0/configure.ac      2021-07-25 04:22:25.000000000 +0200
@@ -12,7 +12,7 @@
 dnl from the use of this software.
 
 AC_PREREQ([2.68])
-AC_INIT([pkgconf], [1.7.4], [https://github.com/pkgconf/pkgconf/issues/new])
+AC_INIT([pkgconf], [1.8.0], [https://github.com/pkgconf/pkgconf/issues/new])
 AC_CONFIG_SRCDIR([cli/main.c])
 AC_CONFIG_MACRO_DIR([m4])
 AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"])
@@ -22,7 +22,7 @@
        AX_CHECK_COMPILE_FLAG([-std=c99], [CFLAGS="$CFLAGS -std=c99"])
 ])
 AC_CONFIG_HEADERS([libpkgconf/config.h])
-AC_CHECK_FUNCS([strlcpy strlcat strndup cygwin_conv_path])
+AC_CHECK_FUNCS([strlcpy strlcat strndup])
 AC_CHECK_HEADERS([sys/stat.h])
 AM_INIT_AUTOMAKE([foreign dist-xz subdir-objects])
 AM_SILENT_RULES([yes])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pkgconf-1.7.4/doc/libpkgconf-path.rst 
new/pkgconf-1.8.0/doc/libpkgconf-path.rst
--- old/pkgconf-1.7.4/doc/libpkgconf-path.rst   2019-07-12 13:10:54.000000000 
+0200
+++ new/pkgconf-1.8.0/doc/libpkgconf-path.rst   2021-07-25 03:45:16.000000000 
+0200
@@ -55,7 +55,7 @@
 
 .. c:function:: bool pkgconf_path_relocate(char *buf, size_t buflen)
 
-   Relocates a path, possibly calling normpath() or cygwin_conv_path() on it.
+   Relocates a path, possibly calling normpath() on it.
 
    :param char* buf: The path to relocate.
    :param size_t buflen: The buffer length the path is contained in.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pkgconf-1.7.4/libpkgconf/config.h.in 
new/pkgconf-1.8.0/libpkgconf/config.h.in
--- old/pkgconf-1.7.4/libpkgconf/config.h.in    2021-03-18 14:04:15.000000000 
+0100
+++ new/pkgconf-1.8.0/libpkgconf/config.h.in    2021-07-25 04:23:10.000000000 
+0200
@@ -1,20 +1,17 @@
 /* libpkgconf/config.h.in.  Generated from configure.ac by autoheader.  */
 
-/* Define to 1 if you have the `cygwin_conv_path' function. */
-#undef HAVE_CYGWIN_CONV_PATH
-
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
@@ -66,17 +63,14 @@
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+   required in a freestanding environment). This macro is provided for
+   backward compatibility; new code need not use it. */
 #undef STDC_HEADERS
 
 /* Version number of package */
 #undef VERSION
 
-/* Enable large inode numbers on Mac OS X 10.5.  */
-#ifndef _DARWIN_USE_64_BIT_INODE
-# define _DARWIN_USE_64_BIT_INODE 1
-#endif
-
 /* Number of bits in a file offset, on hosts where this is settable. */
 #undef _FILE_OFFSET_BITS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pkgconf-1.7.4/libpkgconf/config.h.meson 
new/pkgconf-1.8.0/libpkgconf/config.h.meson
--- old/pkgconf-1.7.4/libpkgconf/config.h.meson 2020-06-03 02:57:37.000000000 
+0200
+++ new/pkgconf-1.8.0/libpkgconf/config.h.meson 2021-07-25 03:45:16.000000000 
+0200
@@ -1,8 +1,5 @@
 /* libpkgconf/config.h.in.  Generated from configure.ac by autoheader.  */
 
-/* Define to 1 if you have the `cygwin_conv_path' function. */
-#mesondefine HAVE_CYGWIN_CONV_PATH
-
 /* Define to 1 if you have the `strlcat' function. */
 #mesondefine HAVE_STRLCAT
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pkgconf-1.7.4/libpkgconf/libpkgconf.h 
new/pkgconf-1.8.0/libpkgconf/libpkgconf.h
--- old/pkgconf-1.7.4/libpkgconf/libpkgconf.h   2021-03-18 13:35:17.000000000 
+0100
+++ new/pkgconf-1.8.0/libpkgconf/libpkgconf.h   2021-07-25 03:45:16.000000000 
+0200
@@ -231,6 +231,7 @@
 /* personality.c */
 PKGCONF_API pkgconf_cross_personality_t 
*pkgconf_cross_personality_default(void);
 PKGCONF_API pkgconf_cross_personality_t *pkgconf_cross_personality_find(const 
char *triplet);
+PKGCONF_API void pkgconf_cross_personality_deinit(pkgconf_cross_personality_t 
*personality);
 
 #define PKGCONF_IS_MODULE_SEPARATOR(c) ((c) == ',' || isspace ((unsigned 
int)(c)))
 #define PKGCONF_IS_OPERATOR_CHAR(c) ((c) == '<' || (c) == '>' || (c) == '!' || 
(c) == '=')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pkgconf-1.7.4/libpkgconf/path.c new/pkgconf-1.8.0/libpkgconf/path.c
--- old/pkgconf-1.7.4/libpkgconf/path.c 2021-03-18 13:56:39.000000000 +0100
+++ new/pkgconf-1.8.0/libpkgconf/path.c 2021-07-25 03:45:16.000000000 +0200
@@ -17,10 +17,6 @@
 #include <libpkgconf/stdinc.h>
 #include <libpkgconf/libpkgconf.h>
 
-#ifdef HAVE_CYGWIN_CONV_PATH
-# include <sys/cygwin.h>
-#endif
-
 #if defined(HAVE_SYS_STAT_H) && ! defined(_WIN32)
 # include <sys/stat.h>
 # define PKGCONF_CACHE_INODES
@@ -306,7 +302,7 @@
  *
  * .. c:function:: bool pkgconf_path_relocate(char *buf, size_t buflen)
  *
- *    Relocates a path, possibly calling normpath() or cygwin_conv_path() on 
it.
+ *    Relocates a path, possibly calling normpath() on it.
  *
  *    :param char* buf: The path to relocate.
  *    :param size_t buflen: The buffer length the path is contained in.
@@ -320,25 +316,6 @@
        char *ti;
 #endif
 
-#ifdef HAVE_CYGWIN_CONV_PATH
-       /*
-        * If we are on Cygwin or MSYS, then we want to convert the virtual path
-        * to a real DOS path, using cygwin_conv_path().
-        */
-       ssize_t size;
-       char *tmpbuf;
-
-       size = cygwin_conv_path(CCP_POSIX_TO_WIN_A, buf, NULL, 0);
-       if (size < 0 || (size_t) size > buflen)
-               return false;
-
-       tmpbuf = malloc(size);
-       if (cygwin_conv_path(CCP_POSIX_TO_WIN_A, buf, tmpbuf, size))
-               return false;
-
-       pkgconf_strlcpy(buf, tmpbuf, buflen);
-       free(tmpbuf);
-#else
        char *tmpbuf;
 
        if ((tmpbuf = normpath(buf)) != NULL)
@@ -353,20 +330,6 @@
                pkgconf_strlcpy(buf, tmpbuf, buflen);
                free(tmpbuf);
        }
-#endif
-
-#ifdef _WIN32
-       /*
-        * Rewrite any backslash path delimiters for best compatibility.
-        * Originally, we did this in cygwin/msys case, but now we build pkgconf
-        * natively on Windows without cygwin/msys, so do it in all cases.
-        */
-       for (ti = buf; *ti != '\0'; ti++)
-       {
-               if (*ti == '\\')
-                       *ti = '/';
-       }
-#endif
 
        return true;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pkgconf-1.7.4/libpkgconf/personality.c 
new/pkgconf-1.8.0/libpkgconf/personality.c
--- old/pkgconf-1.7.4/libpkgconf/personality.c  2021-03-18 13:03:18.000000000 
+0100
+++ new/pkgconf-1.8.0/libpkgconf/personality.c  2021-07-25 04:06:08.000000000 
+0200
@@ -96,13 +96,21 @@
 
        build_default_search_path(&default_personality.dir_list);
 
-       pkgconf_path_split(SYSTEM_LIBDIR, &default_personality.filter_libdirs, 
true);
-       pkgconf_path_split(SYSTEM_INCLUDEDIR, 
&default_personality.filter_includedirs, true);
+       pkgconf_path_split(SYSTEM_LIBDIR, &default_personality.filter_libdirs, 
false);
+       pkgconf_path_split(SYSTEM_INCLUDEDIR, 
&default_personality.filter_includedirs, false);
 
        default_personality_init = true;
        return &default_personality;
 }
 
+void
+pkgconf_cross_personality_deinit(pkgconf_cross_personality_t *personality)
+{
+       pkgconf_path_free(&personality->dir_list);
+       pkgconf_path_free(&personality->filter_libdirs);
+       pkgconf_path_free(&personality->filter_includedirs);
+}
+
 #ifndef PKGCONF_LITE
 static bool
 valid_triplet(const char *triplet)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pkgconf-1.7.4/libpkgconf/pkg.c new/pkgconf-1.8.0/libpkgconf/pkg.c
--- old/pkgconf-1.7.4/libpkgconf/pkg.c  2021-03-18 12:39:45.000000000 +0100
+++ new/pkgconf-1.8.0/libpkgconf/pkg.c  2021-07-25 03:47:13.000000000 +0200
@@ -214,6 +214,37 @@
        return buf;
 }
 
+/*
+ * Takes a real path and converts it to a pkgconf value. This means normalizing
+ * directory separators and escaping things (only spaces covered atm).
+ *
+ * This is useful for things like prefix/pcfiledir which might get injected
+ * at runtime and are not sourced from the .pc file.
+ *
+ * "C:\foo bar\baz" -> "C:/foo\ bar/baz"
+ * "/foo bar/baz" -> "/foo\ bar/baz"
+ */
+static char *
+convert_path_to_value(const char *path)
+{
+       char *buf = calloc((strlen(path) + 1) * 2, 1);
+       char *bptr = buf;
+       const char *i;
+
+       for (i = path; *i != '\0'; i++)
+       {
+               if (*i == PKG_DIR_SEP_S)
+                       *bptr++ = '/';
+               else if (*i == ' ') {
+                       *bptr++ = '\\';
+                       *bptr++ = *i;
+               } else
+                       *bptr++ = *i;
+       }
+
+       return buf;
+}
+
 static void
 remove_additional_separators(char *buf)
 {
@@ -238,16 +269,6 @@
 static void
 canonicalize_path(char *buf)
 {
-#ifdef _WIN32
-       char *p = buf;
-
-       while (*p) {
-               if (*p == '\\')
-                       *p = '/';
-               p++;
-       }
-#endif
-
        remove_additional_separators(buf);
 }
 
@@ -276,7 +297,11 @@
         * which is broken when redefining the prefix. We try to outsmart the
         * file and rewrite any directory that starts with the same prefix.
         */
-       if (pkg->owner->flags & PKGCONF_PKG_PKGF_REDEFINE_PREFIX && 
pkg->orig_prefix
+       if (strcmp(keyword, pkg->owner->prefix_varname) || !(pkg->owner->flags 
& PKGCONF_PKG_PKGF_REDEFINE_PREFIX))
+       {
+               pkgconf_tuple_add(pkg->owner, &pkg->vars, keyword, value, true);
+       }
+       else if (pkg->owner->flags & PKGCONF_PKG_PKGF_REDEFINE_PREFIX && 
pkg->orig_prefix
            && is_path_prefix_equal(canonicalized_value, 
pkg->orig_prefix->value, strlen(pkg->orig_prefix->value)))
        {
                char newvalue[PKGCONF_ITEM_SIZE];
@@ -285,8 +310,6 @@
                pkgconf_strlcat(newvalue, canonicalized_value + 
strlen(pkg->orig_prefix->value), sizeof newvalue);
                pkgconf_tuple_add(pkg->owner, &pkg->vars, keyword, newvalue, 
false);
        }
-       else if (strcmp(keyword, pkg->owner->prefix_varname) || 
!(pkg->owner->flags & PKGCONF_PKG_PKGF_REDEFINE_PREFIX))
-               pkgconf_tuple_add(pkg->owner, &pkg->vars, keyword, value, true);
        else
        {
                char pathbuf[PKGCONF_ITEM_SIZE];
@@ -294,8 +317,10 @@
 
                if (relvalue != NULL)
                {
+                       char *prefix_value = convert_path_to_value(relvalue);
                        pkg->orig_prefix = pkgconf_tuple_add(pkg->owner, 
&pkg->vars, "orig_prefix", canonicalized_value, true);
-                       pkg->prefix = pkgconf_tuple_add(pkg->owner, &pkg->vars, 
keyword, relvalue, false);
+                       pkgconf_tuple_add_global(pkg->owner, keyword, 
prefix_value);
+                       free(prefix_value);
                }
                else
                        pkgconf_tuple_add(pkg->owner, &pkg->vars, keyword, 
value, true);
@@ -376,7 +401,20 @@
        pkg->owner = client;
        pkg->filename = strdup(filename);
        pkg->pc_filedir = pkg_get_parent_dir(pkg);
-       pkgconf_tuple_add(client, &pkg->vars, "pcfiledir", pkg->pc_filedir, 
true);
+
+       char *pc_filedir_value = convert_path_to_value(pkg->pc_filedir);
+       pkgconf_tuple_add(client, &pkg->vars, "pcfiledir", pc_filedir_value, 
true);
+       free(pc_filedir_value);
+
+       /* If pc_filedir is outside of sysroot_dir, clear pc_filedir
+        * See https://github.com/pkgconf/pkgconf/issues/213
+        */
+       if (client->sysroot_dir && strncmp(pkg->pc_filedir, 
client->sysroot_dir, strlen(client->sysroot_dir)))
+       {
+               free(client->sysroot_dir);
+               client->sysroot_dir = NULL;
+               pkgconf_client_set_sysroot_dir(client, NULL);
+       }
 
        /* make module id */
        if ((idptr = strrchr(pkg->filename, PKG_DIR_SEP_S)) != NULL)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pkgconf-1.7.4/man/pkgconf.1 new/pkgconf-1.8.0/man/pkgconf.1
--- old/pkgconf-1.7.4/man/pkgconf.1     2021-03-18 13:19:07.000000000 +0100
+++ new/pkgconf-1.8.0/man/pkgconf.1     2021-07-25 03:45:16.000000000 +0200
@@ -51,6 +51,10 @@
 rules in modules.
 .It Fl -env-only
 Learn about pkgconf's configuration strictly from environmental variables.
+.It Fl -validate Ar package ...
+Validate specific
+.Sq .pc
+files for correctness.
 .It Fl -maximum-traverse-depth Ns = Ns Ar DEPTH
 Impose a limit on the allowed depth in the dependency graph.
 For example, a depth of 2 will restrict the resolver from acting on child
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pkgconf-1.7.4/meson.build new/pkgconf-1.8.0/meson.build
--- old/pkgconf-1.7.4/meson.build       2021-03-18 13:57:23.000000000 +0100
+++ new/pkgconf-1.8.0/meson.build       2021-07-25 04:22:12.000000000 +0200
@@ -1,5 +1,5 @@
 project('pkgconf', 'c',
-  version : '1.7.4',
+  version : '1.8.0',
   license : 'ISC',
   meson_version : '>=0.47')
 
@@ -10,7 +10,6 @@
 cdata = configuration_data()
 
 check_functions = [
-  ['HAVE_CYGWIN_CONV_PATH', 'cygwin_conv_path', 'sys/cygwin.h'],
   ['HAVE_STRLCAT', 'strlcat', 'string.h'],
   ['HAVE_STRLCPY', 'strlcpy', 'string.h'],
   ['HAVE_STRNDUP', 'strndup', 'string.h'],
@@ -45,6 +44,13 @@
 
 subdir('libpkgconf')
 
+libtype = get_option('default_library')
+if libtype == 'static'
+  build_static = '-DPKGCONFIG_IS_STATIC'
+else
+  build_static = '-DPKGCONFIG_IS_NOT_STATIC'
+endif
+
 libpkgconf = library('pkgconf',
   'libpkgconf/argvsplit.c',
   'libpkgconf/audit.c',
@@ -60,7 +66,7 @@
   'libpkgconf/pkg.c',
   'libpkgconf/queue.c',
   'libpkgconf/tuple.c',
-  c_args: '-DLIBPKGCONF_EXPORT',
+  c_args: ['-DLIBPKGCONF_EXPORT', build_static],
   install : true,
   version : '3.0.0',
   soversion : '3',
@@ -73,13 +79,16 @@
   url: 'http://github.com/pkgconf/pkgconf',
   filebase : 'libpkgconf',
   subdirs: ['pkgconf'],
+  extra_cflags : build_static
 )
 
+
 pkgconf_exe = executable('pkgconf',
   'cli/main.c',
   'cli/getopt_long.c',
   'cli/renderer-msvc.c',
   link_with : libpkgconf,
+  c_args: build_static,
   install : true)
 
 if get_option('tests')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pkgconf-1.7.4/tests/regress.sh new/pkgconf-1.8.0/tests/regress.sh
--- old/pkgconf-1.7.4/tests/regress.sh  2019-07-12 13:10:54.000000000 +0200
+++ new/pkgconf-1.8.0/tests/regress.sh  2021-07-25 04:39:05.000000000 +0200
@@ -23,7 +23,6 @@
        idirafter_munge_sysroot \
        idirafter_ordering \
        pcpath \
-       sysroot_munge \
        virtual_variable \
        fragment_collision \
        malformed_1 \
@@ -31,6 +30,8 @@
        explicit_sysroot \
        empty_tuple
 
+#      sysroot_munge \
+
 case_sensitivity_body()
 {
        export PKG_CONFIG_PATH="${selfdir}/lib1"
@@ -112,7 +113,7 @@
        export PKG_CONFIG_PATH="${selfdir}/lib1"
        atf_check \
                -o inline:"-L/test/bar/lib -lfoo1 \n" \
-               pkgconf --libs prefix-foo1      
+               pkgconf --libs prefix-foo1
        atf_check \
                -o inline:"-L/test/bar/lib -lfoo1 -lfoo2 \n" \
                pkgconf --libs prefix-foo1 prefix-foo2
@@ -160,9 +161,9 @@
 
 isystem_munge_sysroot_body()
 {
-       export PKG_CONFIG_PATH="${selfdir}/lib1" PKG_CONFIG_SYSROOT_DIR='/test'
+       export PKG_CONFIG_PATH="${selfdir}/lib1" 
PKG_CONFIG_SYSROOT_DIR="${selfdir}"
        atf_check \
-               -o match:"-isystem /test/opt/bad/include" \
+               -o match:"-isystem ${selfdir}/opt/bad/include" \
                pkgconf --cflags isystem
 }
 
@@ -176,9 +177,9 @@
 
 idirafter_munge_sysroot_body()
 {
-       export PKG_CONFIG_PATH="${selfdir}/lib1" PKG_CONFIG_SYSROOT_DIR='/test'
+       export PKG_CONFIG_PATH="${selfdir}/lib1" 
PKG_CONFIG_SYSROOT_DIR="${selfdir}"
        atf_check \
-               -o match:"-idirafter /test/opt/bad/include" \
+               -o match:"-idirafter ${selfdir}/opt/bad/include" \
                pkgconf --cflags idirafter
 }
 
@@ -195,20 +196,16 @@
        export PKG_CONFIG_PATH="${selfdir}/lib2"
        atf_check \
                -o inline:"-fPIC -I/test/include/foo \n" \
-               pkgconf --cflags ${selfdir}/lib3/bar.pc 
+               pkgconf --cflags ${selfdir}/lib3/bar.pc
 }
 
 sysroot_munge_body()
 {
-       export PKG_CONFIG_PATH="${selfdir}/lib1" 
PKG_CONFIG_SYSROOT_DIR="/sysroot"
-       atf_check \
-               -o inline:"-L/sysroot/lib -lfoo \n" \
-               pkgconf --libs sysroot-dir
-
-       export PKG_CONFIG_SYSROOT_DIR="/sysroot2"
+       sed "s|/sysroot/|${selfdir}/|g" ${selfdir}/lib1/sysroot-dir.pc > 
${selfdir}/lib1/sysroot-dir-selfdir.pc
+       export PKG_CONFIG_PATH="${selfdir}/lib1" 
PKG_CONFIG_SYSROOT_DIR="${selfdir}"
        atf_check \
-               -o inline:"-L/sysroot2/sysroot/lib -lfoo \n" \
-               pkgconf --libs sysroot-dir
+               -o inline:"-L${selfdir}/lib -lfoo \n" \
+               pkgconf --libs sysroot-dir-selfdir
 }
 
 virtual_variable_body()
@@ -244,8 +241,8 @@
 
 explicit_sysroot_body()
 {
-       export PKG_CONFIG_SYSROOT_DIR=/sysroot
-       atf_check -o inline:"/sysroot/usr/share/test\n" \
+       export PKG_CONFIG_SYSROOT_DIR=${selfdir}
+       atf_check -o inline:"${selfdir}/usr/share/test\n" \
                pkgconf --with-path="${selfdir}/lib1" --variable=pkgdatadir 
explicit-sysroot
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/pkgconf-1.7.4/tests/test_env.sh.in new/pkgconf-1.8.0/tests/test_env.sh.in
--- old/pkgconf-1.7.4/tests/test_env.sh.in      2019-07-12 15:23:36.000000000 
+0200
+++ new/pkgconf-1.8.0/tests/test_env.sh.in      2021-07-25 03:45:43.000000000 
+0200
@@ -24,9 +24,8 @@
 selfdir="@abs_top_srcdir@/tests"
 LIBRARY_PATH_ENV="LIBRARY_PATH"
 PATH_SEP=":"
-SYSROOT_DIR="${selfdir}/test"
+SYSROOT_DIR="${selfdir}"
 case "$(uname -s)" in
-Msys|CYGWIN*) PATH_SEP=";";;
 Haiku) LIBRARY_PATH_ENV="BELIBRARIES";;
 esac
 

Reply via email to