Skip to content

Commit 1788708

Browse files
committed
wip: update to latest mini_portile and drop the pkgconf hacks
See flavorjones/mini_portile#131
1 parent 5c8e329 commit 1788708

File tree

3 files changed

+3
-23
lines changed

3 files changed

+3
-23
lines changed

.github/workflows/sqlite3-ruby.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
steps:
8787
- run: |
8888
dnf group install -y "C Development Tools and Libraries"
89-
dnf install -y ruby ruby-devel libyaml-devel
89+
dnf install -y ruby ruby-devel libyaml-devel git-all
9090
- uses: actions/checkout@v4
9191
- run: bundle install
9292
- run: bundle exec rake compile -- --disable-system-libraries

Gemfile

+2
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ gem("rdoc", "6.5.0")
99
gem("psych", "5.1.0")
1010

1111
gem("ruby_memcheck", "2.1.2") if Gem::Platform.local.os == "linux"
12+
13+
gem "mini_portile2", git: "https://github.com/flavorjones/mini_portile", ref: "696d25d3"

ext/sqlite3/extconf.rb

-22
Original file line numberDiff line numberDiff line change
@@ -66,28 +66,6 @@ def configure_packaged_libraries
6666
recipe.cook
6767
end
6868
recipe.activate
69-
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) }
9169
end
9270
end
9371

0 commit comments

Comments
 (0)