openbsd-ports/multimedia/devede/patches/patch-src_devedeng_configuration_data_py
2022-03-11 19:39:15 +00:00

46 lines
1.9 KiB
Plaintext

Index: src/devedeng/configuration_data.py
--- src/devedeng/configuration_data.py.orig
+++ src/devedeng/configuration_data.py
@@ -43,11 +43,8 @@ class configuration(GObject.GObject):
def fill_config(self):
self.cores = 0
- proc_file = open("/proc/cpuinfo", "r")
- for line in proc_file:
- if (line.startswith("processor")):
- self.cores += 1
- proc_file.close()
+ if (os.name == "posix"):
+ self.cores = os.cpu_count()
is_local = None
self.log = ""
@@ -62,7 +59,7 @@ class configuration(GObject.GObject):
if is_local is None:
try:
- os.stat("/usr/local/share/devedeng/wselect_disk.ui")
+ os.stat("${PREFIX}/share/devedeng/wselect_disk.ui")
is_local = True
except:
pass
@@ -73,12 +70,12 @@ class configuration(GObject.GObject):
if (is_local):
# locales must be always at /usr/share/locale because
# Gtk.Builder always search there
- self.share_locale = "/usr/share/locale"
- self.glade = "/usr/local/share/devedeng"
- self.font_path = "/usr/local/share/devedeng"
- self.pic_path = "/usr/local/share/devedeng"
- self.other_path = "/usr/local/share/devedeng"
- self.help_path = "/usr/local/share/doc/devedeng"
+ self.share_locale = "${PREFIX}/share/locale"
+ self.glade = "${PREFIX}/share/devedeng"
+ self.font_path = "${PREFIX}/share/devedeng"
+ self.pic_path = "${PREFIX}/share/devedeng"
+ self.other_path = "${PREFIX}/share/devedeng"
+ self.help_path = "${PREFIX}/share/doc/devedeng"
else:
self.share_locale = "/usr/share/locale"
self.glade = "/usr/share/devedeng"