Ticket #8935: chan-datacard2.patch

File chan-datacard2.patch, 3.4 KB (added by zandbelt, 5 years ago)
  • packages/net/asterisk-chan-datacard/patches/100_iconv.patch

     
     1--- chan_datacard-1.0.r286/configure.in.org     2011-01-20 06:27:25.000000000 +0100 
     2+++ chan_datacard-1.0.r286/configure.in 2011-03-01 19:57:48.000000000 +0100 
     3@@ -85,7 +85,6 @@ 
     4 ) 
     5  
     6 AC_HEADER_FIND([asterisk.h], $with_asterisk) 
     7-AC_HEADER_FIND([iconv.h], /usr/include /usr/local/include /opt/local/include) 
     8  
     9 AC_DEFINE([ICONV_CONST],[], [Define to const if you has iconv() const declaration of input buffer]) 
     10 AC_MSG_CHECKING([for iconv use const inbuf]) 
  • packages/net/asterisk-chan-datacard/Makefile

     
     1# 
     2# Copyright (C) 2011 OpenWrt.org 
     3# 
     4# This is free software, licensed under the GNU General Public License v2. 
     5# See /LICENSE for more information. 
     6# 
     7 
     8include $(TOPDIR)/rules.mk 
     9 
     10PKG_NAME:=asterisk18-chan-datacard 
     11PKG_REV:=286 
     12PKG_VERSION:=1.0.r$(PKG_REV) 
     13PKG_RELEASE:=170 
     14 
     15#PKG_SOURCE_URL:=http://datacard.googlecode.com/svn/trunk/ 
     16#PKG_SOURCE_VERSION:=$(PKG_RELEASE) 
     17#PKG_SOURCE_PROTO:=svn 
     18# or  
     19PKG_SOURCE:=chan_datacard-$(PKG_VERSION).tgz 
     20PKG_SOURCE_URL=http://datacard.googlecode.com/files/ 
     21PKG_MD5SUM:=6697fece15734f061834cd84182b46d1 
     22 
     23PKG_SOURCE_SUBDIR:=chan_datacard-$(PKG_VERSION) 
     24PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) 
     25 
     26include $(INCLUDE_DIR)/package.mk 
     27 
     28define Package/asterisk18-chan-datacard 
     29        SUBMENU:=asterisk18 (Complete Open Source PBX), v1.8.x 
     30        SECTION:=net 
     31        CATEGORY:=Network 
     32        URL:=http://datacard.googlecode.com/ 
     33        MAINTAINER:=Hans Zandbelt <hans.zandbelt@gmail.com> 
     34        DEPENDS:= +asterisk18 +libiconv 
     35        TITLE:=Huawei UMTS 3G datacards support 
     36endef 
     37 
     38define Package/asterisk18-chan-datacard/description 
     39        Asterisk channel driver for Huawei UMTS 3G datacards 
     40endef 
     41 
     42CONFIGURE_ARGS += \ 
     43        --with-asterisk=$(STAGING_DIR)/usr/include/asterisk-1.8/include \ 
     44 
     45CONFIGURE_VARS += \ 
     46        CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/lib/libiconv-stub/include" \ 
     47        DESTDIR="$(PKG_INSTALL_DIR)/usr/lib/asterisk/modules" \ 
     48 
     49#               CFLAGS="$(TARGET_CFLAGS) -DLOW_MEMORY $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libiconv-stub/include -I$(STAGING_DIR)/usr/include/asterisk-1.8/include -DHAVE_CONFIG_H -I. -fPIC"  
     50 
     51# for svn  
     52#        (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status}; \ 
     53#                        autoconf \ 
     54#                                ); 
     55#        $(call Build/Configure/Default) 
     56 
     57define Build/Prepare 
     58$(call Build/Prepare/Default) 
     59        (cd $(PKG_BUILD_DIR); autoreconf -v --install || exit 1 ) 
     60endef 
     61 
     62define Build/Compile 
     63        $(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules 
     64        $(MAKE) -C "$(PKG_BUILD_DIR)" all install 
     65endef 
     66 
     67define Package/asterisk18-chan-datacard/conffiles 
     68/etc/asterisk/datacard.conf 
     69endef 
     70 
     71define Package/asterisk18-chan-datacard/install 
     72        $(INSTALL_DIR) $(1)/etc/asterisk 
     73        $(INSTALL_DATA) $(PKG_BUILD_DIR)/etc/datacard.conf $(1)/etc/asterisk/ 
     74        $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules 
     75        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_datacard.so $(1)/usr/lib/asterisk/modules/ 
     76endef 
     77 
     78$(eval $(call BuildPackage,asterisk18-chan-datacard))