aboutsummaryrefslogtreecommitdiff
path: root/korean
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2013-06-17 23:25:53 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2013-06-17 23:25:53 +0000
commit88be9505405b826b4e66dfeecd093fb1b70fdb75 (patch)
tree24e90c38db115d76caf62ee8b1d95d378f503d84 /korean
parent1a0bf3751368cbc7be264272699970956e86d5c6 (diff)
downloadports-88be9505405b826b4e66dfeecd093fb1b70fdb75.tar.gz
ports-88be9505405b826b4e66dfeecd093fb1b70fdb75.zip
- Re-add ftp.kaist.ac.kr and remove defunct ftp.kreonet.re.kr.
- Modernize the port and make Clang happy.
Notes
Notes: svn path=/head/; revision=321163
Diffstat (limited to 'korean')
-rw-r--r--korean/hpscat/Makefile52
-rw-r--r--korean/hpscat/files/hpscat.sh.in (renamed from korean/hpscat/files/hpscat.sh)2
-rw-r--r--korean/hpscat/files/patch-Makefile (renamed from korean/hpscat/files/patch-aa)0
-rw-r--r--korean/hpscat/files/patch-ab12
-rw-r--r--korean/hpscat/files/patch-hpscat.c38
-rw-r--r--korean/hpscat/files/patch-hpscat.h28
-rw-r--r--korean/hpscat/files/patch-init.c11
-rw-r--r--korean/hpscat/files/patch-misc.c21
-rw-r--r--korean/hpscat/files/patch-paper.h22
-rw-r--r--korean/hpscat/files/patch-showbuf.c19
-rw-r--r--korean/hpscat/files/patch-user.c10
-rw-r--r--korean/hpscat/files/pkg-message.in3
-rw-r--r--korean/hpscat/pkg-plist12
-rw-r--r--korean/hpscat/pkg-req8
-rw-r--r--korean/hpscat/scripts/configure8
15 files changed, 181 insertions, 65 deletions
diff --git a/korean/hpscat/Makefile b/korean/hpscat/Makefile
index 066d5a087b7e..ca263618191e 100644
--- a/korean/hpscat/Makefile
+++ b/korean/hpscat/Makefile
@@ -2,40 +2,44 @@
# $FreeBSD$
PORTNAME= hpscat
-PORTVERSION= 1.3jshin
+PORTVERSION= 1.3.1
+PORTEPOCH= 1
CATEGORIES= korean print
-MASTER_SITES= ftp://ftp.kr.FreeBSD.org/pub/FreeBSD-kr/distfiles/ \
- ftp://ftp.kreonet.re.kr/pub/hangul/cair-archive/print/hpscat/ \
- ftp://ftp.kreonet.re.kr/pub/hangul/cair-archive/editor/ked/
-DISTNAME= hpscat-jshin
-DISTFILES= hpscat-jshin.tar.gz ked.tar.gz
+MASTER_SITES= http://ftp.kaist.ac.kr/hangul/print/hpscat/ \
+ ftp://ftp.kaist.ac.kr/hangul/print/hpscat/ \
+ http://ftp.kaist.ac.kr/hangul/editor/ked/:ked \
+ ftp://ftp.kaist.ac.kr/hangul/editor/ked/:ked \
+ ftp://ftp.kr.FreeBSD.org/pub/FreeBSD-kr/distfiles/
+PKGNAMESUFFIX= -jshin
+DISTNAME= ${PORTNAME}${PKGNAMESUFFIX}
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ked.tar.gz:ked
MAINTAINER= ports@FreeBSD.org
COMMENT= Hangul Text Printing Utility
RUN_DEPENDS= hcode:${PORTSDIR}/korean/hcode
+FONTDIR= ${PREFIX}/${FONTDIR_REL}
+FONTDIR_REL= share/fonts/ked-${PORTNAME}
+FONTFILES= Gotic Header Munjo MunjoBold PCMunjo
+README_FILES= README README.jshin README.jshin.ks
+PLIST_FILES= bin/hpscat bin/hpscat.bin
+.for i in ${FONTFILES} ${README_FILES}
+PLIST_FILES+= ${FONTDIR_REL}/${i}
+.endfor
+PLIST_DIRS= ${FONTDIR_REL}
+PLIST_DIRSTRY= share/fonts
+SUB_FILES= hpscat.sh pkg-message
+SUB_LIST= FONTDIR=${FONTDIR}
USE_PERL5= yes
-pre-patch:
- @${REINPLACE_CMD} -e 's,<malloc.h>,<stdlib.h>,' \
- ${WRKSRC}/hpscat.h
-
-pre-configure:
- ${CP} ${FILESDIR}/hpscat.sh ${WRKSRC}/
+.include <bsd.port.options.mk>
do-install:
- @cd ${WRKSRC}; \
- ${MKDIR} ${PREFIX}/share/fonts/ked-hpscat; \
- ${INSTALL_PROGRAM} hpscat ${PREFIX}/bin/hpscat.bin; \
- ${INSTALL_SCRIPT} hpscat.sh ${PREFIX}/bin/hpscat; \
- ${INSTALL_DATA} ${WRKDIR}/ked/Header ${PREFIX}/share/fonts/ked-hpscat; \
- ${INSTALL_DATA} ${WRKDIR}/ked/Munjo ${PREFIX}/share/fonts/ked-hpscat; \
- ${INSTALL_DATA} ${WRKDIR}/ked/MunjoBold ${PREFIX}/share/fonts/ked-hpscat; \
- ${INSTALL_DATA} ${WRKDIR}/ked/PCMunjo ${PREFIX}/share/fonts/ked-hpscat; \
- ${INSTALL_DATA} ${WRKDIR}/ked/Gotic ${PREFIX}/share/fonts/ked-hpscat; \
- ${INSTALL_DATA} README ${PREFIX}/share/fonts/ked-hpscat; \
- ${INSTALL_DATA} README.jshin ${PREFIX}/share/fonts/ked-hpscat;\
- ${INSTALL_DATA} README.jshin.ks ${PREFIX}/share/fonts/ked-hpscat
+ @${INSTALL_PROGRAM} ${WRKSRC}/hpscat ${PREFIX}/bin/hpscat.bin
+ @${INSTALL_SCRIPT} ${WRKDIR}/hpscat.sh ${PREFIX}/bin/hpscat
+ @cd ${WRKSRC} && ${COPYTREE_SHARE} "${README_FILES}" ${FONTDIR}
+ @cd ${WRKDIR}/ked && ${COPYTREE_SHARE} "${FONTFILES}" ${FONTDIR}
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/korean/hpscat/files/hpscat.sh b/korean/hpscat/files/hpscat.sh.in
index 964104cfb8c1..592fb5a13c38 100644
--- a/korean/hpscat/files/hpscat.sh
+++ b/korean/hpscat/files/hpscat.sh.in
@@ -7,7 +7,7 @@
# It enables hpscat to print file without loading font in gs
#
-HFONTPATH=%%PREFIX%%/share/fonts/ked-hpscat
+HFONTPATH=%%FONTDIR%%
options=$*
fileoutput=0
diff --git a/korean/hpscat/files/patch-aa b/korean/hpscat/files/patch-Makefile
index a20c03072edd..a20c03072edd 100644
--- a/korean/hpscat/files/patch-aa
+++ b/korean/hpscat/files/patch-Makefile
diff --git a/korean/hpscat/files/patch-ab b/korean/hpscat/files/patch-ab
deleted file mode 100644
index 4ea18b447540..000000000000
--- a/korean/hpscat/files/patch-ab
+++ /dev/null
@@ -1,12 +0,0 @@
-*** user.c.old Fri Apr 4 13:40:38 1997
---- user.c Fri Apr 4 13:40:42 1997
-***************
-*** 37,43 ****
- char buf[BUFSIZ];
- char *home;
- FILE *fp;
-- extern char *getenv PROT((char *));
- home = getenv("HOME");
- if(strlen(home)==0)
- return;
---- 37,42 ----
diff --git a/korean/hpscat/files/patch-hpscat.c b/korean/hpscat/files/patch-hpscat.c
new file mode 100644
index 000000000000..93b54b13bcbb
--- /dev/null
+++ b/korean/hpscat/files/patch-hpscat.c
@@ -0,0 +1,38 @@
+--- hpscat.c.orig 1995-11-23 07:46:12.000000000 -0500
++++ hpscat.c 2013-06-12 17:10:59.000000000 -0400
+@@ -12,13 +12,14 @@
+ bool cheat;
+ FILE *fp, *ofp;
+
++static int open_outfile(char *);
++
+ /****************
+ main routine
+ ****************/
+
+-main(ac,av)
+- int ac;
+- char *av[];
++int
++main(int ac, char *av[])
+ {
+ int i;
+ extern void showfile PROT((char *));
+@@ -53,13 +54,13 @@
+ exit(0);
+ }
+
+-int
+-open_outfile(s) /* returns -1 if can't write */
+- char *s;
++static int
++open_outfile(char *s) /* returns -1 if can't write */
+ {
+ char ans[80], buf[256];
+ sprintf(buf,"%s.ps", s);
+- if(ofp=fopen(buf,"r")) { /* file exists */
++ ofp=fopen(buf,"r");
++ if(ofp) { /* file exists */
+ fclose(ofp);
+ fprintf(stderr,"output file %s exists...overwrite? ", buf);
+ gets(ans);
diff --git a/korean/hpscat/files/patch-hpscat.h b/korean/hpscat/files/patch-hpscat.h
new file mode 100644
index 000000000000..0ce84cff1334
--- /dev/null
+++ b/korean/hpscat/files/patch-hpscat.h
@@ -0,0 +1,28 @@
+--- hpscat.h.orig 1995-11-23 05:16:11.000000000 -0500
++++ hpscat.h 2013-06-12 18:37:53.000000000 -0400
+@@ -49,9 +49,11 @@
+ \*------------------------------*/
+
+ #include <stdio.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
+ #include <sys/time.h>
++#include <sys/wait.h>
+
+ #ifdef __GNUC__
+ # define PROT(x) x
+@@ -186,4 +188,12 @@
+ extern FILE *fp; /* file pointer to input file */
+ extern FILE *ofp; /* file pointer to output file */
+
++void endfile(void);
++void fatal(char *);
++int fillpagebuf(void);
++int find_f(int, int, int);
++int find_l(int, int, int);
++int find_m(int, int, int);
++int find_set(int);
++
+ /*** EOF ***/
diff --git a/korean/hpscat/files/patch-init.c b/korean/hpscat/files/patch-init.c
new file mode 100644
index 000000000000..66f90455914a
--- /dev/null
+++ b/korean/hpscat/files/patch-init.c
@@ -0,0 +1,11 @@
+--- init.c.orig 1995-11-23 17:18:58.000000000 -0500
++++ init.c 2013-06-12 17:34:31.000000000 -0400
+@@ -211,7 +211,7 @@
+ Time = localtime(&T.tv_sec);
+ sprintf(nalza, "%02d:%02d, %d/%d/%d",
+ Time->tm_hour, Time->tm_min,
+- Time->tm_mon+1, Time->tm_mday, Time->tm_year );
++ Time->tm_mon+1, Time->tm_mday, Time->tm_year + 1900);
+ }
+
+ /*** EOF ***/
diff --git a/korean/hpscat/files/patch-misc.c b/korean/hpscat/files/patch-misc.c
new file mode 100644
index 000000000000..2ead275084fc
--- /dev/null
+++ b/korean/hpscat/files/patch-misc.c
@@ -0,0 +1,21 @@
+--- misc.c.orig 1995-11-23 15:40:07.000000000 -0500
++++ misc.c 2013-06-12 18:43:01.000000000 -0400
+@@ -2,8 +2,8 @@
+ #include "hpscat.h"
+ #include "paper.h"
+
+-extern totalpages;
+-static converted;
++extern int totalpages;
++static int converted;
+ char *tmpfn;
+
+ void
+@@ -36,6 +36,7 @@
+ #endif
+ case Nbyte: strcpy(args[1], fromN); break;
+ case ISO: strcpy(args[1], fromI); break;
++ default: /* NOTREACHED */ return;
+ }
+ execute(args);
+ fclose(fp);
diff --git a/korean/hpscat/files/patch-paper.h b/korean/hpscat/files/patch-paper.h
new file mode 100644
index 000000000000..ae5dd5537d8b
--- /dev/null
+++ b/korean/hpscat/files/patch-paper.h
@@ -0,0 +1,22 @@
+--- paper.h.orig 1995-11-23 02:56:27.000000000 -0500
++++ paper.h 2013-06-12 16:57:50.000000000 -0400
+@@ -5,7 +5,7 @@
+ add other paper types like b4 and b5 before the last entry 'user' here
+ and their dimensions to the array 'papersize' in paper.c */
+ typedef enum {a3,a4,a5,b4,b5,letter,t10x14,legal,executive,
+- folio,quarto,statement,ledger,tabloid,user} PAPER;
++ folio,quarto,statement,ledger,tabloid,c5,user} PAPER;
+
+ /* mnemonics for length unit
+ add other unit such as pica and conversion factor to standard
+@@ -54,8 +54,8 @@
+ #define ABS_MIN_LM 18 /* depends on printer */
+
+
+-extern s_width;
+-extern s_width_nl;
++extern int s_width;
++extern int s_width_nl;
+ extern int l_width,l_height,l_lm1,l_lm2,l_bm,l_tm;
+ extern int l3_width,l3_height,l3_lm1,l3_lm2,l3_lm3,l3_bm,l3_tm;
+ extern int p_width,p_height,p_lm,p_bm,p_tm;
diff --git a/korean/hpscat/files/patch-showbuf.c b/korean/hpscat/files/patch-showbuf.c
new file mode 100644
index 000000000000..3e4f46cc2284
--- /dev/null
+++ b/korean/hpscat/files/patch-showbuf.c
@@ -0,0 +1,19 @@
+--- showbuf.c.orig 1995-11-23 07:01:36.000000000 -0500
++++ showbuf.c 2013-06-12 17:15:47.000000000 -0400
+@@ -210,7 +210,7 @@
+ fprintf(ofp,"90 rotate 0 %d translate ", - papersize[paper].width);
+ fprintf(ofp," %f 1 scale\n",HOR_SCALE_FAC);
+
+- if(nobox == False)
++ if(nobox == False) {
+ if(layout==Sero) {
+ box(p_lm, p_bm, p_width, p_height);
+ fillbox(p_lm, p_bm, s_width, p_height);
+@@ -236,6 +236,7 @@
+ fillbox(l3_lm2, l3_bm, s_width, l3_height);
+ fillbox(l3_lm3, l3_bm, s_width, l3_height);
+ }
++ }
+ if(noheader == False) {
+ x = (layout==Sero||layout==Sero2) ? p_lm : l_lm1;
+ y = (layout==Sero||layout==Sero2) ? p_tm : l_tm;
diff --git a/korean/hpscat/files/patch-user.c b/korean/hpscat/files/patch-user.c
new file mode 100644
index 000000000000..242f44720807
--- /dev/null
+++ b/korean/hpscat/files/patch-user.c
@@ -0,0 +1,10 @@
+--- user.c.orig 1995-11-23 05:17:16.000000000 -0500
++++ user.c 2013-06-12 17:24:33.000000000 -0400
+@@ -37,7 +37,6 @@
+ char buf[BUFSIZ];
+ char *home;
+ FILE *fp;
+- extern char *getenv PROT((char *));
+ home = getenv("HOME");
+ if(strlen(home)==0)
+ return;
diff --git a/korean/hpscat/files/pkg-message.in b/korean/hpscat/files/pkg-message.in
new file mode 100644
index 000000000000..45dc62841a0d
--- /dev/null
+++ b/korean/hpscat/files/pkg-message.in
@@ -0,0 +1,3 @@
+To use hpscat with font loading in gs, use hpscat.sh instead.
+Otherwise, you must setup ghostscript to load font first.
+Read %%FONTDIR%%/README.jshin(.ks)
diff --git a/korean/hpscat/pkg-plist b/korean/hpscat/pkg-plist
deleted file mode 100644
index a4b5b21fdcaa..000000000000
--- a/korean/hpscat/pkg-plist
+++ /dev/null
@@ -1,12 +0,0 @@
-bin/hpscat.bin
-bin/hpscat
-share/fonts/ked-hpscat/Header
-share/fonts/ked-hpscat/Munjo
-share/fonts/ked-hpscat/MunjoBold
-share/fonts/ked-hpscat/PCMunjo
-share/fonts/ked-hpscat/Gotic
-share/fonts/ked-hpscat/README
-share/fonts/ked-hpscat/README.jshin
-share/fonts/ked-hpscat/README.jshin.ks
-@dirrm share/fonts/ked-hpscat
-@dirrm share/fonts
diff --git a/korean/hpscat/pkg-req b/korean/hpscat/pkg-req
deleted file mode 100644
index 3a17a1131cf2..000000000000
--- a/korean/hpscat/pkg-req
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-if [ "$2" = "DEINSTALL" ]; then
- exit 0
-fi
-
-echo "To use hpscat with font loading in gs, use hpscat.sh instead"
-echo "Otherwise, you must setup ghostscript to load font first."
-echo "Read /usr/local/share/fonts/ked-hpscat/README.jshin(.ks)"
diff --git a/korean/hpscat/scripts/configure b/korean/hpscat/scripts/configure
deleted file mode 100644
index 31ccb334e762..000000000000
--- a/korean/hpscat/scripts/configure
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/perl
-#
-
-eval '(exit $?0)' && eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
-& eval 'exec /usr/bin/perl -S $0 $argv:q'
-if 0;
-
-system( "/usr/bin/perl -pi -e 's|%%PREFIX%%|$ENV{'PREFIX'}|g' $ENV{'WRKSRC'}/hpscat.sh" );