summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcjep <cjep@pkgsrc.org>2004-01-10 16:27:06 +0000
committercjep <cjep@pkgsrc.org>2004-01-10 16:27:06 +0000
commita313ade2854e615d5944711ba40ffca61b2cb97a (patch)
tree86343d5034fc1c70d2689ae59e34e31e1f8c4913
parentb50a383dedb9d01129595bc2b200015ff4c82cc4 (diff)
downloadpkgsrc-a313ade2854e615d5944711ba40ffca61b2cb97a.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++;