Commit Graph

6 Commits

Author SHA1 Message Date
John Ericson
044163d6ef bsd: BSD_PATH rename to COMPONENT_PATH
@alyssais and I agreed this is clearer.
2022-10-06 15:33:36 -04:00
John Ericson
dcf7a5ec3d netbsd: Adapt to BSD-common infra changes for FreeBSD
See https://github.com/NixOS/nixpkgs/pull/82131 for the rest of the
changes for FreeBSD. This is PRed separately because it is a macOS
moderate rebuild so we target staging.

The main change is that we CD to the path we're building *after*
applying patches, so we can patch other parts of the tree (from
`extraPaths`) as needed.

Another change is that `netbsd.install` no longer depends on `fts`,
which it evidently no longer needs.
2022-10-06 15:33:28 -04:00
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
John Ericson
2810201833 netbsd: Split out path merging from bsd setup hook
I plan on doing the sources for FreeBSD differently. Indeed we might
want to change this for NetBSD too eventually.

In any event, the way we manage sources is not intrinsically the same
across BSDs so it makes sense to pull this out.
2021-07-11 21:11:10 +00:00
John Ericson
75db7f8eb0 netbsd: Use rsync to speed up source merging
The find -exec that was there before is quite slow on my machine. This
is much faster.
2021-07-10 21:20:29 +00:00
John Ericson
82c231d17e netbsd: Generalize builder to any-bsd setup hook
Do this to get ready for other BSDs.
2021-04-22 15:54:32 +00:00