external/flac-1.3.3.patch
author Ozkan Sezer
Tue, 17 Dec 2019 21:56:50 +0300
changeset 1091 8a09f3c0c340
parent 1050 300088719593
permissions -rw-r--r--
add patch note for Mix_MusicDuration addition
sezeroz@962
     1
diff -u /dev/null flac-1.3.3/android/config.h
sezeroz@962
     2
--- /dev/null
sezeroz@962
     3
+++ flac-1.3.3/android/config.h
sezeroz@1050
     4
@@ -0,0 +1,254 @@
sezeroz@962
     5
+/* config.h.  Generated from config.h.in by configure.  */
sezeroz@962
     6
+/* config.h.in.  Generated from configure.ac by autoheader.  */
sezeroz@962
     7
+
sezeroz@962
     8
+/* Define if building universal (internal helper macro) */
sezeroz@962
     9
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
sezeroz@962
    10
+
sezeroz@962
    11
+/* Target processor is big endian. */
sezeroz@962
    12
+#define CPU_IS_BIG_ENDIAN 0
sezeroz@962
    13
+
sezeroz@962
    14
+/* Target processor is little endian. */
sezeroz@962
    15
+#define CPU_IS_LITTLE_ENDIAN 1
sezeroz@962
    16
+
sezeroz@962
    17
+/* Set FLAC__BYTES_PER_WORD to 8 (4 is the default) */
sezeroz@962
    18
+#define ENABLE_64_BIT_WORDS 0
sezeroz@962
    19
+
sezeroz@962
    20
+/* define to align allocated memory on 32-byte boundaries */
sezeroz@962
    21
+#define FLAC__ALIGN_MALLOC_DATA 1
sezeroz@962
    22
+
sezeroz@962
    23
+/* define if building for ia32/i386 */
sezeroz@962
    24
+/* #undef FLAC__CPU_IA32 */
sezeroz@962
    25
+
sezeroz@962
    26
+/* define if building for PowerPC */
sezeroz@962
    27
+/* #undef FLAC__CPU_PPC */
sezeroz@962
    28
+
sezeroz@962
    29
+/* define if building for PowerPC64 */
sezeroz@962
    30
+/* #undef FLAC__CPU_PPC64 */
sezeroz@962
    31
+
sezeroz@962
    32
+/* define if building for SPARC */
sezeroz@962
    33
+/* #undef FLAC__CPU_SPARC */
sezeroz@962
    34
+
sezeroz@962
    35
+/* define if building for x86_64 */
sezeroz@962
    36
+/* #undef FLAC__CPU_X86_64 */
sezeroz@962
    37
+
sezeroz@962
    38
+/* define if you have docbook-to-man or docbook2man */
sezeroz@962
    39
+/* #undef FLAC__HAS_DOCBOOK_TO_MAN */
sezeroz@962
    40
+
sezeroz@962
    41
+/* define if you are compiling for x86 and have the NASM assembler */
sezeroz@962
    42
+/* #undef FLAC__HAS_NASM */
sezeroz@962
    43
+
sezeroz@962
    44
+/* define if you have the ogg library */
sezeroz@962
    45
+#define FLAC__HAS_OGG 1
sezeroz@962
    46
+
sezeroz@962
    47
+/* define if compiler has __attribute__((target("cpu=power8"))) support */
sezeroz@962
    48
+/* #undef FLAC__HAS_TARGET_POWER8 */
sezeroz@962
    49
+
sezeroz@962
    50
+/* define if compiler has __attribute__((target("cpu=power9"))) support */
sezeroz@962
    51
+/* #undef FLAC__HAS_TARGET_POWER9 */
sezeroz@962
    52
+
sezeroz@962
    53
+/* Set to 1 if <x86intrin.h> is available. */
sezeroz@962
    54
+#define FLAC__HAS_X86INTRIN 0
sezeroz@962
    55
+
sezeroz@962
    56
+/* define to disable use of assembly code */
sezeroz@962
    57
+/* #undef FLAC__NO_ASM */
sezeroz@962
    58
+
sezeroz@962
    59
+/* define if building for Darwin / MacOS X */
sezeroz@962
    60
+/* #undef FLAC__SYS_DARWIN */
sezeroz@962
    61
+
sezeroz@962
    62
+/* define if building for Linux */
sezeroz@962
    63
