Saturday, April 30, 2022

UPDATE: x11/qt6

Here is a diff to update Qt6 to the latest stable version. This only
includes ONE NEW port: qtlanguageserver which is a new build dependency
for qtdeclarative. Besides, qtquickcontrols2 is deleted.

Port change log:

- Bump to 6.3
- Add qtlanguageserver, drop qtquickcontrols2 (GONE upstream)
- Repace ${_p}_DIR=${MODQT6_LIBDIR}/cmake with a simple
Qt6_DIR=${MODQT6_LIBDIR}/cmake.
- Remove x11/qt6/qttools as a default build option. Qttools are dead :)
- Fix USE_CCACHE
- Disable QML just-in-time compiler (I will do the same for Qt5)

This update is straightforward. We have no consumers, so I see no impact.
New Qt6 ports coming in different mails. I have spoken to kn@ and Andrew
Krasavin, they are waiting for the update to update telegramdesktop.

Feedback, OK?

Rafael

diff --git a/x11/qt6/Makefile b/x11/qt6/Makefile
index cfc07eb9dde..62f6a30cdf2 100644
--- a/x11/qt6/Makefile
+++ b/x11/qt6/Makefile
@@ -4,14 +4,32 @@
SUBDIR += qtsvg
SUBDIR += qtshadertools
SUBDIR += qtquicktimeline
- SUBDIR += qtquickcontrols2
SUBDIR += qtquick3d
#SUBDIR += qtdoc
SUBDIR += qtdeclarative
+ SUBDIR += qtlanguageserver
SUBDIR += qtbase
SUBDIR += qt5compat
-
-# no support for Wayland in Xenocara
-# SUBDIR += qtwayland
+ #SUBDIR += qtwebview
+ #SUBDIR += qtwebsockets
+ #SUBDIR += qtwebengine
+ #SUBDIR += qtwebchannel
+ #SUBDIR += qtwayland
+ #SUBDIR += qtvirtualkeyboard
+ #SUBDIR += qtserialport
+ #SUBDIR += qtserialbus
+ #SUBDIR += qtsensors
+ #SUBDIR += qtscxml
+ #SUBDIR += qtremoteobjects
+ #SUBDIR += qtpositioning
+ #SUBDIR += qtnetworkauth
+ #SUBDIR += qtmultimedia
+ #SUBDIR += qtlottie
+ #SUBDIR += qtimageformats
+ #SUBDIR += qtdatavis3d
+ #SUBDIR += qtconnectivity
+ #SUBDIR += qtcharts
+ #SUBDIR += qtactiveqt
+ #SUBDIR += qt3d

.include <bsd.port.subdir.mk>
diff --git a/x11/qt6/Makefile.version b/x11/qt6/Makefile.version
index 515fca9a9b7..61f04433d42 100644
--- a/x11/qt6/Makefile.version
+++ b/x11/qt6/Makefile.version
@@ -1,6 +1,6 @@
# Common source for Qt6 version
-QT6_VERSION = 6.0.4
+QT6_VERSION = 6.3.0

# This one is used for building dependencies for examples and documentation,
# which obviously should be in sync with core packages.
-QT6_NEXT_VERSION = 6.1
+QT6_NEXT_VERSION = 6.4
diff --git a/x11/qt6/qt5compat/Makefile b/x11/qt6/qt5compat/Makefile
index 7f69d71279f..840cba49af5 100644
--- a/x11/qt6/qt5compat/Makefile
+++ b/x11/qt6/qt5compat/Makefile
@@ -1,9 +1,13 @@
QT6NAME = Qt5Compat
COMMENT = Qt6 module contains unsupported Qt 5 APIs

-SHARED_LIBS += Qt6Core5Compat 0.0 # 6.0
+SHARED_LIBS += Qt6Core5Compat 0.1 # 6.3

-WANTLIB += ${COMPILER_LIBCXX} Qt6Core c icudata icui18n icuuc
-WANTLIB += m
+WANTLIB += ${COMPILER_LIBCXX} GL Qt6Core Qt6Gui Qt6Network Qt6OpenGL
+WANTLIB += Qt6Qml Qt6QmlModels Qt6Quick c icudata icui18n icuuc
+WANTLIB += m xkbcommon
+
+LIB_DEPENDS = x11/qt6/qtdeclarative>=${VERSION},<${NEXT_VERSION} \
+ x11/xkbcommon

