Permalink
Browse files

qt-webkit-4.8.0: fix for c++0x and gcc-4.6

  • Loading branch information...
1 parent 464d412 commit 445d2bd20fcc6dd1a110a124112b105dadf8e1f1 @wired wired committed Dec 19, 2011
@@ -1,8 +1,9 @@
AUX kde-phonon.patch 1076 RMD160 87c9eef2e8f6582fff9f2c12332279053f8d5be6 SHA1 1ad14496c31678e06d68c31531d76cac1d7719e2 SHA256 652e45976d6808ba017d018d8baf70c35be78cf89347077eaa7a22701e864009
+AUX qt-webkit-4.8.0-c++0x-fix.patch 4886 RMD160 1983e6c19ebc4ea14114e33ce97b4af9f707b1ac SHA1 d09b4cd4ee7924080afc2eb7e7b99335fc265ded SHA256 986d83696feb008b8bc7f410c8598b700cec330b035e793d23e73db2e31620af
AUX sparc-qt-webkit-sigbus.patch 5337 RMD160 8115404ff15afaff75df56d7e769741e066a4fc7 SHA1 5115dccef4ac8214788fcdca8aa8541d4eee2a1f SHA256 46c8fdb2c6c39d69dcc34f22ec887187dfea95a5892d291e9ed5496c307b73cc
DIST qt-everywhere-opensource-src-4.8.0.tar.gz 238580694 RMD160 7506dce7743215481fd9fe56920b8a47f07a112e SHA1 2ba35adca8fb9c66a58eca61a15b21df6213f22e SHA256 9392b74e485e15f75a3e07a527547d4f6747eaf55ebce71ba0e863a9fd320b6e
EBUILD qt-webkit-4.7.9999.ebuild 1477 RMD160 a81fc8ba7e52acfec80220b205ca4ee9c2019802 SHA1 19a30e9bdf34da50fc70382c93c5dd2e3366ff8d SHA256 82ea52f99e5fe620de93a6e347ff665bf36e2669644ac705f76d336f0d253215
-EBUILD qt-webkit-4.8.0.ebuild 1679 RMD160 2b3b4be942c4c0f6c48bd655d9eaf6973e111bc4 SHA1 f46c22842411a95d6faba36d8cf258d866a2cc62 SHA256 227330dc49630aea01567b8279d3afbdf9b37d28a71c6154c9ac0a7857e8c64a
+EBUILD qt-webkit-4.8.0.ebuild 1816 RMD160 58ab09cbe845c10bd8f9efeecfbf3eea5501021f SHA1 98b027f3059341001b12532c1b51ebebf0e4a9a0 SHA256 bacd0cc64cdc38c83997ef454e68c993d0f2c0c1d2307c11279e36fcd2054211
EBUILD qt-webkit-4.8.9999.ebuild 1272 RMD160 92fdee8d598899fa13eaac69f6e4e1cbb89aa4db SHA1 8bb384c0f75b30704c91072bbc75f197e75982c9 SHA256 694781257bd92bd8be9fbf8b3583428856f08067eb3605e3b7735c03e324edbc
EBUILD qt-webkit-4.9999.ebuild 1272 RMD160 92fdee8d598899fa13eaac69f6e4e1cbb89aa4db SHA1 8bb384c0f75b30704c91072bbc75f197e75982c9 SHA256 694781257bd92bd8be9fbf8b3583428856f08067eb3605e3b7735c03e324edbc
MISC metadata.xml 369 RMD160 52b34abcd322c2436157d9045cb892cffdbf00e4 SHA1 91a5ea601ffcd5d32626c6cd23767f39ecc743cb SHA256 f92954ba27e6923458310562b1537216409895a1ba484399f49809824a80e980
@@ -0,0 +1,101 @@
+All this is needed for qt-webkit to build if c++0x use is enabled
+while using gcc-4.6 ...
+
+you also need to append -fpermissive to the compiler flags
+--- src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h
++++ src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h
+@@ -23,6 +23,7 @@
+ #define TypeTraits_h
+
+ #include "Platform.h"
++#include <tr1/memory>
+
+ #if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
+ #include <type_traits>
+--- src/3rdparty/webkit/Source/JavaScriptCore/wtf/TypeTraits.h
++++ src/3rdparty/webkit/Source/JavaScriptCore/wtf/TypeTraits.h
+@@ -23,6 +23,7 @@
+ #define TypeTraits_h
+
+ #include "Platform.h"
++#include <tr1/memory>
+
+ #if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
+ #include <type_traits>
+--- src/3rdparty/webkit/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
++++ src/3rdparty/webkit/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
+@@ -1106,7 +1106,7 @@ RegisterID* BytecodeGenerator::emitLoad(RegisterID* dst, double number)
+ // FIXME: Our hash tables won't hold infinity, so we make a new JSValue each time.
+ // Later we can do the extra work to handle that like the other cases. They also don't
+ // work correctly with NaN as a key.
+- if (isnan(number) || number == HashTraits<double>::emptyValue() || HashTraits<double>::isDeletedValue(number))
++ if (std::isnan(number) || number == HashTraits<double>::emptyValue() || HashTraits<double>::isDeletedValue(number))
+ return emitLoad(dst, jsNumber(number));
+ JSValue& valueInMap = m_numberMap.add(number, JSValue()).first->second;
+ if (!valueInMap)
+--- src/3rdparty/webkit/Source/JavaScriptCore/wtf/MathExtras.h
++++ src/3rdparty/webkit/Source/JavaScriptCore/wtf/MathExtras.h
+@@ -137,8 +137,10 @@ inline double trunc(double num) { return num > 0 ? floor(num) : ceil(num); }
+ inline long long abs(long long num) { return _abs64(num); }
+ #endif
+
++#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ inline bool isinf(double num) { return !_finite(num) && !_isnan(num); }
+ inline bool isnan(double num) { return !!_isnan(num); }
++#endif
+ inline bool signbit(double num) { return _copysign(1.0, num) < 0; }
+
+ inline double nextafter(double x, double y) { return _nextafter(x, y); }
+@@ -240,8 +242,10 @@ inline int clampToInteger(unsigned value)
+
+ #if !COMPILER(MSVC) && !(COMPILER(RVCT) && PLATFORM(BREWMP)) && !OS(SOLARIS) && !OS(SYMBIAN)
+ using std::isfinite;
++#ifndef __GXX_EXPERIMENTAL_CXX0X__
+ using std::isinf;
+ using std::isnan;
++#endif
+ using std::signbit;
+ #endif
+
+--- src/3rdparty/webkit/Source/WebCore/bindings/js/JSGeolocationCustom.cpp
++++ src/3rdparty/webkit/Source/WebCore/bindings/js/JSGeolocationCustom.cpp
+@@ -80,7 +80,7 @@ static PassRefPtr<PositionOptions> createPositionOptions(ExecState* exec, JSValu
+ if (exec->hadException())
+ return 0;
+ // If the value is positive infinity, there's nothing to do.
+- if (!(isinf(timeoutNumber) && (timeoutNumber > 0))) {
++ if (!(std::isinf(timeoutNumber) && (timeoutNumber > 0))) {
+ // Wrap to int32 and force non-negative to match behavior of window.setTimeout.
+ options->setTimeout(max(0, timeoutValue.toInt32(exec)));
+ if (exec->hadException())
+@@ -95,7 +95,7 @@ static PassRefPtr<PositionOptions> createPositionOptions(ExecState* exec, JSValu
+ double maximumAgeNumber = maximumAgeValue.toNumber(exec);
+ if (exec->hadException())
+ return 0;
+- if (isinf(maximumAgeNumber) && (maximumAgeNumber > 0)) {
++ if (std::isinf(maximumAgeNumber) && (maximumAgeNumber > 0)) {
+ // If the value is positive infinity, clear maximumAge.
+ options->clearMaximumAge();
+ } else {
+--- src/3rdparty/webkit/Source/WebCore/html/HTMLInputElement.cpp
++++ src/3rdparty/webkit/Source/WebCore/html/HTMLInputElement.cpp
+@@ -332,7 +332,7 @@ void HTMLInputElement::applyStep(double count, ExceptionCode& ec)
+ return;
+ }
+ double newValue = current + step * count;
+- if (isinf(newValue)) {
++ if (std::isinf(newValue)) {
+ ec = INVALID_STATE_ERR;
+ return;
+ }
+--- src/3rdparty/webkit/Source/WebCore/html/NumberInputType.cpp
++++ src/3rdparty/webkit/Source/WebCore/html/NumberInputType.cpp
+@@ -132,7 +132,7 @@ bool NumberInputType::stepMismatch(const String& value, double step) const
+ if (!parseToDoubleForNumberType(value, &doubleValue))
+ return false;
+ doubleValue = fabs(doubleValue - stepBase());
+- if (isinf(doubleValue))
++ if (std::isinf(doubleValue))
+ return false;
+ // double's fractional part size is DBL_MAN_DIG-bit. If the current value
+ // is greater than step*2^DBL_MANT_DIG, the following computation for
@@ -21,6 +21,8 @@ DEPEND="
kde? ( || ( media-libs/phonon[aqua=] ~x11-libs/qt-phonon-${PV}:${SLOT}[aqua=,dbus=,debug=] ) )"
RDEPEND="${DEPEND}"
+PATCHES=( "${FILESDIR}/${P}-c++0x-fix.patch" )
+
pkg_setup() {
QT4_TARGET_DIRECTORIES="
src/3rdparty/webkit/Source/JavaScriptCore/
@@ -41,11 +43,13 @@ pkg_setup() {
src_prepare() {
[[ $(tc-arch) == "ppc64" ]] && append-flags -mminimal-toc #241900
+ use c++0x && append-flags -fpermissive
sed -i -e "/Werror/d" "${S}/src/3rdparty/webkit/Source/WebKit.pri" || die
qt4-build_src_prepare
}
src_configure() {
+ # won't build with gcc 4.6 without this for now
myconf="${myconf}
-webkit -system-sqlite -no-gtkstyle
-D GST_DISABLE_DEPRECATED

0 comments on commit 445d2bd

Please sign in to comment.