diff options
author | se <se@FreeBSD.org> | 2017-10-25 03:11:30 +0800 |
---|---|---|
committer | se <se@FreeBSD.org> | 2017-10-25 03:11:30 +0800 |
commit | 26a5edfe74a56e4abf7a2d56f1c3b37eb31f60b0 (patch) | |
tree | 9be636c195fd96e6570dec61eab97c46f5870f09 /misc | |
parent | 150f2c1e6182b5dd8f5bc044239e58a0626b14c2 (diff) | |
download | freebsd-ports-graphics-26a5edfe74a56e4abf7a2d56f1c3b37eb31f60b0.tar.gz freebsd-ports-graphics-26a5edfe74a56e4abf7a2d56f1c3b37eb31f60b0.tar.zst freebsd-ports-graphics-26a5edfe74a56e4abf7a2d56f1c3b37eb31f60b0.zip |
Claim maintainership (was: ports@) and upgrade to version 1.01b.19.
Add LICENSE based on the contents of file ANNOUNCE in the sources.
Approved by: antoine (mentor)
Diffstat (limited to 'misc')
-rw-r--r-- | misc/mmv/Makefile | 22 | ||||
-rw-r--r-- | misc/mmv/files/LICENSE | 10 | ||||
-rw-r--r-- | misc/mmv/files/patch-mmv.1 | 94 | ||||
-rw-r--r-- | misc/mmv/files/patch-mmv.c | 37 |
4 files changed, 140 insertions, 23 deletions
diff --git a/misc/mmv/Makefile b/misc/mmv/Makefile index 5bc4d25d46a..7a28b6ec2bb 100644 --- a/misc/mmv/Makefile +++ b/misc/mmv/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= mmv -PORTVERSION= 1.01b.15 +PORTVERSION= 1.01b.19 CATEGORIES= misc MASTER_SITES= DEBIAN_POOL DISTNAME= ${PORTNAME}_1.01b.orig @@ -11,24 +11,26 @@ PATCH_SITES= ${MASTER_SITES} PATCHFILES= ${PORTNAME}_1.01b-15.diff.gz PATCH_DIST_STRIP= -p1 -MAINTAINER= ports@FreeBSD.org +MAINTAINER= se@FreeBSD.org COMMENT= Move/Copy/Append/Link multiple files +LICENSE= Freeware +LICENSE_NAME= MMV +LICENSE_FILE= ${PATCHDIR}/LICENSE +LICENSE_PERMS= dist-mirror pkg-mirror auto-accept + CFLAGS+= -DHAS_DIRENT WRKSRC= ${WRKDIR}/${PORTNAME}-1.01b.orig do-build: - @(cd ${WRKSRC} ; \ - ${CC} ${CFLAGS} -o ${PORTNAME} ${PORTNAME}.c ; ) + cd ${WRKSRC}; ${CC} ${CFLAGS} -o ${PORTNAME} ${PORTNAME}.c do-install: - @${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} \ - ${STAGEDIR}${PREFIX}/bin/${PORTNAME} - @${INSTALL_MAN} ${WRKSRC}/mmv.1 \ - ${STAGEDIR}${PREFIX}/man/man1/${PORTNAME}.1 + ${INSTALL_PROGRAM} ${WRKSRC}/mmv ${STAGEDIR}${PREFIX}/bin/ + ${INSTALL_MAN} ${WRKSRC}/mmv.1 ${STAGEDIR}${PREFIX}/man/man1/ .for i in mcp mad mln - @${LN} -sf ${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${i} - @${LN} -sf ${PORTNAME}.1 ${STAGEDIR}${PREFIX}/man/man1/${i}.1 + ${LN} -sf ${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${i} + ${LN} -sf ${PORTNAME}.1 ${STAGEDIR}${PREFIX}/man/man1/${i}.1 .endfor .include <bsd.port.mk> diff --git a/misc/mmv/files/LICENSE b/misc/mmv/files/LICENSE new file mode 100644 index 00000000000..813ade3eb99 --- /dev/null +++ b/misc/mmv/files/LICENSE @@ -0,0 +1,10 @@ +Copyright (c) 1989 Vladimir Lanin + +Mmv is freeware. That means that the entire package of software and +documentation is copyrighted, and may not be distributed with any +modifications or for any charge (without the author's explicit written +permission). Other than that, it may be used and distributed freely. + +Vladimir Lanin +330 Wadsworth Ave, Apt 6F +New York, NY 10040 diff --git a/misc/mmv/files/patch-mmv.1 b/misc/mmv/files/patch-mmv.1 index 52b46c6342a..8af96730daa 100644 --- a/misc/mmv/files/patch-mmv.1 +++ b/misc/mmv/files/patch-mmv.1 @@ -1,6 +1,77 @@ ---- mmv.1 Thu Oct 5 19:09:58 2006 -+++ mmv.1 Thu Oct 5 19:12:46 2006 -@@ -345,7 +345,7 @@ +--- 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 , @@ -9,7 +80,7 @@ followed by a string of digits. When a source file matches a .I from -@@ -406,7 +406,7 @@ +@@ -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 @@ -18,7 +89,20 @@ of its special meaning to .IR mmv , as when the actual replacement name must contain the character '#', -@@ -639,6 +639,15 @@ +@@ -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) \} diff --git a/misc/mmv/files/patch-mmv.c b/misc/mmv/files/patch-mmv.c index 6d729885372..025411be6a9 100644 --- a/misc/mmv/files/patch-mmv.c +++ b/misc/mmv/files/patch-mmv.c @@ -1,6 +1,6 @@ ---- mmv.c Thu Oct 5 10:36:36 2006 -+++ mmv.c Thu Oct 5 10:38:31 2006 -@@ -73,7 +73,8 @@ +--- mmv.c.orig 2017-10-24 14:25:26 UTC ++++ mmv.c +@@ -73,7 +73,8 @@ Use -- as the end of options.\n"; %s [-m|x|r|c|o|a|l%s] [-h] [-d|p] [-g|t] [-v|n] [from to]\n\ \n\ Use #[l|u]N in the ``to'' pattern to get the [lowercase|uppercase of the]\n\ @@ -10,7 +10,7 @@ \n\ A ``from'' pattern containing wildcards should be quoted when given\n\ on the command line. Also you may need to quote ``to'' pattern.\n\ -@@ -976,6 +977,9 @@ +@@ -977,6 +978,9 @@ static int parsepat() lastname = p + 1; break; case '#': @@ -20,7 +20,7 @@ c = *(++p); if (c == 'l' || c == 'u') { #ifdef IS_MSDOS -@@ -986,8 +990,8 @@ +@@ -987,8 +991,8 @@ static int parsepat() #endif } if (!isdigit(c)) { @@ -31,7 +31,7 @@ return(-1); } for(x = 0; ;x *= 10) { -@@ -998,8 +1002,8 @@ +@@ -999,8 +1003,8 @@ static int parsepat() p++; } if (x < 1 || x > totwilds) { @@ -42,7 +42,7 @@ return(-1); } #ifdef IS_MSDOS -@@ -1007,6 +1011,7 @@ +@@ -1008,6 +1012,7 @@ static int parsepat() havedot = 1; #endif break; @@ -50,7 +50,19 @@ case ESC: if ((c = *(++p)) == '\0') { printf(TRAILESC, from, to, ESC); -@@ -2029,7 +2034,7 @@ +@@ -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; for (pat = to, l = 0; (c = *pat) != '\0'; pat++, l++) { @@ -59,3 +71,12 @@ 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) |