summaryrefslogtreecommitdiff
path: root/comms/asterisk
diff options
context:
space:
mode:
authorhans <hans@pkgsrc.org>2012-02-16 16:13:51 +0000
committerhans <hans@pkgsrc.org>2012-02-16 16:13:51 +0000
commit34b818fd25971f4421f17ce38c594a4571251964 (patch)
treefbff3a2584831c095c306429828089023184b9e4 /comms/asterisk
parenta476d3d9eecbee46ed1b10ff55c34833a1c0ebe8 (diff)
downloadpkgsrc-34b818fd25971f4421f17ce38c594a4571251964.tar.gz
Fix build on SunOS.
Diffstat (limited to 'comms/asterisk')
-rw-r--r--comms/asterisk/distinfo5
-rw-r--r--comms/asterisk/patches/patch-aa74
-rw-r--r--comms/asterisk/patches/patch-include_asterisk_channel.h13
3 files changed, 63 insertions, 29 deletions
diff --git a/comms/asterisk/distinfo b/comms/asterisk/distinfo
index ae45d4b3a42..278bca508e8 100644
--- a/comms/asterisk/distinfo
+++ b/comms/asterisk/distinfo
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.45 2009/12/18 14:39:26 jnemeth Exp $
+$NetBSD: distinfo,v 1.46 2012/02/16 16:21:36 hans Exp $
SHA1 (asterisk-1.2.37.tar.gz) = c9a3c4684e021f62b4d19f6e0c8fc11f64db19d6
RMD160 (asterisk-1.2.37.tar.gz) = 1de7ff96d3b1fd8d89f3ef7b3bb9e35bedccfb33
Size (asterisk-1.2.37.tar.gz) = 29899629 bytes
-SHA1 (patch-aa) = 0070d874445d5bad7eb5a4cbd023a8f698e1f938
+SHA1 (patch-aa) = 47b6c420e05605aea8917ae43bf6f2268015deaf
SHA1 (patch-ab) = 1bdae0ff206b63fe63373a307ecd23859c10cb79
SHA1 (patch-ac) = 4f783699c7d701030788646f8b961fa9245dc127
SHA1 (patch-ad) = 93a40eebdd2049cce2a976e54fcc3ea6a0548ebb
@@ -16,3 +16,4 @@ SHA1 (patch-ak) = 3027134258138ca9163d9569548c7d4faffb874f
SHA1 (patch-al) = 1457c9a12eb5c5621eb244423c2190fb430866e7
SHA1 (patch-am) = a652b091462673390e19ab47e17500d055779094
SHA1 (patch-an) = 5bfb86853e868bc78eb0061871f4abce0df1ba2c
+SHA1 (patch-include_asterisk_channel.h) = a651103dcb9267569dcf6d08ff05e596463606e6
diff --git a/comms/asterisk/patches/patch-aa b/comms/asterisk/patches/patch-aa
index 8526e93470b..60015bc43f1 100644
--- a/comms/asterisk/patches/patch-aa
+++ b/comms/asterisk/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.13 2008/04/24 09:04:56 wiz Exp $
+$NetBSD: patch-aa,v 1.14 2012/02/16 16:21:36 hans Exp $
--- Makefile.orig 2007-07-16 20:33:02.000000000 +0200
+++ Makefile
@@ -10,10 +10,11 @@ $NetBSD: patch-aa,v 1.13 2008/04/24 09:04:56 wiz Exp $
endif
#Overwite config files on "make samples"
-@@ -111,31 +110,32 @@ BUSYDETECT+= #-DBUSYDETECT_TONEONLY
+@@ -110,35 +109,20 @@ BUSYDETECT+= #-DBUSYDETECT_TONEONLY
+ # Don't use together with -DBUSYDETECT_TONEONLY
BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
- ifneq ($(OSARCH),SunOS)
+-ifneq ($(OSARCH),SunOS)
- ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
- ASTVARLIBDIR=$(INSTALL_PREFIX)/var/lib/asterisk
- ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk
@@ -39,7 +40,7 @@ $NetBSD: patch-aa,v 1.13 2008/04/24 09:04:56 wiz Exp $
+ ASTEXAMPLEDIR?=${PREFIX}/share/examples/asterisk
MODULES_DIR=$(ASTLIBDIR)/modules
AGI_DIR=$(ASTVARLIBDIR)/agi-bin
- else
+-else
- ASTLIBDIR=$(INSTALL_PREFIX)/opt/asterisk/lib
- ASTVARLIBDIR=$(INSTALL_PREFIX)/var/opt/asterisk/lib
- ASTETCDIR=$(INSTALL_PREFIX)/etc/opt/asterisk
@@ -51,21 +52,27 @@ $NetBSD: patch-aa,v 1.13 2008/04/24 09:04:56 wiz Exp $
- ASTSBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/sbin
- ASTVARRUNDIR=$(INSTALL_PREFIX)/var/opt/asterisk/run
- ASTMANDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/share/man
-+ASTLIBDIR = ${PREFIX}/lib/asterisk
-+ASTVARLIBDIR = ${PREFIX}/libdata/asterisk
-+ASTETCDIR = ${PREFIX}/etc/asterisk
-+ASTSPOOLDIR = ${VARBASE}/spool/asterisk
-+ASTLOGDIR = ${VARBASE}/log/asterisk
-+ASTHEADERDIR = ${PREFIX}/include/asterisk
-+ASTCONFPATH = ${PREFIX}/etc/asterisk/asterisk.conf
-+ASTBINDIR = ${PREFIX}/bin
-+ASTSBINDIR = ${PREFIX}/sbin
-+ASTVARRUNDIR = ${VARBASE}/run
-+ASTMANDIR = ${PREFIX}/man
- MODULES_DIR=$(ASTLIBDIR)/modules
- AGI_DIR=$(ASTVARLIBDIR)/agi-bin
- endif
-@@ -231,10 +231,14 @@ ASTCFLAGS+=$(OPTIMIZE)
+- MODULES_DIR=$(ASTLIBDIR)/modules
+- AGI_DIR=$(ASTVARLIBDIR)/agi-bin
+-endif
+
+ ASTCFLAGS=-Wformat-security
+
+@@ -217,24 +201,20 @@ GREP=grep
+ LN=ln
+ ID=id
+
+-ifeq ($(OSARCH),SunOS)
+- GREP=/usr/xpg4/bin/grep
+- M4=/usr/local/bin/m4
+- ID=/usr/xpg4/bin/id
+- LN=/usr/xpg4/bin/ln
+- INSTALL=ginstall
+-endif
+-
+ INCLUDE+=-Iinclude -I../include
+ ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE #-DMAKE_VALGRIND_HAPPY
+ ASTCFLAGS+=$(OPTIMIZE)
ASTOBJ=-o asterisk
ifeq ($(findstring BSD,$(OSARCH)),BSD)
@@ -81,7 +88,7 @@ $NetBSD: patch-aa,v 1.13 2008/04/24 09:04:56 wiz Exp $
ifneq ($(PROC),ultrasparc)
ASTCFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
endif
-@@ -262,24 +266,24 @@ ifeq ($(OSARCH),FreeBSD)
+@@ -262,24 +242,24 @@ ifeq ($(OSARCH),FreeBSD)
# XXX FreeBSD paths
PREFIX?=/usr/local
@@ -118,7 +125,7 @@ $NetBSD: patch-aa,v 1.13 2008/04/24 09:04:56 wiz Exp $
MPG123TARG=netbsd
endif
-@@ -301,7 +305,7 @@ ifeq ($(findstring CYGWIN,$(OSARCH)),CYG
+@@ -301,7 +281,7 @@ ifeq ($(findstring CYGWIN,$(OSARCH)),CYG
ASTOBJ=-shared -o asterisk.dll -Wl,--out-implib=libasterisk.dll.a -Wl,--export-all-symbols
ASTLINK=
LIBS+=-lpthread -lncurses -lm -lresolv
@@ -127,7 +134,20 @@ $NetBSD: patch-aa,v 1.13 2008/04/24 09:04:56 wiz Exp $
PROC=$(shell uname -m)
endif
-@@ -382,7 +386,8 @@ ifeq ($(OSARCH),Darwin)
+@@ -369,11 +349,7 @@ endif
+ ifeq ($(OSARCH),Linux)
+ LIBS+=-ldl -lpthread -lncurses -lm -lresolv #-lnjamd
+ else
+- ifeq ($(OSARCH),SunOS)
+- LIBS+=-lm -lcurses
+- else
+- LIBS+=-lncurses -lm
+- endif
++ LIBS+=-lncurses -lm
+ endif
+
+ ifeq ($(OSARCH),Darwin)
+@@ -382,7 +358,8 @@ ifeq ($(OSARCH),Darwin)
AUDIO_LIBS=-framework CoreAudio
ASTLINK=-Wl,-dynamic
SOLINK=-dynamic -bundle -undefined suppress -force_flat_namespace
@@ -137,7 +157,7 @@ $NetBSD: patch-aa,v 1.13 2008/04/24 09:04:56 wiz Exp $
ASTCFLAGS+=-DPOLLCOMPAT
else
#These are used for all but Darwin
-@@ -394,8 +399,12 @@ ifeq ($(OSARCH),FreeBSD)
+@@ -394,8 +371,12 @@ ifeq ($(OSARCH),FreeBSD)
LIBS+=-lcrypto
endif
@@ -151,7 +171,7 @@ $NetBSD: patch-aa,v 1.13 2008/04/24 09:04:56 wiz Exp $
endif
ifeq ($(OSARCH),OpenBSD)
-@@ -551,7 +560,7 @@ clean:
+@@ -551,7 +532,7 @@ clean:
$(MAKE) -C stdtime clean
datafiles: all
@@ -160,7 +180,7 @@ $NetBSD: patch-aa,v 1.13 2008/04/24 09:04:56 wiz Exp $
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/silence
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/priv-callerintros
-@@ -651,7 +660,7 @@ bininstall: all
+@@ -651,7 +632,7 @@ bininstall: all
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/tmp
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/meetme
mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/monitor
@@ -169,7 +189,7 @@ $NetBSD: patch-aa,v 1.13 2008/04/24 09:04:56 wiz Exp $
if [ -f cygwin/asterisk.exe ]; then $(INSTALL) -m 755 cygwin/asterisk.exe $(DESTDIR)$(ASTSBINDIR)/; fi
if [ -f asterisk.dll ]; then $(INSTALL) -m 755 asterisk.dll $(DESTDIR)$(ASTSBINDIR)/; fi
$(LN) -sf asterisk $(DESTDIR)$(ASTSBINDIR)/rasterisk
-@@ -740,31 +749,31 @@ install: all datafiles bininstall instal
+@@ -740,31 +721,31 @@ install: all datafiles bininstall instal
upgrade: all bininstall
adsi:
@@ -210,7 +230,7 @@ $NetBSD: patch-aa,v 1.13 2008/04/24 09:04:56 wiz Exp $
( \
echo "[directories]" ; \
echo "astetcdir => $(ASTETCDIR)" ; \
-@@ -781,7 +790,7 @@ samples: adsi
+@@ -781,7 +762,7 @@ samples: adsi
echo ";astctlowner = root" ; \
echo ";astctlgroup = apache" ; \
echo ";astctl = asterisk.ctl" ; \
diff --git a/comms/asterisk/patches/patch-include_asterisk_channel.h b/comms/asterisk/patches/patch-include_asterisk_channel.h
new file mode 100644
index 00000000000..007b182aa68
--- /dev/null
+++ b/comms/asterisk/patches/patch-include_asterisk_channel.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-include_asterisk_channel.h,v 1.1 2012/02/16 16:21:36 hans Exp $
+
+--- include/asterisk/channel.h.orig 2006-11-07 19:22:01.000000000 +0100
++++ include/asterisk/channel.h 2012-01-25 13:58:47.328811938 +0100
+@@ -1121,7 +1121,7 @@ static inline int ast_fdisset(struct pol
+ return 0;
+ }
+
+-#ifdef SOLARIS
++#if defined(SOLARIS) && !defined(timersub)
+ static inline void timersub(struct timeval *tvend, struct timeval *tvstart, struct timeval *tvdiff)
+ {
+ tvdiff->tv_sec = tvend->tv_sec - tvstart->tv_sec;