summaryrefslogtreecommitdiff
path: root/packages/asterisk/asterisk-1.2.13/asterisk.patch
blob: 006b8e929198619809a76efa416aba647ee49874 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221

#
# Patch managed by http://www.holgerschurig.de/patcher.html
#

--- asterisk-1.2.9.1/./Makefile~asterisk
+++ asterisk-1.2.9.1/./Makefile
@@ -331,7 +331,7 @@
 ASTCFLAGS+= $(TRACE_FRAMES)
 ASTCFLAGS+= $(MALLOC_DEBUG)
 ASTCFLAGS+= $(BUSYDETECT)
-ASTCFLAGS+= $(OPTIONS)
+#ASTCFLAGS+= $(OPTIONS)
 ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize)
 ASTCFLAGS+= -fomit-frame-pointer 
 endif
@@ -347,12 +347,12 @@
 	netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \
 	cryptostub.o
 
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),)
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/include/sys/poll.h),)
   OBJS+= poll.o
   ASTCFLAGS+=-DPOLLCOMPAT
 endif
 
-ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/dlfcn.h),)
+ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/include/dlfcn.h),)
   OBJS+= dlfcn.o
   ASTCFLAGS+=-DDLFCNCOMPAT
 endif
@@ -397,7 +397,7 @@
 endif
 
 ifeq ($(MAKETOPLEVEL),$(MAKELEVEL))
-  CFLAGS+=$(ASTCFLAGS)
+override CFLAGS+=$(ASTCFLAGS)
 endif
 
 # This is used when generating the doxygen documentation
@@ -519,7 +519,7 @@
 	fi
 	rm -f include/asterisk/build.h.tmp
 	$(CC) -c -o buildinfo.o $(CFLAGS) buildinfo.c
-	$(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LIBS)
+	$(CC) $(DEBUG) $(ASTOBJ) $(ASTLINK) $(OBJS) buildinfo.o $(LIBEDIT) db1-ast/libdb1.a stdtime/libtime.a $(LDFLAGS) $(LIBS)
 
 muted: muted.o
 	$(CC) $(AUDIO_LIBS) -o muted muted.o
--- asterisk-1.2.9.1/codecs/gsm/Makefile~asterisk
+++ asterisk-1.2.9.1/codecs/gsm/Makefile
@@ -51,7 +51,7 @@
            ifneq (${PROC},ppc)
             ifneq (${PROC},ppc64)
              ifneq (${PROC},s390)
-OPTIMIZE+=-march=$(PROC)
+#OPTIMIZE+=-march=$(PROC)
              endif
             endif
            endif
@@ -243,7 +243,7 @@
 ifneq (${PROC},arm)
 ifneq ($(shell uname -m), parisc)
 ifneq ($(shell uname -m),s390)
-GSM_SOURCES+= $(SRC)/k6opt.s
+#GSM_SOURCES+= $(SRC)/k6opt.s
 endif
 endif
 endif
@@ -309,7 +309,7 @@
 ifneq ($(shell uname -m), armv4l)
 ifneq ($(shell uname -m), parisc)
 ifneq ($(shell uname -m),s390)
-GSM_OBJECTS+= $(SRC)/k6opt.o
+#GSM_OBJECTS+= $(SRC)/k6opt.o
 endif
 endif
 endif
--- asterisk-1.2.9.1/res/Makefile~asterisk
+++ asterisk-1.2.9.1/res/Makefile
@@ -89,7 +89,7 @@
 	fi
 
 res_crypto.so: res_crypto.o
-	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CRYPTO_LIBS)
+	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< $(LDFLAGS) ${CYGSOLIB} $(CRYPTO_LIBS)
 
 clean:
 	rm -f *.so *.o .depend
--- asterisk-1.2.9.1/channels/Makefile~asterisk
+++ asterisk-1.2.9.1/channels/Makefile
@@ -73,7 +73,7 @@
   SOLINK+=-lrt
 endif
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/ixjuser.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/ixjuser.h),)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/linux/ixjuser.h),)
   CHANNEL_LIBS+=chan_phone.so
 endif
 
