Hello ports@,

    $ pkg_info td
    Information for inst:td-1.6.9

    Comment:
    cross-platform library for building Telegram clients

    Description:
    TDLib (Telegram Database Library) is a cross-platform, fully
    functional Telegram client that can be easily used from almost any
    programming language.

    Maintainer: Omar Polo <o...@omarpolo.com>

    WWW: https://github.com/tdlib/td

I've been using this for about a year, initially only as a C++ library
in some test projects of mine, and then in the last two months as a
dependency of telega.el[0], a telegram client for Emacs.  I've seen a
recent post on r/OpenBSD so here's the port since it could be useful to
others too.

td provides two set of libraries: some C++ statically-liked only
libraries (libtd{actor,api,client,...}) and a library, td_json.so, that
exposes a JSON api.  I'm including both set of libraries, as the C++
libraries can be useful (to me at least), even though I'm expecting the
majority of clients to use the json library only.  We can drop the C++
libraries eventually if they aren't considered useful.

The code is released under the boost software license 1.0.  Different
ports uses different comments for it, like "Boost", "Boost license",
"boost software license" and even "MIT-like (Boost)".  I went with
"Boost SL 1.0", like math/mlpac does.

A note regarding the name: based on a quick look on repology, it seems
that the majority of distro package td as "tdlib" (see td[1] vs
tdlib[2]).  I've kept td, as it was the name that I picked first when
making the port, and also because it's the name of the upstream
repository, but we can go with tdlib if we want consistency with others
systems.

A note about the versioning: upstream only tags "major" releases, like
1.6 and 1.7, as they consider "minor" releases (i.e. 1.6.9) development
versions, and thus they only bump the version in their CMakeList.txt for
minor releases.  I'm going with 1.6.9 since it seems pointless to me
providing a stable version of a library that cannot be used by its
consumer (telega.el requires 1.6.9, and the other clients mentioned in
the reddit post works with the library built from master).  It doesn't
seem a bad idea to me, please correct me if I'm wrong.  (also, I'm
providing an explicit DISTNAME since with the auto-generated one from
GH_COMMIT fails to download the tarball)

A final note: upstream provides a script to split the sources to limit
the memory usage when building.  I successfully built the library on a
decade old i686 with 2 gigs of ram without hitting the swap (while also
running X), so such workaround doesn't seem to be needed, but I left a
comment in the Makefile anyway just in case.  (splitting the sources
will require an additional build-only dep on php.)

Built and tested on amd64, successfully built on i386.

    ; make test
    ===>  Regression tests for td-1.6.9
    [0/1] ...[snip]
    Test project /usr/ports/pobj/td-1.6.9/build-amd64
        Start 1: run_all_tests
    1/1 Test #1: run_all_tests ....................   Passed  618.16 sec

    100% tests passed, 0 tests failed out of 1

    Total Test time (real) = 618.17 sec

OK? Comments?

[0]: https://github.com/zevlg/telega.el
[1]: https://repology.org/project/td/versions
[2]: https://repology.org/project/tdlib/versions

Attachment: td.tar.gz
Description: Binary data

Reply via email to