external/libpng-1.6.32.patch
author Sam Lantinga <slouken@libsdl.org>
Fri, 26 Oct 2018 14:58:01 -0700
changeset 617 d64228a395fc
parent 595 ed8961044eba
permissions -rw-r--r--
Fixed webp library detection when cross-compiling for Windows
slouken@522
     1
diff -ruN libpng-1.6.32.orig/Android.mk libpng-1.6.32/Android.mk
slouken@522
     2
--- libpng-1.6.32.orig/Android.mk	1969-12-31 16:00:00.000000000 -0800
slouken@594
     3
+++ libpng-1.6.32/Android.mk	2018-10-01 20:26:46.000000000 -0700
slouken@595
     4
@@ -0,0 +1,41 @@
slouken@522
     5
+LOCAL_PATH:= $(call my-dir)
slouken@522
     6
+
slouken@522
     7
+include $(CLEAR_VARS)
slouken@522
     8
+
slouken@522
     9
+common_SRC_FILES := \
slouken@522
    10
+    png.c pngerror.c \
slouken@522
    11
+	pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c \
slouken@522
    12
+	pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c
slouken@522
    13
+
slouken@594
    14
+ifeq ($(TARGET_ARCH_ABI),armeabi)
slouken@594
    15
+common_SRC_FILES += \
slouken@594
    16
+	arm/arm_init.c arm/filter_neon.S arm/filter_neon_intrinsics.c
slouken@594
    17
+endif
slouken@594
    18
+ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
slouken@594
    19
+common_SRC_FILES += \
slouken@594
    20
+	arm/arm_init.c arm/filter_neon.S arm/filter_neon_intrinsics.c
slouken@594
    21
+endif
slouken@595
    22
+ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
slouken@595
    23
+common_SRC_FILES += \
slouken@595
    24
+	arm/arm_init.c arm/filter_neon.S arm/filter_neon_intrinsics.c
slouken@595
    25
+endif
slouken@594
    26
+
slouken@522
    27
+common_CFLAGS := ## -fomit-frame-pointer
slouken@522
    28
+
slouken@522
    29
+common_C_INCLUDES += \
slouken@522
    30
+
slouken@522
    31
+# For the host
slouken@522
    32
+# =====================================================
slouken@522
    33
+
slouken@522
    34
+LOCAL_SRC_FILES := $(common_SRC_FILES)
slouken@522
    35
+LOCAL_CFLAGS += $(common_CFLAGS)
slouken@522
    36
+LOCAL_C_INCLUDES += $(common_C_INCLUDES)
slouken@522
    37
+
slouken@522
    38
+LOCAL_MODULE:= png
slouken@522
    39
+
slouken@522
    40
+LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
slouken@522
    41
+LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
slouken@522
    42
+
slouken@522
    43
+include $(BUILD_STATIC_LIBRARY)
slouken@522
    44
+#include $(BUILD_SHARED_LIBRARY)
slouken@522
    45
+
slouken@522
    46
diff -ruN libpng-1.6.32.orig/pnglibconf.h libpng-1.6.32/pnglibconf.h
slouken@522
    47
--- libpng-1.6.32.orig/pnglibconf.h	1969-12-31 16:00:00.000000000 -0800
slouken@594
    48
+++ libpng-1.6.32/pnglibconf.h	2018-10-01 20:26:26.000000000 -0700
slouken@532
    49
@@ -0,0 +1,217 @@
slouken@522
    50
+/* libpng 1.6.2 STANDARD API DEFINITION */
slouken@522
    51
+
slouken@522
    52
+/* pnglibconf.h - library build configuration */
slouken@522
    53
+
slouken@522
    54
+/* Libpng version 1.6.2 - April 25, 2013 */
slouken@522
    55
+
slouken@522
    56
+/* Copyright (c) 1998-2013 Glenn Randers-Pehrson */
slouken@522
    57
+
slouken@522
    58
+/* This code is released under the libpng license. */
slouken@522
    59
+/* For conditions of distribution and use, see the disclaimer */
slouken@522
    60
