nixpkgs-suyu/pkgs/os-specific/bsd/netbsd/sys-headers-incsdir.patch
John Ericson ad609d27b5 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-03 14:19:49 +00:00

13 lines
303 B
Diff

diff --git a/Makefile b/Makefile
index 3f1e18dc659d..163362b82f94 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,8 @@
.include <bsd.own.mk>
+INCSDIR= ${INCSDIR0}
+
SUBDIR= altq arch compat dev fs miscfs \
net net80211 netatalk netbt netcan netipsec netinet netinet6 \
netmpls netsmb \