-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathsqlite3.podspec
More file actions
177 lines (151 loc) · 7.4 KB
/
sqlite3.podspec
File metadata and controls
177 lines (151 loc) · 7.4 KB
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
Pod::Spec.new do |s|
s.name = 'sqlite3'
s.version = '3.52.0'
s.license = { :type => 'Public Domain', :text => <<-LICENSE
All of the code and documentation in SQLite has been dedicated to the public domain by the authors.
All code authors, and representatives of the companies they work for, have signed affidavits dedicating their contributions to the public domain and originals of those signed affidavits are stored in a firesafe at the main offices of Hwaci.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute the original SQLite code, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
LICENSE
}
s.summary = 'SQLite is an embedded SQL database engine'
s.documentation_url = 'https://sqlite.org/docs.html'
s.homepage = 'https://github.com/clemensg/sqlite3pod'
s.authors = { 'Clemens Gruber' => 'clemensgru@gmail.com' }
v = s.version.to_s.match(/(\d+).(\d+).(\d+)(?:\+\w+)?/)
archive_name = "sqlite-src-"+v[1]+v[2].rjust(2, '0')+v[3].rjust(2, '0')+"00"
s.source = { :http => "https://www.sqlite.org/#{Time.now.year}/#{archive_name}.zip" }
s.prepare_command = <<-CMD
cd #{archive_name}
./configure
make sqlite3.c sqlite3.h sqlite3ext.h
CMD
s.requires_arc = false
# Setting a deployment_target enables linting of podspecs which depend on sqlite3
# Absolute minimum value for a given version of Xcode can be found at https://developer.apple.com/support/xcode/
s.ios.deployment_target = '12.0'
s.tvos.deployment_target = '12.0'
s.macos.deployment_target = '10.13'
s.watchos.deployment_target = '4.0'
s.visionos.deployment_target = '1.0'
s.default_subspecs = 'common'
s.subspec 'common' do |ss|
ss.source_files = "#{archive_name}/sqlite*.{h,c}"
ss.public_header_files = "#{archive_name}/sqlite3.h"
ss.osx.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DHAVE_USLEEP=1' }
# Disable OS X / AFP locking code on mobile platforms (iOS, tvOS, watchOS)
sqlite_xcconfig_ios = { 'OTHER_CFLAGS' => '$(inherited) -DHAVE_USLEEP=1 -DSQLITE_ENABLE_LOCKING_STYLE=0' }
ss.ios.pod_target_xcconfig = sqlite_xcconfig_ios
ss.tvos.pod_target_xcconfig = sqlite_xcconfig_ios
ss.watchos.pod_target_xcconfig = sqlite_xcconfig_ios
end
s.subspec 'extension' do |ss|
ss.dependency 'sqlite3/common'
ss.public_header_files = "#{archive_name}/sqlite3ext.h"
end
# Detect misuse of SQLite API
s.subspec 'api_armor' do |ss|
ss.dependency 'sqlite3/common'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_ENABLE_API_ARMOR=1' }
end
# Enable bytecode() and tables_used() table-valued functions
s.subspec 'bytecodevtab' do |ss|
ss.dependency 'sqlite3/common'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_ENABLE_BYTECODE_VTAB=1' }
end
# Enable dbstat virtual table returning information about used disk space.
s.subspec 'dbstatvtab' do |ss|
ss.dependency 'sqlite3/common'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_ENABLE_DBSTAT_VTAB=1' }
end
# API for column meta-data access
s.subspec 'coldata' do |ss|
ss.dependency 'sqlite3/common'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_ENABLE_COLUMN_METADATA=1' }
end
# FTS4 full-text-search
s.subspec 'fts' do |ss|
ss.dependency 'sqlite3/common'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1' }
end
# FTS5 full-text-search
s.subspec 'fts5' do |ss|
ss.dependency 'sqlite3/common'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_ENABLE_FTS5=1' }
end
# Geopoly extension
s.subspec 'geopoly' do |ss|
ss.dependency 'sqlite3/common'
ss.dependency 'sqlite3/rtree'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_ENABLE_GEOPOLY=1' }
end
# JSON1 extension for managing JSON content (Built-in since 3.38.0)
s.subspec 'json1' do |ss|
ss.dependency 'sqlite3/common'
end
# Recommended defaults for increased performance and reduced memory usage
s.subspec 'perf' do |ss|
ss.dependency 'sqlite3/common'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_DQS=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_OMIT_DECLTYPE=1 -DSQLITE_OMIT_DEPRECATED=1 -DSQLITE_OMIT_PROGRESS_CALLBACK=1 -DSQLITE_OMIT_SHARED_CACHE=1 -DSQLITE_USE_ALLOCA=1 -DSQLITE_STRICT_SUBTYPE=1' }
end
# Recommended defaults for increased performance and reduced memory usage (Threadsafe and with shared-cache mode)
s.subspec 'perf-threadsafe' do |ss|
ss.dependency 'sqlite3/common'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_DQS=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_OMIT_DECLTYPE=1 -DSQLITE_OMIT_DEPRECATED=1 -DSQLITE_OMIT_PROGRESS_CALLBACK=1 -DSQLITE_USE_ALLOCA=1 -DSQLITE_STRICT_SUBTYPE=1' }
end
# Resumable Bulk Update
s.subspec 'rbu' do |ss|
ss.dependency 'sqlite3/common'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_ENABLE_RBU=1' }
end
# R*Tree index for range queries
s.subspec 'rtree' do |ss|
ss.dependency 'sqlite3/common'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_ENABLE_RTREE=1' }
end
# Session extension: Record and package changes to rowid tables into files that can be applied to other DBs
s.subspec 'session' do |ss|
ss.dependency 'sqlite3/common'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_ENABLE_PREUPDATE_HOOK=1 -DSQLITE_ENABLE_SESSION=1' }
end
# Interface for historical database snapshots
s.subspec 'snapshot' do |ss|
ss.dependency 'sqlite3/common'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_ENABLE_SNAPSHOT=1' }
end
# Soundex phonetic string encoding function
s.subspec 'soundex' do |ss|
ss.dependency 'sqlite3/common'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_SOUNDEX=1' }
end
# Enhanced ANALYZE and query planner (Deprecated!)
s.subspec 'stat3' do |ss|
# The legacy option SQLITE_ENABLE_STAT3 is a no-op since version 3.30.0
# We therefore depend on the replacement SQLITE_ENABLE_STAT4
ss.dependency 'sqlite3/stat4'
end
# Enhanced ANALYZE and query planner: Collects histogram data for all columns of each index
s.subspec 'stat4' do |ss|
ss.dependency 'sqlite3/common'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_ENABLE_STAT4=1' }
end
# Build unicode61 FTS tokenizer (Deprecated! The tokenizer is built by default)
s.subspec 'unicode61' do |ss|
ss.dependency 'sqlite3/common'
ss.dependency 'sqlite3/fts'
end
# API to register unlock-notification callbacks
s.subspec 'unlock_notify' do |ss|
ss.dependency 'sqlite3/common'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_ENABLE_UNLOCK_NOTIFY=1' }
end
# The spellfix1 module not part of the default amalgation
s.subspec 'spellfix1' do |ss|
ss.dependency 'sqlite3/common'
ss.source_files = "#{archive_name}/ext/misc/spellfix.c"
end
# Math extension
s.subspec 'math' do |ss|
ss.dependency 'sqlite3/common'
ss.pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_ENABLE_MATH_FUNCTIONS=1' }
end
end