+/* and license in png.h */
slouken@522
    61
+
slouken@522
    62
+/* pnglibconf.h */
slouken@522
    63
+/* Machine generated file: DO NOT EDIT */
slouken@522
    64
+/* Derived from: scripts/pnglibconf.dfa */
slouken@522
    65
+#ifndef PNGLCONF_H
slouken@522
    66
+#define PNGLCONF_H
slouken@522
    67
+/* options */
slouken@522
    68
+#define PNG_16BIT_SUPPORTED
slouken@522
    69
+#define PNG_ALIGNED_MEMORY_SUPPORTED
slouken@522
    70
+/*#undef PNG_ARM_NEON_API_SUPPORTED*/
slouken@522
    71
+/*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/
slouken@522
    72
+/*#undef PNG_ARM_NEON_SUPPORTED*/
slouken@522
    73
+#define PNG_BENIGN_ERRORS_SUPPORTED
slouken@522
    74
+#define PNG_BENIGN_READ_ERRORS_SUPPORTED
slouken@522
    75
+/*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/
slouken@522
    76
+#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED
slouken@522
    77
+#define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
slouken@522
    78
+#define PNG_COLORSPACE_SUPPORTED
slouken@522
    79
+#define PNG_CONSOLE_IO_SUPPORTED
slouken@522
    80
+#define PNG_CONVERT_tIME_SUPPORTED
slouken@522
    81
+#define PNG_EASY_ACCESS_SUPPORTED
slouken@522
    82
+/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/
slouken@522
    83
+#define PNG_ERROR_TEXT_SUPPORTED
slouken@522
    84
+#define PNG_FIXED_POINT_SUPPORTED
slouken@522
    85
+#define PNG_FLOATING_ARITHMETIC_SUPPORTED
slouken@522
    86
+#define PNG_FLOATING_POINT_SUPPORTED
slouken@522
    87
+#define PNG_FORMAT_AFIRST_SUPPORTED
slouken@522
    88
+#define PNG_FORMAT_BGR_SUPPORTED
slouken@522
    89
+#define PNG_GAMMA_SUPPORTED
slouken@522
    90
+#define PNG_GET_PALETTE_MAX_SUPPORTED
slouken@522
    91
+#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
slouken@522
    92
+#define PNG_INCH_CONVERSIONS_SUPPORTED
slouken@522
    93
+#define PNG_INFO_IMAGE_SUPPORTED
slouken@522
    94
+#define PNG_IO_STATE_SUPPORTED
slouken@522
    95
+#define PNG_MNG_FEATURES_SUPPORTED
slouken@522
    96
+#define PNG_POINTER_INDEXING_SUPPORTED
slouken@522
    97
+#define PNG_PROGRESSIVE_READ_SUPPORTED
slouken@522
    98
+#define PNG_READ_16BIT_SUPPORTED
slouken@522
    99
+#define PNG_READ_ALPHA_MODE_SUPPORTED
slouken@522
   100
+#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
slouken@522
   101
+#define PNG_READ_BACKGROUND_SUPPORTED
slouken@522
   102
+#define PNG_READ_BGR_SUPPORTED
slouken@522
   103
+#define PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
slouken@522
   104
+#define PNG_READ_COMPOSITE_NODIV_SUPPORTED
slouken@522
   105
+#define PNG_READ_COMPRESSED_TEXT_SUPPORTED
slouken@522
   106
+#define PNG_READ_EXPAND_16_SUPPORTED
slouken@522
   107
+#define PNG_READ_EXPAND_SUPPORTED
slouken@522
   108
+#define PNG_READ_FILLER_SUPPORTED
slouken@522
   109
+#define PNG_READ_GAMMA_SUPPORTED
slouken@522
   110
+#define PNG_READ_GET_PALETTE_MAX_SUPPORTED
slouken@522
   111
+#define PNG_READ_GRAY_TO_RGB_SUPPORTED
slouken@522
   112
+#define PNG_READ_INTERLACING_SUPPORTED
slouken@522
   113
+#define PNG_READ_INT_FUNCTIONS_SUPPORTED
slouken@522
   114
+#define PNG_READ_INVERT_ALPHA_SUPPORTED
slouken@522
   115
+#define PNG_READ_INVERT_SUPPORTED
slouken@522
   116
+#define PNG_READ_OPT_PLTE_SUPPORTED
slouken@522
   117
+#define PNG_READ_PACKSWAP_SUPPORTED
slouken@522
   118
+#define PNG_READ_PACK_SUPPORTED
slouken@522
   119
+#define PNG_READ_QUANTIZE_SUPPORTED
slouken@522
   120
+#define PNG_READ_RGB_TO_GRAY_SUPPORTED
slouken@522
   121
+#define PNG_READ_SCALE_16_TO_8_SUPPORTED
slouken@522
   122
+#define PNG_READ_SHIFT_SUPPORTED
slouken@522
   123
+#define PNG_READ_STRIP_16_TO_8_SUPPORTED
slouken@522
   124
+#define PNG_READ_STRIP_ALPHA_SUPPORTED
slouken@522
   125
+#define PNG_READ_SUPPORTED
slouken@522
   126
+#define PNG_READ_SWAP_ALPHA_SUPPORTED
slouken@522
   127
+#define PNG_READ_SWAP_SUPPORTED
slouken@522
   128
+#define PNG_READ_TEXT_SUPPORTED
slouken@522
   129
+#define PNG_READ_TRANSFORMS_SUPPORTED
slouken@522
   130
+#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
slouken@522
   131
+#define PNG_READ_USER_CHUNKS_SUPPORTED
slouken@522
   132
+#define PNG_READ_USER_TRANSFORM_SUPPORTED
slouken@522
   133
+#define PNG_READ_bKGD_SUPPORTED
slouken@522
   134
+#define PNG_READ_cHRM_SUPPORTED
slouken@522
   135
+#define PNG_READ_gAMA_SUPPORTED
slouken@522
   136
+#define PNG_READ_hIST_SUPPORTED
slouken@522
   137
+#define PNG_READ_iCCP_SUPPORTED
slouken@522
   138
+#define PNG_READ_iTXt_SUPPORTED
slouken@522
   139
+#define PNG_READ_oFFs_SUPPORTED
slouken@522
   140
+#define PNG_READ_pCAL_SUPPORTED
slouken@522
   141
+#define PNG_READ_pHYs_SUPPORTED
slouken@522
   142
+#define PNG_READ_sBIT_SUPPORTED
slouken@522
   143
+#define PNG_READ_sCAL_SUPPORTED
slouken@522
   144
+#define PNG_READ_sPLT_SUPPORTED
slouken@522
   145
+#define PNG_READ_sRGB_SUPPORTED
slouken@522
   146
+#define PNG_READ_tEXt_SUPPORTED
slouken@522
   147
+#define PNG_READ_tIME_SUPPORTED
slouken@522
   148
+#define PNG_READ_tRNS_SUPPORTED
slouken@522
   149
+#define PNG_READ_zTXt_SUPPORTED
slouken@522
   150
+/*#undef PNG_SAFE_LIMITS_SUPPORTED*/
slouken@522
   151
