commit:     53f262c5bce921bc4727ed6990bf89de1bb4c871
Author:     Petrus Zhao <petrus.zy.07 <AT> gmail <DOT> com>
AuthorDate: Thu Sep 30 04:32:43 2021 +0000
Commit:     Petrus Zhao <petrus.zy.07 <AT> gmail <DOT> com>
CommitDate: Thu Sep 30 04:33:04 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=53f262c5

media-video/uxplay: version bump to 1.37

Package-Manager: Portage-3.0.23, Repoman-3.0.3
Signed-off-by: Petrus Zhao <petrus.zy.07 <AT> gmail.com>

 media-video/uxplay/Manifest                        |   2 +-
 .../uxplay-0_pre20210525-fix-installation.patch    |  72 ---------
 .../uxplay-0_pre20210525-fix-screen-sharing.patch  | 162 ---------------------
 ...uxplay-0_pre20210525-use-machine-hostname.patch |  49 -------
 media-video/uxplay/metadata.xml                    |  29 ++--
 media-video/uxplay/uxplay-0_pre20210525.ebuild     |  46 ------
 media-video/uxplay/uxplay-1.37.ebuild              |  53 +++++++
 7 files changed, 72 insertions(+), 341 deletions(-)

diff --git a/media-video/uxplay/Manifest b/media-video/uxplay/Manifest
index e9430a004..47e4595ab 100644
--- a/media-video/uxplay/Manifest
+++ b/media-video/uxplay/Manifest
@@ -1 +1 @@
-DIST uxplay-0_pre20210525.tar.gz 365673 BLAKE2B 
363dbcb86ec194eb6bf1fbd5bd07d49650570da3a986c42d4da74e76adf9af6f5247cf1364758b822eeea24b70b88ec24aed8c3c18795276197fde5fa3097cc3
 SHA512 
0a22504f29a4dc41819187f7fbbc1f66da456c65c8c8c8a1189553ea7bb43beb207c9360e677605c51fab25da4ec1aef1e662b83965d376de12165d88c8b7579
+DIST uxplay-1.37.tar.gz 295598 BLAKE2B 
c0fbd887ba65068045448155f6dad93e6af1e7acaa723262c045e47e7535159c4a932564c9e3b5d8bcae505570dab8138b65d09611e8daaad6a609f26ce35244
 SHA512 
0b14c4b5c463e0ece74ced8f2307a7dcb02cc70157f1c97d4b779e3395ba695851b2014823b5bd4939beddd4c05038dcd323a1c8c94ffd50f8b8c6fca5c3fa71

