Date: Mon, 18 Oct 1999 16:18:12 GMT From: jtjang@gcn.net.tw To: FreeBSD-gnats-submit@freebsd.org Subject: ports/14393: New port: chinese/arphicttf Message-ID: <199910181618.QAA01204@phantom.at.home>
next in thread | raw e-mail | index | archive | help
>Number: 14393 >Category: ports >Synopsis: Free-distributable Chinese Big5/GB TTFs >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Oct 18 01:20:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Keith Jang >Release: FreeBSD 4.0-CURRENT i386 >Organization: End user >Environment: FreeBSD 4.0-CURRENT #0: Mon Oct 18 14:57:45 GMT 1999 root@phantom.at.home:/usr/src/sys/compile/phantom i386 >Description: This port installs four Chinese Big5/GB TrueType fonts, includes Kaiti/Mingti(Big5) and Kaiti/Sungti(GB). It then can be used along with X Window System or typesetting software like CJK. Thanks to Arphic Technology, you may freely distribute these high-quality fonts under a GPL-based license. See ARPHIC_*.TXT for details. >How-To-Repeat: >Fix: Please commit the following port, thanks. # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # arphicttf # arphicttf/files # arphicttf/files/md5 # arphicttf/pkg # arphicttf/pkg/COMMENT # arphicttf/pkg/DEINSTALL # arphicttf/pkg/DESCR # arphicttf/pkg/INSTALL # arphicttf/pkg/PLIST # arphicttf/Makefile # echo c - arphicttf mkdir -p arphicttf > /dev/null 2>&1 echo c - arphicttf/files mkdir -p arphicttf/files > /dev/null 2>&1 echo x - arphicttf/files/md5 sed 's/^X//' >arphicttf/files/md5 << 'END-of-arphicttf/files/md5' XMD5 (zh-arphicttf-1.0.tar.gz) = 46301301c4a8b201189f923fcd29e7b1 END-of-arphicttf/files/md5 echo c - arphicttf/pkg mkdir -p arphicttf/pkg > /dev/null 2>&1 echo x - arphicttf/pkg/COMMENT sed 's/^X//' >arphicttf/pkg/COMMENT << 'END-of-arphicttf/pkg/COMMENT' XFour Chinese Big5/GB TrueType fonts made by Arphic Technology. END-of-arphicttf/pkg/COMMENT echo x - arphicttf/pkg/DEINSTALL sed 's/^X//' >arphicttf/pkg/DEINSTALL << 'END-of-arphicttf/pkg/DEINSTALL' X#!/bin/sh Xif [ "$2" != "DEINSTALL" ]; then X exit 0 Xfi XFONTDIR=${PKG_PREFIX}/lib/X11/fonts/TrueType Xcd ${FONTDIR} X X# Restore fonts.dir Xsed -e '/ -ar-/d' -e '/ -arphic-/d' fonts.dir > fonts.dir.tmp Xnumfonts=$(echo $(cat fonts.dir.tmp | wc -l) - 1 | bc) Xecho ${numfonts} > fonts.dir Xsed -e 1d fonts.dir.tmp >> fonts.dir Xrm -f fonts.dir.tmp X X# Restore fonts.alias Xsed -e '/^-ar-/d' -e '/^-arphic-/d' fonts.alias > fonts.alias.tmp Xmv -f fonts.alias.tmp fonts.alias END-of-arphicttf/pkg/DEINSTALL echo x - arphicttf/pkg/DESCR sed 's/^X//' >arphicttf/pkg/DESCR << 'END-of-arphicttf/pkg/DESCR' XThis port installs four Chinese Big5/GB TrueType fonts, includes XKaiti/Mingti(Big5) and Kaiti/Sungti(GB). It then can be used along Xwith X Window System or typesetting software like CJK. Thanks to XArphic Technology, you may freely distribute these high-quality Xfonts under a GPL-based license. See ARPHIC_*.TXT for details. END-of-arphicttf/pkg/DESCR echo x - arphicttf/pkg/INSTALL sed 's/^X//' >arphicttf/pkg/INSTALL << 'END-of-arphicttf/pkg/INSTALL' X#!/bin/sh XFONTDIR=${PKG_PREFIX}/lib/X11/fonts/TrueType Xif [ "$2" = "PRE-INSTALL" ]; then X echo "Please add ${FONTDIR} to your /etc/XF86Config file" X exit 0 Xfi Xcd ${FONTDIR} X Xecho "Updating fonts.dir & fonts.alias. This may take a while..." X# Update fonts.dir Xtouch fonts.dir Xsed -e '/ -ar-/d' -e '/ -arphic-/d' fonts.dir > fonts.dir.tmp X# Add 16 new fonts Xnumfonts=$(echo $(cat fonts.dir.tmp |wc -l) - 1 + 16 |bc) Xif [ ${numfonts} -le 16 ]; then # fonts.dir.tmp is empty X echo 16 > fonts.dir Xelse X echo ${numfonts} > fonts.dir X sed -e 1d fonts.dir.tmp >> fonts.dir Xfi Xrm -f fonts.dir.tmp X X# The TTF filenames are so diverse that we can only iterate one X# by one, instead of a generic for loop. X X# bkai00mp.ttf (Big5) Xecho bkai00mp.ttf -ar-kai-medium-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir Xecho ab=y:bkai00mp.ttf -ar-kai-bold-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir Xecho ai=0.3:bkai00mp.ttf -ar-kai-medium-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir Xecho ab=y:ai=0.3:bkai00mp.ttf -ar-kai-bold-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir X X# bsmi00lp.ttf (Big5) Xecho bsmi00lp.ttf -ar-ming-medium-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir Xecho ab=y:bsmi00lp.ttf -ar-ming-bold-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir Xecho ai=0.3:bsmi00lp.ttf -ar-ming-medium-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir Xecho ab=y:ai=0.3:bsmi00lp.ttf -ar-ming-bold-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir X X# gbsn00lp.ttf (GB) Xecho gbsn00lp.ttf -ar-sung-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir Xecho ab=y:gbsn00lp.ttf -ar-sung-bold-r-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir Xecho ai=0.3:gbsn00lp.ttf -ar-sung-medium-i-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir Xecho ab=y:ai=0.3:gbsn00lp.ttf -ar-sung-bold-i-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir X X# gkai00mp.ttf (GB) Xecho bkai00mp.ttf -ar-kai-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir Xecho ab=y:bkai00mp.ttf -ar-kai-bold-r-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir Xecho ai=0.3:bkai00mp.ttf -ar-kai-medium-i-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir Xecho ab=y:ai=0.3:bkai00mp.ttf -ar-kai-bold-i-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir X X X# Update fonts.alias, font size ranges from 8 to 128. Xtouch fonts.alias Xsed -e '/^-ar-/d' -e '/^-arphic-/d' fonts.alias > fonts.alias.tmp Xmv -f fonts.alias.tmp fonts.alias X X# Iterate four fonts, same as in fonts.dir. X X# bkai00mp.ttf (Big5) XSIZE=8 Xwhile [ ${SIZE} -le 128 ] Xdo X echo -arphic-kai-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-big5-0 -ar-kai-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-big5-0 >> fonts.alias; X SIZE=`expr ${SIZE} + 1`; Xdone X X# bsmi00lp.ttf (Big5) XSIZE=8 Xwhile [ ${SIZE} -le 128 ] Xdo X echo -arphic-ming-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-big5-0 -ar-ming-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-big5-0 >> fonts.alias; X SIZE=`expr ${SIZE} + 1`; Xdone X X# gbsn00lp.ttf (GB) XSIZE=8 Xwhile [ ${SIZE} -le 128 ] Xdo X echo -arphic-sung-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-gb2312.1980-0 -ar-sung-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-gb2312.1980-0 >> fonts.alias; X SIZE=`expr ${SIZE} + 1`; Xdone X X# gkai00mp.ttf (GB) XSIZE=8 Xwhile [ ${SIZE} -le 128 ] Xdo X echo -arphic-kai-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-gb2312.1980-0 -ar-kai-medium-r-normal--${SIZE}-`expr ${SIZE} \* 10`-0-0-c-`expr ${SIZE} \* 10`-gb2312.1980-0 >> fonts.alias; X SIZE=`expr ${SIZE} + 1`; Xdone END-of-arphicttf/pkg/INSTALL echo x - arphicttf/pkg/PLIST sed 's/^X//' >arphicttf/pkg/PLIST << 'END-of-arphicttf/pkg/PLIST' Xlib/X11/fonts/TrueType/ARPHICPL_Big5.TXT Xlib/X11/fonts/TrueType/ARPHICPL_Eng.TXT Xlib/X11/fonts/TrueType/ARPHICPL_GB.TXT Xlib/X11/fonts/TrueType/bkai00mp.ttf Xlib/X11/fonts/TrueType/bsmi00lp.ttf Xlib/X11/fonts/TrueType/gbsn00lp.ttf Xlib/X11/fonts/TrueType/gkai00mp.ttf X@unexec rmdir %D/lib/X11/fonts/TrueType 2>/dev/null || true END-of-arphicttf/pkg/PLIST echo x - arphicttf/Makefile sed 's/^X//' >arphicttf/Makefile << 'END-of-arphicttf/Makefile' X# New ports collection makefile for: Arphic Chinese TrueType fonts X# Version required: 1.0 X# Date created: 13 Oct 1999 X# Whom: Keith Jang <jtjang@gcn.net.tw> X# X# $FreeBSD$ X# X XDISTNAME= zh-arphicttf-1.0 XCATEGORIES= chinese x11-fonts XMASTER_SITES= ftp://freebsd.sinica.edu.tw/pub/keith/ X XMAINTAINER= jtjang@gcn.net.tw X XLIB_DEPENDS= font.1:${PORTSDIR}/x11-servers/XttXF86srv-common X XUSE_X_PREFIX= yes X XNO_BUILD= yes XSHAREMODE= 644 XFONTDIR= ${PREFIX}/lib/X11/fonts/TrueType X X.include <bsd.port.pre.mk> X Xdo-install: X.if !exists(${FONTDIR}) X @${ECHO} "=========================================================" X @${ECHO} "Please add ${FONTDIR} to your font path" X @${ECHO} "in /etc/XF86Config." X @${ECHO} "=========================================================" X @${MKDIR} ${FONTDIR} X.endif X @${INSTALL_DATA} ${WRKDIR}/bkai00mp.ttf ${FONTDIR} X @${INSTALL_DATA} ${WRKDIR}/bsmi00lp.ttf ${FONTDIR} X @${INSTALL_DATA} ${WRKDIR}/gbsn00lp.ttf ${FONTDIR} X @${INSTALL_DATA} ${WRKDIR}/gkai00mp.ttf ${FONTDIR} X @${INSTALL_DATA} ${WRKDIR}/ARPHICPL_Big5.TXT ${FONTDIR} X @${INSTALL_DATA} ${WRKDIR}/ARPHICPL_Eng.TXT ${FONTDIR} X @${INSTALL_DATA} ${WRKDIR}/ARPHICPL_GB.TXT ${FONTDIR} X @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL X X.include <bsd.port.post.mk> END-of-arphicttf/Makefile exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910181618.QAA01204>