check_system_double-conversion
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Fri, 7 Oct 2016 07:03:28 +0000 (07:03 +0000)
committerDmitry Shachnev <mitya57@debian.org>
Fri, 7 Oct 2016 07:03:28 +0000 (07:03 +0000)
Gbp-Pq: Name check_system_double-conversion.patch

config.tests/double-conversion/double-conversion.pro [new file with mode: 0644]
config.tests/double-conversion/main.cpp [new file with mode: 0644]
qtdeclarative.pro
src/qml/jsruntime/jsruntime.pri
src/qml/jsruntime/qv4numberobject.cpp
src/qml/jsruntime/qv4runtime.cpp

diff --git a/config.tests/double-conversion/double-conversion.pro b/config.tests/double-conversion/double-conversion.pro
new file mode 100644 (file)
index 0000000..a848519
--- /dev/null
@@ -0,0 +1,6 @@
+CONFIG -= qt
+CONFIG += console
+
+SOURCES += main.cpp
+
+LIBS += -ldouble-conversion
diff --git a/config.tests/double-conversion/main.cpp b/config.tests/double-conversion/main.cpp
new file mode 100644 (file)
index 0000000..d7c3381
--- /dev/null
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Lisandro Damián Nicanor Pérez Meyer
+**                    <perezmeyer@gmail.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtQml module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <double-conversion/double-conversion.h>
+
+using namespace double_conversion;
+
+int main(int, char**)
+{
+    DoubleToStringConverter(0,"inf","nan",'e',-2,5,3,3);
+    return 0;
+}
index 5b94da9b694be2855f194de3674d3f4d5cb70e95..30d40e22f5b2a78250a7198282e3e939c16a8c89 100644 (file)
@@ -1,4 +1,10 @@
 CONFIG += tests_need_tools examples_need_tools
+
+linux {
+    load(configure)
+    qtCompileTest(double-conversion)
+}
+
 load(qt_parts)
 
 !python_available {
index 5ffdebe3283d438e709b3be0a95256bc7c628287..0e5ac70bdf698b184ddc21a368a72dd9ea6b3841 100644 (file)
@@ -113,4 +113,9 @@ valgrind {
 
 ios: DEFINES += ENABLE_ASSEMBLER_WX_EXCLUSIVE=1
 
-include(../../3rdparty/double-conversion/double-conversion.pri)
+config_double-conversion {
+    DEFINES += SYSTEM_DOUBLECONVERSION
+    LIBS_PRIVATE += -ldouble-conversion
+} else {
+    include(../../3rdparty/double-conversion/double-conversion.pri)
+}
index 4ae30a7f35296fe82f84d285ad768989a7aea083..489b4425bd05a0c5662a3ed3e24e7ba7ec503c1f 100644 (file)
 #include <QtCore/qmath.h>
 #include <QtCore/QDebug>
 #include <cassert>
+
+#ifdef SYSTEM_DOUBLECONVERSION
+#include <double-conversion/double-conversion.h>
+#else
 #include <double-conversion.h>
+#endif
 
 using namespace QV4;
 
index d8ae7d4e92574ed00a5096a52785c1e8565202db..b169466d7e4465e2011cbbbfe4d3d4d9263a9bf3 100644 (file)
 
 #include <wtf/MathExtras.h>
 
-#include "../../3rdparty/double-conversion/double-conversion.h"
+#ifdef SYSTEM_DOUBLECONVERSION
+#include <double-conversion/double-conversion.h>
+#else
+#include <double-conversion.h>
+#endif
 
 #ifdef QV4_COUNT_RUNTIME_FUNCTIONS
 #  include <QtCore/QBuffer>