diff --git 
a/media-video/uxplay/files/uxplay-0_pre20210525-fix-installation.patch 
b/media-video/uxplay/files/uxplay-0_pre20210525-fix-installation.patch
deleted file mode 100644
index 6b4a53a16..000000000
--- a/media-video/uxplay/files/uxplay-0_pre20210525-fix-installation.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 4fd146e46ed505fd46fb1dcad83de272690376e9 Mon Sep 17 00:00:00 2001
-From: Michael Schlottke-Lakemper <[email protected]>
-Date: Wed, 5 Aug 2020 11:46:15 +0200
-Subject: [PATCH 1/2] Reformat commands as code in README
-
----
- README.md | 26 +++++++++++++++++---------
- 1 file changed, 17 insertions(+), 9 deletions(-)
-
-diff --git a/README.md b/README.md
-index 8502407..82c96f2 100644
---- a/README.md
-+++ b/README.md
-@@ -1,19 +1,27 @@
-+# UxPlay
-+
- This project is an early stage prototype of unix AirPlay server.
- Work is based on https://github.com/FD-/RPiPlay.
- Tested on Ubuntu 19.10 desktop.
- 5G Wifi connection is the must.
- 
--Features:
-+## Features
- 1. Based on Gstreamer.
- 1. Video and audio are supported out of the box.
- 3. Gstreamer decoding is plugin agnostic. Uses accelerated decoders if 
availible. VAAPI is preferable.
- 4. Automatic screen orientation.
- 
--Building:
--1. sudo apt-get install cmake
--2. sudo apt-get install libssl-dev libavahi-compat-libdnssd-dev 
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-libav
--3. sudo apt-get install gstreamer1.0-vaapi (For Intel graphics)
--4. mkdir build
--5. cd build
--6. cmake ..
--7. make
-+## Building
-+```bash
-+sudo apt-get install cmake
-+sudo apt-get install libssl-dev libavahi-compat-libdnssd-dev \
-+                     libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
-+                     gstreamer1.0-libav
-+sudo apt-get install gstreamer1.0-vaapi # For Intel graphics
-+mkdir build
-+cd build
-+cmake ..
-+# Alternatively (for higher optimization level and/or installation):
-+# cmake .. -DCMAKE_BUILD_TYPE=Release 
-DCMAKE_INSTALL_PREFIX=path/to/install/dir
-+make
-+```
-
-From 64bf832ccaadabfb12b427c2ea90194d3fbcf34b Mon Sep 17 00:00:00 2001
-From: Michael Schlottke-Lakemper <[email protected]>
-Date: Wed, 5 Aug 2020 11:50:09 +0200
-Subject: [PATCH 2/2] Fix `install` command such that out-of-source builds work
- (fixes #12)
-
----
- CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c150f8d..f75664c 100755
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -14,5 +14,5 @@ add_subdirectory(renderers)
- add_executable( uxplay uxplay.cpp)
- target_link_libraries ( uxplay renderers airplay )
- 
--install(PROGRAMS uxplay DESTINATION bin)
-+install(TARGETS uxplay DESTINATION bin)
- 

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
deleted file mode 100644
index 413afe3eb..000000000
--- a/media-video/uxplay/files/uxplay-0_pre20210525-fix-screen-sharing.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-From 7c80c93cccf6534a0824c1d5783fc036812a76cb Mon Sep 17 00:00:00 2001
-From: david <[email protected]>
-Date: Fri, 22 Jan 2021 00:27:23 +0100
-Subject: [PATCH 1/2] Fix _NET_WM_NAME
-
-Gstreamer does not set the _NET_WM_NAME property on the window it
-creates when using `autovideosink` (or ximagesink/xvimagesink for that
-matter).
-
-A lot of tools (like Zoom) filter based on this field being non-null, so
-the window can't be shared.
-
-This horrible hack finds the first open window that matches our application
-name and proceeds to set _NET_WM_NAME on it.
-
-It is very ugly, but it works.
----
- CMakeLists.txt                       |  7 +++-
- renderers/video_renderer_gstreamer.c | 52 ++++++++++++++++++++++++++--
- 2 files changed, 56 insertions(+), 3 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c150f8d..77e0b3a 100755
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -4,6 +4,11 @@ project(uxplay)
- 
- set (CMAKE_CXX_STANDARD 11)
- 
-+find_package(X11 REQUIRED)
-+link_libraries(${X11_LIBRARIES})
-+include_directories(${X11_INCLUDE_DIR})
-+# link_directories(${X11_LIBRARIES})
-+
- add_subdirectory(lib/curve25519)
- add_subdirectory(lib/ed25519)
- add_subdirectory(lib/playfair)
-@@ -12,7 +17,7 @@ add_subdirectory(lib)
- add_subdirectory(renderers)
- 
- add_executable( uxplay uxplay.cpp)
--target_link_libraries ( uxplay renderers airplay )
-+target_link_libraries ( uxplay renderers airplay ${X11_LIBRARIES})
- 
- install(PROGRAMS uxplay DESTINATION bin)
- 
-diff --git a/renderers/video_renderer_gstreamer.c 
b/renderers/video_renderer_gstreamer.c
-index 5ed2720..d8477d0 100644
---- a/renderers/video_renderer_gstreamer.c
-+++ b/renderers/video_renderer_gstreamer.c
-@@ -21,6 +21,13 @@
- #include <assert.h>
- #include <gst/gst.h>
- #include <gst/app/gstappsrc.h>
-+#include <X11/Xlib.h>
-+#include <X11/Xutil.h>
-+#include <stdio.h>
-+
-+Display* display;
-+Window root, my_window;
-+const char* application_name = "UXPLAY";
- 
- struct video_renderer_s {
-     logger_t *logger;
-@@ -49,7 +56,38 @@ static gboolean check_plugins (void)
-   return ret;
- }
- 
-+Window enum_windows(Display* display, Window window, int depth) {
-+  int i;
-+
-+  XTextProperty text;
-+  XGetWMName(display, window, &text);
-+  char* name;
-+  XFetchName(display, window, &name);
-+
-+  if (name != 0 && strcmp(application_name, name) == 0) {
-+      return window;
-+  }
-+
-+  Window _root, parent;
-+  Window* children;
-+  int n;
-+  XQueryTree(display, window, &_root, &parent, &children, &n);
-+  if (children != NULL) {
-+    for (i = 0; i < n; i++) {
-+      Window w = enum_windows(display, children[i], depth + 1);
-+      if (w != NULL) return w;
-+    }
-+    XFree(children);
-+  }
-+
-+  return NULL;
-+}
-+
-+
- video_renderer_t *video_renderer_init(logger_t *logger, background_mode_t 
background_mode, bool low_latency) {
-+    display = XOpenDisplay(NULL);
-+    root = XDefaultRootWindow(display);
-+
-     video_renderer_t *renderer;
-     GError *error = NULL;
- 
-@@ -57,6 +95,7 @@ video_renderer_t *video_renderer_init(logger_t *logger, 
background_mode_t backgr
-     assert(renderer);
- 
-     gst_init(NULL, NULL);
-+    g_set_application_name(application_name);
- 
-     renderer->logger = logger;
-     
-@@ -88,10 +127,20 @@ void video_renderer_render_buffer(video_renderer_t 
*renderer, raop_ntp_t *ntp, u
-     GST_BUFFER_DTS(buffer) = (GstClockTime)pts;
-     gst_buffer_fill(buffer, 0, data, data_len);
-     gst_app_src_push_buffer (GST_APP_SRC(renderer->appsrc), buffer);
-+
-+    if (my_window == NULL) {
-+          my_window = enum_windows(display, root, 0);
-+          if (my_window != NULL) {
-+                  char* str = "NEW NAME";
-+                  Atom _NET_WM_NAME = XInternAtom(display, "_NET_WM_NAME", 0);
-+                  Atom UTF8_STRING = XInternAtom(display, "UTF8_STRING", 0);
-+                  XChangeProperty(display, my_window, _NET_WM_NAME, 
UTF8_STRING, 8, 0, str, strlen(str));
-+                  XSync(display, False);
-+          }
-+    }
- }
- 
- void video_renderer_flush(video_renderer_t *renderer) {
--
- }
- 
- void video_renderer_destroy(video_renderer_t *renderer) {
-@@ -104,5 +153,4 @@ void video_renderer_destroy(video_renderer_t *renderer) {
- }
- 
- void video_renderer_update_background(video_renderer_t *renderer, int type) {
--
- }
-
-From 4e0196eb5577e25d9af2e1af2d6d6c6d867c5393 Mon Sep 17 00:00:00 2001
-From: david <[email protected]>
-Date: Wed, 3 Feb 2021 23:08:32 +0100
-Subject: [PATCH 2/2] Change window name to UxPlay
-
----
- renderers/video_renderer_gstreamer.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/renderers/video_renderer_gstreamer.c 
b/renderers/video_renderer_gstreamer.c
-index d8477d0..d57a8c3 100644
---- a/renderers/video_renderer_gstreamer.c
-+++ b/renderers/video_renderer_gstreamer.c
-@@ -131,7 +131,7 @@ void video_renderer_render_buffer(video_renderer_t 
*renderer, raop_ntp_t *ntp, u
-     if (my_window == NULL) {
-           my_window = enum_windows(display, root, 0);
-           if (my_window != NULL) {
--                  char* str = "NEW NAME";
-+                  char* str = "UxPlay";
-                   Atom _NET_WM_NAME = XInternAtom(display, "_NET_WM_NAME", 0);
-                   Atom UTF8_STRING = XInternAtom(display, "UTF8_STRING", 0);
-                   XChangeProperty(display, my_window, _NET_WM_NAME, 
UTF8_STRING, 8, 0, str, strlen(str));

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
deleted file mode 100644
index 207a0c8e5..000000000
--- a/media-video/uxplay/files/uxplay-0_pre20210525-use-machine-hostname.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From a5098ee748a7c6ba078479a6bffd1cacbb5a538d Mon Sep 17 00:00:00 2001
-From: mrbesen <[email protected]>
-Date: Wed, 10 Mar 2021 12:04:56 +0100
-Subject: [PATCH] use Hostname as default Name
-
----
- uxplay.cpp | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
-
-diff --git a/uxplay.cpp b/uxplay.cpp
-index c1e6b8a..b91151d 100755
---- a/uxplay.cpp
-+++ b/uxplay.cpp
-@@ -24,6 +24,7 @@
- #include <string>
- #include <vector>
- #include <fstream>
-+#include <sys/utsname.h> // uname(read hostname)
- 
- #include "log.h"
- #include "lib/raop.h"
-@@ -102,6 +103,18 @@ void print_info(char *name) {
-     printf("-v/-h             Displays this help and version information\n");
- }
- 
-+/* read the mashines hostname an write it into name */
-+void get_hostname(std::string& name) {
-+    struct utsname buf;
-+    int res = uname(&buf);
-+    if(res) {
-+        //error
-+        printf("could not read hostname: %d %s\n", res, strerror(res));
-+        return;
-+    }
-+    name = buf.nodename;
-+}
-+
- int main(int argc, char *argv[]) {
-     init_signals();
- 
-@@ -112,6 +125,8 @@ int main(int argc, char *argv[]) {
-     bool low_latency = DEFAULT_LOW_LATENCY;
-     bool debug_log = DEFAULT_DEBUG_LOG;
- 
-+    get_hostname(server_name);
-+
-     // Parse arguments
-     for (int i = 1; i < argc; i++) {
-         std::string arg(argv[i]);

diff --git a/media-video/uxplay/metadata.xml b/media-video/uxplay/metadata.xml
index e4f2e1f73..fcda2bdb8 100644
--- a/media-video/uxplay/metadata.xml
+++ b/media-video/uxplay/metadata.xml
@@ -5,19 +5,26 @@
                <email>[email protected]</email>
                <name>Huang Rui</name>
        </maintainer>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Petrus Zhao</name>
+       </maintainer>
        <upstream>
-               <remote-id type="github">antimof/UxPlay</remote-id>
+               <remote-id type="github">FDH2/UxPlay</remote-id>
        </upstream>
        <longdescription lang="en">
-       UxPlay - AirPlay Unix mirroring server.
-       This project is an early stage prototype of unix AirPlay server. Work is
-       based on https://github.com/FD-/RPiPlay. Tested on Ubuntu 19.10 desktop.
-       5G Wifi connection is the must.
-       Features:
-       Based on Gstreamer.
-       Video and audio are supported out of the box.
-       Gstreamer decoding is plugin agnostic.
-       Uses accelerated decoders if availible. VAAPI is preferable.
-       Automatic screen orientation.
+               UxPlay - AirPlay Unix mirroring server.
+               This project is an early stage prototype of unix AirPlay 
server. Work is
+               based on https://github.com/FD-/RPiPlay. Tested on Ubuntu 19.10 
desktop.
+               5G Wifi connection is the must.
+               Features:
+               Based on Gstreamer.
+               Video and audio are supported out of the box.
+               Gstreamer decoding is plugin agnostic.
+               Uses accelerated decoders if availible. VAAPI is preferable.
+               Automatic screen orientation.
        </longdescription>
+       <use>
+               <flag name="zoomfix">supported mirrored window for 
screen-sharing applications such as Zoom</flag>
+       </use>
 </pkgmetadata>

diff --git a/media-video/uxplay/uxplay-0_pre20210525.ebuild 
b/media-video/uxplay/uxplay-0_pre20210525.ebuild
deleted file mode 100644
index 0f74d6650..000000000
--- a/media-video/uxplay/uxplay-0_pre20210525.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-GIT_PN="UxPlay"
-
-inherit cmake
-
-DESCRIPTION="AirPlay Unix mirroring server"
-HOMEPAGE="https://github.com/antimof/UxPlay";
-
-if [[ ${PV} == "9999" ]] ; then
-       EGIT_REPO_URI="https://github.com/antimof/${GIT_PN}.git";
-       inherit git-r3
-else
-       EGIT_COMMIT="6a473d6026480c47b6d9f1b2d619039da3cd36ba"
-       
SRC_URI="https://github.com/antimof/${GIT_PN}/archive/${EGIT_COMMIT}.tar.gz -> 
${P}.tar.gz"
-       S="${WORKDIR}/${GIT_PN}-${EGIT_COMMIT}"
-       KEYWORDS="~amd64 ~arm ~x86"
-fi
-
-LICENSE="GPL-3"
-SLOT="0"
-
-RDEPEND="
-       dev-libs/openssl
-       media-libs/gstreamer
-       media-libs/gst-plugins-bad
-       media-plugins/gst-plugins-libav
-       net-dns/avahi[mdnsresponder-compat]
-"
-
-DEPEND="
-       ${RDEPEND}
-"
-
-BDEPEND="
-       virtual/pkgconfig
-"
-
-PATCHES=(
-       "${FILESDIR}/${P}-fix-installation.patch"
-       "${FILESDIR}/${P}-fix-screen-sharing.patch"
-       "${FILESDIR}/${P}-use-machine-hostname.patch"
-)

diff --git a/media-video/uxplay/uxplay-1.37.ebuild 
b/media-video/uxplay/uxplay-1.37.ebuild
new file mode 100644
index 000000000..dfa5c081a
--- /dev/null
+++ b/media-video/uxplay/uxplay-1.37.ebuild
@@ -0,0 +1,53 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_PN="UxPlay"
+MY_PV="${PV}b"
+
+inherit cmake
+
+DESCRIPTION="AirPlay Unix mirroring server"
+HOMEPAGE="https://github.com/FDH2/UxPlay";
+
+if [[ ${PV} == "9999" ]] ; then
+       EGIT_REPO_URI="https://github.com/FDH2/${MY_PN}.git";
+       inherit git-r3
+else
+       
SRC_URI="https://github.com/FDH2/${MY_PN}/archive/refs/tags/${MY_PV}.tar.gz -> 
${P}.tar.gz"
+       KEYWORDS="~amd64 ~arm ~x86"
+       S="${WORKDIR}/${MY_PN}-${MY_PV}"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="+vaapi +zoomfix"
+
+RDEPEND="
+       app-pda/libplist
+       dev-libs/openssl
+       media-libs/gstreamer
+       media-libs/gst-plugins-bad
+       media-libs/gst-plugins-base
+       media-plugins/gst-plugins-libav
+       vaapi? ( media-plugins/gst-plugins-vaapi )
+       net-dns/avahi[mdnsresponder-compat]
+       zoomfix? ( x11-libs/libX11 )
+"
+
+DEPEND="
+       ${RDEPEND}
+"
+
+BDEPEND="
+       virtual/pkgconfig
+"
+
+src_configure() {
+       local mycmakeargs=(
+               -DZOOMFIX=$(usex zoomfix ON OFF)
+       )
+
+       cmake_src_configure
+}

Reply via email to