diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/mkmf.rb | 7 |
2 files changed, 10 insertions, 3 deletions
@@ -1,3 +1,9 @@ +Fri Nov 23 23:44:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * lib/mkmf.rb (MakeMakefile#pkg_config): strip all white spaces for + mingw64+MSYS pkg-config which errouneously emits extra newlines. + [ruby-core:47998] [Bug #7163] + Fri Nov 23 17:31:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org> * ruby.c (usage): wrap description lines if options are too long. diff --git a/lib/mkmf.rb b/lib/mkmf.rb index ded4e89814..83ff06f029 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -1,3 +1,4 @@ +# -*- coding: us-ascii -*- # module to create Makefile for extension modules # invoke like: ruby -r mkmf extconf.rb @@ -1668,16 +1669,16 @@ SRC def pkg_config(pkg) if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig) # iff package specific config command is given - get = proc {|opt| `#{pkgconfig} --#{opt}`.chomp} + get = proc {|opt| `#{pkgconfig} --#{opt}`.strip} elsif ($PKGCONFIG ||= (pkgconfig = with_config("pkg-config", ("pkg-config" unless CROSS_COMPILING))) && find_executable0(pkgconfig) && pkgconfig) and system("#{$PKGCONFIG} --exists #{pkg}") # default to pkg-config command - get = proc {|opt| `#{$PKGCONFIG} --#{opt} #{pkg}`.chomp} + get = proc {|opt| `#{$PKGCONFIG} --#{opt} #{pkg}`.strip} elsif find_executable0(pkgconfig = "#{pkg}-config") # default to package specific config command, as a last resort. - get = proc {|opt| `#{pkgconfig} --#{opt}`.chomp} + get = proc {|opt| `#{pkgconfig} --#{opt}`.strip} end if get and try_ldflags(ldflags = get['libs']) cflags = get['cflags'] |