<?xml version="1.0" encoding="UTF-8"?>
<!--PATCHINFO id="81ffe9ad8301ebf5e5d3f91686aa954a"!-->
<patch
    xmlns="http://novell.com/package/metadata/suse/patch"
    xmlns:yum="http://linux.duke.edu/metadata/common"
    xmlns:rpm="http://linux.duke.edu/metadata/rpm"
    xmlns:suse="http://novell.com/package/metadata/suse/common"
    patchid="fetchmsttfonts.sh-1829"
    timestamp="20060713"
    engine="1.0">
  <yum:name>fetchmsttfonts.sh</yum:name>
  <summary lang="en">Download Microsoft(r) TrueType Core Fonts</summary>
  <summary lang="de">Download Microsoft(r) TrueType Core Fonts</summary>
  <description lang="en">For legal reasons we can't include the Microsoft(r)
TrueType Core Fonts in our product. This patch downloads
these fonts and installs them on your system. Please note
that about 4 MByte data are downloaded therefore. License
for the fonts will be installed as
/usr/share/doc/corefonts/EULA.html.
</description>
  <description lang="de">Aus rechtlichen Gründen können wir leider die TrueType Core
Fonts von Microsoft(r) auf unserem Produkt nicht
mitliefern. Dieser Patch lädt diese Fonts herunter und
installiert diese auf Ihrem System. Beachten Sie bitte,
dass dazu in etwa 4 MByte an Daten heruntergeladen werden.
Die Lizenz für die Fonts wird unter
/usr/share/doc/corefonts/EULA.html abgelegt.

</description>
  <yum:version ver="1829" rel="0"/>
  <rpm:requires>
    <rpm:entry kind="script" name="fetchmsttfonts.sh-patch-fetchmsttfonts.sh-2" epoch="0" ver="1829" rel="1" flags="EQ"/>
  </rpm:requires>
  <category>optional</category>
    <license-to-confirm>
END-USER LICENSE AGREEMENT FOR
MICROSOFT SOFTWARE

IMPORTANT-READ CAREFULLY: This Microsoft End-User License Agreement (&quot;EULA&quot;) is
a legal agreement between you (either an individual or a single entity) and
Microsoft Corporation for the Microsoft software accompanying this EULA, which
includes computer software and may include associated media, printed materials,
and &quot;on-line&quot; or electronic documentation (&quot;SOFTWARE PRODUCT&quot; or &quot;SOFTWARE&quot;).
By exercising your rights to make and use copies of the SOFTWARE PRODUCT, you
agree to be bound by the terms of this EULA. If you do not agree to the terms
of this EULA, you may not use the SOFTWARE PRODUCT.


SOFTWARE PRODUCT LICENSE
The SOFTWARE PRODUCT is protected by copyright laws and international copyright
treaties, as well as other intellectual property laws and treaties. The
SOFTWARE PRODUCT is licensed, not sold.


1. GRANT OF LICENSE. This EULA grants you the following rights:

  * Installation and Use. You may install and use an unlimited number of copies
    of the SOFTWARE PRODUCT.
  * Reproduction and Distribution. You may reproduce and distribute an
    unlimited number of copies of the SOFTWARE PRODUCT; provided that each copy
    shall be a true and complete copy, including all copyright and trademark
    notices, and shall be accompanied by a copy of this EULA. Copies of the
    SOFTWARE PRODUCT may not be distributed for profit either on a standalone
    basis or included as part of your own product.


2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS.

  * Limitations on Reverse Engineering, Decompilation, and Disassembly. You may
    not reverse engineer, decompile, or disassemble the SOFTWARE PRODUCT,
    except and only to the extent that such activity is expressly permitted by
    applicable law notwithstanding this limitation.
  * Restrictions on Alteration. You may not rename, edit or create any
    derivative works from the SOFTWARE PRODUCT, other than subsetting when
    embedding them in documents.
  * Software Transfer. You may permanently transfer all of your rights under
    this EULA, provided the recipient agrees to the terms of this EULA.
  * Termination. Without prejudice to any other rights, Microsoft may terminate
    this EULA if you fail to comply with the terms and conditions of this EULA.
    In such event, you must destroy all copies of the SOFTWARE PRODUCT and all
    of its component parts.


