Initial import of bg5ps-1.3.0

This tool converts Big5/GB encoded files to postscript.
Using this tool, you can print Big5/GB files :)
This commit is contained in:
kevlo 2001-01-21 15:11:33 +00:00
parent 4356604572
commit f1191603f5
10 changed files with 162 additions and 0 deletions

28
chinese/bg5ps/Makefile Normal file
View File

@ -0,0 +1,28 @@
# $OpenBSD: Makefile,v 1.1.1.1 2001/01/21 15:11:33 kevlo Exp $
DISTNAME= bg5ps-1.3.0
PKGNAME= zh-${DISTNAME}
CATEGORIES= chinese x11
NEED_VERSION= 1.351
MAINTAINER= Kevin Lo <kevlo@openbsd.org>
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
MASTER_SITES= ftp://freebsd.sinica.edu.tw/pub/keith/
RUN_DEPENDS= ${LOCALBASE}/lib/X11/fonts/TrueType/bsmi00lp.ttf::chinese/arphicttf \
python::lang/python
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/lib/bg5ps
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/bg5ps
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/bg5ps
${INSTALL_DATA} ${WRKSRC}/bg5ps.conf ${PREFIX}/lib/bg5ps
cp -R ${WRKSRC}/doc/* ${PREFIX}/share/doc/bg5ps
cp -R ${WRKSRC}/examples/* ${PREFIX}/share/examples/bg5ps
.include <bsd.port.mk>

3
chinese/bg5ps/files/md5 Normal file
View File

@ -0,0 +1,3 @@
MD5 (bg5ps-1.3.0.tar.gz) = b28d32a2c9072a9efc6ee59f9441e22b
RMD160 (bg5ps-1.3.0.tar.gz) = c35fcd17eedf4fb85db4bb53b6f0ea44a185ba6d
SHA1 (bg5ps-1.3.0.tar.gz) = b7fc700ff1336b74fe447fd4b13bca7ed3604aa8

View File

@ -0,0 +1,40 @@
--- Makefile.orig Mon Feb 14 20:41:27 2000
+++ Makefile Sun Jan 21 22:40:02 2001
@@ -19,28 +19,24 @@
CC = gcc
INSTALL = install
-CFLAGS =
+CFLAGS = -I${LOCALBASE}/include
LIBS = -lttf -lm
-INCLUDEDIR =
+LIBSDIR= -L${LOCALBASE}/lib
-prefix = /usr
-BINDIR = $(prefix)/bin
-ETCDIR = /etc/chinese/
+PREFIX?= /usr/local
+BINDIR = $(PREFIX)/bin
all: ttf2psm
%.o : %.c
- $(CC) -c $(CFLAGS) $(INCLUDEDIR) $< -o $@
+ $(CC) -c $(CFLAGS) $< -o $@
ttf2psm: $(OBJS)
- $(CC) $(CFLAGS) $(INCLUDEDIR) $(LIBS) -o ttf2psm $(OBJS)
+ $(CC) $(CFLAGS) $(LIBSDIR) $(LIBS) -o ttf2psm $(OBJS)
-install: all bg5ps bg5ps.conf
- mkdir -p $(ETCDIR)
- mkdir -p $(BINDIR)
- $(INSTALL) -m644 bg5ps.conf $(ETCDIR)/bg5ps.conf
- $(INSTALL) -m755 bg5ps $(BINDIR)
- $(INSTALL) -m755 ttf2psm $(BINDIR)
+install: all bg5ps
+ install -m 755 bg5ps $(BINDIR)
+ install -m 755 ttf2psm $(BINDIR)
clean:
rm -rf *.o core ttf2psm *~

View File

@ -0,0 +1,41 @@
--- bg5ps.orig Mon Feb 14 20:46:43 2000
+++ bg5ps Sun Jan 21 22:40:56 2001
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/local/bin/python
################################################################################
# bg5ps.py which use the ttf2ps program to convert the Big5 Coding chinese #
# text into printable postscript file. Since it uses true type font, the #
@@ -11,7 +11,7 @@
#
# Revision 1.5 2000/02/14 20:40:04 platin
#
-# Change default config file to /etc/chinese/bg5ps.conf
+# Change default config file to /usr/local/lib/bg5ps/bg5ps.conf
#
# Revision 1.4 2000/02/14 20:28:35 platin
# Automatic selection of fontName in echo Encoding.
@@ -55,7 +55,7 @@
#start default config file segment
#Font and font path
chineseFontPath=wd
-fontName="ntu_kai"
+fontName="bsmi00lp"
#Output only even or odd
oddPages=true
@@ -443,10 +443,10 @@
exec l
cf.close()
else:
- sys.stderr.write("\n~/.bg5ps.conf not found.\n Trying /etc/chinese/bg5ps.conf.")
- if os.path.isfile("/etc/chinese/bg5ps.conf"):
- sys.stderr.write("\n /etc/chinese/bg5ps.conf found. Use configuration file /etc/chinese/bg5ps.conf")
- cf=open("/etc/chinese/bg5ps.conf","r")
+ sys.stderr.write("\n~/.bg5ps.conf not found.\n Trying /usr/local/lib/bg5ps/bg5ps.conf.")
+ if os.path.isfile("/usr/local/lib/g5ps/bg5ps.conf"):
+ sys.stderr.write("\n /usr/local/lib/bg5ps/bg5ps.conf found. Use configuration file /usr/local/lib/bg5ps/bg5ps.conf")
+ cf=open("/usr/local/lib/bg5ps/bg5ps.conf","r")
for l in cf.readlines():
exec l
cf.close()

View File

@ -0,0 +1,11 @@
--- bg5ps.conf.orig Thu Jan 18 14:15:41 2001
+++ bg5ps.conf Sun Jan 21 20:45:16 2001
@@ -4,7 +4,7 @@
Encoding="big5"
#chineseFontPath: 指定中文字型的路徑(預設值: 與 bg5ps 同)
-chineseFontPath="/usr/share/fonts/ttf/"
+chineseFontPath="/usr/local/lib/X11/fonts/TrueType"
#modify the above line

View File

@ -0,0 +1,9 @@
--- gb2312-bg5ps.conf.orig Thu Jan 18 14:33:33 2001
+++ gb2312-bg5ps.conf Sun Jan 21 20:59:48 2001
@@ -1,5 +1,5 @@
#chineseFontPath: 指定中文字型的路徑(預設值: 與 bg5ps 同)
-chineseFontPath="/usr/share/fonts/ttf/"
+chineseFontPath="/usr/local/lib/X11/fonts/TrueType/"
#modify the above line

View File

@ -0,0 +1 @@
convert Big5/GB encoded files to postscript

2
chinese/bg5ps/pkg/DESCR Normal file
View File

@ -0,0 +1,2 @@
bg5ps is a Python script that generates Postscript from Chinese Big5/GB
encoded files, using ttf fonts.

View File

@ -0,0 +1,2 @@
Please copy ${PREFIX}/lib/bg5ps/bg5ps.conf to ~/.bg5ps.conf,
then modify it to suit your needs.

25
chinese/bg5ps/pkg/PLIST Normal file
View File

@ -0,0 +1,25 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2001/01/21 15:11:33 kevlo Exp $
bin/bg5ps
bin/ttf2psm
lib/bg5ps/bg5ps.conf
share/doc/bg5ps/COPYING.txt
share/doc/bg5ps/bg5ps.sgml
share/doc/bg5ps/bg5ps.txt
share/doc/bg5ps/html/bg5ps-1.html
share/doc/bg5ps/html/bg5ps-2.html
share/doc/bg5ps/html/bg5ps-3.html
share/doc/bg5ps/html/bg5ps-4.html
share/doc/bg5ps/html/bg5ps-5.html
share/doc/bg5ps/html/bg5ps-6.html
share/doc/bg5ps/html/bg5ps-7.html
share/doc/bg5ps/html/bg5ps.html
share/doc/bg5ps/makeps
share/doc/bg5ps/ttf2ps.doc
share/examples/bg5ps/netscape.ps
share/examples/bg5ps/test.big5
share/examples/bg5ps/test.gb2312
share/examples/bg5ps/test.sh
@dirrm share/examples/bg5ps
@dirrm share/doc/bg5ps/html
@dirrm share/doc/bg5ps
@dirrm lib/bg5ps