diff options
-rw-r--r-- | libraries/qt4/README | 34 | ||||
-rw-r--r-- | libraries/qt4/doinst.sh | 5 | ||||
-rw-r--r-- | libraries/qt4/patches/0180-window-role.diff | 101 | ||||
-rw-r--r-- | libraries/qt4/patches/0195-compositing-properties.diff | 58 | ||||
-rw-r--r-- | libraries/qt4/patches/0225-invalidate-tabbar-geometry-on-refresh.patch | 35 | ||||
-rw-r--r-- | libraries/qt4/patches/0234-fix-mysql-threaded.diff | 32 | ||||
-rw-r--r-- | libraries/qt4/patches/0255-qtreeview-selection-columns-hidden.diff | 44 | ||||
-rw-r--r-- | libraries/qt4/patches/0274-shm-native-image-fix.diff | 97 | ||||
-rw-r--r-- | libraries/qt4/patches/0279-svg-rendering-regression.diff | 26 | ||||
-rw-r--r-- | libraries/qt4/patches/0280-deserialization-custom-dbus-properties.diff | 47 | ||||
-rw-r--r-- | libraries/qt4/patches/qt.mysql.h.diff | 12 | ||||
-rw-r--r-- | libraries/qt4/patches/qt.x86.cflags.diff | 11 | ||||
-rw-r--r-- | libraries/qt4/qt4.SlackBuild | 89 | ||||
-rw-r--r-- | libraries/qt4/qt4.info | 12 | ||||
-rw-r--r-- | libraries/qt4/slack-desc | 2 |
15 files changed, 572 insertions, 33 deletions
diff --git a/libraries/qt4/README b/libraries/qt4/README index a1e81039de..9cf3d0d63b 100644 --- a/libraries/qt4/README +++ b/libraries/qt4/README @@ -2,13 +2,37 @@ Qt 4 is a comprehensive, object-oriented development framework that enables development of high-performance, cross-platform rich-client and server-side applications. When you implement a program with Qt, you can run it on the X Window System (Unix/X11), Apple Mac OS X, and -Microsoft Windows NT/9x/2000/XP by simply compiling the source code -for the platform you want. Qt is the basis for the KDE desktop -environment, and is also used in numerous commercial applications. +Microsoft Windows NT/9x/2000/XP by simply compiling the source code for +the platform you want. Qt is the basis for the KDE desktop environment, +and is also used in numerous commercial applications. This Qt 4 package is created to enable co-existence with Slackware native Qt 3 package; developers should only remember to use versions with "-qt4" suffix (like "qmake-qt4", "assistant-qt4", "designer-qt4", etc.) of programs that exist under same names in Qt 3 (and developers -using CMake should be fine without any additional action, because -stock CMake is already looking for "qmake-qt4" first). +using CMake should be fine without any additional action, because stock +CMake is already looking for "qmake-qt4" first). + +Qt 4.5 comes with a new graphicssystem backend named "raster" which +outperforms the current standard one, but is not yet set as standard +because it might not work with all Qt4 applications out there currently. +You can set it as standard by passing RASTER=yes to the script. +Alternatively you can also set it on runtime for each application (if you +start it from the command line). Tests have shown that "normal" Qt4 apps +work well with it, whereas KDE 4.2 does not. + +Further you can enable the patches kde has included in its qt-copy +tree by passing QTCOPY=yes to the script. This fixes some issues which +make Qt apps nicer to use in kde(4). Descriptions of the individual +patches are available in the respective diff or patch files. If you +want to additionally *not* build with support for Phonon (as does qt in +Slackware-current at the moment), you can pass PHONON=no to the script. + +WARNING: This requires *a lot* of harddisk space available on build time. +Be sure to have at least 2GB of free diskspace. + +WARNING: Do not use upgradepkg to to upgrade from qt4-4.4.3 or earlier. +You should remove the old one and use installpkg for qt4 >= 4.5.0 in +that case. If you (accidentally or otherwise) ignore this advice, you +can safely remove any broken links in / and rm -rf /usr/lib/qt-4.4.3 +afterward :-) diff --git a/libraries/qt4/doinst.sh b/libraries/qt4/doinst.sh index 4e56cbc8cf..d0fc12b68f 100644 --- a/libraries/qt4/doinst.sh +++ b/libraries/qt4/doinst.sh @@ -1,5 +1,4 @@ -if ! grep -q /usr/lib/qt4/lib etc/ld.so.conf ; then - echo "/usr/lib/qt4/lib" >> etc/ld.so.conf +if [ -x sbin/ldconfig ]; then + chroot . /sbin/ldconfig 2> /dev/null fi -chroot . /sbin/ldconfig 2> /dev/null diff --git a/libraries/qt4/patches/0180-window-role.diff b/libraries/qt4/patches/0180-window-role.diff new file mode 100644 index 0000000000..687e11cb11 --- /dev/null +++ b/libraries/qt4/patches/0180-window-role.diff @@ -0,0 +1,101 @@ +qt-bugs@ issue : 167704 +Trolltech task ID : 168283 (status: "fixed" for Qt 4.4.0, but effectively refused) +bugs.kde.org number : none +applied: no +author: Lubos Lunak <l.lunak@kde.org> + +NOTE: It is suggested to apply patch #0209 as well when this patch is used. + +This patch uses object name as a fallback for window role if no window role +is set explicitly using setWindowRole(). Since Qt3 always used the object +name as the window role and most Qt3/KDE3 code is ported to call setObjectName(), +this makes the window role set in many cases (which KWin uses for window identifying). + + +--- src/corelib/kernel/qobject.cpp.sav 2008-02-22 09:03:40.000000000 +0100 ++++ src/corelib/kernel/qobject.cpp 2008-02-23 16:15:51.000000000 +0100 +@@ -1016,9 +1016,18 @@ void QObject::setObjectName(const QStrin + { + Q_D(QObject); + d->objectName = name; ++#if defined(Q_WS_X11) ++ d->checkWindowRole(); ++#endif + } + + ++#if defined(Q_WS_X11) ++void QObjectPrivate::checkWindowRole() ++{ ++} ++#endif ++ + #ifdef QT3_SUPPORT + /*! \internal + QObject::child is compat but needs to call itself recursively, +--- src/corelib/kernel/qobject_p.h.sav 2008-02-22 09:23:44.000000000 +0100 ++++ src/corelib/kernel/qobject_p.h 2008-02-23 16:16:46.000000000 +0100 +@@ -148,6 +148,9 @@ public: + mutable quint32 connectedSignals; + + QString objectName; ++#if defined(Q_WS_X11) ++ virtual void checkWindowRole(); ++#endif + + // Note: you must hold the signalSlotLock() before accessing the lists below or calling the functions + struct Connection +--- src/gui/kernel/qwidget_p.h.sav 2008-02-22 09:04:04.000000000 +0100 ++++ src/gui/kernel/qwidget_p.h 2008-02-23 16:17:07.000000000 +0100 +@@ -324,6 +324,7 @@ public: + + #if defined(Q_WS_X11) + void setWindowRole(); ++ virtual void checkWindowRole(); + void sendStartupMessage(const char *message) const; + void setNetWmWindowTypes(); + #endif +--- src/gui/kernel/qwidget_x11.cpp.sav 2008-02-23 15:28:47.000000000 +0100 ++++ src/gui/kernel/qwidget_x11.cpp 2008-02-23 16:31:47.000000000 +0100 +@@ -710,13 +710,17 @@ void QWidgetPrivate::create_sys(WId wind + + + // declare the widget's window role ++ QByteArray windowRole; + if (QTLWExtra *topData = maybeTopData()) { +- if (!topData->role.isEmpty()) { +- QByteArray windowRole = topData->role.toUtf8(); +- XChangeProperty(dpy, id, +- ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace, +- (unsigned char *)windowRole.constData(), windowRole.length()); +- } ++ if (!topData->role.isEmpty()) ++ windowRole = topData->role.toUtf8(); ++ } ++ if (windowRole.isEmpty()) // use object name as a fallback ++ windowRole = objectName.toUtf8(); ++ if (!windowRole.isEmpty()) { ++ XChangeProperty(dpy, id, ++ ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace, ++ (unsigned char *)windowRole.constData(), windowRole.length()); + } + + // set client leader property +@@ -2852,6 +2856,17 @@ void QWidgetPrivate::setWindowRole() + (unsigned char *)windowRole.constData(), windowRole.length()); + } + ++void QWidgetPrivate::checkWindowRole() ++{ ++ Q_Q(QWidget); ++ if( !q->windowRole().isEmpty() || !q->internalWinId()) ++ return; ++ QByteArray windowRole = objectName.toUtf8(); // use as a fallback ++ XChangeProperty(X11->display, q->internalWinId(), ++ ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace, ++ (unsigned char *)windowRole.constData(), windowRole.length()); ++} ++ + Q_GLOBAL_STATIC(QX11PaintEngine, qt_widget_paintengine) + QPaintEngine *QWidget::paintEngine() const + { diff --git a/libraries/qt4/patches/0195-compositing-properties.diff b/libraries/qt4/patches/0195-compositing-properties.diff new file mode 100644 index 0000000000..979df94366 --- /dev/null +++ b/libraries/qt4/patches/0195-compositing-properties.diff @@ -0,0 +1,58 @@ +qt-bugs@ issue : none +bugs.kde.org number : none +applied: no +author: Lubos Lunak <l.lunak@kde.org> + +This patch makes override-redirect windows (popup menu, dropdown menu, +tooltip, combobox, etc.) also have more window properties like WM_CLASS, +so they can be used when compositing. + +--- src/gui/kernel/qwidget_x11.cpp ++++ src/gui/kernel/qwidget_x11.cpp +@@ -637,6 +637,11 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO + Q_ASSERT(id); + XChangeWindowAttributes(dpy, id, CWOverrideRedirect | CWSaveUnder, + &wsa); ++ XClassHint class_hint; ++ QByteArray appName = qAppName().toLatin1(); ++ class_hint.res_name = appName.data(); // application name ++ class_hint.res_class = const_cast<char *>(QX11Info::appClass()); // application class ++ XSetWMProperties(dpy, id, 0, 0, 0, 0, 0, 0, &class_hint); + } else if (topLevel && !desktop) { // top-level widget + if (!X11->wm_client_leader) + create_wm_client_leader(); +@@ -685,13 +690,21 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO + // set EWMH window types + setNetWmWindowTypes(); + ++ // when we create a toplevel widget, the frame strut should be dirty ++ data.fstrut_dirty = 1; ++ ++ } else { ++ // non-toplevel widgets don't have a frame, so no need to ++ // update the strut ++ data.fstrut_dirty = 0; ++ } ++ ++ if (initializeWindow && (popup || (topLevel && !desktop))) { // properties set on all toplevel windows + // set _NET_WM_PID + long curr_pid = getpid(); + XChangeProperty(dpy, id, ATOM(_NET_WM_PID), XA_CARDINAL, 32, PropModeReplace, + (unsigned char *) &curr_pid, 1); + +- // when we create a toplevel widget, the frame strut should be dirty +- data.fstrut_dirty = 1; + + // declare the widget's window role + if (QTLWExtra *topData = maybeTopData()) { +@@ -707,10 +720,6 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO + XChangeProperty(dpy, id, ATOM(WM_CLIENT_LEADER), + XA_WINDOW, 32, PropModeReplace, + (unsigned char *)&X11->wm_client_leader, 1); +- } else { +- // non-toplevel widgets don't have a frame, so no need to +- // update the strut +- data.fstrut_dirty = 0; + } + + if (initializeWindow && q->internalWinId()) { diff --git a/libraries/qt4/patches/0225-invalidate-tabbar-geometry-on-refresh.patch b/libraries/qt4/patches/0225-invalidate-tabbar-geometry-on-refresh.patch new file mode 100644 index 0000000000..49daca322f --- /dev/null +++ b/libraries/qt4/patches/0225-invalidate-tabbar-geometry-on-refresh.patch @@ -0,0 +1,35 @@ +qt-bugs@ issue : 208185 +Trolltech task ID : 208349 +bugs.kde.org number : 159014 +applied: no +author: Robert Knight <robertknight@gmail.com> + +When tabs are inserted or removed in a QTabBar, QTabBarPrivate::refresh() +is called to update the layout. If the tabbar widget is hidden, this +just sets a boolean variable (layoutDirty) and returns, so the parent widget's layout +is not notified about the possible geometry change. + +Prior to Qt 4.4 this was not a problem because the geometry was recalculated +in QTabBar::sizeHint() if the layoutDirty variable was set. In Qt 4.4 however the layout +caches size hint information in QWidgetItemV2. Since the cache information is not invalidated, +the layout may end up using out-of-date size hint information to compute the widget size. + +If the QTabBar is empty when QTabBar::sizeHint() is called, it will return a size with a height +of 0, which will be kept in the cache and so the tab bar will never be shown. + +This patch fixes the problem by calling updateGeometry() whenever the tab bar's layout is refreshed. + +Index: src/gui/widgets/qtabbar.cpp +=================================================================== +--- src/gui/widgets/qtabbar.cpp (revision 796858) ++++ src/gui/widgets/qtabbar.cpp (working copy) +@@ -533,8 +533,8 @@ + layoutTabs(); + makeVisible(currentIndex); + q->update(); +- q->updateGeometry(); + } ++ q->updateGeometry(); + } + + /*! diff --git a/libraries/qt4/patches/0234-fix-mysql-threaded.diff b/libraries/qt4/patches/0234-fix-mysql-threaded.diff new file mode 100644 index 0000000000..4c5b6136b8 --- /dev/null +++ b/libraries/qt4/patches/0234-fix-mysql-threaded.diff @@ -0,0 +1,32 @@ +qt-bugs@ issue : N217716 +Trolltech task ID : 217788 +bugs.kde.org number : no report +applied: no +author: Tobias Koenig <tokoe@kde.org> + +This patch will fix the handling of connections to +mysql server in a multithreaded environment + +--- src/sql/drivers/mysql/qsql_mysql.cpp (revision 804421) ++++ src/sql/drivers/mysql/qsql_mysql.cpp (working copy) +@@ -1215,6 +1215,10 @@ + d->preparedQuerysEnabled = false; + #endif + ++#ifndef QT_NO_THREAD ++ mysql_thread_init(); ++#endif ++ + setOpen(true); + setOpenError(false); + return true; +@@ -1223,6 +1227,9 @@ + void QMYSQLDriver::close() + { + if (isOpen()) { ++#ifndef QT_NO_THREAD ++ mysql_thread_end(); ++#endif + mysql_close(d->mysql); + setOpen(false); + setOpenError(false); diff --git a/libraries/qt4/patches/0255-qtreeview-selection-columns-hidden.diff b/libraries/qt4/patches/0255-qtreeview-selection-columns-hidden.diff new file mode 100644 index 0000000000..08677af633 --- /dev/null +++ b/libraries/qt4/patches/0255-qtreeview-selection-columns-hidden.diff @@ -0,0 +1,44 @@ +qt-bugs@ issue : N232819 +Trolltech task ID : 232831 +applied: no +author: Rafael Fernández López <ereslibre@kde.org> + +In a treeview with columns like this: + +Column 1 | Column 2 | ... | Column k | ... | Column n + +When selecting with rubberband (by clicking on the blank part of the viewport) while Column k is +hidden, you get double items on the selection model, when asking for selection(). This is becase +ranges are incorrectly calculated when there are hidden columns. A way to reproduce: + +Column 1 | Column 2 | Column 4 (Column 3 is hidden) + item + item + item + x <- press button here and move it up to select items (on this same column) + +If you do like this: + +Column 1 | Column 2 | Column 4 (Column 3 is hidden) + item + item + item + x <- press button here and move it up + +you won't be able to reproduce, since you need the hidden column to be between the one you click and +the last one. The reason is that columnRanges returns two ranges when there is supposed to return 1 +range (even when there are hidden columns). + +diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp +index d5ca633..b7975be 100644 +--- src/gui/itemviews/qtreeview.cpp ++++ src/gui/itemviews/qtreeview.cpp +@@ -3494,7 +3494,7 @@ + current.first = -2; // -1 is not enough because -1+1 = 0 + current.second = -2; + foreach (int logicalColumn, logicalIndexes) { +- if (current.second + 1 != logicalColumn) { ++ if (current.second + 1 != logicalColumn && !header->isSectionHidden(current.second + 1)) { + if (current.first != -2) { + //let's save the current one + ret += current; diff --git a/libraries/qt4/patches/0274-shm-native-image-fix.diff b/libraries/qt4/patches/0274-shm-native-image-fix.diff new file mode 100644 index 0000000000..0ea21467a4 --- /dev/null +++ b/libraries/qt4/patches/0274-shm-native-image-fix.diff @@ -0,0 +1,97 @@ +qt-bugs@ issue : none +Qt Software task ID : none +bugs.kde.org number : none +applied: no +author: Fredrik Höglund <fredrik@kde.org> + +This patch makes the raster graphics system use shared images instead +of shared pixmaps. + +Shared memory pixmaps are deprecated since they are slower than shared +images with modern graphics hardware. They are also not supported by EXA +drivers and can be disabled in the latest version of the NVidia driver. + +Index: src/gui/kernel/qapplication_x11.cpp +=================================================================== +--- src/gui/kernel/qapplication_x11.cpp (revision 934506) ++++ src/gui/kernel/qapplication_x11.cpp (working copy) +@@ -1943,7 +1943,7 @@ void qt_init(QApplicationPrivate *priv, + // to determine whether the display is local or not (not 100 % accurate) + bool local = displayName.isEmpty() || displayName.lastIndexOf(QLatin1Char(':')) == 0; + if (local && (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)) +- X11->use_mitshm = mitshm_pixmaps; ++ X11->use_mitshm = true; + } + #endif // QT_NO_MITSHM + +Index: src/gui/image/qnativeimage_p.h +=================================================================== +--- src/gui/image/qnativeimage_p.h (revision 930645) ++++ src/gui/image/qnativeimage_p.h (working copy) +@@ -85,7 +85,6 @@ + + #elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM) + XImage *xshmimg; +- Pixmap xshmpm; + XShmSegmentInfo xshminfo; + + #elif defined(Q_WS_MAC) +Index: src/gui/image/qnativeimage.cpp +=================================================================== +--- src/gui/image/qnativeimage.cpp (revision 930645) ++++ src/gui/image/qnativeimage.cpp (working copy) +@@ -140,7 +140,6 @@ + { + if (!X11->use_mitshm) { + xshmimg = 0; +- xshmpm = 0; + image = QImage(width, height, format); + return; + } +@@ -184,11 +183,6 @@ + shmctl(xshminfo.shmid, IPC_RMID, 0); + return; + } +- xshmpm = XShmCreatePixmap(X11->display, DefaultRootWindow(X11->display), xshmimg->data, +- &xshminfo, width, height, dd); +- if (!xshmpm) { +- qWarning() << "QNativeImage: Unable to create shared Pixmap."; +- } + } + + +@@ -197,10 +191,6 @@ + if (!xshmimg) + return; + +- if (xshmpm) { +- XFreePixmap(X11->display, xshmpm); +- xshmpm = 0; +- } + XShmDetach(X11->display, &xshminfo); + xshmimg->data = 0; + XDestroyImage(xshmimg); +Index: src/gui/painting/qwindowsurface_raster.cpp +=================================================================== +--- src/gui/painting/qwindowsurface_raster.cpp (revision 930645) ++++ src/gui/painting/qwindowsurface_raster.cpp (working copy) +@@ -228,9 +228,16 @@ + + QRect br = rgn.boundingRect().translated(offset); + #ifndef QT_NO_MITSHM +- if (d_ptr->image->xshmpm) { +- XCopyArea(X11->display, d_ptr->image->xshmpm, widget->handle(), d_ptr->gc, +- br.x(), br.y(), br.width(), br.height(), wbr.x(), wbr.y()); ++ if (d_ptr->image->xshmimg && (br.width() * br.height() > 65536)) { ++ const QImage &src = d->image->image; ++ br = br.intersected(src.rect()); ++ // Hack to make sure we satisify the PutImage() constraints in the X server, ++ // since the doShmPutImage() route currently forces a migration to system ram. ++ wbr.setX(wbr.x() - br.x()); ++ br.setX(0); ++ br.setWidth(src.width()); ++ XShmPutImage(X11->display, widget->handle(), d_ptr->gc, d_ptr->image->xshmimg, ++ br.x(), br.y(), wbr.x(), wbr.y(), br.width(), br.height(), False); + XSync(X11->display, False); + } else + #endif diff --git a/libraries/qt4/patches/0279-svg-rendering-regression.diff b/libraries/qt4/patches/0279-svg-rendering-regression.diff new file mode 100644 index 0000000000..0ce074eb32 --- /dev/null +++ b/libraries/qt4/patches/0279-svg-rendering-regression.diff @@ -0,0 +1,26 @@ +qt-bugs@ issue : none (not yet) +Qt Software task ID : none (not yet) +bugs.kde.org number : 190485 (at least) +applied: no +author: Alexis Menard <alexis.menard@nokia.com> + +This patch fix the regression introduced in 4.5.1 with SVG rendering. +The problem appear when a gradient reference an another gradient which is after +in the svg. + +Please clear your plasma cache as well. + +This patch is already in 4.5 branch so it will be in 4.5.2. + +Index: src/svg/qsvgstyle.cpp +=================================================================== +--- src/svg/qsvgstyle.cpp (revision 958572) ++++ src/svg/qsvgstyle.cpp (working copy) +@@ -808,6 +808,7 @@ + static_cast<QSvgGradientStyle*>(prop); + st->resolveStops(); + m_gradient->setStops(st->qgradient()->stops()); ++ m_gradientStopsSet = st->gradientStopsSet(); + } + } + m_link = QString(); diff --git a/libraries/qt4/patches/0280-deserialization-custom-dbus-properties.diff b/libraries/qt4/patches/0280-deserialization-custom-dbus-properties.diff new file mode 100644 index 0000000000..7de633d1e2 --- /dev/null +++ b/libraries/qt4/patches/0280-deserialization-custom-dbus-properties.diff @@ -0,0 +1,47 @@ +qt-bugs@ issue : N240326 +Qt Software task ID : 240608 +bugs.kde.org number : none +applied: no +author: George Goldberg <grundleborg@googlemail.com> + +This patch fixes deserialization of values with custom types when setting +properties on dbus adaptors. It is needed, in particular by telepathy/Qt +programs and libraries. The bug was reported to Nokia on 2009-01-07 along +with the patch supplied here. The summary of the issue from the Qt +Software task tracker follows: + +When calling the setter for a DBus property, if that property has a custom type +(e.g. a struct with dbus type (uss)), QtDBus fails to demarshall the +QDBusArgument before attempting to set the property on the adaptor. The result +is that it attempts to call adaptor->setProperty() with a QDBusArgument of type +"uss" instead of with the type of the custom struct. + +Index: src/dbus/qdbusinternalfilters.cpp +=================================================================== +--- src/dbus/qdbusinternalfilters.cpp (revision 960506) ++++ src/dbus/qdbusinternalfilters.cpp (working copy) +@@ -274,9 +274,23 @@ + QDBusAdaptorConnector::AdaptorMap::ConstIterator it; + it = qLowerBound(connector->adaptors.constBegin(), connector->adaptors.constEnd(), + interface_name); +- if (it != connector->adaptors.end() && interface_name == QLatin1String(it->interface)) ++ if (it != connector->adaptors.end() && interface_name == QLatin1String(it->interface)) { ++ if (value.userType() == qMetaTypeId<QDBusArgument>()) { ++ QDBusArgument valueArg = qvariant_cast<QDBusArgument>(value); ++ if (valueArg.currentType() != -1) { ++ int mid = it->adaptor->metaObject()->property(it->adaptor->metaObject()->indexOfProperty(property_name)).userType(); ++ void *null = 0; ++ QVariant valueStore(mid, null); ++ QDBusMetaType::demarshall(valueArg, mid, valueStore.data()); ++ ++ if (it->adaptor->setProperty(property_name, valueStore)) ++ return msg.createReply(); ++ } ++ } ++ + if (it->adaptor->setProperty(property_name, value)) + return msg.createReply(); ++ } + } + } + diff --git a/libraries/qt4/patches/qt.mysql.h.diff b/libraries/qt4/patches/qt.mysql.h.diff new file mode 100644 index 0000000000..7a41be5911 --- /dev/null +++ b/libraries/qt4/patches/qt.mysql.h.diff @@ -0,0 +1,12 @@ +diff -Nur qt-x11-opensource-src-4.3.4.orig/src/sql/drivers/mysql/qsql_mysql.h qt-x11-opensource-src-4.3.4/src/sql/drivers/mysql/qsql_mysql.h +--- qt-x11-opensource-src-4.3.4.orig/src/sql/drivers/mysql/qsql_mysql.h 2008-04-02 20:52:11.739343004 -0500 ++++ qt-x11-opensource-src-4.3.4/src/sql/drivers/mysql/qsql_mysql.h 2008-04-02 20:52:05.970610574 -0500 +@@ -51,7 +51,7 @@ + #include <QtCore/qt_windows.h> + #endif + +-#include <mysql.h> ++#include <mysql/mysql.h> + + #ifdef QT_PLUGIN + #define Q_EXPORT_SQLDRIVER_MYSQL diff --git a/libraries/qt4/patches/qt.x86.cflags.diff b/libraries/qt4/patches/qt.x86.cflags.diff new file mode 100644 index 0000000000..a9e65fbb84 --- /dev/null +++ b/libraries/qt4/patches/qt.x86.cflags.diff @@ -0,0 +1,11 @@ +--- qt.orig/mkspecs/common/g++.conf 2007-12-22 00:22:18.295453075 -0600 ++++ qt/mkspecs/common/g++.conf 2007-12-22 00:23:07.514257895 -0600 +@@ -7,7 +7,7 @@ + QMAKE_CFLAGS_DEPS += -M + QMAKE_CFLAGS_WARN_ON += -Wall -W + QMAKE_CFLAGS_WARN_OFF += -w +-QMAKE_CFLAGS_RELEASE += -O2 ++QMAKE_CFLAGS_RELEASE += -O2 -march=i486 -mtune=i686 + QMAKE_CFLAGS_DEBUG += -g + QMAKE_CFLAGS_SHLIB += -fPIC + QMAKE_CFLAGS_STATIC_LIB += -fPIC diff --git a/libraries/qt4/qt4.SlackBuild b/libraries/qt4/qt4.SlackBuild index 0b3a335db5..5553199033 100644 --- a/libraries/qt4/qt4.SlackBuild +++ b/libraries/qt4/qt4.SlackBuild @@ -3,9 +3,10 @@ # Slackware build script for Qt 4 # Written by Aleksandar Samardzic <asamardzic@gmail.com> # Modified by Robby Workman <rworkman@slackbuilds.org> +# Modified by Heinz Wiesinger <pprkut@liwjatan.at> PRGNAM=qt4 -VERSION=${VERSION:-4.4.3} +VERSION=${VERSION:-4.5.1} ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -23,13 +24,25 @@ elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" fi +if [ "${RASTER:-no}" = "no" ]; then + GRAPHICS="" +else + GRAPHICS="-graphicssystem raster" +fi + +if [ "${PHONON:-yes}" = "yes" ]; then + MEDIA="-phonon" +else + MEDIA="-no-phonon" +fi + set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf qt-x11-opensource-src-$VERSION -tar xvf $CWD/qt-x11-opensource-src-$VERSION.tar.gz +tar xvf $CWD/qt-x11-opensource-src-$VERSION.tar.bz2 cd qt-x11-opensource-src-$VERSION chown -R root:root . find . \ @@ -38,48 +51,88 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +if ! [ "${QTCOPY:-no}" = "no" ]; then + patch -p0 -i $CWD/patches/0180-window-role.diff + patch -p0 -i $CWD/patches/0195-compositing-properties.diff + patch -p0 -i $CWD/patches/0225-invalidate-tabbar-geometry-on-refresh.patch + patch -p0 -i $CWD/patches/0234-fix-mysql-threaded.diff + patch -p0 -i $CWD/patches/0255-qtreeview-selection-columns-hidden.diff + patch -p0 -i $CWD/patches/0274-shm-native-image-fix.diff + patch -p0 -i $CWD/patches/0279-svg-rendering-regression.diff + patch -p0 -i $CWD/patches/0280-deserialization-custom-dbus-properties.diff +fi + +# The following two patches are taken from the qt.SlackBuild in -current +if [ $ARCH = "i486" ]; then + patch -p1 -i $CWD/patches/qt.x86.cflags.diff +fi + +# Fix path to mysql header +patch -p1 -i $CWD/patches/qt.mysql.h.diff + export CFLAGS="$SLKCFLAGS" export CXXFLAGS="$SLKCFLAGS" export OPENSOURCE_CXXFLAGS="$SLKCFLAGS" -echo "yes" | ./configure \ - -prefix /usr/lib/qt-$VERSION \ +echo $'o\nyes' | ./configure \ + -prefix /usr/lib/qt4 \ -no-separate-debug-info \ -nomake examples \ - -nomake demos + -nomake demos \ + -qt-gif \ + -fast \ + -system-libpng \ + -system-libjpeg \ + -system-zlib \ + -dbus \ + -I/usr/include/mysql -L/usr/lib/mysql -R/usr/lib/mysql -plugin-sql-mysql \ + -webkit \ + -silent \ + $GRAPHICS \ + $MEDIA make make install INSTALL_ROOT=$PKG -( cd $PKG/usr/lib ; ln -sf qt-$VERSION qt4 ) +( cd $PKG/usr/lib ; ln -sf qt4 qt-$VERSION ) -( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Qt4 uses different library names than Qt3 so this should be safe +# Link the shared libraries into /usr/lib: +( cd $PKG/usr/lib + for file in qt4/lib/*.so* ; do + ln -sf $file . + done ) +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + mkdir -p $PKG/usr/bin ( cd $PKG/usr/bin - for file in assistant assistant_adp designer linguist lrelease lupdate moc pixeltool qcollectiongenerator qdbus qdbuscpp2xml qdbusviewer qdbusxml2cpp qhelpconverter qhelpgenerator qmake qt3to4 qtconfig rcc uic uic3 xmlpatterns; + for file in assistant assistant_adp designer lconvert linguist lrelease \ + lupdate moc pixeltool qcollectiongenerator qdbus qdbuscpp2xml qdbusviewer \ + qdbusxml2cpp qhelpconverter qhelpgenerator qmake qt3to4 qtconfig rcc uic \ + uic3 xmlpatterns; do - ln -sf /usr/lib/qt-$VERSION/bin/$file ${file}-qt4 ; + ln -sf /usr/lib/qt4/bin/$file ${file}-qt4 ; done ) mkdir -p $PKG/usr/lib/pkgconfig ( cd $PKG/usr/lib/pkgconfig - for file in Qt3Support.pc QtAssistantClient.pc QtCore.pc \ - QtDBus.pc QtGui.pc QtNetwork.pc QtOpenGL.pc QtScript.pc \ - QtSql.pc QtSvg.pc QtTest.pc QtUiTools.pc QtXml.pc ; + for file in phonon.pc Qt3Support.pc QtAssistantClient.pc QtCLucene.pc \ + QtCore.pc QtDBus.pc QtDesigner.pc QtDesignerComponents QtGui.pc \ + QtHelp.pc QtNetwork.pc QtOpenGL.pc QtScript.pc QtScriptTools.pc QtSql.pc \ + QtSvg.pc QtTest.pc QtUiTools.pc QtWebKit.pc QtXml.pc QtXmlPatterns.pc ; do - ln -sf /usr/lib/qt-$VERSION/lib/pkgconfig/$file . ; + ln -sf /usr/lib/qt4/lib/pkgconfig/$file . ; done ) mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a GPL_EXCEPTION.TXT GPL_EXCEPTION_ADDENDUM.TXT INSTALL LICENSE.GPL* \ - OPENSOURCE-NOTICE.TXT README changes-$VERSION \ +cp -a LGPL_EXCEPTION.txt INSTALL LICENSE.GPL* KNOWN.ISSUES \ + README changes-$VERSION \ $PKG/usr/doc/$PRGNAM-$VERSION -( cd $PKG/usr/doc/$PRGNAM-$VERSION ; ln -sf /usr/lib/qt-$VERSION/doc/html . ) +( cd $PKG/usr/doc/$PRGNAM-$VERSION ; ln -sf /usr/lib/qt4/doc/html . ) cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/libraries/qt4/qt4.info b/libraries/qt4/qt4.info index 4306dfb1fb..af86eb6873 100644 --- a/libraries/qt4/qt4.info +++ b/libraries/qt4/qt4.info @@ -1,8 +1,8 @@ PRGNAM="qt4" -VERSION="4.4.3" +VERSION="4.5.1" HOMEPAGE="http://trolltech.com/products/qt" -DOWNLOAD="ftp://ftp.trolltech.no/qt/source/qt-x11-opensource-src-4.4.3.tar.gz" -MD5SUM="376c003317c4417326ba2116370227d0" -MAINTAINER="Aleksandar Samardzic" -EMAIL="asamardzic@gmail.com" -APPROVED="dsomero,Michiel" +DOWNLOAD="http://get.qtsoftware.com/qt/source/qt-x11-opensource-src-4.5.1.tar.bz2" +MD5SUM="afc43e566341cf3e5ed0bcb974f0c3b2" +MAINTAINER="ppr:kut" +EMAIL="pprkut@liwjatan.at" +APPROVED="dsomero" diff --git a/libraries/qt4/slack-desc b/libraries/qt4/slack-desc index f5cadabd3d..d5e59adf99 100644 --- a/libraries/qt4/slack-desc +++ b/libraries/qt4/slack-desc @@ -5,7 +5,7 @@ # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler------------------------------------------------------| + |-----handy-ruler-------------------------------------------------------| qt4: Qt 4 (Qt4 toolkit) qt4: qt4: Qt 4 sets the standard for high-performance, cross-platform |