asterisk-16.x: sort out lua detection 531/head
authorSebastian Kemper <[email protected]>
Sat, 16 May 2020 18:55:27 +0000 (20:55 +0200)
committerSebastian Kemper <[email protected]>
Sat, 16 May 2020 19:00:25 +0000 (21:00 +0200)
We have both liblua and liblua5.3 in $(STAGING_DIR)/usr. But the headers
for liblua5.3 are in (STAGING_DIR)/usr/include/lua5.3. The way things
are now, Asterisk uses the headers from liblua and links against
liblua5.3.

The easiest way out of this is to turn off the lua detection that is
based on version numbers. The next detection looks for a version-less
lua, which works fine.

Signed-off-by: Sebastian Kemper <[email protected]>
net/asterisk-16.x/Makefile
net/asterisk-16.x/patches/140-use-default-lua.patch [new file with mode: 0644]

index 1d72cf7c8bdd03214a1a6e33471c2f098793d2d6..4b139ebe4ee0d9272305c5d7c7db4e20398c5c9c 100644 (file)
@@ -923,7 +923,7 @@ $(eval $(call BuildAsteriskModule,odbc,ODBC,ODBC support.,+libpthread +libc +uni
 $(eval $(call BuildAsteriskModule,pbx-ael,Asterisk Extension Logic,Asterisk Extension Language compiler.,+$(PKG_NAME)-res-ael-share,extensions.ael,pbx_ael,,))
 $(eval $(call BuildAsteriskModule,pbx-dundi,Dundi,Distributed Universal Number Discovery.,,dundi.conf,pbx_dundi,,))
 $(eval $(call BuildAsteriskModule,pbx-loopback,Loopback switch,Loopback switch.,,,pbx_loopback,,))
-$(eval $(call BuildAsteriskModule,pbx-lua,Lua,Lua PBX switch.,+liblua5.3,extensions.lua,pbx_lua,,))
+$(eval $(call BuildAsteriskModule,pbx-lua,Lua,Lua PBX switch.,+liblua,extensions.lua,pbx_lua,,))
 $(eval $(call BuildAsteriskModule,pbx-realtime,Realtime Switch,Realtime switch.,,,pbx_realtime,,))
 $(eval $(call BuildAsteriskModule,pbx-spool,Call Spool,Outgoing spool support.,,,pbx_spool,,))
 $(eval $(call BuildAsteriskModule,pgsql,PostgreSQL,PostgreSQL support.,+libpq,cel_pgsql.conf cdr_pgsql.conf res_pgsql.conf,cel_pgsql cdr_pgsql res_config_pgsql,,))
diff --git a/net/asterisk-16.x/patches/140-use-default-lua.patch b/net/asterisk-16.x/patches/140-use-default-lua.patch
new file mode 100644 (file)
index 0000000..c2ea912
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2556,7 +2556,11 @@ if test -z "$__opus_include" -o x"$__opu
+ fi
+ AST_EXT_LIB_CHECK([OPUSFILE], [opusfile], [op_open_callbacks], [opus/opusfile.h], [], [$__opus_include])
+-for ver in 5.3 5.2 5.1; do
++# This does not work for us. We have both liblua and liblua5.3 in
++# $(STAGING_DIR)/usr. But the headers for liblua5.3 are in
++# (STAGING_DIR)/usr/include/lua5.3. Using the below, Asterisk would
++# use the headers from liblua and link against liblua5.3 :/
++for ver in ; do
+       AST_EXT_LIB_CHECK([LUA], lua${ver}, [luaL_newstate], lua${ver}/lua.h, [-lm])
+       if test "x${PBX_LUA}" = "x1" ; then
+               if test x"${LUA_DIR}" = x; then