Index: head/net-im/telegram-desktop/Makefile =================================================================== --- head/net-im/telegram-desktop/Makefile (revision 482109) +++ head/net-im/telegram-desktop/Makefile (revision 482110) @@ -1,122 +1,122 @@ # $FreeBSD$ PORTNAME= telegram-desktop DISTVERSIONPREFIX= v -DISTVERSION= 1.4.0 +DISTVERSION= 1.4.2 CATEGORIES= net-im MAINTAINER= henry.hu.sh@gmail.com COMMENT= Telegram Desktop messaging app LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= dee>0:devel/dee \ gyp:devel/py-gyp@${PY_FLAVOR} \ range-v3>0:devel/range-v3 \ pulseaudio>0:audio/pulseaudio \ alsa-lib>0:audio/alsa-lib LIB_DEPENDS= libavformat.so:multimedia/ffmpeg \ libdbus-1.so:devel/dbus \ libminizip.so:archivers/minizip \ libopenal.so:audio/openal-soft \ libopus.so:audio/opus USES= compiler:c++17-lang cmake:noninja,outsource desktop-file-utils gmake pkgconfig python:2.7,build qt:5 ssl USE_GITHUB= yes GH_ACCOUNT= telegramdesktop GH_PROJECT= tdesktop GH_TUPLE= catchorg:Catch2:5ca44b68:catch/Telegram/ThirdParty/Catch \ mapbox:variant:550ac2f:variant/Telegram/ThirdParty/variant \ Microsoft:GSL:d846fe5:gsl/Telegram/ThirdParty/GSL \ telegramdesktop:libtgvoip:9b292fd:libtgvoip/Telegram/ThirdParty/libtgvoip \ telegramdesktop:crl:4291015:crl/Telegram/ThirdParty/crl \ Cyan4973:xxHash:7cc9639:xxhash/Telegram/ThirdParty/xxHash USE_GNOME= glib20 USE_QT= core gui imageformats network widgets buildtools_build qmake_build dbus USE_XORG= x11 xcb CMAKE_SOURCE_PATH= ${WRKSRC}/out/Release GYP_DEFINES= TDESKTOP_DISABLE_CRASH_REPORTS,TDESKTOP_DISABLE_AUTOUPDATE,TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME # Telegram uses OpenAL for its audio, but libtgvoip (for voice calls) can use PulseAudio or ALSA. # It dynamically loads PulseAudio, and if this fails, it loads ALSA. # If both of them are not installed, then voice calls do not work, but other functionalities still work. OPTIONS_MULTI= AUDIO OPTIONS_MULTI_AUDIO= ALSA PULSEAUDIO OPTIONS_DEFINE= GTK OPTIONS_DEFAULT= ALSA AUDIO_DESC= Audio backend for voice calls GTK_DESC= Gtk integration (Use Gtk dialogs, etc.) ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio .include .if ${PORT_OPTIONS:MGTK} USE_GNOME+= gtk30 .else GYP_DEFINES:= ${GYP_DEFINES},TDESKTOP_DISABLE_GTK_INTEGRATION .endif .include # This port needs C++17 libs/compiler. # Currently, this is not supported by USES=compiler # Using clang does not work: libc++ in base does not support C++17. # Using gcc does not work: using both libc++ and libstdc++ causes crashes. .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100000 IGNORE= need C++17 support in compiler and runtime .endif # Since 1.3.14, the clang compiler provided in 11.1 (4.0.0) gets a segmentation # fault. .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1102000 CXXFLAGS+= -DGSL_USE_STD_BYTE=0 QMAKE_COMPILER= clang .endif post-patch: @cd ${WRKSRC} && \ (${SED} -e " \ s|%%QT_VERSION%%|${QT5_VERSION}| ; \ s|%%LOCALBASE%%|${LOCALBASE}| ; \ s|%%CFLAGS%%|${CFLAGS:C/(.*)/'\1',/}| ; \ s|%%CXXFLAGS%%|${CXXFLAGS:C/(.*)/'\1',/}| ; \ s|%%LDFLAGS%%|${LDFLAGS:C/(.*)/'\1',/}| ; \ s|%%QT_BINDIR%%|${QT_BINDIR}| ; \ s|%%QT_INCDIR%%|${QT_INCDIR}| ; \ s|%%QT_LIBDIR%%|${QT_LIBDIR}| ; \ s|%%QMAKESPEC%%|${QMAKESPEC}| ; \ s|%%PYTHON_CMD%%|${PYTHON_CMD}|" \ ${FILESDIR}/gyp-patches | \ ${PATCH} -z .bak -s) @${ECHO} "#define FREEBSD_QT_PLUGINDIR \"${QT_PLUGINDIR}\"" > ${WRKSRC}/Telegram/SourceFiles/FREEBSD_QT_PLUGINDIR.h pre-configure: @cd ${WRKSRC} && gyp \ -Dbuild_defines=${GYP_DEFINES} \ -Gconfig=Release \ --depth=Telegram/gyp --generator-output=../.. -Goutput_dir=out Telegram/gyp/Telegram.gyp --format=cmake @TOT=`wc -l < ${WRKSRC}/out/Release/CMakeLists.txt` && NUM=`expr $$TOT - 2` && \ ${SED} -i -e "$$NUM r ${FILESDIR}/CMakeLists.inj" ${WRKSRC}/out/Release/CMakeLists.txt do-install: ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/Telegram ${STAGEDIR}${PREFIX}/bin/${PORTNAME} ${INSTALL_DATA} ${WRKSRC}/lib/xdg/telegramdesktop.desktop ${STAGEDIR}${PREFIX}/share/applications/${PORTNAME}.desktop @${MKDIR} ${STAGEDIR}${PREFIX}/share/kservices5 ${INSTALL_DATA} ${WRKSRC}/lib/xdg/tg.protocol ${STAGEDIR}${PREFIX}/share/kservices5 @${MKDIR} ${STAGEDIR}${PREFIX}/share/appdata ${INSTALL_DATA} ${WRKSRC}/lib/xdg/telegramdesktop.appdata.xml ${STAGEDIR}${PREFIX}/share/appdata/${PORTNAME}.appdata.xml .for icon_size in 16 32 48 64 128 256 512 @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${icon_size}x${icon_size}/apps ${INSTALL_DATA} \ ${WRKSRC}/Telegram/Resources/art/icon${icon_size}.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${icon_size}x${icon_size}/apps/${PORTNAME}.png .endfor .include Index: head/net-im/telegram-desktop/distinfo =================================================================== --- head/net-im/telegram-desktop/distinfo (revision 482109) +++ head/net-im/telegram-desktop/distinfo (revision 482110) @@ -1,15 +1,15 @@ -TIMESTAMP = 1538948703 -SHA256 (telegramdesktop-tdesktop-v1.4.0_GH0.tar.gz) = e3ee54461dae5552b41b6b56f12225a4d546118b2e2d4d864442e4462da97a9b -SIZE (telegramdesktop-tdesktop-v1.4.0_GH0.tar.gz) = 17318129 +TIMESTAMP = 1539390512 +SHA256 (telegramdesktop-tdesktop-v1.4.2_GH0.tar.gz) = f8e90949e2b52c2df7dca35d33731880fa8f3d526431ad82f197ece7dce773aa +SIZE (telegramdesktop-tdesktop-v1.4.2_GH0.tar.gz) = 17340759 SHA256 (catchorg-Catch2-5ca44b68_GH0.tar.gz) = 8cdf2a345897bda1aaabffd4496dffe263768cef3e4254e74ae63545c8e12cc2 SIZE (catchorg-Catch2-5ca44b68_GH0.tar.gz) = 375264 SHA256 (mapbox-variant-550ac2f_GH0.tar.gz) = 7ab3aa7c9fa672027f13721584df5f7ec09c0ecca499d374c6ac76e147ef7354 SIZE (mapbox-variant-550ac2f_GH0.tar.gz) = 108686 SHA256 (Microsoft-GSL-d846fe5_GH0.tar.gz) = 4c463f93ca3b1dcb0b8d73b54309c1d31145761c457f1a6fd53554a6d469b468 SIZE (Microsoft-GSL-d846fe5_GH0.tar.gz) = 58930 SHA256 (telegramdesktop-libtgvoip-9b292fd_GH0.tar.gz) = 0545b3cdadb65f74d69bf11d9fd39f1ad15f5045cd819d64e8d40ef536b22a7e SIZE (telegramdesktop-libtgvoip-9b292fd_GH0.tar.gz) = 803095 SHA256 (telegramdesktop-crl-4291015_GH0.tar.gz) = 25f461f0e575cfa2b55959f735115acac1f515d923a85b2a7a7a886dd6f0c395 SIZE (telegramdesktop-crl-4291015_GH0.tar.gz) = 21322 SHA256 (Cyan4973-xxHash-7cc9639_GH0.tar.gz) = f40801820e885f92bbe3d2434efeb39aa18eeaf878341982e8525b538468e3ed SIZE (Cyan4973-xxHash-7cc9639_GH0.tar.gz) = 37534 Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_utils.h =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_utils.h (revision 482109) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_core_utils.h (revision 482110) @@ -1,10 +1,10 @@ ---- Telegram/SourceFiles/core/utils.h.orig 2018-09-28 13:08:38 UTC +--- Telegram/SourceFiles/core/utils.h.orig 2018-10-09 21:21:48 UTC +++ Telegram/SourceFiles/core/utils.h -@@ -411,6 +411,7 @@ enum DBIPlatform { +@@ -406,6 +406,7 @@ enum DBIPlatform { dbipLinux64 = 2, dbipLinux32 = 3, dbipMacOld = 4, + dbipFreeBSD = 5, }; enum DBIPeerReportSpamStatus { Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_logs.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_logs.cpp (revision 482109) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_logs.cpp (revision 482110) @@ -1,40 +1,41 @@ ---- Telegram/SourceFiles/logs.cpp.orig 2018-09-28 13:08:38 UTC +--- Telegram/SourceFiles/logs.cpp.orig 2018-10-09 21:21:48 UTC +++ Telegram/SourceFiles/logs.cpp -@@ -332,7 +332,7 @@ void start(not_null lau - +@@ -333,7 +333,7 @@ void start(not_null lau if (cAlphaVersion()) { workingDirChosen = true; + -#if defined Q_OS_MAC || defined Q_OS_LINUX +#if defined Q_OS_MAC || defined Q_OS_LINUX || defined Q_OS_FREEBSD } else { - #ifdef _DEBUG - cForceWorkingDir(cExeDir()); -@@ -346,15 +346,15 @@ void start(not_null lau - #endif // !_DEBUG + if (!cWorkingDir().isEmpty()) { + // This value must come from TelegramForcePortable +@@ -348,16 +348,16 @@ void start(not_null lau + } workingDirChosen = true; -#if defined Q_OS_LINUX && !defined _DEBUG // fix first version +#if (defined Q_OS_LINUX || defined Q_OS_FREEBSD) && !defined _DEBUG // fix first version moveOldDataFrom = initialWorkingDir; -#endif // Q_OS_LINUX && !_DEBUG +#endif // (Q_OS_LINUX || Q_OS_FREEBSD) && !_DEBUG -#elif defined Q_OS_WINRT // Q_OS_MAC || Q_OS_LINUX +#elif defined Q_OS_WINRT // Q_OS_MAC || Q_OS_LINUX || Q_OS_FREEBSD } else { cForceWorkingDir(psAppDataPath()); workingDirChosen = true; + -#elif defined OS_WIN_STORE // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT +#elif defined OS_WIN_STORE // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_FREEBSD #ifdef _DEBUG cForceWorkingDir(cExeDir()); #else // _DEBUG -@@ -368,7 +368,7 @@ void start(not_null lau - cForceWorkingDir(cWorkingDir()); +@@ -374,7 +374,7 @@ void start(not_null lau workingDirChosen = true; } + -#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || OS_WIN_STORE +#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || OS_WIN_STORE || Q_OS_FREEBSD } LogsData = new LogsDataFields(); Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_settings.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_settings.cpp (revision 482109) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_settings.cpp (revision 482110) @@ -1,11 +1,11 @@ ---- Telegram/SourceFiles/settings.cpp.orig 2018-08-04 18:53:40 UTC +--- Telegram/SourceFiles/settings.cpp.orig 2018-10-09 21:21:48 UTC +++ Telegram/SourceFiles/settings.cpp -@@ -81,6 +81,8 @@ DBIPlatform gPlatform = dbipMac; +@@ -79,6 +79,8 @@ DBIPlatform gPlatform = dbipMac; DBIPlatform gPlatform = dbipLinux64; #elif defined Q_OS_LINUX32 DBIPlatform gPlatform = dbipLinux32; +#elif defined Q_OS_FREEBSD +DBIPlatform gPlatform = dbipFreeBSD; #else #error Unknown platform #endif Index: head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_window_main__window.cpp =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_window_main__window.cpp (revision 482109) +++ head/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_window_main__window.cpp (revision 482110) @@ -1,20 +1,20 @@ ---- Telegram/SourceFiles/window/main_window.cpp.orig 2018-08-04 18:53:40 UTC +--- Telegram/SourceFiles/window/main_window.cpp.orig 2018-10-09 21:21:48 UTC +++ Telegram/SourceFiles/window/main_window.cpp -@@ -421,7 +421,7 @@ bool MainWindow::minimizeToTray() { +@@ -496,7 +496,7 @@ bool MainWindow::minimizeToTray() { } void MainWindow::reActivateWindow() { -#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 +#if defined Q_OS_LINUX32 || defined Q_OS_LINUX64 || defined Q_OS_FREEBSD const auto reActivate = [=] { if (const auto w = App::wnd()) { if (auto f = QApplication::focusWidget()) { -@@ -436,7 +436,7 @@ void MainWindow::reActivateWindow() { +@@ -511,7 +511,7 @@ void MainWindow::reActivateWindow() { }; crl::on_main(this, reActivate); App::CallDelayed(200, this, reActivate); -#endif // Q_OS_LINUX32 || Q_OS_LINUX64 +#endif // Q_OS_LINUX32 || Q_OS_LINUX64 || Q_OS_FREEBSD } void MainWindow::showRightColumn(object_ptr widget) { Index: head/net-im/telegram-desktop/files/patch-Telegram_gyp_telegram__sources.txt =================================================================== --- head/net-im/telegram-desktop/files/patch-Telegram_gyp_telegram__sources.txt (revision 482109) +++ head/net-im/telegram-desktop/files/patch-Telegram_gyp_telegram__sources.txt (revision 482110) @@ -1,18 +1,18 @@ ---- Telegram/gyp/telegram_sources.txt.orig 2018-09-28 13:08:38 UTC +--- Telegram/gyp/telegram_sources.txt.orig 2018-10-09 21:21:48 UTC +++ Telegram/gyp/telegram_sources.txt -@@ -755,14 +755,7 @@ +@@ -761,14 +761,7 @@ <(emoji_suggestions_loc)/emoji_suggestions.cpp <(emoji_suggestions_loc)/emoji_suggestions.h -platforms: !win -<(minizip_loc)/crypt.h -<(minizip_loc)/ioapi.c -<(minizip_loc)/ioapi.h -<(minizip_loc)/zip.c -<(minizip_loc)/zip.h -<(minizip_loc)/unzip.c -<(minizip_loc)/unzip.h +<(src_loc)/qt_functions.cpp platforms: win <(res_loc)/winrc/Telegram.rc