aboutsummaryrefslogtreecommitdiff
path: root/net/iaxmodem
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2006-08-21 04:30:49 +0000
committerRong-En Fan <rafan@FreeBSD.org>2006-08-21 04:30:49 +0000
commitd3ae086cc4924b15655a840784d4f862c0130cc2 (patch)
tree98338cb50193a50fd99bcb2198776602fb1541b7 /net/iaxmodem
parentf85ae0632a1f9d6749ebcb85bb33a731d2a630e7 (diff)
downloadports-d3ae086cc4924b15655a840784d4f862c0130cc2.tar.gz
ports-d3ae086cc4924b15655a840784d4f862c0130cc2.zip
Notes
Diffstat (limited to 'net/iaxmodem')
-rw-r--r--net/iaxmodem/Makefile23
-rw-r--r--net/iaxmodem/distinfo6
-rw-r--r--net/iaxmodem/files/Makefile.in32
-rw-r--r--net/iaxmodem/files/configure30
-rw-r--r--net/iaxmodem/files/iaxmodem.in (renamed from net/iaxmodem/files/iaxmodem.sh.in)0
-rw-r--r--net/iaxmodem/files/patch-aa80
-rw-r--r--net/iaxmodem/files/patch-iaxmodem.c29
-rw-r--r--net/iaxmodem/files/patch-lib_libiax2_src_iax.c31
-rw-r--r--net/iaxmodem/files/patch-lib_spandsp_src_spandsp_t4.h11
9 files changed, 151 insertions, 91 deletions
diff --git a/net/iaxmodem/Makefile b/net/iaxmodem/Makefile
index 8344270d0c1a..3c6d2d8bdd75 100644
--- a/net/iaxmodem/Makefile
+++ b/net/iaxmodem/Makefile
@@ -6,13 +6,13 @@
#
PORTNAME= iaxmodem
-PORTVERSION= 0.1.9
-CATEGORIES= comms
+PORTVERSION= 0.1.14
+CATEGORIES= comms net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= filippo.natali@gmail.com
-COMMENT= Software modem that connects ta IAX channel
+COMMENT= Software modem that connects to IAX channel
LIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff
@@ -20,16 +20,17 @@ MAN1= iaxmodem.1
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS= -L${LOCALBASE}/lib
MAKE_ENV= LDFLAGS="${LDFLAGS}"
+CONFIGURE_ENV= LDFLAGS="${LDFLAGS}"
SUB_FILES= pkg-message
-USE_RC_SUBR= iaxmodem.sh
+USE_RC_SUBR= iaxmodem
+GNU_CONFIGURE= yes
post-patch:
@${REINPLACE_CMD} -e "s|/usr/local/etc|${PREFIX}/etc|g" ${WRKSRC}/iaxmodem.1
@${REINPLACE_CMD} -e "s|/etc/iaxmodem|${PREFIX}/etc/iaxmodem|g" ${WRKSRC}/iaxmodem.c
-
-do-build:
- @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./build static
+ @${CP} ${FILESDIR}/configure ${FILESDIR}/Makefile.in ${WRKSRC}/
+ @${CHMOD} a+x ${WRKSRC}/configure
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/iaxmodem ${PREFIX}/sbin/ && \
@@ -49,4 +50,10 @@ post-install:
@${CAT} ${PKGMESSAGE}
.endif
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+BROKEN= does not compile
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/net/iaxmodem/distinfo b/net/iaxmodem/distinfo
index dabc27a8459b..fbd431dbf356 100644
--- a/net/iaxmodem/distinfo
+++ b/net/iaxmodem/distinfo
@@ -1,3 +1,3 @@
-MD5 (iaxmodem-0.1.9.tar.gz) = 621ea4c684d2b7ea14485e9493ecc703
-SHA256 (iaxmodem-0.1.9.tar.gz) = b692beeb075e1047300373d4b928a6c29cc3ec702d40046f9b7540455028cd87
-SIZE (iaxmodem-0.1.9.tar.gz) = 2006491
+MD5 (iaxmodem-0.1.14.tar.gz) = 00cf7a266da5633fa67b3706944fca30
+SHA256 (iaxmodem-0.1.14.tar.gz) = f1dbce6f2fbab8e53ef84c160f06f891463a8d8dfc0f5155c6e697663179e0f8
+SIZE (iaxmodem-0.1.14.tar.gz) = 2058627
diff --git a/net/iaxmodem/files/Makefile.in b/net/iaxmodem/files/Makefile.in
new file mode 100644
index 000000000000..e19e285d2dd0
--- /dev/null
+++ b/net/iaxmodem/files/Makefile.in
@@ -0,0 +1,32 @@
+MODEMVER= iaxmodem-0.1.14
+DSPVER= @DSPVER@
+IAXVER= @IAXVER@
+
+CFLAGS:= -DMODEMVER=\"${MODEMVER}\" -DDSPVER=\"${DSPVER}\" -DIAXVER=\"${IAXVER}\" \
+ -Wall -g -DSTATICLIBS -D_GNU_SOURCE \
+ -std=c99 -Ilib/libiax2/src -Ilib/spandsp/src \
+ ${CFLAGS}
+OUR_CFLAGS= -Wall -g -DSTATICLIBS -D_GNU_SOURCE \
+ -std=c99 -Ilib/libiax2/src -Ilib/spandsp/src
+OBJS= iaxmodem.o lib/spandsp/src/.libs/libspandsp.a lib/libiax2/src/.libs/libiax.a
+LDFLAGS+= -lm -lutil -ltiff
+
+all: iaxmodem
+
+iaxmodem: build-libiax build-libspandsp iaxmodem.o
+ ${CC} ${CFLAGS} ${OBJS} -o iaxmodem ${LDFLAGS}
+
+iaxmodem.o: iaxmodem.c
+ ${CC} ${CFLAGS} -c iaxmodem.c
+
+build-libiax:
+ cd lib/libiax2 && ${MAKE}
+
+build-libspandsp:
+ cd lib/spandsp && ${MAKE}
+
+clean:
+ rm -f *.o && \
+ cd lib/libiax2 && ${MAKE} clean && \
+ cd ../../lib/spandsp && ${MAKE} clean
+
diff --git a/net/iaxmodem/files/configure b/net/iaxmodem/files/configure
new file mode 100644
index 000000000000..abc5f4f85174
--- /dev/null
+++ b/net/iaxmodem/files/configure
@@ -0,0 +1,30 @@
+#!/bin/sh
+cd lib/libiax2 && \
+./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" --disable-shared && \
+cd ../../lib/spandsp && \
+./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" --disable-shared && \
+cd ../..
+
+if [ $? != 0 ]; then
+ exit 1
+fi
+
+STEP1=`grep @VERSION@ lib/spandsp/config.status | sed 's/;.*//g'`
+DSPVER=`echo "@VERSION@" | sed ${STEP1}`
+if [ -n "${DSPVER}" ]; then
+ DSPVER="spandsp-${DSPVER}-snapshot-20060707+"
+fi
+STEP1=`grep @VERSION@ lib/libiax2/config.status | sed 's/;.*//g'`
+IAXVER=`echo "@VERSION@" | sed ${STEP1}`
+if [ -n "${IAXVER}" ]; then
+ IAXVER="libiax2-${IAXVER}-CVS-20060222+"
+fi
+
+cat Makefile.in | sed -e "s/@DSPVER@/${DSPVER}/g" | \
+ sed -e "s/@IAXVER@/${IAXVER}/g" > Makefile
+
+echo ${IAXVER}
+echo ${DSPVER}
+
+exit $?
+
diff --git a/net/iaxmodem/files/iaxmodem.sh.in b/net/iaxmodem/files/iaxmodem.in
index c9ceba75397f..c9ceba75397f 100644
--- a/net/iaxmodem/files/iaxmodem.sh.in
+++ b/net/iaxmodem/files/iaxmodem.in
diff --git a/net/iaxmodem/files/patch-aa b/net/iaxmodem/files/patch-aa
deleted file mode 100644
index 93861884383b..000000000000
--- a/net/iaxmodem/files/patch-aa
+++ /dev/null
@@ -1,80 +0,0 @@
---- build.orig Mon Jun 12 17:03:49 2006
-+++ build Thu Jun 15 14:24:34 2006
-@@ -16,14 +17,14 @@
- ./configure && \
- make && \
- cd ../spandsp && \
-- ./configure && \
-+ ./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" && \
- make && \
- cd ../.. && \
-- gcc -Wall -O2 -g -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" -DSTATICLIBS -D_GNU_SOURCE \
-+ gcc $CFLAGS $LDFLAGS -Wall -O2 -g -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" -DSTATICLIBS -D_GNU_SOURCE \
- -std=c99 -Ilib/libiax2/src -Ilib/spandsp/src -c -o iaxmodem.o iaxmodem.c && \
-- gcc -lm -lutil -ltiff -o iaxmodem iaxmodem.o lib/spandsp/src/.libs/libspandsp.a lib/libiax2/src/.libs/libiax.a
-+ gcc $CFLAGS $LDFLAGS -lm -lutil -ltiff -o iaxmodem iaxmodem.o lib/spandsp/src/.libs/libspandsp.a lib/libiax2/src/.libs/libiax.a
- else
-- gcc -Wall -O2 -g -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" \
-+ gcc $CFLAGS $LDFLAGS -Wall -O2 -g -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" \
- -lm -liax -lutil -lspandsp -ltiff -o iaxmodem iaxmodem.c
- fi
- if [ -n "`ls /etc/iaxmodem-cfg.* 2>/dev/null`" ]; then
---- iaxmodem.c.orig Mon Jun 12 15:54:33 2006
-+++ iaxmodem.c Thu Jun 15 14:26:12 2006
-@@ -17,11 +17,13 @@
- */
- #include <stdio.h>
- #include <string.h>
--#ifndef __OpenBSD__
-+#if !defined(__OpenBSD__) && !defined(__FreeBSD__)
- #include <pty.h>
- #else
- #include <termios.h>
-+#if !defined(__FreeBSD__)
- #include <util.h>
-+#endif
- #endif
- #include <stdlib.h>
- #include <unistd.h>
---- lib/libiax2/src/iax.c.orig Mon Jun 12 15:54:46 2006
-+++ lib/libiax2/src/iax.c Thu Jun 15 14:22:17 2006
-@@ -44,6 +44,7 @@
- #else
-
- #include <netdb.h>
-+#include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <sys/time.h>
-@@ -64,9 +64,9 @@
- #include <arpa/inet.h>
- #include <time.h>
-
--#if !defined(MACOSX) && !defined(__OpenBSD__)
-+#if !defined(MACOSX) && !defined(__OpenBSD__) && !defined(__FreeBSD__)
- #include <malloc.h>
--#if !defined(SOLARIS)
-+#if !defined(SOLARIS) && !defined(__FreeBSD__)
- #include <error.h>
- #endif
- #endif
-@@ -97,7 +97,7 @@
- #ifdef MACOSX
- #define IAX_SOCKOPTS MSG_DONTWAIT
- #else
--#if defined(SOLARIS) || defined(__OpenBSD__)
-+#if defined(SOLARIS) || defined(__OpenBSD__) || defined(__FreeBSD__)
- #define IAX_SOCKOPTS MSG_DONTWAIT
- #else /* Linux and others */
- #define IAX_SOCKOPTS MSG_DONTWAIT | MSG_NOSIGNAL
---- lib/spandsp/src/spandsp/t4.h.orig Mon Jun 12 15:54:34 2006
-+++ lib/spandsp/src/spandsp/t4.h Thu Jun 15 14:17:20 2006
-@@ -28,6 +28,8 @@
-
- /*! \file */
-
-+#include <time.h>
-+
- #if !defined(_T4_H_)
- #define _T4_H_
-
diff --git a/net/iaxmodem/files/patch-iaxmodem.c b/net/iaxmodem/files/patch-iaxmodem.c
new file mode 100644
index 000000000000..89e46978e70f
--- /dev/null
+++ b/net/iaxmodem/files/patch-iaxmodem.c
@@ -0,0 +1,29 @@
+--- iaxmodem.c.orig Mon Jul 31 15:29:29 2006
++++ iaxmodem.c Fri Aug 11 20:23:50 2006
+@@ -17,12 +17,14 @@
+ */
+ #include <stdio.h>
+ #include <string.h>
+-#ifndef __OpenBSD__
++#if !defined(__OpenBSD__) && !defined(__FreeBSD__)
+ #include <pty.h>
+ #else
+ #include <termios.h>
++#if !defined(__FreeBSD__)
+ #include <util.h>
+ #endif
++#endif
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <dirent.h>
+@@ -44,6 +46,10 @@
+ #include <math.h>
+
+ #include <stdint.h>
++
++#ifdef __FreeBSD__
++#include <libutil.h>
++#endif
+ #include <tiffio.h>
+
+ #include <spandsp.h>
diff --git a/net/iaxmodem/files/patch-lib_libiax2_src_iax.c b/net/iaxmodem/files/patch-lib_libiax2_src_iax.c
new file mode 100644
index 000000000000..e9bb86b44bc6
--- /dev/null
+++ b/net/iaxmodem/files/patch-lib_libiax2_src_iax.c
@@ -0,0 +1,31 @@
+--- lib/libiax2/src/iax.c.orig Mon Jun 12 15:54:46 2006
++++ lib/libiax2/src/iax.c Thu Jun 15 14:22:17 2006
+@@ -44,6 +44,7 @@
+ #else
+
+ #include <netdb.h>
++#include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <sys/time.h>
+@@ -64,9 +64,9 @@
+ #include <arpa/inet.h>
+ #include <time.h>
+
+-#if !defined(MACOSX) && !defined(__OpenBSD__)
++#if !defined(MACOSX) && !defined(__OpenBSD__) && !defined(__FreeBSD__)
+ #include <malloc.h>
+-#if !defined(SOLARIS)
++#if !defined(SOLARIS) && !defined(__FreeBSD__)
+ #include <error.h>
+ #endif
+ #endif
+@@ -97,7 +97,7 @@
+ #ifdef MACOSX
+ #define IAX_SOCKOPTS MSG_DONTWAIT
+ #else
+-#if defined(SOLARIS) || defined(__OpenBSD__)
++#if defined(SOLARIS) || defined(__OpenBSD__) || defined(__FreeBSD__)
+ #define IAX_SOCKOPTS MSG_DONTWAIT
+ #else /* Linux and others */
+ #define IAX_SOCKOPTS MSG_DONTWAIT | MSG_NOSIGNAL
diff --git a/net/iaxmodem/files/patch-lib_spandsp_src_spandsp_t4.h b/net/iaxmodem/files/patch-lib_spandsp_src_spandsp_t4.h
new file mode 100644
index 000000000000..12e6f7036c66
--- /dev/null
+++ b/net/iaxmodem/files/patch-lib_spandsp_src_spandsp_t4.h
@@ -0,0 +1,11 @@
+--- lib/spandsp/src/spandsp/t4.h.orig Mon Jun 12 15:54:34 2006
++++ lib/spandsp/src/spandsp/t4.h Thu Jun 15 14:17:20 2006
+@@ -28,6 +28,8 @@
+
+ /*! \file */
+
++#include <time.h>
++
+ #if !defined(_T4_H_)
+ #define _T4_H_
+