]> git.pld-linux.org Git - packages/asterisk.git/commitdiff
- fix lua
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 30 Dec 2009 19:30:33 +0000 (19:30 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- hacks for h323 proper linking
- chan_h323 somewhy makes chan_skype not to load at all (?!)

Changed files:
    asterisk.spec -> 1.150
    lua51-path.patch -> 1.1

asterisk.spec
lua51-path.patch [new file with mode: 0644]

index a81c730e37040206dd79852a0733c37cdcb75312..55b2647360ee46a6ccff3f406c3cb11c5ec9f825 100644 (file)
@@ -21,7 +21,7 @@
 #   and  /usr/lib64/asterisk/modules/app_directory_imap.so
 # - lua not detected
 # - ncurses dep gone for good (replaced by libedit)?
-# - make as-needed compatible
+# - make as-needed compatible, or why chan_h323 gets built w/o libs initially?
 #
 # Conditional build:
 %bcond_with    rxfax           # without rx (also tx:-D) fax
@@ -34,7 +34,7 @@
 %bcond_without verbose         # verbose build
 
 %define                spandsp_version 0.0.2pre26
-%define                rel     0.23
+%define                rel     0.28
 Summary:       Asterisk PBX
 Summary(pl.UTF-8):     Centralka (PBX) Asterisk
 Name:          asterisk
@@ -51,6 +51,7 @@ Source10:     http://soft-switch.org/downloads/spandsp/spandsp-%{spandsp_version}/as
 # Source10-md5:        8c8fcb263b76897022b4c28052a7b439
 Source11:      http://soft-switch.org/downloads/spandsp/spandsp-%{spandsp_version}/asterisk-1.2.x/app_rxfax.c
 # Source11-md5:        ab6983b51c412883545b36993d704999
+Patch1:                lua51-path.patch
 Patch2:                %{name}-no_k6_on_sparc.patch
 Patch3:                %{name}-lib.patch
 Patch4:                %{name}-ppc.patch
@@ -87,6 +88,7 @@ BuildRequires:        libcap-devel
 BuildRequires: libedit-devel
 BuildRequires: libogg-devel
 BuildRequires: libvorbis-devel
+BuildRequires: lua51-devel
 BuildRequires: mISDNuser-devel
 BuildRequires: mysql-devel
 BuildRequires: ncurses-devel
@@ -134,15 +136,11 @@ BuildRequires:    libss7-devel >= 1.0.1
 BuildRequires: libtool-ltdl-devel
 BuildRequires: libusb-devel
 BuildRequires: lm_sensors-devel
-BuildRequires: lua-devel
 BuildRequires: mISDN-devel
 %endif
 Requires:      rc-scripts
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-# h323 for sure broken
-%define                filterout_ld    -Wl,--as-needed
-
 %description
 Asterisk is an Open Source PBX and telephony development platform that
 can both replace a conventional PBX and act as a platform for
@@ -443,6 +441,7 @@ local filesystem.
 
 %prep
 %setup -q
+%patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
@@ -485,6 +484,7 @@ rm -f pbx/.depend
 %{__autoconf}
 
 export ASTCFLAGS="%{rpmcflags}"
+export ASTLDFLAGS="%{rpmldflags}"
 export WGET="/bin/true"
 
 # be sure to invoke ./configure with our flags
@@ -514,6 +514,10 @@ cd ../..
 
 cp -f .cleancount .lastclean
 
+# included conditionally, so make sure its there first
+%{__make} -C channels/h323 Makefile.ast \
+       %{?with_verbose:NOISY_BUILD=yes} \
+
 %{__make} DEBUG= \
        OPTIMIZE= \
        ASTVARRUNDIR=%{_localstatedir}/run/asterisk \
@@ -522,6 +526,10 @@ cp -f .cleancount .lastclean
        ASTDBDIR=%{_localstatedir}/spool/asterisk \
        %{?with_verbose:NOISY_BUILD=yes} \
 
+# rm, as it links it wrong for the fist time
+# i.e the flags written to file "channels/h323/Makefile.ast" are not yet there
+rm channels/*.so
+
 rm apps/app_voicemail.o apps/app_directory.o
 mv apps/app_voicemail.so apps/app_voicemail_plain.so
 mv apps/app_directory.so apps/app_directory_plain.so
@@ -1044,7 +1052,7 @@ chown -R asterisk:asterisk /var/lib/asterisk
 %files lua
 %defattr(644,root,root,755)
 %attr(640,root,asterisk) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/asterisk/extensions.lua
-#%attr(755,root,root) %{_libdir}/asterisk/modules/pbx_lua.so
+%attr(755,root,root) %{_libdir}/asterisk/modules/pbx_lua.so
 
 %files ldap
 %defattr(644,root,root,755)
diff --git a/lua51-path.patch b/lua51-path.patch
new file mode 100644 (file)
index 0000000..c217406
--- /dev/null
@@ -0,0 +1,29 @@
+--- asterisk-1.6.1.12/configure.ac~    2009-12-30 19:53:27.000000000 +0200
++++ asterisk-1.6.1.12/configure.ac     2009-12-30 20:01:28.604197217 +0200
+@@ -1400,9 +1400,9 @@
+               [${PWLIB_INCLUDE}], [${PWLIB_LIB}])
+ fi
+-AST_EXT_LIB_CHECK([LUA], [lua5.1], [luaL_newstate], [lua5.1/lua.h], [-lm]) 
++AST_EXT_LIB_CHECK([LUA], [lua51], [luaL_newstate], [lua51/lua.h], [-lm]) 
+ if test "x${PBX_LUA}" = "x1" ; then
+-      AC_DEFINE_UNQUOTED([LUA51_PREFIX], [1], [Define to 1 if lua is found with a lua5.1 prefix])
++      AC_DEFINE_UNQUOTED([LUA51_PREFIX], [1], [Define to 1 if lua is found with a lua51 prefix])
+ fi
+       
+ # Some distributions (like SuSE) remove the 5.1 suffix.
+--- asterisk-1.6.1.12/pbx/pbx_lua.c~   2009-11-25 17:44:45.000000000 +0200
++++ asterisk-1.6.1.12/pbx/pbx_lua.c    2009-12-30 20:01:48.084048158 +0200
+@@ -43,9 +43,9 @@
+ #include "asterisk/hashtab.h"
+ #ifdef LUA51_PREFIX
+-#include <lua5.1/lua.h>
+-#include <lua5.1/lauxlib.h>
+-#include <lua5.1/lualib.h>
++#include <lua51/lua.h>
++#include <lua51/lauxlib.h>
++#include <lua51/lualib.h>
+ #else
+ #include <lua.h>
+ #include <lauxlib.h>
This page took 0.142532 seconds and 4 git commands to generate.