pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/lintpkgsrc lintpkgsrc: Update pkgtools/lintpk...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b4d5aa87b256
branches:  trunk
changeset: 372750:b4d5aa87b256
user:      leot <leot%pkgsrc.org@localhost>
date:      Fri Dec 15 09:17:04 2017 +0000

description:
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:

 pkgtools/lintpkgsrc/Makefile            |  15 ++++++++-------
 pkgtools/lintpkgsrc/files/lintpkgsrc.pl |  11 ++++++-----
 2 files changed, 14 insertions(+), 12 deletions(-)

diffs (66 lines):

diff -r 45c07a2f0e78 -r b4d5aa87b256 pkgtools/lintpkgsrc/Makefile
--- a/pkgtools/lintpkgsrc/Makefile      Fri Dec 15 09:15:01 2017 +0000
+++ b/pkgtools/lintpkgsrc/Makefile      Fri Dec 15 09:17:04 2017 +0000
@@ -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@localhost
@@ -21,13 +21,14 @@
 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 -r 45c07a2f0e78 -r b4d5aa87b256 pkgtools/lintpkgsrc/files/lintpkgsrc.pl
--- a/pkgtools/lintpkgsrc/files/lintpkgsrc.pl   Fri Dec 15 09:15:01 2017 +0000
+++ b/pkgtools/lintpkgsrc/files/lintpkgsrc.pl   Fri Dec 15 09:17:04 2017 +0000
@@ -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@localhost>.
 #
@@ -23,9 +23,10 @@
 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 @@
             $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};



Home | Main Index | Thread Index | Old Index