From 74beb29c96141176319345ba704e5516af3cf253 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Wed, 21 Feb 2024 15:50:50 -0500 Subject: [PATCH] ext(wip): don't set LIBPATH to avoid -Wl,-rpath linker args --- ext/nokogiri/extconf.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ext/nokogiri/extconf.rb b/ext/nokogiri/extconf.rb index 07db83663cb..1963c4c2912 100644 --- a/ext/nokogiri/extconf.rb +++ b/ext/nokogiri/extconf.rb @@ -846,7 +846,7 @@ def configure if zlib_recipe append_cppflags("-I#{zlib_recipe.path}/include") - $LIBPATH = ["#{zlib_recipe.path}/lib"] | $LIBPATH +# $LIBPATH = ["#{zlib_recipe.path}/lib"] | $LIBPATH ensure_package_configuration( opt: "zlib", pc: "zlib", @@ -858,7 +858,7 @@ def configure if libiconv_recipe append_cppflags("-I#{libiconv_recipe.path}/include") - $LIBPATH = ["#{libiconv_recipe.path}/lib"] | $LIBPATH +# $LIBPATH = ["#{libiconv_recipe.path}/lib"] | $LIBPATH ensure_package_configuration( opt: "iconv", pc: "iconv", @@ -979,12 +979,12 @@ def configure %x(sh #{config} --libs).strip.shellsplit.each do |arg| case arg when /\A-L(.+)\z/ - # Prioritize ports' directories - $LIBPATH = if Regexp.last_match(1).start_with?(PACKAGE_ROOT_DIR + "/") - [Regexp.last_match(1)] | $LIBPATH - else - $LIBPATH | [Regexp.last_match(1)] - end + # # Prioritize ports' directories + # $LIBPATH = if Regexp.last_match(1).start_with?(PACKAGE_ROOT_DIR + "/") + # [Regexp.last_match(1)] | $LIBPATH + # else + # $LIBPATH | [Regexp.last_match(1)] + # end when /\A-l./ libs.unshift(arg) else @@ -1078,7 +1078,7 @@ def compile end append_cppflags("-I#{File.join(libgumbo_recipe.path, "include")}") $libs = $libs + " " + File.join(libgumbo_recipe.path, "lib", "libgumbo.a") -$LIBPATH = $LIBPATH | [File.join(libgumbo_recipe.path, "lib")] +# $LIBPATH = $LIBPATH | [File.join(libgumbo_recipe.path, "lib")] ensure_func("gumbo_parse_with_options", "nokogiri_gumbo.h") have_func("xmlHasFeature") || abort("xmlHasFeature() is missing.") # introduced in libxml 2.6.21