2020-03-09 06:10:06 +00:00
|
|
|
mergeNetBSDSourceDir() {
|
|
|
|
# merge together all extra paths
|
|
|
|
# there should be a better way to do this
|
|
|
|
chmod -R u+w $BSDSRCDIR
|
|
|
|
for path in $extraPaths; do
|
|
|
|
rsync -Er --chmod u+w $path/ $BSDSRCDIR/
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
netbsd.compat: Fix cross compilation
Not to netbsd, where it isn't needed, but elsewhere.
A few things going on here:
- Make compat use the "regular" not "host" makefile infra. This,
however, makes more assumptions that the toolchain is BSD-like, and
so we need to compensate for them with the likes of:
- `LORDER=...` and `TSORT=...`
- Move `export INSTALL_*` to install's setup hook so they don't interfere
with coreutils install
- Don't use `DESTDIR` for installing include files, instead set `INCSDIR`.
This is more proper, but doesn't work when `INCSDIR` is set multiple
times, unfortunately, as CLI defs override all other assignments. So
instead set `INCSDIR0` on the CLI, and do some `INCSDIR =
${INCSDIR0}/...` in the relevant packages.
- `INCSDIR` is set just in the NetBSD setup hook because FreeBSD uses
`INCLUDEDIR`.
2021-09-01 21:44:25 +00:00
|
|
|
addNetBSDMakeFlags() {
|
|
|
|
makeFlags="INCSDIR=${!outputDev}/include $makeFlags"
|
|
|
|
}
|
|
|
|
|
2020-03-09 06:10:06 +00:00
|
|
|
postUnpackHooks+=(mergeNetBSDSourceDir)
|
netbsd.compat: Fix cross compilation
Not to netbsd, where it isn't needed, but elsewhere.
A few things going on here:
- Make compat use the "regular" not "host" makefile infra. This,
however, makes more assumptions that the toolchain is BSD-like, and
so we need to compensate for them with the likes of:
- `LORDER=...` and `TSORT=...`
- Move `export INSTALL_*` to install's setup hook so they don't interfere
with coreutils install
- Don't use `DESTDIR` for installing include files, instead set `INCSDIR`.
This is more proper, but doesn't work when `INCSDIR` is set multiple
times, unfortunately, as CLI defs override all other assignments. So
instead set `INCSDIR0` on the CLI, and do some `INCSDIR =
${INCSDIR0}/...` in the relevant packages.
- `INCSDIR` is set just in the NetBSD setup hook because FreeBSD uses
`INCLUDEDIR`.
2021-09-01 21:44:25 +00:00
|
|
|
preConfigureHooks+=(addNetBSDMakeFlags)
|