+/* #undef FLAC__SYS_LINUX */
sezeroz@962
    64
+
sezeroz@962
    65
+/* define to enable use of Altivec instructions */
sezeroz@962
    66
+#define FLAC__USE_ALTIVEC 1
sezeroz@962
    67
+
sezeroz@962
    68
+/* define to enable use of AVX instructions */
sezeroz@962
    69
+#define FLAC__USE_AVX 1
sezeroz@962
    70
+
sezeroz@962
    71
+/* define to enable use of VSX instructions */
sezeroz@962
    72
+/* #undef FLAC__USE_VSX */
sezeroz@962
    73
+
sezeroz@962
    74
+/* Compiler has the __builtin_bswap16 intrinsic */
sezeroz@962
    75
+#define HAVE_BSWAP16 1
sezeroz@962
    76
+
sezeroz@962
    77
+/* Compiler has the __builtin_bswap32 intrinsic */
sezeroz@962
    78
+#define HAVE_BSWAP32 1
sezeroz@962
    79
+
sezeroz@962
    80
+/* Define to 1 if you have the <byteswap.h> header file. */
sezeroz@962
    81
+#define HAVE_BYTESWAP_H 1
sezeroz@962
    82
+
sezeroz@962
    83
+/* define if you have clock_gettime */
sezeroz@962
    84
+/* #undef HAVE_CLOCK_GETTIME */
sezeroz@962
    85
+
sezeroz@962
    86
+/* Define to 1 if you have the <cpuid.h> header file. */
sezeroz@962
    87
+/* #undef HAVE_CPUID_H */
sezeroz@962
    88
+
sezeroz@962
    89
+/* Define to 1 if C++ supports variable-length arrays. */
sezeroz@962
    90
+#define HAVE_CXX_VARARRAYS 1
sezeroz@962
    91
+
sezeroz@962
    92
+/* Define to 1 if C supports variable-length arrays. */
sezeroz@962
    93
+#define HAVE_C_VARARRAYS 1
sezeroz@962
    94
+
sezeroz@962
    95
+/* Define to 1 if you have the <dlfcn.h> header file. */
sezeroz@962
    96
+#define HAVE_DLFCN_H 1
sezeroz@962
    97
+
sezeroz@962
    98
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
sezeroz@962
    99
+#define HAVE_FSEEKO 1
sezeroz@962
   100
+
sezeroz@962
   101
+/* Define to 1 if you have the `getopt_long' function. */
sezeroz@962
   102
+#define HAVE_GETOPT_LONG 1
sezeroz@962
   103
+
sezeroz@962
   104
+/* Define if you have the iconv() function and it works. */
sezeroz@962
   105
+/* #undef HAVE_ICONV */
sezeroz@962
   106
+
sezeroz@962
   107
+/* Define to 1 if you have the <inttypes.h> header file. */
sezeroz@962
   108
+#define HAVE_INTTYPES_H 1
sezeroz@962
   109
+
sezeroz@962
   110
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
sezeroz@962
   111
+/* #undef HAVE_LANGINFO_CODESET */
sezeroz@962
   112
+
sezeroz@962
   113
+/* lround support */
sezeroz@962
   114
+#define HAVE_LROUND 1
sezeroz@962
   115
+
sezeroz@962
   116
+/* Define to 1 if you have the <memory.h> header file. */
sezeroz@962
   117
+#define HAVE_MEMORY_H 1
sezeroz@962
   118
+
sezeroz@962
   119
+/* Define to 1 if the system has the type `socklen_t'. */
sezeroz@962
   120
+/* #undef HAVE_SOCKLEN_T */
sezeroz@962
   121
+
sezeroz@962
   122
+/* Define to 1 if you have the <stdint.h> header file. */
sezeroz@962
   123
+#define HAVE_STDINT_H 1
sezeroz@962
   124
+
sezeroz@962
   125
+/* Define to 1 if you have the <stdlib.h> header file. */
sezeroz@962
   126
+#define HAVE_STDLIB_H 1
sezeroz@962
   127
+
sezeroz@962
   128
+/* Define to 1 if you have the <strings.h> header file. */
sezeroz@962
   129
+#define HAVE_STRINGS_H 1
sezeroz@962
   130
+
sezeroz@962
   131
+/* Define to 1 if you have the <string.h> header file. */
sezeroz@962
   132
+#define HAVE_STRING_H 1
sezeroz@962
   133
