Merge pull request #142724 from jtojnar/gupnp

gupnp/dleyna updates
This commit is contained in:
Jan Tojnar 2021-10-24 21:02:14 +02:00 committed by GitHub
commit 95c14e3fec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 294 additions and 332 deletions

View file

@ -1,24 +1,40 @@
{ lib, stdenv, autoreconfHook, pkg-config, fetchFromGitHub, dbus, dleyna-core, glib }:
{ stdenv
, lib
, meson
, ninja
, pkg-config
, fetchFromGitHub
, dleyna-core
, glib
}:
stdenv.mkDerivation rec {
pname = "dleyna-connector-dbus";
version = "0.3.0";
version = "0.4.1";
src = fetchFromGitHub {
owner = "01org";
owner = "phako";
repo = pname;
rev = version;
sha256 = "0vziq5gwjm79yl2swch2mz6ias20nvfddf5cqgk9zbg25cb9m117";
rev = "v${version}";
sha256 = "WDmymia9MD3BRU6BOCzCIMrz9V0ACRzmEGqjbbuUmlA=";
};
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ dbus dleyna-core glib ];
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
dleyna-core
glib
];
meta = with lib; {
description = "A D-Bus API for the dLeyna services";
homepage = "https://01.org/dleyna";
maintainers = [ maintainers.jtojnar ];
homepage = "https://github.com/phako/dleyna-connector-dbus";
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.linux;
license = licenses.lgpl21;
license = licenses.lgpl21Only;
};
}

View file

