[arch-commits] Commit in qt3/repos (16 files)

Eric Bélanger eric at nymeria.archlinux.org
Thu Aug 15 21:57:50 UTC 2013


    Date: Thursday, August 15, 2013 @ 23:57:49
  Author: eric
Revision: 193086

archrelease: copy trunk to staging-i686, staging-x86_64

Added:
  qt3/repos/staging-i686/
  qt3/repos/staging-i686/PKGBUILD
    (from rev 193085, qt3/trunk/PKGBUILD)
  qt3/repos/staging-i686/eastern_asian_languagues.diff
    (from rev 193085, qt3/trunk/eastern_asian_languagues.diff)
  qt3/repos/staging-i686/gcc-4.6.patch
    (from rev 193085, qt3/trunk/gcc-4.6.patch)
  qt3/repos/staging-i686/qt-copy-kde-patches.tar.bz2
    (from rev 193085, qt3/trunk/qt-copy-kde-patches.tar.bz2)
  qt3/repos/staging-i686/qt-odbc.patch
    (from rev 193085, qt3/trunk/qt-odbc.patch)
  qt3/repos/staging-i686/qt-patches.tar.bz2
    (from rev 193085, qt3/trunk/qt-patches.tar.bz2)
  qt3/repos/staging-i686/qt3-png15.patch
    (from rev 193085, qt3/trunk/qt3-png15.patch)
  qt3/repos/staging-x86_64/
  qt3/repos/staging-x86_64/PKGBUILD
    (from rev 193085, qt3/trunk/PKGBUILD)
  qt3/repos/staging-x86_64/eastern_asian_languagues.diff
    (from rev 193085, qt3/trunk/eastern_asian_languagues.diff)
  qt3/repos/staging-x86_64/gcc-4.6.patch
    (from rev 193085, qt3/trunk/gcc-4.6.patch)
  qt3/repos/staging-x86_64/qt-copy-kde-patches.tar.bz2
    (from rev 193085, qt3/trunk/qt-copy-kde-patches.tar.bz2)
  qt3/repos/staging-x86_64/qt-odbc.patch
    (from rev 193085, qt3/trunk/qt-odbc.patch)
  qt3/repos/staging-x86_64/qt-patches.tar.bz2
    (from rev 193085, qt3/trunk/qt-patches.tar.bz2)
  qt3/repos/staging-x86_64/qt3-png15.patch
    (from rev 193085, qt3/trunk/qt3-png15.patch)

----------------------------------------------+
 staging-i686/PKGBUILD                        |  112 +++++++++++++
 staging-i686/eastern_asian_languagues.diff   |   39 ++++
 staging-i686/gcc-4.6.patch                   |   33 +++
 staging-i686/qt-odbc.patch                   |   19 ++
 staging-i686/qt3-png15.patch                 |  212 +++++++++++++++++++++++++
 staging-x86_64/PKGBUILD                      |  112 +++++++++++++
 staging-x86_64/eastern_asian_languagues.diff |   39 ++++
 staging-x86_64/gcc-4.6.patch                 |   33 +++
 staging-x86_64/qt-odbc.patch                 |   19 ++
 staging-x86_64/qt3-png15.patch               |  212 +++++++++++++++++++++++++
 10 files changed, 830 insertions(+)

