]> git.pld-linux.org Git - packages/xorg-xserver-server.git/commitdiff
- port fdi2iclass.py to python 3 auto/th/xorg-xserver-server-21.1.8-2
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 2 Oct 2023 22:59:12 +0000 (00:59 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 2 Oct 2023 22:59:12 +0000 (00:59 +0200)
- xorg-lib-libXxf86misc has been deprecated by upstream and removed
- rel 2

python3.patch [new file with mode: 0644]
xorg-xserver-server.spec

diff --git a/python3.patch b/python3.patch
new file mode 100644 (file)
index 0000000..9016f20
--- /dev/null
@@ -0,0 +1,69 @@
+--- xorg-server-21.1.8/config/fdi2iclass.py.orig       2023-10-03 00:42:37.000000000 +0200
++++ xorg-server-21.1.8/config/fdi2iclass.py    2023-10-03 00:47:09.544768698 +0200
+@@ -65,7 +65,7 @@
+     booltype = False
+     # see what type of key we have
+-    if node.attributes.has_key('key'):
++    if 'key' in node.attributes:
+         key = node.attributes['key'].nodeValue
+         if key in match_table:
+             match = match_table[key]
+@@ -76,18 +76,18 @@
+     if not match and not booltype:
+         return (match, value)
+-    if node.attributes.has_key('string'):
++    if 'string' in node.attributes:
+         value = node.attributes['string'].nodeValue
+-    elif node.attributes.has_key('contains'):
++    elif 'contains' in node.attributes:
+         value = node.attributes['contains'].nodeValue
+         if match == 'MatchDevicePath':
+             value = device_glob(value)
+         elif booltype and value in cap_match_table:
+             match = cap_match_table[value]
+             value = 'yes'
+-    elif node.attributes.has_key('string_outof'):
++    elif 'string_outof' in node.attributes:
+         value = node.attributes['string_outof'].nodeValue.replace(';','|')
+-    elif node.attributes.has_key('contains_outof'):
++    elif 'contains_outof' in node.attributes:
+         all_values = node.attributes['contains_outof'].nodeValue.split(';')
+         for v in all_values:
+             if match == 'MatchDevicePath':
+@@ -166,18 +166,18 @@
+ def print_section(matches, driver, ignore, options):
+     '''Print a valid InputClass section to stdout'''
+     global num_sections
+-    print 'Section "InputClass"'
+-    print '\tIdentifier "Converted Class %d"' % num_sections
++    print('Section "InputClass"')
++    print('\tIdentifier "Converted Class %d"' % num_sections)
+     num_sections += 1
+     for m, v in matches:
+-        print '\t%s "%s"' % (m, v)
++        print('\t%s "%s"' % (m, v))
+     if driver:
+-        print '\tDriver "%s"' % driver
++        print('\tDriver "%s"' % driver)
+     if ignore:
+-        print '\tOption "Ignore" "yes"'
++        print('\tOption "Ignore" "yes"')
+     for o, v in options:
+-        print '\tOption "%s" "%s"' % (o, v)
+-    print 'EndSection'
++        print('\tOption "%s" "%s"' % (o, v))
++    print('EndSection')
+ def parse_fdi(fdi):
+     '''Parse x11 matches from fdi'''
+@@ -194,7 +194,7 @@
+         matches = parse_all_matches(match_node)
+         if num > 0:
+-            print
++            print()
+         print_section(matches, driver, ignore, options)
+         num += 1
index 5d1042546cd65fafb17dc77f93baa99bd5c7ae17..e532aa0160c9fe8769cf8ec1f5a12f99b0441d21 100644 (file)
@@ -36,7 +36,7 @@ Summary:      X.org server
 Summary(pl.UTF-8):     Serwer X.org
 Name:          xorg-xserver-server
 Version:       21.1.8
-Release:       1
+Release:       2
 License:       MIT
 Group:         X11/Servers
 Source0:       https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-%{version}.tar.xz
@@ -46,10 +46,9 @@ Source2:     xserver.pamd
 Source10:      %{name}-Xvfb.init
 Source11:      %{name}-Xvfb.sysconfig
 Source12:      xvfb-run.sh
+Patch0:                python3.patch
 Patch1:                %{name}-xwrapper-pam.patch
-
 Patch4:                %{name}-builtin-SHA1.patch
-
 Patch6:                110_nvidia_slowdow_fix.patch
 URL:           https://xorg.freedesktop.org/
 BuildRequires: Mesa-dri-devel >= 7.8.1
@@ -108,7 +107,6 @@ BuildRequires:      xorg-lib-libXres-devel
 BuildRequires: xorg-lib-libXtst-devel >= 1.0.99.2
 BuildRequires: xorg-lib-libXv-devel
 BuildRequires: xorg-lib-libXxf86dga-devel
-BuildRequires: xorg-lib-libXxf86misc-devel
 BuildRequires: xorg-lib-libXxf86vm-devel
 BuildRequires: xorg-lib-libfontenc-devel
 BuildRequires: xorg-lib-libpciaccess-devel >= 0.12.901
@@ -414,10 +412,9 @@ Pliki wspólne dla serwerów X.
 
 %prep
 %setup -q -n xorg-server-%{version}
+%patch0 -p1
 %patch1 -p1
-
 %patch4 -p1
-
 %patch6 -p1
 
 # xserver uses pixman-1 API/ABI so put that explictly here
@@ -426,7 +423,7 @@ sed -i -e 's#<pixman\.h#<pixman-1/pixman.h#g' ./fb/fb.h ./include/miscstruct.h .
 # support __filemansuffix__ with "x" suffix (per FHS 2.3)
 %{__sed} -i -e 's,\.so man__filemansuffix__/,.so man5/,' hw/xfree86/man/*.man
 
-%{__sed} -i -e '1s|#!/usr/bin/python$|#!%{__python}|' config/fdi2iclass.py
+%{__sed} -i -e '1s|#!/usr/bin/python$|#!%{__python3}|' config/fdi2iclass.py
 
 %build
 API=$(awk '/#define ABI_ANSIC_VERSION/ { split($0,A,/[(,)]/); printf("%d.%d",A[2], A[3]); }' hw/xfree86/common/xf86Module.h)
This page took 0.199187 seconds and 4 git commands to generate.