+
sezeroz@962
   134
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
sezeroz@962
   135
+#define HAVE_SYS_IOCTL_H 1
sezeroz@962
   136
+
sezeroz@962
   137
+/* Define to 1 if you have the <sys/param.h> header file. */
sezeroz@962
   138
+#define HAVE_SYS_PARAM_H 1
sezeroz@962
   139
+
sezeroz@962
   140
+/* Define to 1 if you have the <sys/stat.h> header file. */
sezeroz@962
   141
+#define HAVE_SYS_STAT_H 1
sezeroz@962
   142
+
sezeroz@962
   143
+/* Define to 1 if you have the <sys/types.h> header file. */
sezeroz@962
   144
+#define HAVE_SYS_TYPES_H 1
sezeroz@962
   145
+
sezeroz@962
   146
+/* Define to 1 if you have the <termios.h> header file. */
sezeroz@962
   147
+#define HAVE_TERMIOS_H 1
sezeroz@962
   148
+
sezeroz@962
   149
+/* Define to 1 if typeof works with your compiler. */
sezeroz@962
   150
+#define HAVE_TYPEOF 1
sezeroz@962
   151
+
sezeroz@962
   152
+/* Define to 1 if you have the <unistd.h> header file. */
sezeroz@962
   153
+#define HAVE_UNISTD_H 1
sezeroz@962
   154
+
sezeroz@962
   155
+/* Define to 1 if you have the <x86intrin.h> header file. */
sezeroz@962
   156
+/* #undef HAVE_X86INTRIN_H */
sezeroz@962
   157
+
sezeroz@962
   158
+/* Define as const if the declaration of iconv() needs const. */
sezeroz@962
   159
+/* #undef ICONV_CONST */
sezeroz@962
   160
+
sezeroz@962
   161
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
sezeroz@962
   162
+#define LT_OBJDIR ".libs/"
sezeroz@962
   163
+
sezeroz@962
   164
+/* Define if debugging is disabled */
sezeroz@1050
   165
+#ifndef NDEBUG
sezeroz@962
   166
+#define NDEBUG
sezeroz@1050
   167
+#endif
sezeroz@962
   168
+
sezeroz@962
   169
+/* Name of package */
sezeroz@962
   170
+#define PACKAGE "flac"
sezeroz@962
   171
+
sezeroz@962
   172
+/* Define to the address where bug reports for this package should be sent. */
sezeroz@962
   173
+#define PACKAGE_BUGREPORT "flac-dev@xiph.org"
sezeroz@962
   174
+
sezeroz@962
   175
+/* Define to the full name of this package. */
sezeroz@962
   176
+#define PACKAGE_NAME "flac"
sezeroz@962
   177
+
sezeroz@962
   178
+/* Define to the full name and version of this package. */
sezeroz@962
   179
+#define PACKAGE_STRING "flac 1.3.3"
sezeroz@962
   180
+
sezeroz@962
   181
+/* Define to the one symbol short name of this package. */
sezeroz@962
   182
+#define PACKAGE_TARNAME "flac"
sezeroz@962
   183
+
sezeroz@962
   184
+/* Define to the home page for this package. */
sezeroz@962
   185
+#define PACKAGE_URL "https://www.xiph.org/flac/"
sezeroz@962
   186
+
sezeroz@962
   187
+/* Define to the version of this package. */
sezeroz@962
   188
+#define PACKAGE_VERSION "1.3.3"
sezeroz@962
   189
+
sezeroz@962
   190
+/* The size of `off_t', as computed by sizeof. */
sezeroz@962
   191
+#define SIZEOF_OFF_T 4
sezeroz@962
   192
+
sezeroz@962
   193
+/* The size of `void*', as computed by sizeof. */
sezeroz@962
   194
+#define SIZEOF_VOIDP 4
sezeroz@962
   195
+
sezeroz@962
   196
+/* Define to 1 if you have the ANSI C header files. */
sezeroz@962
   197
+#define STDC_HEADERS 1
sezeroz@962
   198
+
sezeroz@962
   199
+/* Enable extensions on AIX 3, Interix.  */
sezeroz@962
   200
+#ifndef _ALL_SOURCE
sezeroz@962
   201
+# define _ALL_SOURCE 1
sezeroz@962
   202
+#endif
sezeroz@962
   203
