misc bugfixes
authorMartin Schlemmer <azarah@gentoo.org>
Mon, 28 Oct 2002 07:46:49 +0000 (07:46 +0000)
committerMartin Schlemmer <azarah@gentoo.org>
Mon, 28 Oct 2002 07:46:49 +0000 (07:46 +0000)
x11-base/xfree/ChangeLog
x11-base/xfree/files/4.2.1-patches/095_all_4.2.1-ttmkfdir2-gentoo.patch.bz2 [deleted file]
x11-base/xfree/files/4.2.1/xfs.start
x11-base/xfree/files/digest-xfree-4.2.1
x11-base/xfree/xfree-4.2.1.ebuild

index b77f01dd376a10b5e42db8a05aa663a376b3817f..82347dd88de020dedf2cea02741d0d951398795c 100644 (file)
@@ -1,6 +1,14 @@
 # ChangeLog for x11-base/xfree
 # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-base/xfree/ChangeLog,v 1.51 2002/10/26 14:30:24 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xfree/ChangeLog,v 1.52 2002/10/28 07:46:43 azarah Exp $
+
+  28 Oct 2002; Martin Schlemmer <azarah@gentoo.org> xfree-4.2.1.ebuild,
+                                                    xfs.start :
+  
+  Fix ebuild and xfs.start to only generate fonts.scale files if
+  truetype fonts are present.  Optimize xfs.start a bit for speed.
+  Make xfree depend on ttmkfdir-2.0 rather.  Remove Tahoma font,
+  as a Windows license is needed.
 
   26 Oct 2002; Martin Schlemmer <azarah@gentoo.org> xfree-4.2.1.ebuild :
 
diff --git a/x11-base/xfree/files/4.2.1-patches/095_all_4.2.1-ttmkfdir2-gentoo.patch.bz2 b/x11-base/xfree/files/4.2.1-patches/095_all_4.2.1-ttmkfdir2-gentoo.patch.bz2
deleted file mode 100644 (file)
index 87c4330..0000000
Binary files a/x11-base/xfree/files/4.2.1-patches/095_all_4.2.1-ttmkfdir2-gentoo.patch.bz2 and /dev/null differ
index fc285f2ac2b4cee009da93c37dc6c943a9ff6a86..c6f00a5054ccb7161d4ea1f592f28778d7bf513c 100644 (file)
@@ -2,7 +2,7 @@
 # Copyright 1999-2002 Gentoo Technologies, Inc.
 # Distributed under the terms of the GNU General Public License, v2 or later
 # Author:  Martin Schlemmer <azarah@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/x11-base/xfree/files/4.2.1/xfs.start,v 1.4 2002/10/21 00:09:58 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xfree/files/4.2.1/xfs.start,v 1.5 2002/10/28 07:46:49 azarah Exp $
 
 #NB: Config is in /etc/conf.d/xfs
 
@@ -21,7 +21,7 @@ check_config() {
 }
 
 # Return 0 on change, or 1 on no change, or if dir do not exist
