Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Aug 2006 02:37:38 -0400
From:      "Anish Mistry" <amistry@am-productions.biz>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Cc:        filippo.natali@gmail.com
Subject:   ports/101961: Update net/iaxmodem to 0.1.14
Message-ID:  <1155451058.68340@bigguy.am-productions.biz>
Resent-Message-ID: <200608130640.k7D6eFav007286@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         101961
>Category:       ports
>Synopsis:       Update net/iaxmodem to 0.1.14
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 13 06:40:15 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Anish Mistry
>Release:        FreeBSD 6.1-RELEASE-p1 i386
>Organization:
AM Productions 
>Environment:


System: FreeBSD 6.1-RELEASE-p1 #0: Thu Jun  1 21:16:20 EDT 2006
    amistry@bigguy.am-productions.biz:/usr/obj/usr/src/sys/BIGGUY



>Description:


Update to 0.1.14.  This also replaces the author's "build" system with one that is more port/package friendly.  Before if there was a problem with the build it wouldn't be caught and the ports system would still think the port built correctly.  This is apparent if you had spandsp installed and then tried to install iaxmodem which uses it's own statically linked spandsp version.  The Makefile and configure script that I wrote fix this problem as well.  Break up the patch file and add a build fix with libutil.


>How-To-Repeat:





>Fix:


--- iaxmodem-0.1.14.patch begins here ---
diff -ruN iaxmodem.orig/Makefile iaxmodem/Makefile
--- iaxmodem.orig/Makefile	Fri Jun 23 08:56:40 2006
+++ iaxmodem/Makefile	Sun Aug 13 02:19:45 2006
@@ -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,16 @@
 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}/
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/iaxmodem ${PREFIX}/sbin/ && \
diff -ruN iaxmodem.orig/distinfo iaxmodem/distinfo
--- iaxmodem.orig/distinfo	Fri Jun 23 08:56:40 2006
+++ iaxmodem/distinfo	Sat Aug 12 17:28:17 2006
@@ -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 -ruN iaxmodem.orig/files/Makefile.in iaxmodem/files/Makefile.in
--- iaxmodem.orig/files/Makefile.in	Wed Dec 31 19:00:00 1969
+++ iaxmodem/files/Makefile.in	Sat Aug 12 17:28:17 2006
@@ -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 -ruN iaxmodem.orig/files/configure iaxmodem/files/configure
--- iaxmodem.orig/files/configure	Wed Dec 31 19:00:00 1969
+++ iaxmodem/files/configure	Sat Aug 12 17:28:17 2006
@@ -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 -ruN iaxmodem.orig/files/iaxmodem.in iaxmodem/files/iaxmodem.in
--- iaxmodem.orig/files/iaxmodem.in	Wed Dec 31 19:00:00 1969
+++ iaxmodem/files/iaxmodem.in	Sun Aug 13 02:15:21 2006
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# PROVIDE: iaxmodem
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable iaxmodem:
+#
+# iaxmodem_enable="YES"
+#
+
+. %%RC_SUBR%%
+
+name=iaxmodem
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/iaxmodem
+
+pidfile=${iaxmodem_pidfile:-"/var/run/iaxmodem.pid"}
+
+iaxmodem_enable=${iaxmodem_enable:-"NO"}
+
+load_rc_config $name
+run_rc_command "$1"
diff -ruN iaxmodem.orig/files/iaxmodem.sh.in iaxmodem/files/iaxmodem.sh.in
--- iaxmodem.orig/files/iaxmodem.sh.in	Fri Jun 23 08:56:40 2006
+++ iaxmodem/files/iaxmodem.sh.in	Wed Dec 31 19:00:00 1969
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# PROVIDE: iaxmodem
-# REQUIRE: DAEMON
-# KEYWORD: shutdown
-
-#
-# Add the following lines to /etc/rc.conf to enable iaxmodem:
-#
-# iaxmodem_enable="YES"
-#
-
-. %%RC_SUBR%%
-
-name=iaxmodem
-rcvar=`set_rcvar`
-
-command=%%PREFIX%%/sbin/iaxmodem
-
-pidfile=${iaxmodem_pidfile:-"/var/run/iaxmodem.pid"}
-
-iaxmodem_enable=${iaxmodem_enable:-"NO"}
-
-load_rc_config $name
-run_rc_command "$1"
diff -ruN iaxmodem.orig/files/patch-aa iaxmodem/files/patch-aa
--- iaxmodem.orig/files/patch-aa	Sun Aug  6 12:59:31 2006
+++ iaxmodem/files/patch-aa	Wed Dec 31 19:00:00 1969
@@ -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 -ruN iaxmodem.orig/files/patch-iaxmodem.c iaxmodem/files/patch-iaxmodem.c
--- iaxmodem.orig/files/patch-iaxmodem.c	Wed Dec 31 19:00:00 1969
+++ iaxmodem/files/patch-iaxmodem.c	Sat Aug 12 17:28:17 2006
@@ -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 -ruN iaxmodem.orig/files/patch-lib_libiax2_src_iax.c iaxmodem/files/patch-lib_libiax2_src_iax.c
--- iaxmodem.orig/files/patch-lib_libiax2_src_iax.c	Wed Dec 31 19:00:00 1969
+++ iaxmodem/files/patch-lib_libiax2_src_iax.c	Sat Aug 12 17:28:17 2006
@@ -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 -ruN iaxmodem.orig/files/patch-lib_spandsp_src_spandsp_t4.h iaxmodem/files/patch-lib_spandsp_src_spandsp_t4.h
--- iaxmodem.orig/files/patch-lib_spandsp_src_spandsp_t4.h	Wed Dec 31 19:00:00 1969
+++ iaxmodem/files/patch-lib_spandsp_src_spandsp_t4.h	Sat Aug 12 17:28:17 2006
@@ -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_
+ 
--- iaxmodem-0.1.14.patch ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1155451058.68340>