Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916715 - dev-libs/libdatachannel-0.19.4 - C/C++ WebRTC network library for media-video/obs-studio-30
Summary: dev-libs/libdatachannel-0.19.4 - C/C++ WebRTC network library for media-video...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Default Assignee for New Packages
URL: https://github.com/paullouisageneau/l...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-02 12:34 UTC by rogerroger
Modified: 2023-11-25 12:23 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
proposed ebuild (libdatachannel-0.19.3.ebuild,1.07 KB, application/vnd.gentoo.ebuild)
2023-11-02 14:59 UTC, Kostadin Shishmanov
Details
updated ebuild (libdatachannel-0.19.3.ebuild,988 bytes, text/plain)
2023-11-06 12:29 UTC, rogerroger
Details
proposed ebuild (libdatachannel-0.19.4.ebuild,1.01 KB, text/plain)
2023-11-25 12:22 UTC, rogerroger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rogerroger 2023-11-02 12:34:28 UTC
The upcoming obs-studio 30 release has libdatachannel as an optional dependency for WHIP streaming, which allows streaming with a latency of just a few hundred milliseconds.

Reproducible: Always
Comment 1 Kostadin Shishmanov 2023-11-02 14:59:22 UTC
Created attachment 873924 [details]
proposed ebuild

Here is an ebuild i made real quick, it definitely needs some adjustments. Also, libdatachannel requires plog which is currently in ::guru, and also I think it would be nice to package libjuice and use that instead of libnice.
Comment 2 Jonas Stein gentoo-dev 2023-11-05 21:31:36 UTC
Thank you for your contribution. I had a short look on the ebuild. 
Here a few ideas:

* Please test the ebuild with pkgcheck scan --net from dev-util/pkgcheck
* KEYWORDS need ~ for new ebuilds and after a version bump. Run ekeyword ~all YOUREBUILD
* We should improve the DESCRIPTION. I do not understand what the package does by reading the DESCRIPTION text.
Comment 3 rogerroger 2023-11-06 12:29:28 UTC
Created attachment 874152 [details]
updated ebuild

I've removed the whitespaces pkgcheck was complaining about and added the ~amd keyword. I don't really know what to do about the description as that's the description the project itself uses.

The current description is also the one Archlinux uses and the freebsd build uses this as the description:
"libdatachannel is a standalone implementation of WebRTC Data Channels, WebRTC Media Transport, and WebSockets in C++17 with C bindings for POSIX platforms (including GNU/Linux, Android, and Apple macOS) and Microsoft Windows.", but that's way over 80 characters long.

I can't think of a better way than this without making it any less ambiguous.
Comment 4 Chiitoo gentoo-dev 2023-11-22 17:04:17 UTC
Some quick thoughts:


* Copyright

At least I generally use the current year for new ebuilds (instead of the 
default starting at 1999).


* Description

Not sure about the content of the description, but it is indeed a tad lengthy.

I was thinking something like:

"Network library for real-time peer-to-peer data exchange"

but that just might be describing WebRTC in general.  :]

If I was writing this, I might go with something like:

"Implementation of WebRTC data exchange and signaling"

...or "data/media", though is media not also data?.


* SRC_URI

I think we usually have the GitHub archive URLs without the 'refs/tags' part, though I can't remember if there is any particular reason for it... it does seem to end up redirecting to something like that anyblue.

That is, this:

https://github.com/paullouisageneau/libdatachannel/archive/v0.19.3.tar.gz

works as well.


* Sorting

Could sort USE, dependency lists, and CMake variables alphabetically.


* CMake Args

Could 'usex' the 'mycmakeargs':

-DNO_EXAMPLES=$(usex !examples)

or so.
Comment 5 rogerroger 2023-11-25 12:22:44 UTC
Created attachment 875617 [details]
proposed ebuild

I applied your suggestions so far. I used the $(usex ...) syntax for mycmakeargs but not for the debug flag (changed it to the way games-action/prismlauncher does it).

I've also fixed the websocket flag to actually do something and added a media flag.

Per https://github.com/paullouisageneau/libdatachannel/blob/master/BUILDING.md :

If you only need Data Channels, the option NO_MEDIA allows to make the library lighter by removing media support. Similarly, NO_WEBSOCKET removes WebSocket support.

I've updated the version to reflect the newest release and made sure that it builds properly with all flags enabled and disabled (but only on amd64).