aboutsummaryrefslogtreecommitdiff
path: root/korean
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2020-08-28 03:46:41 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2020-08-28 03:46:41 +0000
commitbdf6ecf9bf3d8f9151de8b139cbb128b5647b115 (patch)
tree1dcc9ba1c8e4efedf54273f9f4e944f9b1d04bd1 /korean
parent8c09cea9bfa00ae9fda26e3d0a0e68be9cf8d45c (diff)
downloadports-bdf6ecf9bf3d8f9151de8b139cbb128b5647b115.tar.gz
ports-bdf6ecf9bf3d8f9151de8b139cbb128b5647b115.zip
- Re-add korean/hpscat. The FTP server was restored recently.
- Fix build with Clang 11.
Notes
Notes: svn path=/head/; revision=546701
Diffstat (limited to 'korean')
-rw-r--r--korean/Makefile1
-rw-r--r--korean/hpscat/Makefile40
-rw-r--r--korean/hpscat/distinfo5
-rw-r--r--korean/hpscat/files/hpscat.sh.in32
-rw-r--r--korean/hpscat/files/patch-Makefile18
-rw-r--r--korean/hpscat/files/patch-hpscat.c11
-rw-r--r--korean/hpscat/files/patch-hpscat.h29
-rw-r--r--korean/hpscat/files/patch-init.c19
-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.in9
-rw-r--r--korean/hpscat/pkg-descr9
14 files changed, 245 insertions, 0 deletions
diff --git a/korean/Makefile b/korean/Makefile
index 8c5f9cc79728..448ccc79eb0b 100644
--- a/korean/Makefile
+++ b/korean/Makefile
@@ -15,6 +15,7 @@
SUBDIR += hanyangfonts
SUBDIR += hcode
SUBDIR += hmconv
+ SUBDIR += hpscat
SUBDIR += hunspell
SUBDIR += ibus-hangul
SUBDIR += imhangul-gtk2
diff --git a/korean/hpscat/Makefile b/korean/hpscat/Makefile
new file mode 100644
index 000000000000..c901f461ad78
--- /dev/null
+++ b/korean/hpscat/Makefile
@@ -0,0 +1,40 @@
+# Created by: Junho CHOI <junho.choi@gmail.com>
+# $FreeBSD$
+
+PORTNAME= hpscat
+PORTVERSION= 1.3.1
+PORTEPOCH= 2
+CATEGORIES= korean print
+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: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
+SUB_FILES= hpscat.sh pkg-message
+SUB_LIST= FONTDIR=${FONTDIR}
+USES= perl5
+
+do-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/hpscat ${STAGEDIR}${PREFIX}/bin/hpscat.bin
+ @${INSTALL_SCRIPT} ${WRKDIR}/hpscat.sh ${STAGEDIR}${PREFIX}/bin/hpscat
+ @cd ${WRKSRC} && ${COPYTREE_SHARE} "${README_FILES}" ${STAGEDIR}${FONTDIR}
+ @cd ${WRKDIR}/ked && ${COPYTREE_SHARE} "${FONTFILES}" ${STAGEDIR}${FONTDIR}
+
+.include <bsd.port.mk>
diff --git a/korean/hpscat/distinfo b/korean/hpscat/distinfo
new file mode 100644
index 000000000000..bbdc4a357ed8
--- /dev/null
+++ b/korean/hpscat/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1598586366
+SHA256 (hpscat-jshin.tar.gz) = 621403a0d49779cdf7936b91ae7a2200f9ac94ec75fbc0ca9488196cef5c6f25
+SIZE (hpscat-jshin.tar.gz) = 26075
+SHA256 (ked.tar.gz) = fa3b9674609b10b5fe4d96ca2a801fb5d50d8281d0f52120319013fd6e3c6c21
+SIZE (ked.tar.gz) = 305769
diff --git a/korean/hpscat/files/hpscat.sh.in b/korean/hpscat/files/hpscat.sh.in
new file mode 100644
index 000000000000..592fb5a13c38
--- /dev/null
+++ b/korean/hpscat/files/hpscat.sh.in
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# hpscat fontend for FreeBSD ports
+#
+# 4 Apr 1997, Choi Jun Ho <junker@jazz.snu.ac.kr>
+#
+# It enables hpscat to print file without loading font in gs
+#
+
+HFONTPATH=%%FONTDIR%%
+
+options=$*
+fileoutput=0
+
+# check if -f option is specified
+for i in $*
+do
+ case $i in
+ -f) fileoutput=1; shift;;
+ esac
+done
+
+if [ $fileoutput != 1 ]; then
+# print font header
+ cat $HFONTPATH/Header
+ for hfont in Munjo Gotic MunjoBold PCMunjo
+ do
+ cat $HFONTPATH/$hfont
+ done
+fi
+
+exec hpscat.bin $options
diff --git a/korean/hpscat/files/patch-Makefile b/korean/hpscat/files/patch-Makefile
new file mode 100644
index 000000000000..63aaad9a0b3c
--- /dev/null
+++ b/korean/hpscat/files/patch-Makefile
@@ -0,0 +1,18 @@
+--- Makefile.orig 1995-11-22 15:42:41 UTC
++++ Makefile
+@@ -11,10 +11,12 @@ DHPS =
+ DADVHF = -DADV_HFONT
+ #DADVHF =
+ # define if you want to make the default paper size US letter instead of A4
+-DUS = -DUS_VERSION
+-#DUS =
+-CFLAGS = -O $(DHPS) $(DADVHF) $(DUS)
++#DUS = -DUS_VERSION
++DUS =
++CFLAGS += $(DHPS) $(DADVHF) $(DUS)
+ LDFLAGS = -s
++
++all: $(PRG)
+
+ $(PRG): $(OBJ)
+ $(CC) $(LDFLAGS) -o $@ $(OBJ)
diff --git a/korean/hpscat/files/patch-hpscat.c b/korean/hpscat/files/patch-hpscat.c
new file mode 100644
index 000000000000..74ff08df97e4
--- /dev/null
+++ b/korean/hpscat/files/patch-hpscat.c
@@ -0,0 +1,11 @@
+--- hpscat.c.orig 2019-08-03 11:25:44 UTC
++++ hpscat.c
+@@ -62,7 +62,7 @@ open_outfile(s) /* returns -1 if can
+ if(ofp=fopen(buf,"r")) { /* file exists */
+ fclose(ofp);
+ fprintf(stderr,"output file %s exists...overwrite? ", buf);
+- gets(ans);
++ fgets(buf,256,ans);
+ if(ans[0]=='y')
+ unlink(buf);
+ else
diff --git a/korean/hpscat/files/patch-hpscat.h b/korean/hpscat/files/patch-hpscat.h
new file mode 100644
index 000000000000..3b4143868185
--- /dev/null
+++ b/korean/hpscat/files/patch-hpscat.h
@@ -0,0 +1,29 @@
+--- hpscat.h.orig 1995-11-23 10:16:11 UTC
++++ hpscat.h
+@@ -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
+@@ -185,5 +187,13 @@ extern bool cheat; /* true if cheating */
+ extern bool narrow; /* false if normal courier is used */
+ 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..4f5b2040fb37
--- /dev/null
+++ b/korean/hpscat/files/patch-init.c
@@ -0,0 +1,19 @@
+--- init.c.orig 1995-11-23 22:18:58 UTC
++++ init.c
+@@ -19,7 +19,6 @@ char *title;
+ PAPER paper;
+ int min_bm;
+ int min_lm;
+-int s_width;
+ int s_width_nl;
+
+ /* Exact hangul Postscript font names
+@@ -211,7 +210,7 @@ setnalza()
+ 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..36c62278587c
--- /dev/null
+++ b/korean/hpscat/files/patch-misc.c
@@ -0,0 +1,21 @@
+--- misc.c.orig 1995-11-23 20:40:07 UTC
++++ misc.c
+@@ -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 @@ convert(s)
+ #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..ab53b278597d
--- /dev/null
+++ b/korean/hpscat/files/patch-paper.h
@@ -0,0 +1,22 @@
+--- paper.h.orig 1995-11-23 07:56:27 UTC
++++ paper.h
+@@ -5,7 +5,7 @@ typedef struct { char name[12];
+ 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 @@ extern void setmargin();
+ #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..71967e8e3593
--- /dev/null
+++ b/korean/hpscat/files/patch-showbuf.c
@@ -0,0 +1,19 @@
+--- showbuf.c.orig 1995-11-23 12:01:36 UTC
++++ showbuf.c
+@@ -210,7 +210,7 @@ teduri(fname)
+ 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 @@ teduri(fname)
+ 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..90d49133b214
--- /dev/null
+++ b/korean/hpscat/files/patch-user.c
@@ -0,0 +1,10 @@
+--- user.c.orig 1995-11-23 10:17:16 UTC
++++ user.c
+@@ -37,7 +37,6 @@ read_rc()
+ 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..d3d0d1516ddc
--- /dev/null
+++ b/korean/hpscat/files/pkg-message.in
@@ -0,0 +1,9 @@
+[
+{ type: install
+ message: <<EOM
+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)
+EOM
+}
+]
diff --git a/korean/hpscat/pkg-descr b/korean/hpscat/pkg-descr
new file mode 100644
index 000000000000..05f423dcdec3
--- /dev/null
+++ b/korean/hpscat/pkg-descr
@@ -0,0 +1,9 @@
+hpscat-1.3jshin
+-------------------
+
+hpscat is a small printing utility that print Hangul characters in
+any PostScript printer(including ghostscript). It use the hangul PS
+font in ked, so you must load the font before printing the document
+processed by hpscat.
+
+This version is revised by Jungshik Shin <jshin@minerva.cis.yale.edu>.