summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-04-23 05:37:14 (UTC)
committer kergoth <kergoth>2003-04-23 05:37:14 (UTC)
commit2b7ee2f7df2f79bc016dd8185e314a3f5df1b07e (patch) (unidiff)
tree6846f743352243d86fa88fd85f86d2c3dbc2975c
parent27af46124e121bcd87b690f9fd5a28e5766b647f (diff)
downloadopie-2b7ee2f7df2f79bc016dd8185e314a3f5df1b07e.zip
opie-2b7ee2f7df2f79bc016dd8185e314a3f5df1b07e.tar.gz
opie-2b7ee2f7df2f79bc016dd8185e314a3f5df1b07e.tar.bz2
Update fontdir tool to default to /opt/QtPalmtop, and update postinsts on the font packages to source /etc/profile prior to attempting to execute update-qtfontdir, which isnt necessarily in the path at the time of execution.
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xqt/control/qpf-cyberbit-120-50-t10.postinst2
-rwxr-xr-xqt/control/qpf-fixed.postinst2
-rwxr-xr-xqt/control/qpf-helvetica.postinst2
-rwxr-xr-xqt/control/qpf-micro.postinst2
-rwxr-xr-xqt/control/qpf-smallsmooth.postinst2
-rwxr-xr-xqt/control/qpf-smoothtimes.postinst2
-rw-r--r--qt/qte234-for-opie091-fontdir.patch2
7 files changed, 13 insertions, 1 deletions
diff --git a/qt/control/qpf-cyberbit-120-50-t10.postinst b/qt/control/qpf-cyberbit-120-50-t10.postinst
index 30336ce..9671d9a 100755
--- a/qt/control/qpf-cyberbit-120-50-t10.postinst
+++ b/qt/control/qpf-cyberbit-120-50-t10.postinst
@@ -1,9 +1,11 @@
1#!/bin/sh 1#!/bin/sh
2 2
3set -e 3set -e
4 4
5if [ "$1" != "configure" ]; then 5if [ "$1" != "configure" ]; then
6 exit 0 6 exit 0
7fi 7fi
8 8
9. /etc/profile
10
9update-qtfontdir 11update-qtfontdir
diff --git a/qt/control/qpf-fixed.postinst b/qt/control/qpf-fixed.postinst
index 30336ce..9671d9a 100755
--- a/qt/control/qpf-fixed.postinst
+++ b/qt/control/qpf-fixed.postinst
@@ -1,9 +1,11 @@
1#!/bin/sh 1#!/bin/sh
2 2
3set -e 3set -e
4 4
5if [ "$1" != "configure" ]; then 5if [ "$1" != "configure" ]; then
6 exit 0 6 exit 0
7fi 7fi
8 8
9. /etc/profile
10
9update-qtfontdir 11update-qtfontdir
diff --git a/qt/control/qpf-helvetica.postinst b/qt/control/qpf-helvetica.postinst
index 30336ce..9671d9a 100755
--- a/qt/control/qpf-helvetica.postinst
+++ b/qt/control/qpf-helvetica.postinst
@@ -1,9 +1,11 @@
1#!/bin/sh 1#!/bin/sh
2 2
3set -e 3set -e
4 4
5if [ "$1" != "configure" ]; then 5if [ "$1" != "configure" ]; then
6 exit 0 6 exit 0
7fi 7fi
8 8
9. /etc/profile
10
9update-qtfontdir 11update-qtfontdir
diff --git a/qt/control/qpf-micro.postinst b/qt/control/qpf-micro.postinst
index 30336ce..9671d9a 100755
--- a/qt/control/qpf-micro.postinst
+++ b/qt/control/qpf-micro.postinst
@@ -1,9 +1,11 @@
1#!/bin/sh 1#!/bin/sh
2 2
3set -e 3set -e
4 4
5if [ "$1" != "configure" ]; then 5if [ "$1" != "configure" ]; then
6 exit 0 6 exit 0
7fi 7fi
8 8
9. /etc/profile
10
9update-qtfontdir 11update-qtfontdir
diff --git a/qt/control/qpf-smallsmooth.postinst b/qt/control/qpf-smallsmooth.postinst
index 30336ce..9671d9a 100755
--- a/qt/control/qpf-smallsmooth.postinst
+++ b/qt/control/qpf-smallsmooth.postinst
@@ -1,9 +1,11 @@
1#!/bin/sh 1#!/bin/sh
2 2
3set -e 3set -e
4 4
5if [ "$1" != "configure" ]; then 5if [ "$1" != "configure" ]; then
6 exit 0 6 exit 0
7fi 7fi
8 8
9. /etc/profile
10
9update-qtfontdir 11update-qtfontdir
diff --git a/qt/control/qpf-smoothtimes.postinst b/qt/control/qpf-smoothtimes.postinst
index 30336ce..9671d9a 100755
--- a/qt/control/qpf-smoothtimes.postinst
+++ b/qt/control/qpf-smoothtimes.postinst
@@ -1,9 +1,11 @@
1#!/bin/sh 1#!/bin/sh
2 2
3set -e 3set -e
4 4
5if [ "$1" != "configure" ]; then 5if [ "$1" != "configure" ]; then
6 exit 0 6 exit 0
7fi 7fi
8 8
9. /etc/profile
10
9update-qtfontdir 11update-qtfontdir
diff --git a/qt/qte234-for-opie091-fontdir.patch b/qt/qte234-for-opie091-fontdir.patch
index a765d44..3b3daf4 100644
--- a/qt/qte234-for-opie091-fontdir.patch
+++ b/qt/qte234-for-opie091-fontdir.patch
@@ -8,58 +8,58 @@
8+ echo "usage: $0 [font directory, defaults to QTDIR/lib/fonts]" 8+ echo "usage: $0 [font directory, defaults to QTDIR/lib/fonts]"
9+ exit 1 9+ exit 1
10+} 10+}
11+ 11+
12+setVar() 12+setVar()
13+{ 13+{
14+ eval "$1='$2'" 14+ eval "$1='$2'"
15+} 15+}
16+ 16+
17+getVar() 17+getVar()
18+{ 18+{
19+ eval "echo \$$1" 19+ eval "echo \$$1"
20+} 20+}
21+ 21+
22+handleQPF() 22+handleQPF()
23+{ 23+{
24+ base=`basename $1` 24+ base=`basename $1`
25+ family=`echo $base|cut -d_ -f1` 25+ family=`echo $base|cut -d_ -f1`
26+ pt=`echo $base|cut -d_ -f2` 26+ pt=`echo $base|cut -d_ -f2`
27+ weight=`echo $base|cut -d_ -f3|sed -e 's,i$,,'` 27+ weight=`echo $base|cut -d_ -f3|sed -e 's,i$,,'`
28+ if (echo $base|cut -d_ -f3|grep -q 'i$'); then 28+ if (echo $base|cut -d_ -f3|grep -q 'i$'); then
29+ italic="y" 29+ italic="y"
30+ else 30+ else
31+ italic="n" 31+ italic="n"
32+ fi 32+ fi
33+ echo "$family $base.qpf QPF $italic $weight $pt u" 33+ echo "$family $base.qpf QPF $italic $weight $pt u"
34+} 34+}
35+ 35+
36+if [ -z "$1" ]; then 36+if [ -z "$1" ]; then
37+ if [ -n "$QTDIR" ]; then 37+ if [ -n "$QTDIR" ]; then
38+ fontdir=$QTDIR/lib/fonts 38+ fontdir=$QTDIR/lib/fonts
39+ else 39+ else
40+ usage 40+ fontdir=/opt/QtPalmtop/lib/fonts
41+ fi 41+ fi
42+else 42+else
43+ fontdir=$1 43+ fontdir=$1
44+fi 44+fi
45+ 45+
46+if ! [ -d $fontdir ]; then 46+if ! [ -d $fontdir ]; then
47+ echo Error: $fontdir not a directory 47+ echo Error: $fontdir not a directory
48+ exit 1 48+ exit 1
49+fi 49+fi
50+ 50+
51+if [ -e $fontdir/fontdir ]; then 51+if [ -e $fontdir/fontdir ]; then
52+ cat $fontdir/fontdir | grep -v '\.qpf' > $fontdir/fontdir.new 52+ cat $fontdir/fontdir | grep -v '\.qpf' > $fontdir/fontdir.new
53+fi 53+fi
54+ 54+
55+( 55+(
56+ for file in `ls $fontdir/*.qpf|sed -e's,\.qpf$,,; s,_t[^_]*$,,;'|sort -u`; do 56+ for file in `ls $fontdir/*.qpf|sed -e's,\.qpf$,,; s,_t[^_]*$,,;'|sort -u`; do
57+ handleQPF $file 57+ handleQPF $file
58+ done 58+ done
59+) >> $fontdir/fontdir.new 59+) >> $fontdir/fontdir.new
60+ 60+
61+mv $fontdir/fontdir.new $fontdir/fontdir 61+mv $fontdir/fontdir.new $fontdir/fontdir
62+ 62+
63+exit 0 63+exit 0
64+ 64+
65+# vim:ai:et:sts=4:sw=4:tw=0: 65+# vim:ai:et:sts=4:sw=4:tw=0: