Skip to content

Commit 839e2f4

Browse files
committed
Move the info about the package prefix to the packaging section
It's only relevant to developers/packages, so move it out of the user targeted docs.
1 parent 0924655 commit 839e2f4

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

web/dev/package-guidelines.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,27 @@ To create such .pyc files in a PKGBUILD for packages which don't do it themselve
3030
MSYS2_ARG_CONV_EXCL="-p" \
3131
python -m compileall -o 0 -o 1 -q -s"${pkgdir}" -p"/" "${pkgdir}${MINGW_PREFIX}"
3232
```
33+
34+
## The package prefix (hack)
35+
36+
When looking at some of our package recipes you might have seen something like:
37+
38+
```bash
39+
MSYS2_ARG_CONV_EXCL="--prefix=" \
40+
meson \
41+
--prefix="${MINGW_PREFIX}" \
42+
...
43+
```
44+
45+
which results in `meson --prefix=/mingw64 ...` being executed.
46+
47+
`/mingw64` in this case is the UNIX prefix where the package will be installed
48+
to and in addition is a valid Windows path (a drive relative path, so
49+
`C:\mingw64`), so the native build tools will concatenate it with DESTDIR and
50+
copy things to the right place.
51+
52+
In the native Windows world this path doesn't make much sense, as `C:\mingw64`
53+
likely doesn't match where the software lives, but ideally all native Windows
54+
tools are relocatable and won't use the prefix at runtime anyway. And if they do
55+
and happen to call Cygwin tools then the prefix resolves to the correct path
56+
because the Cygwin root path is relocatable.

web/docs/filesystem-paths.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -121,27 +121,3 @@ you can use `cygpath`:
121121
$ /usr/bin/python3 -c "import sys, os; print(sys.argv, os.listdir(sys.argv[1]))" "$(cygpath -u C:/)"
122122
['-c', '/c/'] ['$Recycle.Bin', '$SysReset', ...]
123123
```
124-
125-
## The package prefix (hack)
126-
127-
When looking at some of our package recipes you might have seen something like:
128-
129-
```bash
130-
MSYS2_ARG_CONV_EXCL="--prefix=" \
131-
meson \
132-
--prefix="${MINGW_PREFIX}" \
133-
...
134-
```
135-
136-
which results in `meson --prefix=/mingw64 ...` being executed.
137-
138-
`/mingw64` in this case is the UNIX prefix where the package will be installed
139-
to and in addition is a valid Windows path (a drive relative path, so
140-
`C:\mingw64`), so the native build tools will concatenate it with DESTDIR and
141-
copy things to the right place.
142-
143-
In the native Windows world this path doesn't make much sense, as `C:\mingw64`
144-
likely doesn't match where the software lives, but ideally all native Windows
145-
tools are relocatable and won't use the prefix at runtime anyway. And if they do
146-
and happen to call Cygwin tools then the prefix resolves to the correct path
147-
because the Cygwin root path is relocatable.

0 commit comments

Comments
 (0)