+/* Enable GNU extensions on systems that have them.  */
sezeroz@962
   204
+#ifndef _GNU_SOURCE
sezeroz@962
   205
+# define _GNU_SOURCE 1
sezeroz@962
   206
+#endif
sezeroz@962
   207
+/* Enable threading extensions on Solaris.  */
sezeroz@962
   208
+#ifndef _POSIX_PTHREAD_SEMANTICS
sezeroz@962
   209
+# define _POSIX_PTHREAD_SEMANTICS 1
sezeroz@962
   210
+#endif
sezeroz@962
   211
+/* Enable extensions on HP NonStop.  */
sezeroz@962
   212
+#ifndef _TANDEM_SOURCE
sezeroz@962
   213
+# define _TANDEM_SOURCE 1
sezeroz@962
   214
+#endif
sezeroz@962
   215
+/* Enable general extensions on Solaris.  */
sezeroz@962
   216
+#ifndef __EXTENSIONS__
sezeroz@962
   217
+# define __EXTENSIONS__ 1
sezeroz@962
   218
+#endif
sezeroz@962
   219
+
sezeroz@962
   220
+
sezeroz@962
   221
+/* Version number of package */
sezeroz@962
   222
+#define VERSION "1.3.3"
sezeroz@962
   223
+
sezeroz@962
   224
+/* Target processor is big endian. */
sezeroz@962
   225
+#define WORDS_BIGENDIAN 0
sezeroz@962
   226
+
sezeroz@962
   227
+/* Enable large inode numbers on Mac OS X 10.5.  */
sezeroz@962
   228
+#ifndef _DARWIN_USE_64_BIT_INODE
sezeroz@962
   229
+# define _DARWIN_USE_64_BIT_INODE 1
sezeroz@962
   230
+#endif
sezeroz@962
   231
+
sezeroz@962
   232
+/* Number of bits in a file offset, on hosts where this is settable. */
sezeroz@962
   233
+/* #undef _FILE_OFFSET_BITS */
sezeroz@962
   234
+
sezeroz@962
   235
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
sezeroz@962
   236
+/* #undef _LARGEFILE_SOURCE */
sezeroz@962
   237
+
sezeroz@962
   238
+/* Define for large files, on AIX-style hosts. */
sezeroz@962
   239
+/* #undef _LARGE_FILES */
sezeroz@962
   240
+
sezeroz@962
   241
+/* Define to 1 if on MINIX. */
sezeroz@962
   242
+/* #undef _MINIX */
sezeroz@962
   243
+
sezeroz@962
   244
+/* Define to 2 if the system does not provide POSIX.1 features except with
sezeroz@962
   245
+   this defined. */
sezeroz@962
   246
+/* #undef _POSIX_1_SOURCE */
sezeroz@962
   247
+
sezeroz@962
   248
+/* Define to 1 if you need to in order for `stat' and other things to work. */
sezeroz@962
   249
+/* #undef _POSIX_SOURCE */
sezeroz@962
   250
+
sezeroz@962
   251
+/* Define to `__inline__' or `__inline' if that's what the C compiler
sezeroz@962
   252
+   calls it, or to nothing if 'inline' is not supported under any name.  */
sezeroz@962
   253
+#ifndef __cplusplus
sezeroz@962
   254
+/* #undef inline */
sezeroz@962
   255
+#endif
sezeroz@962
   256
+
sezeroz@962
   257
+/* Define to __typeof__ if your compiler spells it that way. */
sezeroz@962
   258
+/* #undef typeof */
sezeroz@962
   259
diff -u /dev/null flac-1.3.3/Android.mk
sezeroz@962
   260
--- /dev/null
sezeroz@962
   261
+++ flac-1.3.3/Android.mk
sezeroz@962
   262
@@ -0,0 +1,50 @@
sezeroz@962
   263
+LOCAL_PATH := $(call my-dir)
sezeroz@962
   264
+
sezeroz@962
   265
+include $(CLEAR_VARS)
sezeroz@962
   266
+
sezeroz@962
   267
+LOCAL_MODULE := libFLAC
sezeroz@962
   268
+
sezeroz@962
   269
+FLAC_OGG_LIBRARY_PATH := ../libogg-1.3.2
sezeroz@962
   270
+
sezeroz@962
   271
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/include \
sezeroz@962
   272
+                    $(LOCAL_PATH)/src/libFLAC/include \
sezeroz@962
   273
