# Copyrigth 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later #/space/gentoo/cvsroot/gentoo-x86/x11-misc/arphicfonts/arphicfonts.ebuild DESCRIPTION="Arphic Fonts" SRC_URI="ftp://ftp.gnu.org/non-gnu/chinese-fonts-truetype/gkai00mp.ttf.gz ftp://ftp.gnu.org/non-gnu/chinese-fonts-truetype/bkai00mp.ttf.gz ftp://ftp.gnu.org/non-gnu/chinese-fonts-truetype/bsmi00lp.ttf.gz ftp://ftp.gnu.org/non-gnu/chinese-fonts-truetype/gbsn00lp.ttf.gz" HOMEPAGE="http://www.arphic.com.tw/" LICENSE="Arphic" SLOT="0" KEYWORDS="x86" DEPEND="virtual/x11 x11-misc/ttmkfdir" src_unpack() { mkdir ${WORKDIR}/${P} gunzip -c ${DISTDIR}/gkai00mp.ttf.gz > ${WORKDIR}/${P}/gkai00mp.ttf gunzip -c ${DISTDIR}/bkai00mp.ttf.gz > ${WORKDIR}/${P}/bkai00mp.ttf gunzip -c ${DISTDIR}/bsmi00lp.ttf.gz > ${WORKDIR}/${P}/bsmi00lp.ttf gunzip -c ${DISTDIR}/gbsn00lp.ttf.gz > ${WORKDIR}/${P}/gbsn00lp.ttf } src_compile() { echo "Truetype fonts don't need to be compiled! ;)" } src_install() { cd ${WORKDIR}/${P} insopts -m0644 insinto /usr/X11R6/lib/X11/fonts/truetype doins *.ttf # These don't get downloaded because there is no simple way to # fetch them.. ie if I included the README in SRC_URI above, it would # get saved as /usr/portage/distfiles/README which doesn't seem like # a really good idea. # dodoc LICENSE README } pkg_postinst() { echo ">>> Making font dirs..." cd /usr/X11R6/lib/X11/fonts/truetype/ # The rest of the script was uglily patched by Marko Daniel on 10 August 2002. # I don't know what "emerge unmerge" will do with the hacked fonts.scale file :( echo ">>> copy fonts.scale info excluding number of fonts to temporary file" if [ -x fonts.scale ]; then \ echo "fonts.scale exists" && sed -n '2,$p' fonts.scale > fonts.scale.temp; \ fi echo ">>> Append font descriptions that ttmkfdir cannot find to fonts.scale.tmp." cat <> /usr/X11R6/lib/X11/fonts/truetype/fonts.scale.temp bkai00mp.ttf -Arphic Technology Co.-AR PL KaitiM Big5-medium-r-normal--0-0-0-0-c-0-ascii-0 bkai00mp.ttf -Arphic Technology Co.-AR PL KaitiM Big5-medium-r-normal--0-0-0-0-c-0-big5-0 bkai00mp.ttf -Arphic Technology Co.-AR PL KaitiM Big5-medium-r-normal--0-0-0-0-c-0-big5.cp950-0 bkai00mp.ttf -Arphic Technology Co.-AR PL KaitiM Big5-medium-r-normal--0-0-0-0-c-0-big5.eten-0 bkai00mp.ttf -Arphic Technology Co.-AR PL KaitiM Big5-medium-r-normal--0-0-0-0-c-0-iso10646-1 bsmi00lp.ttf -Arphic Technology Co.-AR PL Mingti2L Big5-medium-r-normal--0-0-0-0-c-0-ascii-0 bsmi00lp.ttf -Arphic Technology Co.-AR PL Mingti2L Big5-medium-r-normal--0-0-0-0-c-0-big5-0 bsmi00lp.ttf -Arphic Technology Co.-AR PL Mingti2L Big5-medium-r-normal--0-0-0-0-c-0-big5.cp950-0 bsmi00lp.ttf -Arphic Technology Co.-AR PL Mingti2L Big5-medium-r-normal--0-0-0-0-c-0-big5.eten-0 bsmi00lp.ttf -Arphic Technology Co.-AR PL Mingti2L Big5-medium-r-normal--0-0-0-0-c-0-iso10646-1 gkai00mp.ttf -arphic-ar pl kaitim gb-medium-r-normal--0-0-0-0-p-0-iso8859-1 gkai00mp.ttf -arphic-ar pl kaitim gb-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0 gbsn00lp.ttf -arphic-ar pl sungtil gb-medium-r-normal--0-0-0-0-p-0-iso8859-1 gbsn00lp.ttf -arphic-ar pl sungtil gb-medium-r-normal--0-0-0-0-p-0-gb2312.1980-0 EOF FONT_NO=`cat fonts.scale.temp|wc -l` echo "Number of fonts in directory is: " ${FONT_NO} echo ">>> Overwrite fonts.scale with new info." echo ${FONT_NO} > fonts.scale cat fonts.scale.temp >> fonts.scale rm -f fonts.scale.temp mkfontdir echo ">>> Restart font server for changes to take effect." }