.include <bsd.port.mk>
diff --git a/x11/qt6/qt5compat/distinfo b/x11/qt6/qt5compat/distinfo
index 2e10a3db8cc..06b0ebf38e6 100644
--- a/x11/qt6/qt5compat/distinfo
+++ b/x11/qt6/qt5compat/distinfo
@@ -1,2 +1,2 @@
-SHA256 (qt/qt5compat-everywhere-src-6.0.4.tar.xz) = q9C52nvMszojpZ8ooKKy3r3H4HQV3U913pp1GYSJXmk=
-SIZE (qt/qt5compat-everywhere-src-6.0.4.tar.xz) = 602104
+SHA256 (qt/qt5compat-everywhere-src-6.3.0.tar.xz) = Kxmb54DFDZIUUSuSLZTLJAsEEv1j9FnjVrdhAsrRcT4=
+SIZE (qt/qt5compat-everywhere-src-6.3.0.tar.xz) = 8198576
diff --git a/x11/qt6/qt5compat/pkg/PLIST b/x11/qt6/qt5compat/pkg/PLIST
index 91b18ffc732..fe699bc3286 100644
--- a/x11/qt6/qt5compat/pkg/PLIST
+++ b/x11/qt6/qt5compat/pkg/PLIST
@@ -63,17 +63,61 @@ include/X11/qt6/QtCore5Compat/qtcore5compat-config.h
include/X11/qt6/QtCore5Compat/qtcore5compatversion.h
include/X11/qt6/QtCore5Compat/qtextcodec.h
include/X11/qt6/QtCore5Compat/qxml.h
+lib/cmake/Qt6/FindWrapIconv.cmake
lib/cmake/Qt6BuildInternals/StandaloneTests/Qt5CompatTestsConfig.cmake
lib/cmake/Qt6Core5Compat/
lib/cmake/Qt6Core5Compat/Qt6Core5CompatAdditionalTargetInfo.cmake
lib/cmake/Qt6Core5Compat/Qt6Core5CompatConfig.cmake
lib/cmake/Qt6Core5Compat/Qt6Core5CompatConfigVersion.cmake
+lib/cmake/Qt6Core5Compat/Qt6Core5CompatConfigVersionImpl.cmake
lib/cmake/Qt6Core5Compat/Qt6Core5CompatDependencies.cmake
lib/cmake/Qt6Core5Compat/Qt6Core5CompatTargets${MODCMAKE_BUILD_SUFFIX}
lib/cmake/Qt6Core5Compat/Qt6Core5CompatTargets.cmake
lib/cmake/Qt6Core5Compat/Qt6Core5CompatVersionlessTargets.cmake
+lib/cmake/Qt6Qml/
+lib/cmake/Qt6Qml/QmlPlugins/
+lib/cmake/Qt6Qml/QmlPlugins/Qt6qtgraphicaleffectspluginAdditionalTargetInfo.cmake
+lib/cmake/Qt6Qml/QmlPlugins/Qt6qtgraphicaleffectspluginConfig.cmake
+lib/cmake/Qt6Qml/QmlPlugins/Qt6qtgraphicaleffectspluginConfigVersion.cmake
+lib/cmake/Qt6Qml/QmlPlugins/Qt6qtgraphicaleffectspluginConfigVersionImpl.cmake
+lib/cmake/Qt6Qml/QmlPlugins/Qt6qtgraphicaleffectspluginTargets${MODCMAKE_BUILD_SUFFIX}
+lib/cmake/Qt6Qml/QmlPlugins/Qt6qtgraphicaleffectspluginTargets.cmake
+lib/cmake/Qt6Qml/QmlPlugins/Qt6qtgraphicaleffectsprivateAdditionalTargetInfo.cmake
+lib/cmake/Qt6Qml/QmlPlugins/Qt6qtgraphicaleffectsprivateConfig.cmake
+lib/cmake/Qt6Qml/QmlPlugins/Qt6qtgraphicaleffectsprivateConfigVersion.cmake
+lib/cmake/Qt6Qml/QmlPlugins/Qt6qtgraphicaleffectsprivateConfigVersionImpl.cmake
+lib/cmake/Qt6Qml/QmlPlugins/Qt6qtgraphicaleffectsprivateTargets${MODCMAKE_BUILD_SUFFIX}
+lib/cmake/Qt6Qml/QmlPlugins/Qt6qtgraphicaleffectsprivateTargets.cmake
lib/libQt6Core5Compat.prl
@lib lib/libQt6Core5Compat.so.${LIBQt6Core5Compat_VERSION}
+lib/metatypes/qt6core5compat_release_metatypes.json
lib/qt6/mkspecs/modules/qt_lib_core5compat.pri
lib/qt6/mkspecs/modules/qt_lib_core5compat_private.pri
+lib/qt6/qml/
+lib/qt6/qml/Qt5Compat/
+lib/qt6/qml/Qt5Compat/GraphicalEffects/
+lib/qt6/qml/Qt5Compat/GraphicalEffects/BrightnessContrast.qml
+lib/qt6/qml/Qt5Compat/GraphicalEffects/ColorOverlay.qml
+lib/qt6/qml/Qt5Compat/GraphicalEffects/Colorize.qml
+lib/qt6/qml/Qt5Compat/GraphicalEffects/ConicalGradient.qml
+lib/qt6/qml/Qt5Compat/GraphicalEffects/Desaturate.qml
+lib/qt6/qml/Qt5Compat/GraphicalEffects/Displace.qml
+lib/qt6/qml/Qt5Compat/GraphicalEffects/DropShadow.qml
+lib/qt6/qml/Qt5Compat/GraphicalEffects/FastBlur.qml
+lib/qt6/qml/Qt5Compat/GraphicalEffects/GammaAdjust.qml
+lib/qt6/qml/Qt5Compat/GraphicalEffects/Glow.qml
+lib/qt6/qml/Qt5Compat/GraphicalEffects/HueSaturation.qml
+lib/qt6/qml/Qt5Compat/GraphicalEffects/LevelAdjust.qml
+lib/qt6/qml/Qt5Compat/GraphicalEffects/LinearGradient.qml
+lib/qt6/qml/Qt5Compat/GraphicalEffects/OpacityMask.qml
+lib/qt6/qml/Qt5Compat/GraphicalEffects/RadialGradient.qml
+lib/qt6/qml/Qt5Compat/GraphicalEffects/RectangularGlow.qml
+lib/qt6/qml/Qt5Compat/GraphicalEffects/ThresholdMask.qml
+@so lib/qt6/qml/Qt5Compat/GraphicalEffects/libqtgraphicaleffectsplugin.so
+lib/qt6/qml/Qt5Compat/GraphicalEffects/plugins.qmltypes
+lib/qt6/qml/Qt5Compat/GraphicalEffects/private/
+lib/qt6/qml/Qt5Compat/GraphicalEffects/private/FastGlow.qml
+@so lib/qt6/qml/Qt5Compat/GraphicalEffects/private/libqtgraphicaleffectsprivateplugin.so
+lib/qt6/qml/Qt5Compat/GraphicalEffects/private/qmldir
+lib/qt6/qml/Qt5Compat/GraphicalEffects/qmldir
share/qt6/modules/Core5Compat.json
diff --git a/x11/qt6/qt6.port.mk b/x11/qt6/qt6.port.mk
index e4dfab25c5c..f3bee688e3d 100644
--- a/x11/qt6/qt6.port.mk
+++ b/x11/qt6/qt6.port.mk
@@ -29,64 +29,16 @@ MODQT_LRELEASE ?= ${MODQT6_LRELEASE}
MODQT6_LUPDATE = ${LOCALBASE}/bin/lupdate-qt6
MODQT_LUPDATE ?= ${MODQT6_LUPDATE}

