Received: by mail.netbsd.org (Postfix, from userid 605) id CCA2484D72; Fri, 15 Dec 2017 09:17:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 58B1F84D5F for ; Fri, 15 Dec 2017 09:17:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id GiO1qt-k5wCs for ; Fri, 15 Dec 2017 09:17:04 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id C3ED084D33 for ; Fri, 15 Dec 2017 09:17:04 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id BA52BFB40; Fri, 15 Dec 2017 09:17:04 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1513329424147520" MIME-Version: 1.0 Date: Fri, 15 Dec 2017 09:17:04 +0000 From: "Leonardo Taccari" Subject: CVS commit: pkgsrc/pkgtools/lintpkgsrc To: pkgsrc-changes@NetBSD.org Reply-To: leot@netbsd.org X-Mailer: log_accum Message-Id: <20171215091704.BA52BFB40@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1513329424147520 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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 and . Thanks to both and 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. --_----------=_1513329424147520 Content-Disposition: inline Content-Length: 2558 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii 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 @@ -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 . # @@ -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}; --_----------=_1513329424147520--