summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcjep <cjep>2004-01-10 16:27:06 +0000
committercjep <cjep>2004-01-10 16:27:06 +0000
commit4351d290a4372c98db22316ed93949b5e504789b (patch)
tree86343d5034fc1c70d2689ae59e34e31e1f8c4913
parent9d5f6e531b6d82487cef6423a77b493be9ab816e (diff)
downloadpkgsrc-4351d290a4372c98db22316ed93949b5e504789b.tar.gz
Don't die if pkg-comment does not exist. Some ports have a COMMENT= in
their Makefile already.
-rw-r--r--pkgtools/port2pkg/Makefile4
-rwxr-xr-xpkgtools/port2pkg/files/port2pkg.pl18
2 files changed, 12 insertions, 10 deletions
diff --git a/pkgtools/port2pkg/Makefile b/pkgtools/port2pkg/Makefile
index 3aa9b35e252..c52481e5b99 100644
--- a/pkgtools/port2pkg/Makefile
+++ b/pkgtools/port2pkg/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.19 2004/01/10 16:10:35 cjep Exp $
+# $NetBSD: Makefile,v 1.20 2004/01/10 16:27:06 cjep Exp $
#
DISTNAME= port2pkg-1.11
-PKGREVISION= 1
+PKGREVISION= 2
WRKSRC= ${WRKDIR}
CATEGORIES= pkgtools
MASTER_SITES= # empty
diff --git a/pkgtools/port2pkg/files/port2pkg.pl b/pkgtools/port2pkg/files/port2pkg.pl
index d607c3ccd6f..98b7a0dd970 100755
--- a/pkgtools/port2pkg/files/port2pkg.pl
+++ b/pkgtools/port2pkg/files/port2pkg.pl
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
#
-# $NetBSD: port2pkg.pl,v 1.12 2004/01/10 16:10:35 cjep Exp $
+# $NetBSD: port2pkg.pl,v 1.13 2004/01/10 16:27:06 cjep Exp $
#
require 'getopts.pl';
@@ -234,14 +234,16 @@ sub conv_Makefile {
}
}
close(DESCR);
- open(COMMENT, "$pkgdir/COMMENT")
- || die "$pkgdir/COMMENT: $!\n";
- while (<COMMENT>) {
- chomp;
- print PKG "COMMENT=\t$_\n";
+ if ( -f "$pkgdir/COMMENT") {
+ open(COMMENT, "$pkgdir/COMMENT")
+ || die "$pkgdir/COMMENT: $!\n";
+ while (<COMMENT>) {
+ chomp;
+ print PKG "COMMENT=\t$_\n";
+ }
+ close(COMMENT);
+ unlink("$pkgdir/COMMENT");
}
- close(COMMENT);
- unlink("$pkgdir/COMMENT");
} elsif ($noportdocs || /^\.if.*NOPORTDOCS/) {
if (/^\.if/) {
$noportdocs++;