diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-03-02 13:09:25 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-03-28 22:22:13 -0400 |
commit | 6a5fb9bf195acfd07b6142ab122050ea691584a1 (patch) | |
tree | 60ef431be1642b72d3d34ba0994d6a1a674a487e /gnu/packages/patches | |
parent | 4fda0fbda2aea6971b4cf1c7697f7062cbcdbceb (diff) | |
download | guix-6a5fb9bf195acfd07b6142ab122050ea691584a1.tar.gz guix-6a5fb9bf195acfd07b6142ab122050ea691584a1.zip |
gnu: Add ruby-hiredis.
* gnu/packages/databases.scm (ruby-hiredis): New variable.
* gnu/packages/patches/ruby-hiredis-use-system-hiredis.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/ruby-hiredis-use-system-hiredis.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/gnu/packages/patches/ruby-hiredis-use-system-hiredis.patch b/gnu/packages/patches/ruby-hiredis-use-system-hiredis.patch new file mode 100644 index 0000000000..1b238f5099 --- /dev/null +++ b/gnu/packages/patches/ruby-hiredis-use-system-hiredis.patch @@ -0,0 +1,52 @@ +Retrieved 2023-03-05 from +https://sources.debian.org/data/main/r/ruby-hiredis/0.6.3-2/debian/patches/use_system_libhiredis.patch. + +From: Apollon Oikonomopoulos <apoikos@gmail.com> +Date: Mon, 20 Jan 2020 09:28:45 -0300 +Subject: Use system libhiredis + +Last-Update: 2013-04-10 +Forwarded: no + +Use Debian's libhiredis version instead of downloading one and statically +linking against it. +--- + ext/hiredis_ext/extconf.rb | 18 +++--------------- + 1 file changed, 3 insertions(+), 15 deletions(-) + +diff --git a/ext/hiredis_ext/extconf.rb b/ext/hiredis_ext/extconf.rb +index da39eb5..ffa3abf 100644 +--- a/ext/hiredis_ext/extconf.rb ++++ b/ext/hiredis_ext/extconf.rb +@@ -9,12 +9,6 @@ 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'] + make_program ||= case RUBY_PLATFORM +@@ -27,15 +21,9 @@ else + 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" ++ # Debian: use system hiredis ++ $CFLAGS << " -I/usr/include/hiredis" ++ $LDFLAGS << " -lhiredis" + + have_func("rb_thread_fd_select") + create_makefile('hiredis/ext/hiredis_ext') |