From 587c3ab16750be27b461299257406ffacde676ee Mon Sep 17 00:00:00 2001 From: Kedar Sovani Date: Mon, 5 Jan 2009 10:55:52 +0530 Subject: [PATCH] Fix build problem on QT3 Signed-off-by: Lennert Buytenhek Signed-off-by: Kedar Sovani --- qt-x11-free-3.3.7-arm.patch | 25 +++++++++++++++++++++++++ qt3.spec | 8 +++++++- 2 files changed, 32 insertions(+), 1 deletions(-) create mode 100644 qt-x11-free-3.3.7-arm.patch diff --git a/qt-x11-free-3.3.7-arm.patch b/qt-x11-free-3.3.7-arm.patch new file mode 100644 index 0000000..0c93c41 --- /dev/null +++ b/qt-x11-free-3.3.7-arm.patch @@ -0,0 +1,25 @@ +--- qt-x11-free-3.3.7/src/tools/qglobal.h.orig 2007-04-24 09:02:36.000000000 -0400 ++++ qt-x11-free-3.3.7/src/tools/qglobal.h 2007-04-24 09:03:02.000000000 -0400 +@@ -315,9 +315,9 @@ + QString bloat. However, gcc 3.4 doesn't allow us to create references to + members of a packed struct. (Pointers are OK, because then you + supposedly know what you are doing.) */ +-# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) ++# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) && !defined(__ARM_EABI__) + # define Q_PACKED __attribute__ ((packed)) +-# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 ++# if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) + # define Q_NO_PACKED_REFERENCE + # endif + # endif +--- qt-x11-free-3.3.7/src/tools/qstring.h.orig 2007-04-24 09:03:11.000000000 -0400 ++++ qt-x11-free-3.3.7/src/tools/qstring.h 2007-04-24 09:03:27.000000000 -0400 +@@ -194,7 +194,7 @@ + char latin1() const { return ucs > 0xff ? 0 : (char) ucs; } + ushort unicode() const { return ucs; } + #ifdef Q_NO_PACKED_REFERENCE +- ushort &unicode() { return *(&ucs); } ++ ushort &unicode() { return *((ushort *)&ucs); } + #else + ushort &unicode() { return ucs; } + #endif diff --git a/qt3.spec b/qt3.spec index dcff5f1..67c71f9 100644 --- a/qt3.spec +++ b/qt3.spec @@ -2,7 +2,7 @@ Summary: The shared library for the Qt 3 GUI toolkit Version: 3.3.8b -Release: 17%{?dist} +Release: 17%{?dist}.fa1 %if 0%{?fedora} > 8 Name: qt3 Obsoletes: qt < 1:%{version}-%{release} @@ -68,6 +68,9 @@ Patch110: 0084-compositing-properties.patch Patch200: qt-x11-free-3.3.4-fullscreen.patch Patch201: qt-x11-free-3.3.8b-gcc43.patch +# arm patches +Patch300: qt-x11-free-3.3.7-arm.patch + %define qt_dirname qt-3.3 %define qtdir %{_libdir}/%{qt_dirname} %define qt_docdir %{_docdir}/qt-devel-%{version} @@ -368,6 +371,9 @@ for the Qt 3 toolkit. %patch200 -p1 -b .fullscreen %patch201 -p1 -b .gcc34 +# arm patches +%patch300 -p1 -b .arm + # convert to UTF-8 iconv -f iso-8859-1 -t utf-8 < doc/man/man3/qdial.3qt > doc/man/man3/qdial.3qt_ mv doc/man/man3/qdial.3qt_ doc/man/man3/qdial.3qt -- 1.5.3.3