diff --git a/net-im/Makefile b/net-im/Makefile index 92028e973106..cb3485878b41 100644 --- a/net-im/Makefile +++ b/net-im/Makefile @@ -1,182 +1,183 @@ COMMENT = Instant messaging SUBDIR += beebeep SUBDIR += biboumi SUBDIR += cawbird SUBDIR += chatterino2 SUBDIR += climm SUBDIR += coccinella SUBDIR += conduit SUBDIR += convey SUBDIR += coyim SUBDIR += cutegram SUBDIR += dendrite SUBDIR += dino SUBDIR += discordo SUBDIR += echat SUBDIR += ejabberd SUBDIR += farstream SUBDIR += finch SUBDIR += folks SUBDIR += fractal SUBDIR += freetalk SUBDIR += gajim SUBDIR += gitterdone SUBDIR += gloox SUBDIR += gomuks SUBDIR += gotktrix SUBDIR += gotosocial SUBDIR += gtkcord4 SUBDIR += gurk-rs SUBDIR += icmpchat SUBDIR += icqlib SUBDIR += jabberd SUBDIR += jarl SUBDIR += jicofo SUBDIR += jitsi-meet-full SUBDIR += jitsi-prosody-plugins SUBDIR += jitsi-srtp-native SUBDIR += jitsi-videobridge SUBDIR += jsxc SUBDIR += kaccounts-integration SUBDIR += kaccounts-providers SUBDIR += kaidan SUBDIR += kopete SUBDIR += libaccounts-glib SUBDIR += libaccounts-qt5 SUBDIR += libmesode SUBDIR += libnice SUBDIR += libnice-gst1 SUBDIR += libpurple SUBDIR += libqtelegram-ae SUBDIR += libquotient SUBDIR += libsignal-client SUBDIR += libsignal-node SUBDIR += libsignon-glib SUBDIR += libstrophe SUBDIR += loudmouth SUBDIR += lurch SUBDIR += mastodon SUBDIR += matterbridge SUBDIR += matterhorn SUBDIR += matterircd SUBDIR += mbpurple SUBDIR += mcabber SUBDIR += meanwhile SUBDIR += mikutter SUBDIR += mtxclient SUBDIR += neochat SUBDIR += nextcloud-spreed-signaling SUBDIR += nextcloud-talk SUBDIR += nheko SUBDIR += openfire SUBDIR += oysttyer SUBDIR += p5-AnyEvent-XMPP SUBDIR += p5-DJabberd SUBDIR += p5-Jabber-Lite SUBDIR += p5-Jabber-SimpleSend SUBDIR += p5-Net-AOLIM SUBDIR += p5-Net-Async-XMPP SUBDIR += p5-Net-Jabber SUBDIR += p5-Net-NetSend SUBDIR += p5-Net-OSCAR SUBDIR += p5-Net-Stomp SUBDIR += p5-Net-XMPP SUBDIR += p5-Net-XMPP2 SUBDIR += p5-Protocol-XMPP SUBDIR += p5-SOAP-Transport-JABBER SUBDIR += pecl-stomp2 SUBDIR += pidgin SUBDIR += pidgin-bot-sentry SUBDIR += pidgin-fetion SUBDIR += pidgin-hotkeys SUBDIR += pidgin-icyque SUBDIR += pidgin-latex SUBDIR += pidgin-libnotify SUBDIR += pidgin-manualsize SUBDIR += pidgin-sipe SUBDIR += pidgin-skypeweb SUBDIR += pidgin-twitter SUBDIR += pidgin-window_merge SUBDIR += profanity SUBDIR += prosody SUBDIR += prosody-modules SUBDIR += psi SUBDIR += purple-discord SUBDIR += purple-facebook SUBDIR += purple-googlechat SUBDIR += purple-mattermost SUBDIR += purple-plugin-pack SUBDIR += purple-rocketchat SUBDIR += purple-slack SUBDIR += py-fbmq SUBDIR += py-matrix-synapse SUBDIR += py-nbxmpp SUBDIR += py-punjab SUBDIR += py-python-telegram-bot SUBDIR += py-slack-sdk SUBDIR += py-slixmpp SUBDIR += py-telepot SUBDIR += py-toxcore-c SUBDIR += py-unmessage SUBDIR += qTox SUBDIR += quaternion SUBDIR += qxmpp SUBDIR += ricochet SUBDIR += rubygem-discordrb-webhooks SUBDIR += rubygem-discordrb-webhooks-blackst0ne SUBDIR += rubygem-hipchat SUBDIR += rubygem-lita SUBDIR += rubygem-termtter SUBDIR += rubygem-tinder SUBDIR += ruqola SUBDIR += sayaka SUBDIR += scli SUBDIR += sendxmpp SUBDIR += signal-cli SUBDIR += signal-desktop SUBDIR += signald SUBDIR += slack-term SUBDIR += spectral SUBDIR += ssh-chat SUBDIR += sshout SUBDIR += talkatu SUBDIR += tdlib + SUBDIR += tdlib-purple SUBDIR += teamwords SUBDIR += telegram-cli SUBDIR += telegram-desktop SUBDIR += telegram-purple SUBDIR += telegramqml SUBDIR += teleirc SUBDIR += telepathy-accounts-signon SUBDIR += telepathy-farstream SUBDIR += telepathy-gabble SUBDIR += telepathy-glib SUBDIR += telepathy-idle SUBDIR += telepathy-logger SUBDIR += telepathy-logger-qt5 SUBDIR += telepathy-mission-control SUBDIR += telepathy-qt SUBDIR += telepathy-salut SUBDIR += telepathy-sofiasip SUBDIR += tg_owt SUBDIR += tkabber SUBDIR += tkabber-plugins SUBDIR += tokodon SUBDIR += toot SUBDIR += tox SUBDIR += tox_extension_messages SUBDIR += toxbot SUBDIR += toxext SUBDIR += toxic SUBDIR += toxins SUBDIR += tut SUBDIR += twirssi SUBDIR += uTox SUBDIR += vqcc-gtk SUBDIR += xmpp-client SUBDIR += yume SUBDIR += zkgroup SUBDIR += zoom .include diff --git a/net-im/tdlib-purple/Makefile b/net-im/tdlib-purple/Makefile new file mode 100644 index 000000000000..1f40824104b9 --- /dev/null +++ b/net-im/tdlib-purple/Makefile @@ -0,0 +1,46 @@ +PORTNAME= tdlib-purple +DISTVERSIONPREFIX= v +DISTVERSION= 0.8.1 +CATEGORIES= net-im + +PATCH_SITES= https://github.com/ars3niy/tdlib-purple/commit/ +PATCHFILES+= 8c87b899ddbec32.patch:-p1 # https://github.com/ars3niy/tdlib-purple/pull/154 + +MAINTAINER= mi@aldan.algebra.com +COMMENT= Telegram plugin for libpurple, using tdlib +WWW= https://github.com/ars3niy/tdlib-purple + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libfmt.so:textproc/fmtlib \ + libtdapi.so:net-im/tdlib \ + librlottie.so:graphics/rlottie \ + libwebp.so:graphics/webp \ + libpng.so:graphics/png +TEST_LIB_DEPENDS=libgtest.so:devel/googletest + +USES= cmake localbase + +USE_GITHUB= yeah +GH_ACCOUNT= ars3niy + +OPTIONS_DEFINE= NLS TEST +OPTIONS_DEFAULT=NLS +OPTIONS_SUB= yes +TEST_DESC= Do not enable, tests are broken + +CMAKE_ON+= NoVoip # tgvoip is yet to be ported +CMAKE_ON+= NoBundledLottie # Using graphics/rlottie +NLS_CMAKE_OFF+= -DNoTranslations=1 + +EXTRACT_AFTER_ARGS=--exclude rlottie --exclude fmt + +.include + +.if ${PORT_OPTIONS:MTEST} +WARNING+= "Tests are stale at this time and are likely to fail to compile" +TEST_TARGET= tests +.endif + +.include diff --git a/net-im/tdlib-purple/distinfo b/net-im/tdlib-purple/distinfo new file mode 100644 index 000000000000..d8975e6dc44a --- /dev/null +++ b/net-im/tdlib-purple/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1702875649 +SHA256 (ars3niy-tdlib-purple-v0.8.1_GH0.tar.gz) = 8eb8b10c714368d7435d34ccda66a918e59c4cb4d2f49b6e16a246a78abd1a62 +SIZE (ars3niy-tdlib-purple-v0.8.1_GH0.tar.gz) = 776564 +SHA256 (8c87b899ddbec32.patch) = b6861f1129a8e17564c2f4abfc264fc95801ad22d00326c3c05d3003fd1b3832 +SIZE (8c87b899ddbec32.patch) = 11742 diff --git a/net-im/tdlib-purple/files/patch-CMakeLists.txt b/net-im/tdlib-purple/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..5b386e95225a --- /dev/null +++ b/net-im/tdlib-purple/files/patch-CMakeLists.txt @@ -0,0 +1,17 @@ +--- CMakeLists.txt 2021-12-17 04:50:38.000000000 -0500 ++++ CMakeLists.txt 2023-12-18 00:14:18.331831000 -0500 +@@ -69,4 +69,5 @@ + secret-chat.cpp + ) ++target_link_libraries(telegram-tdlib PRIVATE z) + + # libpurple uses the deprecated glib-type `GParameter` and the deprecated glib-macro `G_CONST_RETURN`, which +@@ -94,7 +95,5 @@ + + set(BUILD_SHARED_LIBS OFF) +-add_subdirectory(fmt) +-target_compile_options(fmt PRIVATE -fPIC) +-target_link_libraries(telegram-tdlib PRIVATE fmt::fmt) ++target_link_libraries(telegram-tdlib PRIVATE fmt) + + if (NOT NoLottie) diff --git a/net-im/tdlib-purple/files/patch-format.cpp b/net-im/tdlib-purple/files/patch-format.cpp new file mode 100644 index 000000000000..5335a650997d --- /dev/null +++ b/net-im/tdlib-purple/files/patch-format.cpp @@ -0,0 +1,8 @@ +--- format.cpp 2021-12-17 04:50:38.000000000 -0500 ++++ format.cpp 2023-12-18 01:10:41.084981000 -0500 +@@ -1,4 +1,4 @@ + #include "format.h" +-#include ++#include + + std::string formatMessage(const char *fmt, std::initializer_list args) diff --git a/net-im/tdlib-purple/files/patch-test-CMakeLists.txt b/net-im/tdlib-purple/files/patch-test-CMakeLists.txt new file mode 100644 index 000000000000..6beab3b3d537 --- /dev/null +++ b/net-im/tdlib-purple/files/patch-test-CMakeLists.txt @@ -0,0 +1,9 @@ +--- test/CMakeLists.txt 2021-12-17 04:50:38.000000000 -0500 ++++ test/CMakeLists.txt 2023-12-18 01:08:45.228855000 -0500 +@@ -41,5 +41,5 @@ + set_property(TARGET tests PROPERTY CXX_STANDARD 14) + target_include_directories(tests PRIVATE ${CMAKE_SOURCE_DIR}) +-target_link_libraries(tests PRIVATE gtest fmt::fmt Td::TdStatic ${GLIB_LIBRARIES}) ++target_link_libraries(tests PRIVATE gtest fmt Td::TdStatic ${GLIB_LIBRARIES}) + + if (DEFINED GTEST_PATH) diff --git a/net-im/tdlib-purple/pkg-descr b/net-im/tdlib-purple/pkg-descr new file mode 100644 index 000000000000..3fa3f92642ca --- /dev/null +++ b/net-im/tdlib-purple/pkg-descr @@ -0,0 +1,3 @@ +The new libpurple plugin for accessing Telegram. + +This is meant as a successor for telegram-purple. diff --git a/net-im/tdlib-purple/pkg-plist b/net-im/tdlib-purple/pkg-plist new file mode 100644 index 000000000000..69e3f9f0c9ae --- /dev/null +++ b/net-im/tdlib-purple/pkg-plist @@ -0,0 +1,9 @@ +lib/purple-2/libtelegram-tdlib.so +share/pixmaps/pidgin/protocols/16/telegram.png +share/pixmaps/pidgin/protocols/22/telegram.png +share/pixmaps/pidgin/protocols/48/telegram.png +share/metainfo/tdlib-purple.metainfo.xml +%%NLS%%share/locale/cs/LC_MESSAGES/tdlib-purple.mo +%%NLS%%share/locale/de/LC_MESSAGES/tdlib-purple.mo +%%NLS%%share/locale/pl/LC_MESSAGES/tdlib-purple.mo +%%NLS%%share/locale/sq/LC_MESSAGES/tdlib-purple.mo diff --git a/net-im/telegram-purple/Makefile b/net-im/telegram-purple/Makefile index 8af4962619d3..6dfe6e3d8981 100644 --- a/net-im/telegram-purple/Makefile +++ b/net-im/telegram-purple/Makefile @@ -1,43 +1,46 @@ PORTNAME= telegram-purple PORTVERSION= 1.4.7 DISTVERSIONPREFIX= v PORTREVISION= 1 CATEGORIES= net-im MAINTAINER= ports@FreeBSD.org COMMENT= Libpurple plugin for Telegram messenger WWW= https://github.com/majn/telegram-purple LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING +DEPRECATED= No longer works, migrate to net-im/tdlib-purple +EXPIRATION_DATE=2024-03-17 + BROKEN_armv6= fails to link: undefined reference to 'backtrace' BROKEN_powerpc64= fails to compile: Assertion failed: (get_int () == TLS_SCHEMA_V2), function parse_tlo_file, file generate.c, line 2832. BROKEN_sparc64= fails to compile: assertion fails LIB_DEPENDS= libgcrypt.so:security/libgcrypt \ libwebp.so:graphics/webp \ libpurple.so:net-im/libpurple \ libpng.so:graphics/png USES= gmake gnome pkgconfig localbase:ldflags USE_GNOME= glib20 GNU_CONFIGURE= yes OPTIONS_DEFINE= NLS OPTIONS_SUB= yes NLS_USES= gettext NLS_CONFIGURE_OFF= --disable-translation USE_GITHUB= yes GH_ACCOUNT= majn GH_PROJECT= tgl:tgl GH_TAGNAME?= cd7e3d7:tgl GH_SUBDIR= tgl:tgl post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/purple-2/telegram-purple.so @${RM} -rf ${STAGEDIR}/etc .include diff --git a/net-im/telegram-purple/files/patch-warnings b/net-im/telegram-purple/files/patch-warnings new file mode 100644 index 000000000000..553cd2522e33 --- /dev/null +++ b/net-im/telegram-purple/files/patch-warnings @@ -0,0 +1,40 @@ +--- tgl/generate.c 2020-04-27 07:49:17.000000000 -0400 ++++ tgl/generate.c 2022-05-22 17:18:25.245975000 -0400 +@@ -328,5 +328,4 @@ + struct tl_tree_type *t1; + struct tl_tree_array *t2; +- int y; + int L = strlen (cur_name); + char *fail = fun == 1 ? "return 0;" : fun == -1 ? "return;" : "return -1;"; +@@ -353,9 +352,9 @@ + + sprintf (cur_name + L, "->params[0]"); +- y = gen_uni_skip (t2->multiplicity, cur_name, vars, 0, fun); ++ gen_uni_skip (t2->multiplicity, cur_name, vars, 0, fun); + cur_name[L] = 0; + + sprintf (cur_name + L, "->params[1]"); +- y += gen_uni_skip (t2->args[0]->type, cur_name, vars, 0, fun); ++ gen_uni_skip (t2->args[0]->type, cur_name, vars, 0, fun); + cur_name[L] = 0; + return 0; +--- telegram-purple.c 2021-04-04 11:44:49.000000000 -0400 ++++ telegram-purple.c 2022-05-22 17:21:25.278082000 -0400 +@@ -801,4 +801,7 @@ + NULL, // add_buddy_with_invite +- NULL // add_buddies_with_invite ++ NULL, // add_buddies_with_invite ++ NULL, // get_cb_alias ++ NULL, // chat_can_receive_file ++ NULL, // chat_send_file + }; + +--- tgp-msg.c 2021-04-04 11:44:49.000000000 -0400 ++++ tgp-msg.c 2022-05-22 17:26:06.344212000 -0400 +@@ -389,5 +389,5 @@ + debug ("sending img='%s'", tmp); + tgl_do_send_document (TLS, to, tmp, NULL, 0, +- TGL_SEND_MSG_FLAG_DOCUMENT_AUTO | (tgl_get_peer_type (to) == TGL_PEER_CHANNEL) ? TGLMF_POST_AS_CHANNEL : 0, ++ TGL_SEND_MSG_FLAG_DOCUMENT_AUTO | ((tgl_get_peer_type (to) == TGL_PEER_CHANNEL) ? TGLMF_POST_AS_CHANNEL : 0), + send_inline_picture_done, NULL); + } else {