aboutsummaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2005-06-30 22:22:38 +0000
committerPav Lucistnik <pav@FreeBSD.org>2005-06-30 22:22:38 +0000
commit1d6e8c365a32d3c383f34c31ea6b73cb4b4ae833 (patch)
tree85f5058b4ff8903a68c633624d26b9fc4fbf813c /comms
parentad635cfe96b1f2de591bc617c52ebe3782015acf (diff)
downloadports-1d6e8c365a32d3c383f34c31ea6b73cb4b4ae833.tar.gz
ports-1d6e8c365a32d3c383f34c31ea6b73cb4b4ae833.zip
Add spandsp, software fax library for Asterisk
PR: ports/82642 Submitted by: William Lloyd <wlloyd@slap.net>
Notes
Notes: svn path=/head/; revision=138271
Diffstat (limited to 'comms')
-rw-r--r--comms/Makefile1
-rw-r--r--comms/spandsp-devel/Makefile32
-rw-r--r--comms/spandsp-devel/distinfo2
-rw-r--r--comms/spandsp-devel/files/patch-src-Makefile.in11
-rw-r--r--comms/spandsp-devel/files/patch-src-playout.c10
-rw-r--r--comms/spandsp-devel/files/patch-src-power_meter.c13
-rw-r--r--comms/spandsp-devel/files/patch-src-spandsp-dc_restore.h14
-rw-r--r--comms/spandsp-devel/files/patch-src-t31.c28
-rw-r--r--comms/spandsp-devel/pkg-descr4
-rw-r--r--comms/spandsp-devel/pkg-plist57
-rw-r--r--comms/spandsp-devel5/Makefile32
-rw-r--r--comms/spandsp-devel5/distinfo2
-rw-r--r--comms/spandsp-devel5/files/patch-src-Makefile.in11
-rw-r--r--comms/spandsp-devel5/files/patch-src-playout.c10
-rw-r--r--comms/spandsp-devel5/files/patch-src-power_meter.c13
-rw-r--r--comms/spandsp-devel5/files/patch-src-spandsp-dc_restore.h14
-rw-r--r--comms/spandsp-devel5/files/patch-src-t31.c28
-rw-r--r--comms/spandsp-devel5/pkg-descr4
-rw-r--r--comms/spandsp-devel5/pkg-plist57
-rw-r--r--comms/spandsp/Makefile32
-rw-r--r--comms/spandsp/distinfo2
-rw-r--r--comms/spandsp/files/patch-src-Makefile.in11
-rw-r--r--comms/spandsp/files/patch-src-playout.c10
-rw-r--r--comms/spandsp/files/patch-src-power_meter.c13
-rw-r--r--comms/spandsp/files/patch-src-spandsp-dc_restore.h14
-rw-r--r--comms/spandsp/files/patch-src-t31.c28
-rw-r--r--comms/spandsp/pkg-descr4
-rw-r--r--comms/spandsp/pkg-plist57
28 files changed, 514 insertions, 0 deletions
diff --git a/comms/Makefile b/comms/Makefile
index fe55726d8f47..8f73c72825cf 100644
--- a/comms/Makefile
+++ b/comms/Makefile
@@ -87,6 +87,7 @@
SUBDIR += sms_client
SUBDIR += smstools
SUBDIR += snooper
+ SUBDIR += spandsp
SUBDIR += sredird
SUBDIR += thebridge
SUBDIR += tilp
diff --git a/comms/spandsp-devel/Makefile b/comms/spandsp-devel/Makefile
new file mode 100644
index 000000000000..bdb06a923aee
--- /dev/null
+++ b/comms/spandsp-devel/Makefile
@@ -0,0 +1,32 @@
+# New ports collection makefile for: spandsp
+# Date created: 23 June 2005
+# Whom: wlloyd@slap.net
+#
+# $FreeBSD$
+#
+
+PORTNAME= spandsp
+DISTVERSION= 0.0.2pre18
+CATEGORIES= comms
+MASTER_SITES= ftp://soft-switch.org/pub/spandsp/${PORTNAME}-${DISTVERSION}/
+
+MAINTAINER= ports@FreeBSD.org
+COMMENT= Fax DSP library for Asterisk
+
+LIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION:C/pre.*$//}
+
+USE_GMAKE= yes
+USE_REINPLACE= yes
+
+USE_LIBTOOL_VER= 15
+CONFIGURE_ARGS= CPPFLAGS="-I${LOCALBASE}/include" \
+ LDFLAGS="-L${LOCALBASE}/lib"
+
+INSTALLS_SHLIB= yes
+
+post-patch:
+ @${FIND} ${WRKSRC} -name *.c | ${XARGS} ${REINPLACE_CMD} -e 's|<stdint.h>|<inttypes.h>|'
+
+.include <bsd.port.mk>
diff --git a/comms/spandsp-devel/distinfo b/comms/spandsp-devel/distinfo
new file mode 100644
index 000000000000..fbef42a71658
--- /dev/null
+++ b/comms/spandsp-devel/distinfo
@@ -0,0 +1,2 @@
+MD5 (spandsp-0.0.2pre18.tar.gz) = b01f2fdd47f30b0b80343ed2f75a7199
+SIZE (spandsp-0.0.2pre18.tar.gz) = 1288267
diff --git a/comms/spandsp-devel/files/patch-src-Makefile.in b/comms/spandsp-devel/files/patch-src-Makefile.in
new file mode 100644
index 000000000000..3b8f9a6f252d
--- /dev/null
+++ b/comms/spandsp-devel/files/patch-src-Makefile.in
@@ -0,0 +1,11 @@
+--- src/Makefile.in~ Thu Apr 28 09:03:02 2005
++++ src/Makefile.in Thu Jun 23 15:27:14 2005
+@@ -211,7 +211,7 @@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+ MAINTAINERCLEANFILES = Makefile.in
+-INCLUDES = -I$(top_buildir)
++#INCLUDES = -I$(top_buildir)
+ lib_LTLIBRARIES = libspandsp.la
+ libspandsp_la_SOURCES = adsi.c \
+ awgn.c \
diff --git a/comms/spandsp-devel/files/patch-src-playout.c b/comms/spandsp-devel/files/patch-src-playout.c
new file mode 100644
index 000000000000..2674f62f0de3
--- /dev/null
+++ b/comms/spandsp-devel/files/patch-src-playout.c
@@ -0,0 +1,10 @@
+--- src/playout.c~ Fri Feb 4 14:19:30 2005
++++ src/playout.c Thu Jun 23 15:35:06 2005
+@@ -37,6 +37,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <limits.h>
++#include <sys/types.h>
+
+ #include "spandsp/telephony.h"
+ #include "spandsp/playout.h"
diff --git a/comms/spandsp-devel/files/patch-src-power_meter.c b/comms/spandsp-devel/files/patch-src-power_meter.c
new file mode 100644
index 000000000000..5209632685e7
--- /dev/null
+++ b/comms/spandsp-devel/files/patch-src-power_meter.c
@@ -0,0 +1,13 @@
+--- src/power_meter.c.orig Thu Jun 30 22:40:33 2005
++++ src/power_meter.c Thu Jun 30 22:41:05 2005
+@@ -72,6 +72,10 @@
+ }
+ /*- End of function --------------------------------------------------------*/
+
++#ifndef INFINITY
++#define INFINITY (float)HUGE_VAL
++#endif
++
+ float power_meter_dbm0(power_meter_t *meter)
+ {
+ float val;
diff --git a/comms/spandsp-devel/files/patch-src-spandsp-dc_restore.h b/comms/spandsp-devel/files/patch-src-spandsp-dc_restore.h
new file mode 100644
index 000000000000..d2f63ad0d8e4
--- /dev/null
+++ b/comms/spandsp-devel/files/patch-src-spandsp-dc_restore.h
@@ -0,0 +1,14 @@
+--- src/spandsp/dc_restore.h.orig Tue Jan 18 15:05:48 2005
++++ src/spandsp/dc_restore.h Thu Jun 30 22:35:33 2005
+@@ -85,6 +85,11 @@
+ }
+ /*- End of function --------------------------------------------------------*/
+
++#ifndef INT16_MAX
++#define INT16_MAX 0x7fff
++#define INT16_MIN (-0x7fff-1)
++#endif
++
+ static inline int16_t saturate(int32_t amp)
+ {
+ if (amp > INT16_MAX)
diff --git a/comms/spandsp-devel/files/patch-src-t31.c b/comms/spandsp-devel/files/patch-src-t31.c
new file mode 100644
index 000000000000..7ffd6abfd2d6
--- /dev/null
+++ b/comms/spandsp-devel/files/patch-src-t31.c
@@ -0,0 +1,28 @@
+--- src/t31.c.orig Thu Jun 30 23:07:14 2005
++++ src/t31.c Thu Jun 30 23:10:28 2005
+@@ -51,19 +51,12 @@
+ t31_profile_t profiles[3] =
+ {
+ {
+- .echo = TRUE,
+- .verbose = TRUE,
+- .result_code_format = ASCII_RESULT_CODES,
+- .pulse_dial = FALSE,
+- .double_escape = FALSE,
+- .s_regs[0] = 0,
+- .s_regs[3] = '\r',
+- .s_regs[4] = '\n',
+- .s_regs[5] = '\b',
+- .s_regs[6] = 1,
+- .s_regs[7] = 60,
+- .s_regs[8] = 5,
+- .s_regs[10] = 0
++ TRUE,
++ TRUE,
++ ASCII_RESULT_CODES,
++ FALSE,
++ FALSE,
++ { 0, 0, 0, '\r', '\n', '\b', 1, 60, 5, 0 }
+ }
+ };
+
diff --git a/comms/spandsp-devel/pkg-descr b/comms/spandsp-devel/pkg-descr
new file mode 100644
index 000000000000..a19fea158bbc
--- /dev/null
+++ b/comms/spandsp-devel/pkg-descr
@@ -0,0 +1,4 @@
+Spandsp is a DSP library to support fax functions in the Asterisk PBX.
+Basically it implements a software fax machine to fax out or in.
+
+WWW: http://www.soft-switch.org/
diff --git a/comms/spandsp-devel/pkg-plist b/comms/spandsp-devel/pkg-plist
new file mode 100644
index 000000000000..513350cfab0c
--- /dev/null
+++ b/comms/spandsp-devel/pkg-plist
@@ -0,0 +1,57 @@
+include/spandsp.h
+include/spandsp/adsi.h
+include/spandsp/alaw_ulaw.h
+include/spandsp/arctan2.h
+include/spandsp/awgn.h
+include/spandsp/bert.h
+include/spandsp/biquad.h
+include/spandsp/complex.h
+include/spandsp/complex_filters.h
+include/spandsp/dc_restore.h
+include/spandsp/dds.h
+include/spandsp/ec_disable_detector.h
+include/spandsp/echo.h
+include/spandsp/fir.h
+include/spandsp/fsk.h
+include/spandsp/g168models.h
+include/spandsp/hdlc.h
+include/spandsp/ima_adpcm.h
+include/spandsp/mmx.h
+include/spandsp/modem_echo.h
+include/spandsp/oki_adpcm.h
+include/spandsp/oss.h
+include/spandsp/playout.h
+include/spandsp/plc.h
+include/spandsp/power_meter.h
+include/spandsp/queue.h
+include/spandsp/schedule.h
+include/spandsp/sig_tone.h
+include/spandsp/super_tone_rx.h
+include/spandsp/super_tone_tx.h
+include/spandsp/t30.h
+include/spandsp/t30_fcf.h
+include/spandsp/t31.h
+include/spandsp/t35.h
+include/spandsp/t4.h
+include/spandsp/telephony.h
+include/spandsp/time_scale.h
+include/spandsp/timing.h
+include/spandsp/tone_detect.h
+include/spandsp/tone_generate.h
+include/spandsp/v17rx.h
+include/spandsp/v17tx.h
+include/spandsp/v22bis.h
+include/spandsp/v27ter_rx.h
+include/spandsp/v27ter_tx.h
+include/spandsp/v29rx.h
+include/spandsp/v29tx.h
+include/spandsp/v42.h
+include/spandsp/v8.h
+include/spandsp/vector.h
+lib/libspandsp.a
+lib/libspandsp.so
+lib/libspandsp.so.0
+%%DATADIR%%/global-tones.xml
+%%DATADIR%%/tones.dtd
+@dirrm %%DATADIR%%
+@dirrm include/spandsp
diff --git a/comms/spandsp-devel5/Makefile b/comms/spandsp-devel5/Makefile
new file mode 100644
index 000000000000..bdb06a923aee
--- /dev/null
+++ b/comms/spandsp-devel5/Makefile
@@ -0,0 +1,32 @@
+# New ports collection makefile for: spandsp
+# Date created: 23 June 2005
+# Whom: wlloyd@slap.net
+#
+# $FreeBSD$
+#
+
+PORTNAME= spandsp
+DISTVERSION= 0.0.2pre18
+CATEGORIES= comms
+MASTER_SITES= ftp://soft-switch.org/pub/spandsp/${PORTNAME}-${DISTVERSION}/
+
+MAINTAINER= ports@FreeBSD.org
+COMMENT= Fax DSP library for Asterisk
+
+LIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION:C/pre.*$//}
+
+USE_GMAKE= yes
+USE_REINPLACE= yes
+
+USE_LIBTOOL_VER= 15
+CONFIGURE_ARGS= CPPFLAGS="-I${LOCALBASE}/include" \
+ LDFLAGS="-L${LOCALBASE}/lib"
+
+INSTALLS_SHLIB= yes
+
+post-patch:
+ @${FIND} ${WRKSRC} -name *.c | ${XARGS} ${REINPLACE_CMD} -e 's|<stdint.h>|<inttypes.h>|'
+
+.include <bsd.port.mk>
diff --git a/comms/spandsp-devel5/distinfo b/comms/spandsp-devel5/distinfo
new file mode 100644
index 000000000000..fbef42a71658
--- /dev/null
+++ b/comms/spandsp-devel5/distinfo
@@ -0,0 +1,2 @@
+MD5 (spandsp-0.0.2pre18.tar.gz) = b01f2fdd47f30b0b80343ed2f75a7199
+SIZE (spandsp-0.0.2pre18.tar.gz) = 1288267
diff --git a/comms/spandsp-devel5/files/patch-src-Makefile.in b/comms/spandsp-devel5/files/patch-src-Makefile.in
new file mode 100644
index 000000000000..3b8f9a6f252d
--- /dev/null
+++ b/comms/spandsp-devel5/files/patch-src-Makefile.in
@@ -0,0 +1,11 @@
+--- src/Makefile.in~ Thu Apr 28 09:03:02 2005
++++ src/Makefile.in Thu Jun 23 15:27:14 2005
+@@ -211,7 +211,7 @@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+ MAINTAINERCLEANFILES = Makefile.in
+-INCLUDES = -I$(top_buildir)
++#INCLUDES = -I$(top_buildir)
+ lib_LTLIBRARIES = libspandsp.la
+ libspandsp_la_SOURCES = adsi.c \
+ awgn.c \
diff --git a/comms/spandsp-devel5/files/patch-src-playout.c b/comms/spandsp-devel5/files/patch-src-playout.c
new file mode 100644
index 000000000000..2674f62f0de3
--- /dev/null
+++ b/comms/spandsp-devel5/files/patch-src-playout.c
@@ -0,0 +1,10 @@
+--- src/playout.c~ Fri Feb 4 14:19:30 2005
++++ src/playout.c Thu Jun 23 15:35:06 2005
+@@ -37,6 +37,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <limits.h>
++#include <sys/types.h>
+
+ #include "spandsp/telephony.h"
+ #include "spandsp/playout.h"
diff --git a/comms/spandsp-devel5/files/patch-src-power_meter.c b/comms/spandsp-devel5/files/patch-src-power_meter.c
new file mode 100644
index 000000000000..5209632685e7
--- /dev/null
+++ b/comms/spandsp-devel5/files/patch-src-power_meter.c
@@ -0,0 +1,13 @@
+--- src/power_meter.c.orig Thu Jun 30 22:40:33 2005
++++ src/power_meter.c Thu Jun 30 22:41:05 2005
+@@ -72,6 +72,10 @@
+ }
+ /*- End of function --------------------------------------------------------*/
+
++#ifndef INFINITY
++#define INFINITY (float)HUGE_VAL
++#endif
++
+ float power_meter_dbm0(power_meter_t *meter)
+ {
+ float val;
diff --git a/comms/spandsp-devel5/files/patch-src-spandsp-dc_restore.h b/comms/spandsp-devel5/files/patch-src-spandsp-dc_restore.h
new file mode 100644
index 000000000000..d2f63ad0d8e4
--- /dev/null
+++ b/comms/spandsp-devel5/files/patch-src-spandsp-dc_restore.h
@@ -0,0 +1,14 @@
+--- src/spandsp/dc_restore.h.orig Tue Jan 18 15:05:48 2005
++++ src/spandsp/dc_restore.h Thu Jun 30 22:35:33 2005
+@@ -85,6 +85,11 @@
+ }
+ /*- End of function --------------------------------------------------------*/
+
++#ifndef INT16_MAX
++#define INT16_MAX 0x7fff
++#define INT16_MIN (-0x7fff-1)
++#endif
++
+ static inline int16_t saturate(int32_t amp)
+ {
+ if (amp > INT16_MAX)
diff --git a/comms/spandsp-devel5/files/patch-src-t31.c b/comms/spandsp-devel5/files/patch-src-t31.c
new file mode 100644
index 000000000000..7ffd6abfd2d6
--- /dev/null
+++ b/comms/spandsp-devel5/files/patch-src-t31.c
@@ -0,0 +1,28 @@
+--- src/t31.c.orig Thu Jun 30 23:07:14 2005
++++ src/t31.c Thu Jun 30 23:10:28 2005
+@@ -51,19 +51,12 @@
+ t31_profile_t profiles[3] =
+ {
+ {
+- .echo = TRUE,
+- .verbose = TRUE,
+- .result_code_format = ASCII_RESULT_CODES,
+- .pulse_dial = FALSE,
+- .double_escape = FALSE,
+- .s_regs[0] = 0,
+- .s_regs[3] = '\r',
+- .s_regs[4] = '\n',
+- .s_regs[5] = '\b',
+- .s_regs[6] = 1,
+- .s_regs[7] = 60,
+- .s_regs[8] = 5,
+- .s_regs[10] = 0
++ TRUE,
++ TRUE,
++ ASCII_RESULT_CODES,
++ FALSE,
++ FALSE,
++ { 0, 0, 0, '\r', '\n', '\b', 1, 60, 5, 0 }
+ }
+ };
+
diff --git a/comms/spandsp-devel5/pkg-descr b/comms/spandsp-devel5/pkg-descr
new file mode 100644
index 000000000000..a19fea158bbc
--- /dev/null
+++ b/comms/spandsp-devel5/pkg-descr
@@ -0,0 +1,4 @@
+Spandsp is a DSP library to support fax functions in the Asterisk PBX.
+Basically it implements a software fax machine to fax out or in.
+
+WWW: http://www.soft-switch.org/
diff --git a/comms/spandsp-devel5/pkg-plist b/comms/spandsp-devel5/pkg-plist
new file mode 100644
index 000000000000..513350cfab0c
--- /dev/null
+++ b/comms/spandsp-devel5/pkg-plist
@@ -0,0 +1,57 @@
+include/spandsp.h
+include/spandsp/adsi.h
+include/spandsp/alaw_ulaw.h
+include/spandsp/arctan2.h
+include/spandsp/awgn.h
+include/spandsp/bert.h
+include/spandsp/biquad.h
+include/spandsp/complex.h
+include/spandsp/complex_filters.h
+include/spandsp/dc_restore.h
+include/spandsp/dds.h
+include/spandsp/ec_disable_detector.h
+include/spandsp/echo.h
+include/spandsp/fir.h
+include/spandsp/fsk.h
+include/spandsp/g168models.h
+include/spandsp/hdlc.h
+include/spandsp/ima_adpcm.h
+include/spandsp/mmx.h
+include/spandsp/modem_echo.h
+include/spandsp/oki_adpcm.h
+include/spandsp/oss.h
+include/spandsp/playout.h
+include/spandsp/plc.h
+include/spandsp/power_meter.h
+include/spandsp/queue.h
+include/spandsp/schedule.h
+include/spandsp/sig_tone.h
+include/spandsp/super_tone_rx.h
+include/spandsp/super_tone_tx.h
+include/spandsp/t30.h
+include/spandsp/t30_fcf.h
+include/spandsp/t31.h
+include/spandsp/t35.h
+include/spandsp/t4.h
+include/spandsp/telephony.h
+include/spandsp/time_scale.h
+include/spandsp/timing.h
+include/spandsp/tone_detect.h
+include/spandsp/tone_generate.h
+include/spandsp/v17rx.h
+include/spandsp/v17tx.h
+include/spandsp/v22bis.h
+include/spandsp/v27ter_rx.h
+include/spandsp/v27ter_tx.h
+include/spandsp/v29rx.h
+include/spandsp/v29tx.h
+include/spandsp/v42.h
+include/spandsp/v8.h
+include/spandsp/vector.h
+lib/libspandsp.a
+lib/libspandsp.so
+lib/libspandsp.so.0
+%%DATADIR%%/global-tones.xml
+%%DATADIR%%/tones.dtd
+@dirrm %%DATADIR%%
+@dirrm include/spandsp
diff --git a/comms/spandsp/Makefile b/comms/spandsp/Makefile
new file mode 100644
index 000000000000..bdb06a923aee
--- /dev/null
+++ b/comms/spandsp/Makefile
@@ -0,0 +1,32 @@
+# New ports collection makefile for: spandsp
+# Date created: 23 June 2005
+# Whom: wlloyd@slap.net
+#
+# $FreeBSD$
+#
+
+PORTNAME= spandsp
+DISTVERSION= 0.0.2pre18
+CATEGORIES= comms
+MASTER_SITES= ftp://soft-switch.org/pub/spandsp/${PORTNAME}-${DISTVERSION}/
+
+MAINTAINER= ports@FreeBSD.org
+COMMENT= Fax DSP library for Asterisk
+
+LIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION:C/pre.*$//}
+
+USE_GMAKE= yes
+USE_REINPLACE= yes
+
+USE_LIBTOOL_VER= 15
+CONFIGURE_ARGS= CPPFLAGS="-I${LOCALBASE}/include" \
+ LDFLAGS="-L${LOCALBASE}/lib"
+
+INSTALLS_SHLIB= yes
+
+post-patch:
+ @${FIND} ${WRKSRC} -name *.c | ${XARGS} ${REINPLACE_CMD} -e 's|<stdint.h>|<inttypes.h>|'
+
+.include <bsd.port.mk>
diff --git a/comms/spandsp/distinfo b/comms/spandsp/distinfo
new file mode 100644
index 000000000000..fbef42a71658
--- /dev/null
+++ b/comms/spandsp/distinfo
@@ -0,0 +1,2 @@
+MD5 (spandsp-0.0.2pre18.tar.gz) = b01f2fdd47f30b0b80343ed2f75a7199
+SIZE (spandsp-0.0.2pre18.tar.gz) = 1288267
diff --git a/comms/spandsp/files/patch-src-Makefile.in b/comms/spandsp/files/patch-src-Makefile.in
new file mode 100644
index 000000000000..3b8f9a6f252d
--- /dev/null
+++ b/comms/spandsp/files/patch-src-Makefile.in
@@ -0,0 +1,11 @@
+--- src/Makefile.in~ Thu Apr 28 09:03:02 2005
++++ src/Makefile.in Thu Jun 23 15:27:14 2005
+@@ -211,7 +211,7 @@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+ MAINTAINERCLEANFILES = Makefile.in
+-INCLUDES = -I$(top_buildir)
++#INCLUDES = -I$(top_buildir)
+ lib_LTLIBRARIES = libspandsp.la
+ libspandsp_la_SOURCES = adsi.c \
+ awgn.c \
diff --git a/comms/spandsp/files/patch-src-playout.c b/comms/spandsp/files/patch-src-playout.c
new file mode 100644
index 000000000000..2674f62f0de3
--- /dev/null
+++ b/comms/spandsp/files/patch-src-playout.c
@@ -0,0 +1,10 @@
+--- src/playout.c~ Fri Feb 4 14:19:30 2005
++++ src/playout.c Thu Jun 23 15:35:06 2005
+@@ -37,6 +37,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <limits.h>
++#include <sys/types.h>
+
+ #include "spandsp/telephony.h"
+ #include "spandsp/playout.h"
diff --git a/comms/spandsp/files/patch-src-power_meter.c b/comms/spandsp/files/patch-src-power_meter.c
new file mode 100644
index 000000000000..5209632685e7
--- /dev/null
+++ b/comms/spandsp/files/patch-src-power_meter.c
@@ -0,0 +1,13 @@
+--- src/power_meter.c.orig Thu Jun 30 22:40:33 2005
++++ src/power_meter.c Thu Jun 30 22:41:05 2005
+@@ -72,6 +72,10 @@
+ }
+ /*- End of function --------------------------------------------------------*/
+
++#ifndef INFINITY
++#define INFINITY (float)HUGE_VAL
++#endif
++
+ float power_meter_dbm0(power_meter_t *meter)
+ {
+ float val;
diff --git a/comms/spandsp/files/patch-src-spandsp-dc_restore.h b/comms/spandsp/files/patch-src-spandsp-dc_restore.h
new file mode 100644
index 000000000000..d2f63ad0d8e4
--- /dev/null
+++ b/comms/spandsp/files/patch-src-spandsp-dc_restore.h
@@ -0,0 +1,14 @@
+--- src/spandsp/dc_restore.h.orig Tue Jan 18 15:05:48 2005
++++ src/spandsp/dc_restore.h Thu Jun 30 22:35:33 2005
+@@ -85,6 +85,11 @@
+ }
+ /*- End of function --------------------------------------------------------*/
+
++#ifndef INT16_MAX
++#define INT16_MAX 0x7fff
++#define INT16_MIN (-0x7fff-1)
++#endif
++
+ static inline int16_t saturate(int32_t amp)
+ {
+ if (amp > INT16_MAX)
diff --git a/comms/spandsp/files/patch-src-t31.c b/comms/spandsp/files/patch-src-t31.c
new file mode 100644
index 000000000000..7ffd6abfd2d6
--- /dev/null
+++ b/comms/spandsp/files/patch-src-t31.c
@@ -0,0 +1,28 @@
+--- src/t31.c.orig Thu Jun 30 23:07:14 2005
++++ src/t31.c Thu Jun 30 23:10:28 2005
+@@ -51,19 +51,12 @@
+ t31_profile_t profiles[3] =
+ {
+ {
+- .echo = TRUE,
+- .verbose = TRUE,
+- .result_code_format = ASCII_RESULT_CODES,
+- .pulse_dial = FALSE,
+- .double_escape = FALSE,
+- .s_regs[0] = 0,
+- .s_regs[3] = '\r',
+- .s_regs[4] = '\n',
+- .s_regs[5] = '\b',
+- .s_regs[6] = 1,
+- .s_regs[7] = 60,
+- .s_regs[8] = 5,
+- .s_regs[10] = 0
++ TRUE,
++ TRUE,
++ ASCII_RESULT_CODES,
++ FALSE,
++ FALSE,
++ { 0, 0, 0, '\r', '\n', '\b', 1, 60, 5, 0 }
+ }
+ };
+
diff --git a/comms/spandsp/pkg-descr b/comms/spandsp/pkg-descr
new file mode 100644
index 000000000000..a19fea158bbc
--- /dev/null
+++ b/comms/spandsp/pkg-descr
@@ -0,0 +1,4 @@
+Spandsp is a DSP library to support fax functions in the Asterisk PBX.
+Basically it implements a software fax machine to fax out or in.
+
+WWW: http://www.soft-switch.org/
diff --git a/comms/spandsp/pkg-plist b/comms/spandsp/pkg-plist
new file mode 100644
index 000000000000..513350cfab0c
--- /dev/null
+++ b/comms/spandsp/pkg-plist
@@ -0,0 +1,57 @@
+include/spandsp.h
+include/spandsp/adsi.h
+include/spandsp/alaw_ulaw.h
+include/spandsp/arctan2.h
+include/spandsp/awgn.h
+include/spandsp/bert.h
+include/spandsp/biquad.h
+include/spandsp/complex.h
+include/spandsp/complex_filters.h
+include/spandsp/dc_restore.h
+include/spandsp/dds.h
+include/spandsp/ec_disable_detector.h
+include/spandsp/echo.h
+include/spandsp/fir.h
+include/spandsp/fsk.h
+include/spandsp/g168models.h
+include/spandsp/hdlc.h
+include/spandsp/ima_adpcm.h
+include/spandsp/mmx.h
+include/spandsp/modem_echo.h
+include/spandsp/oki_adpcm.h
+include/spandsp/oss.h
+include/spandsp/playout.h
+include/spandsp/plc.h
+include/spandsp/power_meter.h
+include/spandsp/queue.h
+include/spandsp/schedule.h
+include/spandsp/sig_tone.h
+include/spandsp/super_tone_rx.h
+include/spandsp/super_tone_tx.h
+include/spandsp/t30.h
+include/spandsp/t30_fcf.h
+include/spandsp/t31.h
+include/spandsp/t35.h
+include/spandsp/t4.h
+include/spandsp/telephony.h
+include/spandsp/time_scale.h
+include/spandsp/timing.h
+include/spandsp/tone_detect.h
+include/spandsp/tone_generate.h
+include/spandsp/v17rx.h
+include/spandsp/v17tx.h
+include/spandsp/v22bis.h
+include/spandsp/v27ter_rx.h
+include/spandsp/v27ter_tx.h
+include/spandsp/v29rx.h
+include/spandsp/v29tx.h
+include/spandsp/v42.h
+include/spandsp/v8.h
+include/spandsp/vector.h
+lib/libspandsp.a
+lib/libspandsp.so
+lib/libspandsp.so.0
+%%DATADIR%%/global-tones.xml
+%%DATADIR%%/tones.dtd
+@dirrm %%DATADIR%%
+@dirrm include/spandsp