pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
librist: import 0.2.18
Module Name: pkgsrc-wip
Committed By: Bartosz Kuzma <bartosz.kuzma%gmail.com@localhost>
Pushed By: bartosz.kuzma
Date: Sat Jul 18 15:07:30 2026 +0200
Changeset: 11d01068504551defdd5bb790373cb771e3329e0
Added Files:
librist/DESCR
librist/Makefile
librist/PLIST
librist/TODO
librist/buildlink3.mk
librist/distinfo
librist/files/tun_netbsd.c
librist/patches/patch-meson.build
librist/patches/patch-src_udpsocket.c
Log Message:
librist: import 0.2.18
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=11d01068504551defdd5bb790373cb771e3329e0
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
librist/DESCR | 3 ++
librist/Makefile | 30 ++++++++++++++++
librist/PLIST | 28 +++++++++++++++
librist/TODO | 1 +
librist/buildlink3.mk | 14 ++++++++
librist/distinfo | 7 ++++
librist/files/tun_netbsd.c | 68 +++++++++++++++++++++++++++++++++++
librist/patches/patch-meson.build | 17 +++++++++
librist/patches/patch-src_udpsocket.c | 18 ++++++++++
9 files changed, 186 insertions(+)
diffs:
diff --git a/librist/DESCR b/librist/DESCR
new file mode 100644
index 0000000000..4ec7ff4635
--- /dev/null
+++ b/librist/DESCR
@@ -0,0 +1,3 @@
+Library that can be used to easily add the RIST protocol to your application.
+This code was written to comply with the Video Services Forum (VSF)
+Technical Recommendations TR-06-1, TR-06-2, and TR-06-3.
diff --git a/librist/Makefile b/librist/Makefile
new file mode 100644
index 0000000000..04bf0ada07
--- /dev/null
+++ b/librist/Makefile
@@ -0,0 +1,30 @@
+# $NetBSD$
+
+DISTNAME= librist-v0.2.18
+PKGNAME= ${DISTNAME:S,-v,-,}
+CATEGORIES= net
+MASTER_SITES= https://code.videolan.org/rist/librist/-/archive/v0.2.18/
+
+MAINTAINER= bartosz.kuzma%gmail.com@localhost
+HOMEPAGE= https://code.videolan.org/rist/librist/-/archive/v0.2.18/
+COMMENT= Implementation of the RIST protocol
+LICENSE= 2-clause-bsd
+
+.include "../../devel/meson/build.mk"
+
+USE_TOOLS= pkg-config
+
+CFLAGS+= -Wno-overlength-strings
+
+PKGCONFIG_OVERRIDE+= output/meson-private/librist.pc
+PKGCONFIG_OVERRIDE_STAGE= post-build
+
+post-extract:
+ ${CP} ${FILESDIR}/tun_netbsd.c ${WRKSRC}/src
+
+.include "../../archivers/lz4/buildlink3.mk"
+.include "../../devel/cmocka/buildlink3.mk"
+.include "../../textproc/cJSON/buildlink3.mk"
+.include "../../www/libmicrohttpd/buildlink3.mk"
+.include "../../wip/mbedtls3/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/librist/PLIST b/librist/PLIST
new file mode 100644
index 0000000000..65f5822f10
--- /dev/null
+++ b/librist/PLIST
@@ -0,0 +1,28 @@
+@comment $NetBSD$
+bin/rist2rist
+bin/ristreceiver
+bin/ristsender
+bin/ristsrppasswd
+bin/udp2udp
+include/librist/common.h
+include/librist/headers.h
+include/librist/librist.h
+include/librist/librist_config.h
+include/librist/librist_srp.h
+include/librist/logging.h
+include/librist/oob.h
+include/librist/opt.h
+include/librist/peer.h
+include/librist/receiver.h
+include/librist/sender.h
+include/librist/stats.h
+include/librist/transport.h
+include/librist/tun.h
+include/librist/tunnel.h
+include/librist/udpsocket.h
+include/librist/urlparam.h
+include/librist/version.h
+lib/librist.so
+lib/librist.so.4
+lib/librist.so.4.11.0
+lib/pkgconfig/librist.pc
diff --git a/librist/TODO b/librist/TODO
new file mode 100644
index 0000000000..79db13817c
--- /dev/null
+++ b/librist/TODO
@@ -0,0 +1 @@
+Implementation of tun_netbsd.c
diff --git a/librist/buildlink3.mk b/librist/buildlink3.mk
new file mode 100644
index 0000000000..e1f8b26b30
--- /dev/null
+++ b/librist/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD$
+
+BUILDLINK_TREE+= librist
+
+.if !defined(LIBRIST_BUILDLINK3_MK)
+LIBRIST_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.librist+= librist>=0.2.18
+BUILDLINK_ABI_DEPENDS.librist+= librist>=0.2.18
+BUILDLINK_PKGSRCDIR.librist?= ../../wip/librist
+
+.endif # LIBRIST_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -librist
diff --git a/librist/distinfo b/librist/distinfo
new file mode 100644
index 0000000000..a876e4a7a7
--- /dev/null
+++ b/librist/distinfo
@@ -0,0 +1,7 @@
+$NetBSD$
+
+BLAKE2s (librist-v0.2.18.tar.gz) = 693988ac9c99f6b38e8e21864cc81212ce00f449e626309ed0b59761948dd7df
+SHA512 (librist-v0.2.18.tar.gz) = f561e48bb0949e702ee1765f9998fdce191dfda2011855b089ae0f3552618bb5599b1b9a1c73355d1d1e8fffd1100eb8e64365d140d1c5958127738536c72704
+Size (librist-v0.2.18.tar.gz) = 3420093 bytes
+SHA1 (patch-meson.build) = 77db82d2c82f22f65abae49fcbcc2011a672543c
+SHA1 (patch-src_udpsocket.c) = 7aa97d4327f1c38a13d21a9b123f49f31d834573
diff --git a/librist/files/tun_netbsd.c b/librist/files/tun_netbsd.c
new file mode 100644
index 0000000000..75d43b5b26
--- /dev/null
+++ b/librist/files/tun_netbsd.c
@@ -0,0 +1,68 @@
+/* librist. Copyright © 2026 SipRadius LLC. All right reserved.
+ * Author: Sergio Ammirata, Ph.D. <sergio%ammirata.net@localhost>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+/*
+ * NetBSD TUN implementation
+ */
+
+#ifdef __NetBSD__
+
+#include "librist/tun.h"
+#include <stdio.h>
+
+int rist_tun_open(const char *requested_name, char *actual_name, size_t name_len)
+{
+ (void)requested_name;
+ (void)actual_name;
+ (void)name_len;
+ fprintf(stderr, "librist: NetBSD TUN support not yet implemented\n");
+ return -1;
+}
+
+void rist_tun_close(int fd)
+{
+ (void)fd;
+}
+
+int rist_tun_read(int fd, uint8_t *buf, size_t len)
+{
+ (void)fd;
+ (void)buf;
+ (void)len;
+ return -1;
+}
+
+int rist_tun_write(int fd, const uint8_t *buf, size_t len)
+{
+ (void)fd;
+ (void)buf;
+ (void)len;
+ return -1;
+}
+
+int rist_tun_set_ip(const char *dev, const char *ip, int prefix_len)
+{
+ (void)dev;
+ (void)ip;
+ (void)prefix_len;
+ fprintf(stderr, "librist: NetBSD IP config not yet implemented\n");
+ return -1;
+}
+
+int rist_tun_set_mtu(const char *dev, int mtu)
+{
+ (void)dev;
+ (void)mtu;
+ return -1;
+}
+
+int rist_tun_bring_up(const char *dev)
+{
+ (void)dev;
+ return -1;
+}
+
+#endif /* __NetBSD__ */
diff --git a/librist/patches/patch-meson.build b/librist/patches/patch-meson.build
new file mode 100644
index 0000000000..d4553884d0
--- /dev/null
+++ b/librist/patches/patch-meson.build
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Add NetBSD
+
+--- meson.build.orig 2026-07-16 13:46:37.557395415 +0000
++++ meson.build
+@@ -154,6 +154,10 @@ void test(void) {
+ platform_files += 'compat/android/ifaddrs.c'
+ inc += include_directories('compat/android')
+ endif
++ elif host_machine.system() == 'netbsd'
++ platform_files += 'src/tun_netbsd.c'
++ test_args += '-D_NETBSD_SOURCE'
++ add_project_arguments('-D_NETBSD_SOURCE', language: 'c')
+ elif host_machine.system() == 'darwin'
+ platform_files += 'src/tun_darwin.c'
+ test_args += '-D_DARWIN_C_SOURCE'
diff --git a/librist/patches/patch-src_udpsocket.c b/librist/patches/patch-src_udpsocket.c
new file mode 100644
index 0000000000..e508461f6e
--- /dev/null
+++ b/librist/patches/patch-src_udpsocket.c
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Under NetBSD setsocopt for IP_MULTICAST_IF wants in_addr
+
+--- src/udpsocket.c.orig 2026-07-16 13:19:57.954770500 +0000
++++ src/udpsocket.c
+@@ -361,7 +361,11 @@ int udpsocket_set_mcast_iface(int sd, co
+ if (family == AF_INET6) {
+ return setsockopt(sd, SOL_IPV6, IPV6_MULTICAST_IF, &scope, sizeof(scope));
+ } else {
++#ifdef __NetBSD__
++ struct in_addr req = { .s_addr = scope };
++#else
+ struct ip_mreqn req = { .imr_ifindex = scope };
++#endif
+ return setsockopt(sd, SOL_IP, IP_MULTICAST_IF, &req, sizeof(req));
+ }
+ return -1;
Home |
Main Index |
Thread Index |
Old Index