Thu Dec 3 10:04:48 2020 UTC ()
mk: use LOCALBASE instead of PREFIX

I don't understand why this fixes problems, but it does fix the build
of mail/neomutt for me.

>From ryoon.


(wiz)
diff -r1.9 -r1.10 pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk

cvs diff -r1.9 -r1.10 pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk (switch to unified diff)

--- pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk 2020/12/02 10:22:39 1.9
+++ pkgsrc/mk/pkgformat/pkg/pkgformat-vars.mk 2020/12/03 10:04:48 1.10
@@ -1,97 +1,97 @@ @@ -1,97 +1,97 @@
1# $NetBSD: pkgformat-vars.mk,v 1.9 2020/12/02 10:22:39 wiz Exp $ 1# $NetBSD: pkgformat-vars.mk,v 1.10 2020/12/03 10:04:48 wiz 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
8PKGSRC_MESSAGE_RECIPIENTS?= # empty 8PKGSRC_MESSAGE_RECIPIENTS?= # empty
9 9
10.if !empty(PKGSRC_MESSAGE_RECIPIENTS) 10.if !empty(PKGSRC_MESSAGE_RECIPIENTS)
11USE_TOOLS+= mail 11USE_TOOLS+= mail
12.endif 12.endif
13 13
14.if defined(PKG_PRESERVE) 14.if defined(PKG_PRESERVE)
15USE_TOOLS+= date 15USE_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.
19PKG_DBDIR?= ${PREFIX}/pkgdb 19PKG_DBDIR?= ${LOCALBASE}/pkgdb
20 20
21.if exists(/var/db/pkg) && !exists(${PKG_DBDIR}) 21.if exists(/var/db/pkg) && !exists(${PKG_DBDIR})
22PKG_DBDIR_ERROR= The default package database directory has changed. Please run: mv /var/db/pkg ${PKG_DBDIR} 22PKG_DBDIR_ERROR= The default package database directory has changed. Please run: mv /var/db/pkg ${PKG_DBDIR}
23.endif 23.endif
24 24
25# _PKG_DBDIR is the actual packages database directory where we register 25# _PKG_DBDIR is the actual packages database directory where we register
26# packages. 26# packages.
27# 27#
28_PKG_DBDIR= ${_CROSS_DESTDIR}${PKG_DBDIR} 28_PKG_DBDIR= ${_CROSS_DESTDIR}${PKG_DBDIR}
29_HOST_PKG_DBDIR= ${HOST_PKG_DBDIR:U${PKG_DBDIR}} 29_HOST_PKG_DBDIR= ${HOST_PKG_DBDIR:U${PKG_DBDIR}}
30 30
31PKG_ADD_CMD?= ${PKG_TOOLS_BIN}/pkg_add 31PKG_ADD_CMD?= ${PKG_TOOLS_BIN}/pkg_add
32PKG_ADMIN_CMD?= ${PKG_TOOLS_BIN}/pkg_admin 32PKG_ADMIN_CMD?= ${PKG_TOOLS_BIN}/pkg_admin
33PKG_CREATE_CMD?= ${PKG_TOOLS_BIN}/pkg_create 33PKG_CREATE_CMD?= ${PKG_TOOLS_BIN}/pkg_create
34PKG_DELETE_CMD?= ${PKG_TOOLS_BIN}/pkg_delete 34PKG_DELETE_CMD?= ${PKG_TOOLS_BIN}/pkg_delete
35PKG_INFO_CMD?= ${PKG_TOOLS_BIN}/pkg_info 35PKG_INFO_CMD?= ${PKG_TOOLS_BIN}/pkg_info
36LINKFARM_CMD?= ${PKG_TOOLS_BIN}/linkfarm 36LINKFARM_CMD?= ${PKG_TOOLS_BIN}/linkfarm
37 37
38# Latest versions of tools required for correct pkgsrc operation. 38# Latest versions of tools required for correct pkgsrc operation.
39PKGTOOLS_REQD= 20200828 39PKGTOOLS_REQD= 20200828
40# Latest version of pkg_install required to extract packages 40# Latest version of pkg_install required to extract packages
41PKGTOOLS_VERSION_REQD= 20091115 41PKGTOOLS_VERSION_REQD= 20091115
42 42
43# Environment used when invoking package tools. This is used to pass 43# Environment used when invoking package tools. This is used to pass
44# environment variables to the package install and deinstall scripts. 44# environment variables to the package install and deinstall scripts.
45# 45#
46PKGTOOLS_ENV?= # empty 46PKGTOOLS_ENV?= # empty
47 47
48.if !defined(PKGTOOLS_VERSION) 48.if !defined(PKGTOOLS_VERSION)
49PKGTOOLS_VERSION!= ${PKG_INFO_CMD} -V 2>/dev/null || echo 20010302 49PKGTOOLS_VERSION!= ${PKG_INFO_CMD} -V 2>/dev/null || echo 20010302
50MAKEFLAGS+= PKGTOOLS_VERSION=${PKGTOOLS_VERSION} 50MAKEFLAGS+= PKGTOOLS_VERSION=${PKGTOOLS_VERSION}
51.endif 51.endif
52 52
53# Check that we are using up-to-date pkg_* tools with this file. 53# Check that we are using up-to-date pkg_* tools with this file.
54.if !defined(NO_PKGTOOLS_REQD_CHECK) && ${PKGTOOLS_VERSION} < ${PKGTOOLS_REQD} 54.if !defined(NO_PKGTOOLS_REQD_CHECK) && ${PKGTOOLS_VERSION} < ${PKGTOOLS_REQD}
55BOOTSTRAP_DEPENDS+= pkg_install>=${PKGTOOLS_REQD}:../../pkgtools/pkg_install 55BOOTSTRAP_DEPENDS+= pkg_install>=${PKGTOOLS_REQD}:../../pkgtools/pkg_install
56_PKG_INSTALL_DEPENDS= yes 56_PKG_INSTALL_DEPENDS= yes
57.endif 57.endif
58 58
59AUDIT_PACKAGES?= ${PKG_ADMIN} 59AUDIT_PACKAGES?= ${PKG_ADMIN}
60_AUDIT_PACKAGES_CMD?= audit-pkg 60_AUDIT_PACKAGES_CMD?= audit-pkg
61_EXTRACT_PKGVULNDIR= ${PKG_ADMIN} config-var PKGVULNDIR 61_EXTRACT_PKGVULNDIR= ${PKG_ADMIN} config-var PKGVULNDIR
62DOWNLOAD_VULN_LIST?= ${PKG_ADMIN} fetch-pkg-vulnerabilities 62DOWNLOAD_VULN_LIST?= ${PKG_ADMIN} fetch-pkg-vulnerabilities
63_AUDIT_CONFIG_FILE= pkg_install.conf 63_AUDIT_CONFIG_FILE= pkg_install.conf
64_AUDIT_CONFIG_OPTION= IGNORE_URL 64_AUDIT_CONFIG_OPTION= IGNORE_URL
65 65
66# The binary pkg_install tools all need to consistently to refer to the 66# The binary pkg_install tools all need to consistently to refer to the
67# correct package database directory. 67# correct package database directory.
68# 68#
69PKGTOOLS_ARGS?= -K ${_PKG_DBDIR} 69PKGTOOLS_ARGS?= -K ${_PKG_DBDIR}
70HOST_PKGTOOLS_ARGS?= -K ${_HOST_PKG_DBDIR} 70HOST_PKGTOOLS_ARGS?= -K ${_HOST_PKG_DBDIR}
71 71
72PKG_ADD?= ${PKG_ADD_CMD} ${PKGTOOLS_ARGS} 72PKG_ADD?= ${PKG_ADD_CMD} ${PKGTOOLS_ARGS}
73PKG_ADMIN?= ${PKG_ADMIN_CMD} ${PKGTOOLS_ARGS} 73PKG_ADMIN?= ${PKG_ADMIN_CMD} ${PKGTOOLS_ARGS}
74PKG_CREATE?= ${PKG_CREATE_CMD} ${PKGTOOLS_ARGS} 74PKG_CREATE?= ${PKG_CREATE_CMD} ${PKGTOOLS_ARGS}
75PKG_DELETE?= ${PKG_DELETE_CMD} ${PKGTOOLS_ARGS} 75PKG_DELETE?= ${PKG_DELETE_CMD} ${PKGTOOLS_ARGS}
76PKG_INFO?= ${PKG_INFO_CMD} ${PKGTOOLS_ARGS} 76PKG_INFO?= ${PKG_INFO_CMD} ${PKGTOOLS_ARGS}
77LINKFARM?= ${LINKFARM_CMD} 77LINKFARM?= ${LINKFARM_CMD}
78 78
79HOST_PKG_ADD?= ${PKG_ADD_CMD} ${HOST_PKGTOOLS_ARGS} 79HOST_PKG_ADD?= ${PKG_ADD_CMD} ${HOST_PKGTOOLS_ARGS}
80HOST_PKG_ADMIN?= ${PKG_ADMIN_CMD} ${HOST_PKGTOOLS_ARGS} 80HOST_PKG_ADMIN?= ${PKG_ADMIN_CMD} ${HOST_PKGTOOLS_ARGS}
81HOST_PKG_CREATE?= ${PKG_CREATE_CMD} ${HOST_PKGTOOLS_ARGS} 81HOST_PKG_CREATE?= ${PKG_CREATE_CMD} ${HOST_PKGTOOLS_ARGS}
82HOST_PKG_DELETE?= ${PKG_DELETE_CMD} ${HOST_PKGTOOLS_ARGS} 82HOST_PKG_DELETE?= ${PKG_DELETE_CMD} ${HOST_PKGTOOLS_ARGS}
83HOST_PKG_INFO?= ${PKG_INFO_CMD} ${HOST_PKGTOOLS_ARGS} 83HOST_PKG_INFO?= ${PKG_INFO_CMD} ${HOST_PKGTOOLS_ARGS}
84HOST_LINKFARM?= ${LINKFARM_CMD} 84HOST_LINKFARM?= ${LINKFARM_CMD}
85 85
86# "${_PKG_BEST_EXISTS} pkgpattern" prints out the name of the installed 86# "${_PKG_BEST_EXISTS} pkgpattern" prints out the name of the installed
87# package that best matches pkgpattern. Use this instead of 87# package that best matches pkgpattern. Use this instead of
88# "${PKG_INFO} -e pkgpattern" if the latter would return more than one 88# "${PKG_INFO} -e pkgpattern" if the latter would return more than one
89# package name. 89# package name.
90# 90#
91_PKG_BEST_EXISTS?= ${PKG_INFO} -E 91_PKG_BEST_EXISTS?= ${PKG_INFO} -E
92_HOST_PKG_BEST_EXISTS?= ${HOST_PKG_INFO} -E 92_HOST_PKG_BEST_EXISTS?= ${HOST_PKG_INFO} -E
93 93
94# XXX Leave this here until all uses of this have been purged from the 94# XXX Leave this here until all uses of this have been purged from the
95# XXX public parts of pkgsrc. 95# XXX public parts of pkgsrc.
96# XXX 96# XXX
97PKG_BEST_EXISTS= ${_PKG_BEST_EXISTS} 97PKG_BEST_EXISTS= ${_PKG_BEST_EXISTS}