pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkg pkgtools/pkg: Allow PORTSDIR to be specified
details: https://anonhg.NetBSD.org/pkgsrc/rev/a13c76e25f7f
branches: trunk
changeset: 354360:a13c76e25f7f
user: marino <marino%pkgsrc.org@localhost>
date: Thu Oct 27 13:22:44 2016 +0000
description:
pkgtools/pkg: Allow PORTSDIR to be specified
As pointed out by jperkins, defaulting to builder's setting for PKGSRCDIR
for the sources isn't aways correct for the binary package consumers.
This is not a problem unique to pkgtools/pkg and really requires a system-
wide solution. Until there is such a global variable, rename the PORTSDIR
variable to PKG.portsdir and allow it to be modified by e.g. make.conf.
In the case of pkg, PORTSDIR just refers to a default configuration
location which is overridable by a configuration file.
diffstat:
pkgtools/pkg/Makefile | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (37 lines):
diff -r 0559dfda22f2 -r a13c76e25f7f pkgtools/pkg/Makefile
--- a/pkgtools/pkg/Makefile Thu Oct 27 13:07:35 2016 +0000
+++ b/pkgtools/pkg/Makefile Thu Oct 27 13:22:44 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2016/10/27 00:24:58 khorben Exp $
+# $NetBSD: Makefile,v 1.9 2016/10/27 13:22:44 marino Exp $
DISTNAME= pkg-1.8.7
PKGREVISION= 3
@@ -15,7 +15,7 @@
USE_LANGUAGES= c
CPPFLAGS+= -D_LOCALBASE="\"${PREFIX}\""
-CPPFLAGS+= -DPORTSDIR="\"${PKGSRCDIR}\""
+CPPFLAGS+= -DPORTSDIR="\"${PKG.portsdir}\""
AUTO_MKDIRS= yes
@@ -61,15 +61,15 @@
docs/pkg.conf.5 \
docs/pkg-version.8 \
docs/pkg.8
-SUBST_SED.portsdir= -e "s|/usr/ports|${PORTSDIR}|g" \
+SUBST_SED.portsdir= -e "s|/usr/ports|${PKG.portsdir}|g" \
-e "s|/var/db/pkg|/var/db/pkgng|g" \
-e "s|/var/cache/pkg|/var/cache/pkgng|g"
SUBST_MESSAGE.portsdir= Correct reference to FreeBSD portsdir.
.if defined(PACKAGE_BUILDING) # set by Synth which has custom location, so use default path
-PORTSDIR= /usr/pkgsrc
+PKG.portsdir?= /usr/pkgsrc
.else
-PORTSDIR= ${PKGSRCDIR}
+PKG.portsdir?= ${PKGSRCDIR}
.endif
# DragonFly SSL libraries are private. pkg(8) is the one exception of a userland
Home |
Main Index |
Thread Index |
Old Index