pkgsrc-Changes archive

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

Re: CVS commit: pkgsrc/pkgtools/lintpkgsrc



Hello Adam,

Adam writes:
> Probably we can. I guess it has to be passed from Makefile (via SUBST).
> I'm not much into Perl. Can someone, please, take a look into it? :)
> [...]

I have not tested it but the attached patch should do the trick.

Please let me know if it correctly works and I'll commit it.


Thank you!
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/lintpkgsrc/Makefile,v
retrieving revision 1.27
diff -u -p -r1.27 Makefile
--- Makefile    14 Dec 2017 14:11:40 -0000      1.27
+++ Makefile    14 Dec 2017 20:37:44 -0000
@@ -1,6 +1,6 @@
 # $NetBSD: Makefile,v 1.27 2017/12/14 14:11:40 adam Exp $
 
-PKGNAME=       lintpkgsrc-4.93
+PKGNAME=       lintpkgsrc-4.94
 CATEGORIES=    pkgtools
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
@@ -26,6 +26,7 @@ SUBST_SED.lp+=        -e s\|@PKGSRCDIR@\|/usr/p
 SUBST_SED.lp+= -e s\|@PKGSRCDIR@\|${PKGSRCDIR}\|g
 .endif
 SUBST_SED.lp+= -e s\|@PREFIX@\|${PREFIX}\|g
+SUBST_SED.lp+= -e s\|@PKG_SYSCONFDIR@\|${PKG_SYSCONFDIR:Q}\|g
 SUBST_SED.lp+= -e s\|@MAKE@\|${MAKE:Q}\|g
 SUBST_SED.lp+= -e s\|@PERL@\|${PERL5:Q}\|g
 
Index: files/lintpkgsrc.pl
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/lintpkgsrc/files/lintpkgsrc.pl,v
retrieving revision 1.13
diff -u -p -r1.13 lintpkgsrc.pl
--- files/lintpkgsrc.pl 14 Dec 2017 14:11:40 -0000      1.13
+++ files/lintpkgsrc.pl 14 Dec 2017 20:37:45 -0000
@@ -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