parent
a489de379a
commit
ce232b09fa
|
@ -1821,6 +1821,7 @@ libabw-0.1.so.1 libabw-0.1.0_1
|
|||
libcmis-0.5.so.5 libcmis-0.5.0_1
|
||||
libcmis-c-0.5.so.5 libcmis-0.5.0_1
|
||||
libQt5Bluetooth.so.5 qt5-connectivity-5.6.0_1
|
||||
libQt53DAnimation.so.5 qt5-3d-5.10.1_1
|
||||
libQt53DCore.so.5 qt5-3d-5.6.0_1
|
||||
libQt53DInput.so.5 qt5-3d-5.6.0_1
|
||||
libQt53DLogic.so.5 qt5-3d-5.6.0_1
|
||||
|
@ -1828,8 +1829,10 @@ libQt53DRender.so.5 qt5-3d-5.6.0_1
|
|||
libQt53DQuick.so.5 qt5-3d-5.6.0_1
|
||||
libQt53DQuickInput.so.5 qt5-3d-5.6.0_1
|
||||
libQt53DQuickRender.so.5 qt5-3d-5.6.0_1
|
||||
libQt53DQuickScene2D.so.5 qt5-3d-5.10.1_1
|
||||
libQt53DExtras.so.5 qt5-3d-5.6.0_1
|
||||
libQt53DQuickExtras.so.5 qt5-3d-5.6.0_1
|
||||
libQt53DQuickAnimation.so.5 qt5-3d-5.10.1_1
|
||||
libQt5Charts.so.5 qt5-charts-5.7.1_1
|
||||
libQt5DataVisualization.so.5 qt5-datavis3d-5.7.1_1
|
||||
libQt5Gamepad.so.5 qt5-gamepad-5.7.1_1
|
||||
|
@ -1845,8 +1848,13 @@ libQt5QuickTemplates2.so.5 qt5-quickcontrols2-5.7.1_1
|
|||
libQt5Positioning.so.5 qt5-location-5.6.0_1
|
||||
libQt5Location.so.5 qt5-location-5.6.0_1
|
||||
libQt5Multimedia.so.5 qt5-multimedia-5.6.0_1
|
||||
libQt5MultimediaGstTools.so.5 qt5-multimedia-5.10.1_1
|
||||
libQt5MultimediaQuick.so.5 qt5-multimedia-5.10.1_1
|
||||
libQt5MultimediaQuick_p.so.5 qt5-multimedia-5.6.0_1
|
||||
libQt5MultimediaWidgets.so.5 qt5-multimedia-5.6.0_1
|
||||
libQt5NetworkAuth.so.5 qt5-networkauth-5.10.1_1
|
||||
libQt5Purchasing.so.5 qt5-purchasing-5.10.1_1
|
||||
libQt5RemoteObjects.so.5 qt5-remoteobjects-5.10.1_1
|
||||
libqgsttools_p.so.1 qt5-multimedia-5.6.0_1
|
||||
libQt5LabsTemplates.so.5 qt5-quickcontrols2-5.6.0_1
|
||||
libQt5Scxml.so.5 qt5-scxml-5.7.1_1
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
qt5
|
|
@ -0,0 +1 @@
|
|||
qt5
|
|
@ -0,0 +1 @@
|
|||
qt5
|
|
@ -0,0 +1 @@
|
|||
qt5
|
|
@ -0,0 +1 @@
|
|||
qt5
|
|
@ -0,0 +1 @@
|
|||
qt5
|
|
@ -0,0 +1 @@
|
|||
qt5
|
|
@ -0,0 +1 @@
|
|||
qt5
|
|
@ -0,0 +1,13 @@
|
|||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS += \
|
||||
help \
|
||||
assistant \
|
||||
qhelpgenerator \
|
||||
qcollectiongenerator \
|
||||
qhelpconverter
|
||||
|
||||
assistant.depends = help
|
||||
qhelpgenerator.depends = help
|
||||
qcollectiongenerator.depends = help
|
||||
qhelpconverter.depends = help
|
|
@ -1,15 +0,0 @@
|
|||
--- qtwebengine/tools/qmake/mkspecs/features/functions.prf 2016-05-26 20:01:25.000000000 +0200
|
||||
+++ qtwebengine/tools/qmake/mkspecs/features/functions.prf 2016-08-07 23:17:46.870626280 +0200
|
||||
@@ -63,11 +63,7 @@
|
||||
}
|
||||
|
||||
defineTest(isGCCVersionSupported) {
|
||||
- # The below will work for gcc 4.7 and up and also match gcc 5
|
||||
- greaterThan(QT_GCC_MINOR_VERSION, 6):return(true)
|
||||
- greaterThan(QT_GCC_MAJOR_VERSION, 4):return(true)
|
||||
- skipBuild("Using gcc version "$$QT_GCC_MAJOR_VERSION"."$$QT_GCC_MINOR_VERSION", but at least gcc version 4.7 is required to build Qt WebEngine.")
|
||||
- return(false)
|
||||
+ return(true)
|
||||
}
|
||||
|
||||
defineTest(isQMLTestSupportApiEnabled) {
|
|
@ -0,0 +1,19 @@
|
|||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS = \
|
||||
uiplugin \
|
||||
uitools
|
||||
|
||||
SUBDIRS += \
|
||||
lib \
|
||||
components \
|
||||
designer
|
||||
|
||||
lib.depends = uiplugin
|
||||
components.depends = lib
|
||||
designer.depends = components
|
||||
plugins.depends = lib
|
||||
|
||||
SUBDIRS += plugins
|
||||
|
||||
uitools.depends = uiplugin
|
|
@ -0,0 +1,9 @@
|
|||
QT = core-private
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII
|
||||
|
||||
SOURCES += main.cpp
|
||||
|
||||
include(../shared/formats.pri)
|
||||
|
||||
QMAKE_TARGET_DESCRIPTION = "Qt Translation File Converter"
|
||||
load(qt_tool)
|
|
@ -0,0 +1,46 @@
|
|||
TEMPLATE = subdirs
|
||||
SUBDIRS = \
|
||||
lrelease \
|
||||
lupdate \
|
||||
lconvert \
|
||||
linguist
|
||||
|
||||
equals(QMAKE_HOST.os, Windows): CMAKE_BIN_SUFFIX = ".exe"
|
||||
|
||||
load(cmake_functions)
|
||||
|
||||
CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$[QT_INSTALL_LIBS])
|
||||
contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_USR_MOVE_WORKAROUND = $$CMAKE_INSTALL_LIBS_DIR
|
||||
|
||||
CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
|
||||
!contains(CMAKE_LIB_DIR,"^\\.\\./.*") {
|
||||
CMAKE_RELATIVE_INSTALL_LIBS_DIR = $$cmakeRelativePath($$[QT_INSTALL_PREFIX], $$[QT_INSTALL_LIBS])
|
||||
# We need to go up another two levels because the CMake files are
|
||||
# installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME}
|
||||
CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}../../"
|
||||
} else {
|
||||
CMAKE_LIB_DIR_IS_ABSOLUTE = True
|
||||
}
|
||||
|
||||
CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
|
||||
contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
|
||||
CMAKE_BIN_DIR = $$[QT_HOST_BINS]/
|
||||
CMAKE_BIN_DIR_IS_ABSOLUTE = True
|
||||
}
|
||||
|
||||
load(qt_build_paths)
|
||||
|
||||
cmake_linguist_config_file.input = $$PWD/Qt5LinguistToolsConfig.cmake.in
|
||||
cmake_linguist_config_version_file.input = $$[QT_HOST_DATA/src]/mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in
|
||||
cmake_linguist_macros_file.input = $$PWD/Qt5LinguistToolsMacros.cmake
|
||||
CMAKE_PACKAGE_VERSION = $$MODULE_VERSION
|
||||
cmake_linguist_config_file.output = $$MODULE_BASE_OUTDIR/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake
|
||||
cmake_linguist_config_version_file.output = $$MODULE_BASE_OUTDIR/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfigVersion.cmake
|
||||
cmake_linguist_macros_file.output = $$MODULE_BASE_OUTDIR/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsMacros.cmake
|
||||
cmake_linguist_macros_file.CONFIG = verbatim
|
||||
QMAKE_SUBSTITUTES += cmake_linguist_config_file cmake_linguist_config_version_file cmake_linguist_macros_file
|
||||
|
||||
cmake_linguist_tools_files.files += $$cmake_linguist_config_file.output $$cmake_linguist_config_version_file.output $$cmake_linguist_macros_file.output
|
||||
cmake_linguist_tools_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5LinguistTools
|
||||
cmake_linguist_tools_files.CONFIG = no_check_exists
|
||||
INSTALLS += cmake_linguist_tools_files
|
|
@ -0,0 +1,14 @@
|
|||
QT = core qml network core-private
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII
|
||||
|
||||
SOURCES += main.cpp
|
||||
|
||||
include(../shared/formats.pri)
|
||||
include(../shared/proparser.pri)
|
||||
|
||||
qmake.name = QMAKE
|
||||
qmake.value = $$shell_path($$QMAKE_QMAKE)
|
||||
QT_TOOL_ENV += qmake
|
||||
|
||||
QMAKE_TARGET_DESCRIPTION = "Qt Translation File Compiler"
|
||||
load(qt_tool)
|
|
@ -0,0 +1,34 @@
|
|||
QT = core qml network core-private qmldevtools-private
|
||||
|
||||
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
|
||||
|
||||
include(../shared/formats.pri)
|
||||
include(../shared/proparser.pri)
|
||||
|
||||
DEFINES += PROEVALUATOR_DEBUG
|
||||
|
||||
SOURCES += \
|
||||
main.cpp \
|
||||
merge.cpp \
|
||||
../shared/simtexth.cpp \
|
||||
\
|
||||
cpp.cpp \
|
||||
java.cpp \
|
||||
ui.cpp
|
||||
|
||||
SOURCES += qdeclarative.cpp
|
||||
|
||||
HEADERS += \
|
||||
lupdate.h \
|
||||
../shared/simtexth.h
|
||||
|
||||
mingw {
|
||||
RC_FILE = lupdate.rc
|
||||
}
|
||||
|
||||
qmake.name = QMAKE
|
||||
qmake.value = $$shell_path($$QMAKE_QMAKE)
|
||||
QT_TOOL_ENV += qmake
|
||||
|
||||
QMAKE_TARGET_DESCRIPTION = "Qt Translation File Update Tool"
|
||||
load(qt_tool)
|
|
@ -1,8 +1,14 @@
|
|||
QT += core-private
|
||||
DEFINES += QT_MOC
|
||||
QT = core qml core-private qmldevtools-private
|
||||
DEFINES += \
|
||||
QT_MOC \
|
||||
QT_NO_CAST_FROM_ASCII \
|
||||
QT_NO_CAST_FROM_BYTEARRAY \
|
||||
QT_NO_COMPRESS \
|
||||
QT_NO_FOREACH
|
||||
|
||||
include(moc.pri)
|
||||
HEADERS += qdatetime_p.h
|
||||
SOURCES += main.cpp
|
||||
|
||||
QMAKE_TARGET_DESCRIPTION = "Qt Meta Object Compiler"
|
||||
load(qt_tool)
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
QT = core-private dbus-private
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_FOREACH
|
||||
QMAKE_CXXFLAGS += $$QT_HOST_CFLAGS_DBUS
|
||||
|
||||
include(../moc/moc.pri)
|
||||
|
||||
SOURCES += qdbuscpp2xml.cpp
|
||||
|
||||
QMAKE_TARGET_DESCRIPTION = "Qt D-Bus C++ to XML Compiler"
|
||||
load(qt_tool)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
QT = core-private dbus-private
|
||||
DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_FOREACH
|
||||
QMAKE_CXXFLAGS += $$QT_HOST_CFLAGS_DBUS
|
||||
|
||||
SOURCES = qdbusxml2cpp.cpp
|
||||
|
||||
QMAKE_TARGET_DESCRIPTION = "Qt D-Bus XML to C++ Compiler"
|
||||
load(qt_tool)
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
QT = core qml network qmldevtools-private
|
||||
|
||||
DEFINES += \
|
||||
QDOC2_COMPAT
|
||||
|
||||
INCLUDEPATH += $$QT_SOURCE_TREE/src/tools/qdoc \
|
||||
$$QT_SOURCE_TREE/src/tools/qdoc/qmlparser
|
||||
|
||||
# Increase the stack size on MSVC to 4M to avoid a stack overflow
|
||||
win32-msvc*:{
|
||||
QMAKE_LFLAGS += /STACK:4194304
|
||||
}
|
||||
|
||||
HEADERS += atom.h \
|
||||
codechunk.h \
|
||||
codemarker.h \
|
||||
codeparser.h \
|
||||
config.h \
|
||||
cppcodemarker.h \
|
||||
cppcodeparser.h \
|
||||
doc.h \
|
||||
editdistance.h \
|
||||
generator.h \
|
||||
helpprojectwriter.h \
|
||||
htmlgenerator.h \
|
||||
location.h \
|
||||
node.h \
|
||||
openedlist.h \
|
||||
plaincodemarker.h \
|
||||
puredocparser.h \
|
||||
qdocdatabase.h \
|
||||
qdoctagfiles.h \
|
||||
qdocindexfiles.h \
|
||||
quoter.h \
|
||||
separator.h \
|
||||
text.h \
|
||||
tokenizer.h \
|
||||
tree.h
|
||||
SOURCES += atom.cpp \
|
||||
codechunk.cpp \
|
||||
codemarker.cpp \
|
||||
codeparser.cpp \
|
||||
config.cpp \
|
||||
cppcodemarker.cpp \
|
||||
cppcodeparser.cpp \
|
||||
doc.cpp \
|
||||
editdistance.cpp \
|
||||
generator.cpp \
|
||||
helpprojectwriter.cpp \
|
||||
htmlgenerator.cpp \
|
||||
location.cpp \
|
||||
main.cpp \
|
||||
node.cpp \
|
||||
openedlist.cpp \
|
||||
plaincodemarker.cpp \
|
||||
puredocparser.cpp \
|
||||
qdocdatabase.cpp \
|
||||
qdoctagfiles.cpp \
|
||||
qdocindexfiles.cpp \
|
||||
quoter.cpp \
|
||||
separator.cpp \
|
||||
text.cpp \
|
||||
tokenizer.cpp \
|
||||
tree.cpp \
|
||||
yyindent.cpp
|
||||
|
||||
### QML/JS Parser ###
|
||||
|
||||
HEADERS += jscodemarker.h \
|
||||
qmlcodemarker.h \
|
||||
qmlcodeparser.h \
|
||||
qmlmarkupvisitor.h \
|
||||
qmlvisitor.h
|
||||
|
||||
SOURCES += jscodemarker.cpp \
|
||||
qmlcodemarker.cpp \
|
||||
qmlcodeparser.cpp \
|
||||
qmlmarkupvisitor.cpp \
|
||||
qmlvisitor.cpp
|
||||
|
||||
### Documentation for qdoc ###
|
||||
|
||||
qtPrepareTool(QDOC, qdoc)
|
||||
qtPrepareTool(QHELPGENERATOR, qhelpgenerator)
|
||||
|
||||
QMAKE_DOCS = $$PWD/doc/config/qdoc.qdocconf
|
||||
|
||||
QMAKE_TARGET_DESCRIPTION = "Qt Documentation Compiler"
|
||||
load(qt_tool)
|
||||
|
||||
TR_EXCLUDE += $$PWD/*
|
|
@ -20,4 +20,8 @@ HEADERS += \
|
|||
OTHER_FILES += \
|
||||
lalr.g
|
||||
|
||||
DEFINES += \
|
||||
QT_NO_FOREACH
|
||||
|
||||
QMAKE_TARGET_DESCRIPTION = "Qt Look Ahead LR Parser"
|
||||
load(qt_tool)
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
QT = core qml network qmldevtools-private
|
||||
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
|
||||
|
||||
SOURCES += main.cpp ../../src/qml/parser/qqmljsgrammar.cpp
|
||||
|
||||
QMAKE_TARGET_DESCRIPTION = QML Import Scanner
|
||||
|
||||
load(qt_tool)
|
|
@ -0,0 +1,7 @@
|
|||
QT = core qml network qmldevtools-private
|
||||
|
||||
SOURCES += main.cpp ../../src/qml/parser/qqmljsgrammar.cpp
|
||||
|
||||
QMAKE_TARGET_DESCRIPTION = QML Syntax Verifier
|
||||
|
||||
load(qt_tool)
|
|
@ -0,0 +1,6 @@
|
|||
QT = core qml network qmldevtools-private
|
||||
SOURCES += main.cpp ../../src/qml/parser/qqmljsgrammar.cpp
|
||||
|
||||
QMAKE_TARGET_DESCRIPTION = QML/JS Minifier
|
||||
|
||||
load(qt_tool)
|
|
@ -0,0 +1,43 @@
|
|||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS = assistant \
|
||||
pixeltool \
|
||||
designer \
|
||||
linguist \
|
||||
qdbus \
|
||||
qdoc \
|
||||
qtattributionsscanner
|
||||
|
||||
linguist.depends = designer
|
||||
|
||||
qtConfig(library) {
|
||||
!android|android_app: SUBDIRS += qtplugininfo
|
||||
}
|
||||
|
||||
if(!android|android_app):!uikit: SUBDIRS += qtpaths
|
||||
|
||||
mac {
|
||||
SUBDIRS += macdeployqt
|
||||
}
|
||||
|
||||
android {
|
||||
SUBDIRS += androiddeployqt
|
||||
}
|
||||
|
||||
win32|winrt:SUBDIRS += windeployqt
|
||||
winrt:SUBDIRS += winrtrunner
|
||||
qtHaveModule(gui):!android:!uikit:!qnx:!winrt: SUBDIRS += qtdiag
|
||||
|
||||
qtNomakeTools( \
|
||||
macdeployqt \
|
||||
)
|
||||
|
||||
# This is necessary to avoid a race condition between toolchain.prf
|
||||
# invocations in a module-by-module cross-build.
|
||||
cross_compile:isEmpty(QMAKE_HOST_CXX.INCDIRS) {
|
||||
androiddeployqt.depends += qtattributionsscanner
|
||||
qdoc.depends += qtattributionsscanner
|
||||
windeployqt.depends += qtattributionsscanner
|
||||
winrtrunner.depends += qtattributionsscanner
|
||||
linguist.depends += qtattributionsscanner
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
--- qtwayland/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp 2018-02-05 14:01:14.000000000 +0100
|
||||
+++ qtwayland/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp 2018-02-14 09:45:48.986677335 +0100
|
||||
@@ -121,7 +121,7 @@
|
||||
XCompositeRedirectWindow(m_glxIntegration->xDisplay(), m_xWindow, CompositeRedirectManual);
|
||||
XMapWindow(m_glxIntegration->xDisplay(), m_xWindow);
|
||||
|
||||
- m_surface = eglCreateWindowSurface(m_glxIntegration->eglDisplay(), m_config, m_xWindow,0);
|
||||
+ m_surface = eglCreateWindowSurface(m_glxIntegration->eglDisplay(), m_config, (void *)m_xWindow,0);
|
||||
if (m_surface == EGL_NO_SURFACE) {
|
||||
qFatal("Could not make eglsurface");
|
||||
}
|
||||
--- qtwayland/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp 2018-02-05 14:01:14.000000000 +0100
|
||||
+++ qtwayland/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp 2018-02-14 09:47:53.579686221 +0100
|
||||
@@ -129,7 +129,7 @@
|
||||
attribList.append(EGL_TEXTURE_2D);
|
||||
attribList.append(EGL_NONE);
|
||||
|
||||
- EGLSurface surface = eglCreatePixmapSurface(m_integration->eglDisplay(),config,pixmap,attribList.constData());
|
||||
+ EGLSurface surface = eglCreatePixmapSurface(m_integration->eglDisplay(),config,(void *)pixmap,attribList.constData());
|
||||
if (surface == EGL_NO_SURFACE) {
|
||||
qDebug() << "Failed to create eglsurface" << pixmap << compositorBuffer->window();
|
||||
}
|
||||
--- qtwayland/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp 2018-02-05 14:01:14.000000000 +0100
|
||||
+++ qtwayland/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp 2018-02-14 11:39:28.604163714 +0100
|
||||
@@ -52,8 +52,8 @@
|
||||
|
||||
#include <EGL/eglext_brcm.h>
|
||||
|
||||
-#include <GLES2/gl2.h>
|
||||
-#include <GLES2/gl2ext.h>
|
||||
+#include <GLES3/gl3.h>
|
||||
+#include <GLES3/gl3ext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
DEFINES += QT_RCC
|
||||
QT = core qml core-private qmldevtools-private
|
||||
DEFINES += QT_RCC QT_NO_CAST_FROM_ASCII QT_NO_FOREACH
|
||||
|
||||
include(rcc.pri)
|
||||
SOURCES += main.cpp
|
||||
|
||||
QMAKE_TARGET_DESCRIPTION = "Qt Resource Compiler"
|
||||
load(qt_tool)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
DEFINES += QT_UIC
|
||||
QT = core qml core-private qmldevtools-private
|
||||
DEFINES += QT_UIC QT_NO_CAST_FROM_ASCII QT_NO_FOREACH
|
||||
|
||||
include(uic.pri)
|
||||
include(cpp/cpp.pri)
|
||||
|
@ -8,4 +9,5 @@ HEADERS += uic.h
|
|||
SOURCES += main.cpp \
|
||||
uic.cpp
|
||||
|
||||
QMAKE_TARGET_DESCRIPTION = "Qt User Interface Compiler"
|
||||
load(qt_tool)
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn 2017-11-28 14:06:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/openmax_dl/dl/BUILD.gn 2018-01-30 16:42:15.332826020 +0100
|
||||
@@ -194,14 +194,6 @@
|
||||
"sp/src/arm/armv7/omxSP_FFTFwd_RToCCS_F32_Sfs_s.S",
|
||||
"sp/src/arm/armv7/omxSP_FFTInv_CCSToR_F32_Sfs_s.S",
|
||||
]
|
||||
- if (arm_optionally_use_neon) {
|
||||
- # Run-time NEON detection.
|
||||
- deps = [ "//third_party/android_tools:cpu_features" ]
|
||||
- # To get the __android_log_print routine
|
||||
- libs = [ "log" ]
|
||||
- # Detection routine
|
||||
- sources += [ "sp/src/arm/detect.c" ]
|
||||
- }
|
||||
}
|
||||
|
||||
# GYP: third_party/openmax_dl/dl/dl.gyp:openmax_dl_neon
|
|
@ -1,11 +0,0 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp 2017-05-20 02:18:35.281893421 +0200
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/pdfium/fpdfsdk/javascript/global.cpp 2017-05-20 02:23:36.260127027 +0200
|
||||
@@ -24,7 +24,7 @@
|
||||
struct CHash;
|
||||
|
||||
// Only needed to hash single-character strings.
|
||||
-template <wchar_t N>
|
||||
+template <unsigned N>
|
||||
struct CHash<N> {
|
||||
static const unsigned value = N;
|
||||
};
|
|
@ -1,62 +0,0 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h 2017-01-03 10:28:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h 2017-05-20 02:43:53.182512520 +0200
|
||||
@@ -129,6 +129,29 @@
|
||||
LinkedHashSetNodeBase& operator=(const LinkedHashSetNodeBase& other);
|
||||
};
|
||||
|
||||
+inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b)
|
||||
+{
|
||||
+ ASSERT(a.m_prev && a.m_next && b.m_prev && b.m_next);
|
||||
+ swap(a.m_prev, b.m_prev);
|
||||
+ swap(a.m_next, b.m_next);
|
||||
+ if (b.m_next == &a) {
|
||||
+ ASSERT(b.m_prev == &a);
|
||||
+ b.m_next = &b;
|
||||
+ b.m_prev = &b;
|
||||
+ } else {
|
||||
+ b.m_next->m_prev = &b;
|
||||
+ b.m_prev->m_next = &b;
|
||||
+ }
|
||||
+ if (a.m_next == &b) {
|
||||
+ ASSERT(a.m_prev == &b);
|
||||
+ a.m_next = &a;
|
||||
+ a.m_prev = &a;
|
||||
+ } else {
|
||||
+ a.m_next->m_prev = &a;
|
||||
+ a.m_prev->m_next = &a;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
template<typename ValueArg, typename Allocator>
|
||||
class LinkedHashSetNode : public LinkedHashSetNodeBase {
|
||||
DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
|
||||
@@ -720,29 +743,6 @@
|
||||
remove(find(value));
|
||||
}
|
||||
|
||||
-inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b)
|
||||
-{
|
||||
- ASSERT(a.m_prev && a.m_next && b.m_prev && b.m_next);
|
||||
- swap(a.m_prev, b.m_prev);
|
||||
- swap(a.m_next, b.m_next);
|
||||
- if (b.m_next == &a) {
|
||||
- ASSERT(b.m_prev == &a);
|
||||
- b.m_next = &b;
|
||||
- b.m_prev = &b;
|
||||
- } else {
|
||||
- b.m_next->m_prev = &b;
|
||||
- b.m_prev->m_next = &b;
|
||||
- }
|
||||
- if (a.m_next == &b) {
|
||||
- ASSERT(a.m_prev == &b);
|
||||
- a.m_next = &a;
|
||||
- a.m_prev = &a;
|
||||
- } else {
|
||||
- a.m_next->m_prev = &a;
|
||||
- a.m_prev->m_next = &a;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
inline void swap(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b)
|
||||
{
|
||||
ASSERT(a.m_next != &a && b.m_next != &b);
|
|
@ -1,11 +0,0 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/v8/src/objects-body-descriptors.h 2017-01-03 10:28:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/v8/src/objects-body-descriptors.h 2017-05-20 02:00:14.447917361 +0200
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
template <typename StaticVisitor>
|
||||
static inline void IterateBody(HeapObject* obj, int object_size) {
|
||||
- IterateBody(obj);
|
||||
+ IterateBody<StaticVisitor>(obj);
|
||||
}
|
||||
};
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- qtbase/config.tests/unix/openssl/openssl.cpp 2016-09-16 07:49:42.000000000 +0200
|
||||
+++ qtbase/config.tests/unix/openssl/openssl.cpp 2016-10-21 19:05:10.099362793 +0200
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER-0 >= 0x10002000L && !defined(OPENSSL_NO_EC) && !defined(SSL_CTRL_SET_CURVES)
|
||||
+#if (OPENSSL_VERSION_NUMBER-0 >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER) && !defined(OPENSSL_NO_EC) && !defined(SSL_CTRL_SET_CURVES)
|
||||
# error "OpenSSL was reported as >= 1.0.2 but is missing required features, possibly it's libressl which is unsupported"
|
||||
#endif
|
||||
|
|
@ -1,45 +1,16 @@
|
|||
--- qtbase/src/network/ssl/qsslellipticcurve_openssl.cpp 2017-01-18 15:20:58.000000000 +0100
|
||||
+++ qtbase/src/network/ssl/qsslellipticcurve_openssl.cpp 2017-02-21 16:25:56.477986158 +0100
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
const QByteArray curveNameLatin1 = name.toLatin1();
|
||||
int nid = q_OBJ_sn2nid(curveNameLatin1.data());
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
if (nid == 0 && q_SSLeay() >= 0x10002000L)
|
||||
if (nid == 0 && QSslSocket::sslLibraryVersionNumber() >= 0x10002000L)
|
||||
nid = q_EC_curve_nist2nid(curveNameLatin1.data());
|
||||
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
--- qtbase/src/network/ssl/qsslsocket_openssl.cpp 2017-01-18 15:20:58.000000000 +0100
|
||||
+++ qtbase/src/network/ssl/qsslsocket_openssl.cpp 2017-02-21 19:12:22.200604090 +0100
|
||||
@@ -1626,7 +1626,7 @@
|
||||
}
|
||||
#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ...
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
if (q_SSLeay() >= 0x10002000L && mode == QSslSocket::SslClientMode) {
|
||||
EVP_PKEY *key;
|
||||
if (q_SSL_get_server_tmp_key(ssl, &key))
|
||||
--- qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp 2017-01-18 15:20:58.000000000 +0100
|
||||
+++ qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp 2017-02-21 19:14:32.805677245 +0100
|
||||
@@ -151,7 +151,7 @@
|
||||
DEFINEFUNC(BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return)
|
||||
DEFINEFUNC3(int, BIO_write, BIO *a, a, const void *b, b, int c, c, return -1, return)
|
||||
DEFINEFUNC(int, BN_num_bits, const BIGNUM *a, a, return 0, return)
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
DEFINEFUNC2(int, BN_is_word, BIGNUM *a, a, BN_ULONG w, w, return 0, return)
|
||||
#endif
|
||||
DEFINEFUNC2(BN_ULONG, BN_mod_word, const BIGNUM *a, a, BN_ULONG w, w, return -1, return)
|
||||
@@ -451,7 +451,7 @@
|
||||
DEFINEFUNC(EC_KEY *, EC_KEY_new_by_curve_name, int nid, nid, return 0, return)
|
||||
DEFINEFUNC(void, EC_KEY_free, EC_KEY *ecdh, ecdh, return, DUMMYARG)
|
||||
DEFINEFUNC2(size_t, EC_get_builtin_curves, EC_builtin_curve * r, r, size_t nitems, nitems, return 0, return)
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
DEFINEFUNC(int, EC_curve_nist2nid, const char *name, name, return 0, return)
|
||||
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
#endif // OPENSSL_NO_EC
|
||||
@@ -791,7 +791,7 @@
|
||||
RESOLVEFUNC(EC_GROUP_get_degree)
|
||||
#endif
|
||||
|
@ -49,15 +20,6 @@
|
|||
RESOLVEFUNC(BN_is_word)
|
||||
#endif
|
||||
RESOLVEFUNC(BN_mod_word)
|
||||
@@ -1020,7 +1020,7 @@
|
||||
RESOLVEFUNC(EC_KEY_new_by_curve_name)
|
||||
RESOLVEFUNC(EC_KEY_free)
|
||||
RESOLVEFUNC(EC_get_builtin_curves)
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
if (q_SSLeay() >= 0x10002000L)
|
||||
RESOLVEFUNC(EC_curve_nist2nid)
|
||||
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
--- qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h 2017-01-18 15:20:58.000000000 +0100
|
||||
+++ qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h 2017-02-21 19:15:38.083714302 +0100
|
||||
@@ -228,7 +228,7 @@
|
||||
|
@ -98,21 +60,41 @@
|
|||
int q_PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca);
|
||||
--- qtbase/src/network/ssl/qsslcontext_openssl.cpp 2017-01-18 15:20:58.000000000 +0100
|
||||
+++ qtbase/src/network/ssl/qsslcontext_openssl.cpp 2017-02-21 19:23:04.291975945 +0100
|
||||
@@ -344,7 +344,7 @@
|
||||
|
||||
const QVector<QSslEllipticCurve> qcurves = sslContext->sslConfiguration.ellipticCurves();
|
||||
if (!qcurves.isEmpty()) {
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC)
|
||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(OPENSSL_NO_EC) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
// Set the curves to be used
|
||||
if (q_SSLeay() >= 0x10002000L) {
|
||||
// SSL_CTX_ctrl wants a non-const pointer as last argument,
|
||||
@@ -462,7 +462,7 @@
|
||||
@@ -159,7 +159,7 @@
|
||||
m_npnContext.data = reinterpret_cast<unsigned char *>(m_supportedNPNVersions.data());
|
||||
m_npnContext.len = m_supportedNPNVersions.count();
|
||||
m_npnContext.status = QSslConfiguration::NextProtocolNegotiationNone;
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
if (q_SSLeay() >= 0x10002000L) {
|
||||
if (QSslSocket::sslLibraryVersionNumber() >= 0x10002000L) {
|
||||
// Callback's type has a parameter 'const unsigned char ** out'
|
||||
// since it was introduced in 1.0.2. Internally, OpenSSL's own code
|
||||
--- qtbase/src/network/ssl/qsslsocket_opensslpre11.cpp 2017-11-30 14:49:46.000000000 +0100
|
||||
+++ qtbase/src/network/ssl/qsslsocket_opensslpre11.cpp 2018-01-27 18:06:50.939540932 +0100
|
||||
@@ -228,7 +228,7 @@
|
||||
q_SSL_load_error_strings();
|
||||
q_OpenSSL_add_all_algorithms_safe();
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
|
||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10001000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
if (q_SSLeay() >= 0x10001000L)
|
||||
QSslSocketBackendPrivate::s_indexForSSLExtraData = q_SSL_get_ex_new_index(0L, NULL, NULL, NULL, NULL);
|
||||
#endif
|
||||
@@ -382,7 +382,7 @@
|
||||
} else {
|
||||
const unsigned char *proto = 0;
|
||||
unsigned int proto_len = 0;
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
if (q_SSLeay() >= 0x10002000L) {
|
||||
q_SSL_get0_alpn_selected(ssl, &proto, &proto_len);
|
||||
if (proto_len && mode == QSslSocket::SslClientMode) {
|
||||
@@ -405,7 +405,7 @@
|
||||
}
|
||||
#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ...
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
if (q_SSLeay() >= 0x10002000L && mode == QSslSocket::SslClientMode) {
|
||||
EVP_PKEY *key;
|
||||
if (q_SSL_get_server_tmp_key(ssl, &key))
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
Prevent detection of libressl as openssl >= 1.1
|
||||
|
||||
--- qtbase/config.tests/unix/openssl11/openssl.cpp 2017-11-30 14:49:46.000000000 +0100
|
||||
+++ qtbase/config.tests/unix/openssl11/openssl.cpp 2018-01-27 18:01:17.206523715 +0100
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
#include <openssl/opensslv.h>
|
||||
|
||||
-#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L
|
||||
+#if !defined(OPENSSL_VERSION_NUMBER) || defined(LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER-0 < 0x10100000L)
|
||||
# error "OpenSSL >= 1.1 is required"
|
||||
#endif
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
--- qtscript/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2016-12-07 06:58:00.000000000 +0100
|
||||
+++ qtscript/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2017-12-12 19:51:36.048485198 +0100
|
||||
@@ -377,7 +377,7 @@
|
||||
|
||||
#if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_))
|
||||
#define WTF_CPU_MIPS 1
|
||||
-#include <sgidefs.h>
|
||||
+#include <asm/sgidefs.h>
|
||||
#if defined(__MIPSEB__)
|
||||
#define WTF_CPU_BIG_ENDIAN 1
|
||||
#endif
|
||||
--- qtwebengine/src/3rdparty/chromium/third_party/webrtc/typedefs.h 2017-01-03 10:28:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/webrtc/typedefs.h 2017-12-12 20:11:16.501569388 +0100
|
||||
@@ -47,6 +47,12 @@
|
||||
#elif defined(__pnacl__)
|
||||
#define WEBRTC_ARCH_32_BITS
|
||||
#define WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+#elif defined(__MIPSEB__)
|
||||
+#define WEBRTC_ARCH_32_BITS
|
||||
+#define WEBRTC_ARCH_BIG_ENDIAN
|
||||
+#elif defined(__MIPSEL__)
|
||||
+#define WEBRTC_ARCH_32_BITS
|
||||
+#define WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
#else
|
||||
#error Please add support for your architecture in typedefs.h
|
||||
#endif
|
||||
--- qtwebengine/src/3rdparty/chromium/build/build_config.h 2017-01-03 10:28:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/build/build_config.h 2017-12-12 22:35:11.094185212 +0100
|
||||
@@ -132,6 +132,11 @@
|
||||
#define ARCH_CPU_MIPSEL 1
|
||||
#define ARCH_CPU_32_BITS 1
|
||||
#define ARCH_CPU_LITTLE_ENDIAN 1
|
||||
#endif
|
||||
+#elif defined(__MIPSEB__)
|
||||
+#define ARCH_CPU_MIPS_FAMILY 1
|
||||
+#define ARCH_CPU_MIPSEL 1
|
||||
+#define ARCH_CPU_32_BITS 1
|
||||
+#define ARCH_CPU_BIG_ENDIAN 1
|
||||
#else
|
||||
#error Please add support for your architecture in build/build_config.h
|
|
@ -1,66 +0,0 @@
|
|||
--- qtbase/src/plugins/platforms/vnc/qvncclient.cpp 2017-01-18 15:20:58.000000000 +0100
|
||||
+++ qtbase/src/plugins/platforms/vnc/qvncclient.cpp 2017-12-12 18:56:14.884248330 +0100
|
||||
@@ -142,8 +142,8 @@
|
||||
case 16: {
|
||||
quint16 p = *reinterpret_cast<const quint16*>(src);
|
||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||
- if (swapBytes)
|
||||
- p = ((p & 0xff) << 8) | ((p & 0xff00) >> 8);
|
||||
+ if (m_swapBytes)
|
||||
+ p = (p << 8) | (p >> 8);
|
||||
#endif
|
||||
r = (p >> 11) & 0x1f;
|
||||
g = (p >> 5) & 0x3f;
|
||||
@@ -484,7 +484,7 @@
|
||||
m_sameEndian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) == !!m_pixelFormat.bigEndian;
|
||||
m_needConversion = pixelConversionNeeded();
|
||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||
- m_swapBytes = qvnc_screen->swapBytes();
|
||||
+ m_swapBytes = m_server->screen()->swapBytes();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -639,7 +639,7 @@
|
||||
return true;
|
||||
|
||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||
- if (qvnc_screen->swapBytes())
|
||||
+ if (m_server->screen()->swapBytes())
|
||||
return true;
|
||||
#endif
|
||||
|
||||
--- qtbase/src/plugins/platforms/vnc/qvncscreen.cpp 2017-01-18 15:20:58.000000000 +0100
|
||||
+++ qtbase/src/plugins/platforms/vnc/qvncscreen.cpp 2017-12-12 18:42:41.609190327 +0100
|
||||
@@ -172,14 +172,16 @@
|
||||
}
|
||||
|
||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||
-bool QVNCScreen::swapBytes() const
|
||||
+bool QVncScreen::swapBytes() const
|
||||
{
|
||||
if (depth() != 16)
|
||||
return false;
|
||||
-
|
||||
- if (screen())
|
||||
- return screen()->frameBufferLittleEndian();
|
||||
- return frameBufferLittleEndian();
|
||||
+ for (int y = 0; y < mScreenImage->height(); y++) {
|
||||
+ quint16* p = reinterpret_cast<quint16*>(mScreenImage->scanLine(y));
|
||||
+ for (int x = 0; x < mScreenImage->width(); x++, p++)
|
||||
+ *p = (*p >> 8) | (*p << 8);
|
||||
+ }
|
||||
+ return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
--- qtbase/src/plugins/platforms/vnc/qvncscreen.h 2017-01-18 15:20:58.000000000 +0100
|
||||
+++ qtbase/src/plugins/platforms/vnc/qvncscreen.h 2017-12-12 17:38:29.003915557 +0100
|
||||
@@ -73,7 +73,7 @@
|
||||
void clearDirty() { dirtyRegion = QRegion(); }
|
||||
|
||||
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
|
||||
- bool swapBytes() const
|
||||
+ bool swapBytes() const;
|
||||
#endif
|
||||
|
||||
QStringList mArgs;
|
|
@ -1,248 +0,0 @@
|
|||
From 3bd0fd8f97e7a33a874929a383a42e6c710bfff3 Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Kelly <steveire@gmail.com>
|
||||
Date: Sat, 17 Dec 2016 06:20:06 +0000
|
||||
Subject: [PATCH] QSFPM: Fix handling of source model layout change
|
||||
|
||||
In sourceLayoutAboutToBeChanged the source model update is ignored if
|
||||
the affected parents are filtered out anyway. The same logic is
|
||||
attempted in the sourceLayoutChanged slot, but there the early-return
|
||||
logic is applied too late - the mapping is cleared before performing the
|
||||
early-return. Because pointers into the mapping are used in the
|
||||
internalPointer of QModelIndexes in this class, persistent indexes used
|
||||
later will segfault when attempting to dereference it.
|
||||
|
||||
Additionally, if a parent becomes invalid as a result of the
|
||||
layoutChange, it would be filtered out by the condition in the loop,
|
||||
resulting in a different result in the comparison of emptiness of the
|
||||
parents container.
|
||||
|
||||
Fix that by persisting the parent's container, and performing the test
|
||||
for early-return before clearing the mapping.
|
||||
|
||||
Task-number: QTBUG-47711
|
||||
Task-number: QTBUG-32981
|
||||
Change-Id: If45e8a1c97d39454160f52041bc9ae7e337dce97
|
||||
Reviewed-by: David Faure <david.faure@kdab.com>
|
||||
---
|
||||
src/corelib/itemmodels/qsortfilterproxymodel.cpp | 31 ++---
|
||||
.../tst_qsortfilterproxymodel.cpp | 126 +++++++++++++++++++++
|
||||
2 files changed, 137 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
|
||||
index b0ddfa8..3331521 100644
|
||||
--- qtbase/src/corelib/itemmodels/qsortfilterproxymodel.cpp
|
||||
+++ qtbase/src/corelib/itemmodels/qsortfilterproxymodel.cpp
|
||||
@@ -171,6 +171,7 @@ class QSortFilterProxyModelPrivate : public QAbstractProxyModelPrivate
|
||||
QRowsRemoval itemsBeingRemoved;
|
||||
|
||||
QModelIndexPairList saved_persistent_indexes;
|
||||
+ QList<QPersistentModelIndex> saved_layoutChange_parents;
|
||||
|
||||
QHash<QModelIndex, Mapping *>::const_iterator create_mapping(
|
||||
const QModelIndex &source_parent) const;
|
||||
@@ -1331,23 +1332,23 @@ void QSortFilterProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QList<Q
|
||||
Q_UNUSED(hint); // We can't forward Hint because we might filter additional rows or columns
|
||||
saved_persistent_indexes.clear();
|
||||
|
||||
- QList<QPersistentModelIndex> parents;
|
||||
+ saved_layoutChange_parents.clear();
|
||||
for (const QPersistentModelIndex &parent : sourceParents) {
|
||||
if (!parent.isValid()) {
|
||||
- parents << QPersistentModelIndex();
|
||||
+ saved_layoutChange_parents << QPersistentModelIndex();
|
||||
continue;
|
||||
}
|
||||
const QModelIndex mappedParent = q->mapFromSource(parent);
|
||||
// Might be filtered out.
|
||||
if (mappedParent.isValid())
|
||||
- parents << mappedParent;
|
||||
+ saved_layoutChange_parents << mappedParent;
|
||||
}
|
||||
|
||||
// All parents filtered out.
|
||||
- if (!sourceParents.isEmpty() && parents.isEmpty())
|
||||
+ if (!sourceParents.isEmpty() && saved_layoutChange_parents.isEmpty())
|
||||
return;
|
||||
|
||||
- emit q->layoutAboutToBeChanged(parents);
|
||||
+ emit q->layoutAboutToBeChanged(saved_layoutChange_parents);
|
||||
if (persistent.indexes.isEmpty())
|
||||
return;
|
||||
|
||||
@@ -1359,6 +1360,9 @@ void QSortFilterProxyModelPrivate::_q_sourceLayoutChanged(const QList<QPersisten
|
||||
Q_Q(QSortFilterProxyModel);
|
||||
Q_UNUSED(hint); // We can't forward Hint because we might filter additional rows or columns
|
||||
|
||||
+ if (!sourceParents.isEmpty() && saved_layoutChange_parents.isEmpty())
|
||||
+ return;
|
||||
+
|
||||
// Optimize: We only actually have to clear the mapping related to the contents of
|
||||
// sourceParents, not everything.
|
||||
qDeleteAll(source_index_mapping);
|
||||
@@ -1373,21 +1377,8 @@ void QSortFilterProxyModelPrivate::_q_sourceLayoutChanged(const QList<QPersisten
|
||||
source_index_mapping.clear();
|
||||
}
|
||||
|
||||
- QList<QPersistentModelIndex> parents;
|
||||
- for (const QPersistentModelIndex &parent : sourceParents) {
|
||||
- if (!parent.isValid()) {
|
||||
- parents << QPersistentModelIndex();
|
||||
- continue;
|
||||
- }
|
||||
- const QModelIndex mappedParent = q->mapFromSource(parent);
|
||||
- if (mappedParent.isValid())
|
||||
- parents << mappedParent;
|
||||
- }
|
||||
-
|
||||
- if (!sourceParents.isEmpty() && parents.isEmpty())
|
||||
- return;
|
||||
-
|
||||
- emit q->layoutChanged(parents);
|
||||
+ emit q->layoutChanged(saved_layoutChange_parents);
|
||||
+ saved_layoutChange_parents.clear();
|
||||
}
|
||||
|
||||
void QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeInserted(
|
||||
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
|
||||
index 38e3c68..6b98d9f 100644
|
||||
--- qtbase/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
|
||||
+++ qtbase/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
|
||||
@@ -145,6 +145,8 @@ private slots:
|
||||
void canDropMimeData();
|
||||
void filterHint();
|
||||
|
||||
+ void sourceLayoutChangeLeavesValidPersistentIndexes();
|
||||
+
|
||||
protected:
|
||||
void buildHierarchy(const QStringList &data, QAbstractItemModel *model);
|
||||
void checkHierarchy(const QStringList &data, const QAbstractItemModel *model);
|
||||
@@ -4181,5 +4183,129 @@ void tst_QSortFilterProxyModel::filterHint()
|
||||
QAbstractItemModel::NoLayoutChangeHint);
|
||||
}
|
||||
|
||||
+/**
|
||||
+
|
||||
+ Creates a model where each item has one child, to a set depth,
|
||||
+ and the last item has no children. For a model created with
|
||||
+ setDepth(4):
|
||||
+
|
||||
+ - 1
|
||||
+ - - 2
|
||||
+ - - - 3
|
||||
+ - - - - 4
|
||||
+*/
|
||||
+class StepTreeModel : public QAbstractItemModel
|
||||
+{
|
||||
+ Q_OBJECT
|
||||
+public:
|
||||
+ StepTreeModel(QObject * parent = 0)
|
||||
+ : QAbstractItemModel(parent), m_depth(0) {}
|
||||
+
|
||||
+ int columnCount(const QModelIndex& = QModelIndex()) const override { return 1; }
|
||||
+
|
||||
+ int rowCount(const QModelIndex& parent = QModelIndex()) const override
|
||||
+ {
|
||||
+ quintptr parentId = (parent.isValid()) ? parent.internalId() : 0;
|
||||
+ return (parentId < m_depth) ? 1 : 0;
|
||||
+ }
|
||||
+
|
||||
+ QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const override
|
||||
+ {
|
||||
+ if (role != Qt::DisplayRole)
|
||||
+ return QVariant();
|
||||
+
|
||||
+ return QString::number(index.internalId());
|
||||
+ }
|
||||
+
|
||||
+ QModelIndex index(int, int, const QModelIndex& parent = QModelIndex()) const override
|
||||
+ {
|
||||
+ quintptr parentId = (parent.isValid()) ? parent.internalId() : 0;
|
||||
+ if (parentId >= m_depth)
|
||||
+ return QModelIndex();
|
||||
+
|
||||
+ return createIndex(0, 0, parentId + 1);
|
||||
+ }
|
||||
+
|
||||
+ QModelIndex parent(const QModelIndex& index) const override
|
||||
+ {
|
||||
+ if (index.internalId() == 0)
|
||||
+ return QModelIndex();
|
||||
+
|
||||
+ return createIndex(0, 0, index.internalId() - 1);
|
||||
+ }
|
||||
+
|
||||
+ void setDepth(quintptr depth)
|
||||
+ {
|
||||
+ int parentIdWithLayoutChange = (m_depth < depth) ? m_depth : depth;
|
||||
+
|
||||
+ QList<QPersistentModelIndex> parentsOfLayoutChange;
|
||||
+ parentsOfLayoutChange.push_back(createIndex(0, 0, parentIdWithLayoutChange));
|
||||
+
|
||||
+ layoutAboutToBeChanged(parentsOfLayoutChange);
|
||||
+
|
||||
+ auto existing = persistentIndexList();
|
||||
+
|
||||
+ QList<QModelIndex> updated;
|
||||
+
|
||||
+ for (auto idx : existing) {
|
||||
+ if (indexDepth(idx) <= depth)
|
||||
+ updated.push_back(idx);
|
||||
+ else
|
||||
+ updated.push_back({});
|
||||
+ }
|
||||
+
|
||||
+ m_depth = depth;
|
||||
+
|
||||
+ changePersistentIndexList(existing, updated);
|
||||
+
|
||||
+ layoutChanged(parentsOfLayoutChange);
|
||||
+ }
|
||||
+
|
||||
+private:
|
||||
+ static quintptr indexDepth(QModelIndex const& index)
|
||||
+ {
|
||||
+ return (index.isValid()) ? 1 + indexDepth(index.parent()) : 0;
|
||||
+ }
|
||||
+
|
||||
+private:
|
||||
+ quintptr m_depth;
|
||||
+};
|
||||
+
|
||||
+void tst_QSortFilterProxyModel::sourceLayoutChangeLeavesValidPersistentIndexes()
|
||||
+{
|
||||
+ StepTreeModel model;
|
||||
+ Q_SET_OBJECT_NAME(model);
|
||||
+ model.setDepth(4);
|
||||
+
|
||||
+ QSortFilterProxyModel proxy1;
|
||||
+ proxy1.setSourceModel(&model);
|
||||
+ Q_SET_OBJECT_NAME(proxy1);
|
||||
+
|
||||
+ proxy1.setFilterRegExp("1|2");
|
||||
+
|
||||
+ // The current state of things:
|
||||
+ // model proxy
|
||||
+ // - 1 - 1
|
||||
+ // - - 2 - - 2
|
||||
+ // - - - 3
|
||||
+ // - - - - 4
|
||||
+
|
||||
+ // The setDepth call below removes '4' with a layoutChanged call.
|
||||
+ // Because the proxy filters that out anyway, the proxy doesn't need
|
||||
+ // to emit any signals or update persistent indexes.
|
||||
+
|
||||
+ QPersistentModelIndex persistentIndex = proxy1.index(0, 0, proxy1.index(0, 0));
|
||||
+
|
||||
+ model.setDepth(3);
|
||||
+
|
||||
+ // Calling parent() causes the internalPointer to be used.
|
||||
+ // Before fixing QTBUG-47711, that could be a dangling pointer.
|
||||
+ // The use of qDebug here makes sufficient use of the heap to
|
||||
+ // cause corruption at runtime with normal use on linux (before
|
||||
+ // the fix). valgrind confirms the fix.
|
||||
+ qDebug() << persistentIndex.parent();
|
||||
+ QVERIFY(persistentIndex.parent().isValid());
|
||||
+}
|
||||
+
|
||||
QTEST_MAIN(tst_QSortFilterProxyModel)
|
||||
#include "tst_qsortfilterproxymodel.moc"
|
|
@ -1,191 +0,0 @@
|
|||
From 0874861bcc70313c343aba5e5566ed30b69eed1c Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Kelly <steveire@gmail.com>
|
||||
Date: Mon, 19 Dec 2016 21:13:57 +0000
|
||||
Subject: [PATCH] QSFPM: Remove data manipulation from move handlers
|
||||
|
||||
Similar to the fix in the parent commit, incorrect updating of the
|
||||
internal data structures during layout changes can lead to dangling
|
||||
pointers being dereferenced later. Moves are treated as layoutChanges
|
||||
by this proxy by forwarding to the appropriate method. However, data is
|
||||
incorrectly cleared prior to that forwarding. Remove that, and let the
|
||||
layoutChange handling take appropriate action.
|
||||
|
||||
Change-Id: Iee951e37152328a4e6a5fb8e5385c32a2fe4c0bd
|
||||
Reviewed-by: David Faure <david.faure@kdab.com>
|
||||
---
|
||||
src/corelib/itemmodels/qsortfilterproxymodel.cpp | 67 ++++------------------
|
||||
.../tst_qsortfilterproxymodel.cpp | 46 +++++++++++++++
|
||||
2 files changed, 58 insertions(+), 55 deletions(-)
|
||||
|
||||
diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp
|
||||
index 3331521..226a240 100644
|
||||
--- qtbase/src/corelib/itemmodels/qsortfilterproxymodel.cpp
|
||||
+++ qtbase/src/corelib/itemmodels/qsortfilterproxymodel.cpp
|
||||
@@ -1418,49 +1418,27 @@ void QSortFilterProxyModelPrivate::_q_sourceRowsRemoved(
|
||||
void QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeMoved(
|
||||
const QModelIndex &sourceParent, int /* sourceStart */, int /* sourceEnd */, const QModelIndex &destParent, int /* dest */)
|
||||
{
|
||||
- Q_Q(QSortFilterProxyModel);
|
||||
// Because rows which are contiguous in the source model might not be contiguous
|
||||
// in the proxy due to sorting, the best thing we can do here is be specific about what
|
||||
// parents are having their children changed.
|
||||
// Optimize: Emit move signals if the proxy is not sorted. Will need to account for rows
|
||||
// being filtered out though.
|
||||
|
||||
- saved_persistent_indexes.clear();
|
||||
-
|
||||
QList<QPersistentModelIndex> parents;
|
||||
- parents << q->mapFromSource(sourceParent);
|
||||
+ parents << sourceParent;
|
||||
if (sourceParent != destParent)
|
||||
- parents << q->mapFromSource(destParent);
|
||||
- emit q->layoutAboutToBeChanged(parents);
|
||||
- if (persistent.indexes.isEmpty())
|
||||
- return;
|
||||
- saved_persistent_indexes = store_persistent_indexes();
|
||||
+ parents << destParent;
|
||||
+ _q_sourceLayoutAboutToBeChanged(parents, QAbstractItemModel::NoLayoutChangeHint);
|
||||
}
|
||||
|
||||
void QSortFilterProxyModelPrivate::_q_sourceRowsMoved(
|
||||
const QModelIndex &sourceParent, int /* sourceStart */, int /* sourceEnd */, const QModelIndex &destParent, int /* dest */)
|
||||
{
|
||||
- Q_Q(QSortFilterProxyModel);
|
||||
-
|
||||
- // Optimize: We only need to clear and update the persistent indexes which are children of
|
||||
- // sourceParent or destParent
|
||||
- qDeleteAll(source_index_mapping);
|
||||
- source_index_mapping.clear();
|
||||
-
|
||||
- update_persistent_indexes(saved_persistent_indexes);
|
||||
- saved_persistent_indexes.clear();
|
||||
-
|
||||
- if (dynamic_sortfilter && update_source_sort_column()) {
|
||||
- //update_source_sort_column might have created wrong mapping so we have to clear it again
|
||||
- qDeleteAll(source_index_mapping);
|
||||
- source_index_mapping.clear();
|
||||
- }
|
||||
-
|
||||
QList<QPersistentModelIndex> parents;
|
||||
- parents << q->mapFromSource(sourceParent);
|
||||
+ parents << sourceParent;
|
||||
if (sourceParent != destParent)
|
||||
- parents << q->mapFromSource(destParent);
|
||||
- emit q->layoutChanged(parents);
|
||||
+ parents << destParent;
|
||||
+ _q_sourceLayoutChanged(parents, QAbstractItemModel::NoLayoutChangeHint);
|
||||
}
|
||||
|
||||
void QSortFilterProxyModelPrivate::_q_sourceColumnsAboutToBeInserted(
|
||||
@@ -1522,42 +1500,21 @@ void QSortFilterProxyModelPrivate::_q_sourceColumnsRemoved(
|
||||
void QSortFilterProxyModelPrivate::_q_sourceColumnsAboutToBeMoved(
|
||||
const QModelIndex &sourceParent, int /* sourceStart */, int /* sourceEnd */, const QModelIndex &destParent, int /* dest */)
|
||||
{
|
||||
- Q_Q(QSortFilterProxyModel);
|
||||
-
|
||||
- saved_persistent_indexes.clear();
|
||||
-
|
||||
QList<QPersistentModelIndex> parents;
|
||||
- parents << q->mapFromSource(sourceParent);
|
||||
+ parents << sourceParent;
|
||||
if (sourceParent != destParent)
|
||||
- parents << q->mapFromSource(destParent);
|
||||
- emit q->layoutAboutToBeChanged(parents);
|
||||
-
|
||||
- if (persistent.indexes.isEmpty())
|
||||
- return;
|
||||
- saved_persistent_indexes = store_persistent_indexes();
|
||||
+ parents << destParent;
|
||||
+ _q_sourceLayoutAboutToBeChanged(parents, QAbstractItemModel::NoLayoutChangeHint);
|
||||
}
|
||||
|
||||
void QSortFilterProxyModelPrivate::_q_sourceColumnsMoved(
|
||||
const QModelIndex &sourceParent, int /* sourceStart */, int /* sourceEnd */, const QModelIndex &destParent, int /* dest */)
|
||||
{
|
||||
- Q_Q(QSortFilterProxyModel);
|
||||
-
|
||||
- qDeleteAll(source_index_mapping);
|
||||
- source_index_mapping.clear();
|
||||
-
|
||||
- update_persistent_indexes(saved_persistent_indexes);
|
||||
- saved_persistent_indexes.clear();
|
||||
-
|
||||
- if (dynamic_sortfilter && update_source_sort_column()) {
|
||||
- qDeleteAll(source_index_mapping);
|
||||
- source_index_mapping.clear();
|
||||
- }
|
||||
-
|
||||
QList<QPersistentModelIndex> parents;
|
||||
- parents << q->mapFromSource(sourceParent);
|
||||
+ parents << sourceParent;
|
||||
if (sourceParent != destParent)
|
||||
- parents << q->mapFromSource(destParent);
|
||||
- emit q->layoutChanged(parents);
|
||||
+ parents << destParent;
|
||||
+ _q_sourceLayoutChanged(parents, QAbstractItemModel::NoLayoutChangeHint);
|
||||
}
|
||||
|
||||
/*!
|
||||
diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
|
||||
index 6b98d9f..7b6c470 100644
|
||||
--- qtbase/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
|
||||
+++ qtbase/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
|
||||
@@ -146,6 +146,7 @@ private slots:
|
||||
void filterHint();
|
||||
|
||||
void sourceLayoutChangeLeavesValidPersistentIndexes();
|
||||
+ void rowMoveLeavesValidPersistentIndexes();
|
||||
|
||||
protected:
|
||||
void buildHierarchy(const QStringList &data, QAbstractItemModel *model);
|
||||
@@ -4307,5 +4308,50 @@ void tst_QSortFilterProxyModel::sourceLayoutChangeLeavesValidPersistentIndexes()
|
||||
QVERIFY(persistentIndex.parent().isValid());
|
||||
}
|
||||
|
||||
+void tst_QSortFilterProxyModel::rowMoveLeavesValidPersistentIndexes()
|
||||
+{
|
||||
+ DynamicTreeModel model;
|
||||
+ Q_SET_OBJECT_NAME(model);
|
||||
+
|
||||
+ QList<int> ancestors;
|
||||
+ for (auto i = 0; i < 5; ++i)
|
||||
+ {
|
||||
+ Q_UNUSED(i);
|
||||
+ ModelInsertCommand insertCommand(&model);
|
||||
+ insertCommand.setAncestorRowNumbers(ancestors);
|
||||
+ insertCommand.setStartRow(0);
|
||||
+ insertCommand.setEndRow(0);
|
||||
+ insertCommand.doCommand();
|
||||
+ ancestors.push_back(0);
|
||||
+ }
|
||||
+
|
||||
+ QSortFilterProxyModel proxy1;
|
||||
+ proxy1.setSourceModel(&model);
|
||||
+ Q_SET_OBJECT_NAME(proxy1);
|
||||
+
|
||||
+ proxy1.setFilterRegExp("1|2");
|
||||
+
|
||||
+ auto item5 = model.match(model.index(0, 0), Qt::DisplayRole, "5", 1, Qt::MatchRecursive).first();
|
||||
+ auto item3 = model.match(model.index(0, 0), Qt::DisplayRole, "3", 1, Qt::MatchRecursive).first();
|
||||
+
|
||||
+ Q_ASSERT(item5.isValid());
|
||||
+ Q_ASSERT(item3.isValid());
|
||||
+
|
||||
+ QPersistentModelIndex persistentIndex = proxy1.match(proxy1.index(0, 0), Qt::DisplayRole, "2", 1, Qt::MatchRecursive).first();
|
||||
+
|
||||
+ ModelMoveCommand moveCommand(&model, 0);
|
||||
+ moveCommand.setAncestorRowNumbers(QList<int>{0, 0, 0, 0});
|
||||
+ moveCommand.setStartRow(0);
|
||||
+ moveCommand.setEndRow(0);
|
||||
+ moveCommand.setDestRow(0);
|
||||
+ moveCommand.setDestAncestors(QList<int>{0, 0, 0});
|
||||
+ moveCommand.doCommand();
|
||||
+
|
||||
+ // Calling parent() causes the internalPointer to be used.
|
||||
+ // Before fixing QTBUG-47711 (moveRows case), that could be
|
||||
+ // a dangling pointer.
|
||||
+ QVERIFY(persistentIndex.parent().isValid());
|
||||
+}
|
||||
+
|
||||
QTEST_MAIN(tst_QSortFilterProxyModel)
|
||||
#include "tst_qsortfilterproxymodel.moc"
|
|
@ -1,149 +0,0 @@
|
|||
From baad82d242a4d8c1af6c87faaa7f25584183fd53 Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Kelly <steveire@gmail.com>
|
||||
Date: Tue, 20 Dec 2016 00:44:12 +0000
|
||||
Subject: [PATCH] QIPM: Persist model indexes after emitting layoutChange, not
|
||||
before
|
||||
|
||||
Callers can persist a QModelIndex which was not persisted before in a
|
||||
slot connected to the signal, and such a persisted index must be updated
|
||||
in the course of the layoutChange.
|
||||
|
||||
Store the indexes to persist after emitting the signal.
|
||||
|
||||
Task-number: QTBUG-32981
|
||||
Change-Id: Ibee4c0d84817d72603a03fe5b22fdeefeac0695e
|
||||
Reviewed-by: David Faure <david.faure@kdab.com>
|
||||
---
|
||||
src/corelib/itemmodels/qidentityproxymodel.cpp | 18 ++---
|
||||
.../tst_qidentityproxymodel.cpp | 76 ++++++++++++++++++++++
|
||||
2 files changed, 85 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/corelib/itemmodels/qidentityproxymodel.cpp b/src/corelib/itemmodels/qidentityproxymodel.cpp
|
||||
index e537793..7c30679 100644
|
||||
--- qtbase/src/corelib/itemmodels/qidentityproxymodel.cpp
|
||||
+++ qtbase/src/corelib/itemmodels/qidentityproxymodel.cpp
|
||||
@@ -496,15 +496,6 @@ void QIdentityProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QList<QPe
|
||||
{
|
||||
Q_Q(QIdentityProxyModel);
|
||||
|
||||
- const auto proxyPersistentIndexes = q->persistentIndexList();
|
||||
- for (const QPersistentModelIndex &proxyPersistentIndex : proxyPersistentIndexes) {
|
||||
- proxyIndexes << proxyPersistentIndex;
|
||||
- Q_ASSERT(proxyPersistentIndex.isValid());
|
||||
- const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex);
|
||||
- Q_ASSERT(srcPersistentIndex.isValid());
|
||||
- layoutChangePersistentIndexes << srcPersistentIndex;
|
||||
- }
|
||||
-
|
||||
QList<QPersistentModelIndex> parents;
|
||||
parents.reserve(sourceParents.size());
|
||||
for (const QPersistentModelIndex &parent : sourceParents) {
|
||||
@@ -518,6 +509,15 @@ void QIdentityProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QList<QPe
|
||||
}
|
||||
|
||||
q->layoutAboutToBeChanged(parents, hint);
|
||||
+
|
||||
+ const auto proxyPersistentIndexes = q->persistentIndexList();
|
||||
+ for (const QPersistentModelIndex &proxyPersistentIndex : proxyPersistentIndexes) {
|
||||
+ proxyIndexes << proxyPersistentIndex;
|
||||
+ Q_ASSERT(proxyPersistentIndex.isValid());
|
||||
+ const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex);
|
||||
+ Q_ASSERT(srcPersistentIndex.isValid());
|
||||
+ layoutChangePersistentIndexes << srcPersistentIndex;
|
||||
+ }
|
||||
}
|
||||
|
||||
void QIdentityProxyModelPrivate::_q_sourceLayoutChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint)
|
||||
diff --git a/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp b/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp
|
||||
index e946f31..564b854 100644
|
||||
--- qtbase/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp
|
||||
+++ qtbase/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp
|
||||
@@ -68,6 +68,8 @@ private slots:
|
||||
|
||||
void itemData();
|
||||
|
||||
+ void persistIndexOnLayoutChange();
|
||||
+
|
||||
protected:
|
||||
void verifyIdentity(QAbstractItemModel *model, const QModelIndex &parent = QModelIndex());
|
||||
|
||||
@@ -377,5 +379,79 @@ void tst_QIdentityProxyModel::itemData()
|
||||
QCOMPARE(proxy.itemData(topIndex).value(Qt::DisplayRole).toString(), QStringLiteral("Monday_appended"));
|
||||
}
|
||||
|
||||
+void dump(QAbstractItemModel* model, QString const& indent = " - ", QModelIndex const& parent = {})
|
||||
+{
|
||||
+ for (auto row = 0; row < model->rowCount(parent); ++row)
|
||||
+ {
|
||||
+ auto idx = model->index(row, 0, parent);
|
||||
+ qDebug() << (indent + idx.data().toString());
|
||||
+ dump(model, indent + "- ", idx);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void tst_QIdentityProxyModel::persistIndexOnLayoutChange()
|
||||
+{
|
||||
+ DynamicTreeModel model;
|
||||
+
|
||||
+ QList<int> ancestors;
|
||||
+ for (auto i = 0; i < 3; ++i)
|
||||
+ {
|
||||
+ Q_UNUSED(i);
|
||||
+ ModelInsertCommand insertCommand(&model);
|
||||
+ insertCommand.setAncestorRowNumbers(ancestors);
|
||||
+ insertCommand.setStartRow(0);
|
||||
+ insertCommand.setEndRow(0);
|
||||
+ insertCommand.doCommand();
|
||||
+ ancestors.push_back(0);
|
||||
+ }
|
||||
+ ModelInsertCommand insertCommand(&model);
|
||||
+ insertCommand.setAncestorRowNumbers(ancestors);
|
||||
+ insertCommand.setStartRow(0);
|
||||
+ insertCommand.setEndRow(1);
|
||||
+ insertCommand.doCommand();
|
||||
+
|
||||
+ // dump(&model);
|
||||
+ // " - 1"
|
||||
+ // " - - 2"
|
||||
+ // " - - - 3"
|
||||
+ // " - - - - 4"
|
||||
+ // " - - - - 5"
|
||||
+
|
||||
+ QIdentityProxyModel proxy;
|
||||
+ proxy.setSourceModel(&model);
|
||||
+
|
||||
+ QPersistentModelIndex persistentIndex;
|
||||
+
|
||||
+ QPersistentModelIndex sourcePersistentIndex = model.match(model.index(0, 0), Qt::DisplayRole, "5", 1, Qt::MatchRecursive).first();
|
||||
+
|
||||
+ QCOMPARE(sourcePersistentIndex.data().toString(), QStringLiteral("5"));
|
||||
+
|
||||
+ bool gotLayoutAboutToBeChanged = false;
|
||||
+ bool gotLayoutChanged = false;
|
||||
+
|
||||
+ QObject::connect(&proxy, &QAbstractItemModel::layoutAboutToBeChanged, &proxy, [&proxy, &persistentIndex, &gotLayoutAboutToBeChanged]
|
||||
+ {
|
||||
+ gotLayoutAboutToBeChanged = true;
|
||||
+ persistentIndex = proxy.match(proxy.index(0, 0), Qt::DisplayRole, "5", 1, Qt::MatchRecursive).first();
|
||||
+ });
|
||||
+
|
||||
+ QObject::connect(&proxy, &QAbstractItemModel::layoutChanged, &proxy, [&proxy, &persistentIndex, &sourcePersistentIndex, &gotLayoutChanged]
|
||||
+ {
|
||||
+ gotLayoutChanged = true;
|
||||
+ QCOMPARE(QModelIndex(persistentIndex), proxy.mapFromSource(sourcePersistentIndex));
|
||||
+ });
|
||||
+
|
||||
+ ModelChangeChildrenLayoutsCommand layoutChangeCommand(&model, 0);
|
||||
+
|
||||
+ layoutChangeCommand.setAncestorRowNumbers(QList<int>{0, 0, 0});
|
||||
+ layoutChangeCommand.setSecondAncestorRowNumbers(QList<int>{0, 0});
|
||||
+
|
||||
+ layoutChangeCommand.doCommand();
|
||||
+
|
||||
+ QVERIFY(gotLayoutAboutToBeChanged);
|
||||
+ QVERIFY(gotLayoutChanged);
|
||||
+ QVERIFY(persistentIndex.isValid());
|
||||
+}
|
||||
+
|
||||
QTEST_MAIN(tst_QIdentityProxyModel)
|
||||
#include "tst_qidentityproxymodel.moc"
|
|
@ -0,0 +1,109 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc 2017-09-19 18:15:15.000000000 +0200
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/allocator/allocator_shim_default_dispatch_to_glibc.cc 2017-10-09 19:35:11.762384809 +0200
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <malloc.h>
|
||||
|
||||
+#if defined(__GLIBC__)
|
||||
// This translation unit defines a default dispatch for the allocator shim which
|
||||
// routes allocations to libc functions.
|
||||
// The code here is strongly inspired from tcmalloc's libc_override_glibc.h.
|
||||
@@ -59,3 +60,98 @@
|
||||
&GlibcGetSizeEstimate, /* get_size_estimate_function */
|
||||
nullptr, /* next */
|
||||
};
|
||||
+
|
||||
+#else // defined(__GLIBC__)
|
||||
+
|
||||
+#include <dlfcn.h>
|
||||
+
|
||||
+extern "C" {
|
||||
+// Declare function pointers to the memory functions
|
||||
+typedef void* (*t_libc_malloc)(size_t size);
|
||||
+typedef void* (*t_libc_calloc)(size_t n, size_t size);
|
||||
+typedef void* (*t_libc_realloc)(void* address, size_t size);
|
||||
+typedef void* (*t_libc_memalign)(size_t alignment, size_t size);
|
||||
+typedef void (*t_libc_free)(void* ptr);
|
||||
+typedef size_t (*t_libc_malloc_usable_size)(void* ptr);
|
||||
+
|
||||
+// Static instances of pointers to libc.so dl symbols
|
||||
+static t_libc_malloc libc_malloc = NULL;
|
||||
+static t_libc_calloc libc_calloc = NULL;
|
||||
+static t_libc_realloc libc_realloc = NULL;
|
||||
+static t_libc_memalign libc_memalign = NULL;
|
||||
+static t_libc_free libc_free = NULL;
|
||||
+static t_libc_malloc_usable_size libc_malloc_usable_size = NULL;
|
||||
+
|
||||
+// resolve the symbols in libc.so
|
||||
+void musl_libc_memory_init(void)
|
||||
+{
|
||||
+ void* libc = dlopen("libc", RTLD_LAZY);
|
||||
+ if (!libc)
|
||||
+ libc = dlopen("libc.so", RTLD_LAZY);
|
||||
+ if (!libc)
|
||||
+ libc = dlopen("libc.so.6", RTLD_LAZY);
|
||||
+ libc_malloc = (t_libc_malloc) dlsym(libc, "malloc");
|
||||
+ libc_calloc = (t_libc_calloc) dlsym(libc, "calloc");
|
||||
+ libc_realloc = (t_libc_realloc) dlsym(libc, "realloc");
|
||||
+ libc_memalign = (t_libc_memalign) dlsym(libc, "memalign");
|
||||
+ libc_free = (t_libc_free) dlsym(libc, "free");
|
||||
+ libc_malloc_usable_size = (t_libc_malloc_usable_size) dlsym(libc, "malloc_usable_size");
|
||||
+ dlclose(libc);
|
||||
+}
|
||||
+} // extern "C"
|
||||
+
|
||||
+namespace {
|
||||
+
|
||||
+using base::allocator::AllocatorDispatch;
|
||||
+
|
||||
+void* MuslMalloc(const AllocatorDispatch*, size_t size, void* context) {
|
||||
+ if (!libc_malloc)
|
||||
+ musl_libc_memory_init();
|
||||
+ return (*libc_malloc)(size);
|
||||
+}
|
||||
+
|
||||
+void* MuslCalloc(const AllocatorDispatch*, size_t n, size_t size, void* context) {
|
||||
+ if (!libc_calloc)
|
||||
+ musl_libc_memory_init();
|
||||
+ return (*libc_calloc)(n, size);
|
||||
+}
|
||||
+
|
||||
+void* MuslRealloc(const AllocatorDispatch*, void* address, size_t size, void* context) {
|
||||
+ if (!libc_realloc)
|
||||
+ musl_libc_memory_init();
|
||||
+ return (*libc_realloc)(address, size);
|
||||
+}
|
||||
+
|
||||
+void* MuslMemalign(const AllocatorDispatch*, size_t alignment, size_t size, void* context) {
|
||||
+ if (!libc_memalign)
|
||||
+ musl_libc_memory_init();
|
||||
+ return (*libc_memalign)(alignment, size);
|
||||
+}
|
||||
+
|
||||
+void MuslFree(const AllocatorDispatch*, void* address, void* context) {
|
||||
+ if (!libc_free)
|
||||
+ musl_libc_memory_init();
|
||||
+ (*libc_free)(address);
|
||||
+}
|
||||
+
|
||||
+size_t MuslGetSizeEstimate(const AllocatorDispatch*, void* address, void* context) {
|
||||
+ // TODO(siggi, primiano): malloc_usable_size may need redirection in the
|
||||
+ // presence of interposing shims that divert allocations.
|
||||
+ if (!libc_malloc_usable_size)
|
||||
+ musl_libc_memory_init();
|
||||
+ return (*libc_malloc_usable_size)(address);
|
||||
+}
|
||||
+
|
||||
+} // namespace
|
||||
+
|
||||
+const AllocatorDispatch AllocatorDispatch::default_dispatch = {
|
||||
+ &MuslMalloc, /* alloc_function */
|
||||
+ &MuslCalloc, /* alloc_zero_initialized_function */
|
||||
+ &MuslMemalign, /* alloc_aligned_function */
|
||||
+ &MuslRealloc, /* realloc_function */
|
||||
+ &MuslFree, /* free_function */
|
||||
+ &MuslGetSizeEstimate, /* get_size_estimate_function */
|
||||
+ nullptr, /* next */
|
||||
+};
|
||||
+
|
||||
+#endif
|
|
@ -1,132 +1,124 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/third_party/webrtc/base/checks.cc 2016-03-03 15:48:36.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/webrtc/base/checks.cc 2016-03-17 01:56:11.685588906 +0100
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
|
||||
+#if defined(__GLIBC__) && defined(__GLIBCXX__) && !defined(__UCLIBC__)
|
||||
#include <cxxabi.h>
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
@@ -55,7 +55,7 @@
|
||||
// to get usable symbols on Linux. This is copied from V8. Chromium has a more
|
||||
// advanced stace trace system; also more difficult to copy.
|
||||
void DumpBacktrace() {
|
||||
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
|
||||
+#if defined(__GLIBC__) && defined(__GLIBCXX__) && !defined(__UCLIBC__)
|
||||
void* trace[100];
|
||||
int size = backtrace(trace, sizeof(trace) / sizeof(*trace));
|
||||
char** symbols = backtrace_symbols(trace, size);
|
||||
--- qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/wtf/Assertions.cpp 2016-03-03 15:48:36.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/wtf/Assertions.cpp 2016-03-17 05:47:32.637589639 +0100
|
||||
@@ -61,7 +61,7 @@
|
||||
#define HAVE_ISDEBUGGERPRESENT 1
|
||||
#endif
|
||||
|
||||
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
|
||||
+#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__) && defined(__GLIBC__))
|
||||
#include <cxxabi.h>
|
||||
#include <dlfcn.h>
|
||||
#include <execinfo.h>
|
||||
@@ -222,7 +222,7 @@
|
||||
|
||||
void WTFGetBacktrace(void** stack, int* size)
|
||||
{
|
||||
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
|
||||
+#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__) && defined(__GLIBC__))
|
||||
*size = backtrace(stack, *size);
|
||||
#elif OS(WIN)
|
||||
// The CaptureStackBackTrace function is available in XP, but it is not defined
|
||||
@@ -260,7 +260,7 @@
|
||||
: m_name(0)
|
||||
, m_cxaDemangled(0)
|
||||
{
|
||||
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
|
||||
+#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__) && defined(__GLIBC__))
|
||||
Dl_info info;
|
||||
if (!dladdr(addr, &info) || !info.dli_sname)
|
||||
return;
|
||||
--- qtwebengine/src/3rdparty/chromium/base/debug/stack_trace_posix.cc 2017-01-03 10:28:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/debug/stack_trace_posix.cc 2017-02-23 20:50:40.715144712 +0100
|
||||
@@ -25,7 +25,7 @@
|
||||
#if defined(__GLIBCXX__)
|
||||
--- qtwebengine/src/3rdparty/chromium/base/debug/stack_trace_posix.cc 2017-11-28 14:06:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/debug/stack_trace_posix.cc 2018-01-27 21:50:04.693231905 +0100
|
||||
@@ -26,7 +26,7 @@
|
||||
#if !defined(USE_SYMBOLIZE)
|
||||
#include <cxxabi.h>
|
||||
#endif
|
||||
-#if !defined(__UCLIBC__)
|
||||
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
@@ -82,7 +82,7 @@
|
||||
// Note: code in this function is NOT async-signal safe (std::string uses
|
||||
// malloc internally).
|
||||
|
||||
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
|
||||
+#if defined(__GLIBCXX__) && defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
std::string::size_type search_from = 0;
|
||||
while (search_from < text->size()) {
|
||||
@@ -113,7 +113,7 @@
|
||||
// Look for the start of a mangled symbol, from search_from.
|
||||
@@ -117,7 +117,7 @@
|
||||
search_from = mangled_start + 2;
|
||||
}
|
||||
}
|
||||
|
||||
-#endif // defined(__GLIBCXX__) && !defined(__UCLIBC__)
|
||||
+#endif // defined(__GLIBCXX__) && defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
-#endif // !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#endif // !defined(__GLIBC__) && !defined(_AIX)
|
||||
}
|
||||
#endif // !defined(USE_SYMBOLIZE)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
@@ -129,7 +129,7 @@
|
||||
virtual ~BacktraceOutputHandler() {}
|
||||
};
|
||||
|
||||
-#if !defined(__UCLIBC__)
|
||||
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
void OutputPointer(void* pointer, BacktraceOutputHandler* handler) {
|
||||
// This should be more than enough to store a 64-bit number in hex:
|
||||
// 16 hex digits + 1 for null-terminator.
|
||||
@@ -202,7 +202,7 @@
|
||||
@@ -206,7 +206,7 @@
|
||||
}
|
||||
#endif // defined(USE_SYMBOLIZE)
|
||||
}
|
||||
-#endif // !defined(__UCLIBC__)
|
||||
+#endif // defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
-#endif // !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#endif // !defined(__GLIBC__) && !defined(_AIX)
|
||||
|
||||
void PrintToStderr(const char* output) {
|
||||
// NOTE: This code MUST be async-signal safe (it's used by in-process
|
||||
@@ -717,7 +717,7 @@
|
||||
// NOTE: This code MUST be async-signal safe (it's used by in-process
|
||||
// stack dumping signal handler). NO malloc or stdio is allowed here.
|
||||
@@ -749,7 +749,7 @@
|
||||
// NOTE: This code MUST be async-signal safe (it's used by in-process
|
||||
// stack dumping signal handler). NO malloc or stdio is allowed here.
|
||||
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
count = std::min(arraysize(trace_), count);
|
||||
|
||||
-#if !defined(__UCLIBC__)
|
||||
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
// Though the backtrace API man page does not list any possible negative
|
||||
// return values, we take no chance.
|
||||
count_ = base::saturated_cast<size_t>(backtrace(trace_, arraysize(trace_)));
|
||||
@@ -730,13 +730,13 @@
|
||||
@@ -764,13 +764,13 @@
|
||||
// NOTE: This code MUST be async-signal safe (it's used by in-process
|
||||
// stack dumping signal handler). NO malloc or stdio is allowed here.
|
||||
|
||||
-#if !defined(__UCLIBC__)
|
||||
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
PrintBacktraceOutputHandler handler;
|
||||
ProcessBacktrace(trace_, count_, &handler);
|
||||
#endif
|
||||
}
|
||||
|
||||
-#if !defined(__UCLIBC__)
|
||||
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
void StackTrace::OutputToStream(std::ostream* os) const {
|
||||
StreamBacktraceOutputHandler handler(os);
|
||||
ProcessBacktrace(trace_, count_, &handler);
|
||||
--- qtwebengine/src/3rdparty/chromium/base/logging.cc 2017-01-03 10:28:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/logging.cc 2017-02-26 12:49:40.691446466 +0100
|
||||
@@ -526,7 +526,7 @@
|
||||
}
|
||||
--- qtwebengine/src/3rdparty/chromium/base/debug/stack_trace.cc 2017-11-28 14:06:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/debug/stack_trace.cc 2018-01-27 22:31:08.296359000 +0100
|
||||
@@ -214,7 +214,7 @@
|
||||
|
||||
std::string StackTrace::ToString() const {
|
||||
std::stringstream stream;
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
OutputToStream(&stream);
|
||||
#endif
|
||||
return stream.str();
|
||||
--- qtwebengine/src/3rdparty/chromium/base/logging.cc 2017-11-28 14:06:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/logging.cc 2018-01-27 22:46:34.970406807 +0100
|
||||
@@ -546,7 +546,7 @@
|
||||
|
||||
LogMessage::~LogMessage() {
|
||||
-#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__)
|
||||
+#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && defined(__GLIBC__)
|
||||
size_t stack_start = stream_.tellp();
|
||||
-#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \
|
||||
+#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__) && \
|
||||
!defined(OS_AIX)
|
||||
if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) {
|
||||
// Include a stack trace on a fatal, unless a debugger is attached.
|
||||
base::debug::StackTrace trace;
|
||||
--- qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/Assertions.cpp 2017-11-28 14:06:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/Assertions.cpp 2018-01-29 20:23:26.498185623 +0100
|
||||
@@ -59,7 +59,6 @@
|
||||
#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(__UCLIBC__))
|
||||
#include <cxxabi.h>
|
||||
#include <dlfcn.h>
|
||||
-#include <execinfo.h>
|
||||
#endif
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
--- qtwebengine/src/3rdparty/chromium/third_party/webrtc/rtc_base/checks.cc 2017-11-28 14:06:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/webrtc/rtc_base/checks.cc 2018-01-29 20:32:41.070163511 +0100
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
|
||||
+#if defined(__GLIBCXX__) && defined(__GLIBC__)
|
||||
#include <cxxabi.h>
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
@@ -60,7 +60,7 @@
|
||||
// to get usable symbols on Linux. This is copied from V8. Chromium has a more
|
||||
// advanced stace trace system; also more difficult to copy.
|
||||
void DumpBacktrace() {
|
||||
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
|
||||
+#if defined(__GLIBCXX__) && defined(__GLIBC__)
|
||||
void* trace[100];
|
||||
int size = backtrace(trace, sizeof(trace) / sizeof(*trace));
|
||||
char** symbols = backtrace_symbols(trace, size);
|
||||
|
|
|
@ -1,22 +1,42 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc 2017-01-03 10:28:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc 2017-02-21 22:04:37.993963440 +0100
|
||||
@@ -128,7 +128,7 @@
|
||||
// fixed quantum, so the excess region will not be resident.
|
||||
// See crrev.com/1531463004 for detailed explanation.
|
||||
resident_size = stats.max_size_in_use;
|
||||
--- qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc 2017-11-28 14:06:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc 2018-01-27 20:13:26.960932805 +0100
|
||||
@@ -243,7 +243,7 @@
|
||||
allocated_objects_count = main_heap_info.block_count;
|
||||
#elif defined(OS_FUCHSIA)
|
||||
// TODO(fuchsia): Port, see https://crbug.com/706592.
|
||||
-#else
|
||||
+#elif defined(__GLIBC__)
|
||||
struct mallinfo info = mallinfo();
|
||||
DCHECK_GE(info.arena + info.hblkhd, info.uordblks);
|
||||
|
||||
--- qtwebengine/src/3rdparty/chromium/content/child/content_child_helpers.cc 2017-01-03 10:28:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/content/child/content_child_helpers.cc 2017-02-21 22:09:13.161343477 +0100
|
||||
@@ -255,6 +255,8 @@
|
||||
|
||||
// Total allocated space is given by |uordblks|.
|
||||
allocated_objects_size = info.uordblks;
|
||||
+#else
|
||||
+// musl libc does not support mallinfo()
|
||||
#endif
|
||||
|
||||
MemoryAllocatorDump* outer_dump = pmd->CreateAllocatorDump("malloc");
|
||||
--- qtwebengine/src/3rdparty/chromium/base/process/process_metrics_posix.cc 2017-11-28 14:06:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/process/process_metrics_posix.cc 2018-01-27 20:48:11.571040348 +0100
|
||||
@@ -94,7 +94,7 @@
|
||||
malloc_statistics_t stats = {0};
|
||||
malloc_zone_statistics(nullptr, &stats);
|
||||
return stats.size_in_use;
|
||||
-#elif defined(OS_LINUX) || defined(OS_ANDROID)
|
||||
+#elif (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_ANDROID)
|
||||
struct mallinfo minfo = mallinfo();
|
||||
#if defined(USE_TCMALLOC)
|
||||
return minfo.uordblks;
|
||||
--- qtwebengine/src/3rdparty/chromium/content/child/content_child_helpers.cc 2017-11-28 14:06:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/content/child/content_child_helpers.cc 2018-01-28 06:23:14.891238507 +0100
|
||||
@@ -25,7 +25,7 @@
|
||||
// though, this provides only a partial and misleading value.
|
||||
// Unfortunately some telemetry benchmark rely on it and these need to
|
||||
// be refactored before getting rid of this. See crbug.com/581365 .
|
||||
-#if defined(OS_LINUX) || defined(OS_ANDROID)
|
||||
+#if (defined(OS_LINUX) || defined(OS_ANDROID)) && defined(__GLIBC__)
|
||||
+#if defined(__GLIBC__) || defined(OS_ANDROID)
|
||||
size_t GetMemoryUsageKB() {
|
||||
struct mallinfo minfo = mallinfo();
|
||||
uint64_t mem_usage =
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
--- qtwebengine/src/core/api/qtbug-61521.cpp 2017-11-29 09:42:29.000000000 +0100
|
||||
+++ qtwebengine/src/core/api/qtbug-61521.cpp 2018-01-28 06:49:29.454175725 +0100
|
||||
@@ -111,7 +111,11 @@
|
||||
}
|
||||
|
||||
SHIM_HIDDEN void* ShimPvalloc(size_t size) {
|
||||
+#if defined(__GLIBC__)
|
||||
return pvalloc(size);
|
||||
+#else
|
||||
+ return valloc((size+4095)&~4095);
|
||||
+#endif
|
||||
}
|
||||
|
||||
SHIM_HIDDEN int ShimPosixMemalign(void** r, size_t a, size_t s) {
|
|
@ -1,11 +1,24 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_userspace.c 2016-11-07 15:46:18.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_userspace.c 2016-12-20 07:41:38.408483734 +0100
|
||||
@@ -71,7 +71,7 @@
|
||||
#if defined(__Userspace_os_Darwin)
|
||||
pthread_setname_np(name);
|
||||
#endif
|
||||
-#if defined(__Userspace_os_Linux)
|
||||
+#if defined(__Userspace_os_Linux) && defined(__GLIBC__)
|
||||
pthread_setname_np(pthread_self(), name);
|
||||
#endif
|
||||
#if defined(__Userspace_os_FreeBSD)
|
||||
--- qtlocation/src/3rdparty/mapbox-gl-native/platform/default/thread.cpp 2017-11-14 18:03:52.000000000 +0100
|
||||
+++ qtlocation/src/3rdparty/mapbox-gl-native/platform/default/thread.cpp 2018-01-27 19:49:19.691858141 +0100
|
||||
@@ -11,17 +11,21 @@
|
||||
|
||||
std::string getCurrentThreadName() {
|
||||
char name[32] = "unknown";
|
||||
+#if defined(__GLIBC__)
|
||||
pthread_getname_np(pthread_self(), name, sizeof(name));
|
||||
+#endif
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
void setCurrentThreadName(const std::string& name) {
|
||||
+#if defined(__GLIBC__)
|
||||
if (name.size() > 15) { // Linux hard limit (see manpages).
|
||||
pthread_setname_np(pthread_self(), name.substr(0, 15).c_str());
|
||||
} else {
|
||||
pthread_setname_np(pthread_self(), name.c_str());
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
void makeThreadLowPriority() {
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp 2016-03-03 15:48:36.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp 2016-03-17 06:31:13.832778611 +0100
|
||||
@@ -67,7 +67,7 @@
|
||||
// FIXME: On Mac OSX and Linux, this method cannot estimate stack size
|
||||
// correctly for the main thread.
|
||||
|
||||
-#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD)
|
||||
+#if OS(LINUX) || OS(ANDROID) || OS(FREEBSD)
|
||||
// pthread_getattr_np() can fail if the thread is not invoked by
|
||||
// pthread_create() (e.g., the main thread of webkit_unit_tests).
|
||||
// In this case, this method returns 0 and the caller must handle it.
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
void* StackFrameDepth::getStackStart()
|
||||
{
|
||||
-#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD)
|
||||
+#if OS(LINUX) || OS(ANDROID) || OS(FREEBSD)
|
||||
pthread_attr_t attr;
|
||||
int error;
|
||||
#if OS(FREEBSD)
|
|
@ -0,0 +1,20 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp 2018-01-27 23:08:43.586475349 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp 2018-01-27 23:18:22.274505203 +0100
|
||||
@@ -28,7 +28,7 @@
|
||||
// FIXME: On Mac OSX and Linux, this method cannot estimate stack size
|
||||
// correctly for the main thread.
|
||||
|
||||
-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
||||
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
||||
defined(OS_FUCHSIA)
|
||||
// pthread_getattr_np() can fail if the thread is not invoked by
|
||||
// pthread_create() (e.g., the main thread of webkit_unit_tests).
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
|
||||
void* GetStackStart() {
|
||||
-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
||||
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
||||
defined(OS_FUCHSIA)
|
||||
pthread_attr_t attr;
|
||||
int error;
|
|
@ -1,13 +0,0 @@
|
|||
Fix a warning issued by musl libc headers
|
||||
|
||||
--- qtwebengine/src/3rdparty/chromium/base/files/file_util_posix.cc 2015-02-17 05:57:34.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/files/file_util_posix.cc 2015-06-05 12:20:48.831848404 +0200
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
-#include <sys/errno.h>
|
||||
+#include <errno.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
|
@ -0,0 +1,10 @@
|
|||
--- qtserialbus/src/plugins/canbus/socketcan/socketcanbackend.h 2017-11-22 09:57:45.000000000 +0100
|
||||
+++ qtserialbus/src/plugins/canbus/socketcan/socketcanbackend.h 2018-01-27 19:17:31.333759690 +0100
|
||||
@@ -47,6 +47,7 @@
|
||||
|
||||
// The order of the following includes is mandatory, because some
|
||||
// distributions use sa_family_t in can.h without including socket.h
|
||||
+#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/uio.h>
|
||||
#include <linux/can.h>
|
|
@ -1,50 +0,0 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp 2016-11-15 17:07:38.680665385 -0800
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/platform/text/TextBreakIterator.cpp 2016-11-15 17:12:17.564001354 -0800
|
||||
@@ -26,6 +26,9 @@
|
||||
#include "wtf/StdLibExtras.h"
|
||||
#include "wtf/text/CharacterNames.h"
|
||||
|
||||
+#include <unicode/uchar.h>
|
||||
+#include <unicode/uvernum.h>
|
||||
+
|
||||
namespace blink {
|
||||
|
||||
unsigned numGraphemeClusters(const String& string)
|
||||
@@ -122,13 +125,18 @@
|
||||
{ B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), 0, B(0, 0, 0, 0, 0, 0, 0, 0), 0, 0, 0, B(0, 0, 0, 0, 0, 0, 0, 0), 0, 0, 0, B(0, 0, 0, 0, 0, 0, 0, 0) }, // DEL
|
||||
};
|
||||
|
||||
+#if U_ICU_VERSION_MAJOR_NUM >= 58
|
||||
+#define BA_LB_COUNT (U_LB_COUNT - 3)
|
||||
+#else
|
||||
+#define BA_LB_COUNT U_LB_COUNT
|
||||
+#endif
|
||||
// Line breaking table for CSS word-break: break-all. This table differs from
|
||||
// asciiLineBreakTable in:
|
||||
// - Indices are Line Breaking Classes defined in UAX#14 Unicode Line Breaking
|
||||
// Algorithm: http://unicode.org/reports/tr14/#DescriptionOfProperties
|
||||
// - 1 indicates additional break opportunities. 0 indicates to fallback to
|
||||
// normal line break, not "prohibit break."
|
||||
-static const unsigned char breakAllLineBreakClassTable[][U_LB_COUNT / 8 + 1] = {
|
||||
+static const unsigned char breakAllLineBreakClassTable[][BA_LB_COUNT / 8 + 1] = {
|
||||
// XX AI AL B2 BA BB BK CB CL CM CR EX GL HY ID IN IS LF NS NU OP PO PR QU SA SG SP SY ZW NL WJ H2 H3 JL JT JV CP CJ HL RI
|
||||
{ B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // XX
|
||||
{ B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // AI
|
||||
@@ -178,7 +186,7 @@
|
||||
#undef AL
|
||||
|
||||
static_assert(WTF_ARRAY_LENGTH(asciiLineBreakTable) == asciiLineBreakTableLastChar - asciiLineBreakTableFirstChar + 1, "asciiLineBreakTable should be consistent");
|
||||
-static_assert(WTF_ARRAY_LENGTH(breakAllLineBreakClassTable) == U_LB_COUNT, "breakAllLineBreakClassTable should be consistent");
|
||||
+static_assert(WTF_ARRAY_LENGTH(breakAllLineBreakClassTable) == BA_LB_COUNT, "breakAllLineBreakClassTable should be consistent");
|
||||
|
||||
static inline bool shouldBreakAfter(UChar lastCh, UChar ch, UChar nextCh)
|
||||
{
|
||||
@@ -209,7 +217,7 @@
|
||||
|
||||
static inline bool shouldBreakAfterBreakAll(ULineBreak lastLineBreak, ULineBreak lineBreak)
|
||||
{
|
||||
- if (lineBreak >= 0 && lineBreak < U_LB_COUNT && lastLineBreak >= 0 && lastLineBreak < U_LB_COUNT) {
|
||||
+ if (lineBreak >= 0 && lineBreak < BA_LB_COUNT && lastLineBreak >= 0 && lastLineBreak < BA_LB_COUNT) {
|
||||
const unsigned char* tableRow = breakAllLineBreakClassTable[lastLineBreak];
|
||||
return tableRow[lineBreak / 8] & (1 << (lineBreak % 8));
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/wtf/SpinLock.cpp 2017-01-03 10:28:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/wtf/SpinLock.cpp 2017-03-05 16:31:09.299623422 +0100
|
||||
@@ -29,8 +29,10 @@
|
||||
#elif COMPILER(GCC) || COMPILER(CLANG)
|
||||
#if CPU(X86_64) || CPU(X86)
|
||||
#define YIELD_PROCESSOR __asm__ __volatile__("pause")
|
||||
-#elif CPU(ARM) || CPU(ARM64)
|
||||
+#elif CPU(ARM64)
|
||||
#define YIELD_PROCESSOR __asm__ __volatile__("yield")
|
||||
+#elif CPU(ARM)
|
||||
+#define YIELD_PROCESSOR __asm__ __volatile__("nop")
|
||||
#elif CPU(MIPS)
|
||||
// The MIPS32 docs state that the PAUSE instruction is a no-op on older
|
||||
// architectures (first added in MIPS32r2). To avoid assembler errors when
|
|
@ -1,62 +0,0 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h
|
||||
+++ qtwebengine/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h
|
||||
@@ -21,10 +21,6 @@
|
||||
|
||||
// Include FFmpeg header files.
|
||||
extern "C" {
|
||||
-// Disable deprecated features which result in spammy compile warnings. This
|
||||
-// list of defines must mirror those in the 'defines' section of BUILD.gn file &
|
||||
-// ffmpeg.gyp file or the headers below will generate different structures!
|
||||
-#define FF_API_CONVERGENCE_DURATION 0
|
||||
// Upstream libavcodec/utils.c still uses the deprecated
|
||||
// av_dup_packet(), causing deprecation warnings.
|
||||
// The normal fix for such things is to disable the feature as below,
|
||||
@@ -39,7 +35,6 @@ MSVC_PUSH_DISABLE_WARNING(4244);
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#if !defined(USE_SYSTEM_FFMPEG)
|
||||
-#include <libavformat/internal.h>
|
||||
#endif
|
||||
#include <libavformat/avio.h>
|
||||
#include <libavutil/avutil.h>
|
||||
--- qtwebengine/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc
|
||||
+++ qtwebengine/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc
|
||||
@@ -1036,24 +1036,6 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
|
||||
std::vector<base::TimeDelta> start_time_estimates(format_context->nb_streams,
|
||||
kInfiniteDuration());
|
||||
#if !defined(USE_SYSTEM_FFMPEG)
|
||||
- const AVFormatInternal* internal = format_context->internal;
|
||||
- if (internal && internal->packet_buffer &&
|
||||
- format_context->start_time != static_cast<int64_t>(AV_NOPTS_VALUE)) {
|
||||
- struct AVPacketList* packet_buffer = internal->packet_buffer;
|
||||
- while (packet_buffer != internal->packet_buffer_end) {
|
||||
- DCHECK_LT(static_cast<size_t>(packet_buffer->pkt.stream_index),
|
||||
- start_time_estimates.size());
|
||||
- const AVStream* stream =
|
||||
- format_context->streams[packet_buffer->pkt.stream_index];
|
||||
- if (packet_buffer->pkt.pts != static_cast<int64_t>(AV_NOPTS_VALUE)) {
|
||||
- const base::TimeDelta packet_pts =
|
||||
- ConvertFromTimeBase(stream->time_base, packet_buffer->pkt.pts);
|
||||
- if (packet_pts < start_time_estimates[stream->index])
|
||||
- start_time_estimates[stream->index] = packet_pts;
|
||||
- }
|
||||
- packet_buffer = packet_buffer->next;
|
||||
- }
|
||||
- }
|
||||
#endif
|
||||
|
||||
AVStream* audio_stream = NULL;
|
||||
--- qtwebengine/src/core/config/linux.pri
|
||||
+++ qtwebengine/src/core/config/linux.pri
|
||||
@@ -21,6 +21,11 @@ GYP_CONFIG += \
|
||||
use_pango=0 \
|
||||
use_openssl=1
|
||||
|
||||
+GYP_CONFIG += \
|
||||
+ enable_webrtc=0 \
|
||||
+ use_system_ffmpeg=1 \
|
||||
+ use_system_nss=1
|
||||
+
|
||||
use?(nss) {
|
||||
GYP_CONFIG += use_nss_certs=1 \
|
||||
use_openssl_certs=0
|
|
@ -0,0 +1,157 @@
|
|||
--- qtwebengine/src/3rdparty/chromium/base/i18n/unicodestring.h 2017-11-28 14:06:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/i18n/unicodestring.h 2018-01-27 19:45:41.595846890 +0100
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
inline string16 UnicodeStringToString16(const icu::UnicodeString& unistr) {
|
||||
#if U_ICU_VERSION_MAJOR_NUM >= 59
|
||||
- return base::string16(icu::toUCharPtr(unistr.getBuffer()),
|
||||
+ return base::string16(reinterpret_cast<const UChar *>(unistr.getBuffer()),
|
||||
static_cast<size_t>(unistr.length()));
|
||||
#else
|
||||
return base::string16(unistr.getBuffer(),
|
||||
--- qtwebengine/src/3rdparty/chromium/base/i18n/string_search.cc 2017-11-28 14:06:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/i18n/string_search.cc 2018-01-27 18:35:29.907629612 +0100
|
||||
@@ -20,7 +20,9 @@
|
||||
const string16& dummy = find_this_;
|
||||
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
- search_ = usearch_open(find_this_.data(), find_this_.size(),
|
||||
- dummy.data(), dummy.size(),
|
||||
+ search_ = usearch_open(reinterpret_cast<const UChar*>(find_this_.data()),
|
||||
+ find_this_.size(),
|
||||
+ reinterpret_cast<const UChar*>(dummy.data()),
|
||||
+ dummy.size(),
|
||||
uloc_getDefault(),
|
||||
NULL, // breakiter
|
||||
@@ -43,7 +43,7 @@
|
||||
bool FixedPatternStringSearchIgnoringCaseAndAccents::Search(
|
||||
const string16& in_this, size_t* match_index, size_t* match_length) {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
- usearch_setText(search_, in_this.data(), in_this.size(), &status);
|
||||
+ usearch_setText(search_, reinterpret_cast<const UChar*>(in_this.data()), in_this.size(), &status);
|
||||
|
||||
// Default to basic substring search if usearch fails. According to
|
||||
// http://icu-project.org/apiref/icu4c/usearch_8h.html, usearch_open will fail
|
||||
--- qtwebengine/src/3rdparty/chromium/base/i18n/bidi_line_iterator.cc 2017-11-28 14:06:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/i18n/bidi_line_iterator.cc 2018-01-27 18:57:39.643698212 +0100
|
||||
@@ -44,7 +44,7 @@
|
||||
bidi_ = ubidi_openSized(static_cast<int>(text.length()), 0, &error);
|
||||
if (U_FAILURE(error))
|
||||
return false;
|
||||
- ubidi_setPara(bidi_, text.data(), static_cast<int>(text.length()),
|
||||
+ ubidi_setPara(bidi_, reinterpret_cast<const UChar*>(text.data()), static_cast<int>(text.length()),
|
||||
GetParagraphLevelForDirection(direction), NULL, &error);
|
||||
return (U_SUCCESS(error) == TRUE);
|
||||
}
|
||||
--- qtwebengine/src/3rdparty/chromium/base/i18n/break_iterator.cc 2017-11-28 14:06:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/i18n/break_iterator.cc 2018-01-27 19:08:24.185731464 +0100
|
||||
@@ -59,7 +59,7 @@
|
||||
return false;
|
||||
}
|
||||
if (break_type_ == RULE_BASED) {
|
||||
- iter_ = ubrk_openRules(rules_.c_str(),
|
||||
- static_cast<int32_t>(rules_.length()),
|
||||
- string_.data(),
|
||||
+ iter_ = ubrk_openRules(reinterpret_cast<const UChar *>(rules_.c_str()),
|
||||
+ static_cast<int32_t>(rules_.length()),
|
||||
+ reinterpret_cast<const UChar *>(string_.data()),
|
||||
static_cast<int32_t>(string_.size()),
|
||||
@@ -72,7 +72,7 @@
|
||||
} else {
|
||||
iter_ = ubrk_open(break_type,
|
||||
NULL,
|
||||
- string_.data(),
|
||||
+ reinterpret_cast<const UChar*>(string_.data()),
|
||||
static_cast<int32_t>(string_.size()),
|
||||
&status);
|
||||
if (U_FAILURE(status)) {
|
||||
@@ -128,7 +128,7 @@
|
||||
bool BreakIterator::SetText(const base::char16* text, const size_t length) {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
ubrk_setText(static_cast<UBreakIterator*>(iter_),
|
||||
- text, length, &status);
|
||||
+ reinterpret_cast<const UChar *>(text), length, &status);
|
||||
pos_ = 0; // implicit when ubrk_setText is done
|
||||
prev_ = npos;
|
||||
if (U_FAILURE(status)) {
|
||||
--- qtwebengine/src/3rdparty/chromium/base/i18n/rtl.cc 2017-11-28 14:06:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/i18n/rtl.cc 2018-01-27 19:25:16.283783677 +0100
|
||||
@@ -212,7 +212,7 @@
|
||||
}
|
||||
|
||||
TextDirection GetFirstStrongCharacterDirection(const string16& text) {
|
||||
- const UChar* string = text.c_str();
|
||||
+ const UChar* string = reinterpret_cast<const UChar *>(text.c_str());
|
||||
size_t length = text.length();
|
||||
size_t position = 0;
|
||||
while (position < length) {
|
||||
@@ -228,7 +228,7 @@
|
||||
}
|
||||
|
||||
TextDirection GetLastStrongCharacterDirection(const string16& text) {
|
||||
- const UChar* string = text.c_str();
|
||||
+ const UChar* string = reinterpret_cast<const UChar *>(text.c_str());
|
||||
size_t position = text.length();
|
||||
while (position > 0) {
|
||||
UChar32 character;
|
||||
@@ -243,7 +243,7 @@
|
||||
}
|
||||
|
||||
TextDirection GetStringDirection(const string16& text) {
|
||||
- const UChar* string = text.c_str();
|
||||
+ const UChar* string = reinterpret_cast<const UChar *>(text.c_str());
|
||||
size_t length = text.length();
|
||||
size_t position = 0;
|
||||
|
||||
@@ -374,7 +374,7 @@
|
||||
#endif // !OS_WIN
|
||||
|
||||
bool StringContainsStrongRTLChars(const string16& text) {
|
||||
- const UChar* string = text.c_str();
|
||||
+ const UChar* string = reinterpret_cast<const UChar *>(text.c_str());
|
||||
size_t length = text.length();
|
||||
size_t position = 0;
|
||||
while (position < length) {
|
||||
--- qtwebengine/src/3rdparty/chromium/base/i18n/icu_string_conversions.cc 2017-11-28 14:06:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/i18n/icu_string_conversions.cc 2018-01-27 19:51:29.425864834 +0100
|
||||
@@ -151,7 +151,7 @@
|
||||
if (!U_SUCCESS(status))
|
||||
return false;
|
||||
|
||||
- return ConvertFromUTF16(converter, utf16.c_str(),
|
||||
+ return ConvertFromUTF16(converter, reinterpret_cast<const UChar *>(utf16.c_str()),
|
||||
static_cast<int>(utf16.length()), on_error, encoded);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
SetUpErrorHandlerForToUChars(on_error, converter, &status);
|
||||
std::unique_ptr<char16[]> buffer(new char16[uchar_max_length]);
|
||||
- int actual_size = ucnv_toUChars(converter, buffer.get(),
|
||||
+ int actual_size = ucnv_toUChars(converter, reinterpret_cast<UChar *>(buffer.get()),
|
||||
static_cast<int>(uchar_max_length), encoded.data(),
|
||||
static_cast<int>(encoded.length()), &status);
|
||||
ucnv_close(converter);
|
||||
@@ -205,8 +205,8 @@
|
||||
string16 normalized_utf16;
|
||||
std::unique_ptr<char16[]> buffer(new char16[max_length]);
|
||||
int actual_length = unorm_normalize(
|
||||
- utf16.c_str(), utf16.length(), UNORM_NFC, 0,
|
||||
- buffer.get(), static_cast<int>(max_length), &status);
|
||||
+ reinterpret_cast<const UChar *>(utf16.c_str()), utf16.length(), UNORM_NFC, 0,
|
||||
+ reinterpret_cast<UChar *>(buffer.get()), static_cast<int>(max_length), &status);
|
||||
if (!U_SUCCESS(status))
|
||||
return false;
|
||||
normalized_utf16.assign(buffer.get(), actual_length);
|
||||
--- qtwebengine/src/3rdparty/chromium/base/i18n/case_conversion.cc 2017-11-28 14:06:53.000000000 +0100
|
||||
+++ qtwebengine/src/3rdparty/chromium/base/i18n/case_conversion.cc 2018-01-27 19:59:11.955888696 +0100
|
||||
@@ -65,7 +65,7 @@
|
||||
// Don't use WriteInto, which assumes null terminators.
|
||||
int32_t new_length = case_mapper(
|
||||
- &dest[0], saturated_cast<int32_t>(dest.size()),
|
||||
- string.data(), saturated_cast<int32_t>(string.size()),
|
||||
+ reinterpret_cast<UChar *>(&dest[0]), saturated_cast<int32_t>(dest.size()),
|
||||
+ reinterpret_cast<const UChar *>(string.data()), saturated_cast<int32_t>(string.size()),
|
||||
&error);
|
||||
dest.resize(new_length);
|
||||
} while (error == U_BUFFER_OVERFLOW_ERROR);
|
|
@ -1,148 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User Lee Salzman <lsalzman@mozilla.com>
|
||||
# Date 1504640559 14400
|
||||
# Tue Sep 05 15:42:39 2017 -0400
|
||||
# Node ID 923246286b9858fb103e100f886c03714b97b5ec
|
||||
# Parent 3fff2b174212af40a7b7ba75a047db431f81c780
|
||||
clip FreeType glyph bitmap to mask in Skia (52 ESR)
|
||||
|
||||
diff --git a/gfx/skia/skia/src/ports/SkFontHost_FreeType_common.cpp b/gfx/skia/skia/src/ports/SkFontHost_FreeType_common.cpp
|
||||
--- qtwebengine/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp
|
||||
+++ qtwebengine/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp
|
||||
@@ -350,58 +350,118 @@ void SkScalerContext_FreeType_Base::gene
|
||||
const SkMatrix& bitmapTransform)
|
||||
{
|
||||
const bool doBGR = SkToBool(fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag);
|
||||
const bool doVert = SkToBool(fRec.fFlags & SkScalerContext::kLCD_Vertical_Flag);
|
||||
|
||||
switch ( face->glyph->format ) {
|
||||
case FT_GLYPH_FORMAT_OUTLINE: {
|
||||
FT_Outline* outline = &face->glyph->outline;
|
||||
- FT_BBox bbox;
|
||||
- FT_Bitmap target;
|
||||
|
||||
int dx = 0, dy = 0;
|
||||
if (fRec.fFlags & SkScalerContext::kSubpixelPositioning_Flag) {
|
||||
dx = SkFixedToFDot6(glyph.getSubXFixed());
|
||||
dy = SkFixedToFDot6(glyph.getSubYFixed());
|
||||
// negate dy since freetype-y-goes-up and skia-y-goes-down
|
||||
dy = -dy;
|
||||
}
|
||||
- FT_Outline_Get_CBox(outline, &bbox);
|
||||
- /*
|
||||
- what we really want to do for subpixel is
|
||||
- offset(dx, dy)
|
||||
- compute_bounds
|
||||
- offset(bbox & !63)
|
||||
- but that is two calls to offset, so we do the following, which
|
||||
- achieves the same thing with only one offset call.
|
||||
- */
|
||||
- FT_Outline_Translate(outline, dx - ((bbox.xMin + dx) & ~63),
|
||||
- dy - ((bbox.yMin + dy) & ~63));
|
||||
+ memset(glyph.fImage, 0, glyph.rowBytes() * glyph.fHeight);
|
||||
|
||||
if (SkMask::kLCD16_Format == glyph.fMaskFormat) {
|
||||
- FT_Render_Glyph(face->glyph, doVert ? FT_RENDER_MODE_LCD_V : FT_RENDER_MODE_LCD);
|
||||
+ FT_Outline_Translate(outline, dx, dy);
|
||||
+ FT_Error err = FT_Render_Glyph(face->glyph, doVert ? FT_RENDER_MODE_LCD_V : FT_RENDER_MODE_LCD);
|
||||
+ if (err) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
SkMask mask;
|
||||
glyph.toMask(&mask);
|
||||
+
|
||||
+ FT_GlyphSlotRec& ftGlyph = *face->glyph;
|
||||
+
|
||||
+ if (!SkIRect::Intersects(mask.fBounds,
|
||||
+ SkIRect::MakeXYWH( ftGlyph.bitmap_left,
|
||||
+ -ftGlyph.bitmap_top,
|
||||
+ ftGlyph.bitmap.width,
|
||||
+ ftGlyph.bitmap.rows)))
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ // If the FT_Bitmap extent is larger, discard bits of the bitmap outside the mask.
|
||||
+ // If the SkMask extent is larger, shrink mask to fit bitmap (clearing discarded).
|
||||
+ unsigned char* origBuffer = ftGlyph.bitmap.buffer;
|
||||
+ // First align the top left (origin).
|
||||
+ if (-ftGlyph.bitmap_top < mask.fBounds.fTop) {
|
||||
+ int32_t topDiff = mask.fBounds.fTop - (-ftGlyph.bitmap_top);
|
||||
+ ftGlyph.bitmap.buffer += ftGlyph.bitmap.pitch * topDiff;
|
||||
+ ftGlyph.bitmap.rows -= topDiff;
|
||||
+ ftGlyph.bitmap_top = -mask.fBounds.fTop;
|
||||
+ }
|
||||
+ if (ftGlyph.bitmap_left < mask.fBounds.fLeft) {
|
||||
+ int32_t leftDiff = mask.fBounds.fLeft - ftGlyph.bitmap_left;
|
||||
+ ftGlyph.bitmap.buffer += leftDiff;
|
||||
+ ftGlyph.bitmap.width -= leftDiff;
|
||||
+ ftGlyph.bitmap_left = mask.fBounds.fLeft;
|
||||
+ }
|
||||
+ if (mask.fBounds.fTop < -ftGlyph.bitmap_top) {
|
||||
+ mask.fImage += mask.fRowBytes * (-ftGlyph.bitmap_top - mask.fBounds.fTop);
|
||||
+ mask.fBounds.fTop = -ftGlyph.bitmap_top;
|
||||
+ }
|
||||
+ if (mask.fBounds.fLeft < ftGlyph.bitmap_left) {
|
||||
+ mask.fImage += sizeof(uint16_t) * (ftGlyph.bitmap_left - mask.fBounds.fLeft);
|
||||
+ mask.fBounds.fLeft = ftGlyph.bitmap_left;
|
||||
+ }
|
||||
+ // Origins aligned, clean up the width and height.
|
||||
+ int ftVertScale = (doVert ? 3 : 1);
|
||||
+ int ftHoriScale = (doVert ? 1 : 3);
|
||||
+ if (mask.fBounds.height() * ftVertScale < SkToInt(ftGlyph.bitmap.rows)) {
|
||||
+ ftGlyph.bitmap.rows = mask.fBounds.height() * ftVertScale;
|
||||
+ }
|
||||
+ if (mask.fBounds.width() * ftHoriScale < SkToInt(ftGlyph.bitmap.width)) {
|
||||
+ ftGlyph.bitmap.width = mask.fBounds.width() * ftHoriScale;
|
||||
+ }
|
||||
+ if (SkToInt(ftGlyph.bitmap.rows) < mask.fBounds.height() * ftVertScale) {
|
||||
+ mask.fBounds.fBottom = mask.fBounds.fTop + ftGlyph.bitmap.rows / ftVertScale;
|
||||
+ }
|
||||
+ if (SkToInt(ftGlyph.bitmap.width) < mask.fBounds.width() * ftHoriScale) {
|
||||
+ mask.fBounds.fRight = mask.fBounds.fLeft + ftGlyph.bitmap.width / ftHoriScale;
|
||||
+ }
|
||||
+
|
||||
if (fPreBlend.isApplicable()) {
|
||||
- copyFT2LCD16<true>(face->glyph->bitmap, mask, doBGR,
|
||||
+ copyFT2LCD16<true>(ftGlyph.bitmap, mask, doBGR,
|
||||
fPreBlend.fR, fPreBlend.fG, fPreBlend.fB);
|
||||
} else {
|
||||
- copyFT2LCD16<false>(face->glyph->bitmap, mask, doBGR,
|
||||
+ copyFT2LCD16<false>(ftGlyph.bitmap, mask, doBGR,
|
||||
fPreBlend.fR, fPreBlend.fG, fPreBlend.fB);
|
||||
}
|
||||
+ // Restore the buffer pointer so FreeType can properly free it.
|
||||
+ ftGlyph.bitmap.buffer = origBuffer;
|
||||
} else {
|
||||
+ FT_BBox bbox;
|
||||
+ FT_Bitmap target;
|
||||
+ FT_Outline_Get_CBox(outline, &bbox);
|
||||
+ /*
|
||||
+ what we really want to do for subpixel is
|
||||
+ offset(dx, dy)
|
||||
+ compute_bounds
|
||||
+ offset(bbox & !63)
|
||||
+ but that is two calls to offset, so we do the following, which
|
||||
+ achieves the same thing with only one offset call.
|
||||
+ */
|
||||
+ FT_Outline_Translate(outline, dx - ((bbox.xMin + dx) & ~63),
|
||||
+ dy - ((bbox.yMin + dy) & ~63));
|
||||
+
|
||||
target.width = glyph.fWidth;
|
||||
target.rows = glyph.fHeight;
|
||||
target.pitch = glyph.rowBytes();
|
||||
target.buffer = reinterpret_cast<uint8_t*>(glyph.fImage);
|
||||
target.pixel_mode = compute_pixel_mode( (SkMask::Format)fRec.fMaskFormat);
|
||||
target.num_grays = 256;
|
||||
|
||||
- memset(glyph.fImage, 0, glyph.rowBytes() * glyph.fHeight);
|
||||
FT_Outline_Get_Bitmap(face->glyph->library, outline, &target);
|
||||
}
|
||||
} break;
|
||||
|
||||
case FT_GLYPH_FORMAT_BITMAP: {
|
||||
FT_Pixel_Mode pixel_mode = static_cast<FT_Pixel_Mode>(face->glyph->bitmap.pixel_mode);
|
||||
SkMask::Format maskFormat = static_cast<SkMask::Format>(glyph.fMaskFormat);
|
||||
|
||||
|
|
@ -1,59 +1,53 @@
|
|||
# Template file for 'qt5'
|
||||
pkgname=qt5
|
||||
version=5.8.0
|
||||
revision=10
|
||||
wrksrc="qt-everywhere-opensource-src-${version}"
|
||||
version=5.10.1
|
||||
revision=1
|
||||
wrksrc="qt-everywhere-src-${version}"
|
||||
build_style=gnu-configure
|
||||
homepage="http://qt.io/"
|
||||
short_desc="A cross-platform application and UI framework (QT5)"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
license="GPL-3, LGPL-2.1"
|
||||
distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/single/qt-everywhere-opensource-src-${version}.tar.xz"
|
||||
checksum=0f4c54386d3dbac0606a936a7145cebb7b94b0ca2d29bc001ea49642984824b6
|
||||
|
||||
if [ "${XBPS_MACHINE%%-musl}" = i686 ]; then
|
||||
nodebug=yes # prevent OOM
|
||||
fi
|
||||
hostmakedepends="flex ruby gperf git python perl pkg-config protobuf re2c"
|
||||
makedepends="
|
||||
libressl-devel libpng-devel MesaLib-devel libXrender-devel unixodbc-devel
|
||||
hostmakedepends="flex ruby gperf git python perl pkg-config protobuf re2c ninja"
|
||||
# XXX: requires libvpx>=1.7.0
|
||||
makedepends="libressl-devel libpng-devel MesaLib-devel libXrender-devel unixodbc-devel
|
||||
fontconfig-devel libXi-devel libXv-devel libXinerama-devel libXrandr-devel
|
||||
libXcursor-devel libXScrnSaver-devel dbus-devel glib-devel icu-devel
|
||||
cups-devel libjpeg-turbo-devel sqlite-devel alsa-lib-devel tiff-devel
|
||||
libmng-devel libevent-devel ffmpeg-devel libvpx-devel jsoncpp-devel
|
||||
libsrtp-devel protobuf-devel snappy-devel minizip-devel
|
||||
cups-devel libjpeg-turbo-devel sqlite-devel alsa-lib-devel tiff-devel SDL2-devel
|
||||
pcre2-devel libmng-devel libevent-devel ffmpeg-devel jsoncpp-devel
|
||||
libsrtp-devel libvpx-devel protobuf-devel snappy-devel minizip-devel
|
||||
libxshmfence-devel libSM-devel xcb-util-keysyms-devel
|
||||
xcb-util-image-devel xcb-util-renderutil-devel xcb-util-wm-devel
|
||||
libXcomposite-devel libwebp-devel libxkbcommon-devel harfbuzz-devel gtk+-devel
|
||||
libXcomposite-devel libwebp-devel libxkbcommon-devel harfbuzz-devel gtk+3-devel
|
||||
mtdev-devel freetds-devel libmysqlclient-devel postgresql-libs-devel
|
||||
pulseaudio-devel libbluetooth-devel gst-plugins-base1-devel libxslt-devel
|
||||
pciutils-devel nss-devel libcap-devel libinput-devel libproxy-devel
|
||||
opus-devel pciutils-devel nss-devel libcap-devel libinput-devel libproxy-devel
|
||||
libxcb-devel libxkbcommon-devel tslib-devel wayland-devel libwayland-egl"
|
||||
depends="qtchooser"
|
||||
replaces="qt5-doc<5.6.0 qt5-quick1<5.6.0 qt5-quick1-devel<5.6.0 qt5-webkit<5.6.0 qt5-webkit-devel<5.6.0
|
||||
qt5-enginio<5.7.1 qt5-enginio-devel<5.7.1 qt5-plugin-gtk<5.7.1"
|
||||
homepage="http://qt.io/"
|
||||
short_desc="Cross-platform application and UI framework (QT5)"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
license="GPL-3, LGPL-2.1"
|
||||
distfiles="http://download.qt.io/official_releases/qt/${version%.*}/${version}/single/qt-everywhere-src-${version}.tar.xz"
|
||||
checksum=05ffba7b811b854ed558abf2be2ddbd3bb6ddd0b60ea4b5da75d277ac15e740a
|
||||
|
||||
|
||||
if [ "${XBPS_MACHINE%%-musl}" = i686 ]; then
|
||||
nodebug=yes # prevent OOM
|
||||
fi
|
||||
# Work around SSLv3_{client,server}_method missing in libressl-2.3.3
|
||||
CFLAGS="-DOPENSSL_NO_PSK -DOPENSSL_NO_NEXTPROTONEG -DOPENSSL_NO_SSL3_METHOD"
|
||||
CXXFLAGS="${CFLAGS}"
|
||||
CXXFLAGS+=" -Wno-deprecated-declarations -fno-delete-null-pointer-checks"
|
||||
CFLAGS="-DOPENSSL_NO_PSK -DOPENSSL_NO_NEXTPROTONEG"
|
||||
CXXFLAGS="${CFLAGS} -Wno-deprecated-declarations -fno-delete-null-pointer-checks"
|
||||
# Required for musl libc
|
||||
LDFLAGS="-pthread -ldl -fPIE"
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv5*|mips*) # Won't build for these
|
||||
broken=yes
|
||||
;;
|
||||
armv7*) # Force use of neon and enable libvpx
|
||||
CXXFLAGS+=" -mfpu=neon"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$CROSS_BUILD" ]; then
|
||||
# Need some devel packages in the host to build qmake, moc, uic, rcc
|
||||
# wayland-devel contains /usr/bin/wayland-scanner
|
||||
# Cross building ninja does not work, thus use the system ninja
|
||||
hostmakedepends+=" zlib-devel icu-devel wayland-devel ninja"
|
||||
hostmakedepends+=" zlib-devel wayland-devel icu-devel"
|
||||
# Cross building qtwebengine requires some more host packages
|
||||
hostmakedepends+=" nss-devel"
|
||||
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
||||
hostmakedepends+=" gcc-multilib"
|
||||
fi
|
||||
fi
|
||||
|
||||
_cleanup_wrksrc_leak() {
|
||||
|
@ -92,8 +86,14 @@ _install_subpkg() {
|
|||
rm -f ${PKGDESTDIR}/usr/lib/*.so
|
||||
rm -f ${PKGDESTDIR}/usr/lib/*.prl
|
||||
if [ -d ${PKGDESTDIR}/usr/lib/qt5/bin ]; then
|
||||
if [ -n "$CROSS_BUILD" ]; then
|
||||
for f in $(find ${PKGDESTDIR}/usr/lib/qt5/bin -name "*-target" -type f); do
|
||||
base=${f##*/}
|
||||
mv -v ${f} ${f%-target}
|
||||
done
|
||||
fi
|
||||
vmkdir usr/bin
|
||||
for f in ${PKGDESTDIR}/usr/lib/qt5/bin/*; do
|
||||
for f in $(find ${PKGDESTDIR}/usr/lib/qt5/bin -type f); do
|
||||
base=${f##*/}
|
||||
ln -sf /usr/lib/qt5/bin/${base} ${PKGDESTDIR}/usr/bin/${base}-qt5
|
||||
done
|
||||
|
@ -155,9 +155,29 @@ _create_config() {
|
|||
echo '#include "../../linux-g++/qplatformdefs.h"' > ${specs}/${device}/qplatformdefs.h
|
||||
}
|
||||
|
||||
pre_configure() {
|
||||
_msg_cross() {
|
||||
msg_normal "***************************************************\n"
|
||||
msg_normal "$1 for target ${CROSS_BUILD} ...\n"
|
||||
msg_normal "***************************************************\n"
|
||||
}
|
||||
|
||||
do_configure() {
|
||||
local opts spec
|
||||
|
||||
# Compatibility functions res_ninit() and res_nclose() for musl libc
|
||||
cp ${FILESDIR}/resolv_compat.h ${wrksrc}/qtwebengine/src/3rdparty/chromium/net/dns
|
||||
|
||||
# Fix missing private includes https://bugreports.qt.io/browse/QTBUG-37417
|
||||
sed -i qtbase/mkspecs/features/create_cmake.prf -e "/CMAKE_NO_PRIVATE_INCLUDES = true/d"
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv5*|armv6*) # Disable "yield" assembler instruction
|
||||
sed -i qtwebengine/src/3rdparty/chromium/base/allocator/partition_allocator/spin_lock.cc \
|
||||
qtwebengine/src/3rdparty/chromium/third_party/pdfium/third_party/base/allocator/partition_allocator/spin_lock.cc \
|
||||
-e 's;"yield";"nop";'
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl)
|
||||
# Patch .../linux/*/config.{h,asm} to define HAVE_SYSCTL 0
|
||||
|
@ -170,35 +190,83 @@ pre_configure() {
|
|||
-e"s;\('use_experimental_allocator_shim%':\) 1,;\1 0,;"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Cross build patches
|
||||
if [ -n "$CROSS_BUILD" ]; then
|
||||
# This also sets default {C,CXX,LD}FLAGS for projects built using qmake
|
||||
sed -i -e "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 ${XBPS_CFLAGS}|" \
|
||||
qtbase/mkspecs/common/gcc-base.conf
|
||||
${wrksrc}/qtbase/mkspecs/common/gcc-base.conf
|
||||
sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${XBPS_LDFLAGS}|" \
|
||||
qtbase/mkspecs/common/g++-unix.conf
|
||||
# Patch to skip non-working check for GCC version
|
||||
patch -p0 < ${FILESDIR}/cross-gcc.patch
|
||||
${wrksrc}/qtbase/mkspecs/common/g++-unix.conf
|
||||
|
||||
# Create symbolic links for private include directories
|
||||
for d in $(ls ${wrksrc}/qtbase/include); do
|
||||
ln -s ${version}/${d}/private qtbase/include/${d}/private
|
||||
ln -sfv ${version}/${d}/private qtbase/include/${d}/private
|
||||
done
|
||||
# Copy system ninja to 3rdparty path
|
||||
cp -v /usr/bin/ninja qtwebengine/src/3rdparty/ninja/
|
||||
|
||||
# Bootstrap gn (generate ninja)
|
||||
|
||||
_msg_cross "Bootstrapping 'gn'"
|
||||
cd ${wrksrc}/qtwebengine/src/3rdparty/chromium/tools/gn
|
||||
conf='is_clang=false'
|
||||
conf+=' treat_warnings_as_errors=false'
|
||||
conf+=' enable_remoting=false'
|
||||
conf+=' enable_nacl=false'
|
||||
conf+=' use_cups=false'
|
||||
conf+=' use_gconf=false'
|
||||
conf+=' use_gio=false'
|
||||
conf+=' use_gnome_keyring=false'
|
||||
conf+=' use_gtk=false'
|
||||
conf+=' use_kerberos=false'
|
||||
conf+=' linux_use_bundled_binutils=false'
|
||||
conf+=' binutils_path="/usr/bin"'
|
||||
conf+=' use_gold=false'
|
||||
conf+=' use_sysroot=false'
|
||||
conf+=' use_allocator="none"'
|
||||
conf+=' is_android=false'
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv[56]*) conf+=' arm_use_neon=false arm_optionally_use_neon=false';;
|
||||
aarch64*|armv7*) conf+=' arm_use_neon=true arm_optionally_use_neon=false';;
|
||||
esac
|
||||
|
||||
AR="$AR_host" CC="$CC_host" CXX="$CXX_host" LD="$CXX_host" \
|
||||
CFLAGS="$CFLAGS_host" CXXFLAGS="$CXXFLAGS_host" LDFLAGS="$LDFLAGS_host" \
|
||||
PKGCONFIG=/usr/bin/pkgconfig PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig" \
|
||||
python2 bootstrap/bootstrap.py -n --gn-gen-args "${conf}"
|
||||
cd ${wrksrc}
|
||||
|
||||
mkdir -p ${wrksrc}/qtwebengine/src/3rdparty/chromium/tools/gn/out/Release
|
||||
cp -p ${wrksrc}/qtwebengine/src/3rdparty/chromium/out/Release/gn \
|
||||
${wrksrc}/qtwebengine/src/3rdparty/chromium/tools/gn/out/Release/
|
||||
|
||||
# Remove gn from SUBDIRS for qtwebengine/src/buildtools
|
||||
sed -i ${wrksrc}/qtwebengine/src/buildtools/buildtools.pro \
|
||||
-e"/gn.file = gn.pro/,+3d"
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv5*) # Patch not needed for armv5*
|
||||
;;
|
||||
arm*) # Patch for qtwayland using egl from rpi-userland
|
||||
patch -p0 -i ${FILESDIR}/qtwayland-egl.patch
|
||||
;;
|
||||
mips*) # sgidefs.h is in /usr/include/asm
|
||||
find ${wrksrc} -name Platform.h -exec sed -i "{}" \
|
||||
-e "s;<sgidefs.h>;<asm/sgidefs.h>;" \;
|
||||
;;
|
||||
esac
|
||||
else
|
||||
# qmake {CXX,L}FLAGS patches
|
||||
sed -i -e "s|^\(CXXFLAGS =.*\)|\1 ${CXXFLAGS}|" \
|
||||
-e "s|^\(LFLAGS =.*\)|\1 ${LDFLAGS}|" \
|
||||
${wrksrc}/qtbase/qmake/Makefile.unix
|
||||
|
||||
# Build qmake using Void {C,LD}FLAGS
|
||||
# This also sets default {C,CXX,LD}FLAGS for projects built using qmake
|
||||
sed -i -e "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 ${CFLAGS}|" \
|
||||
qtbase/mkspecs/common/gcc-base.conf
|
||||
${wrksrc}/qtbase/mkspecs/common/gcc-base.conf
|
||||
sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${LDFLAGS}|" \
|
||||
qtbase/mkspecs/common/g++-unix.conf
|
||||
${wrksrc}/qtbase/mkspecs/common/g++-unix.conf
|
||||
fi
|
||||
sed -i qtwebengine/src/3rdparty/chromium/third_party/ffmpeg/ffmpeg.gyp \
|
||||
-e "s|'use_system_ffmpeg%': 0,|'use_system_ffmpeg%': 1,|"
|
||||
}
|
||||
|
||||
do_configure() {
|
||||
local opts spec dirs dir f
|
||||
|
||||
opts+=" -confirm-license"
|
||||
opts+=" -opensource"
|
||||
|
@ -213,20 +281,33 @@ do_configure() {
|
|||
opts+=" -translationdir /usr/share/qt5/translations"
|
||||
opts+=" -examplesdir /usr/share/qt5/examples"
|
||||
opts+=" -archdatadir /usr/lib/qt5"
|
||||
opts+=" -accessibility -fontconfig -icu"
|
||||
opts+=" -accessibility"
|
||||
opts+=" -fontconfig"
|
||||
opts+=" -icu"
|
||||
opts+=" -openssl-linked"
|
||||
opts+=" -dbus-linked"
|
||||
opts+=" -no-pch"
|
||||
opts+=" -no-strip"
|
||||
opts+=" -nomake examples"
|
||||
opts+=" -optimized-qmake"
|
||||
opts+=" -no-use-gold-linker"
|
||||
opts+=" -system-libjpeg"
|
||||
opts+=" -system-libpng"
|
||||
opts+=" -system-zlib"
|
||||
opts+=" -system-sqlite"
|
||||
opts+=" -system-harfbuzz"
|
||||
# opts+=" -silent"
|
||||
opts+=" -v"
|
||||
opts+=" -webengine-alsa"
|
||||
opts+=" -webengine-pulseaudio"
|
||||
opts+=" -no-webengine-embedded-build"
|
||||
opts+=" -webengine-ffmpeg"
|
||||
opts+=" -webengine-opus"
|
||||
opts+=" -webengine-webp"
|
||||
opts+=" -webengine-pepper-plugins"
|
||||
opts+=" -webengine-printing-and-pdf"
|
||||
opts+=" -webengine-proprietary-codecs"
|
||||
opts+=" -webengine-spellchecker"
|
||||
opts+=" -silent"
|
||||
# opts+=" -v"
|
||||
|
||||
LDFLAGS+=" -Wl,--no-keep-memory" # needs more than 8GB RAM else
|
||||
if [ -n "$CROSS_BUILD" ]; then
|
||||
|
@ -238,6 +319,35 @@ do_configure() {
|
|||
opts+=" -sysroot ${XBPS_CROSS_BASE}"
|
||||
opts+=" -hostprefix host"
|
||||
opts+=" -extprefix /usr"
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv7*) # V8 snapshot can't be built with a 64 bit host compiler
|
||||
opts+=" -no-webengine-v8-snapshot"
|
||||
opts+=" -no-webengine-webrtc"
|
||||
;;
|
||||
arm*) # V8 snapshot can't be built with a 64 bit host compiler
|
||||
opts+=" -no-webengine-v8-snapshot"
|
||||
opts+=" -no-webengine-webrtc"
|
||||
# The machine code used here does not work for armv5* or armv6*
|
||||
sed -i qtwebengine/src/3rdparty/chromium/third_party/skia/include/private/SkFixed.h \
|
||||
-e"s;defined(SK_CPU_ARM32);0;"
|
||||
;;
|
||||
mips*) # V8 snapshot can't be built with a 64 bit host compiler
|
||||
opts+=" -no-webengine-v8-snapshot"
|
||||
# webrtc has no provision for mips* architecture in typedefs.h
|
||||
opts+=" -no-webengine-webrtc"
|
||||
;;
|
||||
*) # webrtc is ok
|
||||
opts+=" -webengine-webrtc"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Make sure libQt5Designer is built
|
||||
cp -v ${FILESDIR}/qttools_src.pro qttools/src/src.pro
|
||||
cp -v ${FILESDIR}/designer_src.pro qttools/src/designer/src/src.pro
|
||||
cp -v ${FILESDIR}/assistant.pro qttools/src/assistant/assistant.pro
|
||||
cp -v ${FILESDIR}/linguist.pro qttools/src/linguist/linguist.pro
|
||||
else
|
||||
opts+=" -webengine-webrtc"
|
||||
fi
|
||||
|
||||
CC="cc" CXX="c++" CPP="cpp" LD="c++" AR="ar" AS="as" NM="nm" \
|
||||
|
@ -245,12 +355,19 @@ do_configure() {
|
|||
CFLAGS="$XBPS_CFLAGS" CXXFLAGS="$XBPS_CXXFLAGS" \
|
||||
CPPFLAGS="$XBPS_CPPFLAGS" LDFLAGS="$XBPS_LDFLAGS" \
|
||||
LFLAGS="$XBPS_LDFLAGS" \
|
||||
./configure ${opts}
|
||||
${wrksrc}/configure ${opts}
|
||||
export LD_LIBRARY_PATH="${wrksrc}/qtbase/lib:${wrksrc}/qttools/lib:${LD_LIBRARY_PATH}"
|
||||
}
|
||||
|
||||
do_build() {
|
||||
# Run make twice because sometimes a file "chrome/grit/generated_resources.h"
|
||||
# is not yet ready when it is to be included. Repeating make works around that
|
||||
# problem without having to resort to disable_parallel_build=yes
|
||||
make ${makejobs} || make ${makejobs}
|
||||
}
|
||||
|
||||
do_install() {
|
||||
local f base dirs
|
||||
local f base bin dir dirs
|
||||
|
||||
if [ -z "$CROSS_BUILD" ]; then
|
||||
unset CC CXX LD CPP AR AS RANLIB
|
||||
|
@ -258,61 +375,67 @@ do_install() {
|
|||
cd ${wrksrc}/qtbase
|
||||
make INSTALL_ROOT=${DESTDIR} install
|
||||
|
||||
# Remove the host utilities
|
||||
rm -rf ${DESTDIR}/builddir
|
||||
vlicense ${wrksrc}/LGPL_EXCEPTION.txt
|
||||
_cleanup_wrksrc_leak
|
||||
|
||||
# Symbolic links for remaining binaries
|
||||
vmkdir usr/bin
|
||||
for f in $(find ${DESTDIR}/usr/lib/qt5/bin -type f); do
|
||||
base=${f##*/}
|
||||
ln -sf /usr/lib/qt5/bin/${base} ${PKGDESTDIR}/usr/bin/${base}-qt5
|
||||
done
|
||||
|
||||
if [ -n "$CROSS_BUILD" ]; then
|
||||
#
|
||||
# For some reason qmake and several tools are not built for the target
|
||||
# but only for the host. Build them for the target architecture by
|
||||
# replacing or patching their project files (*.pro) and the resulting
|
||||
# Makefiles and eventually install the targets to ${DESTDIR}/usr/lib/qt5/bin
|
||||
#
|
||||
vmkdir usr/bin
|
||||
vmkdir usr/lib/qt5/bin
|
||||
|
||||
# Make a backup of the host tools
|
||||
for f in qtbase qt3d qtdeclarative qtscxml qttools; do
|
||||
mkdir -p ${wrksrc}/host/${f}
|
||||
cp -ar ${wrksrc}/${f}/bin ${wrksrc}/host/${f}
|
||||
done
|
||||
|
||||
msg_normal "Building qmake for target ${CROSS_BUILD} ...\n"
|
||||
cd qmake
|
||||
_msg_cross "Building qmake"
|
||||
cd ${wrksrc}/qtbase/qmake
|
||||
sed Makefile \
|
||||
-e "s;^\(CC\\s*=\).*;\1 $CC;" \
|
||||
-e "s;^\(CXX\\s*=\).*;\1 $CXX;" \
|
||||
-e "s;^\(QMAKE_CFLAGS\\s*=\).*;\1 $CFLAGS;" \
|
||||
-e "s;^\(QMAKE_CXXFLAGS\\s*=\).*;\1 $CXXFLAGS;" \
|
||||
-e "s;^\(QMAKE_LFLAGS\\s*=\).*;\1 $LDFLAGS;" \
|
||||
-e "s;\$(BUILD_PATH)/bin;${DESTDIR}/usr/lib/qt5/bin;" \
|
||||
-e"s;^\(CC\\s*=\).*;\1 $CC;" \
|
||||
-e"s;^\(CXX\\s*=\).*;\1 $CXX;" \
|
||||
-e"s;^\(LINK\\s*=\).*;\1 $CXX;" \
|
||||
-e"s;^\(QMAKE_CFLAGS\\s*=\).*;\1 $CFLAGS;" \
|
||||
-e"s;^\(QMAKE_CXXFLAGS\\s*=\).*;\1 $CXXFLAGS;" \
|
||||
-e"s;^\(QMAKE_LFLAGS\\s*=\).*;\1 $LDFLAGS;" \
|
||||
-e"s;\$(BUILD_PATH)/bin;${PKGDESTDIR}/usr/lib/qt5/bin;" \
|
||||
> Makefile.target
|
||||
make clean
|
||||
make -f Makefile.target ${makejobs}
|
||||
ln -sf ../lib/qt5/bin/qmake ${PKGDESTDIR}/usr/bin/qmake-qt5
|
||||
cp -ar ${wrksrc}/qtbase/mkspecs ${PKGDESTDIR}/usr/lib/qt5
|
||||
|
||||
# Build various tools for the target
|
||||
dirs+=" qtbase/src/tools/qdbuscpp2xml"
|
||||
dirs+=" qtbase/src/tools/qdbusxml2cpp"
|
||||
dirs+=" qtbase/src/tools/qlalr"
|
||||
dirs+=" qtdeclarative/src/qmldevtools"
|
||||
dirs+=" qtdeclarative/tools/qmlmin"
|
||||
dirs+=" qtdeclarative/tools/qmllint"
|
||||
dirs+=" qtdeclarative/tools/qmlimportscanner"
|
||||
dirs+=" qtbase/src/tools/moc"
|
||||
dirs+=" qtbase/src/tools/rcc"
|
||||
dirs+=" qtbase/src/tools/uic"
|
||||
dirs+=" qtbase/src/tools/qdbuscpp2xml"
|
||||
dirs+=" qtbase/src/tools/qdbusxml2cpp"
|
||||
dirs+=" qtbase/src/tools/qlalr"
|
||||
dirs+=" qt3d/tools/qgltf"
|
||||
dirs+=" qtdeclarative/src/qmldevtools"
|
||||
dirs+=" qtdeclarative/tools/qmlimportscanner"
|
||||
dirs+=" qtdeclarative/tools/qmlmin"
|
||||
dirs+=" qtdeclarative/tools/qmllint"
|
||||
dirs+=" qtremoteobjects/tools/repc"
|
||||
dirs+=" qtscxml/tools/qscxmlc"
|
||||
dirs+=" qttools/src/qtattributionsscanner"
|
||||
dirs+=" qttools/src/linguist/lconvert"
|
||||
dirs+=" qttools/src/linguist/lrelease"
|
||||
dirs+=" qttools/src/linguist/lupdate"
|
||||
dirs+=" qttools/src/qdoc"
|
||||
mkdir -p ${wrksrc}/target/bin
|
||||
for f in ${dirs}; do
|
||||
cd ${wrksrc}/${f}
|
||||
base=${f##*/}
|
||||
msg_normal "Building ${base} for target ${CROSS_BUILD} ...\n"
|
||||
make clean
|
||||
|
||||
for f in ${dirs}; do
|
||||
base=${f##*/}
|
||||
dir=${f%%/*}
|
||||
|
||||
_msg_cross " Building ${base}"
|
||||
|
||||
cd ${wrksrc}/${f}
|
||||
if [ -x "${wrksrc}/${dir}/bin/${base}" ]; then
|
||||
mv -v ${wrksrc}/${dir}/bin/${base}{,-host}
|
||||
fi
|
||||
make clean
|
||||
[ -f "${base}.pro" ] && cp -a ${base}.pro{,.orig}
|
||||
if [ -f "${FILESDIR}/${base}.pro" ]; then
|
||||
# A specific *.pro file is available, use it.
|
||||
cp ${FILESDIR}/${base}.pro ${base}.pro
|
||||
|
@ -320,75 +443,43 @@ do_install() {
|
|||
# Otherwise strip the option(host_build)
|
||||
sed -i ${base}.pro -e "/option(host_build)/d"
|
||||
fi
|
||||
# Re-create the Makefile
|
||||
# Create the Makefile
|
||||
mv -v Makefile{,.orig}
|
||||
${wrksrc}/qtbase/bin/qmake -o Makefile ${base}.pro
|
||||
|
||||
# Now patch the Makefile to not use the bootstrap libs and
|
||||
# use the compilers, linker, flags, etc. for the target arch
|
||||
sed -i Makefile \
|
||||
-e"s; force_bootstrap;;" \
|
||||
-e"s;^\(CC\\s*=\).*;\1 $CC;" \
|
||||
-e"s;^\(CXX\\s*=\).*;\1 $CXX;" \
|
||||
-e"s;^\(LINK\\s*=\).*;\1 $CXX;" \
|
||||
-e"s;^\(CFLAGS\\s*=.*\);\1 $CFLAGS;" \
|
||||
-e"s;^\(CXXFLAGS\\s*=.*\);\1 $CXXFLAGS;" \
|
||||
-e"s;^\(LFLAGS\\s*=.*\);\1 $LDFLAGS;" \
|
||||
-e"s;^\(AR\\s*=\).*;\1 $AR cqs;" \
|
||||
-e"s;^\(RANLIB\\s*=\).*;\1 $RANLIB;"
|
||||
if [ "${base}" != qmldevtools ]; then
|
||||
# Set target destination and name
|
||||
find . -name Makefile -exec sed -i "{}" \
|
||||
-e"s;^\(DESTDIR\\s*=\).*;\1 ${wrksrc}/target/bin/;" \
|
||||
-e"s;^\(TARGET\\s*=\).*;\1 ${wrksrc}/target/bin/${base};" \
|
||||
\;
|
||||
# Now patch the Makefile(s) to not use the bootstrap libs and
|
||||
# use the compiler, linker, flags, etc. for the target arch
|
||||
find . -name "Makefile*" -exec sed -i "{}" \
|
||||
-e "s; force_bootstrap;;" \
|
||||
-e "s;^\(CC\\s*=\).*;\1 $CC;" \
|
||||
-e "s;^\(CXX\\s*=\).*;\1 $CXX;" \
|
||||
-e "s;^\(LINK\\s*=\).*;\1 $CXX;" \
|
||||
-e "s;^\(CFLAGS\\s*=.*\);\1 $CFLAGS;" \
|
||||
-e "s;^\(CXXFLAGS\\s*=.*\);\1 $CXXFLAGS;" \
|
||||
-e "s;^\(LFLAGS\\s*=.*\);\1 $LDFLAGS;" \
|
||||
-e "s;^\(AR\\s*=\).*;\1 $AR cqs;" \
|
||||
-e "s;^\(RANLIB\\s*=\).*;\1 $RANLIB;" \
|
||||
\;
|
||||
if [ "${base}" != "qmldevtools" ]; then
|
||||
# Set a different destination directory and target name
|
||||
sed -i Makefile \
|
||||
-e "s;^\(DESTDIR\\s*=\).*;\1 ${DESTDIR}/usr/lib/qt5/bin/;" \
|
||||
-e "s;^\(TARGET\\s*=\).*;\1 ${DESTDIR}/usr/lib/qt5/bin/${base}-target;"
|
||||
fi
|
||||
make ${makejobs}
|
||||
# Install the resulting binary, if any
|
||||
if [ "${base}" != qmldevtools ]; then
|
||||
vinstall ${wrksrc}/target/bin/${base} 755 usr/lib/qt5/bin
|
||||
# Restore profile, if any
|
||||
[ -f "${base}.pro.orig" ] && mv -v ${base}.pro{.orig,}
|
||||
mv -v Makefile{.orig,}
|
||||
# Avoid rebuilding the Makefile by changing the rule
|
||||
sed -i Makefile -e "s;^Makefile:;Makefile.host:;"
|
||||
if [ -x "${wrksrc}/${dir}/bin/${base}-host" ]; then
|
||||
mv -v ${wrksrc}/${dir}/bin/${base}{-host,}
|
||||
touch ${wrksrc}/${dir}/bin/${base}
|
||||
fi
|
||||
done
|
||||
|
||||
cd ${wrksrc}/qtbase
|
||||
|
||||
# Install the mkspecs
|
||||
vcopy mkspecs usr/lib/qt5
|
||||
|
||||
# Restore backup of the host tools
|
||||
for f in qtbase qt3d qtdeclarative qtscxml qttools; do
|
||||
rm -rf ${wrksrc}/${f}/bin
|
||||
cp -pR ${wrksrc}/host/${f}/bin ${wrksrc}/${f}
|
||||
done
|
||||
else
|
||||
msg_normal ">>> Building qmake for host ${XBPS_ARCH} ...\n"
|
||||
cd qmake
|
||||
sed Makefile \
|
||||
-e "s;^\(CC\\s*\)=.*;\1= gcc;" \
|
||||
-e "s;^\(CXX\\s*\)=.*;\1= g++;" \
|
||||
-e "s;^\(QMAKE_CFLAGS\\s*\)=.*;\1= $CFLAGS;" \
|
||||
-e "s;^\(QMAKE_CXXFLAGS\\s*\)=.*;\1= $CXXFLAGS;" \
|
||||
-e "s;^\(QMAKE_LFLAGS\\s*\)=.*;\1= $LDFLAGS;" \
|
||||
-e "s;\$(BUILD_PATH)/bin;${DESTDIR}/usr/lib/qt5/bin;" \
|
||||
> Makefile.host
|
||||
make clean
|
||||
make -f Makefile.host ${makejobs}
|
||||
fi
|
||||
}
|
||||
|
||||
post_install() {
|
||||
vlicense ${wrksrc}/LGPL_EXCEPTION.txt
|
||||
# Remove binaries which are contained in subpackages
|
||||
for f in qscxmlc qmlmin qmllint qmlimportscanner qgltf qdoc lconvert lupdate lrelease; do
|
||||
rm -f ${DESTDIR}/usr/lib/qt5/bin/${f}
|
||||
rm -f ${DESTDIR}/usr/bin/${f}-qt5
|
||||
done
|
||||
# Symbolic links for remaining binaries
|
||||
vmkdir usr/bin
|
||||
for f in ${DESTDIR}/usr/lib/qt5/bin/*; do
|
||||
base=${f##*/}
|
||||
ln -sf /usr/lib/qt5/bin/${base} ${PKGDESTDIR}/usr/bin/${base}-qt5
|
||||
done
|
||||
_cleanup_wrksrc_leak
|
||||
# Remove builddir from installation
|
||||
rm -rf ${DESTDIR}/builddir
|
||||
}
|
||||
|
||||
qt5-3d-devel_package() {
|
||||
|
@ -428,18 +519,18 @@ qt5-charts_package() {
|
|||
}
|
||||
}
|
||||
|
||||
qt5-gamepad-devel_package() {
|
||||
short_desc+=" - Gamepad component (development)"
|
||||
depends="qt5-gamepad-${version}_${revision} qt5-declarative-devel-${version}_${revision}"
|
||||
qt5-connectivity-devel_package() {
|
||||
short_desc+=" - Connectivity component (development)"
|
||||
depends="qt5-connectivity-${version}_${revision} qt5-declarative-devel-${version}_${revision}"
|
||||
pkg_install() {
|
||||
_install_devel qtgamepad
|
||||
_install_devel qtconnectivity
|
||||
}
|
||||
}
|
||||
|
||||
qt5-gamepad_package() {
|
||||
short_desc+=" - Gamepad component"
|
||||
qt5-connectivity_package() {
|
||||
short_desc+=" - Connectivity component"
|
||||
pkg_install() {
|
||||
_install_subpkg qtgamepad
|
||||
_install_subpkg qtconnectivity
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -458,21 +549,6 @@ qt5-datavis3d_package() {
|
|||
}
|
||||
}
|
||||
|
||||
qt5-connectivity-devel_package() {
|
||||
short_desc+=" - Connectivity component (development)"
|
||||
depends="qt5-connectivity-${version}_${revision} qt5-devel-${version}_${revision}"
|
||||
pkg_install() {
|
||||
_install_devel qtconnectivity
|
||||
}
|
||||
}
|
||||
|
||||
qt5-connectivity_package() {
|
||||
short_desc+=" - Connectivity component"
|
||||
pkg_install() {
|
||||
_install_subpkg qtconnectivity
|
||||
}
|
||||
}
|
||||
|
||||
qt5-declarative-devel_package() {
|
||||
short_desc+=" - Declarative component (development)"
|
||||
depends="qt5-declarative-${version}_${revision} qt5-devel-${version}_${revision}"
|
||||
|
@ -490,7 +566,8 @@ qt5-declarative_package() {
|
|||
|
||||
qt5-examples_package() {
|
||||
short_desc+=" - Examples"
|
||||
depends="qt5-devel-${version}_${revision} qt5-qmake-${version}_${revision}"
|
||||
depends="qt5-devel-${version}_${revision} qt5-qmake-${version}_${revision}
|
||||
qt5-host-tools-${version}_${revision}"
|
||||
pkg_install() {
|
||||
local dir mod base=usr/share/qt5/examples
|
||||
vmkdir ${base}
|
||||
|
@ -507,6 +584,21 @@ qt5-examples_package() {
|
|||
}
|
||||
}
|
||||
|
||||
qt5-gamepad-devel_package() {
|
||||
short_desc+=" - Gamepad component (development)"
|
||||
depends="qt5-gamepad-${version}_${revision} qt5-declarative-devel-${version}_${revision}"
|
||||
pkg_install() {
|
||||
_install_devel qtgamepad
|
||||
}
|
||||
}
|
||||
|
||||
qt5-gamepad_package() {
|
||||
short_desc+=" - Gamepad component"
|
||||
pkg_install() {
|
||||
_install_subpkg qtgamepad
|
||||
}
|
||||
}
|
||||
|
||||
qt5-graphicaleffects_package() {
|
||||
short_desc+=" - Graphicaleffects component"
|
||||
pkg_install() {
|
||||
|
@ -551,6 +643,36 @@ qt5-multimedia_package() {
|
|||
}
|
||||
}
|
||||
|
||||
qt5-networkauth-devel_package() {
|
||||
short_desc+=" - NetworkAuth component (development)"
|
||||
depends="qt5-networkauth-${version}_${revision} qt5-devel-${version}_${revision}"
|
||||
pkg_install() {
|
||||
_install_devel qtnetworkauth
|
||||
}
|
||||
}
|
||||
|
||||
qt5-networkauth_package() {
|
||||
short_desc+=" - NetworkAuth component"
|
||||
pkg_install() {
|
||||
_install_subpkg qtnetworkauth
|
||||
}
|
||||
}
|
||||
|
||||
qt5-purchasing-devel_package() {
|
||||
short_desc+=" - Purchasing component (development)"
|
||||
depends="qt5-purchasing-${version}_${revision} qt5-devel-${version}_${revision}"
|
||||
pkg_install() {
|
||||
_install_devel qtpurchasing
|
||||
}
|
||||
}
|
||||
|
||||
qt5-purchasing_package() {
|
||||
short_desc+=" - Purchasing component"
|
||||
pkg_install() {
|
||||
_install_subpkg qtpurchasing
|
||||
}
|
||||
}
|
||||
|
||||
qt5-quickcontrols_package() {
|
||||
short_desc+=" - Quick UI controls"
|
||||
pkg_install() {
|
||||
|
@ -559,7 +681,7 @@ qt5-quickcontrols_package() {
|
|||
}
|
||||
|
||||
qt5-quickcontrols2-devel_package() {
|
||||
short_desc+=" - Quick UI controls (ver. 2; development)"
|
||||
short_desc+=" - Quick2 UI controls (development)"
|
||||
depends="qt5-quickcontrols2-${version}_${revision} qt5-devel-${version}_${revision}"
|
||||
pkg_install() {
|
||||
_install_devel qtquickcontrols2
|
||||
|
@ -567,12 +689,27 @@ qt5-quickcontrols2-devel_package() {
|
|||
}
|
||||
|
||||
qt5-quickcontrols2_package() {
|
||||
short_desc+=" - Quick UI controls (ver. 2)"
|
||||
short_desc+=" - Quick2 UI controls"
|
||||
pkg_install() {
|
||||
_install_subpkg qtquickcontrols2
|
||||
}
|
||||
}
|
||||
|
||||
qt5-remoteobjects-devel_package() {
|
||||
short_desc+=" - Remote Objects (development)"
|
||||
depends="qt5-quickcontrols2-${version}_${revision} qt5-devel-${version}_${revision}"
|
||||
pkg_install() {
|
||||
_install_devel qtremoteobjects
|
||||
}
|
||||
}
|
||||
|
||||
qt5-remoteobjects_package() {
|
||||
short_desc+=" - Remote Objects"
|
||||
pkg_install() {
|
||||
_install_subpkg qtremoteobjects
|
||||
}
|
||||
}
|
||||
|
||||
qt5-script-devel_package() {
|
||||
short_desc+=" - Scriptable classes (development)"
|
||||
depends="qt5-script-${version}_${revision} qt5-devel-${version}_${revision}"
|
||||
|
@ -620,7 +757,8 @@ qt5-sensors_package() {
|
|||
|
||||
qt5-serialbus-devel_package() {
|
||||
short_desc+=" - Serial bus component (development)"
|
||||
depends="qt5-serialbus-${version}_${revision} qt5-devel-${version}_${revision}"
|
||||
depends="qt5-serialbus-${version}_${revision} qt5-serialport-devel-${version}_${revision}
|
||||
qt5-devel-${version}_${revision}"
|
||||
pkg_install() {
|
||||
_install_devel qtserialbus
|
||||
}
|
||||
|
@ -738,6 +876,21 @@ qt5-webengine_package() {
|
|||
}
|
||||
}
|
||||
|
||||
qt5-webglplugin-devel_package() {
|
||||
short_desc+=" - WebGL plugin (development)"
|
||||
depends="qt5-webglplugin-${version}_${revision} qt5-devel-${version}_${revision}"
|
||||
pkg_install() {
|
||||
_install_devel qtwebglplugin
|
||||
}
|
||||
}
|
||||
|
||||
qt5-webglplugin_package() {
|
||||
short_desc+=" - WebGL plugin"
|
||||
pkg_install() {
|
||||
_install_subpkg qtwebglplugin
|
||||
}
|
||||
}
|
||||
|
||||
qt5-websockets-devel_package() {
|
||||
short_desc+=" - WebSockets component (development)"
|
||||
depends="qt5-websockets-${version}_${revision} qt5-devel-${version}_${revision}"
|
||||
|
@ -801,8 +954,6 @@ qt5-xmlpatterns_package() {
|
|||
qt5-translations_package() {
|
||||
short_desc+=" - Translations"
|
||||
pkg_install() {
|
||||
sed -i ${wrksrc}/qttranslations/translations/Makefile \
|
||||
-e "s;qttranslations/translations/\(.*\)_wrapper.sh;host/qttools/bin/\1;g"
|
||||
_install_subpkg qttranslations
|
||||
}
|
||||
}
|
||||
|
@ -810,20 +961,25 @@ qt5-translations_package() {
|
|||
qt5-host-tools_package() {
|
||||
short_desc+=" - Tools required when cross compiling"
|
||||
pkg_install() {
|
||||
local dest=${XBPS_DESTDIR}/${XBPS_CROSS_TRIPLET}/qt5-tools-${version}
|
||||
vmkdir usr/lib/qt5/bin
|
||||
vmkdir usr/bin
|
||||
for f in moc rcc uic qlalr qdbuscpp2xml qdbusxml2cpp; do
|
||||
vmove usr/lib/qt5/bin/${f}
|
||||
vmove usr/bin/${f}-qt5
|
||||
done
|
||||
for f in lconvert lupdate lrelease; do
|
||||
if [ -f ${wrksrc}/target/bin/${f} ]; then
|
||||
# cross build for target
|
||||
vinstall ${wrksrc}/target/bin/${f} 755 usr/lib/qt5/bin
|
||||
else
|
||||
# build for host
|
||||
vinstall ${wrksrc}/qttools/bin/${f} 755 usr/lib/qt5/bin
|
||||
for f in moc rcc uic qlalr qdbuscpp2xml qdbusxml2cpp \
|
||||
lconvert lupdate lrelease; do
|
||||
if [ -r ${dest}/usr/lib/qt5/bin/${f} ]; then
|
||||
mv -v ${dest}/usr/lib/qt5/bin/${f} ${PKGDESTDIR}/usr/lib/qt5/bin/
|
||||
fi
|
||||
if [ -f ${DESTDIR}/usr/lib/qt5/bin/${f}-target ]; then
|
||||
mv -v ${DESTDIR}/usr/lib/qt5/bin/${f}{-target,}
|
||||
fi
|
||||
if [ -f ${DESTDIR}/usr/lib/qt5/bin/${f} ]; then
|
||||
vmove usr/lib/qt5/bin/${f}
|
||||
fi
|
||||
if [ -f ${DESTDIR}/usr/bin/${f}-qt5 ]; then
|
||||
vmove usr/bin/${f}-qt5
|
||||
else
|
||||
ln -sf ../lib/qt5/bin/${f} ${PKGDESTDIR}/usr/bin/${f}-qt5
|
||||
fi
|
||||
ln -sf ../lib/qt5/bin/${f} ${PKGDESTDIR}/usr/bin/${f}-qt5
|
||||
done
|
||||
}
|
||||
}
|
||||
|
@ -840,12 +996,8 @@ qt5-tools_package() {
|
|||
short_desc+=" - Development tools"
|
||||
depends="qt5-translations desktop-file-utils hicolor-icon-theme"
|
||||
pkg_install() {
|
||||
local dest=${XBPS_DESTDIR}/${XBPS_CROSS_TRIPLET}/qt5-host-tools-${version}
|
||||
_install_subpkg qttools
|
||||
# these are now in qt5-host-tools
|
||||
for f in lconvert lupdate lrelease; do
|
||||
rm -f ${PKGDESTDIR}/usr/lib/qt5/bin/${f}
|
||||
rm -f ${PKGDESTDIR}/usr/bin/${f}-qt5
|
||||
done
|
||||
# install missing icons and desktop files
|
||||
for icon in ${wrksrc}/qttools/src/linguist/linguist/images/icons/linguist-*-32.png ; do
|
||||
size=$(echo $(basename ${icon}) | cut -d- -f2)
|
||||
|
@ -865,6 +1017,17 @@ qt5-tools_package() {
|
|||
# install desktop files
|
||||
vmkdir usr/share/applications
|
||||
install -m644 ${FILESDIR}/*.desktop ${PKGDESTDIR}/usr/share/applications
|
||||
# Move some binaries to qt5-host-tools
|
||||
for f in lconvert lupdate lrelease; do
|
||||
if [ -f ${PKGDESTDIR}/usr/lib/qt5/bin/${f} ]; then
|
||||
mkdir -p ${dest}/usr/lib/qt5/bin
|
||||
mv -v ${PKGDESTDIR}/usr/lib/qt5/bin/${f} ${dest}/usr/lib/qt5/bin/
|
||||
fi
|
||||
if [ -f ${PKGDESTDIR}/usr/bin/${f}-qt5 ]; then
|
||||
mkdir -p ${dest}/usr/bin
|
||||
mv -v ${PKGDESTDIR}/usr/bin/${f}-qt5 ${dest}/usr/bin/
|
||||
fi
|
||||
done
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue