瀏覽代碼

Merge pull request #145 from thess/sox-update

Import missing libs for sox and others
Ted Hess 10 年之前
父節點
當前提交
911bc46f3a

+ 94
- 0
libs/file/Makefile 查看文件

@@ -0,0 +1,94 @@
1
+#
2
+# Copyright (C) 2007-2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=file
11
+PKG_VERSION:=5.11
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=ftp://ftp.astron.com/pub/file/
16
+PKG_MD5SUM:=16a407bd66d6c7a832f3a5c0d609c27b
17
+
18
+PKG_LICENSE:=BSD-2c
19
+PKG_LICENSE_FILES:=COPYING
20
+
21
+PKG_FIXUP:=autoreconf
22
+PKG_INSTALL:=1
23
+PKG_BUILD_PARALLEL:=1
24
+
25
+include $(INCLUDE_DIR)/package.mk
26
+
27
+define Package/file/Default
28
+  TITLE:=File type determination
29
+  URL:=ftp://ftp.astron.com/pub/file/
30
+  MAINTAINER:=Luka Perkov <openwrt@lukaperkov.net>
31
+endef
32
+
33
+define Package/file
34
+$(call package/file/Default)
35
+  SECTION:=utils
36
+  CATEGORY:=Utilities
37
+  TITLE+= utility
38
+  DEPENDS:=+libmagic
39
+endef
40
+
41
+define Package/libmagic
42
+$(call package/file/Default)
43
+  SECTION:=libs
44
+  CATEGORY:=Libraries
45
+  TITLE+= library
46
+  DEPENDS:=+zlib
47
+endef
48
+
49
+CONFIGURE_ARGS += \
50
+	--enable-shared \
51
+	--enable-static \
52
+
53
+MAKE_PATH := src
54
+
55
+TARGET_CFLAGS += $(FPIC)
56
+
57
+define Build/Compile/magic
58
+	( cd $(PKG_BUILD_DIR)/magic/Magdir; \
59
+		for f in `ls`; do \
60
+			cat $$$${f}; \
61
+		done \
62
+	) > $(PKG_BUILD_DIR)/magic/magic
63
+endef
64
+Hooks/Compile/Post += Build/Compile/magic
65
+
66
+define Build/Install/magic
67
+	$(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/share/file
68
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/magic/magic $(PKG_INSTALL_DIR)/usr/share/file/
69
+endef
70
+Hooks/Install/Post += Build/Install/magic
71
+
72
+define Build/InstallDev
73
+	$(INSTALL_DIR) $(1)/usr/include
74
+	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/magic.h $(1)/usr/include/
75
+	$(INSTALL_DIR) $(1)/usr/lib
76
+	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libmagic.{a,so*} $(1)/usr/lib/
77
+endef
78
+
79
+define Package/file/install
80
+	$(INSTALL_DIR) $(1)/usr/bin
81
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/file $(1)/usr/bin/
82
+	$(INSTALL_DIR) $(1)/usr/share/misc
83
+	$(SED) "/^#/d" $(PKG_INSTALL_DIR)/usr/share/file/magic
84
+	$(SED) "/^$$$$/d" $(PKG_INSTALL_DIR)/usr/share/file/magic
85
+	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/file/magic $(1)/usr/share/misc/
86
+endef
87
+
88
+define Package/libmagic/install
89
+	$(INSTALL_DIR) $(1)/usr/lib
90
+	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libmagic.so.* $(1)/usr/lib/
91
+endef
92
+
93
+$(eval $(call BuildPackage,file))
94
+$(eval $(call BuildPackage,libmagic))

+ 98
- 0
libs/gsm/Makefile 查看文件

@@ -0,0 +1,98 @@
1
+#
2
+# Copyright (C) 2006-2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=gsm
11
+PKG_VERSION:=1.0.13
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=http://user.cs.tu-berlin.de/~jutta/gsm/
16
+PKG_MD5SUM:=c1ba392ce61dc4aff1c29ea4e92f6df4
17
+
18
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
19
+
20
+PKG_LICENSE:=FREE
21
+PKG_LICENSE_FILES:=COPYRIGHT
22
+
23
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-1.0-pl13
24
+
25
+include $(INCLUDE_DIR)/package.mk
26
+
27
+define Package/gsm/Default
28
+  TITLE:=GSM transcoding
29
+  URL:=http://user.cs.tu-berlin.de/~jutta/toast.html
30
+endef
31
+
32
+define Package/gsm/description/Default
33
+ An implementation of the European GSM 06.10 provisional standard
34
+ for full-rate speech transcoding, prI-ETS 300 036, which uses
35
+ RPE/LTP (residual pulse excitation/long term prediction) coding
36
+ at 13 kbit/s.
37
+endef
38
+
39
+define Package/libgsm
40
+$(call Package/gsm/Default)
41
+  SECTION:=libs
42
+  CATEGORY:=Libraries
43
+  TITLE+= library
44
+endef
45
+
46
+define Package/libgsm/description
47
+$(call Package/gsm/description/Default)
48
+ This package contains a shared GSM transcoding library, used by other
49
+ programs.
50
+endef
51
+
52
+define Package/gsm-utils
53
+$(call Package/gsm/Default)
54
+  SECTION:=utils
55
+  CATEGORY:=Utilities
56
+  DEPENDS:=+libgsm
57
+  TITLE+= utilities
58
+endef
59
+
60
+define Package/gsm-utils/description
61
+$(call Package/gsm/description/Default)
62
+ This package contains GSM transcoding utilities.
63
+endef
64
+
65
+define Build/Configure
66
+endef
67
+
68
+TARGET_CFLAGS += $(FPIC)
69
+
70
+define Build/Compile
71
+	$(MAKE) -C $(PKG_BUILD_DIR) \
72
+		$(TARGET_CONFIGURE_OPTS) \
73
+		LD="$(TARGET_CC)" \
74
+		COPTS="$(TARGET_CFLAGS)" \
75
+		INSTALL_ROOT="$(PKG_INSTALL_DIR)" \
76
+		all install
77
+endef
78
+
79
+define Package/libgsm/install
80
+	$(INSTALL_DIR) $(1)/usr/lib
81
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.so.* $(1)/usr/lib/
82
+endef
83
+
84
+define Package/gsm-utils/install
85
+	$(INSTALL_DIR) $(1)/usr/bin
86
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/toast $(1)/usr/bin/
87
+	(cd $(1)/usr/bin; ln -sf toast untoast; ln -sf toast tcat)
88
+endef
89
+
90
+define Build/InstallDev
91
+	$(INSTALL_DIR) $(1)/usr/include/gsm
92
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/gsm.h $(1)/usr/include/gsm/
93
+	$(INSTALL_DIR) $(1)/usr/lib
94
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsm.{a,so*} $(1)/usr/lib/
95
+endef
96
+
97
+$(eval $(call BuildPackage,libgsm))
98
+$(eval $(call BuildPackage,gsm-utils))

+ 428
- 0
libs/gsm/patches/001-debian-libsgm-1.0.10-13.patch 查看文件

@@ -0,0 +1,428 @@
1
+--- a/Makefile
2
++++ b/Makefile
3
+@@ -8,10 +8,12 @@ SASR	= -DSASR
4
+ ######### Define SASR if >> is a signed arithmetic shift (-1 >> 1 == -1)
5
+ 
6
+ # MULHACK = -DUSE_FLOAT_MUL
7
++MULHACK =
8
+ ######### Define this if your host multiplies floats faster than integers,
9
+ ######### e.g. on a SPARCstation.
10
+ 
11
+ # FAST	= -DFAST
12
++FAST	=
13
+ ######### Define together with USE_FLOAT_MUL to enable the GSM library's
14
+ ######### approximation option for incorrect, but good-enough results.
15
+ 
16
+@@ -22,8 +24,8 @@ LTP_CUT	=
17
+ ######### both integer and floating point multiplications.
18
+ ######### This flag is still in the experimental stage.
19
+ 
20
+-WAV49	= -DWAV49
21
+-# WAV49	=
22
++# WAV49	= -DWAV49
23
++WAV49	=
24
+ ######### Define to enable the GSM library's option to pack GSM frames 
25
+ ######### in the style used by the WAV #49 format.  If you want to write
26
+ ######### a tool that produces .WAV files which contain GSM-encoded data,
27
+@@ -44,7 +46,8 @@ WAV49	= -DWAV49
28
+ # CCFLAGS 	= -c -O
29
+ 
30
+ CC		= gcc -ansi -pedantic
31
+-CCFLAGS 	= -c -O2 -DNeedFunctionPrototypes=1
32
++COPTS		= -O2
33
++CCFLAGS 	= -c $(COPTS) -DNeedFunctionPrototypes=1
34
+ 
35
+ LD 		= $(CC)
36
+ 
37
+@@ -78,10 +81,10 @@ INSTALL_ROOT	=
38
+ # Leave GSM_INSTALL_ROOT empty to not install the GSM library outside of
39
+ # this directory.
40
+ 
41
+-GSM_INSTALL_ROOT = $(INSTALL_ROOT)
42
++GSM_INSTALL_ROOT = $(INSTALL_ROOT)/usr
43
+ GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib
44
+-GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/inc
45
+-GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3
46
++GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/include
47
++GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/share/man/man3
48
+ 
49
+ 
50
+ # Where do you want to install the toast binaries and their manpage?
51
+@@ -89,14 +92,14 @@ GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/ma
52
+ # Leave TOAST_INSTALL_ROOT empty to not install the toast binaries outside
53
+ # of this directory.
54
+ 
55
+-TOAST_INSTALL_ROOT	  = $(INSTALL_ROOT)
56
++TOAST_INSTALL_ROOT	  = $(INSTALL_ROOT)/usr
57
+ TOAST_INSTALL_BIN = $(TOAST_INSTALL_ROOT)/bin
58
+-TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/man/man1
59
++TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/share/man/man1
60
+ 
61
+ #  Other tools
62
+ 
63
+ SHELL		= /bin/sh
64
+-LN		= ln
65
++LN		= ln -s
66
+ BASENAME 	= basename
67
+ AR		= ar
68
+ ARFLAGS		= cr
69
+@@ -126,7 +129,7 @@ INC	= $(ROOT)/inc
70
+ 
71
+ # Flags
72
+ 
73
+-# DEBUG	= -DNDEBUG
74
++DEBUG	= -DNDEBUG
75
+ ######### Remove -DNDEBUG to enable assertions.
76
+ 
77
+ CFLAGS	= $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \
78
+@@ -140,6 +143,7 @@ LFLAGS	= $(LDFLAGS) $(LDINC)
79
+ # Targets
80
+ 
81
+ LIBGSM	= $(LIB)/libgsm.a
82
++LIBGSMSO= $(LIB)/libgsm.so
83
+ 
84
+ TOAST	= $(BIN)/toast
85
+ UNTOAST	= $(BIN)/untoast
86
+@@ -258,6 +262,9 @@ STUFF = 	ChangeLog			\
87
+ 
88
+ GSM_INSTALL_TARGETS =	\
89
+ 		$(GSM_INSTALL_LIB)/libgsm.a		\
90
++		$(GSM_INSTALL_LIB)/libgsm.so		\
91
++		$(GSM_INSTALL_LIB)/libgsm.so.1		\
92
++		$(GSM_INSTALL_LIB)/libgsm.so.1.0.10	\
93
+ 		$(GSM_INSTALL_INC)/gsm.h		\
94
+ 		$(GSM_INSTALL_MAN)/gsm.3		\
95
+ 		$(GSM_INSTALL_MAN)/gsm_explode.3	\
96
+@@ -279,7 +286,7 @@ TOAST_INSTALL_TARGETS =	\
97
+ 
98
+ # Target rules
99
+ 
100
+-all:		$(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST)
101
++all:		$(LIBGSM) $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST)
102
+ 		@-echo $(ROOT): Done.
103
+ 
104
+ tst:		$(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result
105
+@@ -299,6 +306,11 @@ install:	toastinstall gsminstall
106
+ 
107
+ # The basic API: libgsm
108
+ 
109
++$(LIBGSMSO):	$(LIB) $(GSM_OBJECTS)
110
++		$(LD) -o $@.1.0.10 -shared -Xlinker -soname -Xlinker libgsm.so.1 $(GSM_OBJECTS) -lc
111
++		ln -fs libgsm.so.1.0.10 lib/libgsm.so.1
112
++		ln -fs libgsm.so.1.0.10 lib/libgsm.so
113
++
114
+ $(LIBGSM):	$(LIB) $(GSM_OBJECTS)
115
+ 		-rm $(RMFLAGS) $(LIBGSM)
116
+ 		$(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
117
+@@ -308,15 +320,15 @@ $(LIBGSM):	$(LIB) $(GSM_OBJECTS)
118
+ # Toast, Untoast and Tcat -- the compress-like frontends to gsm.
119
+ 
120
+ $(TOAST):	$(BIN) $(TOAST_OBJECTS) $(LIBGSM)
121
+-		$(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSM) $(LDLIB)
122
++		$(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSMSO) $(LDLIB)
123
+ 
124
+ $(UNTOAST):	$(BIN) $(TOAST)
125
+ 		-rm $(RMFLAGS) $(UNTOAST)
126
+-		$(LN) $(TOAST) $(UNTOAST)
127
++		$(LN) toast $(UNTOAST)
128
+ 
129
+ $(TCAT):	$(BIN) $(TOAST)
130
+ 		-rm $(RMFLAGS) $(TCAT)
131
+-		$(LN) $(TOAST) $(TCAT)
132
++		$(LN) toast $(TCAT)
133
+ 
134
+ 
135
+ # The local bin and lib directories
136
+@@ -351,53 +363,66 @@ toastuninstall:
137
+ 		fi
138
+ 
139
+ $(TOAST_INSTALL_BIN)/toast:	$(TOAST)
140
+-		-rm $@
141
+-		cp $(TOAST) $@
142
++		mkdir -p $(TOAST_INSTALL_BIN)
143
++		cp -f $(TOAST) $@
144
+ 		chmod 755 $@
145
+ 
146
+ $(TOAST_INSTALL_BIN)/untoast:	$(TOAST_INSTALL_BIN)/toast
147
+-		-rm $@
148
+-		ln $? $@
149
++		mkdir -p $(TOAST_INSTALL_BIN)
150
++		ln -sf $? $@
151
+ 
152
+ $(TOAST_INSTALL_BIN)/tcat:	$(TOAST_INSTALL_BIN)/toast
153
+-		-rm $@
154
+-		ln $? $@
155
++		mkdir -p $(TOAST_INSTALL_BIN)
156
++		ln -sf $? $@
157
+ 
158
+ $(TOAST_INSTALL_MAN)/toast.1:	$(MAN)/toast.1
159
+-		-rm $@
160
+-		cp $? $@
161
++		mkdir -p $(TOAST_INSTALL_MAN)
162
++		cp -f $? $@
163
+ 		chmod 444 $@
164
+ 
165
+ $(GSM_INSTALL_MAN)/gsm.3:	$(MAN)/gsm.3
166
+-		-rm $@
167
+-		cp $? $@
168
++		mkdir -p $(GSM_INSTALL_MAN)
169
++		cp -f $? $@
170
+ 		chmod 444 $@
171
+ 
172
+ $(GSM_INSTALL_MAN)/gsm_option.3:	$(MAN)/gsm_option.3
173
+-		-rm $@
174
+-		cp $? $@
175
++		mkdir -p $(GSM_INSTALL_MAN)
176
++		cp -f $? $@
177
+ 		chmod 444 $@
178
+ 
179
+ $(GSM_INSTALL_MAN)/gsm_explode.3:	$(MAN)/gsm_explode.3
180
+-		-rm $@
181
+-		cp $? $@
182
++		mkdir -p $(GSM_INSTALL_MAN)
183
++		cp -f $? $@
184
+ 		chmod 444 $@
185
+ 
186
+ $(GSM_INSTALL_MAN)/gsm_print.3:	$(MAN)/gsm_print.3
187
+-		-rm $@
188
+-		cp $? $@
189
++		mkdir -p $(GSM_INSTALL_MAN)
190
++		cp -f $? $@
191
+ 		chmod 444 $@
192
+ 
193
+ $(GSM_INSTALL_INC)/gsm.h:	$(INC)/gsm.h
194
+-		-rm $@
195
+-		cp $? $@
196
++		mkdir -p $(GSM_INSTALL_INC)
197
++		cp -f $? $@
198
+ 		chmod 444 $@
199
+ 
200
+ $(GSM_INSTALL_LIB)/libgsm.a:	$(LIBGSM)
201
+-		-rm $@
202
+-		cp $? $@
203
++		mkdir -p $(GSM_INSTALL_LIB)
204
++		cp -f $? $@
205
+ 		chmod 444 $@
206
+ 
207
++$(GSM_INSTALL_LIB)/libgsm.so:	$(LIBGSMSO)
208
++		mkdir -p $(GSM_INSTALL_LIB)
209
++		cp -f $? $@
210
++
211
++$(GSM_INSTALL_LIB)/libgsm.so.1:	$(LIBGSMSO)
212
++		mkdir -p $(GSM_INSTALL_LIB)
213
++		cp -f $? $@
214
++
215
++$(GSM_INSTALL_LIB)/libgsm.so.1.0.10:	$(LIBGSMSO)
216
++		mkdir -p $(GSM_INSTALL_LIB)
217
++		cp -f $? $@
218
++		chmod 755 $@
219
++
220
+ 
221
+ # Distribution
222
+ 
223
+@@ -426,7 +451,9 @@ semi-clean:
224
+ 
225
+ clean:	semi-clean
226
+ 		-rm $(RMFLAGS) $(LIBGSM) $(ADDTST)/add		\
227
+-			$(TOAST) $(TCAT) $(UNTOAST)	\
228
++			$(LIBGSMSO) $(LIB)/libgsm.so.1.0.10	\
229
++			$(LIB)libgsm.so.1			\
230
++			$(TOAST) $(TCAT) $(UNTOAST)		\
231
+ 			$(ROOT)/gsm-1.0.tar.Z
232
+ 
233
+ 
234
+--- a/inc/config.h
235
++++ b/inc/config.h
236
+@@ -9,8 +9,8 @@
237
+ #ifndef	CONFIG_H
238
+ #define	CONFIG_H
239
+ 
240
+-/*efine	SIGHANDLER_T	int 		/* signal handlers are void	*/
241
+-/*efine HAS_SYSV_SIGNAL	1		/* sigs not blocked/reset?	*/
242
++/*efine	SIGHANDLER_T	int 		*//* signal handlers are void	*/
243
++/*efine HAS_SYSV_SIGNAL	1		*//* sigs not blocked/reset?	*/
244
+ 
245
+ #define	HAS_STDLIB_H	1		/* /usr/include/stdlib.h	*/
246
+ #define	HAS_LIMITS_H	1		/* /usr/include/limits.h	*/
247
+@@ -22,16 +22,16 @@
248
+ #define	HAS_CHMOD 	1		/* chmod syscall		*/
249
+ #define	HAS_FCHOWN 	1		/* fchown syscall		*/
250
+ #define	HAS_CHOWN 	1		/* chown syscall		*/
251
+-/*efine	HAS__FSETMODE 	1		/* _fsetmode -- set file mode	*/
252
++/*efine	HAS__FSETMODE 	1		*//* _fsetmode -- set file mode	*/
253
+ 
254
+ #define	HAS_STRING_H 	1		/* /usr/include/string.h 	*/
255
+-/*efine	HAS_STRINGS_H	1		/* /usr/include/strings.h 	*/
256
++/*efine	HAS_STRINGS_H	1		*//* /usr/include/strings.h 	*/
257
+ 
258
+ #define	HAS_UNISTD_H	1		/* /usr/include/unistd.h	*/
259
+ #define	HAS_UTIME	1		/* POSIX utime(path, times)	*/
260
+-/*efine	HAS_UTIMES	1		/* use utimes()	syscall instead	*/
261
++/*efine	HAS_UTIMES	1		*//* use utimes()	syscall instead	*/
262
+ #define	HAS_UTIME_H	1		/* UTIME header file		*/
263
+ #define	HAS_UTIMBUF	1		/* struct utimbuf		*/
264
+-/*efine	HAS_UTIMEUSEC   1		/* microseconds in utimbuf?	*/
265
++/*efine	HAS_UTIMEUSEC   1		*//* microseconds in utimbuf?	*/
266
+ 
267
+ #endif	/* CONFIG_H */
268
+--- a/inc/gsm.h
269
++++ b/inc/gsm.h
270
+@@ -54,6 +54,10 @@ typedef gsm_byte 		gsm_frame[33];		/* 33
271
+ #define	GSM_OPT_FRAME_INDEX	5
272
+ #define	GSM_OPT_FRAME_CHAIN	6
273
+ 
274
++#ifdef __cplusplus
275
++extern "C" {
276
++#endif
277
++
278
+ extern gsm  gsm_create 	GSM_P((void));
279
+ extern void gsm_destroy GSM_P((gsm));	
280
+ 
281
+@@ -66,6 +70,10 @@ extern int  gsm_decode  GSM_P((gsm, gsm_
282
+ extern int  gsm_explode GSM_P((gsm, gsm_byte   *, gsm_signal *));
283
+ extern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte   *));
284
+ 
285
++#ifdef __cplusplus
286
++}
287
++#endif
288
++
289
+ #undef	GSM_P
290
+ 
291
+ #endif	/* GSM_H */
292
+--- a/inc/toast.h
293
++++ b/inc/toast.h
294
+@@ -16,11 +16,12 @@
295
+ 
296
+ #include <stdio.h>
297
+ #include <ctype.h>
298
++#include <pthread.h>
299
+ #include <signal.h>
300
+ 
301
+ #include <errno.h>
302
+-#ifndef	HAS_ERRNO_DECL
303
+-	 extern int	errno;
304
++#ifndef errno
305
++ extern int	errno;
306
+ #endif
307
+ 
308
+ #ifdef	HAS_LIMITS_H
309
+@@ -37,6 +38,10 @@
310
+ # endif
311
+ #endif
312
+ 
313
++#ifdef  HAS_STDIO_H
314
++# include <stdio.h>
315
++#endif
316
++
317
+ #include "gsm.h"
318
+ 
319
+ #ifndef	S_ISREG
320
+--- a/src/code.c
321
++++ b/src/code.c
322
+@@ -9,8 +9,8 @@
323
+ #include	"config.h"
324
+ 
325
+ 
326
+-#ifdef	HAS_STDLIB_H
327
+-#include	<stdlib.h>
328
++#ifdef	HAS_STRING_H
329
++#include	<string.h>
330
+ #else
331
+ #	include "proto.h"
332
+ 	extern char	* memcpy P((char *, char *, int));
333
+--- a/src/debug.c
334
++++ b/src/debug.c
335
+@@ -49,7 +49,7 @@ void gsm_debug_longwords P4( (name, from
336
+ 	fprintf( stderr, "%s [%d .. %d]: ", name, from, to );
337
+ 	while (from <= to) {
338
+ 
339
+-		fprintf(stderr, "%d ", ptr[ from ] );
340
++		fprintf(stderr, "%ld ", ptr[ from ] );
341
+ 		from++;
342
+ 		if (nprinted++ >= 7) {
343
+ 			nprinted = 0;
344
+@@ -63,14 +63,14 @@ void gsm_debug_longword P2(  (name, valu
345
+ 	char		* name,
346
+ 	longword	  value	)
347
+ {
348
+-	fprintf(stderr, "%s: %d\n", name, (long)value );
349
++	fprintf(stderr, "%s: %ld\n", name, (long)value );
350
+ }
351
+ 
352
+ void gsm_debug_word P2(  (name, value),
353
+ 	char	* name,
354
+ 	word	  value	)
355
+ {
356
+-	fprintf(stderr, "%s: %d\n", name, (long)value);
357
++	fprintf(stderr, "%s: %ld\n", name, (long)value);
358
+ }
359
+ 
360
+ #endif
361
+--- a/src/toast.c
362
++++ b/src/toast.c
363
+@@ -251,8 +251,8 @@ static char * emalloc P1((len), size_t l
364
+ {
365
+ 	char * s;
366
+ 	if (!(s = malloc(len))) {
367
+-		fprintf(stderr, "%s: failed to malloc %d bytes -- abort\n",
368
+-			progname, len);
369
++		fprintf(stderr, "%s: failed to malloc %ld bytes -- abort\n",
370
++			progname, (long) len);
371
+ 		onintr();
372
+ 		exit(1);
373
+ 	}
374
+@@ -270,7 +270,7 @@ static char* normalname P3((name, want, 
375
+ 	maxlen = strlen(name) + 1 + strlen(want) + strlen(cut);
376
+ 	p = strcpy(emalloc(maxlen), name);
377
+ 
378
+-	if (s = suffix(p, cut)) strcpy(s, want);
379
++	if ((s = suffix(p, cut))) strcpy(s, want);
380
+ 	else if (*want && !suffix(p, want)) strcat(p, want);
381
+ 
382
+ 	return p;
383
+@@ -386,7 +386,7 @@ static void update_times P0()
384
+ 		ut[0] = instat.st_atime;
385
+ 		ut[1] = instat.st_mtime;
386
+ 
387
+-		(void) utime(outname, ut);
388
++		(void) utime(outname, (struct utimbuf *)ut);
389
+ 
390
+ #endif	/* UTIMBUF */
391
+ 	}
392
+@@ -416,7 +416,7 @@ static int okay_as_input P3((name,f,st),
393
+ 	}
394
+ 	if (st->st_nlink > 1 && !f_cat && !f_precious) {
395
+ 		fprintf(stderr, 
396
+-		      "%s: \"%s\" has %s other link%s -- unchanged.\n",
397
++		      "%s: \"%s\" has %d other link%s -- unchanged.\n",
398
+ 			progname,name,st->st_nlink - 1,"s" + (st->st_nlink<=2));
399
+ 		return 0;
400
+ 	}
401
+@@ -585,8 +585,8 @@ static int process_decode P0()
402
+ 
403
+ 		if (cc != sizeof(s)) {
404
+ 			if (cc >= 0) fprintf(stderr,
405
+-			"%s: incomplete frame (%d byte%s missing) from %s\n",
406
+-					progname, sizeof(s) - cc,
407
++			"%s: incomplete frame (%ld byte%s missing) from %s\n",
408
++					progname, (long) sizeof(s) - cc,
409
+ 					"s" + (sizeof(s) - cc == 1),
410
+ 					inname ? inname : "stdin" );
411
+ 			gsm_destroy(r);
412
+@@ -624,8 +624,6 @@ static int process_decode P0()
413
+ 
414
+ static int process P1((name), char * name)
415
+ {
416
+-	int step = 0;
417
+-
418
+ 	out     = (FILE *)0;
419
+ 	in      = (FILE *)0;
420
+ 
421
+@@ -779,7 +777,6 @@ int main P2((ac, av), int ac, char **av)
422
+ 	case 'h': help();    exit(0);
423
+ 
424
+ 	default: 
425
+-	usage:
426
+ 		fprintf(stderr,
427
+ 	"Usage: %s [-fcpdhvuaslFC] [files...] (-h for help)\n",
428
+ 			progname);

+ 67
- 0
libs/libao/Makefile 查看文件

@@ -0,0 +1,67 @@
1
+#
2
+# Copyright (C) 2006-2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=libao
11
+PKG_VERSION:=1.2.0
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=http://downloads.xiph.org/releases/ao/
16
+PKG_MD5SUM:=9f5dd20d7e95fd0dd72df5353829f097
17
+
18
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
19
+
20
+PKG_LICENSE:=GPL-2.0
21
+PKG_LICENSE_FILE:=COPYING
22
+
23
+PKG_FIXUP:=autoreconf
24
+PKG_INSTALL:=1
25
+
26
+include $(INCLUDE_DIR)/package.mk
27
+
28
+define Package/libao
29
+  SECTION:=libs
30
+  DEPENDS:=+alsa-lib
31
+  CATEGORY:=Libraries
32
+  TITLE:=A cross platform audio library
33
+  URL:=http://www.xiph.org/ao/
34
+endef
35
+
36
+define Package/libao/description
37
+	Libao is a cross-platform audio library that allows programs to
38
+	output audio using a simple API on a wide variety of platforms.
39
+endef
40
+
41
+CONFIGURE_ARGS += \
42
+	--enable-shared \
43
+	--enable-static \
44
+	--disable-esd \
45
+	--disable-arts \
46
+	--disable-nas \
47
+	--disable-pulse
48
+
49
+TARGET_CFLAGS += $(FPIC)
50
+
51
+define Build/InstallDev
52
+	$(INSTALL_DIR) $(1)/usr/include
53
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/ao $(1)/usr/include/
54
+	$(INSTALL_DIR) $(1)/usr/lib
55
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.{a,so*} $(1)/usr/lib/
56
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
57
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ao.pc $(1)/usr/lib/pkgconfig/
58
+endef
59
+
60
+define Package/libao/install
61
+	$(INSTALL_DIR) $(1)/usr/lib
62
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libao.so.* $(1)/usr/lib/
63
+	$(INSTALL_DIR) $(1)/usr/lib/ao/plugins-4
64
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/ao/plugins-4/lib*.so $(1)/usr/lib/ao/plugins-4/
65
+endef
66
+
67
+$(eval $(call BuildPackage,libao))

+ 85
- 0
sound/lame/Makefile 查看文件

@@ -0,0 +1,85 @@
1
+#
2
+# Copyright (C) 2007-2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+# blogic@openwrt.org
8
+
9
+include $(TOPDIR)/rules.mk
10
+
11
+PKG_NAME:=lame
12
+PKG_VERSION:=3.99.5
13
+PKG_RELEASE:=1
14
+
15
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16
+PKG_SOURCE_URL:=@SF/lame
17
+PKG_MD5SUM:=84835b313d4a8b68f5349816d33e07ce
18
+PKG_FIXUP:=autoreconf
19
+
20
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
21
+
22
+PKG_LICENSE:=LGPLv2
23
+PKG_LICENSE_FILES:=COPYING LICENSE
24
+
25
+include $(INCLUDE_DIR)/package.mk
26
+
27
+PKG_INSTALL=1
28
+
29
+define Package/lame/Default
30
+  SECTION:=sound
31
+  CATEGORY:=Sound
32
+  URL:=http://sourceforge.net/projects/lame
33
+  DEPENDS:=@BUILD_PATENTED
34
+endef
35
+
36
+define Package/lame
37
+$(call Package/lame/Default)
38
+  TITLE:=lame
39
+  MENU:=1
40
+  DEPENDS += +libncurses
41
+endef
42
+
43
+define Package/lame/description
44
+lame mp3 encoder
45
+endef
46
+
47
+define Package/lame-lib
48
+$(call Package/lame/Default)
49
+  TITLE:=lame-lib
50
+endef
51
+
52
+define Package/lame-lib/description
53
+lame mp3 encoder libs
54
+endef
55
+
56
+define Build/Configure
57
+	$(call Build/Configure/Default, \
58
+	--disable-nasm \
59
+	)
60
+endef
61
+
62
+
63
+define Package/lame/install
64
+	$(INSTALL_DIR) $(1)/usr/bin
65
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lame $(1)/usr/bin/
66
+endef
67
+
68
+define Package/lame-lib/install
69
+	$(INSTALL_DIR) $(1)/usr/lib
70
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib/
71
+endef
72
+
73
+define Build/InstallDev
74
+	$(INSTALL_DIR) $(1)/usr/include/lame
75
+	$(INSTALL_DATA) \
76
+		$(PKG_INSTALL_DIR)/usr/include/lame/*.h \
77
+		$(1)/usr/include/lame/
78
+	$(INSTALL_DIR) $(1)/usr/lib
79
+	$(CP) \
80
+		$(PKG_INSTALL_DIR)/usr/lib/*.{la,so*} \
81
+		$(1)/usr/lib/
82
+endef
83
+
84
+$(eval $(call BuildPackage,lame-lib))
85
+$(eval $(call BuildPackage,lame))

+ 33
- 0
sound/lame/patches/001-automake-compat.patch 查看文件

@@ -0,0 +1,33 @@
1
+--- a/configure.in
2
++++ b/configure.in
3
+@@ -393,7 +393,7 @@ CONFIG_MATH_LIB="${USE_LIBM}"
4
+ 
5
+ dnl configure use of features
6
+ 
7
+-AM_PATH_GTK(1.2.0, HAVE_GTK="yes", HAVE_GTK="no")
8
++HAVE_GTK="no"
9
+ 
10
+ dnl ElectricFence malloc debugging
11
+ AC_MSG_CHECKING(use of ElectricFence malloc debugging)
12
+--- a/frontend/Makefile.am
13
++++ b/frontend/Makefile.am
14
+@@ -35,7 +35,7 @@ lame_SOURCES = lame_main.c $(common_sour
15
+ mp3rtp_SOURCES = mp3rtp.c rtp.c $(common_sources)
16
+ mp3x_SOURCES = mp3x.c gtkanal.c gpkplotting.c $(common_sources)
17
+ 
18
+-CFLAGS = @CFLAGS@ @GTK_CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@
19
++CFLAGS = @CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@
20
+ LDFLAGS = @LDFLAGS@ @FRONTEND_LDFLAGS@ @SNDFILE_LIBS@
21
+ 
22
+ INCLUDES = -I$(top_srcdir)/libmp3lame -I$(top_srcdir)/include -I$(top_builddir)
23
+--- a/frontend/Makefile.in
24
++++ b/frontend/Makefile.in
25
+@@ -99,7 +99,7 @@ AUTOMAKE = @AUTOMAKE@
26
+ AWK = @AWK@
27
+ CC = @CC@
28
+ CCDEPMODE = @CCDEPMODE@
29
+-CFLAGS = @CFLAGS@ @GTK_CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@
30
++CFLAGS = @CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@
31
+ CONFIG_DEFS = @CONFIG_DEFS@
32
+ CONFIG_MATH_LIB = @CONFIG_MATH_LIB@
33
+ CPP = @CPP@