Skip to content

Commit

Permalink
Load 'mini_portile2' only when needed.
Browse files Browse the repository at this point in the history
This enables installation using system SQLite3 without having
mini_portile2 around:

~~~
gem install --force sqlite3 -- --enable-system-libraries
~~~
  • Loading branch information
voxik committed Feb 28, 2023
1 parent 1b469ed commit 193c5e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/sqlite3/extconf.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require "mkmf"
require "mini_portile2"
require "yaml"

module Sqlite3
Expand Down Expand Up @@ -131,6 +130,8 @@ def configure_extension
end

def minimal_recipe
require "mini_portile2"

MiniPortile.new(libname, sqlite3_config[:version]).tap do |recipe|
if sqlite_source_dir
recipe.source_directory = sqlite_source_dir
Expand Down

0 comments on commit 193c5e0

Please sign in to comment.