summaryrefslogtreecommitdiff
path: root/ports-mgmt/porttools
diff options
context:
space:
mode:
authorTAKATSU Tomonari <tota@FreeBSD.org>2013-03-02 00:40:53 +0000
committerTAKATSU Tomonari <tota@FreeBSD.org>2013-03-02 00:40:53 +0000
commitcae75110cc2937087576c178ff441b74c955b14b (patch)
tree29d5b1ee38c82043ea361b3f3d507733af92cde6 /ports-mgmt/porttools
parentUpdate to Wine 1.5.54. This includes the following changes: (diff)
- Switch the VCS tool for the ports tree from CVS to SVN
- Pet portlint in porttools * Use PORT_OPTIONS:MDOCS instead of NOPORTDOCS * Replace tab with space WWW: line in pkg-descr PR: ports/174860 Submitted by: tota (myself) Approved by: maintainers (timeout > 2 months)
Notes
Notes: svn path=/head/; revision=313176
Diffstat (limited to 'ports-mgmt/porttools')
-rw-r--r--ports-mgmt/porttools/Makefile13
-rw-r--r--ports-mgmt/porttools/files/patch-README61
-rw-r--r--ports-mgmt/porttools/files/patch-cmd_commit.in67
-rw-r--r--ports-mgmt/porttools/files/patch-cmd_diff.in11
-rw-r--r--ports-mgmt/porttools/files/patch-cmd_submit.in82
-rw-r--r--ports-mgmt/porttools/files/patch-port.143
-rw-r--r--ports-mgmt/porttools/files/patch-port.in11
-rw-r--r--ports-mgmt/porttools/files/patch-porttools.56
-rw-r--r--ports-mgmt/porttools/files/patch-util_diff.in80
-rw-r--r--ports-mgmt/porttools/pkg-descr2
10 files changed, 257 insertions, 119 deletions
diff --git a/ports-mgmt/porttools/Makefile b/ports-mgmt/porttools/Makefile
index 935d7fd9cc22..a3b816f0eef7 100644
--- a/ports-mgmt/porttools/Makefile
+++ b/ports-mgmt/porttools/Makefile
@@ -3,7 +3,7 @@
PORTNAME= porttools
PORTVERSION= 0.99
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= ports-mgmt
MASTER_SITES= SF
@@ -14,11 +14,8 @@ LICENSE= BSD
RUN_DEPENDS= portlint:${PORTSDIR}/ports-mgmt/portlint \
cdiff:${PORTSDIR}/textproc/cdiff \
- sudo:${PORTSDIR}/security/sudo
-
-.if !defined(NOPORTDOCS)
-INSTALL_TARGET= install install-docs
-.endif
+ sudo:${PORTSDIR}/security/sudo \
+ svn:${PORTSDIR}/devel/subversion
MAKE_ENV= DATADIR="${DATADIR}" DOCSDIR="${DOCSDIR}"
# Make the version information of porttools itself
@@ -45,4 +42,8 @@ NEWFILE_DESC= Enable newfile support
RUN_DEPENDS+= newfile:${PORTSDIR}/devel/newfile
.endif
+.if ${PORT_OPTIONS:MDOCS}
+INSTALL_TARGET= install install-docs
+.endif
+
.include <bsd.port.mk>
diff --git a/ports-mgmt/porttools/files/patch-README b/ports-mgmt/porttools/files/patch-README
new file mode 100644
index 000000000000..b71e48b6b774
--- /dev/null
+++ b/ports-mgmt/porttools/files/patch-README
@@ -0,0 +1,61 @@
+--- README.orig 2009-09-10 04:59:59.000000000 +0900
++++ README 2012-12-27 19:22:20.000000000 +0900
+@@ -7,7 +7,7 @@
+
+ FreeBSD Port Tools consist of the several small scripts run from
+ port(1) front-end:
+-- port commit: commit a port into the FreeBSD Ports CVS Repository
++- port commit: commit a port into the FreeBSD Ports SVN Repository
+ - port create: create a new port from a template
+ - port diff: generate a diff against a previous version of the port
+ - port fetch: fetch distfile(s) of a new version of the port
+@@ -43,42 +43,35 @@
+ Let us assume you are interested in helping out with one of the ports.
+ The most convenient way of doing that with the Port Tools is the following.
+ Even though the Port Tools have 3 most of diff generation, the recommended is
+-CVS (default). Do not be scared away at this point - it is very simple.
++SVN (default). Do not be scared away at this point - it is very simple.
+ Let me give a quick overview:
+
+-1. Set up CVSROOT environment variable
+-
+- sgk@elf% export CVSROOT=":pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs"
+-
+- NOTE: you may want to check the Handbook for a list of anonymous CVS servers
+- (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/anoncvs.html).
+-
+-2. Check out a working copy of the port. I usually do it in ~/ports directory:
++1. Check out a working copy of the port. I usually do it in ~/ports directory:
+ (NOTE: my ~/ports directory contains only those ports I am interested in,
+ i.e. either maitain or send changes/updates to. Thus, it does not have
+ to contain the whole FreeBSD Ports tree)
+
+ sgk@elf:~% cd ~/ports
+- sgk@elf:~/ports% cvs co ipsvd
++ sgk@elf:~/ports% svn co ipsvd
+
+ ipsvd is the sample port name.
+
+-3. Now, make your changes - e.g. change PORTVERSION from 0.6.0 to 0.6.1.
++2. Now, make your changes - e.g. change PORTVERSION from 0.6.0 to 0.6.1.
+
+ sgk@elf:~/ports/ipsvd% cd ipsvd
+ sgk@elf:~/ports/ipsvd% vim Makefile
+
+-4. At this moment we need to fetch the new distfile and run "make makesum"
++3. At this moment we need to fetch the new distfile and run "make makesum"
+ to update the distinfo file. There is even simpler way to accomplish this
+ with the Port Tools version 0.50 or later:
+
+ sgk@elf:~/ports/ipsvd% port fetch
+
+-5. Now we want to make sure that the port compiles, installs and works fine:
++4. Now we want to make sure that the port compiles, installs and works fine:
+
+ sgk@elf:~/ports/ipsvd% port test
+
+-6. Once I am satisfied with the results, let us submit a PR
++5. Once I am satisfied with the results, let us submit a PR
+ with the port update:
+
+ sgk@elf:~/ports/ipsvd% port submit
diff --git a/ports-mgmt/porttools/files/patch-cmd_commit.in b/ports-mgmt/porttools/files/patch-cmd_commit.in
new file mode 100644
index 000000000000..00fc765dca88
--- /dev/null
+++ b/ports-mgmt/porttools/files/patch-cmd_commit.in
@@ -0,0 +1,67 @@
+--- cmd_commit.in.orig 2009-09-10 04:59:59.000000000 +0900
++++ cmd_commit.in 2012-12-31 21:42:13.000000000 +0900
+@@ -1,6 +1,6 @@
+ # cmd_commit
+ # Module for port(1)
+-# SUMMARY: commit a port into the FreeBSD Ports CVS Repository
++# SUMMARY: commit a port into the FreeBSD Ports SVN Repository
+ #
+ # $Id: cmd_commit.in,v 1.2 2009/09/09 19:58:30 skolobov Exp $
+ #
+@@ -59,13 +59,14 @@
+
+ # Determine if this is a new port
+ MODE="update"
+-[ "`grep '\$FreeBSD: ' Makefile`" ] || MODE="new"
++svn status Makefile 2>&1 1>/dev/null | grep -qs 'svn: warning: W155007:'
++[ $? -eq 0 ] || [ "`grep '\$FreeBSD: ' Makefile`" ] || MODE="new"
+
+ # Run portlint(1) to validate port's sanity
+ echo "===> Pre-commit portlint check"
+ FLAGS="-C"
+ [ "${MODE}" = "new" ] && FLAGS="${FLAGS} -N"
+-PL_CVS_IGNORE='^\d+$|^pr-patch$|^cvs-msg$' \
++PL_SVN_IGNORE='^\d+$|^pr-patch$|^svn-msg$' \
+ portlint ${FLAGS}
+ if [ $? -ne 0 ]
+ then
+@@ -79,15 +80,12 @@
+ then
+ ${PORTSDIR}/Tools/scripts/addport -d `pwd` -u ${FREEFALL_USERNAME}
+ else
+- # Initialize CVS environment
+- PCVS="cvs -d ${FREEFALL_USERNAME}@pcvs.FreeBSD.org:/home/pcvs"
+-
+ # Make sure we are working with up-to-date version
+- echo "===> Pre-commit CVS update"
+- ${PCVS} update
++ echo "===> Pre-commit SVN update"
++ svn update
+
+- # See if CVS message already exists, and use that for commit log
+- MSG="cvs-msg"
++ # See if SVN message already exists, and use that for commit log
++ MSG="svn-msg"
+ FLAGS=""
+ if [ -e ${MSG} ]
+ then
+@@ -99,16 +97,16 @@
+ echo '============================================='
+ cat ${MSG}
+ echo '============================================='
+- read -p "Is the CVS message above correct? (y/n)" ANSWER
++ read -p "Is the SVN message above correct? (y/n)" ANSWER
+ [ "${ANSWER}" = "y" ] && break
+ ${VISUAL:-vi} ${MSG}
+ done
+ fi
+ # Commit the port update
+ echo "===> Committing port update"
+- ${PCVS} commit ${FLAGS}
++ svn commit ${FLAGS}
+
+- # Remove CVS message file only if commit was successful
++ # Remove SVN message file only if commit was successful
+ [ $? -eq 0 -a -e ${MSG} ] && rm ${MSG}
+ fi
+
diff --git a/ports-mgmt/porttools/files/patch-cmd_diff.in b/ports-mgmt/porttools/files/patch-cmd_diff.in
index 23629482ade1..d877243ae7c0 100644
--- a/ports-mgmt/porttools/files/patch-cmd_diff.in
+++ b/ports-mgmt/porttools/files/patch-cmd_diff.in
@@ -1,10 +1,11 @@
---- cmd_diff.in.orig 2009-09-09 21:59:59.000000000 +0200
-+++ cmd_diff.in 2009-10-25 16:28:14.000000000 +0100
-@@ -21,6 +21,7 @@
+--- cmd_diff.in.orig 2009-09-10 04:59:59.000000000 +0900
++++ cmd_diff.in 2012-12-27 20:13:30.000000000 +0900
+@@ -20,7 +20,7 @@
+ Usage: port diff [-h] [-d <diff mode>]
-h - Display this usage summary
-d <diff mode> - Select diff generation mode:
- CVS - against CVS
-+ CVSauto - against CVS, no cvs add/delete required
+- CVS - against CVS
++ SVN - against SVN
<dir> - against Ports tree in <dir>
<pattern> - against original port in <pwd><pattern>
EOF
diff --git a/ports-mgmt/porttools/files/patch-cmd_submit.in b/ports-mgmt/porttools/files/patch-cmd_submit.in
index 7fc79b6fe4ed..3b6bcb5a2eec 100644
--- a/ports-mgmt/porttools/files/patch-cmd_submit.in
+++ b/ports-mgmt/porttools/files/patch-cmd_submit.in
@@ -1,10 +1,11 @@
---- cmd_submit.in.orig 2009-09-09 20:59:59.000000000 +0100
-+++ cmd_submit.in 2012-03-04 12:02:36.697273154 +0000
-@@ -26,10 +26,12 @@
+--- cmd_submit.in.orig 2009-09-10 04:59:59.000000000 +0900
++++ cmd_submit.in 2012-12-31 23:10:59.000000000 +0900
+@@ -25,11 +25,12 @@
+ change - changing a port
update - updating a port to newer version
-d <diff mode> - Select diff generation mode:
- CVS - against CVS
-+ CVSauto - against CVS, no cvs add/delete required
+- CVS - against CVS
++ SVN - against SVN
<dir> - against Ports tree in <dir>
<pattern> - against original port in <pwd><pattern>
-s <severity> - Set PR's severity to <severity>
@@ -13,7 +14,7 @@
-c - committer mode: more portlint(1) checks
-L - Skip running portlint(1)
EOF
-@@ -41,9 +43,10 @@
+@@ -41,9 +42,10 @@
PRIORITY="low"
COMMITTER="no"
RUN_PORTLINT="yes"
@@ -25,7 +26,7 @@
if [ $? != 0 ]
then
echo "Error: invalid arguments"
-@@ -116,6 +119,10 @@
+@@ -116,6 +118,10 @@
-L)
RUN_PORTLINT="no"
;;
@@ -36,13 +37,18 @@
esac
shift
done
-@@ -126,6 +133,15 @@
- [ "`grep '\$FreeBSD: ' Makefile`" ] || MODE="new"
+@@ -123,9 +129,19 @@
+ # Determine if this is a new port
+ if [ "${MODE}" = "" ]
+ then
+- [ "`grep '\$FreeBSD: ' Makefile`" ] || MODE="new"
++ svn status Makefile 2>&1 1>/dev/null | grep -qs 'svn: warning: W155007:'
++ [ $? -eq 0 ] || [ "`grep '\$FreeBSD: ' Makefile`" ] || MODE="new"
fi
+# util_diff will set
+# - PORTBASENAME if PORTNAME != port's directory name
-+# - DIFF_TYPE to CVS, CVSauto, ports, or suffix
++# - DIFF_TYPE to SVN, ports, or suffix
+PORTBASENAME=""
+DIFF_TYPE=""
+
@@ -52,7 +58,7 @@
# Run portlint(1) to validate port's sanity
if [ "${RUN_PORTLINT}" = "yes" ]
then
-@@ -133,10 +149,24 @@
+@@ -133,10 +149,13 @@
FLAGS="-${PORTLINT_FLAGS:-abt}"
[ "${COMMITTER}" = "yes" ] && FLAGS="${FLAGS} -c"
[ "${MODE}" = "new" ] && FLAGS="${FLAGS} -N"
@@ -64,22 +70,11 @@
+ else
+ cat ${TEMPROOT}/.portlint.out
echo "Error validating port"
-+ if [ "$DIFF_MODE" = "CVSauto" ]
-+ then
-+ grep "^FATAL:" ${TEMPROOT}/.portlint.out > ${TEMPROOT}/.portlint.fatal
-+ if ! egrep -qv '^FATAL:[[:space:]]+(file .+ not in CVS|CVS file .+ missing)' ${TEMPROOT}/.portlint.fatal
-+ then
-+ echo "All fatal portlint errors are CVS errors,"
-+ echo "consider using portlint without the -c flag or"
-+ echo "use 'port submit -L' if all portlint messages are"
-+ echo "caused by your intentional addition/deletion of files"
-+ fi
-+ fi
+ rm -rf ${TEMPROOT}
exit 1
fi
else
-@@ -146,6 +176,12 @@
+@@ -146,6 +165,12 @@
# Collect information about the port
PORTNAME="`make -V PKGNAMEPREFIX``make -V PORTNAME``make -V PKGNAMESUFFIX`"
PORTVERSION="`make -V PORTVERSION`"
@@ -92,7 +87,7 @@
PKGNAME="`make -V PKGNAME`"
CATEGORY="`make -V CATEGORIES | sed -E 's/^([^ ]+).*$/\1/'`"
MAINTAINER="`make -V MAINTAINER`"
-@@ -155,9 +191,6 @@
+@@ -155,9 +180,6 @@
RELEASE="`uname -srp`"
SYSTEM="`uname -a | cut -d ' ' -f 1-12`"
@@ -102,7 +97,7 @@
CC=""
if [ "${MODE}" = "new" ]
then
-@@ -194,10 +227,10 @@
+@@ -194,10 +216,10 @@
# Override some parameters if submitting an update to a newer
# version of an existing port
CLASS="update"
@@ -116,7 +111,7 @@
# Check to see if maintainership was requested
MAINT_CHANGE="`grep '^[+-]MAINTAINER' ${PATCH} | wc -l`"
if [ ${MAINT_CHANGE} -eq 2 ]
-@@ -242,7 +275,12 @@
+@@ -242,7 +264,12 @@
fi
# Generate Synopsis line
@@ -130,7 +125,7 @@
echo "===> Generating PR form"
PR_FORM="${TEMPROOT}/PR"
-@@ -266,9 +304,10 @@
+@@ -266,9 +293,10 @@
SEND-PR: [ low | medium | high ]
>Category: ports
SEND-PR: <choose from the list of categories below (one line)>
@@ -144,7 +139,7 @@
>Class: ${CLASS}
SEND-PR: [ sw-bug | doc-bug | change-request | update | maintainer-update ]
>Release: ${RELEASE}
-@@ -277,24 +316,33 @@
+@@ -277,25 +305,15 @@
>Description:
EOF
@@ -156,35 +151,24 @@
else
echo -e ${DESCRIPTION} >> ${PR_FORM}
-+ MODESTRING="${MODESTRING}, diff: ${DIFF_TYPE}"
- # Get list of added/removed files
- if [ "${DIFF_MODE}" = "CVS" ]
- then
- FILES_ADD=`grep --after-context=1 "^--- /dev/null" ${PATCH} | grep "^+++ " | awk '{print $2;}'`
- FILES_DEL=`grep --before-context=1 "^+++ /dev/null" ${PATCH} | grep "^--- " | awk '{print $2;}'`
-+ elif [ "${DIFF_MODE}" = "CVSauto" ]
-+ then
-+ FILES_ADD=`sed -n -e '/^diff -uN / { N;N;N;N;s/^diff -uN \(.*\)\.orig \1\n--- \1\.orig [-+:.[:digit:] ]\{19,\}\n+++ \1 [-+:.[:digit:] ]\{19,\}\n@@ [-+,[:digit:] ]\{9,\} @@\n+.*$/\1/p; }' ${PATCH}`
-+ FILES_DEL=`sed -n -e '/^diff -uN / { N;N;N;N;s/^diff -uN \(.*\)\.orig \1\n--- \1\.orig [-+:.[:digit:] ]\{19,\}\n+++ \1 [-+:.[:digit:] ]\{19,\}\n@@ [-+,[:digit:] ]\{9,\} @@\n-.*$/\1/p; }' ${PATCH}`
- else
+- # Get list of added/removed files
+- if [ "${DIFF_MODE}" = "CVS" ]
+- then
+- FILES_ADD=`grep --after-context=1 "^--- /dev/null" ${PATCH} | grep "^+++ " | awk '{print $2;}'`
+- FILES_DEL=`grep --before-context=1 "^+++ /dev/null" ${PATCH} | grep "^--- " | awk '{print $2;}'`
+- else
- TEMP=`mktemp -t porttools` || exit 1
- find -s ${ORIG_DIR} -type f | sed -e "s#${ORIG_DIR}/##" > ${TEMP}
- CURR_DIR=`pwd`
- FILES_ADD=`find -s ${CURR_DIR} -type f | sed -e "s#${CURR_DIR}/##" | comm -23 - ${TEMP}`
- FILES_DEL=`find -s ${CURR_DIR} -type f | sed -e "s#${CURR_DIR}/##" | comm -13 - ${TEMP}`
- rm -f ${TEMP}
-+ TEMPORIG=`mktemp -t porttools` || exit 1
-+ TEMPNEW=`mktemp -t porttools` || exit 1
-+ CVS_FILTER="egrep -v /CVS/[^/]*$"
-+ find -s ${ORIG_DIR} -type f | ${CVS_FILTER} | sed -e "s#^${ORIG_DIR}/##" > ${TEMPORIG}
-+ find -s . -type f | ${CVS_FILTER} | sed -e "s#^\./##" > ${TEMPNEW}
-+ FILES_ADD=`comm -13 ${TEMPORIG} ${TEMPNEW}`
-+ FILES_DEL=`comm -23 ${TEMPORIG} ${TEMPNEW}`
-+ rm -f ${TEMPORIG} ${TEMPNEW}
- fi
+- fi
++ MODESTRING="${MODESTRING}, diff: ${DIFF_TYPE}"
if [ -n "${FILES_ADD}" ]
-@@ -326,14 +374,14 @@
+ then
+@@ -326,14 +344,14 @@
cat >> ${PR_FORM} <<- EOF
diff --git a/ports-mgmt/porttools/files/patch-port.1 b/ports-mgmt/porttools/files/patch-port.1
index 1cf6e44dd91d..35cb7658627b 100644
--- a/ports-mgmt/porttools/files/patch-port.1
+++ b/ports-mgmt/porttools/files/patch-port.1
@@ -1,16 +1,30 @@
---- port.1.orig 2009-09-09 20:59:59.000000000 +0100
-+++ port.1 2012-03-04 12:04:12.799204352 +0000
-@@ -125,6 +125,9 @@
+--- port.1.orig 2009-09-10 04:59:59.000000000 +0900
++++ port.1 2012-12-27 19:26:53.000000000 +0900
+@@ -123,8 +123,8 @@
+ .It Fl d Ar mode
+ select diff generation mode:
.Bl -tag -width ".Pa suffix"
- .It CVS
- diff against CVS repository (default).
-+.It CVSauto
-+diff against CVS repository, no cvs add/delete required.
-+Useful with read-only CVS servers that don't support add/delete.
+-.It CVS
+-diff against CVS repository (default).
++.It SVN
++diff against SVN repository (default).
.It Pa dir
diff against original version of the port in the Ports tree with root at
.Pa dir
-@@ -215,6 +218,8 @@
+@@ -141,10 +141,10 @@
+ .Pp
+ Example:
+ .Pp
+-.Dl % port diff -d CVS
++.Dl % port diff -d SVN
+ .Pp
+ This would generate unified diff of modified checked-out working copy
+-of the port against local or remote CVS repo.
++of the port against SVN repo.
+ .It Ar fetch
+ Fetch one or more distfiles of new or updated port version
+ and updates checksums.
+@@ -215,6 +215,8 @@
.Bl -tag -width ".Fl s Ar severity"
.It Fl h
display usage summary for this command.
@@ -19,7 +33,7 @@
.It Fl m Ar mode
Overrides automatic detection of operation mode:
.Bl -tag -width update
-@@ -245,6 +250,10 @@
+@@ -245,6 +247,10 @@
Skips running
.Xr portlint 1 .
Using this option will generate a warning and it strongly discouraged.
@@ -30,3 +44,12 @@
.El
.It Ar test
Automates the process of testing a new port (or a port update)
+@@ -347,7 +353,7 @@
+ for detailed description of the format.
+ .El
+ .Sh SEE ALSO
+-.Xr cvs 1 ,
++.Xr svn 1 ,
+ .Xr cdiff 1 ,
+ .Xr diff 1 ,
+ .Xr more 1 ,
diff --git a/ports-mgmt/porttools/files/patch-port.in b/ports-mgmt/porttools/files/patch-port.in
new file mode 100644
index 000000000000..347dbdd7962f
--- /dev/null
+++ b/ports-mgmt/porttools/files/patch-port.in
@@ -0,0 +1,11 @@
+--- port.in.orig 2009-09-10 04:59:59.000000000 +0900
++++ port.in 2012-12-27 19:30:02.000000000 +0900
+@@ -19,7 +19,7 @@
+ ORGANIZATION=""
+ BUILDROOT="/tmp"
+ ARCHIVE_DIR=""
+- DIFF_MODE="CVS"
++ DIFF_MODE="SVN"
+ DIFF_VIEWER="more"
+ PORTLINT_FLAGS="abct"
+ EOF
diff --git a/ports-mgmt/porttools/files/patch-porttools.5 b/ports-mgmt/porttools/files/patch-porttools.5
index b17e93a0f4dd..9057dfb497c0 100644
--- a/ports-mgmt/porttools/files/patch-porttools.5
+++ b/ports-mgmt/porttools/files/patch-porttools.5
@@ -1,11 +1,11 @@
---- porttools.5.orig 2009-09-09 21:59:59.000000000 +0200
-+++ porttools.5 2009-10-25 19:09:02.000000000 +0100
+--- porttools.5.orig 2009-09-10 04:59:59.000000000 +0900
++++ porttools.5 2012-12-27 19:46:53.000000000 +0900
@@ -51,7 +51,7 @@
Default to
.Pa /tmp .
.It Ev DIFF_MODE
-Selects diff generation mode. Valid values are: CVS, directory
-+Selects diff generation mode. Valid values are: CVS, CVSauto, directory
++Selects diff generation mode. Valid values are: SVN, directory
.Pq e.g. Pa /usr/ports ,
or suffix
.Pq e.g. Pa .orig .
diff --git a/ports-mgmt/porttools/files/patch-util_diff.in b/ports-mgmt/porttools/files/patch-util_diff.in
index c7d07a8f22e3..dfb35dac65d8 100644
--- a/ports-mgmt/porttools/files/patch-util_diff.in
+++ b/ports-mgmt/porttools/files/patch-util_diff.in
@@ -1,6 +1,16 @@
---- ./util_diff.in.orig 2009-09-09 21:59:59.000000000 +0200
-+++ ./util_diff.in 2011-11-28 21:54:50.000000000 +0100
-@@ -37,49 +37,122 @@
+--- util_diff.in.orig 2009-09-10 04:59:59.000000000 +0900
++++ util_diff.in 2012-12-31 21:44:44.000000000 +0900
+@@ -14,7 +14,8 @@
+ # Determine if this is a new port
+ if [ "${MODE}" = "" ]
+ then
+- [ "`grep '\$FreeBSD: ' Makefile`" ] || MODE="new"
++ svn status Makefile 2>&1 1>/dev/null | grep -qs 'svn: warning: W155007:'
++ [ $? -eq 0 ] || [ "`grep '\$FreeBSD: ' Makefile`" ] || MODE="new"
+ fi
+
+ # Create a temporary dir for generated files (patch/shar, PR form)
+@@ -37,49 +38,96 @@
fi
cd ${SAVE_CWD}
else
@@ -14,25 +24,20 @@
+ if [ "${DIFF_MODE}" = "" ]
then
- DIFF_MODE="/usr/ports"
-+ if [ -d CVS ]
++ if [ -d /usr/ports/.svn ]
+ then
-+ if grep -iq ":pserver:anoncvs@anoncvs.fr.FreeBSD.org:" CVS/Root
-+ then
-+ DIFF_MODE="CVSauto"
-+ else
-+ DIFF_MODE="CVS"
-+ fi
++ DIFF_MODE="SVN"
+ else
+ DIFF_MODE="/usr/ports"
+ fi
+ echo "Default diff mode is ${DIFF_MODE}"
-+ elif [ "${DIFF_MODE}" = "CVS" -o "${DIFF_MODE}" = "CVSauto" ]
++ elif [ "${DIFF_MODE}" = "SVN" ]
+ then
-+ # If there is no CVS subdirectory then
++ # If there is no .svn directory then
+ # fallback to diffing against /usr/ports tree
-+ if [ ! -d CVS ]
++ if [ ! -d /usr/ports/.svn ]
+ then
-+ echo "Diff mode was set to ${DIFF_MODE}, but there's no CVS subdirectory"
++ echo "Diff mode was set to ${DIFF_MODE}, but there's no .svn directory"
+ echo -n "Trying /usr/ports ... "
+ if [ -d /usr/ports ]
+ then
@@ -47,48 +52,33 @@
fi
- if [ "${DIFF_MODE}" = "CVS" ]
-+ if [ "${DIFF_MODE}" = "CVS" -o "${DIFF_MODE}" = "CVSauto" ]
++ if [ "${DIFF_MODE}" = "SVN" ]
then
+- # Test for ~/.cvspass and create if necessary
+- test -f ${HOME}/.cvspass || touch ${HOME}/.cvspass
+ DIFF_TYPE=${DIFF_MODE}
- # Test for ~/.cvspass and create if necessary
- test -f ${HOME}/.cvspass || touch ${HOME}/.cvspass
- # Run 'cvs update' first
- echo "===> Updating from CVS"
+- # Run 'cvs update' first
+- echo "===> Updating from CVS"
- cvs -R update -Pd
- if [ $? -ne 0 ]
-+ if [ "${DIFF_MODE}" = "CVSauto" ]
-+ then
-+ cvs -R update -Pd 2> ${TEMPROOT}/.cvs.err > ${TEMPROOT}/.cvs.out
-+ status=$?
-+ cat ${TEMPROOT}/.cvs.err ${TEMPROOT}/.cvs.out
-+ else
-+ cvs -R update -Pd
-+ status=$?
-+ fi
++ # Run 'svn update' first
++ echo "===> Updating from SVN"
++ svn update
++ status=$?
+ if [ $status -ne 0 ]
then
- echo "Error updating CVS"
+- echo "Error updating CVS"
++ echo "Error updating SVN"
rm -rf ${TEMPROOT}
exit 1
fi
-
- DIFF_CMD="cvs -R diff -uN"
-+ PORTBASENAME=`sed -E -e 's%.*/([^/]+)$%\1%' CVS/Repository`
-+ if [ "${DIFF_MODE}" = "CVSauto" ]
-+ then
-+ sort -k 2,666 ${TEMPROOT}/.cvs.out | \
-+ sed -nE -e 's/^[?A] (.*)$/echo "diff -uN \1.orig \1" \&\& diff -uN "\1.orig" "\1" /p' \
-+ -e 's/^U (.*)$/mv "\1" "\1.orig" \&\& echo "diff -uN \1.orig \1" \&\& diff -uN "\1.orig" "\1" ; rm "\1.orig"/p' \
-+ -e 's/^R (.*)$/cvs -R -q update -p "\1" > "\1.orig" \&\& echo "diff -uN \1.orig \1" \&\& diff -uN "\1.orig" "\1" ; rm "\1.orig"/p' \
-+ -e 's/^M (.*)$/cvs -R diff -u "\1"/p' \
-+ > ${TEMPROOT}/.cvs.diff_cmd
-+ DIFF_CMD="sh -x ${TEMPROOT}/.cvs.diff_cmd"
-+ else
-+ DIFF_CMD="cvs -R diff -uN"
-+ fi
++ DIFF_CMD="svn diff"
else
- # Non-CVS modes
+- # Non-CVS modes
++ # Non-SVN modes
+ DIRBASENAME=`basename \`pwd\``
+ PORTBASENAME_HEADER=`sed -n -E -e '1,/^($|[^#].*$)|\\$FreeBSD\:/s%^#.*\\$FreeBSD\:[[:space:]]*([^/]+/)*([^/]+)/Makefile.*\\$%\2%p' Makefile`
+ if [ "${DIRBASENAME}" != "${PORTBASENAME_HEADER}" ]
@@ -141,12 +131,12 @@
fi
# Check to see if the original version of port exist
-@@ -90,7 +163,7 @@
+@@ -90,7 +138,7 @@
exit 1
fi
- DIFF_CMD="diff -ruN --exclude=CVS ${ORIG_DIR} `pwd`"
-+ DIFF_CMD="diff -ruN --exclude=CVS ${ORIG_DIR} ."
++ DIFF_CMD="diff -ruN ${ORIG_DIR} ."
fi
# Generate patch
diff --git a/ports-mgmt/porttools/pkg-descr b/ports-mgmt/porttools/pkg-descr
index 1b9daf320343..6ec20fa243c7 100644
--- a/ports-mgmt/porttools/pkg-descr
+++ b/ports-mgmt/porttools/pkg-descr
@@ -6,4 +6,4 @@ FreeBSD Port Tools includes the following commands:
- port submit: submit a PR with new port, or port change/update
- port test: automate testing a new port or a port update
-WWW: http://sourceforge.net/projects/porttools/
+WWW: http://sourceforge.net/projects/porttools/