odbc_cdr \
opus \
oreka \
+ perl \
png \
pocketsphinx \
posix_timer \
exit 0
endef
+define Package/$(PKG_NAME)-misc-perl-esl
+$(call Package/$(PKG_NAME)/Default)
+ TITLE:=Perl ESL
+ DEPENDS:=$(PKG_NAME) +PACKAGE_$(PKG_NAME)-misc-perl-esl:perl
+endef
+
+define Package/$(PKG_NAME)-misc-perl-esl/description
+This package contains the Perl binding for FreeSWITCH's Event Socket
+Library (ESL).
+endef
+
+define Package/$(PKG_NAME)-misc-perl-esl/install
+ $(INSTALL_DIR) $(1)$$(PERL_SITELIB)/ESL
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)$$(PERL_SITELIB)/ESL.pm \
+ $(1)$$(PERL_SITELIB)
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)$$(PERL_SITELIB)/ESL.so \
+ $(1)$$(PERL_SITELIB)
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)$$(PERL_SITELIB)/ESL/Dispatch.pm \
+ $(1)$$(PERL_SITELIB)/ESL
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)$$(PERL_SITELIB)/ESL/IVR.pm \
+ $(1)$$(PERL_SITELIB)/ESL
+endef
+
define Package/$(PKG_NAME)-misc-python-esl
$(call Package/$(PKG_NAME)/Default)
TITLE:=Python ESL
ifeq ($(CONFIG_FS_STABLE_WITH_MODCONF),y)
$(call Package/$(PKG_NAME)/install/dir,$$(1)$(FS_STABLE_EXAMPLES_DIR)/mod_$(1),$(PKG_BUILD_DIR)/src/mod/*/mod_$(1)/conf)
endif
+ifeq ($(1),perl)
+ $(INSTALL_DIR) $$(1)$$(PERL_SITELIB)/auto
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)$(FS_STABLE_PREFIX_DIR)/perl/$(PRG_NAME).pm \
+ $$(1)$$(PERL_SITELIB)
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)$(FS_STABLE_PREFIX_DIR)/perl/$(PRG_NAME).so \
+ $$(1)$$(PERL_SITELIB)/auto
+endif
ifeq ($(1),python)
$(INSTALL_DIR) $$(1)$(PYTHON_PKG_DIR)
$(INSTALL_DATA) \
$$(eval $$(call BuildPackage,$(PKG_NAME)-util-$(1)))
endef
-# we neither need host-perl nor host-php
+# don't want host-php
CONFIGURE_VARS+= \
- ac_cv_prog_PERL=false \
- ac_cv_have_perl=no \
ac_cv_prog_PHP=false \
ac_cv_have_php=no \
ac_cv_prog_PHP_CONFIG=false \
CONFIGURE_VARS+= \
disable_cc=yes
+# Perl setup start
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl)$(CONFIG_PACKAGE_$(PKG_NAME)-mod-perl),)
+
+FS_STABLE_PERL_FEED:=$(TOPDIR)/feeds/packages/lang/perl
+
+FS_STABLE_PERL_LIBS:=$(shell grep "^libs=" \
+ $(FS_STABLE_PERL_FEED)/files/base.config | \
+ sed "s/^libs=//;s/'//g")
+
+include $(FS_STABLE_PERL_FEED)/perlmod.mk
+
+CONFIGURE_VARS+= \
+ ac_cv_lib_perl_perl_alloc=yes
+
+CONFIGURE_VARS+= \
+ PERL="$(PERL_CMD)" \
+ PERL_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -I$(STAGING_DIR)$(PERL_SITELIB)/CORE" \
+ PERL_INC="-I$(STAGING_DIR)$(PERL_SITELIB)/CORE" \
+ PERL_LDFLAGS="-fPIC -Wl,-rpath,$(PERL_SITELIB)/CORE -L$(STAGING_DIR)$(PERL_SITELIB)/CORE -lperl" \
+ PERL_LIBDIR="-L$(PERL_SITELIB)/CORE" \
+ PERL_LIBS="-lpthread $(FS_STABLE_PERL_LIBS) $(EXTRA_LIBDIRS:%=-L%) $(EXTRA_LIBS:%=-l%)" \
+ PERL_SITEDIR="$(PERL_SITELIB)"
+
+else
+
+CONFIGURE_VARS+= \
+ ac_cv_prog_PERL=false \
+ ac_cv_have_perl=no
+
+endif
+# Perl setup end
+
# Python setup start
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl)$(CONFIG_PACKAGE_$(PKG_NAME)-mod-python),)
define Build/Compile
$(call Build/Compile/Default)
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),)
+ $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl perlmod)
+endif
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl),)
$(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl pymod)
endif
define Build/Install
$(call Build/Install/Default)
+ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-perl-esl),)
+ $(call Build/Compile/Default,-C $(PKG_BUILD_DIR)/libs/esl DESTDIR=$(PKG_INSTALL_DIR) perlmod-install)
+endif
ifneq ($(CONFIG_PACKAGE_$(PKG_NAME)-misc-python-esl),)
$(call Build/Install/Default,-C $(PKG_BUILD_DIR)/libs/esl pymod-install)
endif
$(eval $(call BuildPackage,$(PKG_NAME)))
$(eval $(call BuildPackage,$(PKG_NAME)-misc-hotplug))
+$(eval $(call BuildPackage,$(PKG_NAME)-misc-perl-esl))
$(eval $(call BuildPackage,$(PKG_NAME)-misc-python-esl))
$(eval $(call BuildPackage,$(PKG_NAME)-misc-timezones))
$(eval $(call Package/$(PKG_NAME)/Module,odbc_cdr,ODBC CDR,ODBC Call Detail Record handler.,))
$(eval $(call Package/$(PKG_NAME)/Module,opus,Opus,Opus codec support.,+libopus))
$(eval $(call Package/$(PKG_NAME)/Module,oreka,Oreka,This module provides media recording with the Oreka cross-platform\naudio stream recording and retrieval system.,))
+$(eval $(call Package/$(PKG_NAME)/Module,perl,Perl,This package contains mod_perl for FreeSWITCH.,@PERL_THREADS PACKAGE_$(PKG_NAME)-mod-perl:perl +libdb47 +libgdbm))
$(eval $(call Package/$(PKG_NAME)/Module,png,PNG,Allows playback of video using PNG files.,))
$(eval $(call Package/$(PKG_NAME)/Module,pocketsphinx,Pocketsphinx,This module allows speech recognition. You might want to install\n$(PKG_NAME)-misc-grammar as well.,))
$(eval $(call Package/$(PKG_NAME)/Module,posix_timer,POSIX timer,Add POSIX timer support.,))
--- /dev/null
+--- a/src/mod/languages/mod_perl/Makefile.am
++++ b/src/mod/languages/mod_perl/Makefile.am
+@@ -1,8 +1,5 @@
+ include $(top_srcdir)/build/modmake.rulesam
+ MODNAME=mod_perl
+-PERL = perl
+-PERL_LIBDIR =-L`perl -MConfig -e 'print $$Config{archlib}'`/CORE
+-PERL_LIBS =`perl -MConfig -e 'print $$Config{libs}'`
+
+ perldir=$(prefix)/perl
+ mod_LTLIBRARIES = mod_perl.la
+@@ -10,13 +7,13 @@ perl_LTLIBRARIES = freeswitch.la
+ mod_perl_la_SOURCES = mod_perl.c freeswitch_perl.cpp mod_perl_wrap.cpp perlxsi.c
+ mod_perl_la_CFLAGS = $(SWITCH_AM_CFLAGS)
+ mod_perl_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS)
+-mod_perl_la_CPPFLAGS = -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/
++mod_perl_la_CPPFLAGS = @PERL_CFLAGS@ -I$(switch_srcdir)/libs/libteletone/src/
+ mod_perl_la_LIBADD = $(switch_builddir)/libfreeswitch.la
+-mod_perl_la_LDFLAGS = -avoid-version -module -no-undefined -shared `$(PERL) -MExtUtils::Embed -e ldopts` `$(PERL) -MConfig -e 'print $$Config{libs}'`
++mod_perl_la_LDFLAGS = -avoid-version -module -no-undefined -shared @PERL_LDFLAGS@ @PERL_LIBS@
+
+ freeswitch_la_SOURCES = freeswitch_perl.cpp mod_perl_wrap.cpp perlxsi.c
+ freeswitch_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(LDFLAGS)
+-freeswitch_la_CPPFLAGS = $(SWITCH_AM_CPPFLAGS) -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/
++freeswitch_la_CPPFLAGS = $(SWITCH_AM_CPPFLAGS) @PERL_CFLAGS@ -I$(switch_srcdir)/libs/libteletone/src/
+ reswig: swigclean mod_perl_wrap.cpp
+
+ swigclean: clean
+@@ -31,7 +28,7 @@ orig: mod_perl_wrap.cpp
+ patch -R -s -p0 -i hack.diff
+
+ .perlok:
+- @(${PERL} -V | grep -i usemultiplicity=define >/dev/null && echo Phew, You have the right perl.) \
++ @(@PERL@ -V | grep -i usemultiplicity=define >/dev/null && echo Phew, You have the right perl.) \
+ || ((echo Sorry, you need to compile perl with threads and multiplicity.&& exit 1))
+ @touch .perlok
+