summaryrefslogtreecommitdiff
path: root/comms/asterisk/patches/patch-ad
diff options
context:
space:
mode:
Diffstat (limited to 'comms/asterisk/patches/patch-ad')
-rw-r--r--comms/asterisk/patches/patch-ad195
1 files changed, 122 insertions, 73 deletions
diff --git a/comms/asterisk/patches/patch-ad b/comms/asterisk/patches/patch-ad
index dc6be8986fd..b66110e3fb7 100644
--- a/comms/asterisk/patches/patch-ad
+++ b/comms/asterisk/patches/patch-ad
@@ -1,88 +1,137 @@
-$NetBSD: patch-ad,v 1.1.1.1 2005/04/08 03:10:52 riz Exp $
---- channels/Makefile.orig 2004-08-31 09:33:00.000000000 -0700
-+++ channels/Makefile 2005-03-30 12:32:50.000000000 -0800
-@@ -38,11 +38,11 @@
- #CHANNEL_LIBS+=chan_vofr
+$NetBSD: patch-ad,v 1.2 2006/01/13 20:32:38 riz Exp $
+
+--- channels/Makefile.orig 2005-11-29 19:24:39.000000000 +0100
++++ channels/Makefile 2005-12-25 13:13:12.000000000 +0100
+@@ -22,12 +22,13 @@
+ endif
+
+ ifeq ($(findstring BSD,${OSARCH}),BSD)
+- CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
++ CFLAGS+=-I${PREFIX}/include -L${PREFIX}/lib
+ endif
ifeq (${OSARCH},OpenBSD)
--MYSQLLIB=-L/usr/local/lib/mysql -lmysqlclient
--CFLAGS+=-I/usr/local/include
-+MYSQLLIB=-L${PREFIX}/lib/mysql -lmysqlclient
-+CFLAGS+=-I${PREFIX}/include
- PTLIB=-lpt_OpenBSD_x86_r
- H323LIB=-lh323_OpenBSD_x86_r
--CHANH323LIB=-L/usr/local/lib
-+CHANH323LIB=-L${PREFIX}/lib
+ PTLIB=-lpt_OpenBSD_x86_r
+ H323LIB=-lh323_OpenBSD_x86_r
++ CHANH323LIB=-L${PREFIX}/lib
endif
+
ifeq (${OSARCH},Linux)
- MYSQLLIB=-L/usr/lib/mysql -lmysqlclient
-@@ -60,33 +60,36 @@
- PTLIB=-lpt_FreeBSD_x86_r
- H323LIB=-lh323_FreeBSD_x86_r
- CHANH323LIB=-pthread
--SOLINK+=-L/usr/local/lib
-+SOLINK+=-L${PREFIX}/lib -R${PREFIX}/lib
- endif
- ifeq (${OSARCH},NetBSD)
- PTLIB=-lpt_NetBSD_x86_r
- H323LIB=-lh323_NetBSD_x86_r
--SOLINK+=-L/usr/local/lib
-+SOLINK+=-L${PREFIX}/lib -R${PREFIX}/lib
- endif
- ifneq (${OSARCH},Darwin)
- CHANNEL_LIBS+=chan_oss.so
+@@ -73,40 +74,40 @@
+ SOLINK+=-lrt
endif
--CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/ixjuser.h ] && echo chan_phone.so)
--CHANNEL_LIBS+=$(shell [ -f /usr/local/include/ixjuser.h ] && echo chan_phone.so)
--CHANNEL_LIBS+=$(shell [ -f h323/libchanh323.a ] && echo chan_h323.so)
-+#CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/ixjuser.h ] && echo chan_phone.so)
-+CHANNEL_LIBS+=$(shell [ -f ${PREFIX}/include/ixjuser.h ] && echo chan_phone.so)
-+#CHANNEL_LIBS+=$(shell [ -f h323/libchanh323.a ] && echo chan_h323.so)
+-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/ixjuser.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/ixjuser.h),)
+- CHANNEL_LIBS+=chan_phone.so
+-endif
+-
+-ifneq ($(wildcard h323/libchanh323.a),)
+- CHANNEL_LIBS+=chan_h323.so
+-endif
+-
+-ifneq ($(wildcard misdn/chan_misdn_lib.a),)
+- CHANNEL_LIBS+=chan_misdn.so
+-endif
++# ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/ixjuser.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/ixjuser.h),)
++# CHANNEL_LIBS+=chan_phone.so
++# endif
++
++# ifneq ($(wildcard h323/libchanh323.a),)
++# CHANNEL_LIBS+=chan_h323.so
++# endif
++
++# ifneq ($(wildcard misdn/chan_misdn_lib.a),)
++# CHANNEL_LIBS+=chan_misdn.so
++# endif
CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
--CFLAGS+=$(shell [ ! -f /usr/include/linux/if_wanpipe.h ] && echo " -DOLD_SANGOMA_API")
--CHANNEL_LIBS+=$(shell [ -f /usr/include/alsa/asoundlib.h ] && echo "chan_alsa.so")
--CFLAGS+=$(shell [ -f /usr/lib/libpri.so.1 ] && echo " -DZAPATA_PRI")
--CFLAGS+=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo " -DZAPATA_R2")
--CFLAGS+=$(shell [ -f alsa-monitor.h ] && echo " -DALSA_MONITOR")
--ZAPPRI=$(shell [ -f /usr/lib/libpri.so.1 ] && echo "-lpri")
--ZAPR2=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo "-lmfcr2")
--CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "-DIAX_TRUNKING")
--CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "-DIAX_TRUNKING")
--CHANNEL_LIBS+=$(shell [ -f /usr/include/vpbapi.h ] && echo "chan_vpb.so" )
--CFLAGS+=$(shell [ -f /usr/include/vpbapi.h ] && echo " -DLINUX")
-+#CFLAGS+=$(shell [ ! -f /usr/include/linux/if_wanpipe.h ] && echo " -DOLD_SANGOMA_API")
-+#CHANNEL_LIBS+=$(shell [ -f /usr/include/alsa/asoundlib.h ] && echo "chan_alsa.so")
-+#CFLAGS+=$(shell [ -f /usr/lib/libpri.so.1 ] && echo " -DZAPATA_PRI")
-+#CFLAGS+=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo " -DZAPATA_R2")
-+#CFLAGS+=$(shell [ -f alsa-monitor.h ] && echo " -DALSA_MONITOR")
-+#ZAPPRI=$(shell [ -f /usr/lib/libpri.so.1 ] && echo "-lpri")
-+#ZAPR2=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo "-lmfcr2")
-+#CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "-DIAX_TRUNKING")
-+#CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "-DIAX_TRUNKING")
-+ifdef ASTERISK_USE_ZAPTEL
-+CFLAGS+= -DIAX_TRUNKING
-+endif
-+#CHANNEL_LIBS+=$(shell [ -f /usr/include/vpbapi.h ] && echo "chan_vpb.so" )
-+#CFLAGS+=$(shell [ -f /usr/include/vpbapi.h ] && echo " -DLINUX")
+
+-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/alsa/asoundlib.h),)
+- CHANNEL_LIBS+=chan_alsa.so
+-endif
+-
+-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libpri.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libpri.so.1),)
+- CFLAGS+=-DZAPATA_PRI
+- ZAPPRI=-lpri
+-endif
+-
+-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libmfcr2.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libmfcr2.so.1),)
+- CFLAGS+=-DZAPATA_R2
+- ZAPR2=-lmfcr2
+-endif
++# ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/alsa/asoundlib.h),)
++# CHANNEL_LIBS+=chan_alsa.so
++# endif
++
++# ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libpri.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libpri.so.1),)
++# CFLAGS+=-DZAPATA_PRI
++# ZAPPRI=-lpri
++# endif
++
++# ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libmfcr2.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libmfcr2.so.1),)
++# CFLAGS+=-DZAPATA_R2
++# ZAPR2=-lmfcr2
++# endif
ALSA_SRC=chan_alsa.c
- ALSA_SRC+=$(shell [ -f alsa-monitor.h ] && echo "alsa-monitor.h")
-@@ -106,10 +109,13 @@
- ZAPDIR=/usr/lib
+-ifneq ($(wildcard alsa-monitor.h),)
+- CFLAGS+=-DALSA_MONITOR
+- ALSA_SRC+=alsa-monitor.h
+-endif
++# ifneq ($(wildcard alsa-monitor.h),)
++# CFLAGS+=-DALSA_MONITOR
++# ALSA_SRC+=alsa-monitor.h
++# endif
--CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "chan_zap.so")
--CHANNEL_LIBS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "chan_zap.so")
-+#CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "chan_zap.so")
-+#CHANNEL_LIBS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "chan_zap.so")
-+ifdef ASTERISK_USE_ZAPTEL
-+CHANNEL_LIBS+=chan_zap.so
-+endif
+ ifndef WITHOUT_ZAPTEL
+ ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),)
+@@ -121,10 +122,10 @@
+ endif
+ endif # WITHOUT_ZAPTEL
--CHANNEL_LIBS+=$(shell [ -f /usr/include/nbs.h ] && echo "chan_nbs.so" )
-+#CHANNEL_LIBS+=$(shell [ -f /usr/include/nbs.h ] && echo "chan_nbs.so" )
+-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vpbapi.h),)
+- CHANNEL_LIBS+=chan_vpb.so
+- CFLAGS+=-DLINUX
+-endif
++# ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vpbapi.h),)
++# CHANNEL_LIBS+=chan_vpb.so
++# CFLAGS+=-DLINUX
++# endif
+
+ CFLAGS+=-DCRYPTO
+
+@@ -136,9 +137,9 @@
+
+ ZAPDIR=/usr/lib
+
+-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/nbs.h),)
+- CHANNEL_LIBS+=chan_nbs.so
+-endif
++# ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/nbs.h),)
++# CHANNEL_LIBS+=chan_nbs.so
++# endif
ifndef OPENH323DIR
- OPENH323DIR=$(HOME)/openh323
+ OPENH323DIR=$(HOME)/openh323
+@@ -163,13 +164,13 @@
+ include .depend
+ endif
+
+-ifneq ($(wildcard h323/Makefile.ast),)
+- include h323/Makefile.ast
+-endif
+-
+-ifneq ($(wildcard misdn/Makefile.ast),)
+- include misdn/Makefile.ast
+-endif
++# ifneq ($(wildcard h323/Makefile.ast),)
++# include h323/Makefile.ast
++# endif
++
++# ifneq ($(wildcard misdn/Makefile.ast),)
++# include misdn/Makefile.ast
++# endif
+
+ gentone: gentone.c
+ $(HOST_CC) -o gentone gentone.c -lm