3. COPYRIGHT. All title and copyrights in and to the SOFTWARE PRODUCT
(including but not limited to any images, text, and &quot;applets&quot; incorporated into
the SOFTWARE PRODUCT), the accompanying printed materials, and any copies of
the SOFTWARE PRODUCT are owned by Microsoft or its suppliers. The SOFTWARE
PRODUCT is protected by copyright laws and international treaty provisions.
Therefore, you must treat the SOFTWARE PRODUCT like any other copyrighted
material.


4. U.S. GOVERNMENT RESTRICTED RIGHTS. The SOFTWARE PRODUCT and documentation
are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the
Government is subject to restrictions as set forth in subparagraph (c)(1)(ii)
of the Rights in Technical Data and Computer Software clause at DFARS
252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer
Software - Restricted Rights at 48 CFR 52.227-19, as applicable. Manufacturer
is Microsoft Corporation/One Microsoft Way/Redmond, WA 98052-6399.


LIMITED WARRANTY

NO WARRANTIES. Microsoft expressly disclaims any warranty for the SOFTWARE
PRODUCT. The SOFTWARE PRODUCT and any related documentation is provided &quot;as is&quot;
without warranty of any kind, either express or implied, including, without
limitation, the implied warranties or merchantability, fitness for a particular
purpose, or noninfringement. The entire risk arising out of use or performance
of the SOFTWARE PRODUCT remains with you.

NO LIABILITY FOR CONSEQUENTIAL DAMAGES. In no event shall Microsoft or its
suppliers be liable for any damages whatsoever (including, without limitation,
damages for loss of business profits, business interruption, loss of business
information, or any other pecuniary loss) arising out of the use of or
inability to use this Microsoft product, even if Microsoft has been advised of
the possibility of such damages. Because some states/jurisdictions do not allow
the exclusion or limitation of liability for consequential or incidental
damages, the above limitation may not apply to you.


MISCELLANEOUS

If you acquired this product in the United States, this EULA is governed by the
laws of the State of Washington.

If this product was acquired outside the United States, then local laws may
apply.

Should you have any questions concerning this EULA, or if you desire to contact
Microsoft for any reason, please contact the Microsoft subsidiary serving your
country, or write: Microsoft Sales Information Center/One Microsoft Way/
Redmond, WA 98052-6399.
    </license-to-confirm>
  <atoms>
    <script>
      <yum:name>fetchmsttfonts.sh-patch-fetchmsttfonts.sh-2</yum:name>
      <yum:version ver="1829" rel="1"/>
      <do>
#!/bin/sh

EULA=&quot;http://corefonts.sourceforge.net/eula.htm&quot;

FONTS=&quot; \
dl.sourceforge.net/sourceforge/corefonts/andale32.exe \
dl.sourceforge.net/sourceforge/corefonts/arial32.exe  \
dl.sourceforge.net/sourceforge/corefonts/arialb32.exe \
dl.sourceforge.net/sourceforge/corefonts/comic32.exe  \
dl.sourceforge.net/sourceforge/corefonts/courie32.exe \
dl.sourceforge.net/sourceforge/corefonts/georgi32.exe \
dl.sourceforge.net/sourceforge/corefonts/impact32.exe \
dl.sourceforge.net/sourceforge/corefonts/times32.exe  \
dl.sourceforge.net/sourceforge/corefonts/trebuc32.exe \
dl.sourceforge.net/sourceforge/corefonts/verdan32.exe \
dl.sourceforge.net/sourceforge/corefonts/webdin32.exe \
&quot;

SERVER=&quot; \
puzzle   \
ovh      \
switch   \
citkit   \
mesh     \
jaist    \
cogent   \
kent     \
nchc     \
heanet   \
easynews \
optusnet \
voxel    \
&quot;

CURL_OPTIONS=&quot;-s --speed-limit 3500 --speed-time 15&quot;

if [ &quot;`id -u`&quot; != &quot;0&quot; ]; then
 echo &quot;error: You must be root to use this program!&quot;
 exit 1
fi

if [ ! -x /usr/bin/cabextract ]; then
  echo &quot;error: cabextract missing! Please install package cabextract first.&quot;
  exit 2
fi

. /etc/sysconfig/proxy

