Control: tags -1 + upstream fixed-upstream patch
Control: forwarded -1 
https://github.com/tatsuhiro-t/wslay/commit/43fda1207ea5977043630500e0c8e77b98b35320

Hi Anton, Lucas,

* Lucas Nussbaum <lu...@debian.org> [211106 12:55]:
> Source: wslay
> >   File "/<<PKGBUILDDIR>>/doc/sphinx/conf.py", line 305, in setup
> >     app.add_stylesheet('default2.css')
> > AttributeError: 'Sphinx' object has no attribute 'add_stylesheet'

Upstream fixed this here:
https://github.com/tatsuhiro-t/wslay/commit/43fda1207ea5977043630500e0c8e77b98b35320

Adding this patch makes the Debian package build. There seem to be
minor issues with the HTML doc, but not caused by this patch at
least.

I'm attaching a trivial patch to add the upstream patch to the
Debian package.

Best,
Chris

>From a212f471623d2c5211f28219da2e472450e345cc Mon Sep 17 00:00:00 2001
From: Chris Hofstaedtler <z...@debian.org>
Date: Sat, 6 Nov 2021 12:52:05 +0000
Subject: [PATCH] Fix building with sphinx 3.3, from upstream

---
 debian/patches/series                         |   1 +
 .../upstream-Fix-sphinx-33-errors.patch       | 147 ++++++++++++++++++
 2 files changed, 148 insertions(+)
 create mode 100644 debian/patches/upstream-Fix-sphinx-33-errors.patch

diff --git a/debian/patches/series b/debian/patches/series
index 11fae01..4736f92 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 10_update_cmake.patch
 20_cmake_casing.patch
