Skip to content

Commit

Permalink
Show found package version
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jul 30, 2022
1 parent 4e753ff commit 9f4f9f4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/pkg-config.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2008-2021 Sutou Kouhei <kou@cozmixng.org>
# Copyright 2008-2022 Sutou Kouhei <kou@cozmixng.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -598,8 +598,12 @@ def have_package(pkg, major=nil, minor=0, micro=0)
message << " version (>= #{major}.#{minor}.#{micro})"
end
major ||= 0
enough_version = checking_for(checking_message(message)) do
check_version?(pkg, major, minor, micro)
enough_version = checking_for(checking_message(message), "%s") do
if check_version?(pkg, major, minor, micro)
"yes (#{modversion(pkg)})"
else
"no"
end
end
if enough_version
libraries = libs_only_l(pkg)
Expand Down

0 comments on commit 9f4f9f4

Please sign in to comment.