Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Add QtWebkit configuration tests #12898

Merged
merged 1 commit into from
May 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/qt/qtwebkit/Tools/qmake/config.tests/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This directory is used for configure-style checks that are run by
syncqt during processing of configure.pro in the parent directory.

Note: This feature is available in Qt 5 only.
31 changes: 31 additions & 0 deletions src/qt/qtwebkit/Tools/qmake/config.tests/fontconfig/fontconfig.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (C) 2011 University of Szeged. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include <fontconfig/fontconfig.h>

int main(int, char**)
{
FcInit();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG -= qt
SOURCES = fontconfig.cpp
CONFIG += link_pkgconfig
PKGCONFIG += fontconfig
34 changes: 34 additions & 0 deletions src/qt/qtwebkit/Tools/qmake/config.tests/gccdepends/gccdepends.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
TEMPLATE = aux
OBJECTS_DIR = obj
QMAKE_CXXFLAGS += -MD

base_filename = empty
object_file = $$OBJECTS_DIR/$${base_filename}.o
deps_filename = $${base_filename}.d

SOURCES += $${base_filename}.cpp

test.commands = \
# Earlier teambuilder and icecream versions would not
# respect the -o argument for the .d file, so the file
# would end up in the root build dir.
test ! -f $${deps_filename} && \
\
# But it should end up in the OBJECTS_DIR
test -f $$OBJECTS_DIR/$${deps_filename} && \
\
# Icecream 0.9.7 and earlier does not ensure that the
# target rule matches the path of the .o file, since
# the file is compiled into the current dir and then
# moved. Verify that we don't hit that case.
grep -q \"$${object_file}:\" $$OBJECTS_DIR/$${deps_filename} && \
\
# If everything is all right we mark the test as succeeded
echo success > $$basename(PWD)

test.depends = $${object_file}
QMAKE_EXTRA_TARGETS += test

default.target = all
default.depends += test
QMAKE_EXTRA_TARGETS += default
36 changes: 36 additions & 0 deletions src/qt/qtwebkit/Tools/qmake/config.tests/glx/glx.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include <GL/glx.h>

int main(int, char**)
{
Display* display = XOpenDisplay(0);
int items = 0;
(void)glXChooseFBConfig(display, DefaultScreen(display), 0, &items);
XCloseDisplay(display);

return 0;
}
4 changes: 4 additions & 0 deletions src/qt/qtwebkit/Tools/qmake/config.tests/glx/glx.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SOURCES = glx.cpp
OBJECTS_DIR = obj
LIBS += -lX11 -lGL

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*' />
</dependentAssembly>
</dependency>
</assembly>
4 changes: 4 additions & 0 deletions src/qt/qtwebkit/Tools/qmake/config.tests/gnuld/gnuld.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TEMPLATE = app
TARGET = gnuld
SOURCES = main.cpp
QMAKE_LFLAGS += -Wl,--no-keep-memory
5 changes: 5 additions & 0 deletions src/qt/qtwebkit/Tools/qmake/config.tests/gnuld/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

int main()
{
return 0;
}
46 changes: 46 additions & 0 deletions src/qt/qtwebkit/Tools/qmake/config.tests/icu/icu.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the config.tests 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 <unicode/utypes.h>
#include <unicode/ucol.h>
#include <unicode/ustring.h>

int main(int, char **)
{
UErrorCode status = U_ZERO_ERROR;
UCollator *collator = ucol_open("ru_RU", &status);
if (U_FAILURE(status))
return 0;
ucol_close(collator);
return 0;
}
22 changes: 22 additions & 0 deletions src/qt/qtwebkit/Tools/qmake/config.tests/icu/icu.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
SOURCES = icu.cpp
CONFIG += console
CONFIG -= qt dylib

win32 {
CONFIG(static, static|shared) {
CONFIG(debug, debug|release) {
LIBS += -lsicuind -lsicuucd -lsicudtd
} else {
LIBS += -lsicuin -lsicuuc -lsicudt
}
} else {
LIBS += -licuin -licuuc -licudt
}
LIBS += -ladvapi32
} else:!contains(QT_CONFIG,no-pkg-config):packagesExist("icu-i18n") {
PKGCONFIG += icu-i18n
} else {
LIBS += -licui18n -licuuc -licudata
}

load(qt_build_config)
28 changes: 28 additions & 0 deletions src/qt/qtwebkit/Tools/qmake/config.tests/leveldb/leveldb.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
Copyright (C) 2014 Digia Plc. and/or its subsidiary(-ies)

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.

You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/

#include <leveldb/db.h>
#include <leveldb/env.h>
#include <helpers/memenv/memenv.h>

int main(int, char**)
{
leveldb::Env* inMemoryEnv = leveldb::NewMemEnv(leveldb::Env::Default());
return !inMemoryEnv;
}
5 changes: 5 additions & 0 deletions src/qt/qtwebkit/Tools/qmake/config.tests/leveldb/leveldb.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SOURCES = leveldb.cpp
OBJECTS_DIR = obj
LIBS += -lleveldb -lmemenv

load(qt_build_config)
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include <X11/extensions/Xcomposite.h>

int main(int, char**)
{
Display* display = XOpenDisplay(0);
int majorVersion;
int minorVersion;
(void)XCompositeQueryVersion(display, &majorVersion, &minorVersion);
XCloseDisplay(display);
return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SOURCES = libXcomposite.cpp
OBJECTS_DIR = obj
LIBS += -lXcomposite -lX11
37 changes: 37 additions & 0 deletions src/qt/qtwebkit/Tools/qmake/config.tests/libXrender/libXrender.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include <X11/extensions/Xrender.h>

int main(int, char**)
{
Display* display = XOpenDisplay(0);
int eventBasep;
int errorBasep;
if (!XRenderQueryExtension(display, &eventBasep, &errorBasep))
return -1;
return 0;
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SOURCES = libXrender.cpp
OBJECTS_DIR = obj
LIBS += -lXrender -lX11
33 changes: 33 additions & 0 deletions src/qt/qtwebkit/Tools/qmake/config.tests/libwebp/libwebp.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright (C) Zoltan Horvath (zoltan@webkit.org) 2012 University of Szeged.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "webp/decode.h"

int main(int, char**)
{
WebPDecoderConfig config;
WebPInitDecoderConfig(&config);
return 0;
}
5 changes: 5 additions & 0 deletions src/qt/qtwebkit/Tools/qmake/config.tests/libwebp/libwebp.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SOURCES = libwebp.cpp
OBJECTS_DIR = obj
LIBS += -lwebp

load(qt_build_config)
Loading