Created attachment 222255 [details] patch for the new port This is a port of https://github.com/desktop-app/tg_owt net-im/telegram-desktop now uses the tg_owt library from github.com/desktop-app/tg_owt (also created by the same developers). This library was downloaded and compiled together with telegram-desktop in the previous version. In this version, this library has its own sub-modules. Given its complexity, I think that it would be better to create a separate port for it. This library is kind of different from other libraries telegram-desktop use. Other libraries are mostly configured as sub-modules of the git repo, and they're included in the -full.tar.gz source tarball. tg_owt is different: telegram-desktop's own build script seems to just grab the latest version and build it. tg_owt has no release, and no tag. Thus, the port version is using the date. In the future, if it has named releases, we can use that.
I noticed a small problem; please don't commit this for now.
Created attachment 222256 [details] patch for the new port Patch updated. Now we use the install mechanism provided by the port, which installs 3k header files. It turns out that these files are needed to build telegram-desktop, so I just add them to pkg-plist.
Build log: https://raw.githubusercontent.com/HenryHu/ports/0c15698360d691c031b01f2ce9abd4ba3ea92b87/.logs/12.2-amd64/tg_owt-0.0.20210207.log
Created attachment 222264 [details] updated Makefile
Created attachment 222265 [details] updated distinfo
There is a small error in Makefile, and the distfiles seem to be rerolled, can you check the updated Makefile and distinfo? I am worried if the tar file from chromium.googlesource.com will be changed again. Also, I suggest we can name those distfile with more meaningful names, like libyuv-ad89006.tar.gz or put to a subdir named libyuv.
It looks ad89006.tar.gz is rerolled again, we need to have a way to get a deterministic distfile.
(In reply to Li-Wen Hsu from comment #7) So, any suggestion on how we can deal with this? I checked the libyuv port (graphics/libyuv), and it mentioned the same problem, and local distfiles were used. libvpx port seems to be getting it from github (I guess it's a clone/synced repo?). Should we also roll our own distfiles for these 2 libraries? The reason the checksum is changing seems to be the file metadata: the file creation/modification time seems to be set to current time, so it changes every time.
One idea is depending on github. libvpx already has an (official?) mirror at https://github.com/webmproject/libvpx/, and that's what libvpx port uses. libyuv does not have an official mirror; I can create one. As long as the git hash matches, it should show that the mirror is exactly the same as the original one. What do you think?
Created attachment 222313 [details] updated patch with github source only Now it's using github sources only: * libvpx from webmproject * libyuv from my clone I'll update my clone every time I update this port.
A commit references this bug: Author: lwhsu Date: Thu Feb 11 12:30:59 UTC 2021 New revision: 564937 URL: https://svnweb.freebsd.org/changeset/ports/564937 Log: Add net-im/tg_owt, webrtc library used by telegram-desktop PR: 253334 Submitted by: Henry Hu <henry.hu.sh@gmail.com> Changes: head/net-im/Makefile head/net-im/tg_owt/ head/net-im/tg_owt/Makefile head/net-im/tg_owt/distinfo head/net-im/tg_owt/files/ head/net-im/tg_owt/files/patch-CMakeLists.txt head/net-im/tg_owt/files/patch-cmake_external.cmake head/net-im/tg_owt/files/patch-cmake_libevent.cmake head/net-im/tg_owt/files/patch-cmake_libyuv.cmake head/net-im/tg_owt/files/patch-src_rtc__base_byte__order.h head/net-im/tg_owt/files/patch-src_rtc__base_ip__address.cc head/net-im/tg_owt/files/patch-src_rtc__base_physical__socket__server.cc head/net-im/tg_owt/files/patch-src_rtc__base_physical__socket__server.h head/net-im/tg_owt/files/patch-src_rtc__base_platform__thread__types.cc head/net-im/tg_owt/pkg-descr head/net-im/tg_owt/pkg-plist