| @@ -1,32 +1,46 @@ | | | @@ -1,32 +1,46 @@ |
1 | # $NetBSD: pkgformat-vars.mk,v 1.16 2024/01/26 12:40:04 riastradh Exp $ | | 1 | # $NetBSD: pkgformat-vars.mk,v 1.17 2024/04/12 19:56:23 riastradh Exp $ |
2 | # | | 2 | # |
3 | # This Makefile fragment is included indirectly by bsd.prefs.mk and | | 3 | # This Makefile fragment is included indirectly by bsd.prefs.mk and |
4 | # defines some variables which must be defined earlier than where | | 4 | # defines some variables which must be defined earlier than where |
5 | # pkgformat.mk is included. | | 5 | # pkgformat.mk is included. |
6 | # | | 6 | # |
7 | | | 7 | |
8 | PKGSRC_MESSAGE_RECIPIENTS?= # empty | | 8 | PKGSRC_MESSAGE_RECIPIENTS?= # empty |
9 | | | 9 | |
10 | .if !empty(PKGSRC_MESSAGE_RECIPIENTS) | | 10 | .if !empty(PKGSRC_MESSAGE_RECIPIENTS) |
11 | USE_TOOLS+= mail | | 11 | USE_TOOLS+= mail |
12 | .endif | | 12 | .endif |
13 | | | 13 | |
14 | .if defined(PKG_PRESERVE) | | 14 | .if defined(PKG_PRESERVE) |
15 | USE_TOOLS+= date | | 15 | USE_TOOLS+= date |
16 | .endif | | 16 | .endif |
17 | | | 17 | |
18 | # This is the package database directory for the default view. | | 18 | # This is the package database directory for the default view. |
| | | 19 | .if ${USE_CROSS_COMPILE:tl} != "yes" |
19 | PKG_DBDIR?= ${LOCALBASE}/pkgdb | | 20 | PKG_DBDIR?= ${LOCALBASE}/pkgdb |
| | | 21 | .else |
| | | 22 | . ifndef HOST_PKG_DBDIR |
| | | 23 | # XXX This isn't quite right: if PKG_DBDIR is defined in terms of |
| | | 24 | # LOCALBASE, we really want to resolve it (`HOST_PKG_DBDIR:=') in |
| | | 25 | # bsd.prefs.mk before we switch LOCALBASE to CROSS_LOCALBASE. But |
| | | 26 | # there's no place there to put pkgformat-vars business. Fortunately, |
| | | 27 | # bootstrap just writes out the full path so this is only an issue if |
| | | 28 | # you explicitly write out `PKG_DBDIR= ...${LOCALBASE}...' in your |
| | | 29 | # mk.conf. |
| | | 30 | HOST_PKG_DBDIR:= ${PKG_DBDIR:U${TOOLBASE}/pkgdb} |
| | | 31 | . endif |
| | | 32 | PKG_DBDIR= ${CROSS_PKG_DBDIR:U${LOCALBASE}/pkgdb} |
| | | 33 | .endif |
20 | | | 34 | |
21 | # _PKG_DBDIR is the actual packages database directory where we register | | 35 | # _PKG_DBDIR is the actual packages database directory where we register |
22 | # packages. | | 36 | # packages. |
23 | # | | 37 | # |
24 | _PKG_DBDIR= ${_CROSS_DESTDIR}${PKG_DBDIR} | | 38 | _PKG_DBDIR= ${_CROSS_DESTDIR}${PKG_DBDIR} |
25 | _HOST_PKG_DBDIR= ${HOST_PKG_DBDIR:U${PKG_DBDIR}} | | 39 | _HOST_PKG_DBDIR= ${HOST_PKG_DBDIR:U${PKG_DBDIR}} |
26 | | | 40 | |
27 | PKG_ADD_CMD?= ${PKG_TOOLS_BIN}/pkg_add | | 41 | PKG_ADD_CMD?= ${PKG_TOOLS_BIN}/pkg_add |
28 | PKG_ADMIN_CMD?= ${PKG_TOOLS_BIN}/pkg_admin | | 42 | PKG_ADMIN_CMD?= ${PKG_TOOLS_BIN}/pkg_admin |
29 | PKG_CREATE_CMD?= ${PKG_TOOLS_BIN}/pkg_create | | 43 | PKG_CREATE_CMD?= ${PKG_TOOLS_BIN}/pkg_create |
30 | PKG_DELETE_CMD?= ${PKG_TOOLS_BIN}/pkg_delete | | 44 | PKG_DELETE_CMD?= ${PKG_TOOLS_BIN}/pkg_delete |
31 | PKG_INFO_CMD?= ${PKG_TOOLS_BIN}/pkg_info | | 45 | PKG_INFO_CMD?= ${PKG_TOOLS_BIN}/pkg_info |
32 | LINKFARM_CMD?= ${PKG_TOOLS_BIN}/linkfarm | | 46 | LINKFARM_CMD?= ${PKG_TOOLS_BIN}/linkfarm |