-_MODQT6_CMAKE_PKGS = \
- Qt6 \
- Qt6Core5Compat \
- Qt6Concurrent \
- Qt6Core \
- Qt6DBus \
- Qt6Gui \
- Qt6Network \
- Qt6OpenGL \
- Qt6PrintSupport \
- Qt6Sql \
- Qt6Test \
- Qt6Widgets \
- Qt6Xml \
- Qt6EglFSDeviceIntegration \
- Qt6EglFsKmsSupport \
- Qt6OpenGLExtensions \
- Qt6XcbQpa \
- Qt6EglFsKmsGbmSupport \
- Qt6OpenGLWidgets \
- Qt6Qml \
- Qt6Quick \
- Qt6QuickParticles \
- Qt6QuickTest \
- Qt6QuickWidgets \
- Qt6QuickShapes \
- Qt6QmlModels \
- Qt6QmlWorkerScript \
- Qt6Quick3D \
- Qt6Quick3DAssetImport \
- Qt6Quick3DRuntimeRender \
- Qt6Quick3DUtils \
- Qt6QuickControls2 \
- Qt6QuickTemplates2 \
- Qt6QuickControls2Impl \
- Qt6ShaderTools \
- Qt6Svg \
- Qt6SvgWidgets \
- Qt6Designer \
- Qt6DesignerComponents \
- Qt6Help \
- Qt6UiTools
-.for _p in ${_MODQT6_CMAKE_PKGS}
-_MODQT6_SETUP += ${_p}_DIR=${MODQT6_LIBDIR}/cmake
-.endfor
+_MODQT6_SETUP += Qt6_DIR=${MODQT6_LIBDIR}/cmake

MODQT6_LIB_DEPENDS = x11/qt6/qtbase
MODQT_LIB_DEPENDS ?= ${MODQT6_LIB_DEPENDS}

-MODQT6_BUILD_DEPENDS = x11/qt6/qttools
-MODQT_BUILD_DEPENDS ?= ${MODQT6_BUILD_DEPENDS}
-
MODQT_DEPS ?= Yes
MODQT6_DEPS ?= ${MODQT_DEPS}

.if ${MODQT6_DEPS:L} == "yes"
LIB_DEPENDS += ${MODQT6_LIB_DEPENDS}
-BUILD_DEPENDS += ${MODQT6_BUILD_DEPENDS}
.endif

CONFIGURE_ENV += ${_MODQT6_SETUP}
diff --git a/x11/qt6/qtbase/Makefile b/x11/qt6/qtbase/Makefile
index decd207f5d0..b14ecaac142 100644
--- a/x11/qt6/qtbase/Makefile
+++ b/x11/qt6/qtbase/Makefile
@@ -5,41 +5,41 @@ COMMENT-global = global Qt6 documentation internals
COMMENT-mysql = MySQL plugin for Qt6
COMMENT-psql = PostgresSQL plugin for Qt6

-REVISION = 4
-REVISION-main = 5
-
PKGNAME-mysql = qt6-mysql-${VERSION}
PKGNAME-global = qt6-global-${VERSION}
PKGNAME-psql = qt6-postgresql-${VERSION}

