mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-30 10:38:37 +00:00
net-im/tdlib-purple: add replacement for telegram-purple.
Deprecate the latter.
This commit is contained in:
parent
7e5dafecce
commit
e07c60d9f5
@ -142,6 +142,7 @@
|
||||
SUBDIR += sshout
|
||||
SUBDIR += talkatu
|
||||
SUBDIR += tdlib
|
||||
SUBDIR += tdlib-purple
|
||||
SUBDIR += teamwords
|
||||
SUBDIR += telegram-cli
|
||||
SUBDIR += telegram-desktop
|
||||
|
46
net-im/tdlib-purple/Makefile
Normal file
46
net-im/tdlib-purple/Makefile
Normal file
@ -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 <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MTEST}
|
||||
WARNING+= "Tests are stale at this time and are likely to fail to compile"
|
||||
TEST_TARGET= tests
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
5
net-im/tdlib-purple/distinfo
Normal file
5
net-im/tdlib-purple/distinfo
Normal file
@ -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
|
17
net-im/tdlib-purple/files/patch-CMakeLists.txt
Normal file
17
net-im/tdlib-purple/files/patch-CMakeLists.txt
Normal file
@ -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)
|
8
net-im/tdlib-purple/files/patch-format.cpp
Normal file
8
net-im/tdlib-purple/files/patch-format.cpp
Normal file
@ -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 <fmt/format.h>
|
||||
+#include <fmt/args.h>
|
||||
|
||||
std::string formatMessage(const char *fmt, std::initializer_list<std::string> args)
|
9
net-im/tdlib-purple/files/patch-test-CMakeLists.txt
Normal file
9
net-im/tdlib-purple/files/patch-test-CMakeLists.txt
Normal file
@ -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)
|
3
net-im/tdlib-purple/pkg-descr
Normal file
3
net-im/tdlib-purple/pkg-descr
Normal file
@ -0,0 +1,3 @@
|
||||
The new libpurple plugin for accessing Telegram.
|
||||
|
||||
This is meant as a successor for telegram-purple.
|
9
net-im/tdlib-purple/pkg-plist
Normal file
9
net-im/tdlib-purple/pkg-plist
Normal file
@ -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
|
@ -11,6 +11,9 @@ 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
|
||||
|
40
net-im/telegram-purple/files/patch-warnings
Normal file
40
net-im/telegram-purple/files/patch-warnings
Normal file
@ -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 {
|
Loading…
Reference in New Issue
Block a user