This way, you can use an unprivileged prefix of ~/cross/pkg to
cross-compile packages that, when installed, will go in /usr/pkg.
In mk.conf:
- Set CROSS_LOCALBASE to determine the installation prefix of
packages that you cross-compile.
- Set LOCALBASE to determine the installation prefix of native
packages needed for cross compilation.
Both default to /usr/pkg. Note: CROSS_LOCALBASE defaults to /usr/pkg
even if you set LOCALBASE. Of course, if you're not cross-compiling,
this has no effect.
When cross-compiling a package:
- LOCALBASE is where cross-compiled packages will be installed.
(`make install' will put it in ${CROSS_DESTDIR}${LOCALBASE}, of
course, but when you later use pkg_add to install the binary
package on the system you're compiling it for, it will go in
${LOCALBASE}. And you can still set PREFIX for an individual
package, but LOCALBASE refers to where cross-compiled packages are
generally installed, other than the specific ones that override
PREFIX.)
- TOOLBASE is where tool dependencies are installed and available to
be executed at build-time.
For example, if you have TOOL_DEPENDS on a program that is
installed in (say) foo/bin/xyz which is not in PATH so you have to
refer ot its full pathname, you can execute ${TOOLBASE}/foo/bin/xyz
instead of ${LOCALBASE}/foo/bin/xyz.
I chose this split, rather than the other way around, because I
expect that references that are baked into installed packages to be
more common than references that are executed at build-time, but I
didn't do an extensive study of the matter. I chose the name
TOOLBASE because it's where TOOL_DEPENDS go.