+#define PNG_SAVE_INT_32_SUPPORTED
slouken@522
   152
+#define PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED
slouken@522
   153
+#define PNG_SEQUENTIAL_READ_SUPPORTED
slouken@522
   154
+#define PNG_SETJMP_SUPPORTED
slouken@522
   155
+#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED
slouken@522
   156
+#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
slouken@522
   157
+/*#undef PNG_SET_OPTION_SUPPORTED*/
slouken@522
   158
+#define PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
slouken@522
   159
+#define PNG_SET_USER_LIMITS_SUPPORTED
slouken@522
   160
+#define PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED
slouken@522
   161
+#define PNG_SIMPLIFIED_READ_BGR_SUPPORTED
slouken@522
   162
+#define PNG_SIMPLIFIED_READ_SUPPORTED
slouken@522
   163
+#define PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED
slouken@522
   164
+#define PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED
slouken@522
   165
+#define PNG_SIMPLIFIED_WRITE_SUPPORTED
slouken@522
   166
+#define PNG_STDIO_SUPPORTED
slouken@522
   167
+#define PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED
slouken@522
   168
+#define PNG_TEXT_SUPPORTED
slouken@522
   169
+#define PNG_TIME_RFC1123_SUPPORTED
slouken@522
   170
+#define PNG_UNKNOWN_CHUNKS_SUPPORTED
slouken@522
   171
