1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-27 05:10:36 +00:00

Fix build with Clang. Remove defunct master site.

This commit is contained in:
Jung-uk Kim 2013-08-30 20:00:42 +00:00
parent 11eafb3068
commit ca6f6833ea
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=325718
6 changed files with 337 additions and 34 deletions

View File

@ -3,18 +3,24 @@
PORTNAME= engdic
PORTVERSION= 0.2
PORTREVISION= 1
CATEGORIES= korean deskutils
MASTER_SITES= ftp://ftp.holywar.net/pub/engdic/ \
ftp://ftp.kr.freebsd.org/pub/FreeBSD-kr/distfiles/
MASTER_SITES= ftp://ftp.kr.freebsd.org/pub/FreeBSD-kr/distfiles/
MAINTAINER= ports@FreeBSD.org
COMMENT= English dictionary utility for Korean
ALL_TARGET= clean all
PLIST_FILES= bin/edic bin/engdic
PORTDATA= [a-z].dic.gz
post-patch:
@for f in ${WRKSRC}/Makefile ${WRKSRC}/engdic.h; do \
${REINPLACE_CMD} -e 's,/usr/local,${PREFIX},g' $$f; \
done
${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/engdic.h
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/engdic ${PREFIX}/bin
${LN} -sf ${PREFIX}/bin/engdic ${PREFIX}/bin/edic
${MKDIR} ${DATADIR}
${INSTALL_DATA} ${WRKSRC}/data/[a-z].dic.gz ${DATADIR}
.include <bsd.port.mk>

View File

@ -0,0 +1,11 @@
--- Makefile.orig 1999-09-05 22:48:50.000000000 -0400
+++ Makefile 2013-08-30 15:19:45.000000000 -0400
@@ -28,7 +28,7 @@
DESTDIR = /usr/local/bin/
DATA_DESTDIR = /usr/local/share/engdic/
RM = rm -f *.o
-CC = gcc
+CC ?= cc
all: engdic

View File

@ -0,0 +1,46 @@
--- engdic.c.orig 1999-09-05 22:48:50.000000000 -0400
+++ engdic.c 2013-08-30 13:54:53.000000000 -0400
@@ -29,6 +29,7 @@
#include <termio.h>
#endif
+#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -49,7 +50,17 @@
char get_command(void) ;
struct size_buf get_term(void);
+void clear_eol(void) ;
+void deinit(void) ;
+void flush(void) ;
+char getchr(void) ;
+void init(void) ;
+void lower_left(void) ;
+int putchr(int) ;
char putstr (char *s) ;
+void raw_mode(int on) ;
+void so_enter(void) ;
+void so_exit(void) ;
char sep[] = ":" ;
static int line = 0 ;
@@ -68,7 +79,7 @@
struct stat sb ;
// type of gzip file //
- register gzFile *gzfp ;
+ register gzFile gzfp ;
if (argc > 1) {
@@ -182,7 +193,7 @@
register int check_cols_count = 0 ;
char ch ;
- if (tk == NULL || tk2 == NULL) return ;
+ if (tk == NULL || tk2 == NULL) return 0 ;
putstr(WORD_COLOR) ; putstr("[ ") ; putstr(tk); putchr(']') ;
putstr(NO_COLOR) ; putstr("\r\n") ;

View File

@ -0,0 +1,11 @@
--- engdic.h.orig 1999-09-05 22:48:35.000000000 -0400
+++ engdic.h 2013-08-30 14:21:04.000000000 -0400
@@ -20,7 +20,7 @@
*/
// Global value
-#define INSTALL_DIC_DATA_DIR "/usr/local/share/engdic"
+#define INSTALL_DIC_DATA_DIR "%%DATADIR%%"
#define MAX_LENGTH 80
#define COLS_MAX 1024

View File

@ -0,0 +1,258 @@
--- screen.c.orig 1999-09-05 22:48:35.000000000 -0400
+++ screen.c 2013-08-30 13:56:48.000000000 -0400
@@ -45,6 +45,8 @@
#include <stdio.h>
#include <string.h>
+#include <term.h>
+#include <unistd.h>
#define TERMIOS 1
@@ -53,7 +55,9 @@
#else
#if TERMIOS
#include <termios.h>
+#ifndef TAB3
#define TAB3 0
+#endif
#include <sys/ioctl.h>
#else
#include <sgtty.h>
@@ -75,6 +79,7 @@
#endif
#include <setjmp.h>
+#include <stdlib.h>
#include "engdic.h"
volatile int reading;
@@ -131,8 +136,12 @@
/*extern*/ char PC; /* Pad character */
int back_scroll;
-char *tgetstr();
-char *tgoto();
+
+void bo_exit(void);
+void flush(void);
+int iread(int, char *, int);
+void so_exit(void);
+void ul_exit(void);
/*
* Change terminal to "raw mode", or restore to "normal" mode.
@@ -145,8 +154,7 @@
* etc. are NOT disabled.
* It doesn't matter whether an input \n is mapped to \r, or vice versa.
*/
-raw_mode(on)
- int on;
+void raw_mode(int on)
{
#if TERMIO || TERMIOS
@@ -245,7 +253,7 @@
/*
* Get terminal capabilities via termcap.
*/
-struct size_buf get_term()
+struct size_buf get_term(void)
{
char termbuf[2048];
char *sp;
@@ -260,8 +268,6 @@
#endif
static char sbuf[1024];
- char *getenv(), *strcpy();
-
struct size_buf sz_buf ;
/*
@@ -470,12 +476,12 @@
* terminal-specific screen manipulation.
*/
-int putchr();
+int putchr(int);
/*
* Initialize terminal
*/
-init()
+void init(void)
{
tputs(sc_init, sc_height, putchr);
}
@@ -483,7 +489,7 @@
/*
* Deinitialize terminal
*/
-deinit()
+void deinit(void)
{
tputs(sc_deinit, sc_height, putchr);
}
@@ -491,7 +497,7 @@
/*
* Home cursor (move to upper left corner of screen).
*/
-home()
+void home(void)
{
tputs(sc_home, 1, putchr);
}
@@ -500,13 +506,13 @@
* Add a blank line (called with cursor at home).
* Should scroll the display down.
*/
-add_line()
+void add_line(void)
{
tputs(sc_addline, sc_height, putchr);
}
int short_file; /* if file less than a screen */
-lower_left()
+void lower_left(void)
{
if (short_file) {
putchr('\r');
@@ -517,17 +523,9 @@
}
/*
- * Ring the terminal bell.
- */
-bell()
-{
- putchr('\7');
-}
-
-/*
* Clear the screen.
*/
-clear()
+void clear(void)
{
if (mode_flags & M_SO)
so_exit();
@@ -542,7 +540,7 @@
* Clear from the cursor to the end of the cursor's line.
* {{ This must not move the cursor. }}
*/
-clear_eol()
+void clear_eol(void)
{
if (mode_flags & M_SO)
so_exit();
@@ -556,7 +554,7 @@
/*
* Begin "standout" (bold, underline, or whatever).
*/
-so_enter()
+void so_enter(void)
{
tputs(sc_s_in, 1, putchr);
mode_flags |= M_SO;
@@ -565,7 +563,7 @@
/*
* End "standout".
*/
-so_exit()
+void so_exit(void)
{
tputs(sc_s_out, 1, putchr);
mode_flags &= ~M_SO;
@@ -575,7 +573,7 @@
* Begin "underline" (hopefully real underlining,
* otherwise whatever the terminal provides).
*/
-ul_enter()
+void ul_enter(void)
{
tputs(sc_u_in, 1, putchr);
mode_flags |= M_UL;
@@ -584,7 +582,7 @@
/*
* End "underline".
*/
-ul_exit()
+void ul_exit(void)
{
tputs(sc_u_out, 1, putchr);
mode_flags &= ~M_UL;
@@ -593,7 +591,7 @@
/*
* Begin "bold"
*/
-bo_enter()
+void bo_enter(void)
{
tputs(sc_b_in, 1, putchr);
mode_flags |= M_BO;
@@ -602,7 +600,7 @@
/*
* End "bold".
*/
-bo_exit()
+void bo_exit(void)
{
tputs(sc_b_out, 1, putchr);
mode_flags &= ~M_BO;
@@ -612,7 +610,7 @@
* Erase the character to the left of the cursor
* and move the cursor left.
*/
-backspace()
+void backspace(void)
{
/*
* Try to erase the previous character by overstriking with a space.
@@ -625,28 +623,27 @@
/*
* Output a plain backspace, without erasing the previous char.
*/
-putbs()
+void putbs(void)
{
tputs(sc_backspace, 1, putchr);
}
-putchr(c)
- int c;
+int putchr(int c)
{
if (ob >= &obuf[sizeof(obuf)])
flush();
*ob++ = c;
+ return (c);
}
-putstr(s)
- register char *s;
+void putstr(register char *s)
{
while (*s != '\0')
putchr(*s++);
}
-flush()
+void flush(void)
{
register int n;
@@ -676,10 +673,7 @@
return ((unsigned char)c);
}
-iread(fd, buf, len)
- int fd;
- char *buf;
- int len;
+int iread(int fd, char *buf, int len)
{
register int n;

View File

@ -1,29 +0,0 @@
bin/engdic
bin/edic
share/engdic/a.dic.gz
share/engdic/b.dic.gz
share/engdic/c.dic.gz
share/engdic/d.dic.gz
share/engdic/e.dic.gz
share/engdic/f.dic.gz
share/engdic/g.dic.gz
share/engdic/h.dic.gz
share/engdic/i.dic.gz
share/engdic/j.dic.gz
share/engdic/k.dic.gz
share/engdic/l.dic.gz
share/engdic/m.dic.gz
share/engdic/n.dic.gz
share/engdic/o.dic.gz
share/engdic/p.dic.gz
share/engdic/q.dic.gz
share/engdic/r.dic.gz
share/engdic/s.dic.gz
share/engdic/t.dic.gz
share/engdic/u.dic.gz
share/engdic/v.dic.gz
share/engdic/w.dic.gz
share/engdic/x.dic.gz
share/engdic/y.dic.gz
share/engdic/z.dic.gz
@dirrm share/engdic