xpra: 4.2 -> 4.3.1

This commit is contained in:
Louis Bettens 2022-01-22 10:41:09 +01:00
parent 6d8215281b
commit a3354b61b6
3 changed files with 27 additions and 30 deletions

View file

@ -1,6 +1,5 @@
{ lib
, fetchurl
, fetchpatch
, substituteAll, python3, pkg-config, runCommand, writeText
, xorg, gtk3, glib, pango, cairo, gdk-pixbuf, atk, pandoc
, wrapGAppsHook, xorgserver, getopt, xauth, util-linux, which
@ -44,11 +43,11 @@ let
'';
in buildPythonApplication rec {
pname = "xpra";
version = "4.2";
version = "4.3.1";
src = fetchurl {
url = "https://xpra.org/src/${pname}-${version}.tar.gz";
hash = "sha256-KkQw4FJeH4G5jZ4GdP3aXZ3zxu4GALbiOI6POKJW6fk=";
url = "https://xpra.org/src/${pname}-${version}.tar.xz";
hash = "sha256-v0Abn0oYcl1I4H9GLN1pV9hk9tTE+Wlv2gPTtEE6t6k=";
};
patches = [
@ -57,21 +56,14 @@ in buildPythonApplication rec {
inherit libfakeXinerama;
})
./fix-41106.patch # https://github.com/NixOS/nixpkgs/issues/41106
# Xorg won't start without. Remove on next version!
(fetchpatch {
url = "https://github.com/Xpra-org/xpra/commit/f9f242abad69363dfa558e1f6f7956ae99164b67.patch";
sha256 = "sha256-TOP9RuXPuqxyKY/7LSSrCWnAmJstEE+D5EwjMiVmchM=";
})
];
postPatch = ''
substituteInPlace setup.py --replace '/usr/include/security' '${pam}/include/security'
'';
INCLUDE_DIRS = "${pam}/include";
nativeBuildInputs = [ pkg-config wrapGAppsHook pandoc ]
++ lib.optional withNvenc cudatoolkit;
buildInputs = with xorg; [
libX11 xorgproto libXrender libXi
libX11 xorgproto libXrender libXi libXres
libXtst libXfixes libXcomposite libXdamage
libXrandr libxkbfile
] ++ [

View file

@ -1,15 +1,15 @@
diff --git a/xpra/server/server_util.py b/xpra/server/server_util.py
index dd7c7c1..066b9ff 100644
index f46998ee9f..60068f21b6 100644
--- a/xpra/server/server_util.py
+++ b/xpra/server/server_util.py
@@ -37,6 +37,10 @@ def sh_quotemeta(s):
return b"'" + s.replace(b"'", b"'\\''") + b"'"
@@ -157,6 +157,10 @@ def xpra_env_shell_script(socket_dir, env):
return b"\n".join(script)
def xpra_runner_shell_script(xpra_file, starting_dir, socket_dir):
def xpra_runner_shell_script(xpra_file, starting_dir):
+ # Nixpkgs contortion:
+ # xpra_file points to a shell wrapper, not to the python script.
+ dirname, basename = os.path.split(xpra_file)
+ xpra_file = os.path.join(dirname, "."+basename+"-wrapped")
script = []
script.append(b"#!/bin/sh\n")
for var, value in os.environb.items():
# We ignore failures in cd'ing, b/c it's entirely possible that we were
# started from some temporary directory and all paths are absolute.

View file

@ -1,23 +1,28 @@
diff --git a/setup.py b/setup.py
index f962330..b02b6dd 100755
index fc67abb50a..c29db3a6d2 100755
--- a/setup.py
+++ b/setup.py
@@ -2224,11 +2224,7 @@ if v4l2_ENABLED:
videodev2_h = "/usr/include/linux/videodev2.h"
@@ -2348,17 +2348,7 @@ if v4l2_ENABLED:
break
constants_pxi = "xpra/codecs/v4l2/constants.pxi"
if not os.path.exists(videodev2_h) or should_rebuild(videodev2_h, constants_pxi):
- ENABLE_DEVICE_CAPS = 0
- if os.path.exists(videodev2_h):
- with open(videodev2_h) as f:
- hdata = f.read()
- ENABLE_DEVICE_CAPS = int(hdata.find("device_caps")>=0)
- try:
- with subprocess.Popen("cpp -fpreprocessed %s | grep -q device_caps" % videodev2_h,
- shell=True) as proc:
- ENABLE_DEVICE_CAPS = proc.wait()==0
- except OSError:
- with open(videodev2_h) as f:
- hdata = f.read()
- ENABLE_DEVICE_CAPS = int(hdata.find("device_caps")>=0)
- print("failed to detect device caps, assuming off")
+ ENABLE_DEVICE_CAPS = 1
with open(constants_pxi, "wb") as f:
f.write(b"DEF ENABLE_DEVICE_CAPS=%i" % ENABLE_DEVICE_CAPS)
cython_add(Extension("xpra.codecs.v4l2.pusher",
add_cython_ext("xpra.codecs.v4l2.pusher",
diff --git a/xpra/x11/fakeXinerama.py b/xpra/x11/fakeXinerama.py
index c867258..617af7c 100755
index d5c1c8bb10..88c77e8142 100755
--- a/xpra/x11/fakeXinerama.py
+++ b/xpra/x11/fakeXinerama.py
@@ -22,31 +22,7 @@ fakeXinerama_config_files = [
@ -48,8 +53,8 @@ index c867258..617af7c 100755
- log("find_libfakeXinerama()", exc_info=True)
- log.error("Error: cannot launch ldconfig -p to locate libfakeXinerama:")
- log.error(" %s", e)
- return find_lib(libname)
+ return "@libfakeXinerama@/lib/libfakeXinerama.so.1.0"
- return find_lib("libfakeXinerama.so.1")
+ return "@libfakeXinerama@/lib/libfakeXinerama.so.1"
current_xinerama_config = None