Bug 274143 - net-im/telegram-desktop: requesting update (to 4.9.8?)
Summary: net-im/telegram-desktop: requesting update (to 4.9.8?)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dima Panov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-28 12:25 UTC by Anton Saietskii
Modified: 2023-09-28 16:03 UTC (History)
1 user (show)

See Also:


Attachments
non-working patch to add include directory (404 bytes, patch)
2023-09-28 12:25 UTC, Anton Saietskii
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Saietskii 2023-09-28 12:25:37 UTC
Created attachment 245307 [details]
non-working patch to add include directory

After Qt 5.15.10 upgrade, I tried to build a few newer tdesktop versions. Looks like 4.9.8 is the one we can import now, but there's a header error:

/usr/local/libexec/ccache/c++ -DCRL_USE_COMMON_QUEUE -DDESKTOP_APP_DISABLE_CRASH_REPORTS -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION -DDESKTOP_APP_USE_PACKAGED -DGI_INLINE -DGI_OBJECT_NEWV -DKCOREADDONS_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DEPRECATED_WARNINGS_SINCE=0x051500 -DQT_GUI_LIB -DQT_IMPLICIT_QCHAR_CONSTRUCTION -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICKWIDGETS_LIB -DQT_QUICK_LIB -DQT_SVG_LIB -DQT_WAYLANDCOMPOSITOR_LIB -DQT_WIDGETS_LIB -I/wrkdirs/usr/ports/net-im/telegram-desktop/work-qt5/tdesktop-4.9.8-full/Telegram/lib_base -I/wrkdirs/usr/ports/net-im/telegram-desktop/work-qt5/tdesktop-4.9.8-full/Telegram/lib_rpl -I/wrkdirs/usr/ports/net-im/telegram-desktop/work-qt5/tdesktop-4.9.8-full/Telegram/lib_crl -I/wrkdirs/usr/ports/net-im/telegram-desktop/work-qt5/tdesktop-4.9.8-full/cmake/external/glib/cppgir -I/wrkdirs/usr/ports/net-im/telegram-desktop/work-qt5/tdesktop-4.9.8-full/cmake/external/glib/cppgir/gi -I/wrkdirs/usr/ports/net-im/telegram-desktop/work-qt5/tdesktop-4.9.8-full/cmake/external/glib/cppgir/override -I/wrkdirs/usr/ports/net-im/telegram-desktop/work-qt5/tdesktop-4.9.8-full/cmake/external/glib/cppgir/expected-lite/include -isystem /wrkdirs/usr/ports/net-im/telegram-desktop/work-qt5/tdesktop-4.9.8-full/Telegram/ThirdParty/GSL/include -isystem /usr/local/include/qt5 -isystem /usr/local/include/qt5/QtCore -isystem /usr/local/lib/qt5/mkspecs/freebsd-clang -isystem /usr/local/include/qt5/QtCore/5.15.10 -isystem /usr/local/include/qt5/QtCore/5.15.10/QtCore -isystem /usr/local/include/qt5/QtGui -isystem /usr/local/include/qt5/QtGui/5.15.10 -isystem /usr/local/include/qt5/QtGui/5.15.10/QtGui -isystem /usr/local/include/qt5/QtWidgets -isystem /usr/local/include/qt5/QtWidgets/5.15.10 -isystem /usr/local/include/qt5/QtWidgets/5.15.10/QtWidgets -isystem /usr/local/include/qt5/QtNetwork -isystem /usr/local/include/qt5/QtSvg -isystem /usr/local/include/qt5/QtDBus -isystem /usr/local/include/qt5/QtQuick -isystem /usr/local/include/qt5/QtQmlModels -isystem /usr/local/include/qt5/QtQml -isystem /usr/local/include/qt5/QtQuickWidgets -isystem /usr/local/include/qt5/QtWaylandCompositor -isystem /usr/local/share -isystem /usr/local/include/giomm-2.68 -isystem /usr/local/lib/giomm-2.68/include -isystem /usr/local/include/glib-2.0 -isystem /usr/local/lib/glib-2.0/include -isystem /usr/local/include/glibmm-2.68 -isystem /usr/local/lib/glibmm-2.68/include -isystem /usr/local/include/sigc++-3.0 -isystem /usr/local/lib/sigc++-3.0/include -isystem /usr/local/include/KF5/KCoreAddons -isystem /usr/local/include/KF5 -isystem /wrkdirs/usr/ports/net-im/telegram-desktop/work-qt5/.build/Telegram/lib_base/gen -isystem /wrkdirs/usr/ports/net-im/telegram-desktop/work-qt5/.build/gen -isystem /usr/local/include/gio-unix-2.0 -O3 -pipe -march=native -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O3 -pipe -march=native -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -std=gnu++20 -fPIC -fno-strict-aliasing -pipe -Wall -Wextra -Wno-unused-parameter -Wno-switch -Wno-missing-field-initializers -Wno-sign-compare -Wno-deprecated -pthread -Winvalid-pch -Xclang -include-pch -Xclang /wrkdirs/usr/ports/net-im/telegram-desktop/work-qt5/.build/Telegram/lib_base/CMakeFiles/lib_base.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /wrkdirs/usr/ports/net-im/telegram-desktop/work-qt5/.build/Telegram/lib_base/CMakeFiles/lib_base.dir/cmake_pch.hxx -MD -MT Telegram/lib_base/CMakeFiles/lib_base.dir/base/platform/linux/base_linux_xdp_utilities.cpp.o -MF Telegram/lib_base/CMakeFiles/lib_base.dir/base/platform/linux/base_linux_xdp_utilities.cpp.o.d -o Telegram/lib_base/CMakeFiles/lib_base.dir/base/platform/linux/base_linux_xdp_utilities.cpp.o -c /wrkdirs/usr/ports/net-im/telegram-desktop/work-qt5/tdesktop-4.9.8-full/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp
/wrkdirs/usr/ports/net-im/telegram-desktop/work-qt5/tdesktop-4.9.8-full/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp:18:10: fatal error: 'private/qgenericunixservices_p.h' file not found
#include <private/qgenericunixservices_p.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