+#define PNG_USER_CHUNKS_SUPPORTED
slouken@522
   172
+#define PNG_USER_LIMITS_SUPPORTED
slouken@522
   173
+#define PNG_USER_MEM_SUPPORTED
slouken@522
   174
+#define PNG_USER_TRANSFORM_INFO_SUPPORTED
slouken@522
   175
+#define PNG_USER_TRANSFORM_PTR_SUPPORTED
slouken@522
   176
+#define PNG_WARNINGS_SUPPORTED
slouken@522
   177
+#define PNG_WRITE_16BIT_SUPPORTED
slouken@522
   178
+#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
slouken@522
   179
+#define PNG_WRITE_BGR_SUPPORTED
slouken@522
   180
+#define PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
slouken@522
   181
+#define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED
slouken@522
   182
+#define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
slouken@522
   183
+#define PNG_WRITE_FILLER_SUPPORTED
slouken@522
   184
+#define PNG_WRITE_FILTER_SUPPORTED
slouken@522
   185
+#define PNG_WRITE_FLUSH_SUPPORTED
slouken@522
   186
+#define PNG_WRITE_GET_PALETTE_MAX_SUPPORTED
slouken@522
   187
+#define PNG_WRITE_INTERLACING_SUPPORTED
slouken@522
   188
+#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED
slouken@522
   189
+#define PNG_WRITE_INVERT_ALPHA_SUPPORTED
slouken@522
   190
+#define PNG_WRITE_INVERT_SUPPORTED
slouken@522
   191
+#define PNG_WRITE_OPTIMIZE_CMF_SUPPORTED
slouken@522
   192
+#define PNG_WRITE_PACKSWAP_SUPPORTED
slouken@522
   193
+#define PNG_WRITE_PACK_SUPPORTED
slouken@522
   194
+#define PNG_WRITE_SHIFT_SUPPORTED
slouken@522
   195
+#define PNG_WRITE_SUPPORTED
slouken@522
   196
+#define PNG_WRITE_SWAP_ALPHA_SUPPORTED
slouken@522
   197
+#define PNG_WRITE_SWAP_SUPPORTED
slouken@522
   198
+#define PNG_WRITE_TEXT_SUPPORTED
slouken@522
   199
+#define PNG_WRITE_TRANSFORMS_SUPPORTED
slouken@522
   200
+#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
slouken@522
   201
+#define PNG_WRITE_USER_TRANSFORM_SUPPORTED
slouken@522
   202
+#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
slouken@522
   203
+#define PNG_WRITE_bKGD_SUPPORTED
slouken@522
   204
+#define PNG_WRITE_cHRM_SUPPORTED
slouken@522
   205
+#define PNG_WRITE_gAMA_SUPPORTED
slouken@522
   206
+#define PNG_WRITE_hIST_SUPPORTED
slouken@522
   207
+#define PNG_WRITE_iCCP_SUPPORTED
slouken@522
   208
+#define PNG_WRITE_iTXt_SUPPORTED
slouken@522
   209
+#define PNG_WRITE_oFFs_SUPPORTED
slouken@522
   210
+#define PNG_WRITE_pCAL_SUPPORTED
slouken@522
   211
+#define PNG_WRITE_pHYs_SUPPORTED
slouken@522
   212
+#define PNG_WRITE_sBIT_SUPPORTED
slouken@522
   213
+#define PNG_WRITE_sCAL_SUPPORTED
slouken@522
   214
