/
flac-1.3.3.patch
325 lines (323 loc) · 9.29 KB
/
flac-1.3.3.patch
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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
diff -u /dev/null flac-1.3.3/android/config.h
--- /dev/null
+++ flac-1.3.3/android/config.h
@@ -0,0 +1,254 @@
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define if building universal (internal helper macro) */
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
+
+/* Target processor is big endian. */
+#define CPU_IS_BIG_ENDIAN 0
+
+/* Target processor is little endian. */
+#define CPU_IS_LITTLE_ENDIAN 1
+
+/* Set FLAC__BYTES_PER_WORD to 8 (4 is the default) */
+#define ENABLE_64_BIT_WORDS 0
+
+/* define to align allocated memory on 32-byte boundaries */
+#define FLAC__ALIGN_MALLOC_DATA 1
+
+/* define if building for ia32/i386 */
+/* #undef FLAC__CPU_IA32 */
+
+/* define if building for PowerPC */
+/* #undef FLAC__CPU_PPC */
+
+/* define if building for PowerPC64 */
+/* #undef FLAC__CPU_PPC64 */
+
+/* define if building for SPARC */
+/* #undef FLAC__CPU_SPARC */
+
+/* define if building for x86_64 */
+/* #undef FLAC__CPU_X86_64 */
+
+/* define if you have docbook-to-man or docbook2man */
+/* #undef FLAC__HAS_DOCBOOK_TO_MAN */
+
+/* define if you are compiling for x86 and have the NASM assembler */
+/* #undef FLAC__HAS_NASM */
+
+/* define if you have the ogg library */
+#define FLAC__HAS_OGG 1
+
+/* define if compiler has __attribute__((target("cpu=power8"))) support */
+/* #undef FLAC__HAS_TARGET_POWER8 */
+
+/* define if compiler has __attribute__((target("cpu=power9"))) support */
+/* #undef FLAC__HAS_TARGET_POWER9 */
+
+/* Set to 1 if <x86intrin.h> is available. */
+#define FLAC__HAS_X86INTRIN 0
+
+/* define to disable use of assembly code */
+/* #undef FLAC__NO_ASM */
+
+/* define if building for Darwin / MacOS X */
+/* #undef FLAC__SYS_DARWIN */
+
+/* define if building for Linux */
+/* #undef FLAC__SYS_LINUX */
+
+/* define to enable use of Altivec instructions */
+#define FLAC__USE_ALTIVEC 1
+
+/* define to enable use of AVX instructions */
+#define FLAC__USE_AVX 1
+
+/* define to enable use of VSX instructions */
+/* #undef FLAC__USE_VSX */
+
+/* Compiler has the __builtin_bswap16 intrinsic */
+#define HAVE_BSWAP16 1
+
+/* Compiler has the __builtin_bswap32 intrinsic */
+#define HAVE_BSWAP32 1
+
+/* Define to 1 if you have the <byteswap.h> header file. */
+#define HAVE_BYTESWAP_H 1
+
+/* define if you have clock_gettime */
+/* #undef HAVE_CLOCK_GETTIME */
+
+/* Define to 1 if you have the <cpuid.h> header file. */
+/* #undef HAVE_CPUID_H */
+
+/* Define to 1 if C++ supports variable-length arrays. */
+#define HAVE_CXX_VARARRAYS 1
+
+/* Define to 1 if C supports variable-length arrays. */
+#define HAVE_C_VARARRAYS 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+#define HAVE_FSEEKO 1
+
+/* Define to 1 if you have the `getopt_long' function. */
+#define HAVE_GETOPT_LONG 1
+
+/* Define if you have the iconv() function and it works. */
+/* #undef HAVE_ICONV */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+/* #undef HAVE_LANGINFO_CODESET */
+
+/* lround support */
+#define HAVE_LROUND 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if the system has the type `socklen_t'. */
+/* #undef HAVE_SOCKLEN_T */
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <termios.h> header file. */
+#define HAVE_TERMIOS_H 1
+
+/* Define to 1 if typeof works with your compiler. */
+#define HAVE_TYPEOF 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the <x86intrin.h> header file. */
+/* #undef HAVE_X86INTRIN_H */
+
+/* Define as const if the declaration of iconv() needs const. */
+/* #undef ICONV_CONST */
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#define LT_OBJDIR ".libs/"
+
+/* Define if debugging is disabled */
+#ifndef NDEBUG
+#define NDEBUG
+#endif
+
+/* Name of package */
+#define PACKAGE "flac"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "flac-dev@xiph.org"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "flac"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "flac 1.3.3"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "flac"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL "https://www.xiph.org/flac/"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "1.3.3"
+
+/* The size of `off_t', as computed by sizeof. */
+#define SIZEOF_OFF_T 4
+
+/* The size of `void*', as computed by sizeof. */
+#define SIZEOF_VOIDP 4
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+
+
+/* Version number of package */
+#define VERSION "1.3.3"
+
+/* Target processor is big endian. */
+#define WORDS_BIGENDIAN 0
+
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+/* #undef _FILE_OFFSET_BITS */
+
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+/* #undef _LARGEFILE_SOURCE */
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
+
+/* Define to 1 if on MINIX. */
+/* #undef _MINIX */
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+/* #undef _POSIX_1_SOURCE */
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+/* #undef _POSIX_SOURCE */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+/* Define to __typeof__ if your compiler spells it that way. */
+/* #undef typeof */
diff -u /dev/null flac-1.3.3/Android.mk
--- /dev/null
+++ flac-1.3.3/Android.mk
@@ -0,0 +1,50 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libFLAC
+
+FLAC_OGG_LIBRARY_PATH := ../libogg-1.3.2
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/include \
+ $(LOCAL_PATH)/src/libFLAC/include \
+ $(LOCAL_PATH)/$(FLAC_OGG_LIBRARY_PATH)/include \
+ $(LOCAL_PATH)/$(FLAC_OGG_LIBRARY_PATH)/android
+LOCAL_CFLAGS := -include $(LOCAL_PATH)/android/config.h
+
+LOCAL_SRC_FILES := \
+ src/libFLAC/bitmath.c \
+ src/libFLAC/bitreader.c \
+ src/libFLAC/bitwriter.c \
+ src/libFLAC/cpu.c \
+ src/libFLAC/crc.c \
+ src/libFLAC/fixed.c \
+ src/libFLAC/fixed_intrin_sse2.c \
+ src/libFLAC/fixed_intrin_ssse3.c \
+ src/libFLAC/float.c \
+ src/libFLAC/format.c \
+ src/libFLAC/lpc.c \
+ src/libFLAC/lpc_intrin_sse.c \
+ src/libFLAC/lpc_intrin_sse2.c \
+ src/libFLAC/lpc_intrin_sse41.c \
+ src/libFLAC/lpc_intrin_avx2.c \
+ src/libFLAC/lpc_intrin_vsx.c \
+ src/libFLAC/md5.c \
+ src/libFLAC/memory.c \
+ src/libFLAC/metadata_iterators.c \
+ src/libFLAC/metadata_object.c \
+ src/libFLAC/stream_decoder.c \
+ src/libFLAC/stream_encoder.c \
+ src/libFLAC/stream_encoder_intrin_sse2.c \
+ src/libFLAC/stream_encoder_intrin_ssse3.c \
+ src/libFLAC/stream_encoder_intrin_avx2.c \
+ src/libFLAC/stream_encoder_framing.c \
+ src/libFLAC/window.c \
+ src/libFLAC/ogg_decoder_aspect.c \
+ src/libFLAC/ogg_encoder_aspect.c \
+ src/libFLAC/ogg_helper.c \
+ src/libFLAC/ogg_mapping.c
+
+LOCAL_EXPORT_C_INCLUDES += $(LOCAL_C_INCLUDES)
+
+include $(BUILD_STATIC_LIBRARY)
diff -u flac-1.3.3/src/libFLAC/format.c.orig flac-1.3.3/src/libFLAC/format.c
--- flac-1.3.3/src/libFLAC/format.c.orig
+++ flac-1.3.3/src/libFLAC/format.c
@@ -45,6 +45,9 @@
#include "private/macros.h"
/* PACKAGE_VERSION should come from configure */
+#ifndef PACKAGE_VERSION
+#define PACKAGE_VERSION "UNKNOWN"
+#endif
FLAC_API const char *FLAC__VERSION_STRING = PACKAGE_VERSION;
FLAC_API const char *FLAC__VENDOR_STRING = "reference libFLAC " PACKAGE_VERSION " 20190804";