From fcb4f167a29ae9f8fa8a9f060678c6269a28f0b6421928d4b665f3b3ba2a7e43 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 18 Feb 2014 15:17:31 +0000 Subject: [PATCH] Accepting request 221697 from KDE:Qt5 install license files to %doc (forwarded request 221612 from mlin7442) OBS-URL: https://build.opensuse.org/request/show/221697 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtdeclarative?expand=0&rev=7 --- aarch64-support.patch | 843 ++++++++++++++++++++++ libqt5-qtdeclarative.changes | 14 + libqt5-qtdeclarative.spec | 81 ++- qtdeclarative-opensource-src-5.2.0.tar.xz | 3 - qtdeclarative-opensource-src-5.2.1.tar.xz | 3 + 5 files changed, 917 insertions(+), 27 deletions(-) create mode 100644 aarch64-support.patch delete mode 100644 qtdeclarative-opensource-src-5.2.0.tar.xz create mode 100644 qtdeclarative-opensource-src-5.2.1.tar.xz diff --git a/aarch64-support.patch b/aarch64-support.patch new file mode 100644 index 0000000..4094fcd --- /dev/null +++ b/aarch64-support.patch @@ -0,0 +1,843 @@ +From: Simon Hausmann +Date: Wed, 22 Jan 2014 11:53:09 +0000 +Subject: Update our double conversion code to the latest release from code.google.com +X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtdeclarative.git&a=commitdiff&h=998860f00ca1c9eb333787595e05e8cb486802c8 +--- +Update our double conversion code to the latest release from code.google.com + +This fixes AArch64 builds and brings us in sync with upstream commit 2fb03de56faa32bbba5e02222528e7b760f71d77 + +Task-number: QTBUG-35528 +Change-Id: Ib356627e06c1fecaa5b3f66d0a98fb5b30dc87e5 +Reviewed-by: Liang Qi +Reviewed-by: Lars Knoll +--- + + +--- a/src/3rdparty/double-conversion/README ++++ b/src/3rdparty/double-conversion/README +@@ -3,4 +3,4 @@ from + + http://code.google.com/p/double-conversion/ + +-commit e5b34421b763f7bf7e4f9081403db417d5a55a36 ++commit 2fb03de56faa32bbba5e02222528e7b760f71d77 +--- a/src/3rdparty/double-conversion/bignum-dtoa.cc ++++ b/src/3rdparty/double-conversion/bignum-dtoa.cc +@@ -192,13 +192,13 @@ + delta_plus = delta_minus; + } + *length = 0; +- while (true) { ++ for (;;) { + uint16_t digit; + digit = numerator->DivideModuloIntBignum(*denominator); + ASSERT(digit <= 9); // digit is a uint16_t and therefore always positive. + // digit = numerator / denominator (integer division). + // numerator = numerator % denominator. +- buffer[(*length)++] = digit + '0'; ++ buffer[(*length)++] = static_cast(digit + '0'); + + // Can we stop already? + // If the remainder of the division is less than the distance to the lower +@@ -282,7 +282,7 @@ + // exponent (decimal_point), when rounding upwards. + static void GenerateCountedDigits(int count, int* decimal_point, + Bignum* numerator, Bignum* denominator, +- Vector(buffer), int* length) { ++ Vector buffer, int* length) { + ASSERT(count >= 0); + for (int i = 0; i < count - 1; ++i) { + uint16_t digit; +@@ -290,7 +290,7 @@ + ASSERT(digit <= 9); // digit is a uint16_t and therefore always positive. + // digit = numerator / denominator (integer division). + // numerator = numerator % denominator. +- buffer[i] = digit + '0'; ++ buffer[i] = static_cast(digit + '0'); + // Prepare for next iteration. + numerator->Times10(); + } +@@ -300,7 +300,8 @@ + if (Bignum::PlusCompare(*numerator, *numerator, *denominator) >= 0) { + digit++; + } +- buffer[count - 1] = digit + '0'; ++ ASSERT(digit <= 10); ++ buffer[count - 1] = static_cast(digit + '0'); + // Correct bad digits (in case we had a sequence of '9's). Propagate the + // carry until we hat a non-'9' or til we reach the first digit. + for (int i = count - 1; i > 0; --i) { + +--- a/src/3rdparty/double-conversion/bignum.cc ++++ b/src/3rdparty/double-conversion/bignum.cc +@@ -40,6 +40,7 @@ + + template + static int BitSize(S value) { ++ (void) value; // Mark variable as used. + return 8 * sizeof(value); + } + +@@ -122,9 +123,8 @@ + static int HexCharValue(char c) { + if ('0' <= c && c <= '9') return c - '0'; + if ('a' <= c && c <= 'f') return 10 + c - 'a'; +- if ('A' <= c && c <= 'F') return 10 + c - 'A'; +- UNREACHABLE(); +- return 0; // To make compiler happy. ++ ASSERT('A' <= c && c <= 'F'); ++ return 10 + c - 'A'; + } + + +@@ -501,13 +501,14 @@ + // Start by removing multiples of 'other' until both numbers have the same + // number of digits. + while (BigitLength() > other.BigitLength()) { +- // This naive approach is extremely inefficient if the this divided other +- // might be big. This function is implemented for doubleToString where ++ // This naive approach is extremely inefficient if `this` divided by other ++ // is big. This function is implemented for doubleToString where + // the result should be small (less than 10). + ASSERT(other.bigits_[other.used_digits_ - 1] >= ((1 << kBigitSize) / 16)); ++ ASSERT(bigits_[used_digits_ - 1] < 0x10000); + // Remove the multiples of the first digit. + // Example this = 23 and other equals 9. -> Remove 2 multiples. +- result += bigits_[used_digits_ - 1]; ++ result += static_cast(bigits_[used_digits_ - 1]); + SubtractTimes(other, bigits_[used_digits_ - 1]); + } + +@@ -523,13 +524,15 @@ + // Shortcut for easy (and common) case. + int quotient = this_bigit / other_bigit; + bigits_[used_digits_ - 1] = this_bigit - other_bigit * quotient; +- result += quotient; ++ ASSERT(quotient < 0x10000); ++ result += static_cast(quotient); + Clamp(); + return result; + } + + int division_estimate = this_bigit / (other_bigit + 1); +- result += division_estimate; ++ ASSERT(division_estimate < 0x10000); ++ result += static_cast(division_estimate); + SubtractTimes(other, division_estimate); + + if (other_bigit * (division_estimate + 1) > this_bigit) { +@@ -560,8 +563,8 @@ + + static char HexCharOfValue(int value) { + ASSERT(0 <= value && value <= 16); +- if (value < 10) return value + '0'; +- return value - 10 + 'A'; ++ if (value < 10) return static_cast(value + '0'); ++ return static_cast(value - 10 + 'A'); + } + + +@@ -755,7 +758,6 @@ + Chunk difference = bigits_[i] - borrow; + bigits_[i] = difference & kBigitMask; + borrow = difference >> (kChunkSize - 1); +- ++i; + } + Clamp(); + } + +--- a/src/3rdparty/double-conversion/cached-powers.cc ++++ b/src/3rdparty/double-conversion/cached-powers.cc +@@ -144,7 +144,6 @@ + int max_exponent, + DiyFp* power, + int* decimal_exponent) { +- (void)max_exponent; // Silence unused parameter warning in release builds + int kQ = DiyFp::kSignificandSize; + double k = ceil((min_exponent + kQ - 1) * kD_1_LOG2_10); + int foo = kCachedPowersOffset; +@@ -153,6 +152,7 @@ + ASSERT(0 <= index && index < kCachedPowersLength); + CachedPower cached_power = kCachedPowers[index]; + ASSERT(min_exponent <= cached_power.binary_exponent); ++ (void) max_exponent; // Mark variable as used. + ASSERT(cached_power.binary_exponent <= max_exponent); + *decimal_exponent = cached_power.decimal_exponent; + *power = DiyFp(cached_power.significand, cached_power.binary_exponent); + +--- a/src/3rdparty/double-conversion/double-conversion.cc ++++ b/src/3rdparty/double-conversion/double-conversion.cc +@@ -348,7 +348,6 @@ static BignumDtoaMode DtoaToBignumDtoaMo + case DoubleToStringConverter::PRECISION: return BIGNUM_DTOA_PRECISION; + default: + UNREACHABLE(); +- return BIGNUM_DTOA_SHORTEST; // To silence compiler. + } + } + +@@ -403,8 +402,8 @@ void DoubleToStringConverter::DoubleToAs + vector, length, point); + break; + default: +- UNREACHABLE(); + fast_worked = false; ++ UNREACHABLE(); + } + if (fast_worked) return; + +@@ -417,8 +416,9 @@ void DoubleToStringConverter::DoubleToAs + + // Consumes the given substring from the iterator. + // Returns false, if the substring does not match. +-static bool ConsumeSubString(const char** current, +- const char* end, ++template ++static bool ConsumeSubString(Iterator* current, ++ Iterator end, + const char* substring) { + ASSERT(**current == *substring); + for (substring++; *substring != '\0'; substring++) { +@@ -440,10 +440,36 @@ static bool ConsumeSubString(const char* + const int kMaxSignificantDigits = 772; + + ++static const char kWhitespaceTable7[] = { 32, 13, 10, 9, 11, 12 }; ++static const int kWhitespaceTable7Length = ARRAY_SIZE(kWhitespaceTable7); ++ ++ ++static const uc16 kWhitespaceTable16[] = { ++ 160, 8232, 8233, 5760, 6158, 8192, 8193, 8194, 8195, ++ 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279 ++}; ++static const int kWhitespaceTable16Length = ARRAY_SIZE(kWhitespaceTable16); ++ ++ ++static bool isWhitespace(int x) { ++ if (x < 128) { ++ for (int i = 0; i < kWhitespaceTable7Length; i++) { ++ if (kWhitespaceTable7[i] == x) return true; ++ } ++ } else { ++ for (int i = 0; i < kWhitespaceTable16Length; i++) { ++ if (kWhitespaceTable16[i] == x) return true; ++ } ++ } ++ return false; ++} ++ ++ + // Returns true if a nonspace found and false if the end has reached. +-static inline bool AdvanceToNonspace(const char** current, const char* end) { ++template ++static inline bool AdvanceToNonspace(Iterator* current, Iterator end) { + while (*current != end) { +- if (**current != ' ') return true; ++ if (!isWhitespace(**current)) return true; + ++*current; + } + return false; +@@ -462,26 +488,50 @@ static double SignedZero(bool sign) { + } + + ++// Returns true if 'c' is a decimal digit that is valid for the given radix. ++// ++// The function is small and could be inlined, but VS2012 emitted a warning ++// because it constant-propagated the radix and concluded that the last ++// condition was always true. By moving it into a separate function the ++// compiler wouldn't warn anymore. ++static bool IsDecimalDigitForRadix(int c, int radix) { ++ return '0' <= c && c <= '9' && (c - '0') < radix; ++} ++ ++// Returns true if 'c' is a character digit that is valid for the given radix. ++// The 'a_character' should be 'a' or 'A'. ++// ++// The function is small and could be inlined, but VS2012 emitted a warning ++// because it constant-propagated the radix and concluded that the first ++// condition was always false. By moving it into a separate function the ++// compiler wouldn't warn anymore. ++static bool IsCharacterDigitForRadix(int c, int radix, char a_character) { ++ return radix > 10 && c >= a_character && c < a_character + radix - 10; ++} ++ ++ + // Parsing integers with radix 2, 4, 8, 16, 32. Assumes current != end. +-template +-static double RadixStringToIeee(const char* current, +- const char* end, ++template ++static double RadixStringToIeee(Iterator* current, ++ Iterator end, + bool sign, + bool allow_trailing_junk, + double junk_string_value, + bool read_as_double, +- const char** trailing_pointer) { +- ASSERT(current != end); ++ bool* result_is_junk) { ++ ASSERT(*current != end); + + const int kDoubleSize = Double::kSignificandSize; + const int kSingleSize = Single::kSignificandSize; + const int kSignificandSize = read_as_double? kDoubleSize: kSingleSize; + ++ *result_is_junk = true; ++ + // Skip leading 0s. +- while (*current == '0') { +- ++current; +- if (current == end) { +- *trailing_pointer = end; ++ while (**current == '0') { ++ ++(*current); ++ if (*current == end) { ++ *result_is_junk = false; + return SignedZero(sign); + } + } +@@ -492,14 +542,14 @@ static double RadixStringToIeee(const ch + + do { + int digit; +- if (*current >= '0' && *current <= '9' && *current < '0' + radix) { +- digit = static_cast(*current) - '0'; +- } else if (radix > 10 && *current >= 'a' && *current < 'a' + radix - 10) { +- digit = static_cast(*current) - 'a' + 10; +- } else if (radix > 10 && *current >= 'A' && *current < 'A' + radix - 10) { +- digit = static_cast(*current) - 'A' + 10; ++ if (IsDecimalDigitForRadix(**current, radix)) { ++ digit = static_cast(**current) - '0'; ++ } else if (IsCharacterDigitForRadix(**current, radix, 'a')) { ++ digit = static_cast(**current) - 'a' + 10; ++ } else if (IsCharacterDigitForRadix(**current, radix, 'A')) { ++ digit = static_cast(**current) - 'A' + 10; + } else { +- if (allow_trailing_junk || !AdvanceToNonspace(¤t, end)) { ++ if (allow_trailing_junk || !AdvanceToNonspace(current, end)) { + break; + } else { + return junk_string_value; +@@ -523,14 +573,14 @@ static double RadixStringToIeee(const ch + exponent = overflow_bits_count; + + bool zero_tail = true; +- while (true) { +- ++current; +- if (current == end || !isDigit(*current, radix)) break; +- zero_tail = zero_tail && *current == '0'; ++ for (;;) { ++ ++(*current); ++ if (*current == end || !isDigit(**current, radix)) break; ++ zero_tail = zero_tail && **current == '0'; + exponent += radix_log_2; + } + +- if (!allow_trailing_junk && AdvanceToNonspace(¤t, end)) { ++ if (!allow_trailing_junk && AdvanceToNonspace(current, end)) { + return junk_string_value; + } + +@@ -552,13 +602,13 @@ static double RadixStringToIeee(const ch + } + break; + } +- ++current; +- } while (current != end); ++ ++(*current); ++ } while (*current != end); + + ASSERT(number < ((int64_t)1 << kSignificandSize)); + ASSERT(static_cast(static_cast(number)) == number); + +- *trailing_pointer = current; ++ *result_is_junk = false; + + if (exponent == 0) { + if (sign) { +@@ -573,13 +623,14 @@ static double RadixStringToIeee(const ch + } + + ++template + double StringToDoubleConverter::StringToIeee( +- const char* input, ++ Iterator input, + int length, +- int* processed_characters_count, +- bool read_as_double) { +- const char* current = input; +- const char* end = input + length; ++ bool read_as_double, ++ int* processed_characters_count) const { ++ Iterator current = input; ++ Iterator end = input + length; + + *processed_characters_count = 0; + +@@ -600,7 +651,7 @@ double StringToDoubleConverter::StringTo + + if (allow_leading_spaces || allow_trailing_spaces) { + if (!AdvanceToNonspace(¤t, end)) { +- *processed_characters_count = current - input; ++ *processed_characters_count = static_cast(current - input); + return empty_string_value_; + } + if (!allow_leading_spaces && (input != current)) { +@@ -626,7 +677,7 @@ double StringToDoubleConverter::StringTo + if (*current == '+' || *current == '-') { + sign = (*current == '-'); + ++current; +- const char* next_non_space = current; ++ Iterator next_non_space = current; + // Skip following spaces (if allowed). + if (!AdvanceToNonspace(&next_non_space, end)) return junk_string_value_; + if (!allow_spaces_after_sign && (current != next_non_space)) { +@@ -649,7 +700,7 @@ double StringToDoubleConverter::StringTo + } + + ASSERT(buffer_pos == 0); +- *processed_characters_count = current - input; ++ *processed_characters_count = static_cast(current - input); + return sign ? -Double::Infinity() : Double::Infinity(); + } + } +@@ -668,7 +719,7 @@ double StringToDoubleConverter::StringTo + } + + ASSERT(buffer_pos == 0); +- *processed_characters_count = current - input; ++ *processed_characters_count = static_cast(current - input); + return sign ? -Double::NaN() : Double::NaN(); + } + } +@@ -677,7 +728,7 @@ double StringToDoubleConverter::StringTo + if (*current == '0') { + ++current; + if (current == end) { +- *processed_characters_count = current - input; ++ *processed_characters_count = static_cast(current - input); + return SignedZero(sign); + } + +@@ -690,17 +741,17 @@ double StringToDoubleConverter::StringTo + return junk_string_value_; // "0x". + } + +- const char* tail_pointer = NULL; +- double result = RadixStringToIeee<4>(current, ++ bool result_is_junk; ++ double result = RadixStringToIeee<4>(¤t, + end, + sign, + allow_trailing_junk, + junk_string_value_, + read_as_double, +- &tail_pointer); +- if (tail_pointer != NULL) { +- if (allow_trailing_spaces) AdvanceToNonspace(&tail_pointer, end); +- *processed_characters_count = tail_pointer - input; ++ &result_is_junk); ++ if (!result_is_junk) { ++ if (allow_trailing_spaces) AdvanceToNonspace(¤t, end); ++ *processed_characters_count = static_cast(current - input); + } + return result; + } +@@ -709,7 +760,7 @@ double StringToDoubleConverter::StringTo + while (*current == '0') { + ++current; + if (current == end) { +- *processed_characters_count = current - input; ++ *processed_characters_count = static_cast(current - input); + return SignedZero(sign); + } + } +@@ -757,7 +808,7 @@ double StringToDoubleConverter::StringTo + while (*current == '0') { + ++current; + if (current == end) { +- *processed_characters_count = current - input; ++ *processed_characters_count = static_cast(current - input); + return SignedZero(sign); + } + exponent--; // Move this 0 into the exponent. +@@ -855,16 +906,17 @@ double StringToDoubleConverter::StringTo + + if (octal) { + double result; +- const char* tail_pointer = NULL; +- result = RadixStringToIeee<3>(buffer, ++ bool result_is_junk; ++ char* start = buffer; ++ result = RadixStringToIeee<3>(&start, + buffer + buffer_pos, + sign, + allow_trailing_junk, + junk_string_value_, + read_as_double, +- &tail_pointer); +- ASSERT(tail_pointer != NULL); +- *processed_characters_count = current - input; ++ &result_is_junk); ++ ASSERT(!result_is_junk); ++ *processed_characters_count = static_cast(current - input); + return result; + } + +@@ -882,8 +934,42 @@ double StringToDoubleConverter::StringTo + } else { + converted = Strtof(Vector(buffer, buffer_pos), exponent); + } +- *processed_characters_count = current - input; ++ *processed_characters_count = static_cast(current - input); + return sign? -converted: converted; + } + ++ ++double StringToDoubleConverter::StringToDouble( ++ const char* buffer, ++ int length, ++ int* processed_characters_count) const { ++ return StringToIeee(buffer, length, true, processed_characters_count); ++} ++ ++ ++double StringToDoubleConverter::StringToDouble( ++ const uc16* buffer, ++ int length, ++ int* processed_characters_count) const { ++ return StringToIeee(buffer, length, true, processed_characters_count); ++} ++ ++ ++float StringToDoubleConverter::StringToFloat( ++ const char* buffer, ++ int length, ++ int* processed_characters_count) const { ++ return static_cast(StringToIeee(buffer, length, false, ++ processed_characters_count)); ++} ++ ++ ++float StringToDoubleConverter::StringToFloat( ++ const uc16* buffer, ++ int length, ++ int* processed_characters_count) const { ++ return static_cast(StringToIeee(buffer, length, false, ++ processed_characters_count)); ++} ++ + } // namespace double_conversion +--- a/src/3rdparty/double-conversion/double-conversion.h ++++ b/src/3rdparty/double-conversion/double-conversion.h +@@ -415,9 +415,10 @@ + // junk, too. + // - ALLOW_TRAILING_JUNK: ignore trailing characters that are not part of + // a double literal. +- // - ALLOW_LEADING_SPACES: skip over leading spaces. +- // - ALLOW_TRAILING_SPACES: ignore trailing spaces. +- // - ALLOW_SPACES_AFTER_SIGN: ignore spaces after the sign. ++ // - ALLOW_LEADING_SPACES: skip over leading whitespace, including spaces, ++ // new-lines, and tabs. ++ // - ALLOW_TRAILING_SPACES: ignore trailing whitespace. ++ // - ALLOW_SPACES_AFTER_SIGN: ignore whitespace after the sign. + // Ex: StringToDouble("- 123.2") -> -123.2. + // StringToDouble("+ 123.2") -> 123.2 + // +@@ -502,19 +503,24 @@ + // in the 'processed_characters_count'. Trailing junk is never included. + double StringToDouble(const char* buffer, + int length, +- int* processed_characters_count) { +- return StringToIeee(buffer, length, processed_characters_count, true); +- } ++ int* processed_characters_count) const; ++ ++ // Same as StringToDouble above but for 16 bit characters. ++ double StringToDouble(const uc16* buffer, ++ int length, ++ int* processed_characters_count) const; + + // Same as StringToDouble but reads a float. + // Note that this is not equivalent to static_cast(StringToDouble(...)) + // due to potential double-rounding. + float StringToFloat(const char* buffer, + int length, +- int* processed_characters_count) { +- return static_cast(StringToIeee(buffer, length, +- processed_characters_count, false)); +- } ++ int* processed_characters_count) const; ++ ++ // Same as StringToFloat above but for 16 bit characters. ++ float StringToFloat(const uc16* buffer, ++ int length, ++ int* processed_characters_count) const; + + private: + const int flags_; +@@ -523,10 +529,11 @@ + const char* const infinity_symbol_; + const char* const nan_symbol_; + +- double StringToIeee(const char* buffer, ++ template ++ double StringToIeee(Iterator start_pointer, + int length, +- int* processed_characters_count, +- bool read_as_double); ++ bool read_as_double, ++ int* processed_characters_count) const; + + DISALLOW_IMPLICIT_CONSTRUCTORS(StringToDoubleConverter); + }; + +--- a/src/3rdparty/double-conversion/fast-dtoa.cc ++++ b/src/3rdparty/double-conversion/fast-dtoa.cc +@@ -248,10 +248,7 @@ + // Note: kPowersOf10[i] == 10^(i-1). + exponent_plus_one_guess++; + // We don't have any guarantees that 2^number_bits <= number. +- // TODO(floitsch): can we change the 'while' into an 'if'? We definitely see +- // number < (2^number_bits - 1), but I haven't encountered +- // number < (2^number_bits - 2) yet. +- while (number < kSmallPowersOfTen[exponent_plus_one_guess]) { ++ if (number < kSmallPowersOfTen[exponent_plus_one_guess]) { + exponent_plus_one_guess--; + } + *power = kSmallPowersOfTen[exponent_plus_one_guess]; +@@ -350,7 +347,8 @@ + // that is smaller than integrals. + while (*kappa > 0) { + int digit = integrals / divisor; +- buffer[*length] = '0' + digit; ++ ASSERT(digit <= 9); ++ buffer[*length] = static_cast('0' + digit); + (*length)++; + integrals %= divisor; + (*kappa)--; +@@ -379,13 +377,14 @@ + ASSERT(one.e() >= -60); + ASSERT(fractionals < one.f()); + ASSERT(UINT64_2PART_C(0xFFFFFFFF, FFFFFFFF) / 10 >= one.f()); +- while (true) { ++ for (;;) { + fractionals *= 10; + unit *= 10; + unsafe_interval.set_f(unsafe_interval.f() * 10); + // Integer division by one. + int digit = static_cast(fractionals >> -one.e()); +- buffer[*length] = '0' + digit; ++ ASSERT(digit <= 9); ++ buffer[*length] = static_cast('0' + digit); + (*length)++; + fractionals &= one.f() - 1; // Modulo by one. + (*kappa)--; +@@ -459,7 +458,8 @@ + // that is smaller than 'integrals'. + while (*kappa > 0) { + int digit = integrals / divisor; +- buffer[*length] = '0' + digit; ++ ASSERT(digit <= 9); ++ buffer[*length] = static_cast('0' + digit); + (*length)++; + requested_digits--; + integrals %= divisor; +@@ -492,7 +492,8 @@ + w_error *= 10; + // Integer division by one. + int digit = static_cast(fractionals >> -one.e()); +- buffer[*length] = '0' + digit; ++ ASSERT(digit <= 9); ++ buffer[*length] = static_cast('0' + digit); + (*length)++; + requested_digits--; + fractionals &= one.f() - 1; // Modulo by one. + +--- a/src/3rdparty/double-conversion/fixed-dtoa.cc ++++ b/src/3rdparty/double-conversion/fixed-dtoa.cc +@@ -133,7 +133,7 @@ + while (number != 0) { + int digit = number % 10; + number /= 10; +- buffer[(*length) + number_length] = '0' + digit; ++ buffer[(*length) + number_length] = static_cast('0' + digit); + number_length++; + } + // Exchange the digits. +@@ -150,10 +150,8 @@ + } + + +-static void FillDigits64FixedLength(uint64_t number, int requested_length, ++static void FillDigits64FixedLength(uint64_t number, + Vector buffer, int* length) { +- (void) requested_length; +- + const uint32_t kTen7 = 10000000; + // For efficiency cut the number into 3 uint32_t parts, and print those. + uint32_t part2 = static_cast(number % kTen7); +@@ -255,7 +253,8 @@ + fractionals *= 5; + point--; + int digit = static_cast(fractionals >> point); +- buffer[*length] = '0' + digit; ++ ASSERT(digit <= 9); ++ buffer[*length] = static_cast('0' + digit); + (*length)++; + fractionals -= static_cast(digit) << point; + } +@@ -276,7 +275,8 @@ + fractionals128.Multiply(5); + point--; + int digit = fractionals128.DivModPowerOf2(point); +- buffer[*length] = '0' + digit; ++ ASSERT(digit <= 9); ++ buffer[*length] = static_cast('0' + digit); + (*length)++; + } + if (fractionals128.BitAt(point - 1) == 1) { +@@ -360,7 +360,7 @@ + remainder = (dividend % divisor) << exponent; + } + FillDigits32(quotient, buffer, length); +- FillDigits64FixedLength(remainder, divisor_power, buffer, length); ++ FillDigits64FixedLength(remainder, buffer, length); + *decimal_point = *length; + } else if (exponent >= 0) { + // 0 <= exponent <= 11 + +--- a/src/3rdparty/double-conversion/ieee.h ++++ b/src/3rdparty/double-conversion/ieee.h +@@ -256,6 +256,8 @@ + return (significand & kSignificandMask) | + (biased_exponent << kPhysicalSignificandSize); + } ++ ++ DISALLOW_COPY_AND_ASSIGN(Double); + }; + + class Single { +@@ -391,6 +393,8 @@ + static const uint32_t kNaN = 0x7FC00000; + + const uint32_t d32_; ++ ++ DISALLOW_COPY_AND_ASSIGN(Single); + }; + + } // namespace double_conversion + +--- a/src/3rdparty/double-conversion/strtod.cc ++++ b/src/3rdparty/double-conversion/strtod.cc +@@ -137,7 +137,7 @@ + Vector right_trimmed = TrimTrailingZeros(left_trimmed); + exponent += left_trimmed.length() - right_trimmed.length(); + if (right_trimmed.length() > kMaxSignificantDecimalDigits) { +- (void)space_size; // Silence unused parameter warning in release build ++ (void) space_size; // Mark variable as used. + ASSERT(space_size >= kMaxSignificantDecimalDigits); + CutToMaxSignificantDigits(right_trimmed, exponent, + buffer_copy_space, updated_exponent); +@@ -264,7 +264,6 @@ + case 7: return DiyFp(UINT64_2PART_C(0x98968000, 00000000), -40); + default: + UNREACHABLE(); +- return DiyFp(0, 0); + } + } + +@@ -516,7 +515,7 @@ + double double_next2 = Double(double_next).NextDouble(); + f4 = static_cast(double_next2); + } +- (void)f2; // Silence unused parameter warning in release builds ++ (void) f2; // Mark variable as used. + ASSERT(f1 <= f2 && f2 <= f3 && f3 <= f4); + + // If the guess doesn't lie near a single-precision boundary we can simply + +--- a/src/3rdparty/double-conversion/utils.h ++++ b/src/3rdparty/double-conversion/utils.h +@@ -33,17 +33,14 @@ + + #include + #ifndef ASSERT +-# if defined(WINCE) || defined(_WIN32_WCE) +-# define ASSERT(condition) +-# else +-# define ASSERT(condition) (assert(condition)) +-# endif ++#define ASSERT(condition) \ ++ assert(condition); + #endif + #ifndef UNIMPLEMENTED +-# define UNIMPLEMENTED() (exit(-1)) ++#define UNIMPLEMENTED() (abort()) + #endif + #ifndef UNREACHABLE +-# define UNREACHABLE() (exit(-1)) ++#define UNREACHABLE() (abort()) + #endif + + // Double operations detection based on target architecture. +@@ -57,12 +54,14 @@ + // disabled.) + // On Linux,x86 89255e-22 != Div_double(89255.0/1e22) + #if defined(_M_X64) || defined(__x86_64__) || \ +- defined(__ARMEL__) || defined(__avr32__) || _M_ARM_FP || \ ++ defined(__ARMEL__) || defined(__avr32__) || \ + defined(__hppa__) || defined(__ia64__) || \ +- defined(__mips__) || defined(__powerpc__) || \ ++ defined(__mips__) || \ ++ defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ + defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ + defined(__SH4__) || defined(__alpha__) || \ +- defined(_MIPS_ARCH_MIPS32R2) ++ defined(_MIPS_ARCH_MIPS32R2) || \ ++ defined(__AARCH64EL__) + #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 + #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) + #if defined(_WIN32) +@@ -71,12 +70,15 @@ + #else + #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS + #endif // _WIN32 +-#elif defined(WINCE) || defined(_WIN32_WCE) +-#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 + #else + #error Target architecture was not detected as supported by Double-Conversion. + #endif + ++#if defined(__GNUC__) ++#define DOUBLE_CONVERSION_UNUSED __attribute__((unused)) ++#else ++#define DOUBLE_CONVERSION_UNUSED ++#endif + + #if defined(_WIN32) && !defined(__MINGW32__) + +@@ -95,6 +97,8 @@ + #include + + #endif ++ ++typedef uint16_t uc16; + + // The following macro works on both 32 and 64-bit platforms. + // Usage: instead of writing 0x1234567890123456 +@@ -302,8 +306,8 @@ + inline Dest BitCast(const Source& source) { + // Compile time assertion: sizeof(Dest) == sizeof(Source) + // A compile error here means your Dest and Source have different sizes. +- char VerifySizesAreEqual[sizeof(Dest) == sizeof(Source) ? 1 : -1]; +- (void) VerifySizesAreEqual; ++ DOUBLE_CONVERSION_UNUSED ++ typedef char VerifySizesAreEqual[sizeof(Dest) == sizeof(Source) ? 1 : -1]; + + Dest dest; + memmove(&dest, &source, sizeof(dest)); + + diff --git a/libqt5-qtdeclarative.changes b/libqt5-qtdeclarative.changes index 6f35b1b..f6ec5f5 100644 --- a/libqt5-qtdeclarative.changes +++ b/libqt5-qtdeclarative.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Mon Feb 10 10:35:16 UTC 2014 - mlin@suse.com + +- Add License files to %doc + +------------------------------------------------------------------- +Wed Feb 5 17:07:24 UTC 2014 - hrvoje.senjan@gmail.com + +- Update to 5.2.1: + * For more details please see: + http://blog.qt.digia.com/blog/2014/02/05/qt-5-2-1-released/ +- Remove libtool archives from packages +- Added aarch64-support.patch from upstream (merged for 5.3) + ------------------------------------------------------------------- Mon Dec 16 23:19:32 UTC 2013 - hrvoje.senjan@gmail.com diff --git a/libqt5-qtdeclarative.spec b/libqt5-qtdeclarative.spec index f1f263a..d4dac0e 100644 --- a/libqt5-qtdeclarative.spec +++ b/libqt5-qtdeclarative.spec @@ -1,7 +1,7 @@ # # spec file for package libqt5-qtdeclarative # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,24 +16,42 @@ # +%define qt5_snapshot 0 + %define libname libQtQuick5 Name: libqt5-qtdeclarative -Version: 5.2.0 +Version: 5.2.1 Release: 0 Summary: Qt 5 Declarative Library License: SUSE-LGPL-2.1-with-digia-exception-1.1 or GPL-3.0 Group: Development/Libraries/X11 Url: http://qt.digia.com -Source: %{tar_version}.tar.xz -BuildRequires: fdupes -BuildRequires: libqt5-qtsvg-devel >= %{version} %define base_name libqt5 -%define real_version 5.2.0 -%define so_version 5.2.0 +%define real_version 5.2.1 +%define so_version 5.2.1 +%if %qt5_snapshot +%define tar_version qtdeclarative-%{real_version} +%else %define tar_version qtdeclarative-opensource-src-%{real_version} -BuildRequires: libqt5-qtxmlpatterns-devel >= %{version} -BuildRequires: libqt5-qtbase-private-headers-devel >= %{version} +%endif +Source: %{tar_version}.tar.xz +# PATCH-FIX-UPSTREAM aarch64-support.patch -- add support for aarch64 +Patch0: aarch64-support.patch +BuildRequires: fdupes +BuildRequires: libQt5Core-private-headers-devel >= %{version} +BuildRequires: libQt5Gui-private-headers-devel >= %{version} +BuildRequires: libQt5Test-private-headers-devel >= %{version} +BuildRequires: pkgconfig(Qt5Core) >= %{version} +BuildRequires: pkgconfig(Qt5Gui) >= %{version} +BuildRequires: pkgconfig(Qt5Network) >= %{version} +BuildRequires: pkgconfig(Qt5Sql) >= %{version} +BuildRequires: pkgconfig(Qt5Widgets) >= %{version} +BuildRequires: pkgconfig(Qt5XmlPatterns) >= %{version} +%if %qt5_snapshot +#to create the forwarding headers +BuildRequires: perl +%endif BuildRequires: xz BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -45,7 +63,12 @@ This package contains base tools, like string, xml, and network handling. %prep +%if %qt5_snapshot +%setup -q -n qtdeclarative-%{real_version} +%else %setup -q -n qtdeclarative-opensource-src-%{real_version} +%endif +%patch0 -p1 %package -n %libname Summary: Qt 5 Declarative Library @@ -61,12 +84,8 @@ handling. Summary: Qt Development Kit Group: Development/Libraries/X11 Requires: %libname = %{version} -Requires: libqt5-qtsvg-devel >= %{version} -Requires: libqt5-qtxmlpatterns-devel >= %{version} -Requires: libqt5-qtbase-devel >= %{version} Provides: libQt5Quick-devel = %{version} -# TODO: change to < on 5.2.1 update -Obsoletes: libQt5Quick-devel <= %{version} +Obsoletes: libQt5Quick-devel < %{version} %description devel You need this package, if you want to compile programs with qtdeclarative. @@ -75,10 +94,11 @@ You need this package, if you want to compile programs with qtdeclarative. Summary: Non-ABI stable experimental API Group: Development/Libraries/C and C++ Requires: %{name}-devel = %{version} -Requires: libqt5-qtbase-private-headers-devel >= %{version} +Requires: libQt5Core-private-headers-devel >= %{version} +Requires: libQt5Gui-private-headers-devel >= %{version} +Requires: libQt5Test-private-headers-devel >= %{version} Provides: libQt5Quick-private-headers-devel = %{version} -# TODO: change to < on 5.2.1 update -Obsoletes: libQt5Quick-private-headers-devel <= %{version} +Obsoletes: libQt5Quick-private-headers-devel < %{version} %description private-headers-devel This package provides private headers of libqt5-qtdeclarative that are normally @@ -91,6 +111,10 @@ the exact Qt version. %postun -n %libname -p /sbin/ldconfig %build +%if %qt5_snapshot +#force the configure script to generate the forwarding headers (it checks whether .git directory exists) +mkdir .git +%endif %qmake5 %make_jobs @@ -98,24 +122,32 @@ the exact Qt version. %qmake5_install find %{buildroot}/%{_libdir} -type f -name '*la' -print -exec perl -pi -e 's, -L%{_builddir}/\S+,,g' {} \; find %{buildroot}/%{_libdir}/pkgconfig -type f -name '*pc' -print -exec perl -pi -e 's, -L%{_builddir}/\S+,,g' {} \; +# kill .la files +rm -f %{buildroot}%{_libqt5_libdir}/lib*.la -# put all the binaries to %{_bindir}, add -qt5 suffix, and symlink them back to %_qt5_bindir -mkdir %{buildroot}%{_bindir} +# put all the binaries to %%_bindir, add -qt5 suffix, and symlink them back to %%_qt5_bindir +mkdir -p %{buildroot}%{_bindir} pushd %{buildroot}%{_libqt5_bindir} for i in * ; do + case "${i}" in + qmlplugindump|qmlprofiler) mv $i ../../../bin/${i}-qt5 ln -s ../../../bin/${i}-qt5 . ln -s ../../../bin/${i}-qt5 $i + ;; + *) + mv $i ../../../bin/ + ln -s ../../../bin/$i . + ;; + esac done popd -%fdupes %{buildroot}/%{_lib}qt5_includedir - -%clean -rm -rf %{buildroot} +%fdupes -s %{buildroot}/%{_libqt5_includedir} %files -n %libname %defattr(-,root,root,755) +%doc LGPL_EXCEPTION.txt LICENSE.FDL LICENSE.GPL LICENSE.LGPL %{_libqt5_libdir}/libQt5Q*.so.* %{_libqt5_archdatadir}/qml/QtQuick %{_libqt5_archdatadir}/qml/QtQuick.2 @@ -131,16 +163,17 @@ rm -rf %{buildroot} %files private-headers-devel %defattr(-,root,root,755) +%doc LGPL_EXCEPTION.txt LICENSE.FDL LICENSE.GPL LICENSE.LGPL %{_libqt5_includedir}/Qt*/%{so_version} %files devel %defattr(-,root,root,755) +%doc LGPL_EXCEPTION.txt LICENSE.FDL LICENSE.GPL LICENSE.LGPL %{_bindir}/* %{_libqt5_bindir}/* %exclude %{_libqt5_includedir}/Qt*/%{so_version} %{_libqt5_includedir}/Qt* %{_libqt5_libdir}/cmake/Qt5* -%{_libqt5_libdir}/libQt5*.la %{_libqt5_libdir}/libQt5*.prl %{_libqt5_libdir}/libQt5Q*.so %{_libqt5_libdir}/libQt5Q*.a diff --git a/qtdeclarative-opensource-src-5.2.0.tar.xz b/qtdeclarative-opensource-src-5.2.0.tar.xz deleted file mode 100644 index edc6b2d..0000000 --- a/qtdeclarative-opensource-src-5.2.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b81bd480216fda8ff1d96610e710ff5ca17e0d711c8e40753264f91a4e8f6d19 -size 17544756 diff --git a/qtdeclarative-opensource-src-5.2.1.tar.xz b/qtdeclarative-opensource-src-5.2.1.tar.xz new file mode 100644 index 0000000..a1dcf8b --- /dev/null +++ b/qtdeclarative-opensource-src-5.2.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e32b8d6e1d64ca4bdfa92d15f9b4217a1b24239ef40e8826eeccbe918866690 +size 17566720