[arch-commits] Commit in qt3/trunk (PKGBUILD eastern_asian_languagues.diff qt.install)

Pierre Schmitz pierre at archlinux.org
Sun Sep 14 09:04:47 EDT 2008


    Date: Sunday, September 14, 2008 @ 09:04:46
  Author: pierre
Revision: 12457

upgpkg: qt3 3.3.8-9

Added:
  qt3/trunk/eastern_asian_languagues.diff
Modified:
  qt3/trunk/PKGBUILD
  qt3/trunk/qt.install

-------------------------------+
 PKGBUILD                      |   18 ++++++++++++------
 eastern_asian_languagues.diff |   39 +++++++++++++++++++++++++++++++++++++++
 qt.install                    |   21 ++++-----------------
 3 files changed, 55 insertions(+), 23 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2008-09-14 12:47:18 UTC (rev 12456)
+++ PKGBUILD	2008-09-14 13:04:46 UTC (rev 12457)
@@ -1,21 +1,23 @@
 # $Id$
 # Maintainer: Tobias Powalowski <tpowa at archlinux.org>
 # Contributor: John Proctor <jproctor at prium.net>
+
 pkgname=qt3
 pkgver=3.3.8
-pkgrel=8
+pkgrel=9
 pkgdesc="The QT gui toolkit."
 arch=(i686 x86_64)
 license=('GPL')
 url="http://www.trolltech.com/products/qt/index.html"
 pkgfqn=qt-x11-free-${pkgver}
 install=qt.install
-depends=('libpng' 'libjpeg' 'libxmu' 'libxcursor' 'libxinerama' 'mesa' \
-	 'libxft' 'libxrandr')
-makedepends=('mysql' 'postgresql>=8.2.3' 'sqlite3' 'unixodbc' 'libmng')
+depends=('libpng' 'libxmu' 'libxcursor' 'libxinerama' 'mesa' \
+	 'libxft' 'libxrandr' 'libmng')
+makedepends=('mysql' 'postgresql>=8.2.3' 'unixodbc' 'sqlite3')
+optdepends=('libmysqlclient' 'postgresql-libs' 'unixodbc')
 source=(ftp://ftp.trolltech.com/qt/source/${pkgfqn}.tar.bz2 qt.profile \
         qt-copy-kde-patches.tar.bz2 qt-patches.tar.bz2 utf8-bug-qt3.diff \
-	qt-font-default-subst.diff mysql.patch)
+	qt-font-default-subst.diff mysql.patch eastern_asian_languagues.diff)
 options=(!libtool)
 md5sums=('cf3c43a7dfde5bfb76f8001102fe6e85'
          'f72d1eb4eb49b9a9467c1f6035194266'
@@ -23,7 +25,8 @@
          'c8937968e9807b3cdcdf0505728d99ce'
          'f6b3b39040f2b8f19ba1cf1445468c28'
          '9370d82e85f2c799335ed0dcc1d53189'
-         '7d40ed1bd40d33d8b9b27a2076a5d22a')
+         '7d40ed1bd40d33d8b9b27a2076a5d22a'
+         '616f1f3029cf8375256ad6a406de3549')
 
 # qt-copy-kde-patches come from http://websvn.kde.org/trunk/qt-copy/patches/
 # other qt-patches come from fedora and gentoo
@@ -49,6 +52,8 @@
   patch -Np0 -i ../qt-font-default-subst.diff || return 1
   # fix segfaults on exit when using mysql DB driver
   patch -Np0 -i ../mysql.patch || return 1
+  # fix CJK font/chars select error (FS#11245)
+  patch -p1 -i ${srcdir}/eastern_asian_languagues.diff || return 1
   # start compiling qt
   sed -i 's|-cp -P -f|-cp -L -f|' qmake/Makefile.unix
   rm -rf doc/html examples tutorial
