@@ -65,29 +65,8 @@ def configure_packaged_libraries
6565 unless File . exist? ( File . join ( recipe . target , recipe . host , recipe . name , recipe . version ) )
6666 recipe . cook
6767 end
68- recipe . activate
6968
70- # on macos, pkg-config will not return --cflags without this
71- ENV [ "PKG_CONFIG_ALLOW_SYSTEM_CFLAGS" ] = "t"
72-
73- # only needed for Ruby 3.1.3, see https://bugs.ruby-lang.org/issues/19233
74- RbConfig ::CONFIG [ "PKG_CONFIG" ] = config_string ( "PKG_CONFIG" ) || "pkg-config"
75-
76- lib_path = File . join ( recipe . path , "lib" )
77- pcfile = File . join ( lib_path , "pkgconfig" , "sqlite3.pc" )
78- abort_pkg_config ( "pkg_config" ) unless pkg_config ( pcfile )
79-
80- # see https://bugs.ruby-lang.org/issues/18490
81- ldflags = xpopen ( [ "pkg-config" , "--libs" , "--static" , pcfile ] , err : [ :child , :out ] , &:read )
82- abort_pkg_config ( "xpopen" ) unless $?. success?
83- ldflags = ldflags . split
84-
85- # see https://github.com/flavorjones/mini_portile/issues/118
86- "-L#{ lib_path } " . tap do |lib_path_flag |
87- ldflags . prepend ( lib_path_flag ) unless ldflags . include? ( lib_path_flag )
88- end
89-
90- ldflags . each { |ldflag | append_ldflags ( ldflag ) }
69+ recipe . mkmf_config ( pkg : "sqlite3" )
9170 end
9271 end
9372
@@ -131,6 +110,8 @@ def configure_extension
131110 end
132111
133112 def minimal_recipe
113+ require "rubygems"
114+ gem "mini_portile2" , "2.9.0.rc1" # gemspec is not respected at install time
134115 require "mini_portile2"
135116
136117 MiniPortile . new ( libname , sqlite3_config [ :version ] ) . tap do |recipe |
0 commit comments