[RFC] Slightly rework Windows path handling to be more pkg-config compatible #212

Closed
opened 2021-02-18 09:24:08 +00:00 by lazka · 5 comments
lazka commented 2021-02-18 09:24:08 +00:00 (Migrated from github.com)

In MSYS2 we've switched from pkg-config to pkgconf some weeks ago for native Windows builds and had to patch some things regarding directory separators to fix some builds and make the meson test suite pass. It's been working nicely since then.

It mainly comes down to this patch: https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-pkgconf/0004-fix-prefix-dirsep.patch (this is against the last release, so for master there are more changes/reverts)

  • Don't normalize "\" to "/" at the end as it breaks escaping of spaces etc
  • Assume path values in the .pc file either use "/" (preferred) or "\\" (escaped backslash). This makes Windows less of a special case again.
  • When inserting the relocation prefix escape it and convert "\" to "/" first, so that in combination with the .pc content we have a valid path value again.

I'd try to clean this up and create a PR if this is something that seems acceptable.

In MSYS2 we've switched from pkg-config to pkgconf some weeks ago for native Windows builds and had to patch some things regarding directory separators to fix some builds and make the meson test suite pass. It's been working nicely since then. It mainly comes down to this patch: https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-pkgconf/0004-fix-prefix-dirsep.patch (this is against the last release, so for master there are more changes/reverts) * Don't normalize "\\" to "/" at the end as it breaks escaping of spaces etc * Assume path values in the .pc file either use "/" (preferred) or "\\\\" (escaped backslash). This makes Windows less of a special case again. * When inserting the relocation prefix escape it and convert "\\" to "/" first, so that in combination with the .pc content we have a valid path value again. I'd try to clean this up and create a PR if this is something that seems acceptable.

This seems fine to me.

This seems fine to me.

@lazka do you have time to look at this?

@lazka do you have time to look at this?
lazka commented 2021-03-18 13:36:49 +00:00 (Migrated from github.com)

sorry, yes, today or tomorrow.

edit: tomorrow

sorry, yes, today or tomorrow. edit: tomorrow
lazka commented 2021-03-20 10:49:18 +00:00 (Migrated from github.com)

See #216 and #217

See #216 and #217
lazka commented 2021-03-20 17:16:25 +00:00 (Migrated from github.com)

Thanks you! If there are any Windows related issues feel free to ping me.

Thanks you! If there are any Windows related issues feel free to ping me.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ariadne/pkgconf#212
There is no content yet.