From 0a88fced786bc82bbb2f2c4c66881b2106b35d00 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Tue, 9 Aug 2022 15:59:33 -0400 Subject: [PATCH] farstream: drop unused python-devel in *depends. Also (partially) fix tests --- .../patches/fix_tests_with_gupnp_1.2.patch | 140 ++++++++++++++++++ srcpkgs/farstream/template | 7 +- 2 files changed, 144 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/farstream/patches/fix_tests_with_gupnp_1.2.patch diff --git a/srcpkgs/farstream/patches/fix_tests_with_gupnp_1.2.patch b/srcpkgs/farstream/patches/fix_tests_with_gupnp_1.2.patch new file mode 100644 index 000000000000..f46170ab2650 --- /dev/null +++ b/srcpkgs/farstream/patches/fix_tests_with_gupnp_1.2.patch @@ -0,0 +1,140 @@ +From e70dcd0a9f89efbdaa011c20737ad550635ea580 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= +Date: Tue, 20 Oct 2020 19:51:22 -0400 +Subject: [PATCH] rawudp-upnp test: Also build against new GUPnP 1.2 library if + present + +Update the configure test to match +--- + configure.ac | 17 +++++++++++++++++ + tests/check/Makefile.am | 7 +++---- + tests/check/transmitter/rawudp-upnp.c | 16 ++++++++++++++-- + tests/check/transmitter/rawudp.c | 4 ++-- + 4 files changed, 36 insertions(+), 8 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 03afc96b..1efed132 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -370,8 +370,25 @@ fi + + if test "x$HAVE_GUPNP" = "xyes"; then + AC_DEFINE(HAVE_GUPNP,,[Have the GUPnP IGD library]) ++ ++ PKG_CHECK_MODULES(GUPNP_CORE, [ gupnp-1.2 ], ++ [ HAVE_GUPNP_CORE_12=yes ], ++ [ HAVE_GUPNP_CORE_12=no ++ PKG_CHECK_MODULES(GUPNP_CORE, [ gupnp-1.0 ], ++ [ HAVE_GUPNP_CORE_10=yes ], ++ [ HAVE_GUPNP_CORE_10=no ]) ++ ]) ++ ++ if test "x$HAVE_GUPNP_CORE_10" = "xyes"; then ++ AC_DEFINE(HAVE_GUPNP_CORE_10,,[Have the GUPnP 1.0 library]) ++ fi ++ ++ if test "x$HAVE_GUPNP_CORE_12" = "xyes"; then ++ AC_DEFINE(HAVE_GUPNP_CORE_12,,[Have the GUPnP 1.2 library]) ++ fi + fi + ++ + dnl build static plugins or not + AC_MSG_CHECKING([whether to build static plugins or not]) + AC_ARG_ENABLE( +diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am +index d50fc264..d21687d7 100644 +--- a/tests/check/Makefile.am ++++ b/tests/check/Makefile.am +@@ -76,9 +76,9 @@ base_fscodec_SOURCES = \ + + + transmitter_rawudp_CFLAGS = $(AM_CFLAGS) \ +- $(GUPNP_CFLAGS) $(GIO_CFLAGS) $(NICE_CFLAGS) ++ $(GUPNP_CORE_CFLAGS) $(GIO_CFLAGS) $(NICE_CFLAGS) + transmitter_rawudp_LDADD = $(LDADD) \ +- $(GUPNP_LIBS) \ ++ $(GUPNP_CORE_LIBS) \ + $(GIO_LIBS) \ + $(NICE_LIBS) + transmitter_rawudp_SOURCES = \ +@@ -113,9 +113,8 @@ transmitter_nice_SOURCES = \ + transmitter_nice_LDADD = $(LDADD) $(GST_BASE_LIBS) + + +-transmitter_shm_CFLAGS = $(AM_CFLAGS) $(GUPNP_CFLAGS) $(NICE_CFLAGS) ++transmitter_shm_CFLAGS = $(AM_CFLAGS) $(NICE_CFLAGS) + transmitter_shm_LDADD = $(LDADD) \ +- $(GUPNP_LIBS) \ + $(NICE_LIBS) + transmitter_shm_SOURCES = \ + check-threadsafe.h \ +diff --git a/tests/check/transmitter/rawudp-upnp.c b/tests/check/transmitter/rawudp-upnp.c +index 4818cd28..9ccf85d8 100644 +--- a/tests/check/transmitter/rawudp-upnp.c ++++ b/tests/check/transmitter/rawudp-upnp.c +@@ -37,7 +37,7 @@ get_vars (gboolean *out_got_address, + } + + +-#ifdef HAVE_GUPNP ++#if defined(HAVE_GUPNP_CORE_10) || defined(HAVE_GUPNP_CORE_12) + + #include + +@@ -126,8 +126,14 @@ start_upnp_server (void) + GUPnPDeviceInfo *subdev1; + GUPnPDeviceInfo *subdev2; + const gchar *upnp_xml_path; ++ GError *gerr = NULL; + +- context = gupnp_context_new (NULL, NULL, 0, NULL); ++#ifdef HAVE_GUPNP_CORE_12 ++ context = gupnp_context_new (NULL, 0, &gerr); ++#else ++ context = gupnp_context_new (NULL, NULL, 0, &gerr); ++#endif ++ g_assert_no_error (gerr); + ts_fail_if (context == NULL, "Can't get gupnp context"); + + if (g_getenv ("UPNP_XML_PATH")) +@@ -137,8 +143,14 @@ start_upnp_server (void) + + gupnp_context_host_path (context, upnp_xml_path, ""); + ++#ifdef HAVE_GUPNP_CORE_12 ++ dev = gupnp_root_device_new (context, "InternetGatewayDevice.xml", ++ upnp_xml_path, &gerr); ++ g_assert_no_error (gerr); ++#else + dev = gupnp_root_device_new (context, "InternetGatewayDevice.xml", + upnp_xml_path); ++#endif + ts_fail_if (dev == NULL, "could not get root dev"); + + subdev1 = gupnp_device_info_get_device (GUPNP_DEVICE_INFO (dev), +diff --git a/tests/check/transmitter/rawudp.c b/tests/check/transmitter/rawudp.c +index e1936ac0..d803f347 100644 +--- a/tests/check/transmitter/rawudp.c ++++ b/tests/check/transmitter/rawudp.c +@@ -637,7 +637,7 @@ GST_START_TEST (test_rawudptransmitter_stop_stream) + } + GST_END_TEST; + +-#ifdef HAVE_GUPNP ++#if defined(HAVE_GUPNP_CORE_10) || defined (HAVE_GUPNP_CORE_12) + + GST_START_TEST (test_rawudptransmitter_run_upnp_discovery) + { +@@ -967,7 +967,7 @@ rawudptransmitter_suite (void) + tcase_add_test (tc_chain, test_rawudptransmitter_stop_stream); + suite_add_tcase (s, tc_chain); + +-#ifdef HAVE_GUPNP ++#if defined(HAVE_GUPNP_CORE_10) || defined (HAVE_GUPNP_CORE_12) + if (g_getenv ("UPNP")) { + gchar *multicast_addr; + +-- +GitLab + diff --git a/srcpkgs/farstream/template b/srcpkgs/farstream/template index 6162c2966a56..d19af363a087 100644 --- a/srcpkgs/farstream/template +++ b/srcpkgs/farstream/template @@ -1,18 +1,19 @@ # Template file for 'farstream' pkgname=farstream version=0.2.9 -revision=1 +revision=2 build_style=gnu-configure build_helper="gir" configure_args="--disable-valgrind --disable-static $(vopt_enable gir introspection)" -hostmakedepends="automake libtool gettext pkg-config intltool python-devel +hostmakedepends="automake libtool gettext pkg-config intltool glib-devel $(vopt_if gir gobject-introspection)" -makedepends="python-devel gupnp-igd-devel libnice-devel gst-plugins-base1-devel" +makedepends="gupnp-igd-devel libnice-devel gst-plugins-base1-devel" depends="gst-plugins-good1 gst-plugins-bad1" short_desc="GStreamer modules and libraries for videoconferencing" maintainer="Orphaned " license="LGPL-2.1-or-later" homepage="http://www.freedesktop.org/wiki/Software/Farstream" +changelog="https://gitlab.freedesktop.org/farstream/farstream/-/raw/master/NEWS" distfiles="${FREEDESKTOP_SITE}/farstream/releases/$pkgname/$pkgname-$version.tar.gz" checksum=cb7d112433cf7c2e37a8ec918fb24f0ea5cb293cfa1002488e431de26482f47b