aboutsummaryrefslogtreecommitdiffhomepage
path: root/waftools
diff options
context:
space:
mode:
Diffstat (limited to 'waftools')
-rw-r--r--waftools/checks/custom.py26
-rw-r--r--waftools/fragments/lua.c24
-rw-r--r--waftools/fragments/lua_libquvi4.c3
-rw-r--r--waftools/fragments/lua_libquvi9.c3
4 files changed, 3 insertions, 53 deletions
diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py
index 20b18675db..fc57bd92d5 100644
--- a/waftools/checks/custom.py
+++ b/waftools/checks/custom.py
@@ -45,29 +45,12 @@ def check_iconv(ctx, dependency_identifier):
return check_libs(libs, checkfn)(ctx, dependency_identifier)
def check_lua(ctx, dependency_identifier):
- if ctx.dependency_satisfied('libquvi4'):
- quvi_lib_storage = [ 'libquvi4' ]
- additional_lua_test_header = '#include <quvi/quvi.h>'
- additional_lua_test_code = load_fragment('lua_libquvi4.c')
- elif ctx.dependency_satisfied('libquvi9'):
- quvi_lib_storage = [ 'libquvi9' ]
- additional_lua_test_header = '#include <quvi.h>'
- additional_lua_test_code = load_fragment('lua_libquvi9.c')
- else:
- quvi_lib_storage = []
- additional_lua_test_header = ''
- additional_lua_test_code = ''
-
- fragment = load_fragment('lua.c').format(
- additional_lua_test_header=additional_lua_test_header,
- additional_lua_test_code=additional_lua_test_code)
-
lua_versions = [
( '51', 'lua >= 5.1.0 lua < 5.2.0'),
( '51deb', 'lua5.1 >= 5.1.0'), # debian
( '51fbsd', 'lua-5.1 >= 5.1.0'), # FreeBSD
( 'luajit', 'luajit >= 2.0.0' ),
- # assume all our dependencies (libquvi in particular) link with 5.1
+ # assume all our dependencies link with 5.1
( '52', 'lua >= 5.2.0' ),
( '52deb', 'lua5.2 >= 5.2.0'), # debian
( '52fbsd', 'lua-5.2 >= 5.2.0'), # FreeBSD
@@ -78,11 +61,8 @@ def check_lua(ctx, dependency_identifier):
[lv for lv in lua_versions if lv[0] == ctx.options.LUA_VER]
for lua_version, pkgconfig_query in lua_versions:
- if compose_checks(
- check_pkg_config(pkgconfig_query, uselib_store=lua_version),
- check_cc(fragment=fragment,
- use=[lua_version] + quvi_lib_storage,
- execute=True))(ctx, dependency_identifier):
+ if check_pkg_config(pkgconfig_query, uselib_store=lua_version) \
+ (ctx, dependency_identifier):
# XXX: this is a bit of a hack, ask waf developers if I can copy
# the uselib_store to 'lua'
ctx.mark_satisfied(lua_version)
diff --git a/waftools/fragments/lua.c b/waftools/fragments/lua.c
deleted file mode 100644
index 896667b188..0000000000
--- a/waftools/fragments/lua.c
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <stdlib.h>
-#include <lua.h>
-#include <lualib.h>
-#include <lauxlib.h>
-
-// filled on the python side with .format()
-{additional_lua_test_header}
-
-static void test_lua(void) {{
- lua_State *L = luaL_newstate();
- lua_pushstring(L, "test");
- lua_setglobal(L, "test");
-}}
-
-static void test_other(void) {{
- // filled on the python side with .format()
- {additional_lua_test_code}
-}}
-
-int main(void) {{
- test_lua();
- test_other();
- return 0;
-}}
diff --git a/waftools/fragments/lua_libquvi4.c b/waftools/fragments/lua_libquvi4.c
deleted file mode 100644
index efcf30375a..0000000000
--- a/waftools/fragments/lua_libquvi4.c
+++ /dev/null
@@ -1,3 +0,0 @@
- quvi_t q;
- if (quvi_init(&q) == QUVI_OK)
- quvi_supported(q, "http://nope");
diff --git a/waftools/fragments/lua_libquvi9.c b/waftools/fragments/lua_libquvi9.c
deleted file mode 100644
index e25ea1a462..0000000000
--- a/waftools/fragments/lua_libquvi9.c
+++ /dev/null
@@ -1,3 +0,0 @@
- quvi_t q = quvi_new();
- if (quvi_ok(q))
- quvi_supports(q, "http://nope", QUVI_SUPPORTS_MODE_OFFLINE, QUVI_SUPPORTS_TYPE_MEDIA);