aboutsummaryrefslogtreecommitdiff
path: root/net/asterisk14/files/patch-channels::Makefile
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2006-01-17 22:27:45 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2006-01-17 22:27:45 +0000
commite61e1d66bd617141dc294a78d82e163554034060 (patch)
tree82d56db941093217a7c6bf1b3f6b2ba800639f4c /net/asterisk14/files/patch-channels::Makefile
parentcfb4ed733fa8c10b76f41592e5a4ea070e9ea37f (diff)
downloadports-e61e1d66bd617141dc294a78d82e163554034060.tar.gz
ports-e61e1d66bd617141dc294a78d82e163554034060.zip
Notes
Diffstat (limited to 'net/asterisk14/files/patch-channels::Makefile')
-rw-r--r--net/asterisk14/files/patch-channels::Makefile132
1 files changed, 60 insertions, 72 deletions
diff --git a/net/asterisk14/files/patch-channels::Makefile b/net/asterisk14/files/patch-channels::Makefile
index 7ecab67f9571..edca9b1e7694 100644
--- a/net/asterisk14/files/patch-channels::Makefile
+++ b/net/asterisk14/files/patch-channels::Makefile
@@ -1,97 +1,85 @@
---- channels/Makefile.orig Tue Aug 31 23:33:00 2004
-+++ channels/Makefile Tue Aug 9 17:34:28 2005
-@@ -57,10 +57,10 @@
-
+
+$FreeBSD$
+
+--- channels/Makefile.orig
++++ channels/Makefile
+@@ -48,9 +48,9 @@
endif
+
ifeq (${OSARCH},FreeBSD)
--PTLIB=-lpt_FreeBSD_x86_r
--H323LIB=-lh323_FreeBSD_x86_r
--CHANH323LIB=-pthread
--SOLINK+=-L/usr/local/lib
-+PTLIB=-lpt_FreeBSD_x86_r_s
-+H323LIB=-lh323_FreeBSD_x86_r_s
-+CHANH323LIB=
-+SOLINK+=-L$(LOCALBASE)/lib
+- PTLIB=-lpt_FreeBSD_x86_r
+- H323LIB=-lh323_FreeBSD_x86_r
+- CHANH323LIB=-pthread
++ PTLIB=-lpt_FreeBSD_x86_r_s
++ H323LIB=-lh323_FreeBSD_x86_r_s
++ CHANH323LIB=
endif
+
ifeq (${OSARCH},NetBSD)
- PTLIB=-lpt_NetBSD_x86_r
-@@ -72,19 +72,23 @@
+@@ -73,11 +73,11 @@
+ 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 $(LOCALBASE)/include/ixjuser.h ] && echo chan_phone.so)
-+ifdef WITH_H323
-+CHANNEL_LIBS+=chan_h323.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 $(LOCALBASE)/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")
-+ZAPPRI=$(shell [ -f $(LOCALBASE)/lib/libpri.so.1 ] && echo "-lpri")
- ZAPR2=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo "-lmfcr2")
-+ifdef WITH_ZAPTEL
- CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "-DIAX_TRUNKING")
--CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "-DIAX_TRUNKING")
-+CFLAGS+=$(shell [ -f $(LOCALBASE)/include/zaptel.h ] && echo "-DIAX_TRUNKING -I$(LOCALBASE)/include")
-+endif
- CHANNEL_LIBS+=$(shell [ -f /usr/include/vpbapi.h ] && echo "chan_vpb.so" )
- CFLAGS+=$(shell [ -f /usr/include/vpbapi.h ] && echo " -DLINUX")
-
-@@ -106,8 +110,10 @@
-
- ZAPDIR=/usr/lib
-
-+ifdef WITH_ZAPTEL
- 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 $(LOCALBASE)/include/zaptel.h ] && echo "chan_zap.so")
-+endif
-
- CHANNEL_LIBS+=$(shell [ -f /usr/include/nbs.h ] && echo "chan_nbs.so" )
+-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/ixjuser.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/ixjuser.h),)
++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/ixjuser.h)$(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/ixjuser.h),)
+ CHANNEL_LIBS+=chan_phone.so
+ endif
-@@ -156,6 +162,8 @@
- chan_oss.so: chan_oss.o
- $(CC) $(SOLINK) -o $@ chan_oss.o -lossaudio
+-ifneq ($(wildcard h323/libchanh323.a),)
++ifdef WITH_H323
+ CHANNEL_LIBS+=chan_h323.so
endif
-+chan_oss.so: chan_oss.o
-+ $(CC) $(SOLINK) -o $@ chan_oss.o
- chan_iax2.so: chan_iax2.o iax2-parser.o iax2-provision.o
- ifeq ($(USE_MYSQL_FRIENDS),1)
-@@ -175,7 +183,7 @@
- $(CC) -c $(CFLAGS) -o chan_zap.o chan_zap.c
+@@ -91,12 +91,12 @@
+ CHANNEL_LIBS+=chan_alsa.so
+ endif
- chan_zap.so: chan_zap.o
-- $(CC) $(SOLINK) -o $@ $< $(ZAPPRI) $(ZAPR2) -ltonezone
-+ $(CC) $(SOLINK) -o $@ $< $(ZAPPRI) $(ZAPR2) -L$(LOCALBASE)/lib -ltonezone
+-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libpri.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libpri.so.1),)
++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libpri.so.1)$(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/lib/libpri.so.1),)
+ CFLAGS+=-DZAPATA_PRI
+ ZAPPRI=-lpri
+ endif
- chan_sip.so: chan_sip.o
- ifeq ($(USE_SIP_MYSQL_FRIENDS),1)
-@@ -199,15 +207,17 @@
- chan_vpb.so: chan_vpb.o
- $(CXX) $(SOLINK) -o $@ $< -lvpb -lpthread -lm -ldl
+-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libmfcr2.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libmfcr2.so.1),)
++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libmfcr2.so.1)$(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/lib/libmfcr2.so.1),)
+ CFLAGS+=-DZAPATA_R2
+ ZAPR2=-lmfcr2
+ endif
+@@ -109,12 +109,12 @@
+ 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),)
++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),)
+ ifeq (${OSARCH},NetBSD)
+ SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/pkg/lib
+ endif
+ ifeq (${OSARCH},FreeBSD)
+- SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
++ SOLINK+=-L$(CROSS_COMPILE_TARGET)$(LOCALBASE)/lib
+ endif
+ CFLAGS+=-DIAX_TRUNKING
+ CHANNEL_LIBS+=chan_zap.so
+@@ -229,8 +229,10 @@
+ chan_h323.so: chan_h323.o h323/libchanh323.a h323/Makefile.ast
+ $(CC) $(SOLINK) $(H323LDFLAGS) -o $@ $< h323/libchanh323.a $(H323LDLIBS) -lstdc++
+ else
-chan_h323.so: chan_h323.o h323/libchanh323.a
- $(CC) $(SOLINK) -o $@ $< h323/libchanh323.a $(CHANH323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L$(OPENH323DIR)/lib $(H323LIB) -L/usr/lib -lcrypto -lssl -lexpat
+chan_h323.so: chan_h323.o h323/ast_h323.o
-+ $(CXX) $(SOLINK) -o $@ $< h323/ast_h323.o -L$(OPENH323DIR)/lib $(H323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -lcrypto -lssl -L$(LOCALBASE)/lib -lexpat -llber -lldap -lldap_r
-
++ $(CXX) $(SOLINK) -o $@ $< h323/ast_h323.o $(CHANH323LIB) -L$(OPENH323DIR)/lib $(H323LIB) -L$(PWLIBDIR)/lib $(PTLIB) -L/usr/lib -lcrypto -lssl -lexpat -L$(LOCALBASE)/lib -llber -lldap -lldap_r
+h323/ast_h323.o:
+ $(MAKE) -C h323 ast_h323.o
+ endif
- #chan_modem.so : chan_modem.o
+ chan_misdn.so: chan_misdn.o chan_misdn_config.o misdn/chan_misdn_lib.a
+@@ -244,8 +246,7 @@
# $(CC) -rdynamic -shared -Xlinker -x -o $@ $<
install: all
- for x in $(CHANNEL_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
+- if ! [ -f chan_iax.so ]; then rm -f $(DESTDIR)$(MODULES_DIR)/chan_iax.so ; fi
+ for x in $(CHANNEL_LIBS); do $(BSD_INSTALL_PROGRAM) $$x $(DESTDIR)$(MODULES_DIR) ; done
- if ! [ -f chan_iax.so ]; then rm -f $(DESTDIR)$(MODULES_DIR)/chan_iax.so ; fi
depend: .depend
+