Bug 260048 - [NEW PORT] net-im/purple-tdlib: New libpurple plugin for Telegram
Summary: [NEW PORT] net-im/purple-tdlib: New libpurple plugin for Telegram
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Daniel Engberg
URL: https://github.com/ars3niy/tdlib-purple
Keywords: needs-patch
Depends on: 260380
  Show dependency treegraph
Reported: 2021-11-25 20:55 UTC by Jose G. Juanino
Modified: 2021-12-13 11:36 UTC (History)
2 users (show)

See Also:
jjuanino: maintainer-feedback+

new ports: net-im/tdlib-purple and net-im/tdlib16 (6.79 KB, patch)
2021-11-25 20:55 UTC, Jose G. Juanino
no flags Details | Diff
remove useless test (6.39 KB, patch)
2021-11-26 18:59 UTC, Jose G. Juanino
jjuanino: maintainer-approval+
Details | Diff
update tdlib to 1.7.9 (1.67 KB, patch)
2021-12-09 21:09 UTC, Marko Turk
no flags Details | Diff
0.8.0 version of tdlib-purble, and update tdlib to 1.7.9 (4.74 KB, patch)
2021-12-10 13:12 UTC, Jose G. Juanino
jjuanino: maintainer-approval+
Details | Diff
Remove runtime dependency with tdlib (4.68 KB, patch)
2021-12-10 22:25 UTC, Jose G. Juanino
jjuanino: maintainer-approval+
Details | Diff
remove the net-im/tdlib chunk (3.01 KB, patch)
2021-12-13 08:44 UTC, Jose G. Juanino
jjuanino: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jose G. Juanino 2021-11-25 20:55:21 UTC
Created attachment 229728 [details]
new ports: net-im/tdlib-purple and net-im/tdlib16

Hi, I submit a patch to add two ports to support telegram in pidgin:

- net-im/purple-tdlib
- net-im/tdlib16

The motivation for these new ports is that net-im/purple-telegram is upstream abandoned in favor of purple-tdlib (see https://github.com/majn/telegram-purple/commit/9fc118520c713bb4dca303f9770649c4e5f7986d) 

purple-tdlib depens on net-im/tdlib to work properly. Sadly, it needs *exactly* 1.6 version, but tdlib from current ports tree has 1.7.8 version, and purple-tdlib does not build with that version. Indeed, upstream mentions that version dependency specifically.

Notice that VoIP is not supported for this port, but I works very well in text only mode, I use it every day. Patches and suggestions to integrate VoIP are welcome.

Poudriere builds have been successfully done in the following releases-archs:

- 13.0-RELEASE amd64
- 13.0-RELEASE i386
- 12.2-RELEASE amd64
- 12.2-RELEASE i386

Ports have passed also portfmt, portsclippy and portlist.

Comment 1 Jose G. Juanino 2021-11-26 18:59:10 UTC
Created attachment 229747 [details]
remove useless test
Comment 2 Marko Turk 2021-12-09 21:09:38 UTC
Created attachment 230000 [details]
update tdlib to 1.7.9
Comment 3 Marko Turk 2021-12-09 21:10:43 UTC

there are some issues with telegram and tdlib before 1.7.9 version.

But the latest tdlib-purple has support for tdlib 1.7.9. Even version 0.8.0 supports tdlib 1.7.

Can you update this port to use the latest tdlib-purple from github?

Then we just need to update tdlib in our ports to 1.7.9 (patch attached).

I'm using latest tdlib-purple + tdlib 1.7.9 on 12-STABLE and it works ok (using bitlbee).

Comment 4 Jose G. Juanino 2021-12-10 13:01:56 UTC
(In reply to Marko Turk from comment #3)

Hi Marko, thank you for report the dependency change. That makes things easier.

I am going to upload a new patch to consider the new scenario, including your patch to update the version of net-im/tdlib port, from 1.7.8 to 1.7.9.

Comment 5 Jose G. Juanino 2021-12-10 13:12:29 UTC
Created attachment 230020 [details]
0.8.0 version of tdlib-purble, and update tdlib to 1.7.9

Daniel Engberg:

I submit a new patch to cover the new scenario, where no dependency on 1.6 version of tdlib is required.

Content summary:

- new net-im/tdlib-purple port (0.8.0 version)
- update net-im/tdlib from 1.7.8 to 1.7.9
- new CONFLICT_INSTALL in net-im/telegram-purple, as both telegram-purple and tdlib-purple may not coexist.

Notice that tdlib-purple requires tdlib>=1.7.9 in both build_depends and run_depends.

The patch can be applied on the c46943ed9d69 commit of ports tree (as of Fri Dec 10 12:05:15 2021).

Poudriere passed in 13.0-RELEASE|12.2-RELEASE amd64|i386

Thanks to Marko Turk for reporting the last dependency change in upstream.

Comment 6 Marko Turk 2021-12-10 15:41:59 UTC

I think tdlib should not be a RUN_DEPENDS for tdlib-purple, tdlib is only needed during build.

Comment 7 Jose G. Juanino 2021-12-10 22:24:03 UTC
(In reply to Marko Turk from comment #6)

Marko, you are right, the runtime dependency with tdlib is not required, only the buildtime one. I submit again the patch with that fix. Thanks again for noticing that issue, regards.
Comment 8 Jose G. Juanino 2021-12-10 22:25:08 UTC
Created attachment 230034 [details]
Remove runtime dependency with tdlib
Comment 9 Daniel Engberg freebsd_committer 2021-12-12 17:47:03 UTC
Split these changes into two PRs (and patches) one that introduces purple-tdlib and another (new PR) that bumps net-im/tdlib
Comment 10 Jose G. Juanino 2021-12-13 08:44:48 UTC
Created attachment 230074 [details]
remove the net-im/tdlib chunk

Hi, I have split the patch as you suggests, and a new PR 260380 has been created. Regards
Comment 11 Jose G. Juanino 2021-12-13 11:33:07 UTC
net-im/tdlib 1.7.10 version has been committed in ports tree a few minutes ago, but sadly, net-im/tdlib 1.7.10 version breaks build of net-im/tdlib-purple 0.8.0: see


Therefore, we have to await until this issue be fixed by upstream.