@@ -13,15 +13,20 @@ LICENSE
1313 s . authors = { 'Clemens Gruber' => 'clemensgru@gmail.com' }
1414
1515 v = s . version . to_s . split ( '.' )
16- archive_name = "sqlite-amalgamation -" +v [ 0 ] +v [ 1 ] . rjust ( 2 , '0' ) +v [ 2 ] . rjust ( 2 , '0' ) +"00"
16+ archive_name = "sqlite-src -" +v [ 0 ] +v [ 1 ] . rjust ( 2 , '0' ) +v [ 2 ] . rjust ( 2 , '0' ) +"00"
1717 s . source = { :http => "https://www.sqlite.org/#{ Time . now . year } /#{ archive_name } .zip" }
18+ s . prepare_command = <<-CMD
19+ cd #{ archive_name }
20+ ./configure
21+ make sqlite3.c sqlite3.h sqlite3ext.h
22+ CMD
1823 s . requires_arc = false
1924
2025 s . default_subspecs = 'common'
2126
2227 s . subspec 'common' do |ss |
2328 ss . source_files = "#{ archive_name } /sqlite*.{h,c}"
24- ss . public_header_files = "#{ archive_name } /sqlite3.h"
29+ ss . public_header_files = "#{ archive_name } /sqlite3.h, #{ archive_name } /sqlite3ext.h "
2530 ss . osx . pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DHAVE_USLEEP=1' }
2631 # Disable OS X / AFP locking code on mobile platforms (iOS, tvOS, watchOS)
2732 sqlite_xcconfig_ios = { 'OTHER_CFLAGS' => '$(inherited) -DHAVE_USLEEP=1 -DSQLITE_ENABLE_LOCKING_STYLE=0' }
@@ -132,4 +137,10 @@ LICENSE
132137 ss . dependency 'sqlite3/common'
133138 ss . pod_target_xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_ENABLE_UNLOCK_NOTIFY=1' }
134139 end
140+
141+ # The spellfix1 module not part of the default amalgation
142+ s . subspec 'spellfix1' do |ss |
143+ ss . dependency 'sqlite3/common'
144+ ss . source_files = "#{ archive_name } /ext/misc/spellfix.c"
145+ end
135146end
0 commit comments