pkgsrc-Changes archive

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

CVS commit: pkgsrc/pkgtools/lintpkgsrc



Module Name:    pkgsrc
Committed By:   leot
Date:           Fri Dec 15 09:17:04 UTC 2017

Modified Files:
        pkgsrc/pkgtools/lintpkgsrc: Makefile
        pkgsrc/pkgtools/lintpkgsrc/files: lintpkgsrc.pl

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


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 pkgsrc/pkgtools/lintpkgsrc/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl

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

Modified files:

Index: pkgsrc/pkgtools/lintpkgsrc/Makefile
diff -u pkgsrc/pkgtools/lintpkgsrc/Makefile:1.27 pkgsrc/pkgtools/lintpkgsrc/Makefile:1.28
--- pkgsrc/pkgtools/lintpkgsrc/Makefile:1.27    Thu Dec 14 14:11:40 2017
+++ pkgsrc/pkgtools/lintpkgsrc/Makefile Fri Dec 15 09:17:04 2017
@@ -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_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"
 

Index: pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl
diff -u pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.13 pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.14
--- pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl:1.13 Thu Dec 14 14:11:40 2017
+++ pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl      Fri Dec 15 09:17:04 2017
@@ -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 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};



Home | Main Index | Thread Index | Old Index