diff --git a/russian/d1489/Makefile b/russian/d1489/Makefile index b30f33a7b0cc..8e41cbdaa831 100644 --- a/russian/d1489/Makefile +++ b/russian/d1489/Makefile @@ -1,21 +1,22 @@ PORTNAME= d1489 DISTVERSION= 1.5.1 PORTREVISION= 1 CATEGORIES= russian converters MASTER_SITES= LOCAL/eugen \ http://www.grosbein.net/freebsd/distfiles/ MAINTAINER= eugen@FreeBSD.org COMMENT= Cp866<->koi8-r and cp1251<->koi8-r decoders, font converter (RFC1489) WWW= https://koi8.pp.ru/unix.html # Mentioned in README and Makefile, but not in the source code. LICENSE= BSD2CLAUSE USES= tar:tgz +CFLAGS+= -ansi -Wno-invalid-source-encoding MAKE_ARGS= PREFIX=${PREFIX} STAGEDIR=${STAGEDIR} PLIST_FILES= bin/a2kfcnv bin/fromdos bin/todos bin/fromwin bin/towin .include diff --git a/russian/d1489/files/patch-a2kfcnv.c b/russian/d1489/files/patch-a2kfcnv.c new file mode 100644 index 000000000000..5c32141819c2 --- /dev/null +++ b/russian/d1489/files/patch-a2kfcnv.c @@ -0,0 +1,28 @@ +--- a2kfcnv.c.orig 1998-12-21 23:51:14 UTC ++++ a2kfcnv.c +@@ -46,14 +46,13 @@ unsigned char font[256][MAXHEIGHT]; + + #include "koi82alt.h" + +-logo() ++static void logo(void) + { + fprintf(stderr, "Freeware a2kfcnv v1.1\n\ + Copyright (C) 1993-1994 by Andrew A. Chernov, Moscow, Russia\n"); + } + +-main(ac, av) +-char *av[]; ++int main(int ac, char *av[]) + { + register i, j, n; + FILE *af, *kf; +@@ -121,7 +120,7 @@ usage: + } + size /= 256; + if (size > MAXHEIGHT) { +- fprintf(stderr, "%s: %ld - font height too big, maximum %ld\n", ++ fprintf(stderr, "%s: %ld - font height too big, maximum %d\n", + av[1], size, MAXHEIGHT); + return 1; + } diff --git a/russian/d1489/files/patch-todos.c b/russian/d1489/files/patch-todos.c new file mode 100644 index 000000000000..bb6b0f3a6624 --- /dev/null +++ b/russian/d1489/files/patch-todos.c @@ -0,0 +1,71 @@ +--- todos.c.orig 2003-01-02 20:17:18 UTC ++++ todos.c +@@ -31,6 +31,7 @@ + #endif + + #include ++#include + #include + #include + #include +@@ -55,8 +56,11 @@ char outbuf[NEEDSIZ]; + char outbuf[NEEDSIZ]; + #endif + +-extern char *mktemp(); +-int RENAME(), decode(); ++/* extern char *mktemp(); */ ++static char* basename(char *name); ++static int decode(FILE *fin, FILE *fout); ++static void logo(char *name); ++static int RENAME(char *oldname, char *newname); + + #include "alt2koi8.h" + #include "koi82alt.h" +@@ -70,15 +74,13 @@ char win[] = "cp1251(win)"; + char Unix[] = "koi8-r(unix)"; + char win[] = "cp1251(win)"; + +-logo(name) +-char *name; ++static void logo(char *name) + { + fprintf(stderr, "Freeware %s v1.5\n\ + Copyright (C) 1993-2003 by Andrey A. Chernov, Moscow, Russia\n", name); + } + +-char *basename(name) +-char *name; ++static char *basename(char *name) + { + char *p; + +@@ -314,8 +316,7 @@ usage: + return 0; + } + +-decode(fin, fout) +-FILE *fin, *fout; ++static int decode(FILE *fin, FILE *fout) + { + register int c, SeeNext; + static char cc[2]; +@@ -341,7 +342,7 @@ FILE *fin, *fout; + s = ""; + goto single; + } +- while (c = (unsigned char) *s++) { ++ while ((c = (unsigned char) *s++)) { + single: + if (!binary) { + if (SeeNext) { +@@ -375,8 +376,7 @@ char *old, *new; + } + #endif + +-int RENAME(oldname, newname) +-char *oldname, *newname; ++static int RENAME(char *oldname, char *newname) + { + FILE *of, *nf; + int c;