slight tweak to Chinese fonts so that fonts.scale isn't overwritten
authorStuart Bouyer <stubear@gentoo.org>
Wed, 6 Nov 2002 15:45:31 +0000 (15:45 +0000)
committerStuart Bouyer <stubear@gentoo.org>
Wed, 6 Nov 2002 15:45:31 +0000 (15:45 +0000)
x11-misc/arphicfonts/ChangeLog
x11-misc/arphicfonts/arphicfonts-0.1-r1.ebuild
x11-misc/twmoefonts/twmoefonts-0.1.ebuild

index cdfd795e457f4d8da30a2dd2be30421baf6cd1bc..2309a7def8381d2f01157860393586692f7da59d 100644 (file)
@@ -1,9 +1,13 @@
 # ChangeLog for x11-misc/arphicfonts
 # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/arphicfonts/ChangeLog,v 1.3 2002/11/06 06:27:16 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/arphicfonts/ChangeLog,v 1.4 2002/11/06 15:45:31 stubear Exp $
 
 *arphicfonts-0.1 (27 June 2002)
 
+  07 Nov 2002; Stuart Bouyer <stubear@gentoo.org> arphicfonts-0.1-r1.ebuild:
+  Added check for existing fonts.scale instead of blindly overwriting.
+ 
+
   22 Aug 2002; Stuart Bouyer <stubear@gentoo.org> arphicfonts-0.1-r1.ebuild,
   files/CN-fonts.scale, files/TW-fonts.scale:
 
index a3806ec3b4f037d173d41c1d736e87cddce0bc8d..d044dcb3c72ef28754622e4561fdbc6071ecd57f 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2002 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/arphicfonts/arphicfonts-0.1-r1.ebuild,v 1.3 2002/10/04 21:30:01 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/arphicfonts/arphicfonts-0.1-r1.ebuild,v 1.4 2002/11/06 15:45:31 stubear Exp $
 
 DESCRIPTION="Arphic Fonts"
 SRC_URI="ftp://ftp.gnu.org/non-gnu/chinese-fonts-truetype/gkai00mp.ttf.gz
@@ -22,10 +22,26 @@ src_install() {
        insopts -m0644
        insinto /usr/share/fonts/ttf/zh_TW
        doins b*.ttf
-       newins ${FILESDIR}/TW-fonts.scale fonts.scale   
+        if test -r /usr/share/fonts/ttf/zh_TW/fonts.scale; then    
+                tail +2 /usr/share/fonts/ttf/zh_TW/fonts.scale > tmp           
+                tail +2 ${FILESDIR}/TW-fonts.scale >> tmp
+                echo $(sort -u tmp | wc -l) > newfont.scale                     
+                sort -u tmp >> newfont.scale                                    
+                newins newfont.scale fonts.scale                       
+        else               
+               newins ${FILESDIR}/TW-fonts.scale fonts.scale
+       fi      
        insinto /usr/share/fonts/ttf/zh_CN
        doins g*.ttf
-       newins ${FILESDIR}/CN-fonts.scale fonts.scale  
+        if test -r /usr/share/fonts/ttf/zh_CN/fonts.scale; then                 
+                tail +2 /usr/share/fonts/ttf/zh_CN/fonts.scale > tmp           
+                tail +2 ${FILESDIR}/CN-fonts.scale >> tmp                       
+                echo $(sort -u tmp | wc -l) > newfont.scale                     
+                sort -u tmp >> newfont.scale                                    
+                newins newfont.scale fonts.scale
+        else               
+               newins ${FILESDIR}/CN-fonts.scale fonts.scale
+       fi  
 
 #      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
index 4ecf7845a1122d567877f2256fc0fcc22b49bbf5..7eb5649843c2a60a77808d6159420023f1996973 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2002 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/twmoefonts/twmoefonts-0.1.ebuild,v 1.1 2002/11/06 14:59:23 stubear Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/twmoefonts/twmoefonts-0.1.ebuild,v 1.2 2002/11/06 15:45:31 stubear Exp $
 
 IUSE=""
 DESCRIPTION="Standard tranditional Chinese fonts made by Minister of Education (MOE), Republic of China."
@@ -24,13 +24,11 @@ src_install() {
        insinto /usr/share/fonts/ttf/zh_TW
        doins *.ttf
        if test -r /usr/share/fonts/ttf/zh_TW/fonts.scale; then
-           ORIGC=$(head -1 /usr/share/fonts/ttf/zh_TW/fonts.scale)
-               INC=$(head -1 ${FILESDIR}/TW-fonts.scale)
-               echo ${ORIGC}+${INC} | bc > tmp
                tail +2 /usr/share/fonts/ttf/zh_TW/fonts.scale >> tmp
                tail +2 ${FILESDIR}/TW-fonts.scale >> tmp
-               newins tmp fonts.scale
-               rm -f tmp
+               echo $(sort -u tmp | wc -l) > newfont.scale
+               sort -u tmp >> newfont.scale
+               newins newfont.scale fonts.scale
        else
                newins ${FILESDIR}/TW-fonts.scale fonts.scale   
        fi