PKG_ARCH-global = *

-SHARED_LIBS += Qt6Concurrent 0.0 # 6.0
-SHARED_LIBS += Qt6Core 0.0 # 6.0
-SHARED_LIBS += Qt6DBus 0.0 # 6.0
-SHARED_LIBS += Qt6Gui 0.0 # 6.0
-SHARED_LIBS += Qt6Network 0.0 # 6.0
-SHARED_LIBS += Qt6OpenGL 0.0 # 6.0
-SHARED_LIBS += Qt6PrintSupport 0.0 # 6.0
-SHARED_LIBS += Qt6Sql 0.0 # 6.0
-SHARED_LIBS += Qt6Test 0.0 # 6.0
-SHARED_LIBS += Qt6Widgets 0.0 # 6.0
-SHARED_LIBS += Qt6Xml 0.0 # 6.0
-SHARED_LIBS += Qt6EglFSDeviceIntegration 0.0 # 6.0
-SHARED_LIBS += Qt6EglFsKmsSupport 0.0 # 6.0
-SHARED_LIBS += Qt6OpenGLExtensions 0.0 # 6.0
-SHARED_LIBS += Qt6XcbQpa 0.0 # 6.0
-SHARED_LIBS += Qt6EglFsKmsGbmSupport 0.0 # 6.0
-SHARED_LIBS += Qt6OpenGLWidgets 0.0 # 6.0
+SHARED_LIBS += Qt6Concurrent 0.1 # 6.3
+SHARED_LIBS += Qt6Core 0.1 # 6.3
+SHARED_LIBS += Qt6DBus 0.1 # 6.3
+SHARED_LIBS += Qt6Gui 0.1 # 6.3
+SHARED_LIBS += Qt6Network 0.1 # 6.3
+SHARED_LIBS += Qt6OpenGL 0.1 # 6.3
+SHARED_LIBS += Qt6PrintSupport 0.1 # 6.3
+SHARED_LIBS += Qt6Sql 0.1 # 6.3
+SHARED_LIBS += Qt6Test 0.1 # 6.3
+SHARED_LIBS += Qt6Widgets 0.1 # 6.3
+SHARED_LIBS += Qt6Xml 0.1 # 6.3
+SHARED_LIBS += Qt6EglFSDeviceIntegration 0.1 # 6.3
+SHARED_LIBS += Qt6EglFsKmsSupport 0.1 # 6.3
+SHARED_LIBS += Qt6OpenGLExtensions 0.1 # 6.3
+SHARED_LIBS += Qt6XcbQpa 0.1 # 6.3
+SHARED_LIBS += Qt6EglFsKmsGbmSupport 0.1 # 6.3
+SHARED_LIBS += Qt6OpenGLWidgets 0.1 # 6.3

WANTLIB-global =

-WANTLIB-main += ${COMPILER_LIBCXX} EGL GL X11 atk-1.0 b2 brotlidec c cairo
-WANTLIB-main += cairo-gobject crypto cups dbus-1 double-conversion
-WANTLIB-main += drm execinfo fontconfig freetype gbm gdk-3 gdk_pixbuf-2.0
-WANTLIB-main += gio-2.0 glib-2.0 gobject-2.0 gthread-2.0 gtk-3 harfbuzz
-WANTLIB-main += icudata icui18n icuuc iodbc jpeg m pango-1.0 pangocairo-1.0
-WANTLIB-main += pcre2-16 png ssl z zstd
+WANTLIB-main += ${COMPILER_LIBCXX} EGL GL ICE SM X11 X11-xcb atk-1.0
+WANTLIB-main += b2 brotlidec c cairo cairo-gobject crypto cups dbus-1
+WANTLIB-main += double-conversion drm execinfo fontconfig freetype
+WANTLIB-main += gbm gdk-3 gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0
+WANTLIB-main += gthread-2.0 gtk-3 harfbuzz icudata icui18n icuuc iodbc
+WANTLIB-main += jpeg m pango-1.0 pangocairo-1.0 pcre2-16 png ssl xcb
+WANTLIB-main += xcb-glx xcb-icccm xcb-image xcb-keysyms xcb-randr xcb-render
+WANTLIB-main += xcb-render-util xcb-shape xcb-shm xcb-sync xcb-xfixes
+WANTLIB-main += xcb-xkb xkbcommon xkbcommon-x11 z zstd

# those come from gthread-2.0, not used by Qt itself
WANTLIB-main += intl
@@ -56,6 +56,7 @@ LIB_DEPENDS-main = ${LIB_DEPENDS} \
databases/iodbc \
devel/atk \
devel/harfbuzz \
+ x11/xkbcommon \
devel/pango \
devel/pcre2 \
graphics/cairo \
@@ -71,7 +72,6 @@ LIB_DEPENDS-global =

LIB_DEPENDS-main += devel/gettext,-runtime

-
LIB_DEPENDS-mysql = ${BASE_PKGPATH},-main>=${VERSION:R},<${NEXT_VERSION} \
${MODGCC4_CPPLIBDEP} \
databases/mariadb
@@ -90,8 +90,14 @@ RUN_DEPENDS-global =
RUN_DEPENDS-mysql =
RUN_DEPENDS-psql =

