aboutsummaryrefslogtreecommitdiff
path: root/net/asterisk10/files/patch-apps::Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'net/asterisk10/files/patch-apps::Makefile')
-rw-r--r--net/asterisk10/files/patch-apps::Makefile74
1 files changed, 46 insertions, 28 deletions
diff --git a/net/asterisk10/files/patch-apps::Makefile b/net/asterisk10/files/patch-apps::Makefile
index 44f8495864c4..ee7d560bed69 100644
--- a/net/asterisk10/files/patch-apps::Makefile
+++ b/net/asterisk10/files/patch-apps::Makefile
@@ -1,38 +1,56 @@
---- apps/Makefile.orig Wed Jun 22 14:40:11 2005
-+++ apps/Makefile Wed Jun 22 14:43:45 2005
-@@ -40,9 +40,13 @@
+
+$FreeBSD$
+
+--- apps/Makefile.orig
++++ apps/Makefile
+@@ -45,25 +45,27 @@
#APPS+=app_rpt.so
- APPS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
--APPS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
-+APPS+=$(shell if [ -f $(LOCALBASE)/include/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
- APPS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "app_osplookup.so" ; fi)
+ ifndef WITHOUT_ZAPTEL
+-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h),)
++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/zaptel.h),)
+ APPS+=app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so app_page.so
+ endif
+ endif # WITHOUT_ZAPTEL
+-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/osp/osp.h $(CROSS_COMPILE_TARGET)/usr/include/osp/osp.h),)
+ifdef WITH_FAX
-+APPS+=$(shell if [ -f $(LOCALBASE)/include/spandsp.h ]; then echo "app_rxfax.so app_txfax.so" ; fi)
++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/spandsp.h),)
++APPS+=app_rxfax.so app_txfax.so
++endif
+endif
+
- CFLAGS+=-fPIC
++ifneq ($(wildcard $(CROSS_COMPILE_TARGET)$(LOCALBASE)/include/osp/osp.h $(CROSS_COMPILE_TARGET)/usr/include/osp/osp.h),)
+ APPS+=app_osplookup.so
+ endif
+
+ ifeq ($(findstring BSD,${OSARCH}),BSD)
+-CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
++CFLAGS+=-I$(CROSS_COMPILE_TARGET)$(LOCALBASE)/include -L$(CROSS_COMPILE_TARGET)$(LOCALBASE)/lib
+ endif
+
+-CURLLIBS=$(shell $(CROSS_COMPILE_BIN)curl-config --libs)
+-ifneq ($(shell if [[ 0x`$(CROSS_COMPILE_BIN)curl-config --vernum` -ge 0x70907 ]]; then echo "OK" ; fi),)
+- ifneq (${CURLLIBS},)
+- APPS+=app_curl.so
+- endif
+-endif
++CURLLIBS=$(shell $(CROSS_COMPILE_BIN)$(LOCALBASE)/bin/curl-config --libs)
++APPS+=app_curl.so
- ifeq ($(USE_POSTGRES_VM_INTERFACE),1)
-@@ -65,12 +69,12 @@
- $(CC) $(SOLINK) -o $@ $< -ltonezone
+ ifeq (${OSARCH},CYGWIN)
+ CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols
+@@ -95,24 +97,32 @@
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -ltonezone
install: all
- for x in $(APPS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
+ for x in $(APPS); do $(BSD_INSTALL_PROGRAM) $$x $(DESTDIR)$(MODULES_DIR) ; done
rm -f $(DESTDIR)$(MODULES_DIR)/app_datetime.so
+ rm -f $(DESTDIR)$(MODULES_DIR)/app_qcall.so
- app_voicemail.so : app_voicemail.o
- ifeq ($(USE_MYSQL_VM_INTERFACE),1)
-- $(CC) $(SOLINK) -o $@ $(MLFLAGS) $< -L/usr/lib/mysql -lmysqlclient -lz
-+ $(CC) $(SOLINK) -o $@ $(MLFLAGS) $< -L$(LOCALBASE)/lib/mysql -lmysqlclient -lz
- else
- ifeq ($(USE_POSTGRES_VM_INTERFACE),1)
- $(CC) $(SOLINK) -o $@ $(MLFLAGS) $< -lpq
-@@ -79,17 +83,25 @@
- endif
- endif
+ app_curl.so: app_curl.o
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
+ifdef WITH_FAX
+app_rxfax.so : app_rxfax.o
@@ -47,15 +65,15 @@
+ $(CC) -I$(LOCALBASE)/include/pgsql $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
app_sql_postgres.so: app_sql_postgres.o
-- $(CC) $(SOLINK) -o $@ $< -L/usr/local/pgsql/lib -lpq
-+ $(CC) $(SOLINK) -o $@ $< -L$(LOCALBASE)/lib -lpq
+- $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -L/usr/local/pgsql/lib -lpq
++ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -L$(LOCALBASE)/lib -lpq
app_sql_odbc.so: app_sql_odbc.o
- $(CC) $(SOLINK) -o $@ $< -lodbc
+ $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lodbc
look: look.c
- $(CC) -pipe -O6 -g look.c -o look -lncurses
-+ $(CC) $(CFLAGS) look.c -o look -lncurses
++ $(CC) look.c -o look -lncurses
- ifneq ($(wildcard .depend),)
- include .depend
+ ifeq (SunOS,$(shell uname))
+ app_chanspy.so: app_chanspy.o