From 0b26a7717a2ce3346b57041eb60670960f7cae7f Mon Sep 17 00:00:00 2001 From: Matthias Grosser Date: Wed, 9 Feb 2022 11:46:38 +0100 Subject: [PATCH] Use pkg-config instead of imlib2-config --- CHANGELOG.md | 4 ++++ ext/rszr/extconf.rb | 5 ++--- lib/rszr/version.rb | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44069af..3b5db4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## Rszr 1.1.0 (Feb 9, 2022) + +* Use pkg_config as imlib2 dropped imlib2-config + ## Rszr 1.0.1 (Nov 10, 2021) * Remove libexif.h header check diff --git a/ext/rszr/extconf.rb b/ext/rszr/extconf.rb index 38a041b..ca492a8 100644 --- a/ext/rszr/extconf.rb +++ b/ext/rszr/extconf.rb @@ -1,10 +1,9 @@ require 'mkmf' require 'rbconfig' -imlib2_config = with_config('imlib2-config', 'imlib2-config') +pkg_config('imlib2') -$CFLAGS << ' -DX_DISPLAY_MISSING ' << `#{imlib2_config} --cflags`.chomp -$LDFLAGS << ' ' << `#{imlib2_config} --libs`.chomp +$CFLAGS << ' -DX_DISPLAY_MISSING' $LDFLAGS.gsub!(/\ -lX11\ -lXext/, '') if RUBY_PLATFORM =~ /darwin/ unless find_header('Imlib2.h') diff --git a/lib/rszr/version.rb b/lib/rszr/version.rb index fed72e0..24556e7 100644 --- a/lib/rszr/version.rb +++ b/lib/rszr/version.rb @@ -1,3 +1,3 @@ module Rszr - VERSION = '1.0.1' + VERSION = '1.1.0' end