pkgconf/libpkgconf
Christoph Reiter 4f73f6a1d6 Rework path handling on native Windows
The current approach was to parse the .pc and, detect the prefix, throw
everything together and at the end replace all \ with / to not produce invalid
escape sequences.

This has the problem that escaping in .pc files is ignored and no longer
possible. Also in case the prefix path has a space in it the result would be
invalid because of missing escaping.

This changes the following things:

* We no longer normalize values at the end. Instead we assume .pc files use "/"
  as a directory separator or "\\", same format as under Unix. "\" alone no
  longer works. This shouldn't be a problem since most build tools produce .pc
  files with "/" like meson, cmake, autotools.

* When injecting the prefix at runtime we convert the prefix to use "/" and
  escape spaces so that in combination with the .pc content the result is a
  valid escaped path value again.

This patch has been used in MSYS2 for some months now.

See #212
2021-03-20 06:59:38 -08:00
..
argvsplit.c fix missing backslashes in paths on Windows 2020-05-30 12:39:43 -06:00
audit.c libpkgconf: document audit module 2016-12-10 19:28:34 -06:00
bsdstubs.c Minimal tweaks to compile with Visual C 2015 2017-06-04 19:19:55 -07:00
bsdstubs.h normalize include guards. closes #33 2019-05-25 16:00:09 -05:00
cache.c libpkgconf: cache: fix refcount issue exposed by recent depgraph solver changes 2017-12-08 13:39:40 -06:00
client.c fix the order of header includes 2019-06-08 04:55:52 +03:00
config.h.meson Remove usage of cygwin_conv_path() under cygwin/msys 2021-03-20 06:58:53 -08:00
dependency.c libpkgconf: dependency: fix out of boundary write 2020-05-26 14:03:55 -06:00
fileio.c libpkgconf: fileio: pkgconf_fgetline(): handle quoted=true when a comment introduction is encountered 2021-03-18 05:45:41 -06:00
fragment.c libpkgconf: fragment: fix out of boundary write 2020-05-30 19:05:53 -06:00
iter.h normalize include guards. closes #33 2019-05-25 16:00:09 -05:00
libpkgconf-api.h normalize include guards. closes #33 2019-05-25 16:00:09 -05:00
libpkgconf.h main: if PKG_CONFIG_FDO_SYSROOT_RULES is set, or DESTDIR matches PKG_CONFIG_SYSROOT_DIRS, disable the automatic sysroot rewriting 2021-03-18 06:22:11 -06:00
meson.build meson: install headers into pkgconf/libpkgconf instead of just libpkgconf 2020-11-28 19:42:00 -07:00
parser.c libpkgconf: parser: fix out of boundary access 2020-05-24 14:10:18 -06:00
path.c Rework path handling on native Windows 2021-03-20 06:59:38 -08:00
personality.c libpkgconf: personality: default: set want_default_static and want_default_pure to true on windows 2021-03-18 06:03:47 -06:00
pkg.c Rework path handling on native Windows 2021-03-20 06:59:38 -08:00
queue.c libpkgconf: dependency: allow dependency nodes to be colored with traits 2018-03-18 18:03:33 -05:00
stdinc.h normalize include guards. closes #33 2019-05-25 16:00:09 -05:00
tuple.c main: if PKG_CONFIG_FDO_SYSROOT_RULES is set, or DESTDIR matches PKG_CONFIG_SYSROOT_DIRS, disable the automatic sysroot rewriting 2021-03-18 06:22:11 -06:00
win-dirent.h normalize include guards. closes #33 2019-05-25 16:00:09 -05:00