summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorleot <leot@pkgsrc.org>2017-12-15 09:17:04 +0000
committerleot <leot@pkgsrc.org>2017-12-15 09:17:04 +0000
commit5648c31985fc821a0e91c37781ed93958e85ed24 (patch)
tree147798465aa6107480a6ee0262482a9d24a9647a /pkgtools
parent65879c0ed4b6a5cf454b8246e51afde0468c3b18 (diff)
downloadpkgsrc-5648c31985fc821a0e91c37781ed93958e85ed24.tar.gz
lintpkgsrc: Update pkgtools/lintpkgsrc to 4.94
pkgsrc changes: - Use SUBST_VARS instead of SUBST_SED to adjust the several variables in files/lintpkgsrc.pl and avoid some make contortionism in the remaining SUBST_SED Changes: - PKG_SYSCONFDIR can be different to ${PREFIX}/etc, instruct lintpkgsrc about that to possibly pick mk.conf when an /etc/mk.conf file is not available Discussed on pkgsrc-changes@ with <adam> and <jperkin>. Thanks to both <adam> and <jperkin> for feedback, suggestions and review!
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/lintpkgsrc/Makefile15
-rwxr-xr-xpkgtools/lintpkgsrc/files/lintpkgsrc.pl11
2 files changed, 14 insertions, 12 deletions
diff --git a/pkgtools/lintpkgsrc/Makefile b/pkgtools/lintpkgsrc/Makefile
index 88146816e76..3f4e1c88d55 100644
--- a/pkgtools/lintpkgsrc/Makefile
+++ b/pkgtools/lintpkgsrc/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.27 2017/12/14 14:11:40 adam Exp $
+# $NetBSD: Makefile,v 1.28 2017/12/15 09:17:04 leot Exp $
-PKGNAME= lintpkgsrc-4.93
+PKGNAME= lintpkgsrc-4.94
CATEGORIES= pkgtools
MAINTAINER= pkgsrc-users@NetBSD.org
@@ -21,13 +21,14 @@ SUBST_CLASSES+= lp
SUBST_STAGE.lp= post-configure
SUBST_FILES.lp+= lintpkgsrc.0 lintpkgsrc.1 lintpkgsrc.pl
.if defined(BATCH)
-SUBST_SED.lp+= -e s\|@PKGSRCDIR@\|/usr/pkgsrc\|g
+SUBST_SED.lp+= -e 's;@PKGSRCDIR@;/usr/pkgsrc;g'
.else
-SUBST_SED.lp+= -e s\|@PKGSRCDIR@\|${PKGSRCDIR}\|g
+SUBST_VARS.lp+= PKGSRCDIR
.endif
-SUBST_SED.lp+= -e s\|@PREFIX@\|${PREFIX}\|g
-SUBST_SED.lp+= -e s\|@MAKE@\|${MAKE:Q}\|g
-SUBST_SED.lp+= -e s\|@PERL@\|${PERL5:Q}\|g
+SUBST_VARS.lp+= PREFIX
+SUBST_VARS.lp+= PKG_SYSCONFDIR
+SUBST_VARS.lp+= MAKE
+SUBST_VARS.lp+= PERL
.include "../../mk/bsd.prefs.mk"
diff --git a/pkgtools/lintpkgsrc/files/lintpkgsrc.pl b/pkgtools/lintpkgsrc/files/lintpkgsrc.pl
index cc14f1684bd..6a1f403b23e 100755
--- a/pkgtools/lintpkgsrc/files/lintpkgsrc.pl
+++ b/pkgtools/lintpkgsrc/files/lintpkgsrc.pl
@@ -1,6 +1,6 @@
#! @PERL@
-# $NetBSD: lintpkgsrc.pl,v 1.13 2017/12/14 14:11:40 adam Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.14 2017/12/15 09:17:04 leot Exp $
# Written by David Brownlee <abs@netbsd.org>.
#
@@ -23,9 +23,10 @@ use IPC::Open3;
use Cwd 'realpath', 'getcwd';
# Buildtime configuration
-my $conf_make = '@MAKE@';
-my $conf_pkgsrcdir = '@PKGSRCDIR@';
-my $conf_prefix = '@PREFIX@';
+my $conf_make = '@MAKE@';
+my $conf_pkgsrcdir = '@PKGSRCDIR@';
+my $conf_prefix = '@PREFIX@';
+my $conf_sysconfdir = '@PKG_SYSCONFDIR@';
my (
$pkglist, # list of Pkg packages
@@ -613,7 +614,7 @@ sub get_default_makefile_vars() {
$default_vars->{$var} = $vars->{$var};
}
}
- elsif ( -f ${conf_prefix} . '/etc/mk.conf' && ( $vars = parse_makefile_vars(${conf_prefix} . '/etc/mk.conf') ) )
+ elsif ( -f ${conf_sysconfdir} . '/mk.conf' && ( $vars = parse_makefile_vars(${conf_sysconfdir} . '/mk.conf') ) )
{
foreach my $var ( keys %{$vars} ) {
$default_vars->{$var} = $vars->{$var};