Bug 217019 - [new port] net-im/linux-telegram-desktop: telegram desktop client
Summary: [new port] net-im/linux-telegram-desktop: telegram desktop client
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: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-12 05:13 UTC by Henry Hu
Modified: 2017-06-13 19:30 UTC (History)
1 user (show)

See Also:


Attachments
new port shar file (2.82 KB, text/plain)
2017-02-12 05:13 UTC, Henry Hu
no flags Details
poudriere log (12.80 KB, text/plain)
2017-02-12 05:14 UTC, Henry Hu
no flags Details
new port shar file (2.82 KB, text/plain)
2017-02-12 05:19 UTC, Henry Hu
no flags Details
shar for v1.0.14 (2.82 KB, text/plain)
2017-02-25 22:30 UTC, Henry Hu
no flags Details
update to 1.0.26 (2.82 KB, patch)
2017-03-31 02:36 UTC, Henry Hu
no flags Details | Diff
update to 1.0.29 (2.82 KB, patch)
2017-04-06 15:40 UTC, Henry Hu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Hu 2017-02-12 05:13:38 UTC
Created attachment 179893 [details]
new port shar file

Telegram desktop client is the official desktop client for Telegram.
This is the Linux 32bit version.

Telegram desktop is actually open sourced. However, to build it, the process is fairly complex. You need to build a customized, patched Qt, some other patched libraries, and then build telegram desktop which links with them statically. Someday I may create a native port for it. At least this Linux version works well for me in the meanwhile.

The license is GPLv3, but I'm not sure if you can distribute it as a package, so RESTRICTED is specified.

linux-c6 is not enough for this port, the glibc version is too low.

Telegram loads libraries dynamically, like alsa, pulse, gtk2, and other ones. This makes it impossible to get the dependencies directly from ldd. This dependency list is obtained by analyzing the loaded libraries with the app running.
Comment 1 Henry Hu 2017-02-12 05:14:19 UTC
Created attachment 179894 [details]
poudriere log
Comment 2 Henry Hu 2017-02-12 05:19:01 UTC
Created attachment 179895 [details]
new port shar file

Forget to remove cpe from USES.
Comment 3 Henry Hu 2017-02-25 22:30:47 UTC
Created attachment 180299 [details]
shar for v1.0.14

Meanwhile, the app has updated to 1.0.14 (after updated to 1.0.13). Port updated.
Comment 4 Henry Hu 2017-03-31 02:36:05 UTC
Created attachment 181336 [details]
update to 1.0.26

Update to 1.0.26
Comment 5 Henry Hu 2017-04-06 15:40:44 UTC
Created attachment 181547 [details]
update to 1.0.29

Okay, telegram updated again. This is for 1.0.29.
Comment 6 Alexey Dokuchaev freebsd_committer freebsd_triage 2017-06-13 05:25:37 UTC
This submission requires a few changes before it can be committed, I'll handle it.
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-06-13 19:16:44 UTC
A commit references this bug:

Author: danfe
Date: Tue Jun 13 19:15:43 UTC 2017
New revision: 443529
URL: https://svnweb.freebsd.org/changeset/ports/443529

Log:
  Linux version of the official desktop client for Telegram, a cloud-based
  messenger with a focus on security and speed.

  WWW: https://desktop.telegram.org/

  PR:		217019 (modified)
  Submitted by:	Henry Hu

Changes:
  head/net-im/Makefile
  head/net-im/linux-telegram-desktop/
  head/net-im/linux-telegram-desktop/Makefile
  head/net-im/linux-telegram-desktop/distinfo
  head/net-im/linux-telegram-desktop/files/
  head/net-im/linux-telegram-desktop/files/telegram-desktop.sh.in
  head/net-im/linux-telegram-desktop/pkg-descr
Comment 8 Alexey Dokuchaev freebsd_committer freebsd_triage 2017-06-13 19:30:24 UTC
Committed as ports r443529 with a number of modifications:

- Updated to version 1.1.7 and mirrored distfile so the port does not get broken when previous version(s) suddenly disappear from the official CDN
- Do not set RESTRICTED: lots of GNU/Linux distributions offer similar package (https://pkgs.org/download/telegram-desktop) so I believe it should be OK
- Provided better COMMENT and more elaborate port description text
- Added DESKTOP_ENTRIES (alas, no icon for the time being)
- Renamed s/tdesktop/telegram-desktop/ to avoid potential clash with some other similarly named software
- Minor whitespace and style nits in the Makefile

P.S.  I was also thinking about porting the native client.  If it does indeed load libraries via dlopen(), it should be possible to write thin swappers over modified Qt components to avoid local rebuild and static linking.  I might get to this one day, but as you say, this Linux version works fine as it is.  Thank you Henry!