pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/pkgtools/pkg



Module Name:    pkgsrc
Committed By:   marino
Date:           Thu Oct 27 13:22:44 UTC 2016

Modified Files:
        pkgsrc/pkgtools/pkg: Makefile

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/pkgtools/pkg/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/pkg/Makefile
diff -u pkgsrc/pkgtools/pkg/Makefile:1.8 pkgsrc/pkgtools/pkg/Makefile:1.9
--- pkgsrc/pkgtools/pkg/Makefile:1.8    Thu Oct 27 00:24:58 2016
+++ pkgsrc/pkgtools/pkg/Makefile        Thu Oct 27 13:22:44 2016
@@ -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 @@ GNU_CONFIGURE=        yes
 USE_LANGUAGES= c
 
 CPPFLAGS+=     -D_LOCALBASE="\"${PREFIX}\""
-CPPFLAGS+=     -DPORTSDIR="\"${PKGSRCDIR}\""
+CPPFLAGS+=     -DPORTSDIR="\"${PKG.portsdir}\""
 
 AUTO_MKDIRS=   yes
 
@@ -61,15 +61,15 @@ SUBST_FILES.portsdir=               libpkg/pkg_config
                                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