diff options
Diffstat (limited to 'packages/x11-libs/qtbase')
4 files changed, 0 insertions, 1108 deletions
diff --git a/packages/x11-libs/qtbase/files/qtbase-Revert-QTemporaryFile-Add-support-for-Linux-s-O_TMPF.patch b/packages/x11-libs/qtbase/files/qtbase-Revert-QTemporaryFile-Add-support-for-Linux-s-O_TMPF.patch deleted file mode 100644 index 7426e21..0000000 --- a/packages/x11-libs/qtbase/files/qtbase-Revert-QTemporaryFile-Add-support-for-Linux-s-O_TMPF.patch +++ /dev/null @@ -1,648 +0,0 @@ -Upstream: no -Reason: qmake fails when installing under sydbox - -From bb93dd016f2174339ae511608e998a1ceb3cab52 Mon Sep 17 00:00:00 2001 -From: Heiko Becker <heirecka@exherbo.org> -Date: Fri, 16 Feb 2018 15:22:27 +0100 -Subject: [PATCH 1/2] Revert "QTemporaryFile: hide the O_TMPFILE feature behind - a check for linkat()" - -This reverts commit 490b24b06408e90e9684d8331fd3fe8b0c51b0b5. ---- - src/corelib/configure.json | 15 --------------- - src/corelib/global/minimum-linux_p.h | 2 +- - src/corelib/global/qconfig-bootstrapped.h | 5 ----- - src/corelib/io/qtemporaryfile_p.h | 2 +- - 4 files changed, 2 insertions(+), 22 deletions(-) - -diff --git a/src/corelib/configure.json b/src/corelib/configure.json -index 8cd73d6ce4..fdb0fca66e 100644 ---- a/src/corelib/configure.json -+++ b/src/corelib/configure.json -@@ -349,15 +349,6 @@ - "qmake": "linux: LIBS += -lpthread -lrt" - } - }, -- "linkat": { -- "label": "linkat()", -- "type": "compile", -- "test": { -- "head": "#define _ATFILE_SOURCE 1", -- "include": [ "fcntl.h", "unistd.h" ], -- "main": "linkat(AT_FDCWD, \"foo\", AT_FDCWD, \"bar\", AT_SYMLINK_FOLLOW);" -- } -- }, - "ppoll": { - "label": "ppoll()", - "type": "compile", -@@ -549,12 +540,6 @@ - "condition": "libs.journald", - "output": [ "privateFeature" ] - }, -- "linkat": { -- "label": "linkat()", -- "autoDetect": "config.linux", -- "condition": "tests.linkat", -- "output": [ "privateFeature" ] -- }, - "std-atomic64": { - "label": "64 bit atomic operations", - "condition": "libs.libatomic", -diff --git a/src/corelib/global/minimum-linux_p.h b/src/corelib/global/minimum-linux_p.h -index bad2488b4d..324744b856 100644 ---- a/src/corelib/global/minimum-linux_p.h -+++ b/src/corelib/global/minimum-linux_p.h -@@ -67,7 +67,7 @@ QT_BEGIN_NAMESPACE - * - inotify_init1 before 2.6.12-rc12 - * - futex(2) before 2.6.12-rc12 - * - FUTEX_WAKE_OP 2.6.14 FUTEX_OP -- * - linkat(2) 2.6.17 O_TMPFILE && QT_CONFIG(linkat) -+ * - linkat(2) 2.6.17 O_TMPFILE - * - FUTEX_PRIVATE_FLAG 2.6.22 - * - O_CLOEXEC 2.6.23 - * - eventfd 2.6.23 -diff --git a/src/corelib/global/qconfig-bootstrapped.h b/src/corelib/global/qconfig-bootstrapped.h -index dabb715607..2164d7f21f 100644 ---- a/src/corelib/global/qconfig-bootstrapped.h -+++ b/src/corelib/global/qconfig-bootstrapped.h -@@ -87,11 +87,6 @@ - #define QT_FEATURE_futimens -1 - #define QT_FEATURE_futimes -1 - #define QT_FEATURE_library -1 --#ifdef __linux__ --# define QT_FEATURE_linkat 1 --#else --# define QT_FEATURE_linkat -1 --#endif - #define QT_NO_QOBJECT - #define QT_FEATURE_process -1 - #define QT_FEATURE_renameat2 -1 -diff --git a/src/corelib/io/qtemporaryfile_p.h b/src/corelib/io/qtemporaryfile_p.h -index fb8887af53..6f98ceed90 100644 ---- a/src/corelib/io/qtemporaryfile_p.h -+++ b/src/corelib/io/qtemporaryfile_p.h -@@ -58,7 +58,7 @@ - #include "private/qfile_p.h" - #include "qtemporaryfile.h" - --#if defined(Q_OS_LINUX) && QT_CONFIG(linkat) -+#ifdef Q_OS_LINUX - # include <fcntl.h> - # ifdef O_TMPFILE - // some early libc support had the wrong values for O_TMPFILE --- -2.16.1 - - -From 93a451315dee5dd7cc482af7263681342beb72bc Mon Sep 17 00:00:00 2001 -From: Heiko Becker <heirecka@exherbo.org> -Date: Fri, 16 Feb 2018 15:29:14 +0100 -Subject: [PATCH 2/2] Revert "QTemporaryFile: Add support for Linux's - O_TMPFILE" - -This reverts commit 189e9c93d7ed42202ad51507c8944d64e9a7888d. - -Change-Id: I5e8e17c66320f0e58a47f0cf35d0f59e0c7d40d2 ---- - src/corelib/io/qfile.cpp | 8 +- - src/corelib/io/qtemporaryfile.cpp | 192 ++------------------- - src/corelib/io/qtemporaryfile_p.h | 18 -- - .../io/qtemporaryfile/tst_qtemporaryfile.cpp | 81 +-------- - .../qnetworkdiskcache/tst_qnetworkdiskcache.cpp | 1 - - 5 files changed, 20 insertions(+), 280 deletions(-) - -diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp -index e4888e9523..36b2467253 100644 ---- a/src/corelib/io/qfile.cpp -+++ b/src/corelib/io/qfile.cpp -@@ -557,9 +557,7 @@ bool - QFile::rename(const QString &newName) - { - Q_D(QFile); -- -- // if this is a QTemporaryFile, the virtual fileName() call here may do something -- if (fileName().isEmpty()) { -+ if (d->fileName.isEmpty()) { - qWarning("QFile::rename: Empty or null file name"); - return false; - } -@@ -720,7 +718,7 @@ bool - QFile::link(const QString &linkName) - { - Q_D(QFile); -- if (fileName().isEmpty()) { -+ if (d->fileName.isEmpty()) { - qWarning("QFile::link: Empty or null file name"); - return false; - } -@@ -766,7 +764,7 @@ bool - QFile::copy(const QString &newName) - { - Q_D(QFile); -- if (fileName().isEmpty()) { -+ if (d->fileName.isEmpty()) { - qWarning("QFile::copy: Empty or null file name"); - return false; - } -diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp -index 35699d52df..1b4dcd4ff1 100644 ---- a/src/corelib/io/qtemporaryfile.cpp -+++ b/src/corelib/io/qtemporaryfile.cpp -@@ -1,7 +1,6 @@ - /**************************************************************************** - ** - ** Copyright (C) 2016 The Qt Company Ltd. --** Copyright (C) 2017 Intel Corporation. - ** Contact: https://www.qt.io/licensing/ - ** - ** This file is part of the QtCore module of the Qt Toolkit. -@@ -265,53 +264,6 @@ static bool createFileFromTemplate(NativeFileHandle &file, QTemporaryFileName &t - return false; - } - --enum class CreateUnnamedFileStatus { -- Success = 0, -- NotSupported, -- OtherError --}; -- --static CreateUnnamedFileStatus --createUnnamedFile(NativeFileHandle &file, QTemporaryFileName &tfn, quint32 mode, QSystemError *error) --{ --#ifdef LINUX_UNNAMED_TMPFILE -- // first, check if we have /proc, otherwise can't make the file exist later -- // (no error message set, as caller will try regular temporary file) -- if (!qt_haveLinuxProcfs()) -- return CreateUnnamedFileStatus::NotSupported; -- -- const char *p = "."; -- int lastSlash = tfn.path.lastIndexOf('/'); -- if (lastSlash != -1) { -- tfn.path[lastSlash] = '\0'; -- p = tfn.path.data(); -- } -- -- file = QT_OPEN(p, O_TMPFILE | QT_OPEN_RDWR | QT_OPEN_LARGEFILE, -- static_cast<mode_t>(mode)); -- if (file != -1) -- return CreateUnnamedFileStatus::Success; -- -- if (errno == EOPNOTSUPP || errno == EISDIR) { -- // fs or kernel doesn't support O_TMPFILE, so -- // put the slash back so we may try a regular file -- if (lastSlash != -1) -- tfn.path[lastSlash] = '/'; -- return CreateUnnamedFileStatus::NotSupported; -- } -- -- // real error -- *error = QSystemError(errno, QSystemError::NativeError); -- return CreateUnnamedFileStatus::OtherError; --#else -- Q_UNUSED(file); -- Q_UNUSED(tfn); -- Q_UNUSED(mode); -- Q_UNUSED(error); -- return CreateUnnamedFileStatus::NotSupported; --#endif --} -- - //************* QTemporaryFileEngine - QTemporaryFileEngine::~QTemporaryFileEngine() - { -@@ -361,24 +313,19 @@ bool QTemporaryFileEngine::open(QIODevice::OpenMode openMode) - NativeFileHandle &file = d->fd; - #endif - -- CreateUnnamedFileStatus st = createUnnamedFile(file, tfn, fileMode, &error); -- if (st == CreateUnnamedFileStatus::Success) { -- unnamedFile = true; -- d->fileEntry.clear(); -- } else if (st == CreateUnnamedFileStatus::NotSupported && -- createFileFromTemplate(file, tfn, fileMode, error)) { -- filePathIsTemplate = false; -- unnamedFile = false; -- d->fileEntry = QFileSystemEntry(tfn.path, QFileSystemEntry::FromNativePath()); -- } else { -+ if (!createFileFromTemplate(file, tfn, fileMode, error)) { - setError(QFile::OpenError, error.toString()); - return false; - } - -+ d->fileEntry = QFileSystemEntry(tfn.path, QFileSystemEntry::FromNativePath()); -+ - #if !defined(Q_OS_WIN) || defined(Q_OS_WINRT) - d->closeFileHandle = true; - #endif - -+ filePathIsTemplate = false; -+ - d->openMode = openMode; - d->lastFlushFailed = false; - d->tried_stat = 0; -@@ -393,9 +340,7 @@ bool QTemporaryFileEngine::remove() - // we must explicitly call QFSFileEngine::close() before we remove it. - d->unmapAll(); - QFSFileEngine::close(); -- if (isUnnamedFile()) -- return true; -- if (!filePathIsTemplate && QFSFileEngine::remove()) { -+ if (QFSFileEngine::remove()) { - d->fileEntry.clear(); - // If a QTemporaryFile is constructed using a template file path, the path - // is generated in QTemporaryFileEngine::open() and then filePathIsTemplate -@@ -410,22 +355,12 @@ bool QTemporaryFileEngine::remove() - - bool QTemporaryFileEngine::rename(const QString &newName) - { -- if (isUnnamedFile()) { -- bool ok = materializeUnnamedFile(newName, DontOverwrite); -- QFSFileEngine::close(); -- return ok; -- } - QFSFileEngine::close(); - return QFSFileEngine::rename(newName); - } - - bool QTemporaryFileEngine::renameOverwrite(const QString &newName) - { -- if (isUnnamedFile()) { -- bool ok = materializeUnnamedFile(newName, Overwrite); -- QFSFileEngine::close(); -- return ok; -- } - QFSFileEngine::close(); - return QFSFileEngine::renameOverwrite(newName); - } -@@ -438,91 +373,6 @@ bool QTemporaryFileEngine::close() - return true; - } - --QString QTemporaryFileEngine::fileName(QAbstractFileEngine::FileName file) const --{ -- if (isUnnamedFile()) { -- if (file == LinkName) { -- // we know our file isn't (won't be) a symlink -- return QString(); -- } -- -- // for all other cases, materialize the file -- const_cast<QTemporaryFileEngine *>(this)->materializeUnnamedFile(templateName, NameIsTemplate); -- } -- return QFSFileEngine::fileName(file); --} -- --bool QTemporaryFileEngine::materializeUnnamedFile(const QString &newName, QTemporaryFileEngine::MaterializationMode mode) --{ -- Q_ASSERT(isUnnamedFile()); -- --#ifdef LINUX_UNNAMED_TMPFILE -- Q_D(QFSFileEngine); -- const QByteArray src = "/proc/self/fd/" + QByteArray::number(d->fd); -- auto materializeAt = [=](const QFileSystemEntry &dst) { -- return ::linkat(AT_FDCWD, src, AT_FDCWD, dst.nativeFilePath(), AT_SYMLINK_FOLLOW) == 0; -- }; --#else -- auto materializeAt = [](const QFileSystemEntry &) { return false; }; --#endif -- -- auto success = [this](const QFileSystemEntry &entry) { -- filePathIsTemplate = false; -- unnamedFile = false; -- d_func()->fileEntry = entry; -- return true; -- }; -- -- auto materializeAsTemplate = [=](const QString &newName) { -- QTemporaryFileName tfn(newName); -- static const int maxAttempts = 16; -- for (int attempt = 0; attempt < maxAttempts; ++attempt) { -- tfn.generateNext(); -- QFileSystemEntry entry(tfn.path, QFileSystemEntry::FromNativePath()); -- if (materializeAt(entry)) -- return success(entry); -- } -- return false; -- }; -- -- if (mode == NameIsTemplate) { -- if (materializeAsTemplate(newName)) -- return true; -- } else { -- // Use linkat to materialize the file -- QFileSystemEntry dst(newName); -- if (materializeAt(dst)) -- return success(dst); -- -- if (errno == EEXIST && mode == Overwrite) { -- // retry by first creating a temporary file in the right dir -- if (!materializeAsTemplate(templateName)) -- return false; -- -- // then rename the materialized file to target (same as renameOverwrite) -- QFSFileEngine::close(); -- return QFSFileEngine::renameOverwrite(newName); -- } -- } -- -- // failed -- setError(QFile::RenameError, QSystemError(errno, QSystemError::NativeError).toString()); -- return false; --} -- --bool QTemporaryFileEngine::isUnnamedFile() const --{ --#ifdef LINUX_UNNAMED_TMPFILE -- if (unnamedFile) { -- Q_ASSERT(d_func()->fileEntry.isEmpty()); -- Q_ASSERT(filePathIsTemplate); -- } -- return unnamedFile; --#else -- return false; --#endif --} -- - //************* QTemporaryFilePrivate - - QTemporaryFilePrivate::QTemporaryFilePrivate() -@@ -559,17 +409,6 @@ void QTemporaryFilePrivate::resetFileEngine() const - tef->initialize(fileName, 0600, false); - } - --void QTemporaryFilePrivate::materializeUnnamedFile() --{ --#ifdef LINUX_UNNAMED_TMPFILE -- if (!fileName.isEmpty() || !fileEngine) -- return; -- -- auto *tef = static_cast<QTemporaryFileEngine *>(fileEngine); -- fileName = tef->fileName(QAbstractFileEngine::DefaultName); --#endif --} -- - QString QTemporaryFilePrivate::defaultTemplateName() - { - QString baseName; -@@ -789,10 +628,6 @@ void QTemporaryFile::setAutoRemove(bool b) - QString QTemporaryFile::fileName() const - { - Q_D(const QTemporaryFile); -- auto tef = static_cast<QTemporaryFileEngine *>(d->fileEngine); -- if (tef && tef->isReallyOpen()) -- const_cast<QTemporaryFilePrivate *>(d)->materializeUnnamedFile(); -- - if(d->fileName.isEmpty()) - return QString(); - return d->engine()->fileName(QAbstractFileEngine::DefaultName); -@@ -946,10 +781,11 @@ QTemporaryFile *QTemporaryFile::createNativeFile(QFile &file) - bool QTemporaryFile::open(OpenMode flags) - { - Q_D(QTemporaryFile); -- auto tef = static_cast<QTemporaryFileEngine *>(d->fileEngine); -- if (tef && tef->isReallyOpen()) { -- setOpenMode(flags); -- return true; -+ if (!d->fileName.isEmpty()) { -+ if (static_cast<QTemporaryFileEngine*>(d->engine())->isReallyOpen()) { -+ setOpenMode(flags); -+ return true; -+ } - } - - // reset the engine state so it creates a new, unique file name from the template; -@@ -960,11 +796,7 @@ bool QTemporaryFile::open(OpenMode flags) - d->resetFileEngine(); - - if (QFile::open(flags)) { -- tef = static_cast<QTemporaryFileEngine *>(d->fileEngine); -- if (tef->isUnnamedFile()) -- d->fileName.clear(); -- else -- d->fileName = tef->fileName(QAbstractFileEngine::DefaultName); -+ d->fileName = d->fileEngine->fileName(QAbstractFileEngine::DefaultName); - return true; - } - return false; -diff --git a/src/corelib/io/qtemporaryfile_p.h b/src/corelib/io/qtemporaryfile_p.h -index 6f98ceed90..4aa8ca876f 100644 ---- a/src/corelib/io/qtemporaryfile_p.h -+++ b/src/corelib/io/qtemporaryfile_p.h -@@ -58,17 +58,6 @@ - #include "private/qfile_p.h" - #include "qtemporaryfile.h" - --#ifdef Q_OS_LINUX --# include <fcntl.h> --# ifdef O_TMPFILE --// some early libc support had the wrong values for O_TMPFILE --// (see https://bugzilla.gnome.org/show_bug.cgi?id=769453#c18) --# if (O_TMPFILE & O_DIRECTORY) == O_DIRECTORY --# define LINUX_UNNAMED_TMPFILE --# endif --# endif --#endif -- - QT_BEGIN_NAMESPACE - - struct QTemporaryFileName -@@ -94,7 +83,6 @@ public: - - QAbstractFileEngine *engine() const override; - void resetFileEngine() const; -- void materializeUnnamedFile(); - - bool autoRemove = true; - QString templateName = defaultTemplateName(); -@@ -136,17 +124,11 @@ public: - bool rename(const QString &newName) override; - bool renameOverwrite(const QString &newName) override; - bool close() override; -- QString fileName(FileName file) const override; -- -- enum MaterializationMode { Overwrite, DontOverwrite, NameIsTemplate }; -- bool materializeUnnamedFile(const QString &newName, MaterializationMode mode); -- bool isUnnamedFile() const override final; - - const QString &templateName; - quint32 fileMode; - bool filePathIsTemplate; - bool filePathWasTemplate; -- bool unnamedFile = false; - }; - - #endif // QT_NO_TEMPORARYFILE -diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp -index dbc3d68e93..186bf5155d 100644 ---- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp -+++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp -@@ -1,7 +1,6 @@ - /**************************************************************************** - ** - ** Copyright (C) 2016 The Qt Company Ltd. --** Copyright (C) 2017 Intel Corporation. - ** Contact: https://www.qt.io/licensing/ - ** - ** This file is part of the test suite of the Qt Toolkit. -@@ -33,7 +32,6 @@ - #include <qtemporarydir.h> - #include <qtemporaryfile.h> - #include <qfile.h> --#include <qdatetime.h> - #include <qdir.h> - #include <qset.h> - #include <qtextcodec.h> -@@ -67,7 +65,7 @@ private slots: - void fileNameIsEmpty(); - void autoRemove(); - void nonWritableCurrentDir(); -- void io(); -+ void write(); - void openCloseOpenClose(); - void removeAndReOpen(); - void removeUnnamed(); -@@ -281,18 +279,6 @@ void tst_QTemporaryFile::autoRemove() - fileName = file.fileName(); - file.close(); - } -- QVERIFY(!fileName.isEmpty()); -- QVERIFY(!QFile::exists(fileName)); -- -- // same, but gets the file name after closing -- { -- QTemporaryFile file("tempXXXXXX"); -- file.setAutoRemove(true); -- QVERIFY(file.open()); -- file.close(); -- fileName = file.fileName(); -- } -- QVERIFY(!fileName.isEmpty()); - QVERIFY(!QFile::exists(fileName)); - - // Test if disabling auto remove works. -@@ -303,19 +289,6 @@ void tst_QTemporaryFile::autoRemove() - fileName = file.fileName(); - file.close(); - } -- QVERIFY(!fileName.isEmpty()); -- QVERIFY(QFile::exists(fileName)); -- QVERIFY(QFile::remove(fileName)); -- -- // same, but gets the file name after closing -- { -- QTemporaryFile file("tempXXXXXX"); -- file.setAutoRemove(false); -- QVERIFY(file.open()); -- file.close(); -- fileName = file.fileName(); -- } -- QVERIFY(!fileName.isEmpty()); - QVERIFY(QFile::exists(fileName)); - QVERIFY(QFile::remove(fileName)); - -@@ -366,51 +339,17 @@ void tst_QTemporaryFile::nonWritableCurrentDir() - #endif - } - --void tst_QTemporaryFile::io() -+void tst_QTemporaryFile::write() - { - QByteArray data("OLE\nOLE\nOLE"); - QTemporaryFile file; -- QDateTime before = QDateTime::currentDateTimeUtc().addMSecs(-250); -- -- // discard msec component (round down) - not all FSs and OSs support them -- before.setSecsSinceEpoch(before.toSecsSinceEpoch()); -- - QVERIFY(file.open()); -- QVERIFY(file.readLink().isEmpty()); // it's not a link! -- QFile::Permissions perm = file.permissions(); -- QVERIFY(perm & QFile::ReadOwner); -- QVERIFY(file.setPermissions(perm)); -- -- QCOMPARE(int(file.size()), 0); -- QVERIFY(file.resize(data.size())); -- QCOMPARE(int(file.size()), data.size()); - QCOMPARE((int)file.write(data), data.size()); -- QCOMPARE(int(file.size()), data.size()); -- -- QDateTime mtime = file.fileTime(QFile::FileModificationTime).toUTC(); -- QDateTime btime = file.fileTime(QFile::FileBirthTime).toUTC(); -- QDateTime ctime = file.fileTime(QFile::FileMetadataChangeTime).toUTC(); -- QDateTime atime = file.fileTime(QFile::FileAccessTime).toUTC(); -- -- QDateTime after = QDateTime::currentDateTimeUtc().toUTC().addMSecs(250); -- // round msecs up -- after.setSecsSinceEpoch(after.toSecsSinceEpoch() + 1); -- -- // mtime must be valid, the rest could fail -- QVERIFY(mtime <= after && mtime >= before); -- QVERIFY(!btime.isValid() || (btime <= after && btime >= before)); -- QVERIFY(!ctime.isValid() || (ctime <= after && ctime >= before)); -- QVERIFY(!btime.isValid() || (btime <= after && btime >= before)); -- -- QVERIFY(file.setFileTime(before.addSecs(-10), QFile::FileModificationTime)); -- mtime = file.fileTime(QFile::FileModificationTime).toUTC(); -- QCOMPARE(mtime, before.addSecs(-10)); -- - file.reset(); - QFile compare(file.fileName()); - compare.open(QIODevice::ReadOnly); - QCOMPARE(compare.readAll() , data); -- QCOMPARE(compare.fileTime(QFile::FileModificationTime), mtime); -+ file.close(); - } - - void tst_QTemporaryFile::openCloseOpenClose() -@@ -476,19 +415,17 @@ void tst_QTemporaryFile::size() - { - QTemporaryFile file; - QVERIFY(file.open()); -+ QVERIFY(file.exists()); - QVERIFY(!file.isSequential()); - QByteArray str("foobar"); - file.write(str); -- -+ QVERIFY(QFile::exists(file.fileName())); - // On CE it takes more time for the filesystem to update - // the information. Usually you have to close it or seek - // to get latest information. flush() does not help either. - QCOMPARE(file.size(), qint64(6)); - file.seek(0); - QCOMPARE(file.size(), qint64(6)); -- -- QVERIFY(QFile::exists(file.fileName())); -- QVERIFY(file.exists()); - } - - void tst_QTemporaryFile::resize() -@@ -885,14 +822,6 @@ void tst_QTemporaryFile::QTBUG_4796() - QCOMPARE(file5.open(), openResult); - QCOMPARE(file6.open(), openResult); - -- // force the files to exist, if they are supposed to -- QCOMPARE(!file1.fileName().isEmpty(), openResult); -- QCOMPARE(!file2.fileName().isEmpty(), openResult); -- QCOMPARE(!file3.fileName().isEmpty(), openResult); -- QCOMPARE(!file4.fileName().isEmpty(), openResult); -- QCOMPARE(!file5.fileName().isEmpty(), openResult); -- QCOMPARE(!file6.fileName().isEmpty(), openResult); -- - QCOMPARE(file1.exists(), openResult); - QCOMPARE(file2.exists(), openResult); - QCOMPARE(file3.exists(), openResult); -diff --git a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp -index 856033fb63..7ba09a4e7f 100644 ---- a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp -+++ b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp -@@ -282,7 +282,6 @@ void tst_QNetworkDiskCache::clear() - // don't delete files that it didn't create - QTemporaryFile file(cacheDirectory + "/XXXXXX"); - if (file.open()) { -- file.fileName(); // make sure it exists with a name - QCOMPARE(countFiles(cacheDirectory).count(), NUM_SUBDIRECTORIES + 3); - cache.clear(); - QCOMPARE(countFiles(cacheDirectory).count(), NUM_SUBDIRECTORIES + 3); --- -2.16.1 - diff --git a/packages/x11-libs/qtbase/files/qtnetwork-5.10-libressl.patch b/packages/x11-libs/qtbase/files/qtnetwork-5.10-libressl.patch deleted file mode 100644 index 3a1f80a..0000000 --- a/packages/x11-libs/qtbase/files/qtnetwork-5.10-libressl.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/config.tests/unix/openssl11/openssl.cpp 2017-11-05 16:07:40.963385070 -0500 -+++ b/config.tests/unix/openssl11/openssl.cpp 2017-11-05 16:07:51.755255545 -0500 -@@ -39,7 +39,7 @@ - - #include <openssl/opensslv.h> - --#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L -+#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) - # error "OpenSSL >= 1.1 is required" - #endif - ---- a/src/network/ssl/qsslsocket_openssl_symbols_p.h 2017-11-06 00:02:18.919611226 -0500 -+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h 2017-11-06 00:09:46.879756111 -0500 -@@ -232,7 +232,7 @@ - int q_BIO_read(BIO *a, void *b, int c); - Q_AUTOTEST_EXPORT int q_BIO_write(BIO *a, const void *b, int c); - int q_BN_num_bits(const BIGNUM *a); --#if OPENSSL_VERSION_NUMBER >= 0x10100000L -+#if QT_CONFIG(opensslv11) - int q_BN_is_word(BIGNUM *a, BN_ULONG w); - #else - // BN_is_word is implemented purely as a -@@ -245,7 +245,7 @@ - // - // Users are required to include <openssl/bn.h>. - #define q_BN_is_word BN_is_word --#endif // OPENSSL_VERSION_NUMBER >= 0x10100000L -+#endif // QT_CONFIG - BN_ULONG q_BN_mod_word(const BIGNUM *a, BN_ULONG w); - #ifndef OPENSSL_NO_EC - const EC_GROUP* q_EC_KEY_get0_group(const EC_KEY* k); ---- a/src/network/ssl/qsslsocket_openssl_symbols.cpp 2017-11-06 00:04:58.843877923 -0500 -+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp 2017-11-06 00:06:12.985074360 -0500 -@@ -1017,7 +1017,7 @@ - RESOLVEFUNC(EC_GROUP_get_degree) - #endif - RESOLVEFUNC(BN_num_bits) --#if OPENSSL_VERSION_NUMBER >= 0x10100000L -+#if QT_CONFIG(opensslv11) - RESOLVEFUNC(BN_is_word) - #endif - RESOLVEFUNC(BN_mod_word) diff --git a/packages/x11-libs/qtbase/qtbase-scm.exheres-0 b/packages/x11-libs/qtbase/qtbase-scm.exheres-0 deleted file mode 100644 index eae25e7..0000000 --- a/packages/x11-libs/qtbase/qtbase-scm.exheres-0 +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright 2014 Jorge Aparicio -# Distributed under the terms of the GNU General Public License v2 - -require qtbase - -PLATFORMS="~amd64 ~armv8" - -DEFAULT_SRC_PREPARE_PATCHES+=( - "${FILES}"/qtnetwork-5.10-libressl.patch - "${FILES}"/${PN}-Revert-QTemporaryFile-Add-support-for-Linux-s-O_TMPF.patch -) - diff --git a/packages/x11-libs/qtbase/qtbase.exlib b/packages/x11-libs/qtbase/qtbase.exlib deleted file mode 100644 index 780c579..0000000 --- a/packages/x11-libs/qtbase/qtbase.exlib +++ /dev/null @@ -1,406 +0,0 @@ -# Copyright 2008-2010 Bo Ørsted Andresen <zlin@exherbo.org> -# Copyright 2008-2009, 2010 Ingmar Vanhassel -# Copyright 2013-2018 Heiko Becker <heirecka@exherbo.org> -# Distributed under the terms of the GNU General Public License v2 -# Based in part upon 'qt-4.3.4-r1.ebuild' from Gentoo, which is: -# Copyright 1999-2008 Gentoo Foundation - -require qt -require option-renames [ renames=[ 'systemd journald' ] ] - -export_exlib_phases src_prepare src_configure src_compile src_install - -SUMMARY="Qt Cross-platform application framework for desktop and embedded development" -DESCRIPTION="Contains the following modules: -- QtCore: non-graphical classes used by other modules -- QtConcurrent: Classes for writing multi-threaded programs w/o using low-level threading primitives -- QtDBus: Classes for inter-process communication over the D-Bus protocol -- QtGui: Base classes for graphical user interface (GUI) components -- QtNetwork: Classes to make network programming easier and more portable -- QtOpenGL: OpenGL support classes -- QtPrintSupport: Classes to make printing easier and more portable -- QtSql: Classes for database integration using SQL -- QtTest: Classes for unit testing Qt applications and libraries -- QtWidgets: Classes to extend Qt GUI with C++ widgets (belonged to QtGui in 4.x) -- QtXml: C++ implementations of SAX and DOM" - -MYOPTIONS_PARTS="doc examples" -SQL_BACKENDS="mysql postgresql sqlite" # firebird odbc -MYOPTIONS="cups debug glib gui journald kms opengles sql - ${MYOPTIONS_PARTS} - ( ${SQL_BACKENDS} ) [[ requires = sql ]] - sql? ( - ( ${SQL_BACKENDS} ) [[ number-selected = at-least-one ]] - ) - cups [[ requires = gui ]] - examples [[ requires = gui ]] - glib [[ description = [ Add support for the glib eventloop ] ]] - gtk [[ description = [ Enable GTK+ style support, this will install a Qt4 style that renders using GTK+, to blend in with a GTK+ desktop ] - requires = [ glib gui ] ]] - gui [[ description = [ Build GUI related modules ] - presumed = true ]] - journald [[ description = [ Support sending logging output directly to systemd-journald ] ]] - kms [[ description = [ KMS platform plugin to run a single-window per screen without X11 ] - requires = opengles ]] - libinput [[ description = [ Support input devices via libinput ] - requires = gui ]] - libproxy [[ description = [ Use libproxy for system proxy settings ] ]] - opengles [[ description = [ Use OpenGL ES2 rather than standard desktop OpenGL ] - requires = gui ]] - sql [[ description = [ Build the QtSQL module ] ]] - - ( platform: amd64 x86 ) - ( providers: ijg-jpeg jpeg-turbo ) [[ number-selected = exactly-one ]] - ( providers: libressl openssl ) [[ number-selected = exactly-one ]] -" - -if ever at_least 5.10.0-beta4 ; then - MYOPTIONS+=" - vulkan [[ description = [ Support for rendering via the Vulkan graphics API ] - requires = gui ]] - " -fi - -MYOPTIONS+=" - amd64_cpu_features: sse3 ssse3 sse4.1 sse4.2 avx avx2 avx512 f16c - arm_cpu_features: neon - x86_cpu_features: sse2 sse3 ssse3 sse4.1 sse4.2 avx avx2 avx512 f16c -" - -DEPENDENCIES=" - build: - virtual/pkg-config - doc? ( - x11-libs/qttools:${SLOT}[>=5.8.0-rc] [[ - note = [ qtattributionsscanner (5.8.0-rc), qhelpgenerator ] - ]] - ) - build+run: - app-admin/eclectic[>=2.0.18] [[ note = [ Split ld-*.path, @TARGET@ substitution ] ]] - dev-libs/double-conversion - dev-libs/icu:= - dev-libs/pcre2[>=10.20] - sys-apps/dbus[>=1.2.0] [[ note = [ besides QtDBUs also needed for accessibility and xcb ] ]] - sys-libs/zlib[>=1.0.8] - cups? ( net-print/cups[>=1.4] ) - glib? ( dev-libs/glib:2 ) - gtk? ( - dev-libs/atk - x11-libs/gtk+:3[>=3.6] - x11-libs/pango - ) - gui? ( - dev-libs/at-spi2-core - media-libs/fontconfig - media-libs/freetype:2[>=2.2] - media-libs/libpng:= - x11-dri/mesa - x11-libs/harfbuzz[>=0.9.42] - x11-libs/libICE - x11-libs/libSM - x11-libs/libX11 - x11-libs/libXext - x11-libs/libXi - x11-libs/libxcb[>=1.10] - x11-libs/libxkbcommon[>=0.4.1][X] - x11-libs/mtdev - x11-utils/xcb-util-image - x11-utils/xcb-util-keysyms - x11-utils/xcb-util-renderutil - x11-utils/xcb-util-wm - providers:ijg-jpeg? ( media-libs/jpeg:= ) - providers:jpeg-turbo? ( media-libs/libjpeg-turbo ) - ) - journald? ( sys-apps/systemd ) [[ note = [ wanted for journald logging ] ]] - kms? ( x11-dri/libdrm ) - libinput? ( sys-libs/libinput ) - libproxy? ( net-libs/libproxy ) - mysql? ( virtual/mysql ) - postgresql? ( dev-db/postgresql ) - providers:libressl? ( dev-libs/libressl:= ) - providers:openssl? ( dev-libs/openssl ) - sqlite? ( dev-db/sqlite:3 ) -" - -if ever at_least 5.10.0-beta4 ; then - DEPENDENCIES+=" - build+run: - gui? ( x11-libs/libXrender[>=0.6] ) - vulkan? ( sys-libs/vulkan ) - " -fi - -# Packages that need QtSQL should depend on x11-libs/qtbase:5[sql] -# option='sql' needs at least one SQL plugin, any-of mysql, postgresql, sqlite, (firebird, odbc) - -# Tests need a running X server and network access (last checked: 5.1.1) -RESTRICT="test" - -qconf5() { - local myconf=() host=$(exhost --target) - - # paths - myconf+=( - -platform $(qt_mkspecs_dir) - -prefix /usr/${host} - -bindir /usr/${host}/lib/qt5/bin - -docdir /usr/share/doc/qt-${PVR} - -headerdir /usr/${host}/include/qt5 - -libdir /usr/${host}/lib - -archdatadir /usr/${host}/lib/qt5 - -plugindir /usr/${host}/lib/qt5/plugins - -libexecdir /usr/${host}/lib/qt5/libexec - -datadir /usr/share/qt5 - -qmldir /usr/${host}/lib/qt5/qml - -translationdir /usr/share/qt5/translations - -sysconfdir /etc/qt5 - -examplesdir /usr/share/qt5/examples - -importdir /usr/${host}/lib/qt5/imports - -testsdir /usr/share/qt5/tests - ) - - edo "${ECONF_SOURCE:-.}"/configure "${myconf[@]}" "$@" -} - -qtbase_src_prepare() { - default - - # Don't prestrip. - edo sed -e "/^CONFIG +=/s:$: nostrip:" -i qmake/qmake.pro - - # With -gcc and -g++ Qt fails to recognize gcc's version, which leads to - # build failures with qtwebengine. It's safe to use -gcc and -g++ instead - # of -cc -and -cxx here, because we only modifiy gcc mkspecs files. - edo sed -e "s:gcc:$(exhost --target)-gcc:" \ - -e "s:g++:$(exhost --target)-g++:" \ - -i "${WORK}"/mkspecs/common/g++-base.conf - - edo sed -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CPPFLAGS} ${CFLAGS} ${ASFLAGS}:" \ - -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CPPFLAGS} ${CXXFLAGS} ${ASFLAGS}:" \ - -i "${WORK}"/mkspecs/common/gcc-base.conf - - edo sed -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \ - -i "${WORK}"/mkspecs/common/g++-unix.conf - - # Workaround to allow other projects to find Qt's private headers via CMake - # https://bugreports.qt-project.org/browse/QTBUG-37417 - edo sed -e "/CMAKE_NO_PRIVATE_INCLUDES = true/d" \ - -i mkspecs/features/create_cmake.prf - - # Fix the names of some unprefixed executables - edo sed -e "s:\(PKG_CONFIG.*=.\)\(pkg-config\):\1${PKG_CONFIG}:" \ - -i mkspecs/features/qt_functions.prf - - edo sed -e "s:^\(QMAKE_AR.*=.\)\(ar.*\):\1$(exhost --tool-prefix)\2:" \ - -i mkspecs/common/linux.conf - - # Fix a non-fatal "sh: readelf: command not found" during src_compile - edo sed -e "s:\(readelf\).*-l.*/bin/ls:$(exhost --tool-prefix)\1 -l /usr/$(exhost --target)/bin/ls:" \ - -i src/corelib/global/global.pri - - # Work around https://bugreports.qt.io/browse/QTBUG-47240 which prevents - # knewstuff to build successfully if attica:0 and attica:5 are installed - # at the same time. - edo sed -e "/\!isEmpty(QMAKE_INCDIR_OPENGL)/d" \ - -i src/gui/gui.pro -} - -qtbase_src_configure() { - local myconf=( - -confirm-license - -opensource - -release - -verbose - - -accessibility - -dbus-linked - $(option debug && echo "-debug") - -icu - -no-ccache - -no-eglfs # EGL Full Screen/Single Surface, probably only useful on embedded devices - -no-directfb - -no-imf - -no-lgmon # Both are only useful on QNX - -no-linuxfb - -no-mirclient # No need for stuff which is only used by Canonical - -no-optimize-size - -no-rpath - -no-separate-debug-info - -no-tslib # Touchscreen access library - unwritten - -no-use-gold-linker # let eclectic ld choose this - -openssl-linked - -pch - -pkg-config - $(if [[ $(exhost --target) =~ (i686-*|x86_64-*) ]] ; then - echo '-reduce-relocations' - fi) - -syslog - -system-doubleconversion - -system-pcre - -system-proxies - -system-xcb - -system-xkbcommon-x11 - -system-zlib - $(qt_enable cups) - $(qt_enable glib) - $(qt_enable gtk) - $(qt_enable gui) - $(option gui && echo '-system-freetype') - $(option gui && echo '-system-harfbuzz' || echo -no-harfbuzz) - $(option gui && echo '-system-libjpeg') - $(option gui && echo '-system-libpng') - $(qt_enable journald) - $(qt_enable kms) - $(qt_enable libinput) - $(qt_enable libproxy) - $(qt_enable vulkan) - ) - - # Avoid auto detection of CPU features: - # sse2, sse3, ssse3, sse4.1, sse4.2, avx, avx2, avx512 neon - # Always enable sse2 on amd64 - # FIXME: needs to be handled on cross (heirecka) - if option !platform:amd64 && option !x86_cpu_features:sse2 ; then - myconf+=( -no-sse2 ) - fi - for feature in sse3 ssse3 sse4.1 sse4.2 avx avx2 avx512 ; do - if option !amd64_cpu_features:${feature} && option !x86_cpu_features:${feature} ; then - myconf+=( -no-${feature} ) - fi - done - - # X - local o X_options="fontconfig sm xkb" - for o in ${X_options}; do - myconf+=( $(qt_enable gui ${o}) ) - done - - # Other GUI options - local g GUI_options="egl evdev gbm mtdev widgets xcb xcb-xlib xinput2 xkbcommon-evdev" - for g in ${GUI_options}; do - myconf+=( $(qt_enable gui ${g}) ) - done - - if option gui ; then - myconf+=( $(option opengles && echo -opengl es2 || echo -opengl desktop) ) - else - myconf+=( -no-opengl ) - fi - - myconf+=( - -no-sql-db2 # IBM DB2 (version 7.1 and above) - -no-sql-ibase # Borland InterBase - -no-sql-oci # Open Database Connectivity (ODBC) (e.g. MS SQL Server) - -no-sql-odbc # Oracle Call Interface Driver - -no-sql-sqlite2 # SQLite version 2 - -no-sql-tds # Sybase Adaptive Server - $(qt_enable mysql sql-mysql plugin "") - $(option mysql && echo "-I/usr/$(exhost --target)/include/mysql -L/usr/$(exhost --target)/lib/mysql/") - $(qt_enable postgresql sql-psql plugin "") - $(option postgresql && echo "-I/usr/$(exhost --target)/include/postgresql/server/") - $(qt_enable sqlite sql-sqlite plugin "" -system-sqlite) - ) - - # optional parts - myconf+=( - -make libs - -make tools - $(qt_build examples) - $(expecting_tests && echo "-make tests" || echo "-nomake tests") - ) - - # Set {C,CXX,LD}FLAGS. - # Do not link with -rpath (Gentoo bug #75181). - edo sed -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \ - -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \ - -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \ - -e "/CONFIG/s:$: nostrip:" \ - -e "s:QMAKE_RPATH.*=.*:QMAKE_RPATH=:" \ - -e "s:X11R6/::" \ - -i "${WORK}"/mkspecs/$(qt_mkspecs_dir)/qmake.conf - - # use gcc for linking - unset LD - - qconf5 "${myconf[@]}" - - edo sed -e "s:^CXXFLAGS.*=:CXXFLAGS = ${CXXFLAGS} $(EXTRA_CXXFLAGS) $(CONFIG_CXXFLAGS) $(CPPFLAGS):" \ - -e "s:^LFLAGS.*=:LFLAGS = ${LDFLAGS} $(EXTRA_LFLAGS) $(CONFIG_LFLAGS):" \ - -i "${WORK}"/qmake/Makefile -} - -qtbase_src_compile() { - default - - if option doc; then - # qt expects qhelpgenerator from qttools in workdir/bin, so symlink it to there - edo ln -s /usr/$(exhost --target)/lib/qt5/bin/qhelpgenerator \ - "${WORK}"/bin/qhelpgenerator - # html_docs target builds html docs, qch_docs QCH files (assistant), docs both - option doc && emake docs - fi -} - -qtbase_src_install() { - default - local host=$(exhost --target) -# PATH="${IMAGE}/usr/${host}/lib/qt5:${PATH}" QTDIR="${IMAGE}/usr/${host}" emake INSTALL_ROOT="${IMAGE}" install - - - # remove build dir from libraries - edo sed -i -e "s:${WORK}/lib:/usr/${host}/lib/qt5:g" "${IMAGE}"/usr/${host}/lib/{*.la,*.prl,pkgconfig/*.pc} - - hereenvd 44qt5 <<EOF -LDPATH=/usr/@TARGET@/lib/qt5 -QT_PLUGIN_PATH=/usr/host/lib/qt5/plugins -EOF - - if option examples ; then - # The examples might add some empty dirs. Since the examples are additional documentation, - # there shouldn't be any empty dirs we might want to keep, so we remove them all in - # one go. - edo find "${IMAGE}"/usr/share/qt5/examples -type d -empty -delete - fi - - # install documentation - if option doc ; then - local modules - modules=( qtcore qtconcurrent qtdbus qtnetwork qttestlib qtxml ) - option gui && modules+=( qtgui qtopengl qtprintsupport qtwidgets ) - option sql && modules+=( qtsql ) - - # QCH-Files e.g. for Qt Assistant... - for i in ${modules[@]} ; do - dodoc "${WORK}"/doc/${i}.qch - done - - # ... and HTML documentation - docinto html - edo pushd "${WORK}"/doc - for i in ${modules[@]} ; do - dodoc -r ${i} - done - edo popd - fi - - # remove references to build dir - edo sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" "${IMAGE}"/usr/${host}/lib/libQt5*.prl - - # install symlinks for some binaries to /usr/bin - local binaries - edo mkdir "${IMAGE}"/usr/${host}/bin - binaries=( moc qmake rcc $(option gui && echo "uic") ) - - for i in ${binaries[@]} ; do - [[ -e "${IMAGE}"/usr/${host}/lib/qt5/bin/${i} ]] || die "/usr/${host}/lib/qt5/bin/${i} does not exist in ${IMAGE}" - dosym /usr/${host}/lib/qt5/bin/${i} /usr/${host}/bin/${i}-qt5 - done - - # disable debug output from applications by default - insinto /etc/xdg/QtProject - hereins qtlogging.ini <<EOF -[Rules] -*.debug=false -EOF -} - |