pkgsrc-Users archive

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

[PATCH] when REPLACE_PYTHON is used



By reading the last line of TODO (of pkgtools/pkglint),
I added one more rule for REPLACE_PYTHON

---
mef%NetBSD.org@localhost
Makoto Fujiwara, 
Chiba, Japan, Narita Airport and Disneyland prefecture.
Index: pkgtools/pkglint/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkglint/Makefile,v
retrieving revision 1.454
diff -u -r1.454 Makefile
--- pkgtools/pkglint/Makefile	23 Nov 2014 15:30:07 -0000	1.454
+++ pkgtools/pkglint/Makefile	24 Nov 2014 01:19:23 -0000
@@ -3,7 +3,7 @@
 # Note: if you update the version number, please have a look at the
 # changes between the CVS tag "pkglint_current" and HEAD.
 # After updating, please re-set the CVS tag to HEAD.
-PKGNAME=	pkglint-4.148
+PKGNAME=	pkglint-4.149
 CATEGORIES=	pkgtools
 
 OWNER=		wiz%NetBSD.org@localhost
Index: pkgtools/pkglint/files/pkglint.pl
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkglint/files/pkglint.pl,v
retrieving revision 1.873
diff -u -r1.873 pkglint.pl
--- pkgtools/pkglint/files/pkglint.pl	9 Oct 2014 13:54:47 -0000	1.873
+++ pkgtools/pkglint/files/pkglint.pl	24 Nov 2014 01:19:25 -0000
@@ -6169,6 +6169,17 @@
 		$pkgctx_vardef->{"NO_CONFIGURE"}->log_warning("... NO_CONFIGURE is set.");
 	}
 
+	if (exists($pkgctx_vardef->{"REPLACE_PERL"})) {
+		my $tools_line = $pkgctx_vardef->{"USE_TOOLS"};
+		my $value = $tools_line->get("value");
+				 if (grep (/perl:run/, $value) <= 0) {
+		$pkgctx_vardef->{"USE_TOOLS"}->log_error("REPLACE_PERL is used. Add perl:run in USE_TOOLS.");
+				 }}
+
+	if (exists($pkgctx_vardef->{"REPLACE_PYTHON"})) {
+				 if (defined($pkgctx_included) && !exists($pkgctx_included->{"../../lang/python/application.mk"})) {
+	$pkgctx_vardef->{"USE_TOOLS"}->log_error("REPLACE_PYTHON is used. Add .include \"../../lang/python/application.mk\"."); }}
+ 
 	if (!exists($pkgctx_vardef->{"LICENSE"})) {
 		log_error($fname, NO_LINE_NUMBER, "Each package must define its LICENSE.");
 	}


Home | Main Index | Thread Index | Old Index