Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Sep 2012 19:25:59 +0000 (UTC)
From:      Chris Rees <crees@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r304592 - head/Tools/scripts
Message-ID:  <201209201925.q8KJPx9P081604@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: crees
Date: Thu Sep 20 19:25:59 2012
New Revision: 304592
URL: http://svn.freebsd.org/changeset/ports/304592

Log:
  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

Modified:
  head/Tools/scripts/addport

Modified: head/Tools/scripts/addport
==============================================================================
--- head/Tools/scripts/addport	Thu Sep 20 19:13:15 2012	(r304591)
+++ head/Tools/scripts/addport	Thu Sep 20 19:25:59 2012	(r304592)
@@ -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";



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209201925.q8KJPx9P081604>