- python-3.11.patch/buildrequire python311-base

* fixes build on Leap 15.6 and sle15-sp7

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xkeyboard-config?expand=0&rev=190
This commit is contained in:
Stefan Dirsch 2024-12-09 13:44:33 +00:00 committed by Git OBS Bridge
commit 74da6f5e48
8 changed files with 1594 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,18 @@
--- xkeyboard-config-2.27.orig/rules/base.xml 2019-10-11 19:01:38.759363000 +0200
+++ xkeyboard-config-2.27/rules/base.xml 2019-10-11 19:04:18.071327000 +0200
@@ -6229,6 +6229,7 @@
<description>Right Alt (while pressed)</description>
</configItem>
</option>
+ <!--
<option>
<configItem>
<name>grp:lswitch</name>
@@ -6241,6 +6242,7 @@
<description>Left Win (while pressed)</description>
</configItem>
</option>
+ -->
<option>
<configItem>
<name>grp:rwin_switch</name>

View File

@ -0,0 +1,16 @@
diff -u -r xkeyboard-config-2.42.orig/rules/base.xml xkeyboard-config-2.42/rules/base.xml
--- xkeyboard-config-2.42.orig/rules/base.xml 2024-10-28 11:16:26.702599000 +0100
+++ xkeyboard-config-2.42/rules/base.xml 2024-10-28 11:36:02.956383000 +0100
@@ -3375,6 +3375,12 @@
<variantList>
<variant>
<configItem>
+ <name>kotoistus</name>
+ <description>Finnish (official)</description>
+ </configItem>
+ </variant>
+ <variant>
+ <configItem>
<name>winkeys</name>
<description>Finnish (Windows)</description>
</configItem>

75
python-3.11.patch Normal file
View File

