opnsense-ports/math/py-python-igraph/files/patch-src_igraph_configuration.py
Franco Fichtner 82d38e24ca */*: sync with upstream
Taken from: HardenedBSD
2021-01-04 16:40:32 +01:00

21 lines
944 B
Python

--- src/igraph/configuration.py.orig 2020-10-08 10:13:28 UTC
+++ src/igraph/configuration.py
@@ -56,6 +56,18 @@ def get_platform_image_viewer():
if os.path.isfile(full_path):
return full_path
return ""
+ elif plat == "FreeBSD":
+ # FreeBSD also has a whole lot of choices, try to find one
+ choices = ["eog", "gthumb", "geeqie", "display",
+ "gpicview", "gwenview", "qiv", "gimv", "ristretto",
+ "geeqie", "eom"]
+ paths = ["%%LOCALBASE%%/bin"]
+ for path in paths:
+ for choice in choices:
+ full_path = os.path.join(path, choice)
+ if os.path.isfile(full_path):
+ return full_path
+ return ""
elif plat == "Windows" or plat == "Microsoft": # Thanks to Dale Hunscher
# Use the built-in Windows image viewer, if available
return "start"