mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
PR: 14393
Submitted by: Keith Jang <jtjang@gcn.net.tw> Import new port: Free-distributable Chinese Big5/GB TTFs. 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.
This commit is contained in:
parent
944bcef8cd
commit
8aab7760b3
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=22522
42
chinese/arphicttf/Makefile
Normal file
42
chinese/arphicttf/Makefile
Normal file
@ -0,0 +1,42 @@
|
||||
# New ports collection makefile for: Arphic Chinese TrueType fonts
|
||||
# Version required: 1.0
|
||||
# Date created: 13 Oct 1999
|
||||
# Whom: Keith Jang <jtjang@gcn.net.tw>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
DISTNAME= zh-arphicttf-1.0
|
||||
CATEGORIES= chinese x11-fonts
|
||||
MASTER_SITES= ftp://freebsd.sinica.edu.tw/pub/keith/
|
||||
|
||||
MAINTAINER= jtjang@gcn.net.tw
|
||||
|
||||
LIB_DEPENDS= font.1:${PORTSDIR}/x11-servers/XttXF86srv-common
|
||||
|
||||
USE_X_PREFIX= yes
|
||||
|
||||
NO_BUILD= yes
|
||||
SHAREMODE= 644
|
||||
FONTDIR= ${PREFIX}/lib/X11/fonts/TrueType
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
do-install:
|
||||
.if !exists(${FONTDIR})
|
||||
@${ECHO} "========================================================="
|
||||
@${ECHO} "Please add ${FONTDIR} to your font path"
|
||||
@${ECHO} "in /etc/XF86Config."
|
||||
@${ECHO} "========================================================="
|
||||
@${MKDIR} ${FONTDIR}
|
||||
.endif
|
||||
@${INSTALL_DATA} ${WRKDIR}/bkai00mp.ttf ${FONTDIR}
|
||||
@${INSTALL_DATA} ${WRKDIR}/bsmi00lp.ttf ${FONTDIR}
|
||||
@${INSTALL_DATA} ${WRKDIR}/gbsn00lp.ttf ${FONTDIR}
|
||||
@${INSTALL_DATA} ${WRKDIR}/gkai00mp.ttf ${FONTDIR}
|
||||
@${INSTALL_DATA} ${WRKDIR}/ARPHICPL_Big5.TXT ${FONTDIR}
|
||||
@${INSTALL_DATA} ${WRKDIR}/ARPHICPL_Eng.TXT ${FONTDIR}
|
||||
@${INSTALL_DATA} ${WRKDIR}/ARPHICPL_GB.TXT ${FONTDIR}
|
||||
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
|
||||
|
||||
.include <bsd.port.post.mk>
|
1
chinese/arphicttf/distinfo
Normal file
1
chinese/arphicttf/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (zh-arphicttf-1.0.tar.gz) = 46301301c4a8b201189f923fcd29e7b1
|
1
chinese/arphicttf/pkg-comment
Normal file
1
chinese/arphicttf/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
Four Chinese Big5/GB TrueType fonts made by Arphic Technology.
|
17
chinese/arphicttf/pkg-deinstall
Normal file
17
chinese/arphicttf/pkg-deinstall
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
if [ "$2" != "DEINSTALL" ]; then
|
||||
exit 0
|
||||
fi
|
||||
FONTDIR=${PKG_PREFIX}/lib/X11/fonts/TrueType
|
||||
cd ${FONTDIR}
|
||||
|
||||
# Restore fonts.dir
|
||||
sed -e '/ -ar-/d' -e '/ -arphic-/d' fonts.dir > fonts.dir.tmp
|
||||
numfonts=$(echo $(cat fonts.dir.tmp | wc -l) - 1 | bc)
|
||||
echo ${numfonts} > fonts.dir
|
||||
sed -e 1d fonts.dir.tmp >> fonts.dir
|
||||
rm -f fonts.dir.tmp
|
||||
|
||||
# Restore fonts.alias
|
||||
sed -e '/^-ar-/d' -e '/^-arphic-/d' fonts.alias > fonts.alias.tmp
|
||||
mv -f fonts.alias.tmp fonts.alias
|
5
chinese/arphicttf/pkg-descr
Normal file
5
chinese/arphicttf/pkg-descr
Normal file
@ -0,0 +1,5 @@
|
||||
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.
|
88
chinese/arphicttf/pkg-install
Normal file
88
chinese/arphicttf/pkg-install
Normal file
@ -0,0 +1,88 @@
|
||||
#!/bin/sh
|
||||
FONTDIR=${PKG_PREFIX}/lib/X11/fonts/TrueType
|
||||
if [ "$2" = "PRE-INSTALL" ]; then
|
||||
echo "Please add ${FONTDIR} to your /etc/XF86Config file"
|
||||
exit 0
|
||||
fi
|
||||
cd ${FONTDIR}
|
||||
|
||||
echo "Updating fonts.dir & fonts.alias. This may take a while..."
|
||||
# Update fonts.dir
|
||||
touch fonts.dir
|
||||
sed -e '/ -ar-/d' -e '/ -arphic-/d' fonts.dir > fonts.dir.tmp
|
||||
# Add 16 new fonts
|
||||
numfonts=$(echo $(cat fonts.dir.tmp |wc -l) - 1 + 16 |bc)
|
||||
if [ ${numfonts} -le 16 ]; then # fonts.dir.tmp is empty
|
||||
echo 16 > fonts.dir
|
||||
else
|
||||
echo ${numfonts} > fonts.dir
|
||||
sed -e 1d fonts.dir.tmp >> fonts.dir
|
||||
fi
|
||||
rm -f fonts.dir.tmp
|
||||
|
||||
# The TTF filenames are so diverse that we can only iterate one
|
||||
# by one, instead of a generic for loop.
|
||||
|
||||
# bkai00mp.ttf (Big5)
|
||||
echo bkai00mp.ttf -ar-kai-medium-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
|
||||
echo ab=y:bkai00mp.ttf -ar-kai-bold-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
|
||||
echo ai=0.3:bkai00mp.ttf -ar-kai-medium-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
|
||||
echo ab=y:ai=0.3:bkai00mp.ttf -ar-kai-bold-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
|
||||
|
||||
# bsmi00lp.ttf (Big5)
|
||||
echo bsmi00lp.ttf -ar-ming-medium-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
|
||||
echo ab=y:bsmi00lp.ttf -ar-ming-bold-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
|
||||
echo ai=0.3:bsmi00lp.ttf -ar-ming-medium-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
|
||||
echo ab=y:ai=0.3:bsmi00lp.ttf -ar-ming-bold-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir
|
||||
|
||||
# gbsn00lp.ttf (GB)
|
||||
echo gbsn00lp.ttf -ar-sung-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir
|
||||
echo ab=y:gbsn00lp.ttf -ar-sung-bold-r-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir
|
||||
echo ai=0.3:gbsn00lp.ttf -ar-sung-medium-i-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir
|
||||
echo ab=y:ai=0.3:gbsn00lp.ttf -ar-sung-bold-i-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir
|
||||
|
||||
# gkai00mp.ttf (GB)
|
||||
echo bkai00mp.ttf -ar-kai-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir
|
||||
echo ab=y:bkai00mp.ttf -ar-kai-bold-r-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir
|
||||
echo ai=0.3:bkai00mp.ttf -ar-kai-medium-i-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir
|
||||
echo ab=y:ai=0.3:bkai00mp.ttf -ar-kai-bold-i-normal--0-0-0-0-c-0-gb2312.1980-0 >> fonts.dir
|
||||
|
||||
|
||||
# Update fonts.alias, font size ranges from 8 to 128.
|
||||
touch fonts.alias
|
||||
sed -e '/^-ar-/d' -e '/^-arphic-/d' fonts.alias > fonts.alias.tmp
|
||||
mv -f fonts.alias.tmp fonts.alias
|
||||
|
||||
# Iterate four fonts, same as in fonts.dir.
|
||||
|
||||
# bkai00mp.ttf (Big5)
|
||||
SIZE=8
|
||||
while [ ${SIZE} -le 128 ]
|
||||
do
|
||||
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;
|
||||
SIZE=`expr ${SIZE} + 1`;
|
||||
done
|
||||
|
||||
# bsmi00lp.ttf (Big5)
|
||||
SIZE=8
|
||||
while [ ${SIZE} -le 128 ]
|
||||
do
|
||||
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;
|
||||
SIZE=`expr ${SIZE} + 1`;
|
||||
done
|
||||
|
||||
# gbsn00lp.ttf (GB)
|
||||
SIZE=8
|
||||
while [ ${SIZE} -le 128 ]
|
||||
do
|
||||
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;
|
||||
SIZE=`expr ${SIZE} + 1`;
|
||||
done
|
||||
|
||||
# gkai00mp.ttf (GB)
|
||||
SIZE=8
|
||||
while [ ${SIZE} -le 128 ]
|
||||
do
|
||||
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;
|
||||
SIZE=`expr ${SIZE} + 1`;
|
||||
done
|
8
chinese/arphicttf/pkg-plist
Normal file
8
chinese/arphicttf/pkg-plist
Normal file
@ -0,0 +1,8 @@
|
||||
lib/X11/fonts/TrueType/ARPHICPL_Big5.TXT
|
||||
lib/X11/fonts/TrueType/ARPHICPL_Eng.TXT
|
||||
lib/X11/fonts/TrueType/ARPHICPL_GB.TXT
|
||||
lib/X11/fonts/TrueType/bkai00mp.ttf
|
||||
lib/X11/fonts/TrueType/bsmi00lp.ttf
|
||||
lib/X11/fonts/TrueType/gbsn00lp.ttf
|
||||
lib/X11/fonts/TrueType/gkai00mp.ttf
|
||||
@unexec rmdir %D/lib/X11/fonts/TrueType 2>/dev/null || true
|
Loading…
Reference in New Issue
Block a user