if test &quot;$PROXY_ENABLED&quot; != &quot;no&quot;; then
  if test -n &quot;$HTTP_PROXY&quot; ; then
    export http_proxy=&quot;$HTTP_PROXY&quot;
  fi
fi

if [ -z $http_proxy ]; then
  echo 
  echo &quot;note: No proxy is used. Please set the environment variable \&quot;http_proxy\&quot;&quot;
  echo &quot;note: to your favorite proxy, if you want to use a proxy for the download.&quot;
  echo &quot;note:&quot;
  echo &quot;note:   bash: export http_proxy=\&quot;http://proxy.provider.de:3128/\&quot;&quot;
  echo &quot;note:   tcsh: setenv http_proxy \&quot;http://proxy.provider.de:3128/\&quot;&quot;
fi

echo &quot;EULA:&quot;
mkdir -p /usr/share/doc/corefonts
echo -n &quot;  Fetching   ... &quot;
curl $CURL_OPTIONS -o /usr/share/doc/corefonts/EULA.html $EULA || \
  rm -f /usr/share/doc/corefonts/EULA.html
echo &quot;done&quot;

tmpname=`basename $0`
tmpdir=`mktemp -d /tmp/$tmpname.XXXXXX`
trap &quot;rm -rf $tmpdir&quot; EXIT
if [ $? -ne 0 ]; then
  echo &quot;$0: Can't create temp dir, exiting...&quot;
  exit 4
fi

pushd $tmpdir &amp;&gt; /dev/null

echo
echo &quot;Trying to find the fastest server:&quot;
besttime=1000

for server in $SERVER; do
  echo -n &quot; $server ... &quot;
  start=$SECONDS
  curl $CURL_OPTIONS --connect-timeout 10 -o cabextract.rpm \
    http://$server.dl.sourceforge.net/sourceforge/corefonts/cabextract-0.5-1.i386.rpm
  if [ $? -ne 0 ]; then
    echo &quot;to slow (aborted)&quot;
    continue
  fi
  stop=$SECONDS
  time=$((stop - start))
  echo &quot;$time sec&quot;
  if [ $time -lt $besttime ]; then 
    besttime=$time
    useserver=$server
  fi
done

rm -f cabextract.rpm
if [ -n &quot;$useserver&quot; ]; then
  echo &quot;The winner is: &gt;&gt; $useserver &lt;&lt;&quot;
  echo
else
  echo &quot;Connection to slow or no server available. Aborting ... &quot;
  exit 5
fi

for font in $FONTS; do
 for i in $useserver $SERVER; do
  archive=http://$i.$font
  file=`echo $archive|awk -F &quot;/&quot; '{print $NF}'`
  rm -f $file
  echo &quot;$file ($archive):&quot;
  echo -n &quot;  Fetching   ... &quot;
  curl $CURL_OPTIONS -o $file $archive
  if [ $? -ne 0 ]; then
    rm -f $file
    echo &quot;failed ... deleted!&quot;
    continue
  fi
  echo done
  echo -n &quot;  Extracting ... &quot;
  cabextract -l $file &amp;&gt; /dev/null
  if [ $? -ne 0 ]; then
    rm -f $file
    echo &quot;failed ... deleted!&quot;
  else
    cabextract $file &amp;&gt; /dev/null
    echo &quot;done&quot;
    success=true
    break
  fi
  rm -f $file
 done
done

if [ &quot;x$success&quot; != &quot;x&quot; ]; then 
  for i in *.[Tt][Tt][CFcf]; do
    lower=`echo $i|tr [:upper:] [:lower:]`
    test &quot;$i&quot; != &quot;$lower&quot; &amp;&amp; mv $i $lower
  done
  chmod 644 *.tt[cf]
  # impact.ttf already in agfa-fonts package
  test -s /usr/X11R6/lib/X11/fonts/truetype/impact.ttf &amp;&amp; rm impact.ttf
  mv -f *.tt[cf] /usr/X11R6/lib/X11/fonts/truetype
  /usr/sbin/fonts-config
  echo &quot;*** Fonts installed. ***&quot;
else
  echo &quot;*** No Fonts installed. ***&quot;
fi

popd &amp;&gt; /dev/null
      </do>
      <suse:freshens>
        <suse:entry kind="package" name="glibc"/>
      </suse:freshens>
    </script>
  </atoms>
</patch>
