diff options
author | Matthias Andree <mandree@FreeBSD.org> | 2019-12-24 13:13:15 +0000 |
---|---|---|
committer | Matthias Andree <mandree@FreeBSD.org> | 2019-12-24 13:13:15 +0000 |
commit | f96f343cb9e941503994d2ba4a606824d7ab2f39 (patch) | |
tree | c289fb023bc33ff94d74dc8216d6aead76ec373b /misc/mmv | |
parent | cd27e807401b71795755bd0788e0ccecfe7c44a8 (diff) |
misc/mmv: make fetchable, and align with Debian buster (stable)
The patch file has become unfetchable, so fetch the Debian changes archive
instead, which contains all Debian patches, and a series file, and apply
the Debian patches per its order.
This obsoletes our local man page patch, and two hunks from the mmv.c patch.
Approved by: (blanket, repairing an unfetchable port)
Notes
Notes:
svn path=/head/; revision=520802
Diffstat (limited to 'misc/mmv')
-rw-r--r-- | misc/mmv/Makefile | 16 | ||||
-rw-r--r-- | misc/mmv/distinfo | 5 | ||||
-rw-r--r-- | misc/mmv/files/patch-mmv.1 | 120 | ||||
-rw-r--r-- | misc/mmv/files/patch-mmv.c | 21 |
4 files changed, 14 insertions, 148 deletions
diff --git a/misc/mmv/Makefile b/misc/mmv/Makefile index 10d269dbd8c4..b2b715e4b5c7 100644 --- a/misc/mmv/Makefile +++ b/misc/mmv/Makefile @@ -6,16 +6,14 @@ PORTVERSION= 1.01b.19 CATEGORIES= misc MASTER_SITES= DEBIAN_POOL DISTNAME= ${PORTNAME}_1.01b.orig +DISTFILES= ${PORTNAME}_1.01b.orig${EXTRACT_SUFX} \ + ${_debfile} -PATCH_SITES= ${MASTER_SITES} -PATCHFILES= ${PORTNAME}_1.01b-15.diff.gz PATCH_DIST_STRIP= -p1 MAINTAINER= se@FreeBSD.org COMMENT= Move/Copy/Append/Link multiple files -BROKEN= unfetchable - LICENSE= Freeware LICENSE_NAME= MMV LICENSE_FILE= ${PATCHDIR}/LICENSE @@ -24,8 +22,16 @@ LICENSE_PERMS= dist-mirror pkg-mirror auto-accept CFLAGS+= -DHAS_DIRENT WRKSRC= ${WRKDIR}/${PORTNAME}-1.01b.orig +_debfile= ${PORTNAME}_1.01b-19.debian.tar.xz + +pre-patch: + ${TAR} -C ${WRKDIR} -xvJf ${DISTDIR}/${_debfile} debian/patches + cd ${WRKSRC} && while read p ; do \ + ${PATCH} <${WRKDIR}/debian/patches/$$p ; \ + done <${WRKDIR}/debian/patches/series + do-build: - cd ${WRKSRC}; ${CC} ${CFLAGS} -o ${PORTNAME} ${PORTNAME}.c + cd ${WRKSRC} && ${CC} ${CFLAGS} -o ${PORTNAME} ${PORTNAME}.c do-install: ${INSTALL_PROGRAM} ${WRKSRC}/mmv ${STAGEDIR}${PREFIX}/bin/ diff --git a/misc/mmv/distinfo b/misc/mmv/distinfo index 602edb5a2c99..ca6295846cc5 100644 --- a/misc/mmv/distinfo +++ b/misc/mmv/distinfo @@ -1,4 +1,5 @@ +TIMESTAMP = 1577192605 SHA256 (mmv_1.01b.orig.tar.gz) = 0399c027ea1e51fd607266c1e33573866d4db89f64a74be8b4a1d2d1ff1fdeef SIZE (mmv_1.01b.orig.tar.gz) = 25656 -SHA256 (mmv_1.01b-15.diff.gz) = 9ad3e3d47510f816b4a18bae04ea75913588eec92248182f85dd09bc5ad2df13 -SIZE (mmv_1.01b-15.diff.gz) = 10613 +SHA256 (mmv_1.01b-19.debian.tar.xz) = 79e0d8d31f76f6121dc563fa626dfaf9e2d4d9cec840121dd42e6b8cfc638b3e +SIZE (mmv_1.01b-19.debian.tar.xz) = 12436 diff --git a/misc/mmv/files/patch-mmv.1 b/misc/mmv/files/patch-mmv.1 deleted file mode 100644 index 8af96730daa5..000000000000 --- a/misc/mmv/files/patch-mmv.1 +++ /dev/null @@ -1,120 +0,0 @@ ---- mmv.1.orig 2017-10-24 14:25:26 UTC -+++ mmv.1 -@@ -35,6 +35,43 @@ mmv \- move/copy/append multiple files by wildcard pat - .B mmvpatch - [\fBexecutable\fP] - \} -+.SH "EXAMPLES" -+Rename all -+.I *.jpeg -+files in the current directory to -+\fI*.jpg\fR: -+ -+.in +3 -+mmv '*.jpeg' '#1.jpg' -+.in -3 -+ -+Replace the first occurrence of -+.I abc -+with -+.I xyz -+in all files in the current directory: -+ -+.in +3 -+mmv '*abc*' '#1xyz#2' -+.in -3 -+ -+Rename files ending in \fI.html.en\fR, \fI.html.de\fR, etc. to ending -+in \fI.en.html\fR, \fI.de.html\fR, etc. in the current directory: -+ -+.in +3 -+mmv '*.html.??' '#1.#2#3.html' -+.in -3 -+ -+Rename music files from -+.I <track no.> - <interpreter> - <song title>.ogg -+to -+.I <interpreter> - <track no.> - <song title>.ogg -+in the current directory: -+ -+.in +3 -+mmv '* - * - *.ogg' '#2 - #1 - #3.ogg' -+.in -3 -+ - .SH "DESCRIPTION" - .I Mmv - moves (or copies, -@@ -196,8 +233,13 @@ and it applies to all matching files. - Remaining options need not be given separately, - i.e. "mmv \-mk" is allowed. - -+\fBWARNING:\fR This operation mode does \fBnot\fR work if the patterns -+itself contain \fBspaces\fR. See -+.I http://bugs.debian.org/149873 -+for details. -+ - .ce --Multiple Pattern Pairs -+Multiple Pattern Pairs / Reading Patterns from STDIN - .PP - Multiple - .I from -@@ -240,6 +282,11 @@ would give the error message "a \-> c : no match" beca - (even if it exists) - was already matched by the first pattern pair. - -+\fBWARNING:\fR This operation mode does \fBnot\fR work if the patterns -+itself contain \fBspaces\fR. See -+.I http://bugs.debian.org/149873 -+for details. -+ - .ce - The \fIFrom\fP Pattern - .PP -@@ -350,7 +397,7 @@ pattern is a filename - with embedded - .I wildcard - .IR indexes , --where an index consists of the character '#' -+where an index consists of the character '#' or '=' - followed by a string of digits. - When a source file matches a - .I from -@@ -411,7 +458,7 @@ if "dir2" is indeed a directory, actually move "dir1\* - However, if "dir2\*(SLa" already exists and is itself a directory, - this is considered an error. - .PP --To strip any character (e.g. '*', '?', or '#') -+To strip any character (e.g. '*', '?', '#', or '=') - of its special meaning to - .IR mmv , - as when the actual replacement name must contain the character '#', -@@ -555,6 +602,12 @@ and will accept pattern pairs with or without the inte - Lines with "(*)" after the target pattern have the effect of enabling \-d - for the files matching this pattern only, - so that such deletions are done silently. -+ -+\fBWARNING:\fR This means that \fBunexpected things\fR may happen if -+\fBfiles\fR matched by the patterns contain \fBspaces\fR. See -+.I http://bugs.debian.org/149873 -+for details. -+ - When feeding - .I mmv - its own output, -@@ -644,6 +697,15 @@ and with status 0 otherwise. - .SH "SEE ALSO" - mv(1), cp(1), ln(1), umask(1) - \} -+.SH "HISTORY" -+The original FreeBSD port of mmv was derived from the Usenet -+comp.sources.unix postings <2438@litchi.bbn.com>, -+<2439@litchi.bbn.com>, and <2643@litchi.bbn.com>. -+The current port is based on the comp.binaries.ibm.pc postings -+(no messageids available). -+The Unix version used '=' as the index escape character, -+while the MS-DOS version used '#'. -+This port allows both. - .SH "AUTHOR" - Vladimir Lanin - .br diff --git a/misc/mmv/files/patch-mmv.c b/misc/mmv/files/patch-mmv.c index 025411be6a96..9f0e563f45ab 100644 --- a/misc/mmv/files/patch-mmv.c +++ b/misc/mmv/files/patch-mmv.c @@ -50,18 +50,6 @@ case ESC: if ((c = *(++p)) == '\0') { printf(TRAILESC, from, to, ESC); -@@ -1215,7 +1220,11 @@ static int keepmatch(ffrom, pathend, pk, needslash, di - getstat(pathbuf, ffrom); - if ((ffrom->fi_stflags & FI_ISDIR) ? !dirs : !fils) - #endif -+ { -+ if (verbose) -+ printf("ignoring directory %s\n", ffrom->fi_name); - return(0); -+ } - - if (needslash) { - strcpy(pathend + *pk, SLASHSTR); @@ -2030,7 +2039,7 @@ static void makerep() repbad = 0; p = fullrep; @@ -71,12 +59,3 @@ c = *(++pat); #ifndef IS_MSDOS if (c == 'l') { -@@ -2828,7 +2837,7 @@ static int getreply(m, failact) - static FILE *tty = NULL; - int c, r; - -- fprintf(stderr, m); -+ fprintf(stderr, "%s", m); - if (tty == NULL && (tty = fopen(TTY, "r")) == NULL) { - fprintf(stderr, "Can not open %s to get reply.\n", TTY); - if (failact == -1) |