Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: media-video/uxplay/, media-video/uxplay/files/
Date: Thu, 30 Sep 2021 19:39:52
Message-Id: 1632976384.53f262c5bce921bc4727ed6990bf89de1bb4c871.arthurzam@gentoo
1 commit: 53f262c5bce921bc4727ed6990bf89de1bb4c871
2 Author: Petrus Zhao <petrus.zy.07 <AT> gmail <DOT> com>
3 AuthorDate: Thu Sep 30 04:32:43 2021 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 30 04:33:04 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=53f262c5
7
8 media-video/uxplay: version bump to 1.37
9
10 Package-Manager: Portage-3.0.23, Repoman-3.0.3
11 Signed-off-by: Petrus Zhao <petrus.zy.07 <AT> gmail.com>
12
13 media-video/uxplay/Manifest | 2 +-
14 .../uxplay-0_pre20210525-fix-installation.patch | 72 ---------
15 .../uxplay-0_pre20210525-fix-screen-sharing.patch | 162 ---------------------
16 ...uxplay-0_pre20210525-use-machine-hostname.patch | 49 -------
17 media-video/uxplay/metadata.xml | 29 ++--
18 media-video/uxplay/uxplay-0_pre20210525.ebuild | 46 ------
19 media-video/uxplay/uxplay-1.37.ebuild | 53 +++++++
20 7 files changed, 72 insertions(+), 341 deletions(-)
21
22 diff --git a/media-video/uxplay/Manifest b/media-video/uxplay/Manifest
23 index e9430a004..47e4595ab 100644
24 --- a/media-video/uxplay/Manifest
25 +++ b/media-video/uxplay/Manifest
26 @@ -1 +1 @@
27 -DIST uxplay-0_pre20210525.tar.gz 365673 BLAKE2B 363dbcb86ec194eb6bf1fbd5bd07d49650570da3a986c42d4da74e76adf9af6f5247cf1364758b822eeea24b70b88ec24aed8c3c18795276197fde5fa3097cc3 SHA512 0a22504f29a4dc41819187f7fbbc1f66da456c65c8c8c8a1189553ea7bb43beb207c9360e677605c51fab25da4ec1aef1e662b83965d376de12165d88c8b7579
28 +DIST uxplay-1.37.tar.gz 295598 BLAKE2B c0fbd887ba65068045448155f6dad93e6af1e7acaa723262c045e47e7535159c4a932564c9e3b5d8bcae505570dab8138b65d09611e8daaad6a609f26ce35244 SHA512 0b14c4b5c463e0ece74ced8f2307a7dcb02cc70157f1c97d4b779e3395ba695851b2014823b5bd4939beddd4c05038dcd323a1c8c94ffd50f8b8c6fca5c3fa71
29
30 diff --git a/media-video/uxplay/files/uxplay-0_pre20210525-fix-installation.patch b/media-video/uxplay/files/uxplay-0_pre20210525-fix-installation.patch
31 deleted file mode 100644
32 index 6b4a53a16..000000000
33 --- a/media-video/uxplay/files/uxplay-0_pre20210525-fix-installation.patch
34 +++ /dev/null
35 @@ -1,72 +0,0 @@
36 -From 4fd146e46ed505fd46fb1dcad83de272690376e9 Mon Sep 17 00:00:00 2001
37 -From: Michael Schlottke-Lakemper <michael@××××××.com>
38 -Date: Wed, 5 Aug 2020 11:46:15 +0200
39 -Subject: [PATCH 1/2] Reformat commands as code in README
40 -
41 ----
42 - README.md | 26 +++++++++++++++++---------
43 - 1 file changed, 17 insertions(+), 9 deletions(-)
44 -
45 -diff --git a/README.md b/README.md
46 -index 8502407..82c96f2 100644
47 ---- a/README.md
48 -+++ b/README.md
49 -@@ -1,19 +1,27 @@
50 -+# UxPlay
51 -+
52 - This project is an early stage prototype of unix AirPlay server.
53 - Work is based on https://github.com/FD-/RPiPlay.
54 - Tested on Ubuntu 19.10 desktop.
55 - 5G Wifi connection is the must.
56 -
57 --Features:
58 -+## Features
59 - 1. Based on Gstreamer.
60 - 1. Video and audio are supported out of the box.
61 - 3. Gstreamer decoding is plugin agnostic. Uses accelerated decoders if availible. VAAPI is preferable.
62 - 4. Automatic screen orientation.
63 -
64 --Building:
65 --1. sudo apt-get install cmake
66 --2. sudo apt-get install libssl-dev libavahi-compat-libdnssd-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-libav
67 --3. sudo apt-get install gstreamer1.0-vaapi (For Intel graphics)
68 --4. mkdir build
69 --5. cd build
70 --6. cmake ..
71 --7. make
72 -+## Building
73 -+```bash
74 -+sudo apt-get install cmake
75 -+sudo apt-get install libssl-dev libavahi-compat-libdnssd-dev \
76 -+ libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
77 -+ gstreamer1.0-libav
78 -+sudo apt-get install gstreamer1.0-vaapi # For Intel graphics
79 -+mkdir build
80 -+cd build
81 -+cmake ..
82 -+# Alternatively (for higher optimization level and/or installation):
83 -+# cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=path/to/install/dir
84 -+make
85 -+```
86 -
87 -From 64bf832ccaadabfb12b427c2ea90194d3fbcf34b Mon Sep 17 00:00:00 2001
88 -From: Michael Schlottke-Lakemper <michael@××××××.com>
89 -Date: Wed, 5 Aug 2020 11:50:09 +0200
90 -Subject: [PATCH 2/2] Fix `install` command such that out-of-source builds work
91 - (fixes #12)
92 -
93 ----
94 - CMakeLists.txt | 2 +-
95 - 1 file changed, 1 insertion(+), 1 deletion(-)
96 -
97 -diff --git a/CMakeLists.txt b/CMakeLists.txt
98 -index c150f8d..f75664c 100755
99 ---- a/CMakeLists.txt
100 -+++ b/CMakeLists.txt
101 -@@ -14,5 +14,5 @@ add_subdirectory(renderers)
102 - add_executable( uxplay uxplay.cpp)
103 - target_link_libraries ( uxplay renderers airplay )
104 -
105 --install(PROGRAMS uxplay DESTINATION bin)
106 -+install(TARGETS uxplay DESTINATION bin)
107 -
108
109 diff --git a/media-video/uxplay/files/uxplay-0_pre20210525-fix-screen-sharing.patch b/media-video/uxplay/files/uxplay-0_pre20210525-fix-screen-sharing.patch
110 deleted file mode 100644
111 index 413afe3eb..000000000
112 --- a/media-video/uxplay/files/uxplay-0_pre20210525-fix-screen-sharing.patch
113 +++ /dev/null
114 @@ -1,162 +0,0 @@
115 -From 7c80c93cccf6534a0824c1d5783fc036812a76cb Mon Sep 17 00:00:00 2001
116 -From: david <davidventura27@×××××.com>
117 -Date: Fri, 22 Jan 2021 00:27:23 +0100
118 -Subject: [PATCH 1/2] Fix _NET_WM_NAME
119 -
120 -Gstreamer does not set the _NET_WM_NAME property on the window it
121 -creates when using `autovideosink` (or ximagesink/xvimagesink for that
122 -matter).
123 -
124 -A lot of tools (like Zoom) filter based on this field being non-null, so
125 -the window can't be shared.
126 -
127 -This horrible hack finds the first open window that matches our application
128 -name and proceeds to set _NET_WM_NAME on it.
129 -
130 -It is very ugly, but it works.
131 ----
132 - CMakeLists.txt | 7 +++-
133 - renderers/video_renderer_gstreamer.c | 52 ++++++++++++++++++++++++++--
134 - 2 files changed, 56 insertions(+), 3 deletions(-)
135 -
136 -diff --git a/CMakeLists.txt b/CMakeLists.txt
137 -index c150f8d..77e0b3a 100755
138 ---- a/CMakeLists.txt
139 -+++ b/CMakeLists.txt
140 -@@ -4,6 +4,11 @@ project(uxplay)
141 -
142 - set (CMAKE_CXX_STANDARD 11)
143 -
144 -+find_package(X11 REQUIRED)
145 -+link_libraries(${X11_LIBRARIES})
146 -+include_directories(${X11_INCLUDE_DIR})
147 -+# link_directories(${X11_LIBRARIES})
148 -+
149 - add_subdirectory(lib/curve25519)
150 - add_subdirectory(lib/ed25519)
151 - add_subdirectory(lib/playfair)
152 -@@ -12,7 +17,7 @@ add_subdirectory(lib)
153 - add_subdirectory(renderers)
154 -
155 - add_executable( uxplay uxplay.cpp)
156 --target_link_libraries ( uxplay renderers airplay )
157 -+target_link_libraries ( uxplay renderers airplay ${X11_LIBRARIES})
158 -
159 - install(PROGRAMS uxplay DESTINATION bin)
160 -
161 -diff --git a/renderers/video_renderer_gstreamer.c b/renderers/video_renderer_gstreamer.c
162 -index 5ed2720..d8477d0 100644
163 ---- a/renderers/video_renderer_gstreamer.c
164 -+++ b/renderers/video_renderer_gstreamer.c
165 -@@ -21,6 +21,13 @@
166 - #include <assert.h>
167 - #include <gst/gst.h>
168 - #include <gst/app/gstappsrc.h>
169 -+#include <X11/Xlib.h>
170 -+#include <X11/Xutil.h>
171 -+#include <stdio.h>
172 -+
173 -+Display* display;
174 -+Window root, my_window;
175 -+const char* application_name = "UXPLAY";
176 -
177 - struct video_renderer_s {
178 - logger_t *logger;
179 -@@ -49,7 +56,38 @@ static gboolean check_plugins (void)
180 - return ret;
181 - }
182 -
183 -+Window enum_windows(Display* display, Window window, int depth) {
184 -+ int i;
185 -+
186 -+ XTextProperty text;
187 -+ XGetWMName(display, window, &text);
188 -+ char* name;
189 -+ XFetchName(display, window, &name);
190 -+
191 -+ if (name != 0 && strcmp(application_name, name) == 0) {
192 -+ return window;
193 -+ }
194 -+
195 -+ Window _root, parent;
196 -+ Window* children;
197 -+ int n;
198 -+ XQueryTree(display, window, &_root, &parent, &children, &n);
199 -+ if (children != NULL) {
200 -+ for (i = 0; i < n; i++) {
201 -+ Window w = enum_windows(display, children[i], depth + 1);
202 -+ if (w != NULL) return w;
203 -+ }
204 -+ XFree(children);
205 -+ }
206 -+
207 -+ return NULL;
208 -+}
209 -+
210 -+
211 - video_renderer_t *video_renderer_init(logger_t *logger, background_mode_t background_mode, bool low_latency) {
212 -+ display = XOpenDisplay(NULL);
213 -+ root = XDefaultRootWindow(display);
214 -+
215 - video_renderer_t *renderer;
216 - GError *error = NULL;
217 -
218 -@@ -57,6 +95,7 @@ video_renderer_t *video_renderer_init(logger_t *logger, background_mode_t backgr
219 - assert(renderer);
220 -
221 - gst_init(NULL, NULL);
222 -+ g_set_application_name(application_name);
223 -
224 - renderer->logger = logger;
225 -
226 -@@ -88,10 +127,20 @@ void video_renderer_render_buffer(video_renderer_t *renderer, raop_ntp_t *ntp, u
227 - GST_BUFFER_DTS(buffer) = (GstClockTime)pts;
228 - gst_buffer_fill(buffer, 0, data, data_len);
229 - gst_app_src_push_buffer (GST_APP_SRC(renderer->appsrc), buffer);
230 -+
231 -+ if (my_window == NULL) {
232 -+ my_window = enum_windows(display, root, 0);
233 -+ if (my_window != NULL) {
234 -+ char* str = "NEW NAME";
235 -+ Atom _NET_WM_NAME = XInternAtom(display, "_NET_WM_NAME", 0);
236 -+ Atom UTF8_STRING = XInternAtom(display, "UTF8_STRING", 0);
237 -+ XChangeProperty(display, my_window, _NET_WM_NAME, UTF8_STRING, 8, 0, str, strlen(str));
238 -+ XSync(display, False);
239 -+ }
240 -+ }
241 - }
242 -
243 - void video_renderer_flush(video_renderer_t *renderer) {
244 --
245 - }
246 -
247 - void video_renderer_destroy(video_renderer_t *renderer) {
248 -@@ -104,5 +153,4 @@ void video_renderer_destroy(video_renderer_t *renderer) {
249 - }
250 -
251 - void video_renderer_update_background(video_renderer_t *renderer, int type) {
252 --
253 - }
254 -
255 -From 4e0196eb5577e25d9af2e1af2d6d6c6d867c5393 Mon Sep 17 00:00:00 2001
256 -From: david <davidventura27@×××××.com>
257 -Date: Wed, 3 Feb 2021 23:08:32 +0100
258 -Subject: [PATCH 2/2] Change window name to UxPlay
259 -
260 ----
261 - renderers/video_renderer_gstreamer.c | 2 +-
262 - 1 file changed, 1 insertion(+), 1 deletion(-)
263 -
264 -diff --git a/renderers/video_renderer_gstreamer.c b/renderers/video_renderer_gstreamer.c
265 -index d8477d0..d57a8c3 100644
266 ---- a/renderers/video_renderer_gstreamer.c
267 -+++ b/renderers/video_renderer_gstreamer.c
268 -@@ -131,7 +131,7 @@ void video_renderer_render_buffer(video_renderer_t *renderer, raop_ntp_t *ntp, u
269 - if (my_window == NULL) {
270 - my_window = enum_windows(display, root, 0);
271 - if (my_window != NULL) {
272 -- char* str = "NEW NAME";
273 -+ char* str = "UxPlay";
274 - Atom _NET_WM_NAME = XInternAtom(display, "_NET_WM_NAME", 0);
275 - Atom UTF8_STRING = XInternAtom(display, "UTF8_STRING", 0);
276 - XChangeProperty(display, my_window, _NET_WM_NAME, UTF8_STRING, 8, 0, str, strlen(str));
277
278 diff --git a/media-video/uxplay/files/uxplay-0_pre20210525-use-machine-hostname.patch b/media-video/uxplay/files/uxplay-0_pre20210525-use-machine-hostname.patch
279 deleted file mode 100644
280 index 207a0c8e5..000000000
281 --- a/media-video/uxplay/files/uxplay-0_pre20210525-use-machine-hostname.patch
282 +++ /dev/null
283 @@ -1,49 +0,0 @@
284 -From a5098ee748a7c6ba078479a6bffd1cacbb5a538d Mon Sep 17 00:00:00 2001
285 -From: mrbesen <y.g.2@×××.de>
286 -Date: Wed, 10 Mar 2021 12:04:56 +0100
287 -Subject: [PATCH] use Hostname as default Name
288 -
289 ----
290 - uxplay.cpp | 15 +++++++++++++++
291 - 1 file changed, 15 insertions(+)
292 -
293 -diff --git a/uxplay.cpp b/uxplay.cpp
294 -index c1e6b8a..b91151d 100755
295 ---- a/uxplay.cpp
296 -+++ b/uxplay.cpp
297 -@@ -24,6 +24,7 @@
298 - #include <string>
299 - #include <vector>
300 - #include <fstream>
301 -+#include <sys/utsname.h> // uname(read hostname)
302 -
303 - #include "log.h"
304 - #include "lib/raop.h"
305 -@@ -102,6 +103,18 @@ void print_info(char *name) {
306 - printf("-v/-h Displays this help and version information\n");
307 - }
308 -
309 -+/* read the mashines hostname an write it into name */
310 -+void get_hostname(std::string& name) {
311 -+ struct utsname buf;
312 -+ int res = uname(&buf);
313 -+ if(res) {
314 -+ //error
315 -+ printf("could not read hostname: %d %s\n", res, strerror(res));
316 -+ return;
317 -+ }
318 -+ name = buf.nodename;
319 -+}
320 -+
321 - int main(int argc, char *argv[]) {
322 - init_signals();
323 -
324 -@@ -112,6 +125,8 @@ int main(int argc, char *argv[]) {
325 - bool low_latency = DEFAULT_LOW_LATENCY;
326 - bool debug_log = DEFAULT_DEBUG_LOG;
327 -
328 -+ get_hostname(server_name);
329 -+
330 - // Parse arguments
331 - for (int i = 1; i < argc; i++) {
332 - std::string arg(argv[i]);
333
334 diff --git a/media-video/uxplay/metadata.xml b/media-video/uxplay/metadata.xml
335 index e4f2e1f73..fcda2bdb8 100644
336 --- a/media-video/uxplay/metadata.xml
337 +++ b/media-video/uxplay/metadata.xml
338 @@ -5,19 +5,26 @@
339 <email>vowstar@×××××.com</email>
340 <name>Huang Rui</name>
341 </maintainer>
342 + <maintainer type="person">
343 + <email>petrus.zy.07@×××××.com</email>
344 + <name>Petrus Zhao</name>
345 + </maintainer>
346 <upstream>
347 - <remote-id type="github">antimof/UxPlay</remote-id>
348 + <remote-id type="github">FDH2/UxPlay</remote-id>
349 </upstream>
350 <longdescription lang="en">
351 - UxPlay - AirPlay Unix mirroring server.
352 - This project is an early stage prototype of unix AirPlay server. Work is
353 - based on https://github.com/FD-/RPiPlay. Tested on Ubuntu 19.10 desktop.
354 - 5G Wifi connection is the must.
355 - Features:
356 - Based on Gstreamer.
357 - Video and audio are supported out of the box.
358 - Gstreamer decoding is plugin agnostic.
359 - Uses accelerated decoders if availible. VAAPI is preferable.
360 - Automatic screen orientation.
361 + UxPlay - AirPlay Unix mirroring server.
362 + This project is an early stage prototype of unix AirPlay server. Work is
363 + based on https://github.com/FD-/RPiPlay. Tested on Ubuntu 19.10 desktop.
364 + 5G Wifi connection is the must.
365 + Features:
366 + Based on Gstreamer.
367 + Video and audio are supported out of the box.
368 + Gstreamer decoding is plugin agnostic.
369 + Uses accelerated decoders if availible. VAAPI is preferable.
370 + Automatic screen orientation.
371 </longdescription>
372 + <use>
373 + <flag name="zoomfix">supported mirrored window for screen-sharing applications such as Zoom</flag>
374 + </use>
375 </pkgmetadata>
376
377 diff --git a/media-video/uxplay/uxplay-0_pre20210525.ebuild b/media-video/uxplay/uxplay-0_pre20210525.ebuild
378 deleted file mode 100644
379 index 0f74d6650..000000000
380 --- a/media-video/uxplay/uxplay-0_pre20210525.ebuild
381 +++ /dev/null
382 @@ -1,46 +0,0 @@
383 -# Copyright 1999-2021 Gentoo Authors
384 -# Distributed under the terms of the GNU General Public License v2
385 -
386 -EAPI=7
387 -
388 -GIT_PN="UxPlay"
389 -
390 -inherit cmake
391 -
392 -DESCRIPTION="AirPlay Unix mirroring server"
393 -HOMEPAGE="https://github.com/antimof/UxPlay"
394 -
395 -if [[ ${PV} == "9999" ]] ; then
396 - EGIT_REPO_URI="https://github.com/antimof/${GIT_PN}.git"
397 - inherit git-r3
398 -else
399 - EGIT_COMMIT="6a473d6026480c47b6d9f1b2d619039da3cd36ba"
400 - SRC_URI="https://github.com/antimof/${GIT_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
401 - S="${WORKDIR}/${GIT_PN}-${EGIT_COMMIT}"
402 - KEYWORDS="~amd64 ~arm ~x86"
403 -fi
404 -
405 -LICENSE="GPL-3"
406 -SLOT="0"
407 -
408 -RDEPEND="
409 - dev-libs/openssl
410 - media-libs/gstreamer
411 - media-libs/gst-plugins-bad
412 - media-plugins/gst-plugins-libav
413 - net-dns/avahi[mdnsresponder-compat]
414 -"
415 -
416 -DEPEND="
417 - ${RDEPEND}
418 -"
419 -
420 -BDEPEND="
421 - virtual/pkgconfig
422 -"
423 -
424 -PATCHES=(
425 - "${FILESDIR}/${P}-fix-installation.patch"
426 - "${FILESDIR}/${P}-fix-screen-sharing.patch"
427 - "${FILESDIR}/${P}-use-machine-hostname.patch"
428 -)
429
430 diff --git a/media-video/uxplay/uxplay-1.37.ebuild b/media-video/uxplay/uxplay-1.37.ebuild
431 new file mode 100644
432 index 000000000..dfa5c081a
433 --- /dev/null
434 +++ b/media-video/uxplay/uxplay-1.37.ebuild
435 @@ -0,0 +1,53 @@
436 +# Copyright 2021 Gentoo Authors
437 +# Distributed under the terms of the GNU General Public License v2
438 +
439 +EAPI=8
440 +
441 +MY_PN="UxPlay"
442 +MY_PV="${PV}b"
443 +
444 +inherit cmake
445 +
446 +DESCRIPTION="AirPlay Unix mirroring server"
447 +HOMEPAGE="https://github.com/FDH2/UxPlay"
448 +
449 +if [[ ${PV} == "9999" ]] ; then
450 + EGIT_REPO_URI="https://github.com/FDH2/${MY_PN}.git"
451 + inherit git-r3
452 +else
453 + SRC_URI="https://github.com/FDH2/${MY_PN}/archive/refs/tags/${MY_PV}.tar.gz -> ${P}.tar.gz"
454 + KEYWORDS="~amd64 ~arm ~x86"
455 + S="${WORKDIR}/${MY_PN}-${MY_PV}"
456 +fi
457 +
458 +LICENSE="GPL-3"
459 +SLOT="0"
460 +IUSE="+vaapi +zoomfix"
461 +
462 +RDEPEND="
463 + app-pda/libplist
464 + dev-libs/openssl
465 + media-libs/gstreamer
466 + media-libs/gst-plugins-bad
467 + media-libs/gst-plugins-base
468 + media-plugins/gst-plugins-libav
469 + vaapi? ( media-plugins/gst-plugins-vaapi )
470 + net-dns/avahi[mdnsresponder-compat]
471 + zoomfix? ( x11-libs/libX11 )
472 +"
473 +
474 +DEPEND="
475 + ${RDEPEND}
476 +"
477 +
478 +BDEPEND="
479 + virtual/pkgconfig
480 +"
481 +
482 +src_configure() {
483 + local mycmakeargs=(
484 + -DZOOMFIX=$(usex zoomfix ON OFF)
485 + )
486 +
487 + cmake_src_configure
488 +}