@ -0,0 +1,75 @@
diff -u -r -p xkeyboard-config-2.42.orig/meson.build xkeyboard-config-2.42/meson.build
--- xkeyboard-config-2.42.orig/meson.build 2024-12-09 14:33:33.685493000 +0100
+++ xkeyboard-config-2.42/meson.build 2024-12-09 14:35:09.281509000 +0100
@@ -77,7 +77,7 @@ endif
# pytest suite
pymod = import('python')
-python = pymod.find_installation('python3',
+python = pymod.find_installation('python3.11',
modules: ['pytest'],
required: false)
pytest = find_program('pytest-3', 'pytest', required: false)
@@ -86,7 +86,7 @@ if enable_pytest
pytest_args = ['--verbose', '--log-level=DEBUG']
# use pytest xdist if available, it really speeds up the tests cases
optional_python_modules = ['xdist']
- if pymod.find_installation('python3', modules: optional_python_modules, required: false).found()
+ if pymod.find_installation('python3.11', modules: optional_python_modules, required: false).found()
pytest_args += ['-n', 'auto']
endif
diff -u -r -p xkeyboard-config-2.42.orig/rules/compat/map-variants.py xkeyboard-config-2.42/rules/compat/map-variants.py
--- xkeyboard-config-2.42.orig/rules/compat/map-variants.py 2024-12-09 14:33:37.968787000 +0100
+++ xkeyboard-config-2.42/rules/compat/map-variants.py 2024-12-09 14:35:19.598496000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python3.11
import argparse
import re
diff -u -r -p xkeyboard-config-2.42.orig/rules/generate-options-symbols.py xkeyboard-config-2.42/rules/generate-options-symbols.py
--- xkeyboard-config-2.42.orig/rules/generate-options-symbols.py 2024-12-09 14:33:38.057788000 +0100
+++ xkeyboard-config-2.42/rules/generate-options-symbols.py 2024-12-09 14:35:24.650708000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python3.11
#
# This file is formatted with python black
#
diff -u -r -p xkeyboard-config-2.42.orig/rules/merge.py xkeyboard-config-2.42/rules/merge.py
--- xkeyboard-config-2.42.orig/rules/merge.py 2024-12-09 14:33:38.086824000 +0100
+++ xkeyboard-config-2.42/rules/merge.py 2024-12-09 14:35:28.163506000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python3.11
import argparse
import sys
diff -u -r -p xkeyboard-config-2.42.orig/scripts/symbols-tree.py xkeyboard-config-2.42/scripts/symbols-tree.py
--- xkeyboard-config-2.42.orig/scripts/symbols-tree.py 2024-12-09 14:33:38.372760000 +0100
+++ xkeyboard-config-2.42/scripts/symbols-tree.py 2024-12-09 14:35:31.811319000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python3.11
#
# Builds a tree view of a symbols file (showing all includes)
#
diff -u -r -p xkeyboard-config-2.42.orig/tests/test_rules_xml.py xkeyboard-config-2.42/tests/test_rules_xml.py
--- xkeyboard-config-2.42.orig/tests/test_rules_xml.py 2024-12-09 14:33:45.854374000 +0100
+++ xkeyboard-config-2.42/tests/test_rules_xml.py 2024-12-09 14:35:35.266642000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python3.11
#
# Call with pytest. Requires XKB_CONFIG_ROOT to be set
diff -u -r -p xkeyboard-config-2.42.orig/tests/test_xkb_symbols.py xkeyboard-config-2.42/tests/test_xkb_symbols.py
--- xkeyboard-config-2.42.orig/tests/test_xkb_symbols.py 2024-12-09 14:33:45.884365000 +0100
+++ xkeyboard-config-2.42/tests/test_xkb_symbols.py 2024-12-09 14:35:39.039457000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python3.11
#
# Call with pytest. Requires XKB_CONFIG_ROOT to be set

BIN
xkeyboard-config-2.42.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

1366
xkeyboard-config.changes Normal file

File diff suppressed because it is too large Load Diff

92
xkeyboard-config.spec Normal file
View File

@ -0,0 +1,92 @@
#
# spec file for package xkeyboard-config
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: xkeyboard-config
Version: 2.42
Release: 0
Summary: The X Keyboard Extension
License: GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
Group: System/X11/Utilities
URL: https://www.freedesktop.org/Software/XKeyboardConfig
Source: https://xorg.freedesktop.org/archive/individual/data/%{name}/%{name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE disable-2xalt_2xctrl-toggle.diff fdo#4927 -- This is just a workaround until fdo#4927 is fixed
Patch109: n_disable-2xalt_2xctrl-toggle.diff
Patch110: n_fi-kotoistus-metainfo.patch
%if 0%{?suse_version} < 1550
Patch0: python-3.11.patch
%endif
BuildRequires: fdupes
BuildRequires: intltool
BuildRequires: meson
BuildRequires: pkgconfig
%if 0%{?suse_version} < 1550
BuildRequires: python311-base
%else
BuildRequires: python3-base
%endif
BuildRequires: xsltproc
BuildRequires: perl(XML::Parser)
BuildRequires: pkgconfig(xorg-macros) >= 1.12
Requires(post): coreutils
BuildArch: noarch
%description
The X Keyboard Extension essentially replaces the core protocol
definition of keyboard. The extension makes possible to clearly and
explicitly specify most aspects of keyboard behaviour on per-key basis
and to more closely track the logical and physical state of the
keyboard. It also includes a number of keyboard controls designed to
make keyboards more accessible to people with physical impairments.
%lang_package
%prep
%autosetup -p1
%build
%{meson} \
-Dxkb-base=%{_datadir}/X11/xkb \
-Dcompat-rules=true \
-Dxorg-rules-symlinks=true
%{meson_build}
%install
%{meson_install}
mkdir -p %{buildroot}%{_localstatedir}/lib/xkb
# Bug 335553
mkdir -p %{buildroot}%{_localstatedir}/lib/xkb/compiled/
ln -snf %{_localstatedir}/lib/xkb/compiled/ %{buildroot}%{_datadir}/X11/xkb/compiled
%find_lang %{name}
%fdupes -s %{buildroot}%{_datadir}/X11/xkb
%post
rm -rf %{_localstatedir}/lib/xkb/compiled/server*.xkm
%files
%license COPYING
%doc AUTHORS README docs/HOWTO.* docs/README.*
%dir %{_localstatedir}/lib/xkb
%dir %{_localstatedir}/lib/xkb/compiled
%dir %{_datadir}/X11
%{_datadir}/X11/xkb/
%{_datadir}/pkgconfig/*.pc
%{_mandir}/man7/*
%files lang -f %{name}.lang
%changelog