-CONFIGURE_ARGS = -DQT_DEFAULT_PLATFORM_DEFINITION_DIR_ABSOLUTE=${WRKDIST}/mkspecs/openbsd-g++/
+.include <bsd.port.arch.mk>
+.if ${PROPERTIES:Mclang}
+CONFIGURE_ARGS += -DQT_QMAKE_TARGET_MKSPEC=openbsd-clang
+.else
+CONFIGURE_ARGS += -DQT_QMAKE_TARGET_MKSPEC=openbsd-g++
+.endif

+# cmake/configure-cmake-mapping.md
CONFIGURE_ARGS += -DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DINSTALL_BINDIR=lib/qt6/bin \
-DINSTALL_DOCDIR=share/doc/qt6 \
@@ -101,13 +107,14 @@ CONFIGURE_ARGS += -DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \
-DINSTALL_EXAMPLESDIR=share/doc/qt6/examples \
-DINSTALL_PLUGINSDIR=lib/qt6/plugins \
+ -DBUILD_WITH_PCH=OFF \
-DQT_FEATURE_journald=OFF \
-DQT_FEATURE_openssl_linked=ON \
-DQT_FEATURE_dtls=OFF

LDFLAGS += -lexecinfo

-MODQT6_DEPS = no
+MODQT6_DEPS = No

post-extract:
mkdir -p ${WRKDIST}/mkspecs/openbsd-clang
@@ -118,6 +125,6 @@ post-extract:

.include <bsd.port.mk>

