aboutsummaryrefslogtreecommitdiff
path: root/lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch
blob: d6da3fe1f51fd27a0a568db3cfe51f1562a212b7 (plain)
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
--- a/configure
+++ b/configure
@@ -388,18 +388,22 @@ then
 fi
 
 echo_n "Configuring for system... "
-if uname -s
-then
-   LUAROCKS_UNAME_S=`uname -s`
-else
-   die "Could not determine operating system. 'uname -s' failed."
+if [ -z "$LUAROCKS_UNAME_S" ]; then
+    if uname -s
+    then
+        LUAROCKS_UNAME_S=`uname -s`
+    else
+        die "Could not determine operating system. 'uname -s' failed."
+    fi
 fi
 echo_n "Configuring for architecture... "
-if uname -m
-then
-   LUAROCKS_UNAME_M=`uname -m`
-else
-   die "Could not determine processor architecture. 'uname -m' failed."
+if [ -z "$LUAROCKS_UNAME_M" ]; then
+    if uname -m
+    then
+        LUAROCKS_UNAME_M=`uname -m`
+    else
+        die "Could not determine processor architecture. 'uname -m' failed."
+    fi
 fi
 
 for v in 5.1 5.2 5.3; do