aboutsummaryrefslogtreecommitdiff
path: root/devel/ice37/files/patch-scripts-Util.py
blob: 18d8b6fb30f740cca348738592318529a799ee3a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
--- scripts/Util.py.orig	2022-01-15 23:22:20 UTC
+++ scripts/Util.py
@@ -263,7 +263,7 @@ class Platform(object):
         elif Mapping.getByName("cpp"):
             cwd = Mapping.getByName("cpp").getPath()
 
-        output = run('make print V="{0}"'.format(" ".join(variables.keys())), cwd=cwd)
+        output = run('gmake print V="{0}"'.format(" ".join(variables.keys())), cwd=cwd)
         for l in output.split("\n"):
             match = re.match(r'^.*:.*: (.*) = (.*)', l)
             if match and match.group(1):
@@ -348,6 +348,29 @@ class AIX(Platform):
     def getInstallDir(self):
         return "/opt/freeware"
 
+class FreeBSD(Platform):
+
+    def __init__(self):
+        self.nugetPackageCache = None
+        self._hasNodeJS = None
+        self._hasSwift = None
+
+    def hasOpenSSL(self):
+        return True
+
+    def getSliceDir(self, iceDir):
+        installDir = self.getInstallDir(mapping, current)
+        return os.path.join(installDir, "slice")
+
+    def getDefaultExe(self, name, config):
+        if name == "icebox":
+            if config.cpp11:
+                name += "++11"
+        return name
+
+    def canRun(self, mapping, current):
+        return Platform.canRun(self, mapping, current)
+
 class Linux(Platform):
 
     def __init__(self):
@@ -1443,7 +1466,7 @@
         # Look for slice2py installed by pip if not found in the bin directory
         #
         if self.exe == "slice2py":
-            translator = self.getMapping(current).getCommandLine(current, self, self.getExe(current), "")
+            translator = self.getMapping(current).getCommandLine(current, self, "%%LOCALBASE%%/bin/slice2py", "")
             if not os.path.exists(translator):
                 translator = sys.executable + " -m slice2py"
             return (translator + " " + args).strip()
@@ -4059,6 +4082,8 @@ if sys.platform == "darwin":
     platform = Darwin()
 elif sys.platform.startswith("aix"):
     platform = AIX()
+elif sys.platform.startswith("freebsd"):
+    platform = FreeBSD()
 elif sys.platform.startswith("linux") or sys.platform.startswith("gnukfreebsd"):
     platform = Linux()
 elif sys.platform == "win32" or sys.platform[:6] == "cygwin":