@ -1,95 +0,0 @@
From bf549a028a5da122b7a4206529711b969c2ecd48 Mon Sep 17 00:00:00 2001
From: Jan Tojnar <jtojnar@gmail.com>
Date: Fri, 1 Sep 2017 13:49:06 +0200
Subject: [PATCH] Search connectors in DLEYNA_CONNECTOR_PATH
Previously, the connectors would only be looked for in a single
directory, specified during compilation. This patch allows to
traverse a list of directories provided by an environment variable.
---
libdleyna/core/connector-mgr.c | 63 ++++++++++++++++++++++++++++--------------
1 file changed, 42 insertions(+), 21 deletions(-)
diff --git a/libdleyna/core/connector-mgr.c b/libdleyna/core/connector-mgr.c
index eafb16c..8041c67 100644
--- a/libdleyna/core/connector-mgr.c
+++ b/libdleyna/core/connector-mgr.c
@@ -34,33 +34,54 @@ const dleyna_connector_t *dleyna_connector_mgr_load(const gchar *name)
const dleyna_connector_t *connector;
dleyna_connector_get_interface_t get_interface;
gchar *path;
+ const gchar *connector_path;
+ gchar **connector_path_list;
+ gsize i;
DLEYNA_LOG_DEBUG("Enter");
- path = g_strdup_printf("%s/%s%s.so", CONNECTOR_DIR,
- DLEYNA_CONNECTOR_LIB_PATTERN, name);
- module = g_module_open(path, G_MODULE_BIND_LAZY);
- g_free(path);
+ connector_path = g_getenv ("DLEYNA_CONNECTOR_PATH");
+ if (!connector_path) {
+ DLEYNA_LOG_DEBUG ("DLEYNA_CONNECTOR_PATH not set");
+ connector_path = CONNECTOR_DIR;
+ } else {
+ DLEYNA_LOG_DEBUG ("DLEYNA_CONNECTOR_PATH set to %s", connector_path);
+ }
+
+ connector_path_list = g_strsplit (connector_path, G_SEARCHPATH_SEPARATOR_S, 0);
+
+ for (i = 0; connector_path_list[i]; i++) {
+ path = g_strdup_printf("%s/%s%s.so", connector_path_list[i],
+ DLEYNA_CONNECTOR_LIB_PATTERN, name);
+ module = g_module_open(path, G_MODULE_BIND_LAZY);
+ g_free(path);
+
+ if (module) {
+ if (!g_connectors)
+ g_connectors = g_hash_table_new(g_direct_hash,
+ g_direct_equal);
+
+ if (g_module_symbol(module, "dleyna_connector_get_interface",
+ (gpointer *)&get_interface)) {
+ connector = get_interface();
+ g_hash_table_insert(g_connectors, (gpointer)connector,
+ module);
+
+ break;
+ } else {
+ connector = NULL;
+ g_module_close(module);
+ DLEYNA_LOG_CRITICAL(
+ "Connector '%s' entry point not found",
+ name);
+ }
- if (module) {
- if (!g_connectors)
- g_connectors = g_hash_table_new(g_direct_hash,
- g_direct_equal);
-
- if (g_module_symbol(module, "dleyna_connector_get_interface",
- (gpointer *)&get_interface)) {
- connector = get_interface();
- g_hash_table_insert(g_connectors, (gpointer)connector,
- module);
- } else {
- connector = NULL;
- g_module_close(module);
- DLEYNA_LOG_CRITICAL(
- "Connector '%s' entry point not found",
- name);
}
+ }
- } else {
+ g_strfreev (connector_path_list);
+
+ if (!module) {
connector = NULL;
DLEYNA_LOG_CRITICAL("Connector '%s' not found", name);
}
--
2.14.1

View file

@ -1,39 +1,30 @@
{ lib, stdenv
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, autoreconfHook
, meson
, ninja
, pkg-config
, gupnp
}:
stdenv.mkDerivation rec {
pname = "dleyna-core";
version = "0.6.0";
version = "0.7.0";
outputs = [ "out" "dev" ];
setupHook = ./setup-hook.sh;
src = fetchFromGitHub {
owner = "01org";
owner = "phako";
repo = pname;
rev = "v${version}";
sha256 = "1x5vj5zfk95avyg6g3nf6gar250cfrgla2ixj2ifn8pcick2d9vq";
sha256 = "i4L9+iyAdBNtgImbD54jkjYL5hvzeZ2OaAyFrcFmuG0=";
};
patches = [
./0001-Search-connectors-in-DLEYNA_CONNECTOR_PATH.patch
# fix build with gupnp 1.2
# https://github.com/intel/dleyna-core/pull/52
(fetchpatch {
url = "https://github.com/intel/dleyna-core/commit/41b2e56f67b6fc9c8c256b86957d281644b9b846.patch";
sha256 = "1h758cp65v7qyfpvyqdri7q0gwx85mhdpkb2y8waq735q5q9ib39";
})
];
nativeBuildInputs = [
autoreconfHook
meson
ninja
pkg-config
];
@ -43,9 +34,9 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Library of utility functions that are used by the higher level dLeyna";
homepage = "https://01.org/dleyna";
maintainers = [ maintainers.jtojnar ];
homepage = "https://github.com/phako/dleyna-core";
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.linux;
license = licenses.lgpl21;
license = licenses.lgpl21Only;
};
}

View file

@ -1,6 +1,8 @@
{ lib, stdenv
{ stdenv
, lib
, fetchFromGitHub
, autoreconfHook
, meson
, ninja
, pkg-config
, dleyna-connector-dbus
, dleyna-core
@ -10,34 +12,35 @@
, gupnp-dlna
, libsoup
, makeWrapper
, docbook-xsl-nons
, libxslt
}:
stdenv.mkDerivation rec {
pname = "dleyna-renderer";
version = "0.6.0";
version = "0.7.1";
src = fetchFromGitHub {
owner = "01org";
owner = "phako";
repo = pname;
rev = version;
sha256 = "0jy54aq8hgrvzchrvfzqaj4pcn0cfhafl9bv8a9p6j82yjk4pvpp";
rev = "v${version}";
sha256 = "EaTE5teMkVDHoJuTLdqcsIL7OyM+tOz85T5D9V3KDoo=";
};
patches = [
# fix build with gupnp 1.2
# comes from arch linux packaging https://git.archlinux.org/svntogit/packages.git/tree/trunk/gupnp-1.2.diff?h=packages/dleyna-renderer
./gupnp-1.2.diff
];
nativeBuildInputs = [
autoreconfHook
meson
ninja
pkg-config
makeWrapper
# manpage
docbook-xsl-nons
libxslt # for xsltproc
];
buildInputs = [
dleyna-core
dleyna-connector-dbus
dleyna-connector-dbus # runtime dependency to be picked up to DLEYNA_CONNECTOR_PATH
gssdp
gupnp
gupnp-av
@ -52,9 +55,9 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Library to discover and manipulate Digital Media Renderers";
homepage = "https://01.org/dleyna";
maintainers = [ maintainers.jtojnar ];
homepage = "https://github.com/phako/dleyna-renderer";
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.linux;
license = licenses.lgpl21;
license = licenses.lgpl21Only;
};
}

View file

@ -1,130 +0,0 @@
configure.ac | 4 ++--
libdleyna/renderer/device.c | 51 +++++++++++++++++++++++++++++++++++++++++++--
libdleyna/renderer/upnp.c | 4 ++--
3 files changed, 53 insertions(+), 6 deletions(-)
diff --git c/configure.ac i/configure.ac
index 271ee92..364659d 100644
--- c/configure.ac
+++ i/configure.ac
@@ -38,8 +38,8 @@ LT_LANG([C])
PKG_PROG_PKG_CONFIG(0.16)
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.28])
PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.28])
-PKG_CHECK_MODULES([GSSDP], [gssdp-1.0 >= 0.13.2])
-PKG_CHECK_MODULES([GUPNP], [gupnp-1.0 >= 0.20.5])
+PKG_CHECK_MODULES([GSSDP], [gssdp-1.2 >= 1.2.0])
+PKG_CHECK_MODULES([GUPNP], [gupnp-1.2 >= 1.2.0])
PKG_CHECK_MODULES([GUPNPAV], [gupnp-av-1.0 >= 0.11.5])
PKG_CHECK_MODULES([GUPNPDLNA], [gupnp-dlna-2.0 >= 0.9.4])
PKG_CHECK_MODULES([SOUP], [libsoup-2.4 >= 2.28.2])
diff --git c/libdleyna/renderer/device.c i/libdleyna/renderer/device.c
index 7acef89..f6d571e 100644
--- c/libdleyna/renderer/device.c
+++ i/libdleyna/renderer/device.c
@@ -2121,33 +2121,80 @@ exit:
return;
}
+typedef struct
+{
+ GMainLoop *loop;
+ GUPnPServiceIntrospection *introspection;
+ GError **error;
+} GetIntrospectionAsyncData;
+
+static void
+get_introspection_async_cb (GUPnPServiceInfo *info,
+ GUPnPServiceIntrospection *introspection,
+ const GError *error,
+ gpointer user_data)
+{
+ GetIntrospectionAsyncData *data = user_data;
+ data->introspection = introspection;
+ if (data->error)
+ *data->error = g_error_copy (error);
+ g_main_loop_quit (data->loop);
+}
+
+static GUPnPServiceIntrospection *
+_gupnp_service_info_get_introspection (GUPnPServiceInfo *info,
+ GError **error)
+{
+ GetIntrospectionAsyncData data;
+ GMainContext *context;
+
+ context = g_main_context_new ();
+ data.loop = g_main_loop_new (context, FALSE);
+ data.error = error;
+
+ g_main_context_push_thread_default (context);
+
+ gupnp_service_info_get_introspection_async (info,
+ get_introspection_async_cb,
+ &data);
+
+ g_main_loop_run (data.loop);
+
+ g_main_context_pop_thread_default (context);
+
+ g_main_loop_unref (data.loop);
+ g_main_context_unref (context);
+
+ return data.introspection;
+}
+
static gboolean prv_get_av_service_states_values(GUPnPServiceProxy *av_proxy,
GVariant **mpris_tp_speeds,
GPtrArray **upnp_tp_speeds,
double *min_rate,
double *max_rate,
gboolean *can_get_byte_pos)
{
const GUPnPServiceStateVariableInfo *svi;
const GUPnPServiceActionInfo *sai;
GUPnPServiceIntrospection *introspection;
GError *error = NULL;
GVariant *speeds = NULL;
GList *allowed_values;
gpointer weak_ref = NULL;
gboolean device_alive = TRUE;
/* TODO: this weak_ref hack is needed as
gupnp_service_info_get_introspection iterates the main loop.
This can result in our device getting deleted before this
function returns. Ultimately, this code needs to be re-written
to use gupnp_service_info_get_introspection_async but this cannot
really be done until GUPnP provides a way to cancel this function. */
weak_ref = av_proxy;
g_object_add_weak_pointer(G_OBJECT(av_proxy), &weak_ref);
- introspection = gupnp_service_info_get_introspection(
+ introspection = _gupnp_service_info_get_introspection(
GUPNP_SERVICE_INFO(av_proxy),
&error);
@@ -2215,7 +2262,7 @@ static gboolean prv_get_rc_service_states_values(GUPnPServiceProxy *rc_proxy,
weak_ref = rc_proxy;
g_object_add_weak_pointer(G_OBJECT(rc_proxy), &weak_ref);
- introspection = gupnp_service_info_get_introspection(
+ introspection = _gupnp_service_info_get_introspection(
GUPNP_SERVICE_INFO(rc_proxy),
&error);
diff --git c/libdleyna/renderer/upnp.c i/libdleyna/renderer/upnp.c
index 17cbda7..068912b 100644
--- c/libdleyna/renderer/upnp.c
+++ i/libdleyna/renderer/upnp.c
@@ -243,8 +243,8 @@ static void prv_server_unavailable_cb(GUPnPControlPoint *cp,
udn = gupnp_device_info_get_udn((GUPnPDeviceInfo *)proxy);
- ip_address = gupnp_context_get_host_ip(
- gupnp_control_point_get_context(cp));
+ ip_address = gssdp_client_get_host_ip(
+ GSSDP_CLIENT(gupnp_control_point_get_context(cp)));
if (!udn || !ip_address)
goto on_error;

View file

@ -1,7 +1,8 @@
{ lib, stdenv
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, autoreconfHook
, meson
, ninja
, makeWrapper
, pkg-config
, dleyna-core
@ -15,33 +16,25 @@
stdenv.mkDerivation rec {
pname = "dleyna-server";
version = "0.6.0";
version = "0.7.1";
src = fetchFromGitHub {
owner = "01org";
owner = "phako";
repo = pname;
rev = version;
sha256 = "13a2i6ms27s46yxdvlh2zm7pim7jmr5cylnygzbliz53g3gxxl3j";
rev = "v${version}";
sha256 = "bScgwJGPrCaLrw67WnvSpINgq5Vv9LJ/I0MUP9BeO2E=";
};
patches = [
# fix build with gupnp 1.2
# https://github.com/intel/dleyna-server/pull/161
(fetchpatch {
url = "https://github.com/intel/dleyna-server/commit/96c01c88363d6e5e9b7519bc4e8b5d86cf783e1f.patch";
sha256 = "0p8fn331x2whvn6skxqvfzilx0m0yx2q5mm2wh2625l396m3fzmm";
})
];
nativeBuildInputs = [
autoreconfHook
meson
ninja
pkg-config
makeWrapper
];
buildInputs = [
dleyna-core
dleyna-connector-dbus
dleyna-connector-dbus # runtime dependency to be picked up to DLEYNA_CONNECTOR_PATH
gssdp
gupnp
gupnp-av
@ -56,9 +49,9 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Library to discover, browse and manipulate Digital Media Servers";
homepage = "https://01.org/dleyna";
maintainers = [ maintainers.jtojnar ];
homepage = "https://github.com/phako/dleyna-server";
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.linux;
license = licenses.lgpl21;
license = licenses.lgpl21Only;
};
}

View file

@ -1,28 +1,28 @@
{ lib, stdenv
{ stdenv
, lib
, fetchurl
, meson
, ninja
, pkg-config
, gobject-introspection
, vala
, gtk-doc
, docbook_xsl
, docbook_xml_dtd_412
, gi-docgen
, python3
, libsoup
, gtk3
, glib
, gnome
, gssdp-tools
}:
stdenv.mkDerivation rec {
pname = "gssdp";
version = "1.2.3";
version = "1.4.0.1";
outputs = [ "out" "bin" "dev" "devdoc" ];
outputs = [ "out" "dev" "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/gssdp/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1s57i8a8wnnxnsfl27cq4503dkdlzbrhry5zpg23sfqfffvdqqx2";
sha256 = "hnaEnVf7giuHKIVtut6/OGf4nuR6DsR6IARdAR9DFYI=";
};
nativeBuildInputs = [
@ -31,14 +31,12 @@ stdenv.mkDerivation rec {
pkg-config
gobject-introspection
vala
gtk-doc
docbook_xsl
docbook_xml_dtd_412
gi-docgen
python3
];
buildInputs = [
libsoup
gtk3
];
propagatedBuildInputs = [
@ -47,20 +45,35 @@ stdenv.mkDerivation rec {
mesonFlags = [
"-Dgtk_doc=true"
"-Dsniffer=false"
];
doCheck = true;
postFixup = ''
# Move developer documentation to devdoc output.
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
find -L "$out/share/doc" -type f -regex '.*\.devhelp2?' -print0 \
| while IFS= read -r -d ''' file; do
moveToOutput "$(dirname "''${file/"$out/"/}")" "$devdoc"
done
'';
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
};
tests = {
inherit gssdp-tools;
};
};
meta = with lib; {
description = "GObject-based API for handling resource discovery and announcement over SSDP";
homepage = "http://www.gupnp.org/";
license = licenses.lgpl2Plus;
maintainers = teams.gnome.members;
platforms = platforms.all;
};
}

View file

@ -0,0 +1,42 @@
diff --git a/libgssdp/gssdp-client-private.h b/libgssdp/gssdp-client-private.h
index ac31247..241c054 100644
--- a/libgssdp/gssdp-client-private.h
+++ b/libgssdp/gssdp-client-private.h
@@ -10,7 +10,11 @@
#ifndef GSSDP_CLIENT_PRIVATE_H
#define GSSDP_CLIENT_PRIVATE_H
+#ifdef GSSDP_TOOLS
+#include <libgssdp/gssdp-client.h>
+#else
#include "gssdp-client.h"
+#endif
G_BEGIN_DECLS
diff --git a/tools/meson.build b/tools/meson.build
index 40eb8e3..5db545b 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -1,3 +1,10 @@
+project('gssdp-tools', 'c', version: '@version@')
+gnome = import('gnome')
+
+gssdp = dependency('gssdp-1.2')
+gtk = dependency('gtk4', version : '>= 4')
+libsoup = dependency('libsoup-2.4', version : '>= 2.26.1')
+
resource = gnome.compile_resources(
'org.gupnp.GSSDP.DeviceSniffer',
'gssdp-device-sniffer.gresource.xml',
@@ -12,7 +19,9 @@ sniffer = executable(
'main-window.h',
resource
],
- dependencies : [gssdp, gtk],
+ dependencies : [gssdp, gtk, libsoup],
+ c_args: ['-DGSSDP_TOOLS'],
+ include_directories : [include_directories('..')],
install: true,
export_dynamic : true,
gui_app : true

View file

@ -0,0 +1,50 @@
{ stdenv
, lib
, substituteAll
, meson
, ninja
, pkg-config
, wrapGAppsHook4
, gssdp
, gtk4
, libsoup
}:
stdenv.mkDerivation rec {
pname = "gssdp-tools";
inherit (gssdp) version src;
patches = [
# Allow building tools separately from the library.
# This is needed to break the depenency cycle.
(substituteAll {
src = ./standalone-tools.patch;
inherit version;
})
];
nativeBuildInputs = [
meson
ninja
pkg-config
wrapGAppsHook4
];
buildInputs = [
gssdp
gtk4
libsoup
];
preConfigure = ''
cd tools
'';
meta = with lib; {
description = "Device Sniffer tool based on GSSDP framework";
homepage = "http://www.gupnp.org/";
license = licenses.lgpl2Plus;
maintainers = gssdp.meta.maintainers;
platforms = platforms.all;
};
}

View file

@ -1,10 +1,13 @@
{ lib, stdenv
{ stdenv
, lib
, fetchurl
, meson
, ninja
, pkg-config
, gobject-introspection
, vala
, gtk-doc
, docbook_xsl
, docbook-xsl-nons
, docbook_xml_dtd_412
, glib
, libxml2
@ -13,21 +16,23 @@
stdenv.mkDerivation rec {
pname = "gupnp-av";
version = "0.12.11";
version = "0.14.0";
outputs = [ "out" "dev" "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1p3grslwqm9bc8rmpn4l48d7v9s84nina4r9xbd932dbj8acz7b8";
sha256 = "IK7VRvyILnij8YagyLzlyEHMOkS36lKCmPvcgllvsVY=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
gobject-introspection
vala
gtk-doc
docbook_xsl
docbook-xsl-nons
docbook_xml_dtd_412
];
@ -36,8 +41,8 @@ stdenv.mkDerivation rec {
libxml2
];
configureFlags = [
"--enable-gtk-doc"
mesonFlags = [
"-Dgtk_doc=true"
];
doCheck = true;

View file

@ -1,10 +1,13 @@
{ lib, stdenv
{ stdenv
, lib
, fetchurl
, meson
, ninja
, pkg-config
, gobject-introspection
, vala
, gtk-doc
, docbook_xsl
, docbook-xsl-nons
, docbook_xml_dtd_412
, libxml2
, gst_all_1
@ -13,21 +16,23 @@
stdenv.mkDerivation rec {
pname = "gupnp-dlna";
version = "0.10.5";
version = "0.12.0";
outputs = [ "out" "dev" "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0spzd2saax7w776p5laixdam6d7smyynr9qszhbmq7f14y13cghj";
sha256 = "PVO5b4W8VijTPjZ+yb8q2zjvKzTXrQQ0proM9K2QSOY=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
gobject-introspection
vala
gtk-doc
docbook_xsl
docbook-xsl-nons
docbook_xml_dtd_412
];
@ -36,8 +41,8 @@ stdenv.mkDerivation rec {
gst_all_1.gst-plugins-base
];
configureFlags = [
"--enable-gtk-doc"
mesonFlags = [
"-Dgtk_doc=true"
];
doCheck = true;

View file

@ -0,0 +1,55 @@
From a3461f69222ef23b2edd411c5fc8daefea556a2c Mon Sep 17 00:00:00 2001
From: Jan Tojnar <jtojnar@gmail.com>
Date: Wed, 20 Oct 2021 20:55:29 +0200
Subject: [PATCH] pkg-config: Declare header dependencies as public
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The headers include libsoup and libxml2 headers but those libraries are only
listed in Requires.private. This does not matter for upstream pkg-config
because it uses Cflags from libraries in Requires.private as well but as our
pkg-config is patched to only use Requires.private for static linking.
Lets add libsoup-2.4 and libxml-2.0 to Requires rather than Requires.private
to make the reverse dependencies correctly find their headers.
---
libgupnp/meson.build | 2 +-
meson.build | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/libgupnp/meson.build b/libgupnp/meson.build
index cb8a102..5fda9d8 100644
--- a/libgupnp/meson.build
+++ b/libgupnp/meson.build
@@ -129,7 +129,7 @@ pkg.generate(
libgupnp,
subdirs: 'gupnp-1.2',
name : 'gupnp-1.2',
- requires : ['glib-2.0', 'gio-2.0', 'gssdp-1.2'],
+ requires : ['glib-2.0', 'gio-2.0', 'gssdp-1.2', 'libsoup-2.4 >= ' + libsoup_version, 'libxml-2.0'],
description : 'GObject-based UPnP library',
version : meson.project_version(),
filebase : 'gupnp-1.2'
diff --git a/meson.build b/meson.build
index 3790bcf..c96a983 100644
--- a/meson.build
+++ b/meson.build
@@ -25,12 +25,13 @@ gssdp_dep = dependency('gssdp-1.2', version : '>= 1.3.0', default_options: ['sni
gio_unix = dependency('gio-unix-2.0', version: '>= 2.44', required: host_machine.system() != 'windows')
+libsoup_version = '2.48.0'
dependencies = [
dependency('glib-2.0', version : '>= ' + glib_version),
dependency('gio-2.0', version : '>= ' + glib_version),
dependency('gmodule-2.0', version : '>= ' + glib_version),
dependency('gobject-2.0', version : '>= ' + glib_version),
- dependency('libsoup-2.4', version : '>= 2.48.0'),
+ dependency('libsoup-2.4', version : '>= ' + libsoup_version),
gssdp_dep,
dependency('libxml-2.0'),
]
--
2.33.0

View file

@ -1,6 +1,6 @@
{ lib, stdenv
{ stdenv
, lib
, fetchurl
, fetchpatch
, meson
, ninja
, pkg-config
@ -20,21 +20,18 @@
stdenv.mkDerivation rec {
pname = "gupnp";
version = "1.2.4";
version = "1.4.0";
outputs = [ "out" "dev" "devdoc" ];
src = fetchurl {
url = "mirror://gnome/sources/gupnp/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "sha256-96AwfqUfXkTRuDL0k92QRURKOk4hHvhd/Zql3W6up9E=";
sha256 = "sha256-WQ/7ArhNoqGuxo/VNLxArxs33T9iI/nRV3/EirSL428=";
};
patches = [
(fetchpatch {
name = "CVE-2021-33516.patch";
url = "https://gitlab.gnome.org/GNOME/gupnp/-/commit/ca6ec9dcb26fd7a2a630eb6a68118659b589afac.patch";
sha256 = "sha256-G7e/xNQB7Kp2fPzqVeD/cH3h1co9hZXh55QOUBnAnvU=";
})
# Bring .pc file in line with our patched pkg-config.
./0001-pkg-config-Declare-header-dependencies-as-public.patch
];
nativeBuildInputs = [

View file

@ -1,5 +1,7 @@
{ lib, stdenv
{ stdenv
, lib
, fetchurl
, fetchpatch
, meson
, ninja
, gupnp
@ -16,13 +18,26 @@
stdenv.mkDerivation rec {
pname = "gupnp-tools";
version = "0.10.0";
version = "0.10.1";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "13d1qr1avz9r76989nvgxhhclmqzr025xjk4rfnja94fpbspznj1";
sha256 = "TqltFnRis6VI78T8TqCJ/lGNfSm+NJ0czomCuf+1O0o=";
};
patches = [
# Fix compilation with -Werror=format-security.
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/gupnp-tools/commit/d738baae3bffaf6a8dfc12f5fe1ea13168fe2e48.patch";
sha256 = "wrORH4y9Yb0YGAsjzoeN2MM07y9o+91kx078RH0G76w=";
})
# Fix missing variable reference caused by the previous patch.
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/gupnp-tools/commit/9b852d91175bc7607ad845459ba29d07a16fcbce.patch";
sha256 = "WjEBN/+snJSIg4SUP5iChdj2auIyzePI0TH3Ilks7fk=";
})
];
nativeBuildInputs = [
meson
ninja

View file

@ -5966,6 +5966,8 @@ with pkgs;
gssdp = callPackage ../development/libraries/gssdp { };
gssdp-tools = callPackage ../development/libraries/gssdp/tools.nix { };
grype = callPackage ../tools/security/grype { };
gt5 = callPackage ../tools/system/gt5 { };