Permalink
Browse files

lib/pkgconfig may not be exist.

  • Loading branch information...
1 parent c1adbd8 commit 36e7e0d9b1b398cc5580fdc338688a9f8ac94827 @akr akr committed May 5, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 chkbuild/build.rb
View
@@ -136,9 +136,13 @@ def build
@depbuilds.each {|depbuild|
dep_dirs << "#{depbuild.target.target_name}=#{depbuild.dir}"
bindir = "#{depbuild.dir}/bin"
- additional_path << bindir if File.directory?(bindir) && !(Dir.entries(bindir) - %w[. ..]).empty?
+ if File.directory?(bindir) && !(Dir.entries(bindir) - %w[. ..]).empty?
+ additional_path << bindir
+ end
pkg_config_path = "#{depbuild.dir}/lib/pkgconfig"
- additional_pkg_config_path << pkg_config_path if !Dir.entries(pkg_config_path).grep(/\.pc\z/).empty?
+ if File.directory?(pkg_config_path) && !Dir.entries(pkg_config_path).grep(/\.pc\z/).empty?
+ additional_pkg_config_path << pkg_config_path
+ end
}
if @opts[:complete_options] && @opts[:complete_options].respond_to?(:merge_dependencies)
@opts = @opts[:complete_options].merge_dependencies(@opts, dep_dirs)

0 comments on commit 36e7e0d

Please sign in to comment.