mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-23 05:37:27 +03:00
orca: 45.2 → 46.1
https://gitlab.gnome.org/GNOME/orca/-/compare/ORCA_45_2...ORCA_46_1
Regenerated the fix-paths.patch by searching usages of `subprocess`.
Port to meson.
No more pyatspi.
1c496c9ada
Move to by-name and use pkgs.callPackage so we don't have to write another
`inherit (pkgs.buildPackages) meson;`.
Changelog-Reviewed-By: Maxine Aubrey <max@ine.dev>
This commit is contained in:
parent
7b2a419358
commit
5c70aa0b68
@ -1,88 +0,0 @@
|
|||||||
diff --git a/src/orca/debug.py b/src/orca/debug.py
|
|
||||||
index b7e11ea60..9ab996765 100644
|
|
||||||
--- a/src/orca/debug.py
|
|
||||||
+++ b/src/orca/debug.py
|
|
||||||
@@ -447,7 +447,7 @@ def traceit(frame, event, arg):
|
|
||||||
return traceit
|
|
||||||
|
|
||||||
def getOpenFDCount(pid):
|
|
||||||
- procs = subprocess.check_output([ 'lsof', '-w', '-Ff', '-p', str(pid)])
|
|
||||||
+ procs = subprocess.check_output([ '@lsof@', '-w', '-Ff', '-p', str(pid)])
|
|
||||||
procs = procs.decode('UTF-8').split('\n')
|
|
||||||
files = list(filter(lambda s: s and s[0] == 'f' and s[1:].isdigit(), procs))
|
|
||||||
|
|
||||||
@@ -465,7 +465,7 @@ def getCmdline(pid):
|
|
||||||
return cmdline
|
|
||||||
|
|
||||||
def pidOf(procName):
|
|
||||||
- openFile = subprocess.Popen(f'pgrep {procName}',
|
|
||||||
+ openFile = subprocess.Popen(f'@pgrep@ {procName}',
|
|
||||||
shell=True,
|
|
||||||
stdout=subprocess.PIPE).stdout
|
|
||||||
pids = openFile.read()
|
|
||||||
diff --git a/src/orca/orca.py b/src/orca/orca.py
|
|
||||||
index d4e89f918..bb3e6cc1d 100644
|
|
||||||
--- a/src/orca/orca.py
|
|
||||||
+++ b/src/orca/orca.py
|
|
||||||
@@ -312,7 +312,7 @@ def updateKeyMap(keyboardEvent):
|
|
||||||
|
|
||||||
def _setXmodmap(xkbmap):
|
|
||||||
"""Set the keyboard map using xkbcomp."""
|
|
||||||
- p = subprocess.Popen(['xkbcomp', '-w0', '-', os.environ['DISPLAY']],
|
|
||||||
+ p = subprocess.Popen(['@xkbcomp@', '-w0', '-', os.environ['DISPLAY']],
|
|
||||||
stdin=subprocess.PIPE, stdout=None, stderr=None)
|
|
||||||
p.communicate(xkbmap)
|
|
||||||
|
|
||||||
@@ -389,7 +389,7 @@ def _storeXmodmap(keyList):
|
|
||||||
"""
|
|
||||||
|
|
||||||
global _originalXmodmap
|
|
||||||
- _originalXmodmap = subprocess.check_output(['xkbcomp', os.environ['DISPLAY'], '-'])
|
|
||||||
+ _originalXmodmap = subprocess.check_output(['@xkbcomp@', os.environ['DISPLAY'], '-'])
|
|
||||||
|
|
||||||
def _restoreXmodmap(keyList=[]):
|
|
||||||
"""Restore the original xmodmap values for the keys in keyList.
|
|
||||||
@@ -404,7 +404,7 @@ def _restoreXmodmap(keyList=[]):
|
|
||||||
|
|
||||||
global _capsLockCleared
|
|
||||||
_capsLockCleared = False
|
|
||||||
- p = subprocess.Popen(['xkbcomp', '-w0', '-', os.environ['DISPLAY']],
|
|
||||||
+ p = subprocess.Popen(['@xkbcomp@', '-w0', '-', os.environ['DISPLAY']],
|
|
||||||
stdin=subprocess.PIPE, stdout=None, stderr=None)
|
|
||||||
p.communicate(_originalXmodmap)
|
|
||||||
|
|
||||||
diff --git a/src/orca/orca_bin.py.in b/src/orca/orca_bin.py.in
|
|
||||||
index 9d64af948..ca9c9e083 100644
|
|
||||||
--- a/src/orca/orca_bin.py.in
|
|
||||||
+++ b/src/orca/orca_bin.py.in
|
|
||||||
@@ -65,7 +65,7 @@ class ListApps(argparse.Action):
|
|
||||||
name = "[DEAD]"
|
|
||||||
|
|
||||||
try:
|
|
||||||
- cmdline = subprocess.getoutput('cat /proc/%s/cmdline' % pid)
|
|
||||||
+ cmdline = subprocess.getoutput('@cat@ /proc/%s/cmdline' % pid)
|
|
||||||
except Exception:
|
|
||||||
cmdline = '(exception encountered)'
|
|
||||||
else:
|
|
||||||
@@ -198,7 +198,7 @@ def inGraphicalDesktop():
|
|
||||||
def otherOrcas():
|
|
||||||
"""Returns the pid of any other instances of Orca owned by this user."""
|
|
||||||
|
|
||||||
- openFile = subprocess.Popen('pgrep -u %s -x orca' % os.getuid(),
|
|
||||||
+ openFile = subprocess.Popen('@pgrep@ -u %s -x orca' % os.getuid(),
|
|
||||||
shell=True,
|
|
||||||
stdout=subprocess.PIPE).stdout
|
|
||||||
pids = openFile.read()
|
|
||||||
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
|
|
||||||
index ed8b155e4..0436cca42 100644
|
|
||||||
--- a/src/orca/script_utilities.py
|
|
||||||
+++ b/src/orca/script_utilities.py
|
|
||||||
@@ -144,7 +144,7 @@ class Utilities:
|
|
||||||
return ""
|
|
||||||
|
|
||||||
try:
|
|
||||||
- cmdline = subprocess.getoutput(f"cat /proc/{pid}/cmdline")
|
|
||||||
+ cmdline = subprocess.getoutput(f"@cat@ /proc/{pid}/cmdline")
|
|
||||||
except Exception:
|
|
||||||
return ""
|
|
||||||
|
|
75
pkgs/by-name/or/orca/fix-paths.patch
Normal file
75
pkgs/by-name/or/orca/fix-paths.patch
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
diff --git a/src/orca/debug.py b/src/orca/debug.py
|
||||||
|
index eb939a236..4e4db2e84 100644
|
||||||
|
--- a/src/orca/debug.py
|
||||||
|
+++ b/src/orca/debug.py
|
||||||
|
@@ -522,7 +522,7 @@ def traceit(frame, event, arg):
|
||||||
|
return traceit
|
||||||
|
|
||||||
|
def getOpenFDCount(pid):
|
||||||
|
- procs = subprocess.check_output([ 'lsof', '-w', '-Ff', '-p', str(pid)])
|
||||||
|
+ procs = subprocess.check_output([ '@lsof@', '-w', '-Ff', '-p', str(pid)])
|
||||||
|
procs = procs.decode('UTF-8').split('\n')
|
||||||
|
files = list(filter(lambda s: s and s[0] == 'f' and s[1:].isdigit(), procs))
|
||||||
|
|
||||||
|
@@ -540,7 +540,7 @@ def getCmdline(pid):
|
||||||
|
return cmdline
|
||||||
|
|
||||||
|
def pidOf(procName):
|
||||||
|
- openFile = subprocess.Popen(f'pgrep {procName}',
|
||||||
|
+ openFile = subprocess.Popen(f'@pgrep@ {procName}',
|
||||||
|
shell=True,
|
||||||
|
stdout=subprocess.PIPE).stdout
|
||||||
|
pids = openFile.read()
|
||||||
|
diff --git a/src/orca/orca_bin.py.in b/src/orca/orca_bin.py.in
|
||||||
|
index c6f99de14..2370204f3 100755
|
||||||
|
--- a/src/orca/orca_bin.py.in
|
||||||
|
+++ b/src/orca/orca_bin.py.in
|
||||||
|
@@ -62,7 +62,7 @@ class ListApps(argparse.Action):
|
||||||
|
name = "[DEAD]"
|
||||||
|
|
||||||
|
try:
|
||||||
|
- cmdline = subprocess.getoutput('cat /proc/%s/cmdline' % pid)
|
||||||
|
+ cmdline = subprocess.getoutput('@cat@ /proc/%s/cmdline' % pid)
|
||||||
|
except Exception:
|
||||||
|
cmdline = '(exception encountered)'
|
||||||
|
else:
|
||||||
|
@@ -195,7 +195,7 @@ def inGraphicalDesktop():
|
||||||
|
def otherOrcas():
|
||||||
|
"""Returns the pid of any other instances of Orca owned by this user."""
|
||||||
|
|
||||||
|
- openFile = subprocess.Popen('pgrep -u %s -x orca' % os.getuid(),
|
||||||
|
+ openFile = subprocess.Popen('@pgrep@ -u %s -x orca' % os.getuid(),
|
||||||
|
shell=True,
|
||||||
|
stdout=subprocess.PIPE).stdout
|
||||||
|
pids = openFile.read()
|
||||||
|
diff --git a/src/orca/orca_modifier_manager.py b/src/orca/orca_modifier_manager.py
|
||||||
|
index c45cd4a5b..3f2ec59f0 100644
|
||||||
|
--- a/src/orca/orca_modifier_manager.py
|
||||||
|
+++ b/src/orca/orca_modifier_manager.py
|
||||||
|
@@ -115,7 +115,7 @@ class OrcaModifierManager:
|
||||||
|
debug.printMessage(debug.LEVEL_INFO, msg, True)
|
||||||
|
|
||||||
|
self.unset_orca_modifiers(reason)
|
||||||
|
- self._original_xmodmap = subprocess.check_output(['xkbcomp', os.environ['DISPLAY'], '-'])
|
||||||
|
+ self._original_xmodmap = subprocess.check_output(['@xkbcomp@', os.environ['DISPLAY'], '-'])
|
||||||
|
self._create_orca_xmodmap()
|
||||||
|
|
||||||
|
def update_key_map(self, keyboard_event):
|
||||||
|
@@ -162,7 +162,7 @@ class OrcaModifierManager:
|
||||||
|
return
|
||||||
|
|
||||||
|
self._caps_lock_cleared = False
|
||||||
|
- p = subprocess.Popen(['xkbcomp', '-w0', '-', os.environ['DISPLAY']],
|
||||||
|
+ p = subprocess.Popen(['@xkbcomp@', '-w0', '-', os.environ['DISPLAY']],
|
||||||
|
stdin=subprocess.PIPE, stdout=None, stderr=None)
|
||||||
|
p.communicate(self._original_xmodmap)
|
||||||
|
|
||||||
|
@@ -223,7 +223,7 @@ class OrcaModifierManager:
|
||||||
|
if modified:
|
||||||
|
msg = "ORCA MODIFIER MANAGER: Updating xmodmap"
|
||||||
|
debug.printMessage(debug.LEVEL_INFO, msg, True)
|
||||||
|
- p = subprocess.Popen(['xkbcomp', '-w0', '-', os.environ['DISPLAY']],
|
||||||
|
+ p = subprocess.Popen(['@xkbcomp@', '-w0', '-', os.environ['DISPLAY']],
|
||||||
|
stdin=subprocess.PIPE, stdout=None, stderr=None)
|
||||||
|
p.communicate(bytes('\n'.join(lines), 'UTF-8'))
|
||||||
|
else:
|
@ -1,24 +1,20 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, buildPythonApplication
|
, meson
|
||||||
, autoreconfHook
|
, ninja
|
||||||
, wrapGAppsHook
|
, wrapGAppsHook
|
||||||
, gobject-introspection
|
, gobject-introspection
|
||||||
, gettext
|
, gettext
|
||||||
, yelp-tools
|
, yelp-tools
|
||||||
, itstool
|
, itstool
|
||||||
, python
|
, python3
|
||||||
, pygobject3
|
|
||||||
, gtk3
|
, gtk3
|
||||||
, gnome
|
, gnome
|
||||||
, substituteAll
|
, substituteAll
|
||||||
, at-spi2-atk
|
, at-spi2-atk
|
||||||
, at-spi2-core
|
, at-spi2-core
|
||||||
, pyatspi
|
|
||||||
, dbus
|
, dbus
|
||||||
, dbus-python
|
|
||||||
, pyxdg
|
|
||||||
, xkbcomp
|
, xkbcomp
|
||||||
, procps
|
, procps
|
||||||
, lsof
|
, lsof
|
||||||
@ -27,20 +23,18 @@
|
|||||||
, speechd
|
, speechd
|
||||||
, brltty
|
, brltty
|
||||||
, liblouis
|
, liblouis
|
||||||
, setproctitle
|
|
||||||
, gst_all_1
|
, gst_all_1
|
||||||
, gst-python
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "orca";
|
pname = "orca";
|
||||||
version = "45.2";
|
version = "46.1";
|
||||||
|
|
||||||
format = "other";
|
format = "other";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz";
|
url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz";
|
||||||
sha256 = "8PLFeaW+7f5WU7x/4kSBxNaqxd0fccHnoghZXzx473Y=";
|
hash = "sha256-z2deNQwYrA+ilDbGVZ0dqXX3///vqAjr5HbY+enRERQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
@ -54,7 +48,8 @@ buildPythonApplication rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
autoreconfHook
|
meson
|
||||||
|
ninja
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
pkg-config
|
pkg-config
|
||||||
gettext
|
gettext
|
||||||
@ -63,13 +58,13 @@ buildPythonApplication rec {
|
|||||||
gobject-introspection
|
gobject-introspection
|
||||||
];
|
];
|
||||||
|
|
||||||
pythonPath = [
|
pythonPath = with python3.pkgs; [
|
||||||
pygobject3
|
pygobject3
|
||||||
pyatspi
|
|
||||||
dbus-python
|
dbus-python
|
||||||
pyxdg
|
pyxdg
|
||||||
brltty
|
brltty
|
||||||
liblouis
|
liblouis
|
||||||
|
psutil
|
||||||
speechd
|
speechd
|
||||||
gst-python
|
gst-python
|
||||||
setproctitle
|
setproctitle
|
||||||
@ -78,7 +73,7 @@ buildPythonApplication rec {
|
|||||||
strictDeps = false;
|
strictDeps = false;
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
python
|
python3
|
||||||
gtk3
|
gtk3
|
||||||
at-spi2-atk
|
at-spi2-atk
|
||||||
at-spi2-core
|
at-spi2-core
|
||||||
@ -89,6 +84,12 @@ buildPythonApplication rec {
|
|||||||
gst_all_1.gst-plugins-good
|
gst_all_1.gst-plugins-good
|
||||||
];
|
];
|
||||||
|
|
||||||
|
dontWrapGApps = true; # Prevent double wrapping
|
||||||
|
|
||||||
|
preFixup = ''
|
||||||
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
||||||
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
updateScript = gnome.updateScript {
|
updateScript = gnome.updateScript {
|
||||||
packageName = pname;
|
packageName = pname;
|
@ -33748,10 +33748,6 @@ with pkgs;
|
|||||||
|
|
||||||
oranda = callPackage ../applications/misc/oranda { };
|
oranda = callPackage ../applications/misc/oranda { };
|
||||||
|
|
||||||
orca = python3Packages.callPackage ../applications/misc/orca {
|
|
||||||
inherit pkg-config;
|
|
||||||
};
|
|
||||||
|
|
||||||
orca-c = callPackage ../applications/audio/orca-c { };
|
orca-c = callPackage ../applications/audio/orca-c { };
|
||||||
|
|
||||||
organicmaps = qt6Packages.callPackage ../applications/misc/organicmaps { };
|
organicmaps = qt6Packages.callPackage ../applications/misc/organicmaps { };
|
||||||
|
Loading…
Reference in New Issue
Block a user