Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Oct 1999 15:52:30 GMT
From:      jtjang@gcn.net.tw
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/14392: Update chinese/moettf
Message-ID:  <199910181552.PAA01035@phantom.at.home>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910181552.PAA01035>