summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2012-09-20 19:25:59 +0000
committerChris Rees <crees@FreeBSD.org>2012-09-20 19:25:59 +0000
commit84a9fa5eb66b9ed838e5cf5c65a9592d64cb5815 (patch)
tree5cea44b46a4ce2814bda2ce9aec1a22e26b788e0 /Tools
parentConvert to OptionsNG (diff)
bsd.port.mk handles getting the primary category for us
Since Created by: line appears to be popular, get Submitted by: from that Old-style Makefile headers should no longer be used
Notes
Notes: svn path=/head/; revision=304592
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/addport9
1 files changed, 4 insertions, 5 deletions
diff --git a/Tools/scripts/addport b/Tools/scripts/addport
index 9cabca072693..7115344bc6cc 100755
--- a/Tools/scripts/addport
+++ b/Tools/scripts/addport
@@ -232,9 +232,7 @@ foreach my $thisdir (@dirs) {
# Get the category name and make it suitable for use with svn
my $category;
- $_ = `$make -V CATEGORIES`;
- m/([\w-]+)/;
- $category = $1;
+ $category = `$make -V PKGCATEGORY`;
chomp $category;
if ($interactive) {
if (prompt("Port $portname will be put in category $category. OK? " )) {
@@ -271,7 +269,8 @@ foreach my $thisdir (@dirs) {
open(MAKEFILE, "Makefile") or die("Can't open Makefile for reading: $!");
while(<MAKEFILE>) {
chomp;
- ($maintainer) = (m/^MAINTAINER=\s+(\w.*)$/) if (/^MAINTAINER=/);
+ die ("Old style Makefile headers detected") if (/^# (?:[Nn]ew )?[Pp]orts collection [Mm]akefile/);
+ ($maintainer) = (m/^# Created by:\s+(\w.*)$/) if (/^# Created by/);
($portversion) = (m/^PORTVERSION=\s+(\w.*)$/) if (/^PORTVERSION=/);
}
close(MAKEFILE);
@@ -293,7 +292,7 @@ foreach my $thisdir (@dirs) {
}
print AUTOFILL $tmp;
print AUTOFILL "PR: ports/$autofill\n" if ($autofill != -1);
- print AUTOFILL "Submitted by: $maintainer" if ($autofill != -1);
+ print AUTOFILL "Submitted by: $maintainer" if ($maintainer && $autofill != -1);
close(AUTOFILL);
print "Okay, a commit log message was automatically generated for you.\n";
print "Now you will have a chance to edit it to make sure it's OK to use.\n";