diff -ur qt-everywhere-opensource-src-4.7.1/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp qt-everywhere-opensource-src-4.7.1-patched/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp --- qt-everywhere-opensource-src-4.7.1/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp 2010-11-06 12:55:22.000000000 +1100 +++ qt-everywhere-opensource-src-4.7.1-patched/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp 2010-12-29 20:11:12.000000000 +1100 @@ -75,6 +75,10 @@ #endif #include +#if defined(QT_LINUXBASE) +#include +#endif + #if OS(SOLARIS) #include #else @@ -674,11 +678,22 @@ static pthread_t stackThread; pthread_t thread = pthread_self(); if (stackBase == 0 || thread != stackThread) { +#if defined(QT_LINUXBASE) + // LinuxBase is missing pthread_getattr_np - resolve it once at runtime instead + // see http://bugs.linuxbase.org/show_bug.cgi?id=2364 + typedef int (*GetAttrPtr)(pthread_t, pthread_attr_t *); + static int (*pthread_getattr_np_ptr)(pthread_t, pthread_attr_t *) = 0; + if (!pthread_getattr_np_ptr) + *(void **)&pthread_getattr_np_ptr = dlsym(RTLD_DEFAULT, "pthread_getattr_np"); +#endif pthread_attr_t sattr; pthread_attr_init(&sattr); #if HAVE(PTHREAD_NP_H) || OS(NETBSD) // e.g. on FreeBSD 5.4, neundorf@kde.org pthread_attr_get_np(thread, &sattr); +#elif defined(QT_LINUXBASE) + if (pthread_getattr_np_ptr) + pthread_getattr_np_ptr(thread, &sattr); #else // FIXME: this function is non-portable; other POSIX systems may have different np alternatives pthread_getattr_np(thread, &sattr); diff -ur qt-everywhere-opensource-src-4.7.1/src/3rdparty/javascriptcore/JavaScriptCore/wtf/DateMath.cpp qt-everywhere-opensource-src-4.7.1-patched/src/3rdparty/javascriptcore/JavaScriptCore/wtf/DateMath.cpp --- qt-everywhere-opensource-src-4.7.1/src/3rdparty/javascriptcore/JavaScriptCore/wtf/DateMath.cpp 2010-11-06 12:55:22.000000000 +1100 +++ qt-everywhere-opensource-src-4.7.1-patched/src/3rdparty/javascriptcore/JavaScriptCore/wtf/DateMath.cpp 2010-12-29 20:28:32.000000000 +1100 @@ -404,13 +404,13 @@ localt.tm_zone = 0; #endif -#if HAVE(TIMEGM) - time_t utcOffset = timegm(&localt) - mktime(&localt); -#else +//#if HAVE(TIMEGM) +// time_t utcOffset = timegm(&localt) - mktime(&localt); +//#else // Using a canned date of 01/01/2009 on platforms with weaker date-handling foo. localt.tm_year = 109; time_t utcOffset = 1230768000 - mktime(&localt); -#endif +//#endif return static_cast(utcOffset * 1000); } diff -ur qt-everywhere-opensource-src-4.7.1/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h qt-everywhere-opensource-src-4.7.1-patched/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h --- qt-everywhere-opensource-src-4.7.1/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h 2010-11-06 12:55:22.000000000 +1100 +++ qt-everywhere-opensource-src-4.7.1-patched/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h 2010-12-29 18:52:40.000000000 +1100 @@ -76,7 +76,7 @@ #elif OS(ANDROID) #include #elif COMPILER(GCC) && !OS(SYMBIAN) -#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) +#if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))) && !defined(__LSB_VERSION__) #include #else #include diff -ur qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp qt-everywhere-opensource-src-4.7.1-patched/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp --- qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp 2010-11-06 12:55:19.000000000 +1100 +++ qt-everywhere-opensource-src-4.7.1-patched/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp 2010-12-29 20:10:11.000000000 +1100 @@ -70,6 +70,10 @@ #endif #include +#if defined(QT_LINUXBASE) +#include +#endif + #if OS(SOLARIS) #include #else @@ -587,11 +591,22 @@ static pthread_t stackThread; pthread_t thread = pthread_self(); if (stackBase == 0 || thread != stackThread) { +#if defined(QT_LINUXBASE) + // LinuxBase is missing pthread_getattr_np - resolve it once at runtime instead + // see http://bugs.linuxbase.org/show_bug.cgi?id=2364 + typedef int (*GetAttrPtr)(pthread_t, pthread_attr_t *); + static int (*pthread_getattr_np_ptr)(pthread_t, pthread_attr_t *) = 0; + if (!pthread_getattr_np_ptr) + *(void **)&pthread_getattr_np_ptr = dlsym(RTLD_DEFAULT, "pthread_getattr_np"); +#endif pthread_attr_t sattr; pthread_attr_init(&sattr); #if HAVE(PTHREAD_NP_H) || OS(NETBSD) // e.g. on FreeBSD 5.4, neundorf@kde.org pthread_attr_get_np(thread, &sattr); +#elif defined(QT_LINUXBASE) + if (pthread_getattr_np_ptr) + pthread_getattr_np_ptr(thread, &sattr); #else // FIXME: this function is non-portable; other POSIX systems may have different np alternatives pthread_getattr_np(thread, &sattr); diff -ur qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp qt-everywhere-opensource-src-4.7.1-patched/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp --- qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp 2010-11-06 12:55:19.000000000 +1100 +++ qt-everywhere-opensource-src-4.7.1-patched/src/3rdparty/webkit/JavaScriptCore/wtf/DateMath.cpp 2010-12-29 20:29:03.000000000 +1100 @@ -404,13 +404,13 @@ localt.tm_zone = 0; #endif -#if HAVE(TIMEGM) - time_t utcOffset = timegm(&localt) - mktime(&localt); -#else +//#if HAVE(TIMEGM) +// time_t utcOffset = timegm(&localt) - mktime(&localt); +//#else // Using a canned date of 01/01/2009 on platforms with weaker date-handling foo. localt.tm_year = 109; time_t utcOffset = 1230768000 - mktime(&localt); -#endif +//#endif return static_cast(utcOffset * 1000); } diff -ur qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h qt-everywhere-opensource-src-4.7.1-patched/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h --- qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h 2010-11-06 12:55:20.000000000 +1100 +++ qt-everywhere-opensource-src-4.7.1-patched/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h 2010-12-29 18:53:01.000000000 +1100 @@ -76,7 +76,7 @@ #elif OS(ANDROID) #include #elif COMPILER(GCC) && !OS(SYMBIAN) -#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) +#if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))) && !defined(__LSB_VERSION__) #include #else #include diff -ur qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/WebKit/qt/declarative/declarative.pro qt-everywhere-opensource-src-4.7.1-patched/src/3rdparty/webkit/WebKit/qt/declarative/declarative.pro --- qt-everywhere-opensource-src-4.7.1/src/3rdparty/webkit/WebKit/qt/declarative/declarative.pro 2010-11-06 12:55:20.000000000 +1100 +++ qt-everywhere-opensource-src-4.7.1-patched/src/3rdparty/webkit/WebKit/qt/declarative/declarative.pro 2010-12-29 21:35:49.000000000 +1100 @@ -35,7 +35,7 @@ include(../../../WebKit.pri) -QT += declarative +QT += declarative script xmlpatterns !CONFIG(standalone_package) { linux-* { diff -ur qt-everywhere-opensource-src-4.7.1/src/gui/text/qfontengine_ft.cpp qt-everywhere-opensource-src-4.7.1-patched/src/gui/text/qfontengine_ft.cpp --- qt-everywhere-opensource-src-4.7.1/src/gui/text/qfontengine_ft.cpp 2010-11-06 12:55:15.000000000 +1100 +++ qt-everywhere-opensource-src-4.7.1-patched/src/gui/text/qfontengine_ft.cpp 2010-12-29 22:44:53.000000000 +1100 @@ -95,7 +95,7 @@ #endif /* FreeType 2.1.10 starts to provide FT_GlyphSlot_Embolden */ -#if (FREETYPE_MAJOR*10000+FREETYPE_MINOR*100+FREETYPE_PATCH) >= 20110 +#if (FREETYPE_MAJOR*10000+FREETYPE_MINOR*100+FREETYPE_PATCH) >= 20110 && !defined(__LSB_VERSION__) #define Q_FT_GLYPHSLOT_EMBOLDEN(slot) FT_GlyphSlot_Embolden(slot) #else #define Q_FT_GLYPHSLOT_EMBOLDEN(slot) diff -ur qt-everywhere-opensource-src-4.7.1/src/imports/folderlistmodel/folderlistmodel.pro qt-everywhere-opensource-src-4.7.1-patched/src/imports/folderlistmodel/folderlistmodel.pro --- qt-everywhere-opensource-src-4.7.1/src/imports/folderlistmodel/folderlistmodel.pro 2010-11-06 12:55:18.000000000 +1100 +++ qt-everywhere-opensource-src-4.7.1-patched/src/imports/folderlistmodel/folderlistmodel.pro 2010-12-29 21:25:33.000000000 +1100 @@ -2,7 +2,7 @@ TARGETPATH = Qt/labs/folderlistmodel include(../qimportbase.pri) -QT += declarative script +QT += declarative script xmlpatterns SOURCES += qdeclarativefolderlistmodel.cpp plugin.cpp HEADERS += qdeclarativefolderlistmodel.h diff -ur qt-everywhere-opensource-src-4.7.1/src/imports/gestures/gestures.pro qt-everywhere-opensource-src-4.7.1-patched/src/imports/gestures/gestures.pro --- qt-everywhere-opensource-src-4.7.1/src/imports/gestures/gestures.pro 2010-11-06 12:55:18.000000000 +1100 +++ qt-everywhere-opensource-src-4.7.1-patched/src/imports/gestures/gestures.pro 2010-12-29 21:28:22.000000000 +1100 @@ -2,7 +2,7 @@ TARGETPATH = Qt/labs/gestures include(../qimportbase.pri) -QT += declarative +QT += declarative script xmlpatterns SOURCES += qdeclarativegesturearea.cpp plugin.cpp HEADERS += qdeclarativegesturearea_p.h diff -ur qt-everywhere-opensource-src-4.7.1/src/imports/particles/particles.pro qt-everywhere-opensource-src-4.7.1-patched/src/imports/particles/particles.pro --- qt-everywhere-opensource-src-4.7.1/src/imports/particles/particles.pro 2010-11-06 12:55:18.000000000 +1100 +++ qt-everywhere-opensource-src-4.7.1-patched/src/imports/particles/particles.pro 2010-12-29 21:26:17.000000000 +1100 @@ -2,7 +2,7 @@ TARGETPATH = Qt/labs/particles include(../qimportbase.pri) -QT += declarative +QT += declarative script xmlpatterns SOURCES += \ qdeclarativeparticles.cpp \ diff -ur qt-everywhere-opensource-src-4.7.1/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro qt-everywhere-opensource-src-4.7.1-patched/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro --- qt-everywhere-opensource-src-4.7.1/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro 2010-12-31 17:56:16.000000000 +1100 +++ qt-everywhere-opensource-src-4.7.1-patched/tools/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro 2010-11-06 12:55:12.000000000 +1100 @@ -1,7 +1,7 @@ TEMPLATE = lib TARGET = qdeclarativeview CONFIG += qt warn_on plugin designer -QT += declarative +QT += declarative script xmlpatterns include(../plugins.pri) build_all:!build_pass { diff -ur qt-everywhere-opensource-src-4.7.1/tools/qml/qml.pri qt-everywhere-opensource-src-4.7.1-patched/tools/qml/qml.pri --- qt-everywhere-opensource-src-4.7.1/tools/qml/qml.pri 2010-11-06 12:55:12.000000000 +1100 +++ qt-everywhere-opensource-src-4.7.1-patched/tools/qml/qml.pri 2010-12-31 19:58:52.000000000 +1100 @@ -1,4 +1,4 @@ -QT += declarative script network sql +QT += declarative script network sql xmlpatterns contains(QT_CONFIG, opengl) { QT += opengl DEFINES += GL_SUPPORTED