@@ -88,16 +88,16 @@
 
 CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/alsa/asoundlib.h),)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/alsa/asoundlib.h),)
   CHANNEL_LIBS+=chan_alsa.so
 endif
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libpri.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libpri.so.1),)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/lib/libpri.so.1),)
   CFLAGS+=-DZAPATA_PRI
   ZAPPRI=-lpri
 endif
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libmfcr2.so.1)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/lib/libmfcr2.so.1),)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/lib/libmfcr2.so.1),)
   CFLAGS+=-DZAPATA_R2
   ZAPR2=-lmfcr2
 endif
@@ -110,7 +110,7 @@
 endif
 
 ifndef WITHOUT_ZAPTEL
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/linux/zaptel.h),)
   ifeq (${OSARCH},NetBSD)
     SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/pkg/lib
   endif
@@ -122,7 +122,7 @@
 endif
 endif # WITHOUT_ZAPTEL
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vpbapi.h),)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/vpbapi.h),)
   CHANNEL_LIBS+=chan_vpb.so
   CFLAGS+=-DLINUX
 endif
@@ -137,7 +137,7 @@
 
 ZAPDIR=/usr/lib
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/nbs.h),)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/nbs.h),)
   CHANNEL_LIBS+=chan_nbs.so
 endif
 
@@ -158,7 +158,7 @@
 	rm -f busy.h ringtone.h gentone gentone-ulaw
 
 %.so : %.o
-	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} ${LIBS}
+	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< $(LDFLAGS) ${CYGSOLIB} ${LIBS}
 
 ifneq ($(wildcard .depend),)
   include .depend
@@ -215,7 +215,7 @@
 chan_alsa.o: $(ALSA_SRC)
 
 chan_alsa.so: chan_alsa.o
-	$(CC) $(SOLINK) -o $@ $< -lasound -lm -ldl
+	$(CC) $(SOLINK) -o $@ $< -lasound -lm -ldl $(LDFLAGS)
 
 chan_nbs.so: chan_nbs.o
 	$(CC) $(SOLINK) -o $@ $< -lnbs
--- asterisk-1.2.9.1/pbx/Makefile~asterisk
+++ asterisk-1.2.9.1/pbx/Makefile
@@ -59,7 +59,7 @@
 	$(CC) $(SOLINK) -o $@ $(KDE_CONSOLE_OBJS) $(KDE_LIBS)
 
 pbx_dundi.so: dundi-parser.o pbx_dundi.o
-	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o -lz ${CYGSOLIB}
+	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} pbx_dundi.o dundi-parser.o -lz ${CYGSOLIB} $(LDFLAGS)
 
 %.moc : %.h
 	$(MOC) $< -o $@
--- asterisk-1.2.9.1/formats/Makefile~asterisk
+++ asterisk-1.2.9.1/formats/Makefile
@@ -25,7 +25,7 @@
 #
 # OGG/Vorbis format
 #
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/vorbis/codec.h),)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/vorbis/codec.h),)
   FORMAT_LIBS+=format_ogg_vorbis.so
 endif
 
@@ -57,7 +57,7 @@
 	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lm
 
 format_ogg_vorbis.so : format_ogg_vorbis.o
-	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -logg -lvorbis -lvorbisenc -lm
+	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -logg -lvorbis -lvorbisenc -lm $(LDFLAGS)
 
 install: all
 	for x in $(FORMAT_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
--- asterisk-1.2.9.1/utils/Makefile~asterisk
+++ asterisk-1.2.9.1/utils/Makefile
@@ -22,11 +22,11 @@
 
 TARGET=stereorize streamplayer
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/popt.h)$(wildcard -f $(CROSS_COMPILE_TARGET)/usr/local/include/popt.h),)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/popt.h),)
   TARGET+=smsq
 endif
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/newt.h)$(wildcard -f $(CROSS_COMPILE_TARGET)/usr/local/include/newt.h),)
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/include/newt.h),)
   TARGET+=astman
 endif
 
@@ -64,7 +64,7 @@
 	$(CC) $(CFLAGS) -o $@ $^
 
 smsq: smsq.o
-	$(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt
+	$(CC) $(CFLAGS) -o smsq ${SOL} smsq.o -lpopt $(LDFLAGS)
 
 streamplayer: streamplayer.o
 	$(CC) $(CFLAGS) -o streamplayer ${SOL} streamplayer.o ${SOLLIBS}