47 lines
1.3 KiB
Diff
47 lines
1.3 KiB
Diff
From 3339e1d7eb7a7f4e14b1c2be7597af60384b123c Mon Sep 17 00:00:00 2001
|
|
From: Pavel Valena <pvalena@redhat.com>
|
|
Date: Wed, 9 May 2018 15:50:22 +0200
|
|
Subject: [PATCH] Build against system hiredis.
|
|
|
|
---
|
|
ext/hiredis_ext/extconf.rb | 8 +-------
|
|
1 file changed, 1 insertion(+), 7 deletions(-)
|
|
|
|
diff --git a/ext/hiredis_ext/extconf.rb b/ext/hiredis_ext/extconf.rb
|
|
index da39eb5..4bdfc00 100644
|
|
--- a/ext/hiredis_ext/extconf.rb
|
|
+++ b/ext/hiredis_ext/extconf.rb
|
|
@@ -8,12 +8,6 @@ RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
|
|
end
|
|
|
|
RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
|
|
-
|
|
-hiredis_dir = File.join(File.dirname(__FILE__), %w{.. .. vendor hiredis})
|
|
-unless File.directory?(hiredis_dir)
|
|
- STDERR.puts "vendor/hiredis missing, please checkout its submodule..."
|
|
- exit 1
|
|
-end
|
|
|
|
RbConfig::CONFIG['configure_args'] =~ /with-make-prog\=(\w+)/
|
|
make_program = $1 || ENV['make']
|
|
@@ -27,15 +26,7 @@ end
|
|
end
|
|
|
|
if build_hiredis
|
|
- # Make sure hiredis is built...
|
|
- Dir.chdir(hiredis_dir) do
|
|
- success = system("#{make_program} static")
|
|
- raise "Building hiredis failed" if !success
|
|
- end
|
|
-
|
|
- # Statically link to hiredis (mkmf can't do this for us)
|
|
- $CFLAGS << " -I#{hiredis_dir}"
|
|
- $LDFLAGS << " #{hiredis_dir}/libhiredis.a"
|
|
+ pkg_config 'hiredis'
|
|
|
|
have_func("rb_thread_fd_select")
|
|
create_makefile('hiredis/ext/hiredis_ext')
|
|
--
|
|
2.13.6
|
|
|