From owner-svn-ports-head@FreeBSD.ORG Thu Sep 20 19:26:00 2012 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 42F0B106566C; Thu, 20 Sep 2012 19:26:00 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E6E28FC0C; Thu, 20 Sep 2012 19:26:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KJQ0sb081606; Thu, 20 Sep 2012 19:26:00 GMT (envelope-from crees@svn.freebsd.org) Received: (from crees@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KJPx9P081604; Thu, 20 Sep 2012 19:25:59 GMT (envelope-from crees@svn.freebsd.org) Message-Id: <201209201925.q8KJPx9P081604@svn.freebsd.org> From: Chris Rees Date: Thu, 20 Sep 2012 19:25:59 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r304592 - head/Tools/scripts X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 19:26:00 -0000 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() { 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";