summaryrefslogtreecommitdiff
path: root/wm/awesome/patches/patch-tests_examples_CMakeLists.txt
blob: 96060b1d280e59e24ef86285e275f23dd297104f (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
36
$NetBSD: patch-tests_examples_CMakeLists.txt,v 1.1 2017/08/15 10:57:35 triaxx Exp $

Use pkgsrc lua interpreter instead of builtin one.

--- tests/examples/CMakeLists.txt.orig	2017-07-15 13:53:13.000000000 +0000
+++ tests/examples/CMakeLists.txt
@@ -12,7 +12,7 @@
 cmake_minimum_required(VERSION 3.0.0)
 
 # Get and update the LUA_PATH so the scripts can be executed without Awesome.
-execute_process(COMMAND lua -e print\(package.path\) OUTPUT_VARIABLE "LUA_PATH_")
+execute_process(COMMAND @LUA_INTERPRETER@ -e print\(package.path\) OUTPUT_VARIABLE "LUA_PATH_")
 
 # Make sure the system can be called from the test directory
 if(NOT SOURCE_DIR AND ${CMAKE_CURRENT_SOURCE_DIR} MATCHES "/tests/examples")
@@ -26,7 +26,7 @@ endif()
 
 if (DEFINED ENV{DO_COVERAGE} AND NOT $ENV{DO_COVERAGE} STREQUAL "0")
   execute_process(
-    COMMAND lua -e "require('luacov.runner')('${TOP_SOURCE_DIR}/.luacov')"
+    COMMAND @LUA_INTERPRETER@ -e "require('luacov.runner')('${TOP_SOURCE_DIR}/.luacov')"
     RESULT_VARIABLE TEST_RESULT
     ERROR_VARIABLE  TEST_ERROR
     ERROR_STRIP_TRAILING_WHITESPACE)
@@ -34,9 +34,9 @@ if (DEFINED ENV{DO_COVERAGE} AND NOT $EN
     message(${TEST_ERROR})
     message(FATAL_ERROR "Failed to run luacov.runner.")
   endif()
-  set(LUA_COV_RUNNER lua "-erequire('luacov.runner')('${TOP_SOURCE_DIR}/.luacov')")
+  set(LUA_COV_RUNNER @LUA_INTERPRETER@ "-erequire('luacov.runner')('${TOP_SOURCE_DIR}/.luacov')")
 else()
-  set(LUA_COV_RUNNER lua)
+  set(LUA_COV_RUNNER @LUA_INTERPRETER@)
 endif()
 
 # Add the main awesome lua libraries.