@@ -93,6 +98,7 @@
   sed -i "s|-L$startdir/src/$pkgfqn/lib ||g" $startdir/pkg/opt/qt/lib/*.prl
   install -D -m755 qmake/qmake $startdir/pkg/opt/qt/bin/qmake
   install -D -m755 $startdir/qt.profile $startdir/pkg/etc/profile.d/qt3.sh
+  ln -sf /opt/qt/bin/qtconfig $startdir/pkg/opt/qt/bin/qt3config 
   rm -f $startdir/pkg/opt/qt/mkspecs/linux-g++$ARCH/linux-g++$ARCH
 
   # install man pages

Added: eastern_asian_languagues.diff
===================================================================
--- eastern_asian_languagues.diff	                        (rev 0)
+++ eastern_asian_languagues.diff	2008-09-14 13:04:46 UTC (rev 12457)
@@ -0,0 +1,39 @@
+--- qt-x11-free-3.3.8b/src/kernel/qfontdatabase.cpp	2008-01-15 21:09:13.000000000 +0200
++++ qt-x11-free-3.3.8b/src/kernel/qfontdatabase.cpp	2008-03-10 11:34:22.000000000 +0200
+@@ -966,20 +966,22 @@
+ 
+ #ifdef Q_WS_X11
+     if (script == QFont::Han) {
+-	// modify script according to locale
+-	static QFont::Script defaultHan = QFont::UnknownScript;
+-	if (defaultHan == QFont::UnknownScript) {
+-	    QCString locale = setlocale(LC_ALL, NULL);
+-	    if (locale.contains("ko"))
+-		defaultHan = QFont::Han_Korean;
+-	    else if (locale.contains("zh_TW") || locale.contains("zh_HK"))
+-		defaultHan = QFont::Han_TraditionalChinese;
+-	    else if (locale.contains("zh"))
+-		defaultHan = QFont::Han_SimplifiedChinese;
+-	    else
+-		defaultHan = QFont::Han_Japanese;
+-	}
+-	script = defaultHan;
++        // modify script according to locale
++        static QFont::Script defaultHan;
++        QCString locale = setlocale(LC_ALL, NULL);
++
++        if (locale.contains("ko"))
++            defaultHan = QFont::Han_Korean;
++        else if (locale.contains("zh_TW") || locale.contains("zh_HK"))
++            defaultHan = QFont::Han_TraditionalChinese;
++        else if (locale.contains("zh"))
++            defaultHan = QFont::Han_SimplifiedChinese;
++        else if (locale.contains("ja"))
++            defaultHan = QFont::Han_Japanese;
++        else
++            defaultHan = QFont::Han; // don't change
++
++        script = defaultHan;
+     }
+ #endif
+ 

Modified: qt.install
===================================================================
--- qt.install	2008-09-14 12:47:18 UTC (rev 12456)
+++ qt.install	2008-09-14 13:04:46 UTC (rev 12457)
@@ -1,24 +1,11 @@
 post_install() {
-  if ! [ `grep '/opt/qt/lib' etc/ld.so.conf` ]; then
-    echo "/opt/qt/lib" >>etc/ld.so.conf
-    sbin/ldconfig -r .
-  fi
-  echo "INFORMATION:"
-  echo "Documentation is seperated it's called qt3-doc"
+	grep -q '/opt/qt/lib' etc/ld.so.conf || echo '/opt/qt/lib' >> etc/ld.so.conf
 }
 
 post_upgrade() {
-  /bin/true
+	post_install
 }
 
-pre_remove() {
-  cat etc/ld.so.conf | grep -v '/opt/qt/lib' >/tmp/.pacqt
-  mv /tmp/.pacqt etc/ld.so.conf
-  chmod 644 etc/ld.so.conf
-  sbin/ldconfig -r .
+post_remove() {
+	sed  -ie '/\/opt\/qt\/lib/d' etc/ld.so.conf		
 }
-
-op=$1
-shift
-
-$op $*




More information about the arch-commits mailing list