+                    $(LOCAL_PATH)/$(FLAC_OGG_LIBRARY_PATH)/include \
sezeroz@962
   274
+                    $(LOCAL_PATH)/$(FLAC_OGG_LIBRARY_PATH)/android
sezeroz@962
   275
+LOCAL_CFLAGS := -include $(LOCAL_PATH)/android/config.h
sezeroz@962
   276
+
sezeroz@962
   277
+LOCAL_SRC_FILES := \
sezeroz@962
   278
+    src/libFLAC/bitmath.c \
sezeroz@962
   279
+    src/libFLAC/bitreader.c \
sezeroz@962
   280
+    src/libFLAC/bitwriter.c \
sezeroz@962
   281
+    src/libFLAC/cpu.c \
sezeroz@962
   282
+    src/libFLAC/crc.c \
sezeroz@962
   283
+    src/libFLAC/fixed.c \
sezeroz@962
   284
+    src/libFLAC/fixed_intrin_sse2.c  \
sezeroz@962
   285
+    src/libFLAC/fixed_intrin_ssse3.c \
sezeroz@962
   286
+    src/libFLAC/float.c \
sezeroz@962
   287
+    src/libFLAC/format.c \
sezeroz@962
   288
+    src/libFLAC/lpc.c \
sezeroz@962
   289
+    src/libFLAC/lpc_intrin_sse.c   \
sezeroz@962
   290
+    src/libFLAC/lpc_intrin_sse2.c  \
sezeroz@962
   291
+    src/libFLAC/lpc_intrin_sse41.c \
sezeroz@962
   292
+    src/libFLAC/lpc_intrin_avx2.c  \
sezeroz@962
   293
+    src/libFLAC/lpc_intrin_vsx.c   \
sezeroz@962
   294
+    src/libFLAC/md5.c \
sezeroz@962
   295
+    src/libFLAC/memory.c \
sezeroz@962
   296
+    src/libFLAC/metadata_iterators.c \
sezeroz@962
   297
+    src/libFLAC/metadata_object.c \
sezeroz@962
   298
+    src/libFLAC/stream_decoder.c \
sezeroz@962
   299
+    src/libFLAC/stream_encoder.c \
sezeroz@962
   300
+    src/libFLAC/stream_encoder_intrin_sse2.c  \
sezeroz@962
   301
+    src/libFLAC/stream_encoder_intrin_ssse3.c \
sezeroz@962
   302
+    src/libFLAC/stream_encoder_intrin_avx2.c  \
sezeroz@962
   303
+    src/libFLAC/stream_encoder_framing.c \
sezeroz@962
   304
+    src/libFLAC/window.c \
sezeroz@962
   305
+    src/libFLAC/ogg_decoder_aspect.c \
sezeroz@962
   306
+    src/libFLAC/ogg_encoder_aspect.c \
sezeroz@962
   307
+    src/libFLAC/ogg_helper.c \
sezeroz@962
   308
+    src/libFLAC/ogg_mapping.c
sezeroz@962
   309
+
sezeroz@962
   310
+LOCAL_EXPORT_C_INCLUDES += $(LOCAL_C_INCLUDES)
sezeroz@962
   311
+
sezeroz@962
   312
+include $(BUILD_STATIC_LIBRARY)
sezeroz@962
   313
diff -u flac-1.3.3/src/libFLAC/format.c.orig flac-1.3.3/src/libFLAC/format.c
sezeroz@962
   314
--- flac-1.3.3/src/libFLAC/format.c.orig
sezeroz@962
   315
+++ flac-1.3.3/src/libFLAC/format.c
sezeroz@962
   316
@@ -45,6 +45,9 @@
sezeroz@962
   317
 #include "private/macros.h"
sezeroz@962
   318
 
sezeroz@962
   319
 /* PACKAGE_VERSION should come from configure */
sezeroz@962
   320
+#ifndef PACKAGE_VERSION
sezeroz@962
   321
+#define PACKAGE_VERSION	"UNKNOWN"
sezeroz@962
   322
+#endif
sezeroz@962
   323
 FLAC_API const char *FLAC__VERSION_STRING = PACKAGE_VERSION;
sezeroz@962
   324
 
sezeroz@962
   325
 FLAC_API const char *FLAC__VENDOR_STRING = "reference libFLAC " PACKAGE_VERSION " 20190804";