diff --git a/devel/qt6-base/Makefile b/devel/qt6-base/Makefile index dd0c5ef4a01e..0053a9754758 100644 --- a/devel/qt6-base/Makefile +++ b/devel/qt6-base/Makefile @@ -1,112 +1,113 @@ PORTNAME= base DISTVERSION= ${QT6_VERSION} +PORTREVISION= 1 CATEGORIES= devel PKGNAMEPREFIX= qt6- MAINTAINER= kde@FreeBSD.org COMMENT= Qt base (core, gui, widgets, network,...) BUILD_DEPENDS= xml:textproc/xmlstarlet \ ${LOCALBASE}/include/vulkan/vulkan.h:graphics/vulkan-headers \ ${LOCALBASE}/include/linux/input.h:devel/evdev-proto LIB_DEPENDS= \ libatk-1.0.so:accessibility/at-spi2-core \ libatk-bridge-2.0.so:accessibility/at-spi2-core \ libatspi.so:accessibility/at-spi2-core \ libbrotlidec.so:archivers/brotli \ libdbus-1.so:devel/dbus \ libdouble-conversion.so:devel/double-conversion \ libdrm.so:graphics/libdrm \ libevdev.so:devel/libevdev \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libgraphite2.so:graphics/graphite2 \ libharfbuzz.so:print/harfbuzz \ libicui18n.so:devel/icu \ libinput.so:x11/libinput \ libintl.so:devel/gettext-runtime \ libjpeg.so:graphics/jpeg-turbo \ libmtdev.so:devel/libmtdev \ libpcre2-16.so:devel/pcre2 \ libpng16.so:graphics/png \ libudev.so:devel/libudev-devd \ libvulkan.so:graphics/vulkan-loader \ libwayland-client.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon \ libzstd.so:archivers/zstd USES= cmake compiler:c++17-lang gl gnome jpeg perl5 pkgconfig python \ qt-dist:6 shebangfix ssl USE_GL= egl opengl USE_GNOME= cairo gdkpixbuf2 glib20 gtk30 pango USE_LOCALE= C.UTF-8 CMAKE_ARGS= -DOPENSSL_ROOT_DIR="${OPENSSLBASE}" CMAKE_ON= CMAKE_DISABLE_FIND_PACKAGE_LTTngUST \ QT_AVOID_CMAKE_ARCHIVING_API \ QT_FIND_ALL_PACKAGES_ALWAYS \ QT_FEATURE_openssl_linked CMAKE_OFF= QT_FEATURE_eglfs \ QT_FEATURE_gssapi # sql drivers are handled in the qt6-base-sqldriver port CMAKE_OFF+= FEATURE_sql_mysql \ FEATURE_sql_odbc \ FEATURE_sql_psql \ FEATURE_sql_sqlite SHEBANG_FILES= ${WRKSRC}/mkspecs/features/uikit/device_destinations.sh \ ${WRKSRC}/mkspecs/features/uikit/devices.py \ ${WRKSRC}/mkspecs/features/data/mac/objc_namespace.sh \ ${WRKSRC}/util/testrunner/qt-testrunner.py \ ${WRKSRC}/util/testrunner/sanitizer-testrunner.py USE_LDCONFIG= ${PREFIX}/${QT_LIBDIR_REL} # zstd from base fails to compress files during the build (error 11: unsupported argument) BINARY_ALIAS= zstd=${LOCALBASE}/bin/zstd OPTIONS_DEFINE= CUPS X11 OPTIONS_DEFAULT= CUPS X11 OPTIONS_SUB= yes CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_CMAKE_OFF= -DFEATURE_cups=OFF X11_USES= xorg X11_USE= XORG=ice,pixman,sm,x11,xau,xcb,xcomposite,xcursor,xdamage,xdmcp,xext,xfixes,xi,xinerama,xrandr,xrender X11_CMAKE_BOOL= FEATURE_xcb FEATURE_xlib X11_LIB_DEPENDS= libxcb-cursor.so:x11/xcb-util-cursor \ libxcb-icccm.so:x11/xcb-util-wm \ libxcb-image.so:x11/xcb-util-image \ libxcb-keysyms.so:x11/xcb-util-keysyms \ libxcb-render-util.so:x11/xcb-util-renderutil .include # LibreSSL does not currently support BIO_ADDR in DTLSv1_listen() .if ${SSL_DEFAULT:Mlibressl*} CMAKE_OFF+= QT_FEATURE_dtls PLIST_SUB+= DTLS="@comment " .else PLIST_SUB+= DTLS="" .endif .if ${ARCH} == "armv6" || ${ARCH} == "armv7" BUILD_DEPENDS+= as:devel/binutils CMAKE_ARGS+= -DCMAKE_ASM_FLAGS=-no-integrated-as .endif post-patch: @${REINPLACE_CMD} -e 's|%%OPENSSLLIB%%|${OPENSSLLIB}|g' \ ${WRKSRC}/src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp # TODO: do this cleaner -- somewhere cmake/qmake still creates empty directories # for the cmake files in INSTALL_PREFIX/lib/cmake post-install: ${RM} -vr ${STAGEDIR}${PREFIX}/${QT_LIBDIR_REL}/cmake # Install symlinks for user-facing tools ${REINPLACE_CMD} -e "s#^#${STAGEDIR}#" -e "s# # ${STAGEDIR}#" \ ${WRKDIR}/.build/user_facing_tool_links.txt while read t; do \ ${RLN} $$t; \ done <${WRKDIR}/.build/user_facing_tool_links.txt .include diff --git a/devel/qt6-base/files/patch-src_corelib_CMakeLists.txt b/devel/qt6-base/files/patch-src_corelib_CMakeLists.txt new file mode 100644 index 000000000000..e574c4c77272 --- /dev/null +++ b/devel/qt6-base/files/patch-src_corelib_CMakeLists.txt @@ -0,0 +1,13 @@ +--- src/corelib/CMakeLists.txt.orig 2024-05-06 23:06:44 UTC ++++ src/corelib/CMakeLists.txt +@@ -381,6 +381,10 @@ endif() + target_link_libraries(Platform INTERFACE Threads::Threads) + endif() + ++if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD) ++ target_link_libraries(Core PRIVATE kvm procstat) ++endif() ++ + # Skip AUTOMOC processing of qobject.cpp and its headers. + # We do this on purpose, because qobject.cpp contains a bunch of Q_GADGET, Q_NAMESPACE, etc + # keywords and AUTOMOC gets confused about wanting to compile a qobject.moc file as well. diff --git a/devel/qt6-base/files/patch-src_corelib_io_qlockfile__unix.cpp b/devel/qt6-base/files/patch-src_corelib_io_qlockfile__unix.cpp new file mode 100644 index 000000000000..73787a319f0b --- /dev/null +++ b/devel/qt6-base/files/patch-src_corelib_io_qlockfile__unix.cpp @@ -0,0 +1,63 @@ +--- src/corelib/io/qlockfile_unix.cpp.orig 2024-08-13 19:47:11 UTC ++++ src/corelib/io/qlockfile_unix.cpp +@@ -46,6 +46,8 @@ + # include + # if !defined(Q_OS_NETBSD) + # include ++# include ++# include + # endif + #endif + +@@ -223,23 +225,44 @@ QString QLockFilePrivate::processNameByPid(qint64 pid) + struct kinfo_proc kp; + int mib[6] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, (int)pid, sizeof(struct kinfo_proc), 1 }; + # else ++ QString nameFromProcstat; ++ kvm_t *kvm = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, ""); ++ if (kvm) { ++ int cnt; ++ struct kinfo_proc *kp = kvm_getprocs(kvm, KERN_PROC_PID, getpid(), &cnt); ++ if (kp) { ++ struct procstat *ps = procstat_open_sysctl(); ++ char **argv = procstat_getargv(ps, kp, 0); ++ if (argv != nullptr && argv[0] != nullptr) ++ nameFromProcstat = QString::fromLocal8Bit(argv[0]); ++ procstat_close(ps); ++ } ++ kvm_close(kvm); ++ } + struct kinfo_proc kp; + int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, (int)pid }; + # endif +- size_t len = sizeof(kp); +- u_int mib_len = sizeof(mib)/sizeof(u_int); ++ if (nameFromProcstat.isEmpty()) { ++ size_t len = sizeof(kp); ++ u_int mib_len = sizeof(mib)/sizeof(u_int); + +- if (sysctl(mib, mib_len, &kp, &len, NULL, 0) < 0) +- return QString(); +- ++ if (sysctl(mib, mib_len, &kp, &len, NULL, 0) < 0) ++ return QString(); ++ } + # if defined(Q_OS_OPENBSD) || defined(Q_OS_NETBSD) + if (kp.p_pid != pid) + return QString(); + QString name = QFile::decodeName(kp.p_comm); + # else +- if (kp.ki_pid != pid) ++ QString name; ++ if (!nameFromProcstat.isEmpty()) { ++ QFileInfo fi(nameFromProcstat); ++ name = fi.fileName(); ++ } ++ else if (kp.ki_pid != pid) + return QString(); +- QString name = QFile::decodeName(kp.ki_comm); ++ else ++ name = QFile::decodeName(kp.ki_comm); + # endif + return name; + #elif defined(Q_OS_QNX)