diff --git a/kube/patch/adwaita-icons.patch b/kube/patch/adwaita-icons.patch new file mode 100644 index 0000000..629484d --- /dev/null +++ b/kube/patch/adwaita-icons.patch @@ -0,0 +1,28 @@ +diff --git a/Makefile.am b/Makefile.am +index aa1f59b..0bbbef6 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -209,11 +209,7 @@ install-data-hook: + uninstall-hook: + @rm -f $(DESTDIR)$(themedir)/icon-theme.cache + +-pkgconfigdir = $(datadir)/pkgconfig +-pkgconfig_DATA = adwaita-icon-theme.pc +- + EXTRA_DIST = \ +- adwaita-icon-theme.pc.in \ + Adwaita \ + COPYING_CCBYSA3 \ + COPYING_LGPL \ +diff --git a/configure.ac b/configure.ac +index d855b7a..4f6ab3b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -80,7 +80,6 @@ AM_CONDITIONAL([ENABLE_L_XL_VARIANTS], [test x$enable_l_xl_variants = xyes]) + + AC_CONFIG_FILES([ + Makefile +-adwaita-icon-theme.pc + src/Makefile + src/fullcolor/Makefile + src/symbolic/Makefile diff --git a/kube/patch/qtbase-filechooser-dialog-dont-crash-when-using-native-dialog.patch b/kube/patch/qtbase-filechooser-dialog-dont-crash-when-using-native-dialog.patch new file mode 100644 index 0000000..fc18858 --- /dev/null +++ b/kube/patch/qtbase-filechooser-dialog-dont-crash-when-using-native-dialog.patch @@ -0,0 +1,67 @@ +From a72c47c16e18a6625ef2c782bddafd120848459e Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Wed, 6 Jun 2018 17:22:38 +0200 +Subject: Keep native file dialog updated with current options + +When doing calls on native file dialog, we might end up calling an +implementation which will cause crash in case we don't have all options +loaded in the native file dialog. Imagine scenario when you want to save +a file, it sets acceptMode() to QFileDialogOptions::AcceptSave, which is +set to our flatpak file dialog, but not passed through to the native one +loaded inside. Then method calls like selectFile() might crash, like +in case of Gtk3 dialog, because its implementation asks for acceptMode, +but it's not set yet and thus we end up with crash. + +Change-Id: I7a4239cb8b46ff6b08e2cfc1dd6abb9d9600aef8 + +diff --git a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp +index ce835eaa23..6ea8242d8a 100644 +--- a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp ++++ b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp +@@ -279,8 +279,10 @@ void QFlatpakFileDialog::setDirectory(const QUrl &directory) + { + Q_D(QFlatpakFileDialog); + +- if (d->nativeFileDialog) ++ if (d->nativeFileDialog) { ++ d->nativeFileDialog->setOptions(options()); + d->nativeFileDialog->setDirectory(directory); ++ } + + d->directory = directory.path(); + } +@@ -299,8 +301,10 @@ void QFlatpakFileDialog::selectFile(const QUrl &filename) + { + Q_D(QFlatpakFileDialog); + +- if (d->nativeFileDialog) ++ if (d->nativeFileDialog) { ++ d->nativeFileDialog->setOptions(options()); + d->nativeFileDialog->selectFile(filename); ++ } + + d->selectedFiles << filename.path(); + } +@@ -323,16 +327,20 @@ void QFlatpakFileDialog::setFilter() + { + Q_D(QFlatpakFileDialog); + +- if (d->nativeFileDialog) ++ if (d->nativeFileDialog) { ++ d->nativeFileDialog->setOptions(options()); + d->nativeFileDialog->setFilter(); ++ } + } + + void QFlatpakFileDialog::selectNameFilter(const QString &filter) + { + Q_D(QFlatpakFileDialog); + +- if (d->nativeFileDialog) ++ if (d->nativeFileDialog) { ++ d->nativeFileDialog->setOptions(options()); + d->nativeFileDialog->selectNameFilter(filter); ++ } + } + + QString QFlatpakFileDialog::selectedNameFilter() const diff --git a/kube/patch/qtbase-flatpak-portals-filechooser-use-native-for-directories.patch b/kube/patch/qtbase-flatpak-portals-filechooser-use-native-for-directories.patch new file mode 100644 index 0000000..d9059d8 --- /dev/null +++ b/kube/patch/qtbase-flatpak-portals-filechooser-use-native-for-directories.patch @@ -0,0 +1,200 @@ +From 528c5a461684d03e59cc01769e24ab115f030c5a Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Wed, 23 May 2018 09:06:46 +0200 +Subject: Open native file dialog inside sandbox when opening directories + +Flatpak FileChooser portal doesn't support opening and exporting +directories to the sandbox as it's not technically possible. Files are +simply exported through document-portal, but directories are a different +story. We have to, in case we want to open a directory, use native file +dialog provided by platform theme we have loaded into flatpak platform +theme. Applications which need to open directories to be able to work, +like IDEs, music players, will have enabled access ho host's filesystem +anyway so it's fine to open a file dialog inside sandbox. + +[ChangeLog][Linux] QFileDialog will use the native dialogs provided by +the platform theme instead of trying to use Flatpak portal to select +directories. + +Change-Id: I0716193bb9878aa621b8ca88506f87c72f690887 + +diff --git a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp +index 186084abd4..d352294972 100644 +--- a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp ++++ b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp +@@ -101,6 +101,10 @@ const QDBusArgument &operator >>(const QDBusArgument &arg, QFlatpakFileDialog::F + class QFlatpakFileDialogPrivate + { + public: ++ QFlatpakFileDialogPrivate(QPlatformFileDialogHelper *nativeFileDialog) ++ : nativeFileDialog(nativeFileDialog) ++ { } ++ + WId winId = 0; + bool modal = false; + bool multipleFiles = false; +@@ -111,12 +115,19 @@ public: + QStringList nameFilters; + QStringList mimeTypesFilters; + QStringList selectedFiles; ++ QPlatformFileDialogHelper *nativeFileDialog = nullptr; + }; + +-QFlatpakFileDialog::QFlatpakFileDialog() ++QFlatpakFileDialog::QFlatpakFileDialog(QPlatformFileDialogHelper *nativeFileDialog) + : QPlatformFileDialogHelper() +- , d_ptr(new QFlatpakFileDialogPrivate) ++ , d_ptr(new QFlatpakFileDialogPrivate(nativeFileDialog)) + { ++ Q_D(QFlatpakFileDialog); ++ ++ if (d->nativeFileDialog) { ++ connect(d->nativeFileDialog, SIGNAL(accept()), this, SIGNAL(accept())); ++ connect(d->nativeFileDialog, SIGNAL(reject()), this, SIGNAL(reject())); ++ } + } + + QFlatpakFileDialog::~QFlatpakFileDialog() +@@ -127,6 +138,9 @@ void QFlatpakFileDialog::initializeDialog() + { + Q_D(QFlatpakFileDialog); + ++ if (d->nativeFileDialog) ++ d->nativeFileDialog->setOptions(options()); ++ + if (options()->fileMode() == QFileDialogOptions::ExistingFiles) + d->multipleFiles = true; + +@@ -265,6 +279,9 @@ void QFlatpakFileDialog::setDirectory(const QUrl &directory) + { + Q_D(QFlatpakFileDialog); + ++ if (d->nativeFileDialog) ++ d->nativeFileDialog->setDirectory(directory); ++ + d->directory = directory.path(); + } + +@@ -272,6 +289,9 @@ QUrl QFlatpakFileDialog::directory() const + { + Q_D(const QFlatpakFileDialog); + ++ if (d->nativeFileDialog && options()->fileMode() == QFileDialogOptions::Directory) ++ return d->nativeFileDialog->directory(); ++ + return d->directory; + } + +@@ -279,6 +299,9 @@ void QFlatpakFileDialog::selectFile(const QUrl &filename) + { + Q_D(QFlatpakFileDialog); + ++ if (d->nativeFileDialog) ++ d->nativeFileDialog->selectFile(filename); ++ + d->selectedFiles << filename.path(); + } + +@@ -286,6 +309,9 @@ QList QFlatpakFileDialog::selectedFiles() const + { + Q_D(const QFlatpakFileDialog); + ++ if (d->nativeFileDialog && options()->fileMode() == QFileDialogOptions::Directory) ++ return d->nativeFileDialog->selectedFiles(); ++ + QList files; + for (const QString &file : d->selectedFiles) { + files << QUrl(file); +@@ -295,13 +321,18 @@ QList QFlatpakFileDialog::selectedFiles() const + + void QFlatpakFileDialog::setFilter() + { +- // TODO ++ Q_D(QFlatpakFileDialog); ++ ++ if (d->nativeFileDialog) ++ d->nativeFileDialog->setFilter(); + } + + void QFlatpakFileDialog::selectNameFilter(const QString &filter) + { +- Q_UNUSED(filter); +- // TODO ++ Q_D(QFlatpakFileDialog); ++ ++ if (d->nativeFileDialog) ++ d->nativeFileDialog->selectNameFilter(filter); + } + + QString QFlatpakFileDialog::selectedNameFilter() const +@@ -312,6 +343,13 @@ QString QFlatpakFileDialog::selectedNameFilter() const + + void QFlatpakFileDialog::exec() + { ++ Q_D(QFlatpakFileDialog); ++ ++ if (d->nativeFileDialog && options()->fileMode() == QFileDialogOptions::Directory) { ++ d->nativeFileDialog->exec(); ++ return; ++ } ++ + // HACK we have to avoid returning until we emit that the dialog was accepted or rejected + QEventLoop loop; + loop.connect(this, SIGNAL(accept()), SLOT(quit())); +@@ -321,18 +359,24 @@ void QFlatpakFileDialog::exec() + + void QFlatpakFileDialog::hide() + { ++ Q_D(QFlatpakFileDialog); ++ ++ if (d->nativeFileDialog) ++ d->nativeFileDialog->hide(); + } + + bool QFlatpakFileDialog::show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) + { + Q_D(QFlatpakFileDialog); +- Q_UNUSED(windowFlags); + + initializeDialog(); + + d->modal = windowModality != Qt::NonModal; + d->winId = parent ? parent->winId() : 0; + ++ if (d->nativeFileDialog && options()->fileMode() == QFileDialogOptions::Directory) ++ return d->nativeFileDialog->show(windowFlags, windowModality, parent); ++ + openPortal(); + + return true; +diff --git a/src/plugins/platformthemes/flatpak/qflatpakfiledialog_p.h b/src/plugins/platformthemes/flatpak/qflatpakfiledialog_p.h +index f3e195faa0..bd1dae209d 100644 +--- a/src/plugins/platformthemes/flatpak/qflatpakfiledialog_p.h ++++ b/src/plugins/platformthemes/flatpak/qflatpakfiledialog_p.h +@@ -69,7 +69,7 @@ public: + }; + typedef QVector FilterList; + +- QFlatpakFileDialog(); ++ QFlatpakFileDialog(QPlatformFileDialogHelper *nativeFileDialog = nullptr); + ~QFlatpakFileDialog(); + + bool defaultNameFilterDisables() const override; +diff --git a/src/plugins/platformthemes/flatpak/qflatpaktheme.cpp b/src/plugins/platformthemes/flatpak/qflatpaktheme.cpp +index 6c5e1389cf..142d91a00b 100644 +--- a/src/plugins/platformthemes/flatpak/qflatpaktheme.cpp ++++ b/src/plugins/platformthemes/flatpak/qflatpaktheme.cpp +@@ -130,8 +130,12 @@ QPlatformDialogHelper* QFlatpakTheme::createPlatformDialogHelper(DialogType type + { + Q_D(const QFlatpakTheme); + +- if (type == FileDialog) ++ if (type == FileDialog) { ++ if (d->baseTheme->usePlatformNativeDialog(type)) ++ return new QFlatpakFileDialog(static_cast(d->baseTheme->createPlatformDialogHelper(type))); ++ + return new QFlatpakFileDialog; ++ } + + return d->baseTheme->createPlatformDialogHelper(type); + } diff --git a/kube/patch/qtbase-make-sure-we-open-native-dialogs-when-opening-folders.patch b/kube/patch/qtbase-make-sure-we-open-native-dialogs-when-opening-folders.patch new file mode 100644 index 0000000..f282589 --- /dev/null +++ b/kube/patch/qtbase-make-sure-we-open-native-dialogs-when-opening-folders.patch @@ -0,0 +1,51 @@ +From b73f4e82d8381a2a8cb6fa01619789abae6b8ea1 Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Mon, 28 May 2018 10:58:27 +0200 +Subject: Make sure we open native dialogs when opening folders inside sandbox + +We have to take obsoleted QFileDialog::DirectoryOnly file mode option +into account, because it is actually used, even internally in Qt when +using static QFileDialog::getExistingDirectory() method. + +Change-Id: I6cdd35ae4724a1d889a0fb1c3555dc3ca4f3bf4d + +diff --git a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp +index ce835eaa23..b170abbdf6 100644 +--- a/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp ++++ b/src/plugins/platformthemes/flatpak/qflatpakfiledialog.cpp +@@ -289,7 +289,7 @@ QUrl QFlatpakFileDialog::directory() const + { + Q_D(const QFlatpakFileDialog); + +- if (d->nativeFileDialog && options()->fileMode() == QFileDialogOptions::Directory) ++ if (d->nativeFileDialog && (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly)) + return d->nativeFileDialog->directory(); + + return d->directory; +@@ -309,7 +309,7 @@ QList QFlatpakFileDialog::selectedFiles() const + { + Q_D(const QFlatpakFileDialog); + +- if (d->nativeFileDialog && options()->fileMode() == QFileDialogOptions::Directory) ++ if (d->nativeFileDialog && (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly)) + return d->nativeFileDialog->selectedFiles(); + + QList files; +@@ -345,7 +347,7 @@ void QFlatpakFileDialog::exec() + { + Q_D(QFlatpakFileDialog); + +- if (d->nativeFileDialog && options()->fileMode() == QFileDialogOptions::Directory) { ++ if (d->nativeFileDialog && (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly)) { + d->nativeFileDialog->exec(); + return; + } +@@ -374,7 +376,7 @@ bool QFlatpakFileDialog::show(Qt::WindowFlags windowFlags, Qt::WindowModality wi + d->modal = windowModality != Qt::NonModal; + d->winId = parent ? parent->winId() : 0; + +- if (d->nativeFileDialog && options()->fileMode() == QFileDialogOptions::Directory) ++ if (d->nativeFileDialog && (options()->fileMode() == QFileDialogOptions::Directory || options()->fileMode() == QFileDialogOptions::DirectoryOnly)) + return d->nativeFileDialog->show(windowFlags, windowModality, parent); + + openPortal(); diff --git a/kube/patch/qtbase-portal-openuri.patch b/kube/patch/qtbase-portal-openuri.patch new file mode 100644 index 0000000..c521a8d --- /dev/null +++ b/kube/patch/qtbase-portal-openuri.patch @@ -0,0 +1,83 @@ +From 369e7572bac94bb5b83ef881012fdc4a86829496 Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Thu, 12 Apr 2018 10:56:47 +0200 +Subject: [PATCH] Add support for opening files in OpenURI flatpak portal + +Adds support for opening files in applications outside sandbox. To prove +we have access to given file, we have to pass it as file descriptor. The +user then gets a dialog with list of application which can be used to +open given file. + +Change-Id: Ifb4cf3dece15d0792b8eb1b90a240da2d3f3c89e +Reviewed-by: Thiago Macieira +--- + .../genericunix/qgenericunixservices.cpp | 39 +++++++++++++++++++ + 1 file changed, 39 insertions(+) + +diff --git a/src/platformsupport/services/genericunix/qgenericunixservices.cpp b/src/platformsupport/services/genericunix/qgenericunixservices.cpp +index cb1e367b9f..adfa3121e0 100644 +--- a/src/platformsupport/services/genericunix/qgenericunixservices.cpp ++++ b/src/platformsupport/services/genericunix/qgenericunixservices.cpp +@@ -177,6 +177,39 @@ static inline bool checkRunningUnderFlatpak() + return !QStandardPaths::locate(QStandardPaths::RuntimeLocation, QLatin1String("flatpak-info")).isEmpty(); + } + ++static inline bool flatpakOpenFile(const QUrl &url) ++{ ++ // DBus signature: ++ // OpenFile (IN s parent_window, ++ // IN h fd, ++ // IN a{sv} options, ++ // OUT o handle) ++ // Options: ++ // handle_token (s) - A string that will be used as the last element of the @handle. ++ // writable (b) - Whether to allow the chosen application to write to the file. ++ ++#ifdef O_PATH ++ const int fd = qt_safe_open(QFile::encodeName(url.toLocalFile()), O_PATH); ++ if (fd != -1) { ++ QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"), ++ QLatin1String("/org/freedesktop/portal/desktop"), ++ QLatin1String("org.freedesktop.portal.OpenURI"), ++ QLatin1String("OpenFile")); ++ ++ QDBusUnixFileDescriptor descriptor(fd); ++ qt_safe_close(fd); ++ ++ // FIXME parent_window_id and handle writable option ++ message << QString() << QVariant::fromValue(descriptor) << QVariantMap(); ++ ++ QDBusPendingReply reply = QDBusConnection::sessionBus().call(message); ++ return !reply.isError(); ++ } ++#endif ++ ++ return false; ++} ++ + static inline bool flatpakOpenUrl(const QUrl &url) + { + // DBus signature: +@@ -185,6 +218,7 @@ static inline bool flatpakOpenUrl(const QUrl &url) + // IN a{sv} options, + // OUT o handle) + // Options: ++ // handle_token (s) - A string that will be used as the last element of the @handle. + // writable (b) - Whether to allow the chosen application to write to the file. + // This key only takes effect the uri points to a local file that is exported in the document portal, + // and the chosen application is sandboxed itself. +@@ -278,6 +312,11 @@ bool QGenericUnixServices::openUrl(const QUrl &url) + + bool QGenericUnixServices::openDocument(const QUrl &url) + { ++#if QT_CONFIG(dbus) ++ if (checkRunningUnderFlatpak()) ++ return flatpakOpenFile(url); ++#endif ++ + if (m_documentLauncher.isEmpty() && !detectWebBrowser(desktopEnvironment(), false, &m_documentLauncher)) { + qWarning("Unable to detect a launcher for '%s'", qPrintable(url.toString())); + return false; +-- +2.17.0 + diff --git a/kube/patch/qtbase-scalefactor.patch b/kube/patch/qtbase-scalefactor.patch new file mode 100644 index 0000000..6163584 --- /dev/null +++ b/kube/patch/qtbase-scalefactor.patch @@ -0,0 +1,40 @@ +From 23b139038a1dc9a769a358ab112453abcdd39290 Mon Sep 17 00:00:00 2001 +From: Mathieu Velten +Date: Sat, 3 Mar 2018 12:23:51 +0100 +Subject: xcb: round down the scale factor for values < 0.8 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This solves huge UI on some (most ?) HD 13 inches that have +a calculated scale factor around 1.75. + +Task-number: QTBUG-53022 QTBUG-57211 +Change-Id: I6cc22d3e47d38cb1d5a0daf5646a936256664e48 +Reviewed-by: MÃ¥rten Nordheim +Reviewed-by: Frederik Gladhorn +--- + src/plugins/platforms/xcb/qxcbscreen.cpp | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp +index df458e85d7..e1bd8eb752 100644 +--- a/src/plugins/platforms/xcb/qxcbscreen.cpp ++++ b/src/plugins/platforms/xcb/qxcbscreen.cpp +@@ -750,7 +750,12 @@ void QXcbScreen::updateGeometry(const QRect &geometry, uint8_t rotation) + m_sizeMillimeters = sizeInMillimeters(geometry.size(), virtualDpi()); + + qreal dpi = geometry.width() / physicalSize().width() * qreal(25.4); +- m_pixelDensity = qMax(1, qRound(dpi/96)); ++ qreal rawFactor = dpi/96; ++ int roundedFactor = qFloor(rawFactor); ++ // Round up for .8 and higher. This favors "small UI" over "large UI". ++ if (rawFactor - roundedFactor >= 0.8) ++ roundedFactor = qCeil(rawFactor); ++ m_pixelDensity = qMax(1, roundedFactor); + m_geometry = geometry; + m_availableGeometry = geometry & m_virtualDesktop->workArea(); + QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry); +-- +cgit v1.1-6-g87c4 + diff --git a/kube/patch/qtwebengine-no-udev.patch b/kube/patch/qtwebengine-no-udev.patch new file mode 100644 index 0000000..e5aa30a --- /dev/null +++ b/kube/patch/qtwebengine-no-udev.patch @@ -0,0 +1,12 @@ +diff --git a/src/core/config/desktop_linux.pri b/src/core/config/desktop_linux.pri +index 70f1cf81..1564d271 100644 +--- a/src/core/config/desktop_linux.pri ++++ b/src/core/config/desktop_linux.pri +@@ -5,4 +5,7 @@ gn_args += \ + enable_session_service=false \ + toolkit_views=false + ++# Disable UDev ++gn_args += use_udev=false ++ + !use_gold_linker: gn_args += use_gold=false diff --git a/kube/patch/qtwebkit-version.patch b/kube/patch/qtwebkit-version.patch new file mode 100644 index 0000000..1b0960a --- /dev/null +++ b/kube/patch/qtwebkit-version.patch @@ -0,0 +1,10 @@ +diff --git a/.qmake.conf b/.qmake.conf +index d3a37eb..0be656f 100644 +--- a/.qmake.conf ++++ b/.qmake.conf +@@ -3,4 +3,4 @@ MODULE_QMAKE_OUTDIR = $$shadowed($$PWD/Tools/qmake) + QMAKEPATH += $$PWD/Tools/qmake $$MODULE_QMAKE_OUTDIR + load(qt_build_config) + +-MODULE_VERSION = 5.7.1 ++MODULE_VERSION = 5.7.0 diff --git a/kube/patch/solid-no-udev.patch b/kube/patch/solid-no-udev.patch new file mode 100644 index 0000000..5ad3aae --- /dev/null +++ b/kube/patch/solid-no-udev.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5181b17..c32f180 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -29,7 +29,7 @@ include(ECMSetupVersion) + include(ECMGenerateHeaders) + include(ECMMarkNonGuiExecutable) + +-if (CMAKE_SYSTEM_NAME MATCHES Linux) ++if (FALSE) + find_package( UDev ) + + set_package_properties(UDev PROPERTIES URL "http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" + diff --git a/kube/qt.json b/kube/qt.json index 7bac8e7..c45f205 100644 --- a/kube/qt.json +++ b/kube/qt.json @@ -1,289 +1,340 @@ { "name": "qt", + "cleanup": [ "/man", + "/share/man", + "/lib/systemd", + "*.la"], + "build-options" : { + "cflags": "-O2 -g -fstack-protector-strong -D_FORTIFY_SOURCE=2", + "cxxflags": "-O2 -g -fstack-protector-strong -D_FORTIFY_SOURCE=2", + "ldflags": "-fstack-protector-strong -Wl,-z,relro,-z,now", + "env": { + "V": "1" + } + }, "modules": [ + { + "name": "harfbuzz", + "config-opts": ["--disable-static", + "--with-gobject", + "--with-graphite2" + ], + "sources": [ + { + "type": "archive", + "url": "https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.8.8.tar.bz2", + "sha256": "a8e5c86e4d99e1cc9865ec1b8e9b05b98e413c2a885cd11f8e9bb9502dd3e3a9" + } + ] + }, { "name": "qt5-qtbase", "cleanup-platform": [ "/bin", "/mkspecs" ], "build-options" : { "arch" : { "x86_64" : { "config-opts" : [ - "-debug", "-reduce-relocations" + "-reduce-relocations" ] }, "arm" : { "config-opts" : [ - "-no-reduce-relocations", "-no-use-gold-linker", "-optimize-size" + "-no-reduce-relocations", "-no-use-gold-linker", "-optimize-size", "-opengl es2" + ] + }, + "aarch64" : { + "config-opts" : [ + "-no-reduce-relocations", "-no-use-gold-linker", "-optimize-size", "-opengl es2" ] } } }, "config-opts": [ "-confirm-license", "-opensource", "-shared", "-platform", "linux-g++", "-optimized-qmake", "-nomake", "examples", "-nomake", "tests", "-system-harfbuzz", "-system-sqlite", "-accessibility", "-dbus-linked", "-fontconfig", "-glib", "-icu", "-openssl-linked", "-no-pch", "-no-rpath", "-no-directfb", "-no-linuxfb", "-no-kms", "-no-cups", "-system-proxies", "-gtk" ], "sources": [ - { "type": "git", "url": "git://code.qt.io/qt/qtbase.git", "branch": "v5.9.6" }, + { + "type": "archive", + "url": "http://download.qt.io/archive/qt/5.11/5.11.2/submodules/qtbase-everywhere-src-5.11.2.tar.xz", + "sha256": "6381e7c3468d5a1dcfe3683b29eeced192faa0f8a32434fec071a59b8bcd0107" + }, { "type": "shell", "commands": [ "mv configure configure.qt" ] }, + { + "type": "patch", + "path": "patch/qtbase-portal-openuri.patch" + }, + { + "type": "patch", + "path": "patch/qtbase-flatpak-portals-filechooser-use-native-for-directories.patch" + }, + { + "type": "patch", + "path": "patch/qtbase-scalefactor.patch" + }, + { + "type": "patch", + "path": "patch/qtbase-make-sure-we-open-native-dialogs-when-opening-folders.patch" + }, + { + "type": "patch", + "path": "patch/qtbase-filechooser-dialog-dont-crash-when-using-native-dialog.patch" + }, { "type": "script", "commands": [ "processed=`sed -e 's/--/-/g ; s/=/ /g' <<< $@`", "./configure.qt $processed" ], "dest-filename": "configure" } ] }, { "name": "qt5-qtdeclarative", - "cleanup-platform": [ "/bin", "/mkspecs" ], + "buildsystem": "qmake", + "cleanup-platform": [ "/bin", "/mkspecs", "lib/plugins/qmltooling" ], "sources": [ - { "type": "git", "url": "git://code.qt.io/qt/qtdeclarative.git", "branch": "v5.9.6" }, { - "type": "script", - "commands": [ "qmake" ], - "dest-filename": "configure" + "type": "archive", + "url": "http://download.qt.io/archive/qt/5.11/5.11.2/submodules/qtdeclarative-everywhere-src-5.11.2.tar.xz", + "sha256": "220d86f8031e9d45f3c369c3fd517aaa4c5783ad62c843a21fa7cc3c0a36f2cd" } ] }, { "name": "qt5-qttools", + "buildsystem": "qmake", "cleanup-platform": [ "/mkspecs", "/bin/assistant", "/bin/qhelpgenerator", "/bin/qcollectiongenerator", "/bin/qhelpconverter", "/bin/pixeltool", "/bin/designer", "/bin/lrelease", "/bin/lupdate", "/bin/lconvert", "/bin/linguist", "/bin/qdoc", "/bin/qtattributionsscanner", "/bin/qtplugininfo", "/bin/qtdiag", "/bin/qdbusviewer" ], "sources": [ - { "type": "git", "url": "git://code.qt.io/qt/qttools.git", "branch": "v5.9.6" }, { - "type": "script", - "commands": [ "qmake" ], - "dest-filename": "configure" + "type": "archive", + "url": "http://download.qt.io/archive/qt/5.11/5.11.2/submodules/qttools-everywhere-src-5.11.2.tar.xz", + "sha256": "f0e8332c771958b4aa373ac643d35e2fabb1a2dcdbaca756ebf3d1ace7c631b8" } ] }, { "name": "qt5-qtscript", + "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ - { "type": "git", "url": "git://code.qt.io/qt/qtscript.git", "branch": "v5.9.6" }, { - "type": "script", - "commands": [ "qmake" ], - "dest-filename": "configure" + "type": "archive", + "url": "http://download.qt.io/archive/qt/5.11/5.11.2/submodules/qtscript-everywhere-src-5.11.2.tar.xz", + "sha256": "b2c2466a83653a9473ea4810462d8a88e0fb1fb691f85d1c6e60d8bc4283f976" } ] }, { "name": "qt5-webchannel", + "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ - { "type": "git", "url": "git://code.qt.io/qt/qtwebchannel.git", "branch": "v5.9.6" }, { - "type": "script", - "commands": [ "qmake" ], - "dest-filename": "configure" + "type": "archive", + "url": "http://download.qt.io/archive/qt/5.11/5.11.2/submodules/qtwebchannel-everywhere-src-5.11.2.tar.xz", + "sha256": "945fdae8f1ea8dfc8e47a6d8421cef00690d6d4bfe26ce61bb59c0d0326c02fc" } ] }, { "name": "qt5-qtwebengine", - "cleanup-platform": [ "/bin", "/mkspecs" ], + "buildsystem": "qmake", + "cleanup-platform": [ "/bin", "/mkspecs"], "modules": [ + { + "name": "pciutils", + "no-autogen": true, + "make-args": ["SHARED=no", "ZLIB=no", "PREFIX=/app"], + "make-install-args": ["PREFIX=/app", "MANDIR=/tmp"], + "post-install": [ + "make install-pcilib", + "make install-lib" + ], + "sources": [ + { "type": "git", "url": "https://kernel.googlesource.com/pub/scm/utils/pciutils/pciutils", "branch": "v3.6.2" }, + { + "type": "shell", + "commands": [ + "sed -i 's@PREFIX=/usr/local@PREFIX=/app@' Makefile" + ] + } + ] + }, { "name": "opus", "sources": [ { "type": "git", "url": "https://github.com/xiph/opus.git", "branch": "v1.2.1" } ] } ], "sources": [ - { "type": "git", "url": "git://code.qt.io/qt/qtwebengine.git", "branch": "v5.9.6" }, - { "type": "patch", "path": "qtwebengine-no-udev.patch" }, { - "type": "script", - "commands": [ "qmake", "CONFIG+=release" ], - "dest-filename": "configure" + "type": "archive", + "url": "http://download.qt.io/archive/qt/5.11/5.11.2/submodules/qtwebengine-everywhere-src-5.11.2.tar.xz", + "sha256": "3ff9bba5f631cfdd454ce298489360b3e2d9a2de4eb82bb121d838ef65f9b772" + }, + { + "type": "patch", + "path": "patch/qtwebengine-no-udev.patch" } ] }, { "name": "qt5-qtsvg", + "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ - { "type": "git", "url": "git://code.qt.io/qt/qtsvg.git", "branch": "v5.9.6" }, { - "type": "script", - "commands": [ "qmake" ], - "dest-filename": "configure" + "type": "archive", + "url": "http://download.qt.io/archive/qt/5.11/5.11.2/submodules/qtsvg-everywhere-src-5.11.2.tar.xz", + "sha256": "bc16bbf855b466e77dda996d8c91fa73db7fe14d3aa98ce6d92145ca1a1bd166" } ] }, { "name": "qt5-qtx11extras", + "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ - { "type": "git", "url": "git://code.qt.io/qt/qtx11extras.git", "branch": "v5.9.6" }, { - "type": "script", - "commands": [ "qmake" ], - "dest-filename": "configure" + "type": "archive", + "url": "http://download.qt.io/archive/qt/5.11/5.11.2/submodules/qtx11extras-everywhere-src-5.11.2.tar.xz", + "sha256": "f407ca61052d44bfb06e831fc6db7595bb2b64882b1f0af23f5db2d1ee519089" } ] }, { "name": "qt5-qtquickcontrols", + "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ - { "type": "git", "url": "git://code.qt.io/qt/qtquickcontrols.git", "branch": "v5.9.6" }, { - "type": "script", - "commands": [ "qmake" ], - "dest-filename": "configure" + "type": "archive", + "url": "http://download.qt.io/archive/qt/5.11/5.11.2/submodules/qtquickcontrols-everywhere-src-5.11.2.tar.xz", + "sha256": "9c772e30fb1ba107168498328585063f4303c6562baf4a5cfedd0c5250b621e0" } ] }, { "name": "qt5-qtquickcontrols2", + "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ - { "type": "git", "url": "git://code.qt.io/qt/qtquickcontrols2.git", "branch": "v5.9.6" }, { - "type": "script", - "commands": [ "qmake" ], - "dest-filename": "configure" - } - ] - }, - { - "name": "qt5-qtlocation", - "cleanup-platform": [ "/bin", "/mkspecs" ], - "sources": [ - { "type": "git", "url": "git://code.qt.io/qt/qtlocation.git", "branch": "v5.9.6" }, - { - "type": "script", - "commands": [ "qmake" ], - "dest-filename": "configure" + "type": "archive", + "url": "http://download.qt.io/archive/qt/5.11/5.11.2/submodules/qtquickcontrols2-everywhere-src-5.11.2.tar.xz", + "sha256": "aa0549f9a4135f9d600b57f53347ebf344e60d21f90c6d844109755da12dcb84" } ] }, { "name": "qt5-qtgraphicaleffects", + "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ - { "type": "git", "url": "git://code.qt.io/qt/qtgraphicaleffects.git", "branch": "v5.9.6" }, { - "type": "script", - "commands": [ "qmake" ], - "dest-filename": "configure" + "type": "archive", + "url": "http://download.qt.io/archive/qt/5.11/5.11.2/submodules/qtgraphicaleffects-everywhere-src-5.11.2.tar.xz", + "sha256": "a9dcaaa3932f7b71717a393700e1387bcd6f9c03538d0ffca2a64128a0e4a9fd" } ] }, { "name": "qt5-qtxmlpatterns", + "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { "type": "archive", - "url": "http://download.qt.io/archive/qt/5.9/5.9.6/submodules/qtxmlpatterns-opensource-src-5.9.6.tar.xz", - "sha256": "6a435b14b85e17268b7acf764e7ed92430045a7bb6eb741a1ea200d2df0986dc" - }, - { - "type": "script", - "commands": [ "qmake" ], - "dest-filename": "configure" + "url": "http://download.qt.io/archive/qt/5.11/5.11.2/submodules/qtxmlpatterns-everywhere-src-5.11.2.tar.xz", + "sha256": "5fd5f680ba40dadf81665417501e1f3778982aea0e268bf4f75a420d54a86746" } ] }, { "name": "qt5-qtimageformats", + "buildsystem": "qmake", "cleanup-platform": [ "/bin", "/mkspecs" ], "sources": [ { - "type": "git", - "url": "git://code.qt.io/qt/qtimageformats.git", - "branch": "v5.9.6" - }, - { - "type": "script", - "commands": [ "qmake" ], - "dest-filename": "configure" + "type": "archive", + "url": "http://download.qt.io/archive/qt/5.11/5.11.2/submodules/qtimageformats-everywhere-src-5.11.2.tar.xz", + "sha256": "27e5d10551d0b5bf4799d09e5412ea2e6898b09aa1521ea24bce660ee6183a68" } ] }, { "name": "extra-cmake-modules", "cleanup-platform": ["*"], "buildsystem": "cmake-ninja", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "sources": [ { "type": "git", "url": "git://anongit.kde.org/extra-cmake-modules.git", "branch": "v5.42.0" } ] }, { "name": "ki18n", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/ki18n.git", "branch": "v5.38.0" } ] }, { "name": "kconfig", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kconfig.git", "branch": "v5.38.0" } ] }, { "name": "attica", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/attica.git", "branch": "v5.38.0" } ] }, { "name": "kcoreaddons", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kcoreaddons.git", "branch": "v5.38.0" } ] }, { "name": "karchive", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib", "-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=TRUE"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/karchive.git", "branch": "v5.38.0" } ] }, { "name": "kcodecs", "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], "buildsystem": "cmake-ninja", "sources": [ { "type": "git", "url": "git://anongit.kde.org/kcodecs.git", "branch": "v5.38.0" } ] - }, - { - "name": "kpackage", - "config-opts": ["-DENABLE_TESTING=OFF", "-DCMAKE_INSTALL_LIBDIR=lib"], - "buildsystem": "cmake-ninja", - "sources": [ { "type": "git", "url": "git://anongit.kde.org/kpackage.git", "branch": "v5.38.0" } ] } ] }