+#define PNG_WRITE_sPLT_SUPPORTED
slouken@522
   215
+#define PNG_WRITE_sRGB_SUPPORTED
slouken@522
   216
+#define PNG_WRITE_tEXt_SUPPORTED
slouken@522
   217
+#define PNG_WRITE_tIME_SUPPORTED
slouken@522
   218
+#define PNG_WRITE_tRNS_SUPPORTED
slouken@522
   219
+#define PNG_WRITE_zTXt_SUPPORTED
slouken@522
   220
+#define PNG_bKGD_SUPPORTED
slouken@522
   221
+#define PNG_cHRM_SUPPORTED
slouken@522
   222
+#define PNG_gAMA_SUPPORTED
slouken@522
   223
+#define PNG_hIST_SUPPORTED
slouken@522
   224
+#define PNG_iCCP_SUPPORTED
slouken@522
   225
+#define PNG_iTXt_SUPPORTED
slouken@522
   226
+#define PNG_oFFs_SUPPORTED
slouken@522
   227
+#define PNG_pCAL_SUPPORTED
slouken@522
   228
+#define PNG_pHYs_SUPPORTED
slouken@522
   229
+#define PNG_sBIT_SUPPORTED
slouken@522
   230
+#define PNG_sCAL_SUPPORTED
slouken@522
   231
+#define PNG_sPLT_SUPPORTED
slouken@522
   232
+#define PNG_sRGB_SUPPORTED
slouken@522
   233
+#define PNG_tEXt_SUPPORTED
slouken@522
   234
+#define PNG_tIME_SUPPORTED
slouken@522
   235
+#define PNG_tRNS_SUPPORTED
slouken@522
   236
+#define PNG_zTXt_SUPPORTED
slouken@522
   237
+/* end of options */
slouken@522
   238
+/* settings */
slouken@522
   239
+#define PNG_API_RULE 0
slouken@522
   240
+#define PNG_CALLOC_SUPPORTED
slouken@522
   241
+#define PNG_COST_SHIFT 3
slouken@522
   242
+#define PNG_DEFAULT_READ_MACROS 1
slouken@522
   243
+#define PNG_GAMMA_THRESHOLD_FIXED 5000
slouken@522
   244
+#define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE
slouken@522
   245
+#define PNG_INFLATE_BUF_SIZE 1024
slouken@532
   246
+#define PNG_LINKAGE_API extern
slouken@532
   247
+#define PNG_LINKAGE_CALLBACK extern
slouken@532
   248
+#define PNG_LINKAGE_DATA extern
slouken@532
   249
+#define PNG_LINKAGE_FUNCTION extern
slouken@522
   250
+#define PNG_MAX_GAMMA_8 11
slouken@522
   251
+#define PNG_QUANTIZE_BLUE_BITS 5
slouken@522
   252
+#define PNG_QUANTIZE_GREEN_BITS 5
slouken@522
   253
+#define PNG_QUANTIZE_RED_BITS 5
slouken@522
   254
+#define PNG_TEXT_Z_DEFAULT_COMPRESSION (-1)
slouken@522
   255
+#define PNG_TEXT_Z_DEFAULT_STRATEGY 0
slouken@532
   256
+#define PNG_USER_HEIGHT_MAX 1000000
slouken@532
   257
+#define PNG_USER_WIDTH_MAX 1000000
slouken@522
   258
+#define PNG_WEIGHT_SHIFT 8
slouken@522
   259
+#define PNG_ZBUF_SIZE 8192
slouken@522
   260
+#define PNG_Z_DEFAULT_COMPRESSION (-1)
slouken@522
   261
+#define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0
slouken@522
   262
+#define PNG_Z_DEFAULT_STRATEGY 1
slouken@522
   263
+#define PNG_sCAL_PRECISION 5
slouken@522
   264
+#define PNG_sRGB_PROFILE_CHECKS 2
slouken@522
   265
+/* end of settings */
slouken@522
   266
+#endif /* PNGLCONF_H */