On 2006/02/10 23:57, steven mestdagh wrote: > no answer to your mail, but for those of you working on the asterisk > port, can you also > - make it honor CC > - fix WANTLIB (run lib-depends-check)
thanks for the feedback steven. Attached, tested only on i386 so far. This includes memcpy/bcopy change change which I think is safe (though I'd welcome dissenting opinions), no feedback on that yet but I've been running with it on i386 for a few days without any problems and brief testing on sparc64 - but since I can't trigger the SIGBUS myself anyway, that doesn't count for much. (if it's going to happen, copying sample iax conf file, uncommenting sample FWD register line, and inserting account details should be enough to crash either shortly after startup or after running for a while). Build does not yet honour CFLAGS, that will take more time - the distribution Makefiles are, how shall I say, not entirely coherent. If you're used to Asterisk this is unlikely to surprise you :)
Index: Makefile =================================================================== RCS file: /data/cvs/OpenBSD/ports/telephony/asterisk/Makefile,v retrieving revision 1.7 diff -u -r1.7 Makefile --- Makefile 2 Feb 2006 16:12:24 -0000 1.7 +++ Makefile 11 Feb 2006 02:42:28 -0000 @@ -2,6 +2,7 @@ COMMENT= "open source PBX" DISTNAME= asterisk-1.2.4 +PKGNAME= ${DISTNAME}p0 CATEGORIES= telephony MASTER_SITES= ftp://ftp.digium.com/pub/asterisk/ @@ -14,7 +15,9 @@ PERMIT_DISTFILES_FTP= Yes PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes -WANTLIB= c crypto m ncurses ossaudio pthread ssl +WANTLIB= c crypto m ncurses pthread ssl z + +MAKE_FLAGS= CC="${CC} ${CFLAGS}" NO_REGRESS= Yes USE_GMAKE= Yes Index: patches/patch-Makefile =================================================================== RCS file: /data/cvs/OpenBSD/ports/telephony/asterisk/patches/patch-Makefile,v retrieving revision 1.5 diff -u -r1.5 patch-Makefile --- patches/patch-Makefile 2 Feb 2006 03:41:36 -0000 1.5 +++ patches/patch-Makefile 11 Feb 2006 02:29:34 -0000 @@ -1,6 +1,17 @@ -$OpenBSD: patch-Makefile,v 1.5 2006/02/02 03:41:36 todd Exp $ +$OpenBSD$ --- Makefile.orig Mon Dec 5 06:47:51 2005 -+++ Makefile Thu Jan 26 22:39:56 2006 ++++ Makefile Sat Feb 11 02:29:14 2006 +@@ -19,8 +19,8 @@ + # CROSS_COMPILE=/opt/montavista/pro/devkit/arm/xscale_be/bin/xscale_be- + # CROSS_COMPILE_BIN=/opt/montavista/pro/devkit/arm/xscale_be/bin/ + # CROSS_COMPILE_TARGET=/opt/montavista/pro/devkit/arm/xscale_be/target +-CC=$(CROSS_COMPILE)gcc +-HOST_CC=gcc ++CC?=$(CROSS_COMPILE)gcc ++HOST_CC=$(CC) + # CROSS_ARCH=Linux + # CROSS_PROC=arm + # SUB_PROC=xscale # or maverick @@ -44,8 +44,12 @@ #K6OPT = -DK6OPT Index: patches/patch-channels_chan_iax2_c =================================================================== RCS file: patches/patch-channels_chan_iax2_c diff -N patches/patch-channels_chan_iax2_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-channels_chan_iax2_c 9 Feb 2006 16:59:18 -0000 @@ -0,0 +1,21 @@ +$OpenBSD$ +--- channels/chan_iax2.c.orig Thu Feb 9 15:17:15 2006 ++++ channels/chan_iax2.c Thu Feb 9 15:17:33 2006 +@@ -5277,7 +5277,7 @@ + + memset(&ied, 0, sizeof(ied)); + if (ies->apparent_addr) +- memcpy(&new, ies->apparent_addr, sizeof(new)); ++ bcopy(ies->apparent_addr, &new, sizeof(new)); + if (ies->callno) + newcall = ies->callno; + if (!newcall || !new.sin_addr.s_addr || !new.sin_port) { +@@ -5427,7 +5427,7 @@ + + memset(&us, 0, sizeof(us)); + if (ies->apparent_addr) +- memcpy(&us, ies->apparent_addr, sizeof(us)); ++ bcopy(ies->apparent_addr, &us, sizeof(us)); + if (ies->username) + ast_copy_string(peer, ies->username, sizeof(peer)); + if (ies->refresh) Index: patches/patch-utils_Makefile =================================================================== RCS file: patches/patch-utils_Makefile diff -N patches/patch-utils_Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-utils_Makefile 11 Feb 2006 02:26:08 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ +--- utils/Makefile.orig Tue Nov 29 18:24:39 2005 ++++ utils/Makefile Sat Feb 11 02:25:41 2006 +@@ -55,10 +55,10 @@ + $(CC) $(CFLAGS) -o stereorize stereorize.o frame.o -lm + + ast_expr2.o: ../ast_expr2.c +- gcc -g -c -o $@ $< ++ $(CC) -g -c -o $@ $< + + ast_expr2f.o: ../ast_expr2f.c +- gcc -g -c -DSTANDALONE -o $@ $< ++ $(CC) -g -c -DSTANDALONE -o $@ $< + + check_expr: check_expr.c ast_expr2.o ast_expr2f.o + $(CC) $(CFLAGS) -o $@ $^