private/qgenericunixservices_p.h sits in include/qt5/QtServiceSupport/5.15.10/QtServiceSupport/, so I tried a patch (please see attachment). However, that did'nt help--directory wasn't added to "-isystem ..." params to compiler.

fluffy@, it would be greatly appreciated if you've got some spare time to help with this since I honestly don't know how to deal with cmake.
Comment 1 Dima Panov freebsd_committer freebsd_triage 2023-09-28 12:43:41 UTC
(In reply to Anton Saietskii from comment #0)
Indeed, qt5 variant require more changes in 4.9.8 code to build, some of them is already ready on my side.

Feel free to ping me at telegram in any time. https://t.me/FluffyBSD
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-09-28 15:50:31 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bb380e5977be982aa76428ba052632036cd51d32

commit bb380e5977be982aa76428ba052632036cd51d32
Author:     Dima Panov <fluffy@FreeBSD.org>
AuthorDate: 2023-09-28 15:43:15 +0000
Commit:     Dima Panov <fluffy@FreeBSD.org>
CommitDate: 2023-09-28 15:49:49 +0000

    net-im/telegram-desktop: update to 4.9.8 release

    * Backport webview patches from upstream
    * Fix build with qt5, required #include <private/qgenericunixservices_p.h>
      is still provided by QtServiceSupport module but moved to QtGui in Qt6

    PR:     274143

 net-im/telegram-desktop/Makefile                   |  7 ++--
 net-im/telegram-desktop/distinfo                   |  6 +--
 ...form_linux_webview__linux__compositor.cpp (new) | 14 +++++++
 ...tform_linux_webview__linux__webkitgtk.cpp (new) | 48 ++++++++++++++++++++++
 .../patch-cmake_external_qt_CMakeLists.txt (new)   | 44 ++++++++++++++++++++
 .../patch-cmake_external_qt_package.cmake (new)    | 11 +++++
 6 files changed, 123 insertions(+), 7 deletions(-)
Comment 3 Dima Panov freebsd_committer freebsd_triage 2023-09-28 16:02:04 UTC
Telegram Desktop was updated to 4.9.8 release, latest possible for now
Comment 4 Anton Saietskii 2023-09-28 16:03:49 UTC
(In reply to Dima Panov from comment #3)

Thanks a lot! I'll try to build it overnight (yup, potato-laptop, takes ~7 hours...)