Description: Use pkg-config to get compiler and linker flags for YAZ
 libyaz-dev no longer ships yaz-config.
Author: Hugh McMaster <hugh.mcmaster@outlook.com>
Bug-Debian: https://bugs.debian.org/954983
Last-Update: 2020-03-26

--- ruby-zoom-0.5.0.orig/ext/extconf.rb
+++ ruby-zoom-0.5.0/ext/extconf.rb
@@ -1,7 +1,10 @@
 require 'mkmf'
+require 'pkg-config'
 
-unless system('yaz-config')
-  $stderr.puts 'yaz does not appear to be installed'
+$pkgconfig = 'pkg-config'
+
+unless system("#$pkgconfig --exists yaz")
+  $stderr.puts 'yaz development files do not appear to be installed'
   exit
 end
 
@@ -10,8 +13,8 @@ unless have_header('yaz/zoom.h')
   exit
 end
 
-$CFLAGS << " #{`yaz-config --cflags`} "
-$LDFLAGS << " #{`yaz-config --libs`} "
+$CFLAGS << " #{`#$pkgconfig --cflags yaz`} "
+$LDFLAGS << " #{`#$pkgconfig --libs yaz`} "
 
 create_makefile("zoom")
 
