Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports
Path: blob/main/accessibility/onboard/files/patch-setup.py
46590 views
1
--- setup.py.orig 2026-04-11 20:15:35 UTC
2
+++ setup.py
3
@@ -160,7 +160,7 @@ def clean_before_build(command):
4
if command in ["build", "build_ext", "clean", "sdist"]:
5
print("removing __pycache__ directories recursively")
6
subprocess.check_call(
7
- ['/bin/bash', '-c', "find . -name '__pycache__*' -prune | xargs rm -rf"])
8
+ ['/bin/sh', '-c', "find . -name '__pycache__*' -prune | xargs rm -rf"])
9
10
# Symlinked extension libraries trip up "setup.py sdist". Delete them.
11
if command in ["clean", "sdist"]:
12
@@ -313,8 +313,7 @@ class Extension_lm(Extension):
13
libraries = [],
14
define_macros=[('NDEBUG', '1')],
15
extra_compile_args=[
16
- "-Wsign-compare",
17
- "-Wlogical-op"],
18
+ "-Wsign-compare"],
19
)
20
21
extension_lm = Extension_lm("Onboard", "Onboard")
22
@@ -401,7 +400,7 @@ class build_i18n_custom(DistUtilsExtra.auto.build_i18n
23
# Get the autostart directory
24
autostart_destination = os.path.join(config_path, "autostart")
25
else:
26
- autostart_destination = '/etc/xdg/autostart'
27
+ autostart_destination = 'etc/xdg/autostart'
28
29
30
for i, file_set in enumerate(self.distribution.data_files):
31
@@ -439,33 +438,6 @@ class CustomInstallCommand(install):
32
# Run the default installation
33
install.run(self)
34
35
- # Only run this if NOT inside a fakeroot environment
36
- if not os.getenv("FAKEROOTKEY"):
37
- print("Running tools/gen_gschema.py...")
38
-
39
-
40
-
41
- # Correct install base from setuptools
42
- install_base = Path(self.install_data)
43
- schema_dir = install_base / "share" / "glib-2.0" / "schemas"
44
-
45
-
46
- # Ensure the schema directory exists
47
- schema_dir.mkdir(parents=True, exist_ok=True)
48
-
49
- print("Running glib-compile-schemas...")
50
-
51
- try:
52
- if os.path.exists(schema_dir):
53
- subprocess.check_call(["glib-compile-schemas", schema_dir])
54
- else:
55
- print(f"Warning: Schema directory not found: {schema_dir}")
56
- except subprocess.CalledProcessError as e:
57
- print(f"Error running glib-compile-schemas: {e}")
58
- sys.exit(1)
59
- else:
60
- print("Skipping tools/gen_gschema.py and glib-compile-schemas since this is a fakeroot environment.")
61
-
62
class UninstallCommand(Command):
63
"""Custom uninstall command to remove all installed files"""
64
65
@@ -621,16 +593,8 @@ DistUtilsExtra.auto.setup(
66
description = 'Simple On-screen Keyboard',
67
68
packages = ['Onboard', 'Onboard.pypredict'],
69
- data_files = [('share/glib-2.0/schemas', glob.glob('data/*.gschema.xml')),
70
+ data_files = [('share/glib-2.0/schemas', glob.glob('data/org.onboard.gschema.xml')),
71
('share/dbus-1/services', glob.glob('data/org.onboard.Onboard.service')),
72
- ('share/doc/onboard', glob.glob('AUTHORS')),
73
- ('share/doc/onboard', glob.glob('CHANGELOG')),
74
- ('share/doc/onboard', glob.glob('COPYING*')),
75
- ('share/doc/onboard', glob.glob('HACKING')),
76
- ('share/doc/onboard', glob.glob('DBUS.md')),
77
- ('share/doc/onboard', glob.glob('README.md')),
78
- ('share/doc/onboard', glob.glob('onboard-defaults.conf.example')),
79
- ('share/doc/onboard', glob.glob('onboard-default-settings.gschema.override.example')),
80
('share/icons/hicolor/16x16/apps', glob.glob('icons/hicolor/16/*')),
81
('share/icons/hicolor/22x22/apps', glob.glob('icons/hicolor/22/*')),
82
('share/icons/hicolor/24x24/apps', glob.glob('icons/hicolor/24/*')),
83
@@ -650,17 +614,13 @@ DistUtilsExtra.auto.setup(
84
('share/onboard/models', glob.glob('models/*.lm')),
85
('share/onboard/tools', glob.glob('Onboard/pypredict/tools/checkmodels')),
86
('share/onboard/emojione/svg', glob.glob('emojione/svg/*.svg')),
87
- ('share/gnome-shell/extensions/[email protected]',
88
- glob_files('gnome/{}/[email protected]/*'.format(gnome_shell_version))),
89
- ('share/gnome-shell/extensions/[email protected]/schemas',
90
- glob_files('gnome/{}/[email protected]/schemas/*'.format(gnome_shell_version))),
91
],
92
93
scripts = ['onboard', 'onboard-settings'],
94
95
options={
96
'build_scripts': {
97
- 'executable': '/usr/bin/python3'
98
+ 'executable': '%%PYTHON_CMD%%'
99
}
100
},
101
102
103