Index: addport =================================================================== RCS file: /home/ncvs/ports/Tools/scripts/addport,v retrieving revision 1.18 diff -u -u -r1.18 addport --- addport 2001/01/01 05:50:33 1.18 +++ addport 2001/01/01 06:58:16 @@ -45,8 +45,9 @@ my %opts; -getopts('ac:d:fgh:il:mns:tu:', \%opts); +getopts('ac:d:fgh:il:mnp:s:tu:', \%opts); +my $langprefix = $opts{'p'} . "-" if ($opts{'p'} ne ""); my $autofill = $opts{'l'}; my $c = $opts{'c'} if ($opts{'c'} ne ""); my $nomodules = $opts{'g'}; @@ -192,9 +193,9 @@ chomp(my $cvs_category = $category); $cvs_category =~ s/-/_/g; - $module = $portname; + $module = $langprefix . $portname; if ($interactive) { - if (prompt("Port will be added as module $portname. OK? ")) { + if (prompt("Port will be added as module $module. OK? ")) { do { $module = query("Preferred module name for $module? "); } while (prompt("Is the new module name $module OK? ")); @@ -231,7 +232,7 @@ # Obtain length of the current string so we can figure out where to # insert the \n. This is necessary to keep the commitfile under the # limit for commit messages and such. - $tmp = length($portversion) + length($portname) + 10; + $tmp = length($portversion) + length($module) + 10; $offset = 72 - $tmp; # If the comment string is longer than we have space for it, insert # the \n after the last word that doesn't exceed the limit. @@ -261,7 +262,7 @@ $pkgcomment = $pkgcomment . "\n\n" if ($autofill != -1); # Write out the data to the comment file. open(AUTOFILL, "> $tmpdir/commitfile") or die("Can't open $tmpdir/commitfile for writing: $!"); - print AUTOFILL "Add $portname $portversion, $pkgcomment"; + print AUTOFILL "Add $module $portversion, $pkgcomment"; print AUTOFILL "PR: $autofill\n" if ($autofill != -1); print AUTOFILL "Submitted by: $orig" if ($autofill != -1); close(AUTOFILL); @@ -382,7 +383,8 @@ authors: , SYNOPSIS - $0 [-h host] [-u user] [-s distdir] [-acfilmnt] -d directory + $0 [-c commitfile] [-h host] [-l PR number] [-p langprefix] [-u user] + [-s distdir] [-afimnt] -d directory Where "directory" contains the comma-delimited list of root directories of new ports that you wish to @@ -406,6 +408,7 @@ -m Do not checkout ports/Mk (needed for support of portlinting etc). -n Do not actually commit anything. + -p langprefix Use a language prefix when adding the module. -s distdir Use a different directory besides the default, for downloading distfiles. This defaults to the temporary directory set up on freefall.