-check_md5sum() {
+check_changed() {
        local x=""
        local fontlist=""
        
@@ -32,16 +32,17 @@ check_md5sum() {
        fi
 
        # Create a list of all non known config files in the font dir
-       fontlist="$(find $1/ -type f -maxdepth 1 | egrep -v 'fonts\..*' | egrep -v '*.\.dir')"
+       fontlist="$(find $1/ -type f -maxdepth 1)"
+       fontlist="$(echo "${fontlist}" | egrep -v 'fonts\..*')"
+       fontlist="$(echo "${fontlist}" | egrep -v '*.\.dir')"
        
-       if [ ! -f $1/fonts.md5 ]
+       if [ ! -f $1/fonts.list ]
        then
                if [ -n "${fontlist}" ]
                then
-                       # No md5 file exist, so create it and return 0 to add this font
-                       # dir as a candidate for updating...
-                       > $1/fonts.md5
-                       echo "${fontlist}" | xargs -i md5sum {} >> $1/fonts.md5
+                       # No list file exist, so create it and return 0 to add
+                       # this font dir as a candidate for updating...
+                       echo "${fontlist}" > $1/fonts.list
 
                        return 0
                fi
@@ -62,28 +63,32 @@ check_md5sum() {
                        return 1
                fi
                
-               # If any md5 checksum fails, this dir should be updated.
-               if [ -n "$(md5sum -c $1/fonts.md5 2> /dev/null | egrep "FAILED")" ]
+               # Check that no files was added or removed....
+               if [ "$(cat $1/fonts.list | md5sum)" != "$(echo "${fontlist}" | md5sum)" ]
                then
                        retval=0
                fi
 
-               # Check that no files was added or removed....
-               if [ "${retval}" -ne 0 ] && \
-                  [ -n "${fontlist}" -o -n "$(cat $1/fonts.md5)" ]
+               # Check that no files was updated....
+               if [ "${retval}" -ne 0 ]
                then
-                       if [ "$(awk '{print $2}' $1/fonts.md5 | md5sum)" != "$(echo "${fontlist}" | md5sum)" ]
+                       local changed_list=""
+                       
+                       changed_list="$(find $1 -type f -cnewer $1/fonts.dir)"
+                       changed_list="$(echo "${changed_list}" | egrep -v 'fonts\..*')"
+                       changed_list="$(echo "${changed_list}" | egrep -v '*.\.dir')"
+
+                       if [ -n "${changed_list}" ]
                        then
                                retval=0
                        fi
                fi
 
-               # OK, something changed, so recreate fonts.md5 and add as candidate
+               # OK, something changed, so recreate fonts.list and add as candidate
                # for updating...
                if [ "${retval}" -eq 0 ]
                then
-                       > $1/fonts.md5
-                       echo "${fontlist}" | xargs -i md5sum {} >> $1/fonts.md5
+                       echo "${fontlist}" > $1/fonts.list
 
                        return 0
                fi
@@ -126,6 +131,8 @@ setup_font_dirs() {
        local x=""
        local pending_fontdirs=""
 
+       umask 022
+
        # While we at it, update fontconfig's cache as well
        if [ -x /usr/bin/fc-cache ]
        then
@@ -134,9 +141,9 @@ setup_font_dirs() {
                eend 0
        fi
 
-       if [ ! -x /usr/X11R6/bin/mkfontdir -o ! -x /usr/X11R6/bin/ttmkfdir2 ]
+       if [ ! -x /usr/X11R6/bin/mkfontdir -o ! -x /usr/X11R6/bin/ttmkfdir ]
        then
-               ewarn "Could not find mkfontdir or ttmkfdir2 binary!"
+               ewarn "Could not find mkfontdir or ttmkfdir binary!"
                return 0
        fi
        
@@ -148,7 +155,7 @@ setup_font_dirs() {
        ebegin "Scanning font dirs"
        for x in $(get_fontdir_list)
        do
-               if check_md5sum ${x}
+               if check_changed ${x}
                then
                        if [ -z "${pending_fontdirs}" ]
                        then
@@ -166,9 +173,12 @@ setup_font_dirs() {
                for x in ${pending_fontdirs}
                do
                        einfo "  ${x}..."
-                       if [ "${x/encodings}" = "${x}" ]
+                       # Only generate .scale files if there are
+                       # truetype fonts present ...
+                       if [ "${x/encodings}" = "${x}" -a \
+                            -n "$(find ${x} -name '*.tt[cf]' -print)" ]
                        then
-                               /usr/X11R6/bin/ttmkfdir2 \
+                               /usr/X11R6/bin/ttmkfdir \
                                        -e /usr/X11R6/lib/X11/fonts/encodings/encodings.dir \
                                        -o ${x}/fonts.scale -d ${x} &> /dev/null
                        fi
@@ -212,3 +222,6 @@ stop() {
        rm -rf /tmp/.font-unix
        eend $?
 }
+
+
+# vim:ts=4
index f1ba18e121fd4f9ee92e13fcf169eb0bd43c47ed..fb4c1afdda88003be4325ec226e23401d7cd5827 100644 (file)
@@ -3,7 +3,6 @@ MD5 dae33268a9f2735b9678a81fb23e8d3e X420src-2.tgz 23227328
 MD5 560899e175a02ab592185b69756f539e X420src-3.tgz 9306679
 MD5 23d04bf0cfc48772b8d698c95eec37bd freetype-2.1.2.tar.bz2 742830
 MD5 5ef5c58e501b0cb873ee2b2a04ed74e3 fcpackage.2_0.tar.gz 538159
-MD5 61efb004b19befdb5335ef058323002c ttmkfdir2-1.0.tar.bz2 16650
 MD5 38adc94a4953a6b29e8619c25dda4887 4.2.0-4.2.1.diff.gz 54763
 MD5 17ce2d3e0dcad9cdc9fe7a8b38277a6e XFree86-4.2.1-patches-1.0.tar.bz2 168818
 MD5 222bffcae6c2be37ec5cd993037f4f45 xf86Wacom.c.gz 26156
@@ -21,4 +20,3 @@ MD5 ed39c8ef91b9fb80f76f702568291bd5 times32.exe 661728
 MD5 0d7ea16cac6261f8513a061fbfcdb2b5 trebuc32.exe 357200
 MD5 12d2a75f8156e10607be1eaa8e8ef120 verdan32.exe 351992
 MD5 230a1d13a365b22815f502eb24d9149b webdin32.exe 185072
-MD5 358584cddb75ac90472c25f01b308ebe IELPKTH.CAB 411248
index 20707afa64873e88a20990125e838811988cc9e6..d2fdf765b9353510f691d499a1ea2bf740721c5f 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-base/xfree/xfree-4.2.1.ebuild,v 1.22 2002/10/26 14:30:24 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xfree/xfree-4.2.1.ebuild,v 1.23 2002/10/28 07:46:43 azarah Exp $
 
 IUSE="sse nls mmx truetype 3dnow 3dfx"
 
@@ -63,7 +63,9 @@ MS_COREFONTS="./andale32.exe ./arial32.exe
        ./courie32.exe ./georgi32.exe
        ./impact32.exe ./times32.exe
        ./trebuc32.exe ./verdan32.exe
-       ./webdin32.exe ./IELPKTH.CAB"
+       ./webdin32.exe"
+#      ./IELPKTH.CAB"
+# Need windows license to use this one
 MS_FONT_URLS="${MS_COREFONTS//\.\//mirror://sourceforge/corefonts/}"
 
 SRC_URI="${SRC_PATH0}/X${MY_SV}src-1.tgz
@@ -74,7 +76,6 @@ SRC_URI="${SRC_PATH0}/X${MY_SV}src-1.tgz
         ${SRC_PATH1}/X${MY_SV}src-3.tgz
         mirror://sourceforge/freetype/freetype-${FT2_VER}.tar.bz2
         http://fontconfig.org/release/fcpackage.${FC2_VER/\./_}.tar.gz
-        mirror://gentoo/ttmkfdir2-1.0.tar.bz2
         ${X_PATCHES}
         ${X_DRIVERS}
         truetype? ( ${MS_FONT_URLS} )"
@@ -93,6 +94,7 @@ DEPEND=">=sys-apps/baselayout-1.8.3
        >=media-libs/fontconfig-2.0
        >=media-libs/freetype-${FT2_VER}
        >=x11-base/opengl-update-1.4
+       >=x11-misc/ttmkfdir-2.0
        truetype? ( app-arch/cabextract )"
 #      3dfx? ( >=media-libs/glide-v3-3.10 )"
        
@@ -102,7 +104,8 @@ RDEPEND=">=sys-apps/baselayout-1.8.3
        >=sys-libs/zlib-1.1.3-r2
        >=media-libs/fontconfig-2.0
        >=media-libs/freetype-${FT2_VER}
-       >=x11-base/opengl-update-1.4"
+       >=x11-base/opengl-update-1.4
+       >=x11-misc/ttmkfdir-2.0"
 
 PROVIDE="virtual/x11
        virtual/opengl
@@ -115,8 +118,6 @@ src_unpack() {
                XFree86-${PV}-patches-${PATCH_VER}.tar.bz2 \
                fcpackage.${FC2_VER/\./_}.tar.gz
 
-       cd ${S}; unpack ttmkfdir2-1.0.tar.bz2
-
        # Deploy our custom freetype2.  We want it static for stability,
        # and because some things in Gentoo depends the freetype2 that
        # is distributed with XFree86.
@@ -204,6 +205,9 @@ src_unpack() {
                        # bug #8144
                        [ "${x##*/}" = "018_all_4.2.0-ati-radeon-misc-bugfixes.patch.bz2" ] && continue
                        [ "${x##*/}" = "019_all_4.2.0-ati-radeon-pci-drm-enable.patch.bz2" ] && continue
+
+                       # Make sure users wo do not emerge --clean rsync do not run into problems.
+                       [ "${x##*/}" = "095_all_4.2.1-ttmkfdir2-gentoo.patch.bz2" ] && continue
                        
                        einfo "  ${x##*/}..."
                        bzip2 -dc ${x} | patch -p2 > /dev/null || die "Failed Patch: ${x##*/}!"
@@ -296,10 +300,6 @@ src_compile() {
                cd ${S}/nls
                make || die
        fi
-
-       einfo "Building ttmkfdir2..."
-       cd ${S}/ttmkfdir2
-       emake || die
 }
 
 src_install() {
@@ -324,10 +324,6 @@ src_install() {
                make DESTDIR=${D} install || die
        fi
 
-       einfo "Installing ttmkfdir2..."
-       exeinto /usr/X11R6/bin
-       newexe ${S}/ttmkfdir2/ttmkfdir ttmkfdir2
-
        # Make sure user running xterm can only write to utmp.
        fowners root.utmp /usr/X11R6/bin/xterm
        fperms 2755 /usr/X11R6/bin/xterm
@@ -474,6 +470,8 @@ pkg_postinst() {
 
        if [ "${ROOT}" = "/" ]
        then
+               umask 022
+       
                einfo "Creating FC font cache..."
                ${ROOT}/usr/bin/fc-cache
 
@@ -513,9 +511,12 @@ pkg_postinst() {
                einfo "Creating fonts.scale files..."
                for x in $(find ${ROOT}/usr/X11R6/lib/X11/fonts/* -type d -maxdepth 1)
                do
-                       if [ "${x/encodings}" = "${x}" ]
+                       # Only generate .scale files if there are truetype
+                       # fonts present ...
+                       if [ "${x/encodings}" = "${x}" -a \
+                            -n "$(find ${x} -name '*.tt[cf]' -print)"]
                        then
-                               ${ROOT}/usr/X11R6/bin/ttmkfdir2 \
+                               ${ROOT}/usr/X11R6/bin/ttmkfdir \
                                        -e ${ROOT}/usr/X11R6/lib/X11/fonts/encodings/encodings.dir \
                                        -o ${x}/fonts.scale -d ${x}
                        fi