added upstream patch to fix build on 32bit platforms [release 4.4.2-2mamba;Mon Nov 21 2022]
This commit is contained in:
parent
399cb18bd9
commit
7e5e6f1ba9
@ -0,0 +1,71 @@
|
||||
From 3f5eb97283e73ca78059be5dd828a87b393a38c7 Mon Sep 17 00:00:00 2001
|
||||
From: totaam <antoine@xpra.org>
|
||||
Date: Sat, 12 Nov 2022 15:48:54 +0700
|
||||
Subject: [PATCH] #3685 clamp clock values to 'unsigned long'
|
||||
|
||||
---
|
||||
xpra/x11/bindings/randr_bindings.pyx | 31 +++++++++-------------------
|
||||
1 file changed, 10 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/xpra/x11/bindings/randr_bindings.pyx b/xpra/x11/bindings/randr_bindings.pyx
|
||||
index f527d594a8..aaebe088f3 100644
|
||||
--- a/xpra/x11/bindings/randr_bindings.pyx
|
||||
+++ b/xpra/x11/bindings/randr_bindings.pyx
|
||||
@@ -19,7 +19,7 @@ from xpra.x11.bindings.xlib cimport (
|
||||
)
|
||||
from xpra.common import DEFAULT_REFRESH_RATE
|
||||
from xpra.util import envint, envbool, csv, first_time, decode_str, prettify_plug_name
|
||||
-from xpra.os_util import strtobytes, bytestostr
|
||||
+from xpra.os_util import strtobytes, bytestostr, BITS
|
||||
|
||||
|
||||
TIMESTAMPS = envbool("XPRA_RANDR_TIMESTAMPS", False)
|
||||
@@ -597,7 +597,6 @@ cdef class RandRBindingsInstance(X11CoreBindingsInstance):
|
||||
cdef XRRModeInfo *calculate_mode(self, name, unsigned int w, unsigned int h, unsigned int vrefresh):
|
||||
log("calculate_mode(%s, %i, %i, %i)", name, w, h, vrefresh)
|
||||
#monitor settings as set in xorg.conf...
|
||||
- cdef unsigned long maxPixelClock = 30*1000*1000*1000 #30,000 MHz
|
||||
cdef unsigned int minHSync = 1*1000 #1KHz
|
||||
cdef unsigned int maxHSync = 300*1000 #300KHz
|
||||
cdef unsigned int minVSync = 1 #1Hz
|
||||
@@ -622,31 +621,21 @@ cdef class RandRBindingsInstance(X11CoreBindingsInstance):
|
||||
yBack = round(h * timeVBack)
|
||||
yTotal = h + yFront + ySync + yBack
|
||||
|
||||
- cdef unsigned long modeMaxClock = maxPixelClock
|
||||
- if (maxHSync * xTotal)<maxPixelClock:
|
||||
- modeMaxClock = maxHSync * xTotal
|
||||
- tmp = maxVSync * xTotal * yTotal * yFactor
|
||||
- if tmp<modeMaxClock:
|
||||
- modeMaxClock = tmp
|
||||
- cdef unsigned long modeMinClock = minHSync * xTotal
|
||||
- # Monitor minVSync too low? => increase mode minimum pixel clock
|
||||
- tmp = minVSync * xTotal * yTotal * yFactor
|
||||
- if tmp > modeMinClock:
|
||||
- modeMinClock = tmp
|
||||
+ if sizeof(long)<=4:
|
||||
+ maxPixelClock = 0xffffffff
|
||||
+ else:
|
||||
+ maxPixelClock = 30*1000*1000*1000 #30,000 MHz
|
||||
+ modeMaxClock = min(maxPixelClock, maxHSync * xTotal, maxVSync * xTotal * yTotal * yFactor)
|
||||
+ modeMinClock = max(minHSync * xTotal, minVSync * xTotal * yTotal * yFactor)
|
||||
# If minimum clock > maximum clock, the mode is impossible...
|
||||
if modeMinClock > modeMaxClock:
|
||||
- log.warn("Warning: cannot add mode %s", name)
|
||||
- log.warn(" clock %iHz is above maximum value %iHz", modeMinClock, modeMaxClock)
|
||||
+ log.warn(f"Warning: cannot add mode {name}")
|
||||
+ log.warn(f" clock {modeMinClock}Hz is above maximum value {modeMaxClock}Hz")
|
||||
log.warn(" no suitable clocks could be found")
|
||||
return NULL
|
||||
|
||||
idealClock = idealVSync * xTotal * yTotal * yFactor
|
||||
- cdef unsigned long clock = idealClock
|
||||
- if clock < modeMinClock:
|
||||
- clock = modeMinClock
|
||||
- elif clock > modeMaxClock:
|
||||
- clock = modeMaxClock
|
||||
-
|
||||
+ cdef unsigned long clock = min(modeMaxClock, max(modeMinClock, idealClock))
|
||||
log("Modeline %ix%i@%i %s %s %s %s %s %s %s %s %s", w, h, round(vrefresh/1000),
|
||||
clock/1000/1000,
|
||||
w, w+xFront, w+xFront+xSync, xTotal,
|
12
xpra.spec
12
xpra.spec
@ -1,6 +1,6 @@
|
||||
Name: xpra
|
||||
Version: 4.4.2
|
||||
Release: 1mamba
|
||||
Release: 2mamba
|
||||
Summary: A tool like screen for X allowing to direct X programs display to another X host
|
||||
Group: Graphical Desktop/Applications/Utilities
|
||||
Vendor: openmamba
|
||||
@ -8,6 +8,7 @@ Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: https://xpra.org/
|
||||
Source: http://xpra.org/src/xpra-%{version}.tar.xz
|
||||
Patch0: xpra-4.4.2-upstream_clamp_clock_values_to_unsigned_long.patch
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
@ -21,10 +22,7 @@ BuildRequires: libXrandr-devel
|
||||
BuildRequires: libXres-devel
|
||||
BuildRequires: libXtst-devel
|
||||
BuildRequires: libat-spi2-core-devel
|
||||
BuildRequires: libavcodec-ffmpeg-devel
|
||||
BuildRequires: libavformat-ffmpeg-devel
|
||||
BuildRequires: libavif-devel
|
||||
BuildRequires: libavutil-ffmpeg-devel
|
||||
BuildRequires: libbrotli-devel
|
||||
BuildRequires: libcairo-devel
|
||||
BuildRequires: libdrm-devel
|
||||
@ -39,7 +37,6 @@ BuildRequires: libpango-devel
|
||||
BuildRequires: libprocps-devel
|
||||
BuildRequires: libpython3-devel
|
||||
BuildRequires: libqrencode-devel
|
||||
BuildRequires: libswscale-ffmpeg-devel
|
||||
BuildRequires: libsystemd-devel
|
||||
BuildRequires: libvpx6-devel
|
||||
BuildRequires: libwebp-devel
|
||||
@ -55,6 +52,8 @@ Xpra is 'screen for X' -- it allows you to run X programs, usually on a remote h
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .upstream_clamp_clock_values_to_unsigned_long
|
||||
|
||||
sed -i "s|systemd_dir = .*|systemd_dir = \"%{_unitdir}\"|" setup.py
|
||||
|
||||
%build
|
||||
@ -115,6 +114,9 @@ sed -i "s,.*/man/.*,&.gz," %{name}.filelist
|
||||
%doc COPYING
|
||||
|
||||
%changelog
|
||||
* Mon Nov 21 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 4.4.2-2mamba
|
||||
- added upstream patch to fix build on 32bit platforms
|
||||
|
||||
* Thu Nov 17 2022 Automatic Build System <autodist@mambasoft.it> 4.4.2-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user