Copied: qt3/repos/staging-i686/PKGBUILD (from rev 193085, qt3/trunk/PKGBUILD)
===================================================================
--- staging-i686/PKGBUILD	                        (rev 0)
+++ staging-i686/PKGBUILD	2013-08-15 21:57:49 UTC (rev 193086)
@@ -0,0 +1,112 @@
+# $Id$
+# Maintainer: Eric Bélanger <eric at archlinux.org>
+
+pkgname=qt3
+pkgver=3.3.8b
+pkgrel=6
+epoch=1
+pkgdesc="A cross-platform application and UI framework"
+arch=('i686' 'x86_64')
+url="http://www.trolltech.com/products/qt/index.html"
+license=('GPL')
+depends=('libpng' 'libxmu' 'libxcursor' 'libxinerama' 'glu' 'libxft'
+         'libxrandr' 'libmng')
+makedepends=('mariadb' 'postgresql' 'unixodbc' 'sqlite' 'mesa')
+optdepends=('qtchooser: set the default Qt toolkit'
+            'libmariadbclient: MariaDB driver'
+            'postgresql-libs: PostgreSQL driver'
+            'unixodbc: ODBC driver')
+options=('!libtool' '!docs')
+source=(ftp://ftp.qt-project.org/qt/source/qt-x11-free-${pkgver}.tar.gz
+        qt3-png15.patch qt-copy-kde-patches.tar.bz2 qt-patches.tar.bz2
+        eastern_asian_languagues.diff qt-odbc.patch gcc-4.6.patch)
+sha1sums=('745def6250dc7f337dbb265e20bf38dcb41fd854'
+          '3d19510c46016a1a211d97bf8f82b01498b1b33c'
+          '33418e5b117458af23c72cdbffc0c339bc34bdc4'
+          '116afa0e737bdf27ea27f9b3653aeb56db9ec151'
+          '40c7b8f06a21f809ddeb8b5560e9da63ccac6a17'
+          '1346320614f6f86fbeb10b9fbad721dea29f5b61'
+          'd9b83b8f6f9c8bd98d290dc1d0e9913a00b62c3f')
+
+# qt-copy-kde-patches come from http://websvn.kde.org/trunk/qt-copy/patches/
+# other qt-patches come from fedora and gentoo
+
+prepare() {
+  cd qt-x11-free-${pkgver}
+  # apply qt patches from kde.org
+  for i in ../qt-copy-kde-patches/*; do
+    patch -p0 -i $i 
+  done
+  # apply other qt patches and one security fix from debian/gentoo
+  for i in ../qt-patches/*; do
+    patch -p1 -i $i 
+  done
+  # fix CJK font/chars select error (FS#11245)
+  patch -p1 -i "${srcdir}"/eastern_asian_languagues.diff 
+  # fix build problem against new unixODBC
+  patch -p1 -i "${srcdir}"/qt-odbc.patch 
+  # fix build with gcc 4.6.0
+  patch -p1 -i "${srcdir}"/gcc-4.6.patch
+  patch -p0 -i "${srcdir}"/qt3-png15.patch 
+ 
+  sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++{,-32,-64}/qmake.conf
+  sed -i "s|-I. |$CXXFLAGS -I. |" qmake/Makefile.unix
+  sed -i "s|read acceptance|acceptance=yes|" configure
+}
+
+build() {
+  export QTDIR="${srcdir}"/qt-x11-free-${pkgver}
+  export PATH=${QTDIR}/bin:${PATH}
+  export LD_LIBRARY_PATH=${QTDIR}/lib:${LD_LIBRARY_PATH}
+  export QMAKESPEC=$QTDIR/mkspecs/linux-g++
+
+  if [ "$CARCH" = "x86_64" ]; then
+      export ARCH="-64"	
+    else unset ARCH
+  fi
+
+  cd qt-x11-free-${pkgver}
+  ./configure \
+    -prefix /usr \
+    -bindir /usr/lib/qt3/bin \
+    -headerdir /usr/include/qt3 \
+    -plugindir /usr/lib/qt3/plugins \
+    -datadir /usr/share/qt3 \
+    -translationdir /usr/share/qt3/translations \
+    -I/usr/include/mysql -I/usr/include/postgresql/server \
+    -platform linux-g++$ARCH \
+    -system-zlib \
+    -qt-gif \
+    -release \
+    -shared \
+    -sm \
+    -nis \
+    -thread \
+    -stl \
+    -system-lib{png,jpeg,mng} \
+    -no-g++-exceptions \
+    -plugin-sql-{mysql,psql,sqlite,odbc}
+
+  make
+}
+
+package() {
+  cd qt-x11-free-${pkgver}
+  make INSTALL_ROOT="${pkgdir}" install
+  sed -i -e "s|-L${srcdir}/qt-x11-free-${pkgver}/lib ||g" -e "s|${srcdir}/||g" "${pkgdir}"/usr/lib/*.prl
+  rm -rf "${pkgdir}"/usr/share/qt3/{phrasebooks,templates,translations}
+  rm -rf "${pkgdir}"/usr/share/qt3/mkspecs/{aix*,*bsd*,cygwin*,dgux*,darwin*,hpux*,hurd*,irix*,linux-g++$ARCH/linux-g++$ARCH,lynxos*,macx*,qnx*,reliant*,sco*,solaris*,tru64*,unixware*,win32*} 
+
+# install man pages
+  install -d -m755 "${pkgdir}"/usr/share/man
+  cp -r "${srcdir}"/qt-x11-free-${pkgver}/doc/man/{man1,man3} "${pkgdir}"/usr/share/man/
+  for i in "${pkgdir}"/usr/share/man/man1/*; do
+    mv $i ${i%.*}-qt3.1
+  done
+
+# Useful symlinks for cmake and configure scripts
+  install -d "${pkgdir}"/usr/bin
+  for b in "${pkgdir}"/usr/lib/qt3/bin/*; do
+    ln -s /usr/lib/qt3/bin/$(basename $b) "${pkgdir}"/usr/bin/$(basename $b)-qt3
+  done
+}

Copied: qt3/repos/staging-i686/eastern_asian_languagues.diff (from rev 193085, qt3/trunk/eastern_asian_languagues.diff)
===================================================================
--- staging-i686/eastern_asian_languagues.diff	                        (rev 0)
+++ staging-i686/eastern_asian_languagues.diff	2013-08-15 21:57:49 UTC (rev 193086)
@@ -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
+ 

Copied: qt3/repos/staging-i686/gcc-4.6.patch (from rev 193085, qt3/trunk/gcc-4.6.patch)
===================================================================
--- staging-i686/gcc-4.6.patch	                        (rev 0)
+++ staging-i686/gcc-4.6.patch	2013-08-15 21:57:49 UTC (rev 193086)
@@ -0,0 +1,33 @@
+diff -up qt-x11-free-3.3.8b/src/tools/qmap.h.cstddef qt-x11-free-3.3.8b/src/tools/qmap.h
+--- qt-x11-free-3.3.8b/src/tools/qmap.h.cstddef	2008-01-15 13:09:13.000000000 -0600
++++ qt-x11-free-3.3.8b/src/tools/qmap.h	2011-01-30 21:14:29.275088725 -0600
+@@ -49,6 +49,7 @@
+ #include "qvaluelist.h"
+ #endif // QT_H
+ 
++#include <cstddef>
+ #ifndef QT_NO_STL
+ #include <iterator>
+ #include <map>
+diff -up qt-x11-free-3.3.8b/src/tools/qvaluelist.h.cstddef qt-x11-free-3.3.8b/src/tools/qvaluelist.h
+--- qt-x11-free-3.3.8b/src/tools/qvaluelist.h.cstddef	2008-01-15 13:09:13.000000000 -0600
++++ qt-x11-free-3.3.8b/src/tools/qvaluelist.h	2011-01-30 21:14:01.765846592 -0600
+@@ -47,6 +47,7 @@
+ #include "qdatastream.h"
+ #endif // QT_H
+ 
++#include <cstddef>
+ #ifndef QT_NO_STL
+ #include <iterator>
+ #include <list>
+diff -up qt-x11-free-3.3.8b/src/tools/qvaluevector.h.cstddef qt-x11-free-3.3.8b/src/tools/qvaluevector.h
+--- qt-x11-free-3.3.8b/src/tools/qvaluevector.h.cstddef	2008-01-15 13:09:13.000000000 -0600
++++ qt-x11-free-3.3.8b/src/tools/qvaluevector.h	2011-01-30 21:14:01.765846592 -0600
+@@ -45,6 +45,7 @@
+ #include "qdatastream.h"
+ #endif // QT_H
+ 
++#include <cstddef>
+ #ifndef QT_NO_STL
+ #include <vector>
+ #endif

Copied: qt3/repos/staging-i686/qt-copy-kde-patches.tar.bz2 (from rev 193085, qt3/trunk/qt-copy-kde-patches.tar.bz2)
===================================================================
(Binary files differ)

Copied: qt3/repos/staging-i686/qt-odbc.patch (from rev 193085, qt3/trunk/qt-odbc.patch)
===================================================================
--- staging-i686/qt-odbc.patch	                        (rev 0)
+++ staging-i686/qt-odbc.patch	2013-08-15 21:57:49 UTC (rev 193086)
@@ -0,0 +1,19 @@
+diff -up qt-x11-free-3.3.8/src/sql/drivers/odbc/qsql_odbc.cpp.orig qt-x11-free-3.3.8/src/sql/drivers/odbc/qsql_odbc.cpp
+--- qt-x11-free-3.3.8/src/sql/drivers/odbc/qsql_odbc.cpp.orig	2009-02-24 11:32:27.000000000 +0100
++++ qt-x11-free-3.3.8/src/sql/drivers/odbc/qsql_odbc.cpp	2009-02-24 11:33:43.000000000 +0100
+@@ -57,13 +57,13 @@
+ #endif
+ 
+ // newer platform SDKs use SQLLEN instead of SQLINTEGER
+-#ifdef SQLLEN
++#if defined(SQLLEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX)
+ # define QSQLLEN SQLLEN
+ #else
+ # define QSQLLEN SQLINTEGER
+ #endif
+ 
+-#ifdef SQLULEN
++#if defined(SQLULEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX)
+ # define QSQLULEN SQLULEN
+ #else
+ # define QSQLULEN SQLUINTEGER

Copied: qt3/repos/staging-i686/qt-patches.tar.bz2 (from rev 193085, qt3/trunk/qt-patches.tar.bz2)
===================================================================
(Binary files differ)

Copied: qt3/repos/staging-i686/qt3-png15.patch (from rev 193085, qt3/trunk/qt3-png15.patch)
===================================================================
--- staging-i686/qt3-png15.patch	                        (rev 0)
+++ staging-i686/qt3-png15.patch	2013-08-15 21:57:49 UTC (rev 193086)
@@ -0,0 +1,212 @@
+$NetBSD: patch-as,v 1.5 2011/03/25 15:28:26 wiz Exp $
+
+--- src/kernel/qpngio.cpp.orig	2007-02-02 10:01:15.000000000 -0400
++++ src/kernel/qpngio.cpp
+@@ -43,6 +43,7 @@
+ #include "qiodevice.h"
+ 
+ #include <png.h>
++#include <zlib.h>
+ 
+ 
+ #ifdef Q_OS_TEMP
+@@ -123,9 +124,24 @@ void setup_qt( QImage& image, png_struct
+     png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
+ 	0, 0, 0);
+ 
++    png_colorp info_ptr_palette = NULL;
++    int info_ptr_num_palette = 0;
++    if (png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)) {
++	png_get_PLTE(png_ptr, info_ptr, &info_ptr_palette, &info_ptr_num_palette);
++    }
++
++    png_bytep info_ptr_trans_alpha = NULL;
++    int info_ptr_num_trans = 0;
++    png_color_16p info_ptr_trans_color = NULL;
++
++    if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
++	png_get_tRNS(png_ptr, info_ptr, &info_ptr_trans_alpha, &info_ptr_num_trans, &info_ptr_trans_color);
++    }
++
++
+     if ( color_type == PNG_COLOR_TYPE_GRAY ) {
+ 	// Black & White or 8-bit grayscale
+-	if ( bit_depth == 1 && info_ptr->channels == 1 ) {
++	if ( bit_depth == 1 && png_get_channels(png_ptr, info_ptr) == 1 ) {
+ 	    png_set_invert_mono( png_ptr );
+ 	    png_read_update_info( png_ptr, info_ptr );
+ 	    if (!image.create( width, height, 1, 2, QImage::BigEndian ))
+@@ -159,7 +175,7 @@ void setup_qt( QImage& image, png_struct
+ 		image.setColor( i, qRgba(c,c,c,0xff) );
+ 	    }
+ 	    if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
+-		const int g = info_ptr->trans_values.gray;
++		const int g = info_ptr_trans_color->gray;
+ 		if (g < ncols) {
+ 		    image.setAlphaBuffer(TRUE);
+ 		    image.setColor(g, image.color(g) & RGB_MASK);
+@@ -168,7 +184,7 @@ void setup_qt( QImage& image, png_struct
+ 	}
+     } else if ( color_type == PNG_COLOR_TYPE_PALETTE
+      && png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)
+-     && info_ptr->num_palette <= 256 )
++     && info_ptr_num_palette <= 256 )
+     {
+ 	// 1-bit and 8-bit color
+ 	if ( bit_depth != 1 )
+@@ -176,28 +192,28 @@ void setup_qt( QImage& image, png_struct
+ 	png_read_update_info( png_ptr, info_ptr );
+ 	png_get_IHDR(png_ptr, info_ptr,
+ 	    &width, &height, &bit_depth, &color_type, 0, 0, 0);
+-	if (!image.create(width, height, bit_depth, info_ptr->num_palette,
++	if (!image.create(width, height, bit_depth, info_ptr_num_palette,
+ 	    QImage::BigEndian))
+ 	    return;
+ 	int i = 0;
+ 	if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
+ 	    image.setAlphaBuffer( TRUE );
+-	    while ( i < info_ptr->num_trans ) {
++	    while ( i < info_ptr_num_trans ) {
+ 		image.setColor(i, qRgba(
+-		    info_ptr->palette[i].red,
+-		    info_ptr->palette[i].green,
+-		    info_ptr->palette[i].blue,
+-		    info_ptr->trans[i]
++		    info_ptr_palette[i].red,
++		    info_ptr_palette[i].green,
++		    info_ptr_palette[i].blue,
++		    info_ptr_trans_alpha[i]
+ 		    )
+ 		);
+ 		i++;
+ 	    }
+ 	}
+-	while ( i < info_ptr->num_palette ) {
++	while ( i < info_ptr_num_palette ) {
+ 	    image.setColor(i, qRgba(
+-		info_ptr->palette[i].red,
+-		info_ptr->palette[i].green,
+-		info_ptr->palette[i].blue,
++		info_ptr_palette[i].red,
++		info_ptr_palette[i].green,
++		info_ptr_palette[i].blue,
+ 		0xff
+ 		)
+ 	    );
+@@ -284,7 +300,7 @@ void read_png_image(QImageIO* iio)
+ 	return;
+     }
+ 
+-    if (setjmp(png_ptr->jmpbuf)) {
++    if (setjmp(png_jmpbuf(png_ptr))) {
+ 	png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+ 	iio->setStatus(-4);
+ 	return;
+@@ -469,7 +485,7 @@ bool QPNGImageWriter::writeImage(const Q
+ 	return FALSE;
+     }
+ 
+-    if (setjmp(png_ptr->jmpbuf)) {
++    if (setjmp(png_jmpbuf(png_ptr))) {
+ 	png_destroy_write_struct(&png_ptr, &info_ptr);
+ 	return FALSE;
+     }
+@@ -491,10 +507,16 @@ bool QPNGImageWriter::writeImage(const Q
+ 
+     png_set_write_fn(png_ptr, (void*)this, qpiw_write_fn, qpiw_flush_fn);
+ 
++#warning XXXtnn not too sure about this
++/* 
++according to png.h, channels is only used on read, not writes, so we
++should be able to comment this out.
++
+     info_ptr->channels =
+ 	(image.depth() == 32)
+ 	    ? (image.hasAlphaBuffer() ? 4 : 3)
+ 	    : 1;
++*/
+ 
+     png_set_IHDR(png_ptr, info_ptr, image.width(), image.height(),
+ 	image.depth() == 1 ? 1 : 8 /* per channel */,
+@@ -504,11 +526,12 @@ bool QPNGImageWriter::writeImage(const Q
+ 		: PNG_COLOR_TYPE_RGB
+ 	    : PNG_COLOR_TYPE_PALETTE, 0, 0, 0);
+ 
++    png_color_8 sig_bit;
++    sig_bit.red = 8;
++    sig_bit.green = 8;
++    sig_bit.blue = 8;
++    png_set_sBIT(png_ptr, info_ptr, &sig_bit);
+ 
+-    //png_set_sBIT(png_ptr, info_ptr, 8);
+-    info_ptr->sig_bit.red = 8;
+-    info_ptr->sig_bit.green = 8;
+-    info_ptr->sig_bit.blue = 8;
+ 
+     if (image.depth() == 1 && image.bitOrder() == QImage::LittleEndian)
+        png_set_packswap(png_ptr);
+@@ -522,11 +545,14 @@ bool QPNGImageWriter::writeImage(const Q
+ 	png_set_PLTE(png_ptr, info_ptr, palette, num_palette);
+ 	int* trans = new int[num_palette];
+ 	int num_trans = 0;
++	png_colorp info_ptr_palette = NULL;
++	int tmp;
++	png_get_PLTE(png_ptr, info_ptr, &info_ptr_palette, &tmp);
+ 	for (int i=0; i<num_palette; i++) {
+ 	    QRgb rgb=image.color(i);
+-	    info_ptr->palette[i].red = qRed(rgb);
+-	    info_ptr->palette[i].green = qGreen(rgb);
+-	    info_ptr->palette[i].blue = qBlue(rgb);
++	    info_ptr_palette[i].red = qRed(rgb);
++	    info_ptr_palette[i].green = qGreen(rgb);
++	    info_ptr_palette[i].blue = qBlue(rgb);
+ 	    if (image.hasAlphaBuffer()) {
+ 		trans[i] = rgb >> 24;
+ 		if (trans[i] < 255) {
+@@ -534,6 +560,7 @@ bool QPNGImageWriter::writeImage(const Q
+ 		}
+ 	    }
+ 	}
++	png_set_PLTE(png_ptr, info_ptr, info_ptr_palette, num_palette);
+ 	if (num_trans) {
+ 	    copy_trans = new png_byte[num_trans];
+ 	    for (int i=0; i<num_trans; i++)
+@@ -544,7 +571,10 @@ bool QPNGImageWriter::writeImage(const Q
+     }
+ 
+     if ( image.hasAlphaBuffer() ) {
+-	info_ptr->sig_bit.alpha = 8;
++        png_color_8p sig_bit;
++        png_get_sBIT(png_ptr, info_ptr, &sig_bit);
++        sig_bit->alpha = 8;
++        png_set_sBIT(png_ptr, info_ptr, sig_bit);
+     }
+ 
+     // Swap ARGB to RGBA (normal PNG format) before saving on
+@@ -1030,7 +1060,7 @@ int QPNGFormat::decode(QImage& img, QIma
+ 	    return -1;
+ 	}
+ 
+-	if (setjmp((png_ptr)->jmpbuf)) {
++	if (setjmp(png_jmpbuf(png_ptr))) {
+ 	    png_destroy_read_struct(&png_ptr, &info_ptr, 0);
+ 	    image = 0;
+ 	    return -1;
+@@ -1057,7 +1087,7 @@ int QPNGFormat::decode(QImage& img, QIma
+ 
+     if ( !png_ptr ) return 0;
+ 
+-    if (setjmp(png_ptr->jmpbuf)) {
++    if (setjmp(png_jmpbuf(png_ptr))) {
+ 	png_destroy_read_struct(&png_ptr, &info_ptr, 0);
+ 	image = 0;
+ 	state = MovieStart;
+@@ -1117,7 +1147,7 @@ void QPNGFormat::end(png_structp png, pn
+     consumer->frameDone(QPoint(offx,offy),r);
+     consumer->end();
+     state = FrameStart;
+-    unused_data = (int)png->buffer_size; // Since libpng doesn't tell us
++    unused_data = png_process_data_pause(png, 0);
+ }
+ 
+ #ifdef PNG_USER_CHUNKS_SUPPORTED

Copied: qt3/repos/staging-x86_64/PKGBUILD (from rev 193085, qt3/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2013-08-15 21:57:49 UTC (rev 193086)
@@ -0,0 +1,112 @@
+# $Id$
+# Maintainer: Eric Bélanger <eric at archlinux.org>
+
+pkgname=qt3
+pkgver=3.3.8b
+pkgrel=6
+epoch=1
+pkgdesc="A cross-platform application and UI framework"
+arch=('i686' 'x86_64')
+url="http://www.trolltech.com/products/qt/index.html"
+license=('GPL')
+depends=('libpng' 'libxmu' 'libxcursor' 'libxinerama' 'glu' 'libxft'
+         'libxrandr' 'libmng')
+makedepends=('mariadb' 'postgresql' 'unixodbc' 'sqlite' 'mesa')
+optdepends=('qtchooser: set the default Qt toolkit'
+            'libmariadbclient: MariaDB driver'
+            'postgresql-libs: PostgreSQL driver'
+            'unixodbc: ODBC driver')
+options=('!libtool' '!docs')
+source=(ftp://ftp.qt-project.org/qt/source/qt-x11-free-${pkgver}.tar.gz
+        qt3-png15.patch qt-copy-kde-patches.tar.bz2 qt-patches.tar.bz2
+        eastern_asian_languagues.diff qt-odbc.patch gcc-4.6.patch)
+sha1sums=('745def6250dc7f337dbb265e20bf38dcb41fd854'
+          '3d19510c46016a1a211d97bf8f82b01498b1b33c'
+          '33418e5b117458af23c72cdbffc0c339bc34bdc4'
+          '116afa0e737bdf27ea27f9b3653aeb56db9ec151'
+          '40c7b8f06a21f809ddeb8b5560e9da63ccac6a17'
+          '1346320614f6f86fbeb10b9fbad721dea29f5b61'
+          'd9b83b8f6f9c8bd98d290dc1d0e9913a00b62c3f')
+
+# qt-copy-kde-patches come from http://websvn.kde.org/trunk/qt-copy/patches/
+# other qt-patches come from fedora and gentoo
+
+prepare() {
+  cd qt-x11-free-${pkgver}
+  # apply qt patches from kde.org
+  for i in ../qt-copy-kde-patches/*; do
+    patch -p0 -i $i 
+  done
+  # apply other qt patches and one security fix from debian/gentoo
+  for i in ../qt-patches/*; do
+    patch -p1 -i $i 
+  done
+  # fix CJK font/chars select error (FS#11245)
+  patch -p1 -i "${srcdir}"/eastern_asian_languagues.diff 
+  # fix build problem against new unixODBC
+  patch -p1 -i "${srcdir}"/qt-odbc.patch 
+  # fix build with gcc 4.6.0
+  patch -p1 -i "${srcdir}"/gcc-4.6.patch
+  patch -p0 -i "${srcdir}"/qt3-png15.patch 
+ 
+  sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++{,-32,-64}/qmake.conf
+  sed -i "s|-I. |$CXXFLAGS -I. |" qmake/Makefile.unix
+  sed -i "s|read acceptance|acceptance=yes|" configure
+}
+
+build() {
+  export QTDIR="${srcdir}"/qt-x11-free-${pkgver}
+  export PATH=${QTDIR}/bin:${PATH}
+  export LD_LIBRARY_PATH=${QTDIR}/lib:${LD_LIBRARY_PATH}
+  export QMAKESPEC=$QTDIR/mkspecs/linux-g++
+
+  if [ "$CARCH" = "x86_64" ]; then
+      export ARCH="-64"	
+    else unset ARCH
+  fi
+
+  cd qt-x11-free-${pkgver}
+  ./configure \
+    -prefix /usr \
+    -bindir /usr/lib/qt3/bin \
+    -headerdir /usr/include/qt3 \
+    -plugindir /usr/lib/qt3/plugins \
+    -datadir /usr/share/qt3 \
+    -translationdir /usr/share/qt3/translations \
+    -I/usr/include/mysql -I/usr/include/postgresql/server \
+    -platform linux-g++$ARCH \
+    -system-zlib \
+    -qt-gif \
+    -release \
+    -shared \
+    -sm \
+    -nis \
+    -thread \
+    -stl \
+    -system-lib{png,jpeg,mng} \
+    -no-g++-exceptions \
+    -plugin-sql-{mysql,psql,sqlite,odbc}
+
+  make
+}
+
+package() {
+  cd qt-x11-free-${pkgver}
+  make INSTALL_ROOT="${pkgdir}" install
+  sed -i -e "s|-L${srcdir}/qt-x11-free-${pkgver}/lib ||g" -e "s|${srcdir}/||g" "${pkgdir}"/usr/lib/*.prl
+  rm -rf "${pkgdir}"/usr/share/qt3/{phrasebooks,templates,translations}
+  rm -rf "${pkgdir}"/usr/share/qt3/mkspecs/{aix*,*bsd*,cygwin*,dgux*,darwin*,hpux*,hurd*,irix*,linux-g++$ARCH/linux-g++$ARCH,lynxos*,macx*,qnx*,reliant*,sco*,solaris*,tru64*,unixware*,win32*} 
+
+# install man pages
+  install -d -m755 "${pkgdir}"/usr/share/man
+  cp -r "${srcdir}"/qt-x11-free-${pkgver}/doc/man/{man1,man3} "${pkgdir}"/usr/share/man/
+  for i in "${pkgdir}"/usr/share/man/man1/*; do
+    mv $i ${i%.*}-qt3.1
+  done
+
+# Useful symlinks for cmake and configure scripts
+  install -d "${pkgdir}"/usr/bin
+  for b in "${pkgdir}"/usr/lib/qt3/bin/*; do
+    ln -s /usr/lib/qt3/bin/$(basename $b) "${pkgdir}"/usr/bin/$(basename $b)-qt3
+  done
+}

Copied: qt3/repos/staging-x86_64/eastern_asian_languagues.diff (from rev 193085, qt3/trunk/eastern_asian_languagues.diff)
===================================================================
--- staging-x86_64/eastern_asian_languagues.diff	                        (rev 0)
+++ staging-x86_64/eastern_asian_languagues.diff	2013-08-15 21:57:49 UTC (rev 193086)
@@ -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
+ 

Copied: qt3/repos/staging-x86_64/gcc-4.6.patch (from rev 193085, qt3/trunk/gcc-4.6.patch)
===================================================================
--- staging-x86_64/gcc-4.6.patch	                        (rev 0)
+++ staging-x86_64/gcc-4.6.patch	2013-08-15 21:57:49 UTC (rev 193086)
@@ -0,0 +1,33 @@
+diff -up qt-x11-free-3.3.8b/src/tools/qmap.h.cstddef qt-x11-free-3.3.8b/src/tools/qmap.h
+--- qt-x11-free-3.3.8b/src/tools/qmap.h.cstddef	2008-01-15 13:09:13.000000000 -0600
++++ qt-x11-free-3.3.8b/src/tools/qmap.h	2011-01-30 21:14:29.275088725 -0600
+@@ -49,6 +49,7 @@
+ #include "qvaluelist.h"
+ #endif // QT_H
+ 
++#include <cstddef>
+ #ifndef QT_NO_STL
+ #include <iterator>
+ #include <map>
+diff -up qt-x11-free-3.3.8b/src/tools/qvaluelist.h.cstddef qt-x11-free-3.3.8b/src/tools/qvaluelist.h
+--- qt-x11-free-3.3.8b/src/tools/qvaluelist.h.cstddef	2008-01-15 13:09:13.000000000 -0600
++++ qt-x11-free-3.3.8b/src/tools/qvaluelist.h	2011-01-30 21:14:01.765846592 -0600
+@@ -47,6 +47,7 @@
+ #include "qdatastream.h"
+ #endif // QT_H
+ 
++#include <cstddef>
+ #ifndef QT_NO_STL
+ #include <iterator>
+ #include <list>
+diff -up qt-x11-free-3.3.8b/src/tools/qvaluevector.h.cstddef qt-x11-free-3.3.8b/src/tools/qvaluevector.h
+--- qt-x11-free-3.3.8b/src/tools/qvaluevector.h.cstddef	2008-01-15 13:09:13.000000000 -0600
++++ qt-x11-free-3.3.8b/src/tools/qvaluevector.h	2011-01-30 21:14:01.765846592 -0600
+@@ -45,6 +45,7 @@
+ #include "qdatastream.h"
+ #endif // QT_H
+ 
++#include <cstddef>
+ #ifndef QT_NO_STL
+ #include <vector>
+ #endif

Copied: qt3/repos/staging-x86_64/qt-copy-kde-patches.tar.bz2 (from rev 193085, qt3/trunk/qt-copy-kde-patches.tar.bz2)
===================================================================
(Binary files differ)

Copied: qt3/repos/staging-x86_64/qt-odbc.patch (from rev 193085, qt3/trunk/qt-odbc.patch)
===================================================================
--- staging-x86_64/qt-odbc.patch	                        (rev 0)
+++ staging-x86_64/qt-odbc.patch	2013-08-15 21:57:49 UTC (rev 193086)
@@ -0,0 +1,19 @@
+diff -up qt-x11-free-3.3.8/src/sql/drivers/odbc/qsql_odbc.cpp.orig qt-x11-free-3.3.8/src/sql/drivers/odbc/qsql_odbc.cpp
+--- qt-x11-free-3.3.8/src/sql/drivers/odbc/qsql_odbc.cpp.orig	2009-02-24 11:32:27.000000000 +0100
++++ qt-x11-free-3.3.8/src/sql/drivers/odbc/qsql_odbc.cpp	2009-02-24 11:33:43.000000000 +0100
+@@ -57,13 +57,13 @@
+ #endif
+ 
+ // newer platform SDKs use SQLLEN instead of SQLINTEGER
+-#ifdef SQLLEN
++#if defined(SQLLEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX)
+ # define QSQLLEN SQLLEN
+ #else
+ # define QSQLLEN SQLINTEGER
+ #endif
+ 
+-#ifdef SQLULEN
++#if defined(SQLULEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX)
+ # define QSQLULEN SQLULEN
+ #else
+ # define QSQLULEN SQLUINTEGER

Copied: qt3/repos/staging-x86_64/qt-patches.tar.bz2 (from rev 193085, qt3/trunk/qt-patches.tar.bz2)
===================================================================
(Binary files differ)

Copied: qt3/repos/staging-x86_64/qt3-png15.patch (from rev 193085, qt3/trunk/qt3-png15.patch)
===================================================================
--- staging-x86_64/qt3-png15.patch	                        (rev 0)
+++ staging-x86_64/qt3-png15.patch	2013-08-15 21:57:49 UTC (rev 193086)
@@ -0,0 +1,212 @@
+$NetBSD: patch-as,v 1.5 2011/03/25 15:28:26 wiz Exp $
+
+--- src/kernel/qpngio.cpp.orig	2007-02-02 10:01:15.000000000 -0400
++++ src/kernel/qpngio.cpp
+@@ -43,6 +43,7 @@
+ #include "qiodevice.h"
+ 
+ #include <png.h>
++#include <zlib.h>
+ 
+ 
+ #ifdef Q_OS_TEMP
+@@ -123,9 +124,24 @@ void setup_qt( QImage& image, png_struct
+     png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
+ 	0, 0, 0);
+ 
++    png_colorp info_ptr_palette = NULL;
++    int info_ptr_num_palette = 0;
++    if (png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)) {
++	png_get_PLTE(png_ptr, info_ptr, &info_ptr_palette, &info_ptr_num_palette);
++    }
++
++    png_bytep info_ptr_trans_alpha = NULL;
++    int info_ptr_num_trans = 0;
++    png_color_16p info_ptr_trans_color = NULL;
++
++    if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
++	png_get_tRNS(png_ptr, info_ptr, &info_ptr_trans_alpha, &info_ptr_num_trans, &info_ptr_trans_color);
++    }
++
++
+     if ( color_type == PNG_COLOR_TYPE_GRAY ) {
+ 	// Black & White or 8-bit grayscale
+-	if ( bit_depth == 1 && info_ptr->channels == 1 ) {
++	if ( bit_depth == 1 && png_get_channels(png_ptr, info_ptr) == 1 ) {
+ 	    png_set_invert_mono( png_ptr );
+ 	    png_read_update_info( png_ptr, info_ptr );
+ 	    if (!image.create( width, height, 1, 2, QImage::BigEndian ))
+@@ -159,7 +175,7 @@ void setup_qt( QImage& image, png_struct
+ 		image.setColor( i, qRgba(c,c,c,0xff) );
+ 	    }
+ 	    if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
+-		const int g = info_ptr->trans_values.gray;
++		const int g = info_ptr_trans_color->gray;
+ 		if (g < ncols) {
+ 		    image.setAlphaBuffer(TRUE);
+ 		    image.setColor(g, image.color(g) & RGB_MASK);
+@@ -168,7 +184,7 @@ void setup_qt( QImage& image, png_struct
+ 	}
+     } else if ( color_type == PNG_COLOR_TYPE_PALETTE
+      && png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)
+-     && info_ptr->num_palette <= 256 )
++     && info_ptr_num_palette <= 256 )
+     {
+ 	// 1-bit and 8-bit color
+ 	if ( bit_depth != 1 )
+@@ -176,28 +192,28 @@ void setup_qt( QImage& image, png_struct
+ 	png_read_update_info( png_ptr, info_ptr );
+ 	png_get_IHDR(png_ptr, info_ptr,
+ 	    &width, &height, &bit_depth, &color_type, 0, 0, 0);
+-	if (!image.create(width, height, bit_depth, info_ptr->num_palette,
++	if (!image.create(width, height, bit_depth, info_ptr_num_palette,
+ 	    QImage::BigEndian))
+ 	    return;
+ 	int i = 0;
+ 	if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
+ 	    image.setAlphaBuffer( TRUE );
+-	    while ( i < info_ptr->num_trans ) {
++	    while ( i < info_ptr_num_trans ) {
+ 		image.setColor(i, qRgba(
+-		    info_ptr->palette[i].red,
+-		    info_ptr->palette[i].green,
+-		    info_ptr->palette[i].blue,
+-		    info_ptr->trans[i]
++		    info_ptr_palette[i].red,
++		    info_ptr_palette[i].green,
++		    info_ptr_palette[i].blue,
++		    info_ptr_trans_alpha[i]
+ 		    )
+ 		);
+ 		i++;
+ 	    }
+ 	}
+-	while ( i < info_ptr->num_palette ) {
++	while ( i < info_ptr_num_palette ) {
+ 	    image.setColor(i, qRgba(
+-		info_ptr->palette[i].red,
+-		info_ptr->palette[i].green,
+-		info_ptr->palette[i].blue,
++		info_ptr_palette[i].red,
++		info_ptr_palette[i].green,
++		info_ptr_palette[i].blue,
+ 		0xff
+ 		)
+ 	    );
+@@ -284,7 +300,7 @@ void read_png_image(QImageIO* iio)
+ 	return;
+     }
+ 
+-    if (setjmp(png_ptr->jmpbuf)) {
++    if (setjmp(png_jmpbuf(png_ptr))) {
+ 	png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+ 	iio->setStatus(-4);
+ 	return;
+@@ -469,7 +485,7 @@ bool QPNGImageWriter::writeImage(const Q
+ 	return FALSE;
+     }
+ 
+-    if (setjmp(png_ptr->jmpbuf)) {
++    if (setjmp(png_jmpbuf(png_ptr))) {
+ 	png_destroy_write_struct(&png_ptr, &info_ptr);
+ 	return FALSE;
+     }
+@@ -491,10 +507,16 @@ bool QPNGImageWriter::writeImage(const Q
+ 
+     png_set_write_fn(png_ptr, (void*)this, qpiw_write_fn, qpiw_flush_fn);
+ 
++#warning XXXtnn not too sure about this
++/* 
++according to png.h, channels is only used on read, not writes, so we
++should be able to comment this out.
++
+     info_ptr->channels =
+ 	(image.depth() == 32)
+ 	    ? (image.hasAlphaBuffer() ? 4 : 3)
+ 	    : 1;
++*/
+ 
+     png_set_IHDR(png_ptr, info_ptr, image.width(), image.height(),
+ 	image.depth() == 1 ? 1 : 8 /* per channel */,
+@@ -504,11 +526,12 @@ bool QPNGImageWriter::writeImage(const Q
+ 		: PNG_COLOR_TYPE_RGB
+ 	    : PNG_COLOR_TYPE_PALETTE, 0, 0, 0);
+ 
++    png_color_8 sig_bit;
++    sig_bit.red = 8;
++    sig_bit.green = 8;
++    sig_bit.blue = 8;
++    png_set_sBIT(png_ptr, info_ptr, &sig_bit);
+ 
+-    //png_set_sBIT(png_ptr, info_ptr, 8);
+-    info_ptr->sig_bit.red = 8;
+-    info_ptr->sig_bit.green = 8;
+-    info_ptr->sig_bit.blue = 8;
+ 
+     if (image.depth() == 1 && image.bitOrder() == QImage::LittleEndian)
+        png_set_packswap(png_ptr);
+@@ -522,11 +545,14 @@ bool QPNGImageWriter::writeImage(const Q
+ 	png_set_PLTE(png_ptr, info_ptr, palette, num_palette);
+ 	int* trans = new int[num_palette];
+ 	int num_trans = 0;
++	png_colorp info_ptr_palette = NULL;
++	int tmp;
++	png_get_PLTE(png_ptr, info_ptr, &info_ptr_palette, &tmp);
+ 	for (int i=0; i<num_palette; i++) {
+ 	    QRgb rgb=image.color(i);
+-	    info_ptr->palette[i].red = qRed(rgb);
+-	    info_ptr->palette[i].green = qGreen(rgb);
+-	    info_ptr->palette[i].blue = qBlue(rgb);
++	    info_ptr_palette[i].red = qRed(rgb);
++	    info_ptr_palette[i].green = qGreen(rgb);
++	    info_ptr_palette[i].blue = qBlue(rgb);
+ 	    if (image.hasAlphaBuffer()) {
+ 		trans[i] = rgb >> 24;
+ 		if (trans[i] < 255) {
+@@ -534,6 +560,7 @@ bool QPNGImageWriter::writeImage(const Q
+ 		}
+ 	    }
+ 	}
++	png_set_PLTE(png_ptr, info_ptr, info_ptr_palette, num_palette);
+ 	if (num_trans) {
+ 	    copy_trans = new png_byte[num_trans];
+ 	    for (int i=0; i<num_trans; i++)
+@@ -544,7 +571,10 @@ bool QPNGImageWriter::writeImage(const Q
+     }
+ 
+     if ( image.hasAlphaBuffer() ) {
+-	info_ptr->sig_bit.alpha = 8;
++        png_color_8p sig_bit;
++        png_get_sBIT(png_ptr, info_ptr, &sig_bit);
++        sig_bit->alpha = 8;
++        png_set_sBIT(png_ptr, info_ptr, sig_bit);
+     }
+ 
+     // Swap ARGB to RGBA (normal PNG format) before saving on
+@@ -1030,7 +1060,7 @@ int QPNGFormat::decode(QImage& img, QIma
+ 	    return -1;
+ 	}
+ 
+-	if (setjmp((png_ptr)->jmpbuf)) {
++	if (setjmp(png_jmpbuf(png_ptr))) {
+ 	    png_destroy_read_struct(&png_ptr, &info_ptr, 0);
+ 	    image = 0;
+ 	    return -1;
+@@ -1057,7 +1087,7 @@ int QPNGFormat::decode(QImage& img, QIma
+ 
+     if ( !png_ptr ) return 0;
+ 
+-    if (setjmp(png_ptr->jmpbuf)) {
++    if (setjmp(png_jmpbuf(png_ptr))) {
+ 	png_destroy_read_struct(&png_ptr, &info_ptr, 0);
+ 	image = 0;
+ 	state = MovieStart;
+@@ -1117,7 +1147,7 @@ void QPNGFormat::end(png_structp png, pn
+     consumer->frameDone(QPoint(offx,offy),r);
+     consumer->end();
+     state = FrameStart;
+-    unused_data = (int)png->buffer_size; // Since libpng doesn't tell us
++    unused_data = png_process_data_pause(png, 0);
+ }
+ 
+ #ifdef PNG_USER_CHUNKS_SUPPORTED




More information about the arch-commits mailing list