diff --git a/x11-wm/xpra/Manifest b/x11-wm/xpra/Manifest new file mode 100644 index 0000000..8943712 --- /dev/null +++ b/x11-wm/xpra/Manifest @@ -0,0 +1,22 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +DIST xpra-3.0.9.tar.xz 2760888 BLAKE2B e826e82b9765456297df11e749b7812ee68c4d1fee7688ab17544a02bb7456fd4112877017e902162e9ccb9602cf768a810b6d272e012e4be712e4d9a54b8b94 SHA512 e94782ceb1ad28aec797f8573e12ddb1ef7652d50222365a85bbfdda0d348b7a71c38d72600d5c1702edb167efabf60f890d1aee21a8f95f29d49e21b1c7aa98 +-----BEGIN PGP SIGNATURE----- + +iQKTBAEBCAB9FiEEcg3s4uUa4XE72XWQvF3CmYqtKyEFAl6vHZlfFIAAAAAALgAo +aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDcy +MERFQ0UyRTUxQUUxNzEzQkQ5NzU5MEJDNURDMjk5OEFBRDJCMjEACgkQvF3CmYqt +KyEPyw/8C7fhyq8j0U0VQwo8fXPuwRjs8LQBhSpE/d3etfSmESOBzY+AozV2pkki +fWVpkejszj6jLwIbC8ukIhMk4Kzqz21Wel4d4uf/TZfGY0qjwkbq4OHXrs37Rp1m +pM69UEiRLW9raYgllW+E9ZCKiTe426MVvtNYq8Fy76MZkDB0WlyTh8cPD7xqi6FD +6AkYDWJ9HtW+7sf3PGsU7rSgE7zTGckHEwZxzwWumVHqC/pOWMoiGdgurAeWuBFF +o4lFNbYcGPmy1ghu+2pcRudy/VQFjbLEMgco+d0DkKg2OPkMBafXxVOUmc1qcH3r +l33q7yq1vzxzXfGkwByvAVHT/iTZk/NWi1ddgPpzZevfzyuMolEN26lyEqFz7tzD +1D09Vhz0HzuO2pBOPyhaaFNfYzhUk9msyhWQJCkzaoNY+QHGksBy3hfzocFTzPvQ +Oh537tViYHAH7r7hK/KlemnMALoYL+cgGZU8kkhMhwXhAjHRenBao7FsGZknPzYZ +qFrV4t33eGeRLHfm0iN1Ealkyk8btpHH69FNct1S2IQxRVB/I1HWoxK3TDuJl/QY +9dWN2FHpa0ZTDyg+3Qc+K3NX4QW0+Z7TP1WtXljtyYWKCGJDqxs+5sEbmdcfPdXI +YTU9AeD7waVJKl65kAaeNHgodnARluOnK/cORMzubJthANNgC1c= +=J3hM +-----END PGP SIGNATURE----- diff --git a/x11-wm/xpra/files/xpra-2.0-suid-warning.patch b/x11-wm/xpra/files/xpra-2.0-suid-warning.patch new file mode 100644 index 0000000..806694f --- /dev/null +++ b/x11-wm/xpra/files/xpra-2.0-suid-warning.patch @@ -0,0 +1,11 @@ +--- xpra-2.0/xpra/scripts/config.py ++++ xpra-2.0/xpra/scripts/config.py +@@ -127,7 +127,7 @@ + xorg_stat = os.stat(xorg_bin) + if (xorg_stat.st_mode & stat.S_ISUID)!=0: + if (xorg_stat.st_mode & stat.S_IROTH)==0: +- warn("%s is suid and not readable, Xdummy support unavailable" % xorg_bin) ++ debug("%s is suid and not readable, Xdummy support unavailable" % xorg_bin) + return get_Xvfb_command() + debug("%s is suid and readable, using the xpra_Xdummy wrapper" % xorg_bin) + use_wrapper = True diff --git a/x11-wm/xpra/files/xpra-3.0.2-dbus.patch b/x11-wm/xpra/files/xpra-3.0.2-dbus.patch new file mode 100644 index 0000000..e0f14b8 --- /dev/null +++ b/x11-wm/xpra/files/xpra-3.0.2-dbus.patch @@ -0,0 +1,29 @@ +Remove dbus functionality if USE=dbus is not specified. + +Index: xpra-3.0.2/xpra/scripts/server.py +=================================================================== +--- xpra-3.0.2.orig/xpra/scripts/server.py ++++ xpra-3.0.2/xpra/scripts/server.py +@@ -748,14 +748,9 @@ def do_run_server(error_cb, opts, mode, + log("chdir(%s)", opts.chdir) + os.chdir(opts.chdir) + +- dbus_pid, dbus_env = 0, {} + if not shadowing and POSIX and not OSX and not clobber: + no_gtk() + assert starting or starting_desktop or proxying +- from xpra.server.dbus.dbus_start import start_dbus +- dbus_pid, dbus_env = start_dbus(opts.dbus_launch) +- if dbus_env: +- os.environ.update(dbus_env) + + display = None + if not proxying: +@@ -835,7 +830,6 @@ def do_run_server(error_cb, opts, mode, + app.display_name = display_name + app.init(opts) + app.init_sockets(sockets) +- app.init_dbus(dbus_pid, dbus_env) + if not shadowing and (xvfb_pid or clobber): + app.init_display_pid(xvfb_pid) + app.original_desktop_display = desktop_display diff --git a/x11-wm/xpra/files/xpra-3.0.2-ldconfig.patch b/x11-wm/xpra/files/xpra-3.0.2-ldconfig.patch new file mode 100644 index 0000000..8475d47 --- /dev/null +++ b/x11-wm/xpra/files/xpra-3.0.2-ldconfig.patch @@ -0,0 +1,33 @@ +diff -ruN xpra-3.0.2.orig/xpra/x11/fakeXinerama.py xpra-3.0.2/xpra/x11/fakeXinerama.py +--- xpra-3.0.2.orig/xpra/x11/fakeXinerama.py 2019-09-24 15:54:02.000000000 +0200 ++++ xpra-3.0.2/xpra/x11/fakeXinerama.py 2020-01-16 12:20:22.620519078 +0100 +@@ -23,29 +23,6 @@ + + def find_libfakeXinerama(): + libname = "fakeXinerama" +- try: +- from ctypes.util import find_library +- flibname = find_library("fakeXinerama") +- if flibname: +- libname = flibname +- except Exception: +- pass +- if POSIX: +- for lib_dir in os.environ.get("LD_LIBRARY_PATH", "/usr/lib").split(os.pathsep): +- lib_path = os.path.join(lib_dir, libname) +- if not os.path.exists(lib_dir): +- continue +- if os.path.exists(lib_path) and os.path.isfile(lib_path): +- return lib_path +- if LINUX: +- try: +- libpath = find_lib_ldconfig("fakeXinerama") +- if libpath: +- return libpath +- except Exception as e: +- log("find_libfakeXinerama()", exc_info=True) +- log.error("Error: cannot launch ldconfig -p to locate libfakeXinerama:") +- log.error(" %s", e) + return find_lib(libname) + + current_xinerama_config = None diff --git a/x11-wm/xpra/files/xpra-3.0.2_ignore-gentoo-no-compile.patch b/x11-wm/xpra/files/xpra-3.0.2_ignore-gentoo-no-compile.patch new file mode 100644 index 0000000..5823ac8 --- /dev/null +++ b/x11-wm/xpra/files/xpra-3.0.2_ignore-gentoo-no-compile.patch @@ -0,0 +1,13 @@ +Index: xpra-3.0.2/setup.py +=================================================================== +--- xpra-3.0.2.orig/setup.py ++++ xpra-3.0.2/setup.py +@@ -516,7 +516,7 @@ def cython_add(extension, min_version="0 + #python2.7 setup.py build -b build-2.7 install --no-compile \ + # --root=/var/tmp/portage/x11-wm/xpra-0.7.0/temp/images/2.7 + if "--no-compile" in sys.argv and not ("build" in sys.argv and "install" in sys.argv): +- return ++ pass + assert cython_ENABLED, "cython compilation is disabled" + cython_version_check(min_version) + from Cython.Distutils import build_ext diff --git a/x11-wm/xpra/metadata.xml b/x11-wm/xpra/metadata.xml new file mode 100644 index 0000000..b50bb53 --- /dev/null +++ b/x11-wm/xpra/metadata.xml @@ -0,0 +1,21 @@ + + + + + + holgersson@posteo.de + Nils Freydank + + + https://www.xpra.org/trac/report + + + Build client-side code + Enable clipboard support + Enable csc softscaler support + Enable pillow support + Build server-side code + Enable vpx image format support + Enable webcam support via opencv + + diff --git a/x11-wm/xpra/xpra-3.0.9.ebuild b/x11-wm/xpra/xpra-3.0.9.ebuild new file mode 100644 index 0000000..a96c65d --- /dev/null +++ b/x11-wm/xpra/xpra-3.0.9.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# PyCObject_Check and PyCObject_AsVoidPtr vanished with python 3.3 +PYTHON_COMPAT=( python3_{6,7} ) +inherit xdg distutils-r1 eutils flag-o-matic user tmpfiles prefix + +DESCRIPTION="X Persistent Remote Apps (xpra) and Partitioning WM (parti) based on wimpiggy" +HOMEPAGE="http://xpra.org/ http://xpra.org/src/" +SRC_URI="http://xpra.org/src/${P}.tar.xz" + +LICENSE="GPL-2 BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+client +clipboard csc cups dbus ffmpeg jpeg +lz4 lzo opengl pillow pulseaudio server sound test vpx webcam +webp" + +REQUIRED_USE="${PYTHON_REQUIRED_USE} + || ( client server ) + cups? ( dbus ) + opengl? ( client ) +" + +COMMON_DEPEND="${PYTHON_DEPS} + dev-python/pygobject:3[${PYTHON_USEDEP}] + x11-libs/gtk+:3[introspection] + x11-libs/libX11 + x11-libs/libXcomposite + x11-libs/libXdamage + x11-libs/libXfixes + x11-libs/libXrandr + x11-libs/libXtst + x11-libs/libxkbfile + csc? ( >=media-video/ffmpeg-1.2.2:0= ) + ffmpeg? ( >=media-video/ffmpeg-3.2.2:0=[x264,x265] ) + jpeg? ( media-libs/libjpeg-turbo ) + opengl? ( dev-python/pyopengl ) + pulseaudio? ( media-sound/pulseaudio ) + sound? ( media-libs/gstreamer:1.0 + media-libs/gst-plugins-base:1.0 + dev-python/gst-python:1.0 ) + vpx? ( media-libs/libvpx media-video/ffmpeg ) + webp? ( media-libs/libwebp ) +" +RDEPEND="${COMMON_DEPEND} + dev-python/netifaces[${PYTHON_USEDEP}] + dev-python/rencode[${PYTHON_USEDEP}] + dev-python/pillow[jpeg?,${PYTHON_USEDEP}] + virtual/ssh + x11-apps/xmodmap + cups? ( dev-python/pycups[${PYTHON_USEDEP}] ) + dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] ) + lz4? ( dev-python/lz4[${PYTHON_USEDEP}] ) + lzo? ( >=dev-python/python-lzo-0.7.0[${PYTHON_USEDEP}] ) + opengl? ( + client? ( dev-python/pyopengl_accelerate[${PYTHON_USEDEP}] ) + ) + server? ( x11-base/xorg-server[-minimal,xvfb] + x11-drivers/xf86-input-void + ) + webcam? ( dev-python/numpy[${PYTHON_USEDEP}] + media-libs/opencv[python] + dev-python/pyinotify[${PYTHON_USEDEP}] )" +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig + >=dev-python/cython-0.16[${PYTHON_USEDEP}]" + +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/${PN}-3.0.2_ignore-gentoo-no-compile.patch + "${FILESDIR}"/${PN}-2.0-suid-warning.patch + "${FILESDIR}"/${PN}-3.0.2-ldconfig.patch +) + +pkg_postinst() { + enewgroup ${PN} + tmpfiles_process /usr/lib/tmpfiles.d/xpra.conf + + xdg_pkg_postinst +} + +python_prepare_all() { + hprefixify -w '/os.path/' setup.py + hprefixify tmpfiles.d/xpra.conf xpra/server/server_util.py \ + xpra/platform{/xposix,}/paths.py xpra/scripts/server.py + + distutils-r1_python_prepare_all +} + +python_configure_all() { + sed -e "/'pulseaudio'/s:DEFAULT_PULSEAUDIO:$(usex pulseaudio True False):" \ + -i setup.py || die + + mydistutilsargs=( + --without-PIC + --without-Xdummy + $(use_with client) + $(use_with clipboard) + $(use_with csc csc_swscale) + --without-csc_libyuv + --without-cuda_rebuild + --without-cuda_kernels + $(use_with cups printing) + --without-debug + $(use_with dbus) + $(use_with ffmpeg dec_avcodec2) + $(use_with ffmpeg enc_ffmpeg) + $(use_with ffmpeg enc_x264) + $(use_with ffmpeg enc_x265) + --without-gtk2 + --with-gtk3 + --without-html5 + $(use_with jpeg jpeg_encoder) + $(use_with jpeg jpeg_decoder) + --without-mdns + --without-minify + $(use_with opengl) + $(use_with server shadow) + $(use_with server) + $(use_with sound) + --with-strict + $(use_with vpx) + --with-warn + $(use_with webcam) + $(use_with webp) + --with-x11 + ) + + # see https://www.xpra.org/trac/ticket/1080 + # and http://trac.cython.org/ticket/395 + append-cflags -fno-strict-aliasing + + export XPRA_SOCKET_DIRS="${EPREFIX}/run/xpra" +}