[前][次][番号順一覧][スレッド一覧]

ruby-changes:73964

From: Nobuyoshi <ko1@a...>
Date: Wed, 12 Oct 2022 20:24:53 +0900 (JST)
Subject: [ruby-changes:73964] ed01bacf27 (master): [ruby/psych] Abandon when libyaml is not found

https://git.ruby-lang.org/ruby.git/commit/?id=ed01bacf27

From ed01bacf2778a5e3bd813ded5f01d7ccc85b289d Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 12 Oct 2022 19:53:40 +0900
Subject: [ruby/psych] Abandon when libyaml is not found

https://github.com/ruby/psych/commit/0b89eda398
---
 ext/psych/extconf.rb | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/ext/psych/extconf.rb b/ext/psych/extconf.rb
index 24173567b4..afae08603d 100644
--- a/ext/psych/extconf.rb
+++ b/ext/psych/extconf.rb
@@ -7,14 +7,6 @@ if $mswin or $mingw or $cygwin https://github.com/ruby/ruby/blob/trunk/ext/psych/extconf.rb#L7
 end
 
 yaml_source = with_config("libyaml-source-dir")
-unless yaml_source # default to pre-installed libyaml
-  pkg_config('yaml-0.1')
-  dir_config('libyaml')
-  unless find_header('yaml.h') && find_library('yaml', 'yaml_get_version')
-    yaml_source = true # fallback to the bundled source if exists
-  end
-end
-
 if yaml_source
   yaml_source = yaml_source.gsub(/\$\((\w+)\)|\$\{(\w+)\}/) {ENV[$1||$2]}
   yaml_source = yaml_source.chomp("/")
@@ -44,6 +36,11 @@ if yaml_source https://github.com/ruby/ruby/blob/trunk/ext/psych/extconf.rb#L36
   libyaml = "libyaml.#$LIBEXT"
   $cleanfiles << libyaml
   $LOCAL_LIBS.prepend("$(LIBYAML) ")
+else # default to pre-installed libyaml
+  pkg_config('yaml-0.1')
+  dir_config('libyaml')
+  find_header('yaml.h') or abort "yaml.h not found"
+  find_library('yaml', 'yaml_get_version') or "libyaml not found"
 end
 
 create_makefile 'psych' do |mk|
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]