+upstream-Fix-sphinx-33-errors.patch
diff --git a/debian/patches/upstream-Fix-sphinx-33-errors.patch b/debian/patches/upstream-Fix-sphinx-33-errors.patch
new file mode 100644
index 0000000..fdcfc01
--- /dev/null
+++ b/debian/patches/upstream-Fix-sphinx-33-errors.patch
@@ -0,0 +1,147 @@
+From 43fda1207ea5977043630500e0c8e77b98b35320 Mon Sep 17 00:00:00 2001
+From: Tatsuhiro Tsujikawa <tatsuhir...@gmail.com>
+Date: Thu, 14 Jan 2021 20:44:36 +0900
+Subject: [PATCH] Fix sphinx 3.3 errors
+
+---
+ doc/sphinx/conf.py.in                         |  2 +-
+ .../man/wslay_event_context_server_init.rst   | 44 +++++++------------
+ .../man/wslay_event_queue_fragmented_msg.rst  |  2 +-
+ 3 files changed, 17 insertions(+), 31 deletions(-)
+
+diff --git a/doc/sphinx/conf.py.in b/doc/sphinx/conf.py.in
+index 1eaeee1..2ee5f21 100644
+--- a/doc/sphinx/conf.py.in
++++ b/doc/sphinx/conf.py.in
+@@ -304,4 +304,4 @@ man_pages = [
+     ]
+ 
+ def setup(app):
+-    app.add_stylesheet('default2.css')
++    app.add_css_file('default2.css')
+diff --git a/doc/sphinx/man/wslay_event_context_server_init.rst b/doc/sphinx/man/wslay_event_context_server_init.rst
+index f549d79..dbf44d3 100644
+--- a/doc/sphinx/man/wslay_event_context_server_init.rst
++++ b/doc/sphinx/man/wslay_event_context_server_init.rst
+@@ -16,13 +16,13 @@ DESCRIPTION
+ -----------
+ 
+ :c:func:`wslay_event_context_server_init` function initializes an
+-:c:event-based API context for WebSocket server use.
++event-based API context for WebSocket server use.
+ :c:func:`wslay_event_context_client_init` function initializes an
+-:c:event-based API context for WebSocket client use.  If they return
+-:c:successfully, `ctx` will point to a structure which holds any
+-:c:necessary resources needed to process WebSocket protocol transfers.
++event-based API context for WebSocket client use.  If they return
++successfully, `ctx` will point to a structure which holds any
++necessary resources needed to process WebSocket protocol transfers.
+ 
+-*callbacks* is a pointer to :c:type:`struct wslay_event_callbacks`,
++*callbacks* is a pointer to :c:type:`wslay_event_callbacks`,
+ which is defined as follows::
+ 
+   struct wslay_event_callbacks {
+@@ -35,9 +35,7 @@ which is defined as follows::
+       wslay_event_on_msg_recv_callback         on_msg_recv_callback;
+   };
+ 
+-**recv_callback**
+-
+-   .. c:type:: typedef ssize_t (*wslay_event_recv_callback)(wslay_event_context_ptr ctx, uint8_t *buf, size_t len, int flags, void *user_data)
++.. c:type:: ssize_t (*wslay_event_recv_callback)(wslay_event_context_ptr ctx, uint8_t *buf, size_t len, int flags, void *user_data)
+ 
+    *recv_callback* is invoked by :c:func:`wslay_event_recv` when it
+    wants to receive more data from peer.
+@@ -53,9 +51,7 @@ which is defined as follows::
+    set ``WSLAY_ERR_WOULDBLOCK`` instead. This is important because it tells
+    :c:func:`wslay_event_recv` to stop receiving further data and return.
+ 
+-**send_callback**
+-
+-   .. c:type:: typedef ssize_t (*wslay_event_send_callback)(wslay_event_context_ptr ctx, const uint8_t *data, size_t len, int flags, void *user_data)
++.. c:type:: ssize_t (*wslay_event_send_callback)(wslay_event_context_ptr ctx, const uint8_t *data, size_t len, int flags, void *user_data)
+ 
+    *send_callback* is invoked by :c:func:`wslay_event_send` when it
+    wants to send more data to peer.
+@@ -76,9 +72,7 @@ which is defined as follows::
+    set ``WSLAY_ERR_WOULDBLOCK`` instead. This is important because it tells
+    :c:func:`wslay_event_send` to stop sending data and return.
+ 
+-**genmask_callback**
+-
+-   .. c:type:: typedef int (*wslay_event_genmask_callback)(wslay_event_context_ptr ctx, uint8_t *buf, size_t len, void *user_data)
++.. c:type:: int (*wslay_event_genmask_callback)(wslay_event_context_ptr ctx, uint8_t *buf, size_t len, void *user_data)
+ 
+    *genmask_callback* is invoked by :c:func:`wslay_event_send` when it
+    wants new mask key. As described in RFC6455, only the traffic from
+@@ -90,14 +84,12 @@ which is defined as follows::
+    set error code ``WSLAY_ERR_CALLBACK_FAILURE``
+    using :c:func:`wslay_event_set_error`.
+ 
+-**on_frame_recv_start_callback**
+-
+-   .. c:type:: typedef void (*wslay_event_on_frame_recv_start_callback)(wslay_event_context_ptr ctx, const struct wslay_event_on_frame_recv_start_arg *arg, void *user_data)
++.. c:type:: void (*wslay_event_on_frame_recv_start_callback)(wslay_event_context_ptr ctx, const struct wslay_event_on_frame_recv_start_arg *arg, void *user_data)
+ 
+    *on_frame_recv_start_callback* is invoked by :c:func:`wslay_event_recv` when
+    a new frame starts to be received.
+    This callback function is only invoked once for each
+-   frame. :c:type:`struct wslay_event_on_frame_recv_start_arg` is defined as
++   frame. :c:type:`wslay_event_on_frame_recv_start_arg` is defined as
+    follows::
+ 
+      struct wslay_event_on_frame_recv_start_arg {
+@@ -110,13 +102,11 @@ which is defined as follows::
+    *fin*, *rsv* and *opcode* is fin bit and reserved bits and opcode of a frame.
+    *payload_length* is a payload length of a frame.
+ 
+-**on_frame_recv_chunk_callback**
+-
+-   .. c:type:: typedef void (*wslay_event_on_frame_recv_chunk_callback)(wslay_event_context_ptr ctx, const struct wslay_event_on_frame_recv_chunk_arg *arg, void *user_data)
++.. c:type:: void (*wslay_event_on_frame_recv_chunk_callback)(wslay_event_context_ptr ctx, const struct wslay_event_on_frame_recv_chunk_arg *arg, void *user_data)
+ 
+    *on_frame_recv_chunk_callback* is invoked by :c:func:`wslay_event_recv` when
+    a chunk of frame payload is received.
+-   :c:type:`struct wslay_event_on_frame_recv_chunk_arg` is defined as follows::
++   :c:type:`wslay_event_on_frame_recv_chunk_arg` is defined as follows::
+ 
+      struct wslay_event_on_frame_recv_chunk_arg {
+          const uint8_t *data;
+@@ -126,20 +116,16 @@ which is defined as follows::
+    *data* points to a chunk of payload data.
+    *data_length* is the length of a chunk.
+ 
+-**on_frame_recv_end_callback**
+-
+-   .. c:type:: typedef void (*wslay_event_on_frame_recv_end_callback)(wslay_event_context_ptr ctx, void *user_data)
++.. c:type:: void (*wslay_event_on_frame_recv_end_callback)(wslay_event_context_ptr ctx, void *user_data)
+ 
+    *on_frame_recv_end_callback* is invoked by :c:func:`wslay_event_recv` when
+    a frame is completely received.
+ 
+-**on_msg_recv_callback**
+-
+-   .. c:type:: typedef void (*wslay_event_on_msg_recv_callback)(wslay_event_context_ptr ctx, const struct wslay_event_on_msg_recv_arg *arg, void *user_data)
++.. c:type:: void (*wslay_event_on_msg_recv_callback)(wslay_event_context_ptr ctx, const struct wslay_event_on_msg_recv_arg *arg, void *user_data)
+ 
+    *on_msg_recv_callback* is invoked by :c:func:`wslay_event_recv`
+    when a message
+-   is completely received. :c:type:`struct wslay_event_on_msg_recv_arg` is
++   is completely received. :c:type:`wslay_event_on_msg_recv_arg` is
+    defined as follows::
+ 
+      struct wslay_event_on_msg_recv_arg {
+diff --git a/doc/sphinx/man/wslay_event_queue_fragmented_msg.rst b/doc/sphinx/man/wslay_event_queue_fragmented_msg.rst
+index faeff02..3d1db36 100644
+--- a/doc/sphinx/man/wslay_event_queue_fragmented_msg.rst
++++ b/doc/sphinx/man/wslay_event_queue_fragmented_msg.rst
+@@ -30,7 +30,7 @@ is defined as::
+       wslay_event_fragmented_msg_callback read_callback;
+   };
+ 
+-.. c:type:: typedef ssize_t (*wslay_event_fragmented_msg_callback)(wslay_event_context_ptr ctx, uint8_t *buf, size_t len, const union wslay_event_msg_source *source, int *eof, void *user_data)
++.. c:type:: ssize_t (*wslay_event_fragmented_msg_callback)(wslay_event_context_ptr ctx, uint8_t *buf, size_t len, const union wslay_event_msg_source *source, int *eof, void *user_data)
+ 
+ The *opcode* member is the opcode of the message.
+ The *source* member is an union and normally it contains a "source" to
-- 
2.33.1

Reply via email to