[Pkg-kde-commits] rev 1670 - in trunk/packages/qt-x11-free/debian: . patches

Adeodato Simó adeodato at costa.debian.org
Sun Sep 4 22:42:33 UTC 2005


Author: adeodato
Date: 2005-09-04 22:42:32 +0000 (Sun, 04 Sep 2005)
New Revision: 1670

Added:
   trunk/packages/qt-x11-free/debian/patches/07_gcc4_workarounds_fixes_postscript.dpatch
Modified:
   trunk/packages/qt-x11-free/debian/changelog
Log:
Merged from Christopher:
  - patch to fix postscript.


Modified: trunk/packages/qt-x11-free/debian/changelog
===================================================================
--- trunk/packages/qt-x11-free/debian/changelog	2005-09-04 22:39:19 UTC (rev 1669)
+++ trunk/packages/qt-x11-free/debian/changelog	2005-09-04 22:42:32 UTC (rev 1670)
@@ -2,6 +2,10 @@
 
   +++ Changes by Christopher Martin:
 
+  * Add a patch fixing the generation of PostScript, which was broken due to
+    a flaw in the code that only manifested itself with the GCC 4.0
+    transition. This should fix printing in all Qt and KDE applications.
+
   * No longer build non-threaded libraries. (Closes: #180326)
     No package in the archive uses them, except a bogus qtdmm
     build-dependency (#326627).

Added: trunk/packages/qt-x11-free/debian/patches/07_gcc4_workarounds_fixes_postscript.dpatch
===================================================================
--- trunk/packages/qt-x11-free/debian/patches/07_gcc4_workarounds_fixes_postscript.dpatch	2005-09-04 22:39:19 UTC (rev 1669)
+++ trunk/packages/qt-x11-free/debian/patches/07_gcc4_workarounds_fixes_postscript.dpatch	2005-09-04 22:42:32 UTC (rev 1670)
@@ -0,0 +1,97 @@
+#! /bin/sh -e
+
+if [ $# -lt 1 ]; then
+    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+    -patch) patch -p1 ${patch_opts} < $0;;
+    -unpatch) patch -R -p1 ${patch_opts} < $0;;
+    *)
+        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+        exit 1;;
+esac
+
+exit 0
+
+ at DPATCH@
+--- qt.orig/src/tools/qlocale.cpp
++++ qt.orig/src/tools/qlocale.cpp
+@@ -72,6 +72,12 @@
+ #   define NAN DBL_QNAN
+ #endif
+ 
++#if (defined(Q_CC_GNU) && defined(Q_OS_WIN)) || __GNUC__ == 4 || defined(QT_QLOCALE_NEEDS_VOLATILE)
++#   define NEEDS_VOLATILE volatile
++#else
++#   define NEEDS_VOLATILE
++#endif
++
+ enum {
+     LittleEndian,
+     BigEndian
+@@ -4068,9 +4074,9 @@
+ #error Exactly one of IEEE_BIG_OR_LITTLE_ENDIAN, VAX, or IBM should be defined.
+ #endif
+ 
+-inline ULong getWord0(double x)
++inline ULong getWord0(const NEEDS_VOLATILE double x)
+ {
+-    uchar *ptr = (uchar *)&x;
++    const NEEDS_VOLATILE uchar *ptr = reinterpret_cast<const NEEDS_VOLATILE uchar *>(&x);
+     if (ByteOrder == BigEndian) {
+         return (ptr[0]<<24) + (ptr[1]<<16) + (ptr[2]<<8) + ptr[3];
+     } else {
+@@ -4078,9 +4084,9 @@
+     }
+ }
+ 
+-inline void setWord0(double *x, ULong l)
++inline void setWord0(NEEDS_VOLATILE double *x, ULong l)
+ {
+-    uchar *ptr = (uchar *)x;
++    NEEDS_VOLATILE uchar *ptr = reinterpret_cast<NEEDS_VOLATILE uchar *>(x);
+     if (ByteOrder == BigEndian) {
+         ptr[0] = (uchar)(l>>24);
+         ptr[1] = (uchar)(l>>16);
+@@ -4094,18 +4100,18 @@
+     }
+ }
+ 
+-inline ULong getWord1(double x)
++inline ULong getWord1(const NEEDS_VOLATILE double x)
+ {
+-    uchar *ptr = (uchar *)&x;
++    const NEEDS_VOLATILE uchar *ptr = reinterpret_cast<const NEEDS_VOLATILE uchar *>(&x);
+     if (ByteOrder == BigEndian) {
+         return (ptr[4]<<24) + (ptr[5]<<16) + (ptr[6]<<8) + ptr[7];
+     } else {
+         return (ptr[3]<<24) + (ptr[2]<<16) + (ptr[1]<<8) + ptr[0];
+     }
+ }
+-inline void setWord1(double *x, ULong l)
++inline void setWord1(NEEDS_VOLATILE double *x, ULong l)
+ {
+-    uchar *ptr = (uchar *)x;
++    NEEDS_VOLATILE uchar *ptr = reinterpret_cast<uchar NEEDS_VOLATILE *>(x);
+     if (ByteOrder == BigEndian) {
+         ptr[4] = (uchar)(l>>24);
+         ptr[5] = (uchar)(l>>16);
+@@ -5679,11 +5685,11 @@
+ #ifdef Q_OS_LINUX
+     fesetenv(&envp);
+ #endif
+-    
++
+     return s;
+ }
+ 
+-static char *_qdtoa( double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp)
++static char *_qdtoa( NEEDS_VOLATILE double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp)
+ {
+     /*
+       Arguments ndigits, decpt, sign are similar to those




More information about the pkg-kde-commits mailing list