-.if ${USE_CCACHE:L} != "yes"
+.if ${USE_CCACHE:L} == "yes"
CONFIGURE_ARGS += -DQT_USE_CCACHE=ON
.endif
diff --git a/x11/qt6/qtbase/distinfo b/x11/qt6/qtbase/distinfo
index a016177b39e..437718016d0 100644
--- a/x11/qt6/qtbase/distinfo
+++ b/x11/qt6/qtbase/distinfo
@@ -1,2 +1,2 @@
-SHA256 (qt/qtbase-everywhere-src-6.0.4.tar.xz) = xCdXky18smSgQ8wqDu0wd02Tj2PbZ7//EdjjGcDIeZo=
-SIZE (qt/qtbase-everywhere-src-6.0.4.tar.xz) = 46415776
+SHA256 (qt/qtbase-everywhere-src-6.3.0.tar.xz) = uGWq5DNX95KzsKFiiZ2b9qE5OlXE5eTt5TFrFXsaD5k=
+SIZE (qt/qtbase-everywhere-src-6.3.0.tar.xz) = 47004304
diff --git a/x11/qt6/qtbase/patches/patch-cmake_QtBuild_cmake b/x11/qt6/qtbase/patches/patch-cmake_QtBuild_cmake
index eed3f0e088d..67ffbddb33e 100644
--- a/x11/qt6/qtbase/patches/patch-cmake_QtBuild_cmake
+++ b/x11/qt6/qtbase/patches/patch-cmake_QtBuild_cmake
@@ -1,9 +1,9 @@
Index: cmake/QtBuild.cmake
--- cmake/QtBuild.cmake.orig
+++ cmake/QtBuild.cmake
-@@ -330,6 +330,20 @@ elseif(QNX)
- set(QT_DEFAULT_MKSPEC qnx-${arch}-qcc)
- endif()
+@@ -436,6 +436,20 @@ if(CMAKE_HOST_APPLE AND APPLE)
+ set(CMAKE_${lang}_ARCHIVE_APPEND "<CMAKE_AR> qS <TARGET> <LINK_FLAGS> <OBJECTS>")
+ set(CMAKE_${lang}_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols <TARGET>")
endforeach()
+elseif(FREEBSD)
+ if(CLANG)
@@ -21,4 +21,4 @@ Index: cmake/QtBuild.cmake
+ endif()
endif()

- if(NOT QT_QMAKE_TARGET_MKSPEC)
+ # Functions and macros:
diff --git a/x11/qt6/qtbase/patches/patch-cmake_QtCompilerOptimization_cmake b/x11/qt6/qtbase/patches/patch-cmake_QtCompilerOptimization_cmake
index 97bf60f28d5..ed4e7e52d02 100644
--- a/x11/qt6/qtbase/patches/patch-cmake_QtCompilerOptimization_cmake
+++ b/x11/qt6/qtbase/patches/patch-cmake_QtCompilerOptimization_cmake
@@ -1,21 +1,21 @@
Index: cmake/QtCompilerOptimization.cmake
--- cmake/QtCompilerOptimization.cmake.orig
+++ cmake/QtCompilerOptimization.cmake
-@@ -137,7 +137,7 @@ endif()
+@@ -94,7 +94,7 @@ endif()
# gcc and clang base
- if(GCC OR CLANG)
+ if(GCC OR CLANG AND NOT WASM)
set(QT_CFLAGS_OPTIMIZE "-O2")
- set(QT_CFLAGS_OPTIMIZE_FULL "-O3")
+ set(QT_CFLAGS_OPTIMIZE_FULL "")
set(QT_CFLAGS_OPTIMIZE_DEBUG "-Og")
set(QT_CFLAGS_OPTIMIZE_SIZE "-Os")

-@@ -148,7 +148,7 @@ endif()
+@@ -105,7 +105,7 @@ endif()

# Flags that CMake might set, aka flags the compiler would see as valid values.
- if(GCC OR CLANG OR QCC OR ICC)
+ if(GCC OR CLANG OR QCC)
- set(QT_CFLAGS_OPTIMIZE_VALID_VALUES "-O0" "-O1" "-O2" "-O3" "-Os" "-Oz")
-+ set(QT_CFLAGS_OPTIMIZE_VALID_VALUES "-O0" "-O1" "-O2" "-Os" "-Oz")
++ set(QT_CFLAGS_OPTIMIZE_VALID_VALUES "-O0" "-O1" "-O2" "" "-Os" "-Oz")
endif()


diff --git a/x11/qt6/qtbase/patches/patch-cmake_QtFeature_cmake b/x11/qt6/qtbase/patches/patch-cmake_QtFeature_cmake
index b4600f53910..ab24fbca81b 100644
--- a/x11/qt6/qtbase/patches/patch-cmake_QtFeature_cmake
+++ b/x11/qt6/qtbase/patches/patch-cmake_QtFeature_cmake
@@ -1,8 +1,8 @@
Index: cmake/QtFeature.cmake
--- cmake/QtFeature.cmake.orig
+++ cmake/QtFeature.cmake
-@@ -1023,4 +1023,20 @@ function(qt_make_features_available target)
- endforeach()
+@@ -1054,7 +1054,23 @@ function(qt_get_platform_try_compile_vars out_var)
+ set("${out_var}" "${flags_cmd_line}" PARENT_SCOPE)
endfunction()

+# function to add libs to an INTERFACE library target if the lib exists,
@@ -10,7 +10,7 @@ Index: cmake/QtFeature.cmake
+# LIBRARIES argument if PROJECT_PATH is not set.
+function(qt_test_lib_target)
+qt_parse_all_arguments(arg "qt_test_lib_target" "" "TARGET" "LIBS" ${ARGN})
-
+ # Set out_var to the first value of CMAKE_OSX_ARCHITECTURES.
+if(TARGET ${arg_TARGET})
+ return()
+endif()
@@ -22,3 +22,6 @@ Index: cmake/QtFeature.cmake
+ endif()
+endforeach()
+endfunction()
+ # Sets an empty string if no architecture is present.
+ function(qt_internal_get_first_osx_arch out_var)
+ set(value "")
diff --git a/x11/qt6/qtbase/patches/patch-cmake_QtPlatformSupport_cmake b/x11/qt6/qtbase/patches/patch-cmake_QtPlatformSupport_cmake
index 51cab3c9b37..e12fd273871 100644
--- a/x11/qt6/qtbase/patches/patch-cmake_QtPlatformSupport_cmake
+++ b/x11/qt6/qtbase/patches/patch-cmake_QtPlatformSupport_cmake
@@ -1,7 +1,7 @@
Index: cmake/QtPlatformSupport.cmake
--- cmake/QtPlatformSupport.cmake.orig
+++ cmake/QtPlatformSupport.cmake
-@@ -20,6 +20,8 @@ qt_set01(WASM CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
+@@ -21,6 +21,8 @@ qt_set01(SOLARIS CMAKE_SYSTEM_NAME STREQUAL "SunOS")

qt_set01(BSD APPLE OR OPENBSD OR FREEBSD OR NETBSD)

diff --git a/x11/qt6/qtbase/patches/patch-cmake_QtProcessConfigureArgs_cmake b/x11/qt6/qtbase/patches/patch-cmake_QtProcessConfigureArgs_cmake
index a8936dd57de..70710c05735 100644
--- a/x11/qt6/qtbase/patches/patch-cmake_QtProcessConfigureArgs_cmake
+++ b/x11/qt6/qtbase/patches/patch-cmake_QtProcessConfigureArgs_cmake
@@ -1,11 +1,11 @@
Index: cmake/QtProcessConfigureArgs.cmake
--- cmake/QtProcessConfigureArgs.cmake.orig
+++ cmake/QtProcessConfigureArgs.cmake
-@@ -133,6 +133,7 @@ defstub(qt_feature_definition)
+@@ -175,6 +175,7 @@ defstub(qt_feature_definition)
defstub(qt_find_package)
defstub(set_package_properties)
defstub(qt_qml_find_python)
+defstub(qt_test_lib_target)
+ defstub(qt_set01)
+ defstub(qt_internal_check_if_linker_is_available)

-
- ####################################################################################################
diff --git a/x11/qt6/qtbase/patches/patch-qmake_Makefile_unix b/x11/qt6/qtbase/patches/patch-qmake_Makefile_unix
deleted file mode 100644
index 3aad1937f9a..00000000000
--- a/x11/qt6/qtbase/patches/patch-qmake_Makefile_unix
+++ /dev/null
@@ -1,25 +0,0 @@
-Index: qmake/Makefile.unix
---- qmake/Makefile.unix.orig
-+++ qmake/Makefile.unix
-@@ -164,7 +164,7 @@ DEPEND_SRC = \
- # by configure); QTSRCS2 may include *.mm entries on macOS.
- # See below for special handling of qlibraryinfo.cpp
-
--CPPFLAGS = -g $(EXTRA_CPPFLAGS) \
-+CPPFLAGS += -g $(EXTRA_CPPFLAGS) \
- -I$(QMKSRC) -I$(QMKLIBSRC) -I$(QMKGENSRC) \
- -I$(SOURCE_PATH)/src/3rdparty/tinycbor/src \
- -I$(SOURCE_PATH)/src/3rdparty/pcre2/src \
-@@ -180,9 +180,9 @@ CPPFLAGS = -g $(EXTRA_CPPFLAGS) \
- -DPCRE2_DISABLE_JIT \
- $(EXTRA_CPPFLAGS)
-
--CXXFLAGS = $(EXTRA_CXXFLAGS) $(CONFIG_CXXFLAGS) $(CPPFLAGS)
--CFLAGS = $(CPPFLAGS) $(CONFIG_CFLAGS)
--LFLAGS = $(EXTRA_LFLAGS) $(CONFIG_LFLAGS)
-+CXXFLAGS += $(EXTRA_CXXFLAGS) $(CONFIG_CXXFLAGS) $(CPPFLAGS)
-+CFLAGS += $(CPPFLAGS) $(CONFIG_CFLAGS)
-+LFLAGS = $(LDFLAGS) $(EXTRA_LFLAGS) $(CONFIG_LFLAGS)
-
- first all: $(BUILD_PATH)/bin/qmake$(EXEEXT)
- qmake: $(BUILD_PATH)/bin/qmake$(EXEEXT)
diff --git a/x11/qt6/qtbase/patches/patch-qmake_generators_unix_unixmake2_cpp b/x11/qt6/qtbase/patches/patch-qmake_generators_unix_unixmake2_cpp
index db6f878f8b2..c723a2557e6 100644
--- a/x11/qt6/qtbase/patches/patch-qmake_generators_unix_unixmake2_cpp
+++ b/x11/qt6/qtbase/patches/patch-qmake_generators_unix_unixmake2_cpp
@@ -1,7 +1,7 @@
Index: qmake/generators/unix/unixmake2.cpp
--- qmake/generators/unix/unixmake2.cpp.orig
+++ qmake/generators/unix/unixmake2.cpp
-@@ -63,6 +63,10 @@ UnixMakefileGenerator::writeMakefile(QTextStream &t)
+@@ -66,6 +66,10 @@ UnixMakefileGenerator::writeMakefile(QTextStream &t)
if (writeDummyMakefile(t))
return true;

@@ -12,7 +12,7 @@ Index: qmake/generators/unix/unixmake2.cpp
if (project->first("TEMPLATE") == "app" ||
project->first("TEMPLATE") == "lib" ||
project->first("TEMPLATE") == "aux") {
-@@ -189,16 +193,17 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
+@@ -192,16 +196,17 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
writeExportedVariables(t);

t << "####### Compiler, tools and options\n\n";
@@ -37,7 +37,7 @@ Index: qmake/generators/unix/unixmake2.cpp
for(int i = 0; i < incs.size(); ++i) {
const ProString &inc = incs.at(i);
if (inc.isEmpty())
-@@ -214,9 +219,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
+@@ -217,9 +222,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
writeDefaultVariables(t);

if(!project->isActiveConfig("staticlib")) {
@@ -49,7 +49,7 @@ Index: qmake/generators/unix/unixmake2.cpp
<< fixLibFlags("LIBS_PRIVATE").join(' ') << ' '
<< fixLibFlags("QMAKE_LIBS").join(' ') << ' '
<< fixLibFlags("QMAKE_LIBS_PRIVATE").join(' ') << Qt::endl;
-@@ -224,8 +229,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
+@@ -227,8 +232,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)

t << "AR = " << var("QMAKE_AR") << Qt::endl;
t << "RANLIB = " << var("QMAKE_RANLIB") << Qt::endl;
@@ -60,7 +60,7 @@ Index: qmake/generators/unix/unixmake2.cpp

t << Qt::endl;

-@@ -259,12 +264,19 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
+@@ -262,12 +267,19 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << "TARGET0 = " << fileVar("TARGET_") << Qt::endl;
} else if (!project->isActiveConfig("unversioned_libname")) {
t << "TARGET0 = " << fileVar("TARGET_") << Qt::endl;
@@ -85,7 +85,7 @@ Index: qmake/generators/unix/unixmake2.cpp
}
}
}
-@@ -589,7 +601,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
+@@ -601,7 +613,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
if(!project->isEmpty("QMAKE_POST_LINK"))
t << "\n\t" << var("QMAKE_POST_LINK");
t << Qt::endl << Qt::endl;
@@ -95,7 +95,7 @@ Index: qmake/generators/unix/unixmake2.cpp
t << "\n\t";

if (!project->isActiveConfig("unversioned_libname"))
-@@ -623,7 +636,22 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
+@@ -635,7 +648,22 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
if(!project->isEmpty("QMAKE_POST_LINK"))
t << "\n\t" << var("QMAKE_POST_LINK");
t << Qt::endl << Qt::endl;
@@ -118,7 +118,7 @@ Index: qmake/generators/unix/unixmake2.cpp
t << "\n\t"
<< "-$(DEL_FILE) $(TARGET) $(TARGET0)\n\t"
<< var("QMAKE_LINK_SHLIB_CMD") << "\n\t";
-@@ -1252,6 +1280,12 @@ void UnixMakefileGenerator::init2()
+@@ -1264,6 +1292,12 @@ void UnixMakefileGenerator::init2()
project->values("TARGET_x").append("lib" + project->first("TARGET") + "." +
project->first("VER_MAJ"));
project->values("TARGET") = project->values("TARGET_x");
@@ -131,7 +131,7 @@ Index: qmake/generators/unix/unixmake2.cpp
} else if (!project->isEmpty("QMAKE_AIX_SHLIB")) {
project->values("PRL_TARGET").prepend("lib" + project->first("TARGET"));
project->values("TARGET_").append(project->first("QMAKE_PREFIX_STATICLIB") + project->first("TARGET")
-@@ -1472,18 +1506,33 @@ UnixMakefileGenerator::writeLibtoolFile()
+@@ -1503,18 +1537,33 @@ UnixMakefileGenerator::writeLibtoolFile()
<< QT_VERSION_STR << ")";
t << "\n";

diff --git a/x11/qt6/qtbase/patches/patch-qmake_generators_unix_unixmake_h b/x11/qt6/qtbase/patches/patch-qmake_generators_unix_unixmake_h
index 49854b2c255..2cb095c9d5f 100644
--- a/x11/qt6/qtbase/patches/patch-qmake_generators_unix_unixmake_h
+++ b/x11/qt6/qtbase/patches/patch-qmake_generators_unix_unixmake_h
@@ -2,7 +2,7 @@ Index: qmake/generators/unix/unixmake.h
--- qmake/generators/unix/unixmake.h.orig
+++ qmake/generators/unix/unixmake.h
@@ -61,6 +61,7 @@ class UnixMakefileGenerator : public MakefileGenerator
- std::pair<bool, QString> writeObjectsPart(QTextStream &, bool do_incremental);
+ bool writeObjectsPart(QTextStream &, bool do_incremental);
private:
void init2();
+ void separateInternalLibdirs(ProStringList &libs, ProStringList &libdirsInt, QString prefix);
diff --git a/x11/qt6/qtbase/patches/patch-src_corelib_plugin_qelfparser_p_cpp b/x11/qt6/qtbase/patches/patch-src_corelib_plugin_qelfparser_p_cpp
new file mode 100644
index 00000000000..31ba960c889
--- /dev/null
+++ b/x11/qt6/qtbase/patches/patch-src_corelib_plugin_qelfparser_p_cpp
@@ -0,0 +1,33 @@
+Index: src/corelib/plugin/qelfparser_p.cpp
+--- src/corelib/plugin/qelfparser_p.cpp.orig
++++ src/corelib/plugin/qelfparser_p.cpp
+@@ -363,9 +363,9 @@ Q_DECL_UNUSED Q_DECL_COLD_FUNCTION static QDebug &oper
+ case ELFOSABI_SYSV: d << " (SYSV"; break;
+ case ELFOSABI_HPUX: d << " (HP-UX"; break;
+ case ELFOSABI_NETBSD: d << " (NetBSD"; break;
+- case ELFOSABI_GNU: d << " (GNU/Linux"; break;
++ case ELFOSABI_LINUX: d << " (GNU/Linux"; break;
+ case ELFOSABI_SOLARIS: d << " (Solaris"; break;
+- case ELFOSABI_AIX: d << " (AIX"; break;
++ //case ELFOSABI_AIX: d << " (AIX"; break;
+ case ELFOSABI_IRIX: d << " (IRIX"; break;
+ case ELFOSABI_FREEBSD: d << " (FreeBSD"; break;
+ case ELFOSABI_OPENBSD: d << " (OpenBSD"; break;
+@@ -409,7 +409,7 @@ Q_DECL_UNUSED Q_DECL_COLD_FUNCTION static QDebug &oper
+ case EM_NONE: d << ", no machine"; break;
+ case EM_ARM: d << ", ARM"; break;
+ case EM_AARCH64: d << ", AArch64"; break;
+- case EM_BLACKFIN: d << ", Blackfin"; break;
++ //case EM_BLACKFIN: d << ", Blackfin"; break;
+ case EM_IA_64: d << ", IA-64"; break;
+ case EM_MIPS: d << ", MIPS"; break;
+ case EM_PPC: d << ", PowerPC"; break;
+@@ -417,7 +417,7 @@ Q_DECL_UNUSED Q_DECL_COLD_FUNCTION static QDebug &oper
+ #ifdef EM_RISCV
+ case EM_RISCV: d << ", RISC-V"; break;
+

No comments:

Post a Comment