-
Notifications
You must be signed in to change notification settings - Fork 422
/
Copy pathmozjpeg.podspec
158 lines (152 loc) · 5.42 KB
/
mozjpeg.podspec
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
Pod::Spec.new do |spec|
spec.name = "mozjpeg"
spec.version = "3.3.1"
spec.license = { :type => "BSD" }
spec.homepage = "https://github.com/mozilla/mozjpeg"
spec.summary = "Improved JPEG encoder."
spec.authors = "Mozilla"
spec.source = { :git => "https://github.com/mozilla/mozjpeg.git", :tag => "v#{spec.version}" }
spec.module_name = "mozjpeg"
spec.header_dir = "mozjpeg"
spec.platforms = { :ios => "8.0" }
spec.prepare_command = <<-CMD
cat << EOF > jconfig.h
#define JPEG_LIB_VERSION 80 /* Version 6b */
#define LIBJPEG_TURBO_VERSION 3.1.m
#define LIBJPEG_TURBO_VERSION_NUMBER 1
#define C_ARITH_CODING_SUPPORTED 1
#define D_ARITH_CODING_SUPPORTED 1
#define BITS_IN_JSAMPLE 8
#define HAVE_LOCALE_H 1
#define HAVE_STDDEF_H 1
#define HAVE_STDLIB_H 1
#define HAVE_UNSIGNED_CHAR 1
#define HAVE_UNSIGNED_SHORT 1
#define NEED_SYS_TYPES_H 1
#define WITH_SIMD 0
EOF
cat << EOF > jconfigint.h
#define BUILD "20180328"
#define INLINE __attribute__((always_inline))
#define PACKAGE_NAME "mozjpeg"
#define VERSION "#{spec.version}"
#ifdef __SIZEOF_SIZE_T__
#define SIZEOF_SIZE_T __SIZEOF_SIZE_T__
#else
#error Cannot determine the size of size_t
#endif
EOF
CMD
spec.private_header_files = "bmp.h",
"cderror.h",
"cdjpeg.h",
"jchuff.h",
"jcmaster.h",
"jconfigint.h",
"jdcoefct.h",
"jdct.h",
"jdhuff.h",
"jdmainct.h",
"jdmaster.h",
"jdsample.h",
"jmemsys.h",
"jpeg_nbits_table.h",
"jpegcomp.h",
"jsimd.h",
"jsimddct.h",
"jversion.h",
"wrppm.h"
spec.public_header_files = "jerror.h",
"jinclude.h",
"jconfig.h",
"jmorecfg.h",
"jpeglib.h",
"jpegint.h",
"transupp.h"
spec.source_files = "jcapimin.c",
"jcapistd.c",
"jccoefct.c",
"jccolor.c",
"jcdctmgr.c",
"jcext.c",
"jchuff.c",
"jcinit.c",
"jcmainct.c",
"jcmarker.c",
"jcmaster.c",
"jcomapi.c",
"jcparam.c",
"jcphuff.c",
"jcprepct.c",
"jcsample.c",
"jctrans.c",
"jdapimin.c",
"jdapistd.c",
"jdatadst.c",
"jdatasrc.c",
"jdcoefct.c",
"jdcolor.c",
"jddctmgr.c",
"jdhuff.c",
"jdinput.c",
"jdmainct.c",
"jdmarker.c",
"jdmaster.c",
"jdmerge.c",
"jdphuff.c",
"jdpostct.c",
"jdsample.c",
"jdtrans.c",
"jerror.c",
"jfdctflt.c",
"jfdctfst.c",
"jfdctint.c",
"jidctflt.c",
"jidctfst.c",
"jidctint.c",
"jidctred.c",
"jquant1.c",
"jquant2.c",
"jutils.c",
"jmemmgr.c",
"jaricom.c",
"jcarith.c",
"jdarith.c",
"transupp.c",
"jmemnobs.c",
"jsimd_none.c",
"jerror.h",
"jinclude.h",
"jconfig.h",
"jmorecfg.h",
"jpeglib.h",
"jpegint.h",
"transupp.h",
"bmp.h",
"cderror.h",
"cdjpeg.h",
"jchuff.h",
"jcmaster.h",
"jconfigint.h",
"jdcoefct.h",
"jdct.h",
"jdhuff.h",
"jdmainct.h",
"jdmaster.h",
"jdsample.h",
"jmemsys.h",
"jpeg_nbits_table.h",
"jpegcomp.h",
"jsimd.h",
"jsimddct.h",
"jversion.h",
"wrppm.h"
# Despite their extensions, these are header files that shouldn't be compiled
# on their own but should still be present for other files to include.
spec.preserve_path = "jdcolext.c",
"jstdhuff.c",
"jdcol565.c",
"jdmrgext.c",
"jdmrg565.c",
"jccolext.c"
end