From owner-freebsd-ports Mon Oct 18 1: 0: 3 1999 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 3865D14D8C for ; Mon, 18 Oct 1999 01:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id BAA85417; Mon, 18 Oct 1999 01:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from out.gcn.net.tw (out.gcn.net.tw [203.77.2.144]) by hub.freebsd.org (Postfix) with ESMTP id 029D614C18 for ; Mon, 18 Oct 1999 00:53:52 -0700 (PDT) (envelope-from jtjang@gcn.net.tw) Received: from phantom.at.home (host246.21062207.gcn.net.tw [210.62.207.246]) by out.gcn.net.tw (8.8.8/8.8.8) with ESMTP id HAB16002 for ; Mon, 18 Oct 1999 07:53:50 GMT Received: (from keith@localhost) by phantom.at.home (8.9.3/8.9.3) id PAA01035; Mon, 18 Oct 1999 15:52:30 GMT (envelope-from keith) Message-Id: <199910181552.PAA01035@phantom.at.home> Date: Mon, 18 Oct 1999 15:52:30 GMT From: jtjang@gcn.net.tw Reply-To: jtjang@gcn.net.tw To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/14392: Update chinese/moettf Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 14392 >Category: ports >Synopsis: chinese/moettf has a bug when writing fonts.dir >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:00: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: When /usr/X11R6/lib/X11/fonts/TrueType/fonts.dir is empty, moettf's INSTALL script will incorrectly calculate the number of fonts. >How-To-Repeat: Remove all ports that install truetype fonts in /usr/X11R6/lib/X11/fonts/TrueType rm /usr/X11R6/lib/X11/fonts/TrueType/fonts.* Install chinese/moettf, then you'll see that the first line of fonts.dir is 11, not the supposed 12. >Fix: Please commit the following patch, thanks. --- pkg/INSTALL.orig Mon Oct 18 14:38:03 1999 +++ pkg/INSTALL Mon Oct 18 14:41:54 1999 @@ -9,11 +9,18 @@ echo "Updating fonts.dir & fonts.alias. This may take a while..." # Update fonts.dir touch fonts.dir -sed -e '/-moe-/d' -e '/-twmoe-/d' fonts.dir > fonts.dir.tmp +sed -e '/ -moe-/d' -e '/ -twmoe-/d' fonts.dir > fonts.dir.tmp # Add 12 new fonts numfonts=$(echo $(cat fonts.dir.tmp |wc -l) - 1 + 12 |bc) -echo ${numfonts} > fonts.dir -sed -e 1d fonts.dir.tmp >> fonts.dir +if [ ${numfonts} -le 12 ]; then # fonts.dir.tmp is empty + echo 12 > fonts.dir +else + echo ${numfonts} > fonts.dir + sed -e 1d fonts.dir.tmp >> fonts.dir +fi +rm -f fonts.dir.tmp + +# Write font information to fonts.dir for FAMILY in kai lishu sung do echo moe_${FAMILY}.ttf -twmoe-${FAMILY}-medium-r-normal--0-0-0-0-c-0-big5-0 >> fonts.dir @@ -21,7 +28,6 @@ echo ai=0.3:moe_${FAMILY}.ttf -twmoe-${FAMILY}-medium-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir echo ab=y:ai=0.3:moe_${FAMILY}.ttf -twmoe-${FAMILY}-bold-i-normal--0-0-0-0-c-0-big5-0 >> fonts.dir done -rm -f fonts.dir.tmp # Update fonts.alias, font size ranges from 8 to 128. SIZE=8 >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message