diff --git a/ports-mgmt/porttools/Makefile b/ports-mgmt/porttools/Makefile index fceba214a6d4..4e08de264fe9 100644 --- a/ports-mgmt/porttools/Makefile +++ b/ports-mgmt/porttools/Makefile @@ -2,38 +2,39 @@ # $FreeBSD$ PORTNAME= porttools -PORTVERSION= 0.99 -PORTREVISION= 11 +PORTVERSION= 1.00.2014.02.11 CATEGORIES= ports-mgmt -MASTER_SITES= SF -MAINTAINER= joemann@beefree.free.de +MAINTAINER= xmj@chaot.net COMMENT= Tools for testing and submitting port updates and new ports -LICENSE= BSD +LICENSE= BSD2CLAUSE RUN_DEPENDS= portlint:${PORTSDIR}/ports-mgmt/portlint \ cdiff:${PORTSDIR}/textproc/cdiff \ sudo:${PORTSDIR}/security/sudo \ svn:${PORTSDIR}/devel/subversion -MAKE_ENV= DATADIR="${DATADIR}" DOCSDIR="${DOCSDIR}" +USE_GITHUB= yes +GH_ACCOUNT= xmj +GH_COMMIT= e84626d +GH_TAGNAME= ${GH_COMMIT} + # Make the version information of porttools itself # available for inclusion in the PRs generated by it. -MAKE_ENV+= PORTVERSION="${PORTVERSION}" -.if defined(PORTREVISION) -MAKE_ENV+= PORTREVISION="${PORTREVISION}" -.endif -.if defined(PORTEPOCH) -MAKE_ENV+= PORTEPOCH="${PORTEPOCH}" -.endif +MAKE_ENV= DATADIR="${DATADIR}" DOCSDIR="${DOCSDIR}" PORTVERSION="${PORTVERSION}" OPTIONS_DEFINE= DOCS NEWFILE OPTIONS_DEFAULT= NEWFILE +.include + NEWFILE_DESC= Enable newfile support NEWFILE_RUN_DEPENDS= newfile:${PORTSDIR}/devel/newfile -DOCS_INSTALL_TARGET= install install-docs + +.if ${PORT_OPTIONS:MDOCS} +INSTALL_TARGET= install install-docs +.endif .include diff --git a/ports-mgmt/porttools/distinfo b/ports-mgmt/porttools/distinfo index 7b3baefd8b0d..109fa8f512a5 100644 --- a/ports-mgmt/porttools/distinfo +++ b/ports-mgmt/porttools/distinfo @@ -1,2 +1,2 @@ -SHA256 (porttools-0.99.tar.gz) = b59f5acee9ae3c3494ffb9c588b1ea2d95abbfa82162107a84c9c42455b252a2 -SIZE (porttools-0.99.tar.gz) = 17357 +SHA256 (porttools-1.00.2014.02.11.tar.gz) = 5d826241628fddf513330a2e5575f3f21af0ba43b7e0835ad5c143cb62ec59b4 +SIZE (porttools-1.00.2014.02.11.tar.gz) = 18628 diff --git a/ports-mgmt/porttools/files/patch-Makefile b/ports-mgmt/porttools/files/patch-Makefile deleted file mode 100644 index bb472637f623..000000000000 --- a/ports-mgmt/porttools/files/patch-Makefile +++ /dev/null @@ -1,53 +0,0 @@ ---- ./Makefile.orig 2009-09-09 21:59:59.000000000 +0200 -+++ ./Makefile 2013-10-22 10:41:23.000000000 +0200 -@@ -9,6 +9,15 @@ - PORTNAME?= porttools - PORTVERSION?= 0.99 - DISTNAME?= ${PORTNAME}-${PORTVERSION} -+.if defined(PORTREVISION) && defined(PORTEPOCH) -+VERSIONSTRING= ${PORTVERSION}_${PORTREVISION},${PORTEPOCH} -+.elif defined(PORTREVISION) -+VERSIONSTRING= ${PORTVERSION}_${PORTREVISION} -+.elif defined(PORTEPOCH) -+VERSIONSTRING= ${PORTVERSION},${PORTEPOCH} -+.else -+VERSIONSTRING= ${PORTVERSION} -+.endif - - PROGRAMS= port - SCRIPTS= cmd_commit cmd_create cmd_diff cmd_fetch cmd_getpr cmd_help \ -@@ -31,23 +40,23 @@ - - .SUFFIXES: .in - --.in: -- sed -e 's,__VERSION__,${PORTVERSION},;s,__PREFIX__,${PREFIX},' \ -+.in: -+ sed -e 's%__VERSION__%${VERSIONSTRING}%;s,__PREFIX__,${PREFIX},' \ - inc_header.in ${.IMPSRC} > ${.TARGET} - chmod a+x ${.TARGET} - - install: ${PROGRAMS} ${SCRIPTS} -- ${BSD_INSTALL_SCRIPT} ${PROGRAMS} ${PREFIX}/bin -- mkdir -p ${DATADIR} -- ${BSD_INSTALL_SCRIPT} ${SCRIPTS} ${DATADIR} -- mkdir -p ${MANPREFIX}/man/man1 -- ${BSD_INSTALL_MAN} ${MAN1} ${MANPREFIX}/man/man1 -- mkdir -p ${MANPREFIX}/man/man5 -- ${BSD_INSTALL_MAN} ${MAN5} ${MANPREFIX}/man/man5 -+ ${BSD_INSTALL_SCRIPT} ${PROGRAMS} ${DESTDIR}${PREFIX}/bin -+ mkdir -p ${DESTDIR}${DATADIR} -+ ${BSD_INSTALL_SCRIPT} ${SCRIPTS} ${DESTDIR}${DATADIR} -+ mkdir -p ${DESTDIR}${MANPREFIX}/man/man1 -+ ${BSD_INSTALL_MAN} ${MAN1} ${DESTDIR}${MANPREFIX}/man/man1 -+ mkdir -p ${DESTDIR}${MANPREFIX}/man/man5 -+ ${BSD_INSTALL_MAN} ${MAN5} ${DESTDIR}${MANPREFIX}/man/man5 - - install-docs: -- mkdir -p ${DOCSDIR} -- ${BSD_INSTALL_DATA} ${DOCS} ${DOCSDIR} -+ mkdir -p ${DESTDIR}${DOCSDIR} -+ ${BSD_INSTALL_DATA} ${DOCS} ${DESTDIR}${DOCSDIR} - - clean: - rm -rf ${PROGRAMS} ${SCRIPTS} ${DISTNAME}* diff --git a/ports-mgmt/porttools/files/patch-README b/ports-mgmt/porttools/files/patch-README deleted file mode 100644 index b71e48b6b774..000000000000 --- a/ports-mgmt/porttools/files/patch-README +++ /dev/null @@ -1,61 +0,0 @@ ---- 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 deleted file mode 100644 index d3bdbc8a9d58..000000000000 --- a/ports-mgmt/porttools/files/patch-cmd_commit.in +++ /dev/null @@ -1,89 +0,0 @@ ---- cmd_commit.in.orig 2009-09-10 04:59:59.000000000 +0900 -+++ cmd_commit.in 2013-04-27 07:26:46.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,17 @@ - - # 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:' -+if [ $? -eq 0 ] -+then -+ MODE="new" -+fi - - # 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 -@@ -74,21 +78,25 @@ - fi - - --PORTSDIR="`make -V PORTSDIR`" -+# See if SVN message already exists, and use that for commit log -+MSG="svn-msg" -+FLAGS="" -+ - if [ "${MODE}" = "new" ] - then -- ${PORTSDIR}/Tools/scripts/addport -d `pwd` -u ${FREEFALL_USERNAME} --else -- # Initialize CVS environment -- PCVS="cvs -d ${FREEFALL_USERNAME}@pcvs.FreeBSD.org:/home/pcvs" -+ PORTSDIR="`make -V PORTSDIR`" - -+ if [ -e ${MSG} ] -+ then -+ FLAGS="-c ${MSG}" -+ fi -+ -+ ${PORTSDIR}/Tools/scripts/addport -d `pwd` -u ${FREEFALL_USERNAME} ${FLAGS} -+else - # 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" -- FLAGS="" - if [ -e ${MSG} ] - then - FLAGS="-F ${MSG}" -@@ -99,18 +107,18 @@ - 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 -- [ $? -eq 0 -a -e ${MSG} ] && rm ${MSG} - fi -+# Remove SVN message file only if commit was successful -+[ $? -eq 0 -a -e ${MSG} ] && rm ${MSG} - - echo "===> Done" - exit 0 diff --git a/ports-mgmt/porttools/files/patch-cmd_diff.in b/ports-mgmt/porttools/files/patch-cmd_diff.in deleted file mode 100644 index e385ce70583b..000000000000 --- a/ports-mgmt/porttools/files/patch-cmd_diff.in +++ /dev/null @@ -1,20 +0,0 @@ ---- cmd_diff.in.orig 2009-09-09 21:59:59.000000000 +0200 -+++ cmd_diff.in 2013-10-22 10:37:13.000000000 +0200 -@@ -20,7 +20,7 @@ - Usage: port diff [-h] [-d ] - -h - Display this usage summary - -d - Select diff generation mode: -- CVS - against CVS -+ SVN - against SVN - - against Ports tree in - - against original port in - EOF -@@ -65,7 +65,7 @@ - [ -n "${DIFF_VIEWER}" ] || DIFF_VIEWER="more" - fi - echo "===> Viewing diff with ${DIFF_VIEWER}" --${DIFF_VIEWER} ${PATCH} -+${DIFF_VIEWER} < ${PATCH} - - # Cleanup - rm -rf ${TEMPROOT} diff --git a/ports-mgmt/porttools/files/patch-cmd_submit.in b/ports-mgmt/porttools/files/patch-cmd_submit.in deleted file mode 100644 index c1e581967d7b..000000000000 --- a/ports-mgmt/porttools/files/patch-cmd_submit.in +++ /dev/null @@ -1,202 +0,0 @@ ---- ./cmd_submit.in.orig 2009-09-09 22:59:59.000000000 +0300 -+++ ./cmd_submit.in 2013-10-30 11:02:11.324453150 +0200 -@@ -25,11 +25,12 @@ - change - changing a port - update - updating a port to newer version - -d - Select diff generation mode: -- CVS - against CVS -+ SVN - against SVN - - against Ports tree in - - against original port in - -s - Set PR's severity to - -p - Set PR's priority to -+ -P - Don't send the PR; print to stdout (see -P in send-pr(1)) - -c - committer mode: more portlint(1) checks - -L - Skip running portlint(1) - EOF -@@ -41,9 +42,10 @@ - PRIORITY="low" - COMMITTER="no" - RUN_PORTLINT="yes" -+SENDPR_ARGS= - - # Parse command line arguments --ARGS=`/usr/bin/getopt hm:d:s:p:cL $*` -+ARGS=`/usr/bin/getopt hm:d:s:p:cLP $*` - if [ $? != 0 ] - then - echo "Error: invalid arguments" -@@ -116,6 +118,10 @@ - -L) - RUN_PORTLINT="no" - ;; -+ # print to stdout instead of sending -+ -P) -+ SENDPR_ARGS="${SENDPR_ARGS} -P" -+ ;; - esac - shift - done -@@ -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 SVN, ports, or suffix -+PORTBASENAME="" -+DIFF_TYPE="" -+ -+# Generate diff or shar, depending on the mode, and create TEMPROOT -+. ${SCRIPT_DIR}/util_diff -+ - # Run portlint(1) to validate port's sanity - if [ "${RUN_PORTLINT}" = "yes" ] - then -@@ -133,10 +149,13 @@ - FLAGS="-${PORTLINT_FLAGS:-abt}" - [ "${COMMITTER}" = "yes" ] && FLAGS="${FLAGS} -c" - [ "${MODE}" = "new" ] && FLAGS="${FLAGS} -N" -- portlint ${FLAGS} -- if [ $? -ne 0 ] -+ if portlint ${FLAGS} > ${TEMPROOT}/.portlint.out - then -+ cat ${TEMPROOT}/.portlint.out -+ else -+ cat ${TEMPROOT}/.portlint.out - echo "Error validating port" -+ rm -rf ${TEMPROOT} - exit 1 - fi - else -@@ -144,8 +163,26 @@ - fi - - # Collect information about the port --PORTNAME="`make -V PKGNAMEPREFIX``make -V PORTNAME``make -V PKGNAMESUFFIX`" -+ -+# The following section comes from util_diff. -+# For port submit to work with python/ruby ports and GNATS auto-assign, version -+# numbers need to be sed'ed out before adding to synopsis. -+ -+PYTHON_SUFFIX="`make -V PYTHON_SUFFIX`" -+RUBY_SUFFIX="`make -V RUBY_SUFFIX`" -+PKGNAMEPREFIX="`make -V PKGNAMEPREFIX | sed -E "s,py${PYTHON_SUFFIX}-,py-," | sed -E "s,ruby${RUBY_SUFFIX}-,ruby-,"`" -+PKGNAMESUFFIX="`make -V PKGNAMESUFFIX`" -+PORTNAME="${PKGNAMEPREFIX}`make -V PORTNAME`${PKGNAMESUFFIX}" -+ -+# Rest as normal -+ - PORTVERSION="`make -V PORTVERSION`" -+PORTREVISION="`make -V PORTREVISION`" -+PORTEPOCH="`make -V PORTEPOCH`" -+VERSIONSTRING="${PORTVERSION}" -+[ "$PORTREVISION" != "0" ] && VERSIONSTRING="${VERSIONSTRING}_${PORTREVISION}" -+[ "$PORTEPOCH" != "0" ] && VERSIONSTRING="${VERSIONSTRING},${PORTEPOCH}" -+ - PKGNAME="`make -V PKGNAME`" - CATEGORY="`make -V CATEGORIES | sed -E 's/^([^ ]+).*$/\1/'`" - MAINTAINER="`make -V MAINTAINER`" -@@ -155,9 +192,6 @@ - RELEASE="`uname -srp`" - SYSTEM="`uname -a | cut -d ' ' -f 1-12`" - --# Generate diff or shar, depending on the mode --. ${SCRIPT_DIR}/util_diff -- - CC="" - if [ "${MODE}" = "new" ] - then -@@ -194,10 +228,10 @@ - # Override some parameters if submitting an update to a newer - # version of an existing port - CLASS="update" -- SUFFIX="update to ${PORTVERSION}" -- DESCRIPTION="- Update to ${PORTVERSION}" -+ SUFFIX="update to ${VERSIONSTRING}" -+ DESCRIPTION="- Update to ${VERSIONSTRING}" - fi -- -+ - # Check to see if maintainership was requested - MAINT_CHANGE="`grep '^[+-]MAINTAINER' ${PATCH} | wc -l`" - if [ ${MAINT_CHANGE} -eq 2 ] -@@ -242,7 +276,12 @@ - fi - - # Generate Synopsis line --SYNOPSIS="[${PREFIX}] ${CATEGORY}/${PORTNAME}: ${SUFFIX}" -+if [ -z "${PORTBASENAME}" ] -+then -+ SYNOPSIS="[${PREFIX}] ${CATEGORY}/${PORTNAME}: ${SUFFIX}" -+else -+ SYNOPSIS="[${PREFIX}] ${CATEGORY}/${PORTBASENAME}: ${SUFFIX}" -+fi - - echo "===> Generating PR form" - PR_FORM="${TEMPROOT}/PR" -@@ -266,9 +305,10 @@ - SEND-PR: [ low | medium | high ] - >Category: ports - SEND-PR: -- SEND-PR: advocacy alpha bin conf docs gnu -- SEND-PR: i386 ia64 java kern misc ports -- SEND-PR: powerpc sparc64 standards www -+ SEND-PR: advocacy alpha amd64 arm bin conf -+ SEND-PR: docs gnu i386 ia64 java kern -+ SEND-PR: misc ports powerpc sparc64 standards sun4v -+ SEND-PR: threads usb www - >Class: ${CLASS} - SEND-PR: [ sw-bug | doc-bug | change-request | update | maintainer-update ] - >Release: ${RELEASE} -@@ -277,25 +317,15 @@ - >Description: - EOF - -+MODESTRING="mode: ${MODE}" -+ - if [ "${MODE}" = "new" ] - then - cat pkg-descr >> ${PR_FORM} - else - echo -e ${DESCRIPTION} >> ${PR_FORM} - -- # 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} -- fi -+ MODESTRING="${MODESTRING}, diff: ${DIFF_TYPE}" - - if [ -n "${FILES_ADD}" ] - then -@@ -326,14 +356,14 @@ - - cat >> ${PR_FORM} <<- EOF - -- Generated with FreeBSD Port Tools __VERSION__ -+ Generated with FreeBSD Port Tools __VERSION__ (${MODESTRING}) - >How-To-Repeat: - >Fix: - EOF - - # Invoke send-pr(1) - echo "===> Invoking send-pr(1) to submit a PR" --PR_FORM="${PR_FORM}" /usr/bin/send-pr -a ${PATCH} -+PR_FORM="${PR_FORM}" /usr/bin/send-pr -a ${PATCH} ${SENDPR_ARGS} - if [ $? -ne 0 ] - then - echo "Error submitting PR" diff --git a/ports-mgmt/porttools/files/patch-cmd_test.in b/ports-mgmt/porttools/files/patch-cmd_test.in deleted file mode 100644 index d25b0b0bf687..000000000000 --- a/ports-mgmt/porttools/files/patch-cmd_test.in +++ /dev/null @@ -1,11 +0,0 @@ ---- cmd_test.in 2009-09-09 23:59:59.000000000 +0400 -+++ cmd_test.in 2010-11-10 13:57:10.000000000 +0300 -@@ -189,7 +189,7 @@ - sed -e "s,^${PREFIX}/,," - sudo find ${LOCALBASE}/ -type d | sed "s,^${LOCALBASE}/,," | sort > ${PREFIX}.PLIST_DIRS.before - sudo find ${PREFIX}/ -type d | sed "s,^${PREFIX}/,," | sort > ${PREFIX}.PLIST_DIRS.after -- comm -13 ${PREFIX}.PLIST_DIRS.before ${PREFIX}.PLIST_DIRS.after | sort -r | awk '{print "@dirrmtry "$1}' -+ comm -13 ${PREFIX}.PLIST_DIRS.before ${PREFIX}.PLIST_DIRS.after | sort -r | awk '{print "@dirrmtry "$0}' - fi - - # Finish with a clean workspace diff --git a/ports-mgmt/porttools/files/patch-port.1 b/ports-mgmt/porttools/files/patch-port.1 deleted file mode 100644 index 35cb7658627b..000000000000 --- a/ports-mgmt/porttools/files/patch-port.1 +++ /dev/null @@ -1,55 +0,0 @@ ---- 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 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 -@@ -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. -+.It Fl d Ar mode -+select diff generation mode - see the port diff command above for details. - .It Fl m Ar mode - Overrides automatic detection of operation mode: - .Bl -tag -width update -@@ -245,6 +247,10 @@ - Skips running - .Xr portlint 1 . - Using this option will generate a warning and it strongly discouraged. -+.It Fl P -+Don't send the PR. -+Just print to stdout (see -P in -+.Xr send-pr 1) . - .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 deleted file mode 100644 index 0a370416e0c8..000000000000 --- a/ports-mgmt/porttools/files/patch-port.in +++ /dev/null @@ -1,19 +0,0 @@ ---- port.in.orig 2009-09-10 04:59:59.000000000 +0900 -+++ port.in 2013-10-28 17:50:13.000000000 +0100 -@@ -19,12 +19,15 @@ - ORGANIZATION="" - BUILDROOT="/tmp" - ARCHIVE_DIR="" -- DIFF_MODE="CVS" -+ DIFF_MODE="SVN" - DIFF_VIEWER="more" - PORTLINT_FLAGS="abct" -+ PORTSDIR="/usr/ports" - EOF - fi - -+PORTSDIR="/usr/ports" -+ - # Reading configuration file - . ${PORTTOOLS} - diff --git a/ports-mgmt/porttools/files/patch-porttools.5 b/ports-mgmt/porttools/files/patch-porttools.5 deleted file mode 100644 index 9057dfb497c0..000000000000 --- a/ports-mgmt/porttools/files/patch-porttools.5 +++ /dev/null @@ -1,11 +0,0 @@ ---- 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: 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 deleted file mode 100644 index 45304f15834d..000000000000 --- a/ports-mgmt/porttools/files/patch-util_diff.in +++ /dev/null @@ -1,142 +0,0 @@ ---- util_diff.in.orig 2009-09-10 04:59:59.000000000 +0900 -+++ util_diff.in 2013-10-28 17:48:33.000000000 +0100 -@@ -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 -- # Default to CVS diff mode -- [ "${DIFF_MODE}" = "" ] && DIFF_MODE="CVS" -- -- # If there is no CVS subdirectory then -- # fallback to diffing against /usr/ports tree -- if [ "${DIFF_MODE}" = "CVS" -a ! -d CVS ] -+ # Determine the default diff mode -+ if [ "${DIFF_MODE}" = "" ] - then -- DIFF_MODE="/usr/ports" -+ if [ -d ${PORTSDIR}/.svn ] -+ then -+ DIFF_MODE="SVN" -+ else -+ DIFF_MODE="${PORTSDIR}" -+ fi -+ echo "Default diff mode is ${DIFF_MODE}" -+ elif [ "${DIFF_MODE}" = "SVN" ] -+ then -+ # If there is no .svn directory then -+ # fallback to diffing against ${PORTSDIR} tree -+ if [ ! -d ${PORTSDIR}/.svn ] -+ then -+ echo "Diff mode was set to ${DIFF_MODE}, but there's no .svn directory" -+ echo -n "Trying ${PORTSDIR} ... " -+ if [ -d ${PORTSDIR} ] -+ then -+ DIFF_MODE="${PORTSDIR}" -+ echo "found" -+ else -+ echo "not found - please choose an approriate diff mode" -+ rm -rf ${TEMPROOT} -+ exit 1 -+ fi -+ fi - fi - -- if [ "${DIFF_MODE}" = "CVS" ] -+ if [ "${DIFF_MODE}" = "SVN" ] - then -- # Test for ~/.cvspass and create if necessary -- test -f ${HOME}/.cvspass || touch ${HOME}/.cvspass -+ DIFF_TYPE=${DIFF_MODE} - -- # Run 'cvs update' first -- echo "===> Updating from CVS" -- cvs -R update -Pd -- if [ $? -ne 0 ] -+ # Run 'svn update' first -+ echo "===> Updating from SVN" -+ svn update -+ status=$? -+ if [ $status -ne 0 ] - then -- echo "Error updating CVS" -+ echo "Error updating SVN" - rm -rf ${TEMPROOT} - exit 1 - fi -- -- DIFF_CMD="cvs -R diff -uN" -+ DIFF_CMD="svn diff" - else -- # 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}" ] -+ then -+ echo "Warning: current directory name differs from Makefile header:" -+ echo " ${DIRBASENAME}" != "${PORTBASENAME_HEADER}" -+ fi -+ PYTHON_SUFFIX="`make -V PYTHON_SUFFIX`" -+ RUBY_SUFFIX="`make -V RUBY_SUFFIX`" -+ PKGNAMEPREFIX="`make -V PKGNAMEPREFIX | sed -E "s,py${PYTHON_SUFFIX}-,py-," | sed -E "s,ruby${RUBY_SUFFIX}-,ruby-,"`" -+ PKGNAMESUFFIX="`make -V PKGNAMESUFFIX`" -+ PORTNAME="${PKGNAMEPREFIX}`make -V PORTNAME`${PKGNAMESUFFIX}" - if [ -d ${DIFF_MODE} ] - then - # -d have been specified - # it should be Ports tree location -+ DIFF_TYPE="ports" - CATEGORY="`make -V CATEGORIES | sed -E 's/^([^ ]+).*$/\1/'`" -- PYTHON_SUFFIX="`make -V PYTHON_SUFFIX`" -- RUBY_SUFFIX="`make -V RUBY_SUFFIX`" -- PKGNAMEPREFIX="`make -V PKGNAMEPREFIX | sed -E "s,py${PYTHON_SUFFIX}-,py-," | sed -E "s,ruby${RUBY_SUFFIX}-,ruby-,"`" -- PKGNAMESUFFIX="`make -V PKGNAMESUFFIX`" -- PORTNAME="${PKGNAMEPREFIX}`make -V PORTNAME`${PKGNAMESUFFIX}" - ORIG_DIR="${DIFF_MODE}/${CATEGORY}/${PORTNAME}" -+ if [ ! -d ${ORIG_DIR} ] -+ then -+ echo "Original version does not exist at ${ORIG_DIR}" -+ if [ -d "${DIFF_MODE}/${CATEGORY}/${DIRBASENAME}" ] -+ then -+ PORTBASENAME=${DIRBASENAME} -+ ORIG_DIR="${DIFF_MODE}/${CATEGORY}/${PORTBASENAME}" -+ elif [ -d "${DIFF_MODE}/${CATEGORY}/${PORTBASENAME_HEADER}" ] -+ then -+ PORTBASENAME=${PORTBASENAME_HEADER} -+ ORIG_DIR="${DIFF_MODE}/${CATEGORY}/${PORTBASENAME}" -+ fi -+ [ -d ${ORIG_DIR} ] && echo "Using ${ORIG_DIR} instead" -+ fi - else - # -d have been specified - # is used to determine original port location -- ORIG_DIR="`pwd`${DIFF_MODE}" -+ DIFF_TYPE="suffix" -+ ORIG_DIR="../${DIRBASENAME}${DIFF_MODE}" -+ if [ "${DIRBASENAME}" != "${PORTNAME}" -a "${DIRBASENAME}" = "${PORTBASENAME_HEADER}" ] -+ then -+ PORTBASENAME=${DIRBASENAME} -+ echo "Using ${PORTBASENAME} instead of ${PORTNAME} as the port's directory name" -+ fi - fi - - # Check to see if the original version of port exist -@@ -90,7 +138,7 @@ - exit 1 - fi - -- DIFF_CMD="diff -ruN --exclude=CVS ${ORIG_DIR} `pwd`" -+ DIFF_CMD="diff -ruN ${ORIG_DIR} ." - fi - - # Generate patch diff --git a/ports-mgmt/porttools/pkg-descr b/ports-mgmt/porttools/pkg-descr index 6ec20fa243c7..90d406963538 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://github.com/xmj/porttools/ diff --git a/ports-mgmt/porttools/pkg-plist b/ports-mgmt/porttools/pkg-plist index 643c2efa0f40..9fe087284e04 100644 --- a/ports-mgmt/porttools/pkg-plist +++ b/ports-mgmt/porttools/pkg-plist @@ -16,6 +16,5 @@ man/man5/porttools.5.gz %%PORTDOCS%%%%DOCSDIR%%/README %%PORTDOCS%%%%DOCSDIR%%/NEWS %%PORTDOCS%%%%DOCSDIR%%/THANKS -%%PORTDOCS%%%%DOCSDIR%%/TODO %%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrm %%DATADIR%%