dev-ruby/hiredis: respect ${PKG_CONFIG}

Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
Sam James
2021-06-18 23:03:06 +02:00
committed by David Seifert
parent 299942f942
commit d1eed8871c
2 changed files with 6 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
--- a/ext/hiredis_ext/extconf.rb 2015-12-29 15:53:00.000000000 +0100
+++ b/ext/hiredis_ext/extconf.rb 2018-04-21 07:40:15.973747727 +0200
--- a/ext/hiredis_ext/extconf.rb
+++ b/ext/hiredis_ext/extconf.rb
@@ -27,15 +27,8 @@
end
@@ -13,7 +13,7 @@
- # Statically link to hiredis (mkmf can't do this for us)
- $CFLAGS << " -I#{hiredis_dir}"
- $LDFLAGS << " #{hiredis_dir}/libhiredis.a"
+ $CFLAGS << ' ' << `pkg-config hiredis --cflags-only-I`.chomp
+ $CFLAGS << ' ' << `${PKG_CONFIG} hiredis --cflags-only-I`.chomp
+ $LDFLAGS << ' -lhiredis'
have_func("rb_thread_fd_select")

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -23,6 +23,7 @@ IUSE=""
RDEPEND+=" >=dev-libs/hiredis-0.14:="
DEPEND+=" dev-libs/hiredis test? ( dev-ruby/test-unit:2 )"
DEPEND+=" virtual/pkgconfig"
RUBY_S="${MY_P}"
@@ -33,6 +34,7 @@ all_ruby_prepare() {
}
each_ruby_configure() {
tc-export PKG_CONFIG
CC=$(tc-getCC) ${RUBY} -Cext/hiredis_ext extconf.rb || die
}