ext/cairo-gobject/extconf.rb in cairo-gobject-3.3.5 vs ext/cairo-gobject/extconf.rb in cairo-gobject-3.3.6

- old
+ new

@@ -1,8 +1,8 @@ #!/usr/bin/env ruby # -# Copyright (C) 2013 Ruby-GNOME2 Project Team +# Copyright (C) 2013-2019 Ruby-GNOME2 Project Team # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. @@ -35,36 +35,30 @@ $LOAD_PATH.unshift(mkmf_gnome2_dir.to_s) module_name = "cairo_gobject" package_id = "cairo-gobject" -begin - require "mkmf-gnome2" -rescue LoadError - require "rubygems" - gem "glib2" - require "mkmf-gnome2" -end +require "mkmf-gnome2" ["glib2"].each do |package| directory = "#{package}#{version_suffix}" build_dir = "#{directory}/tmp/#{RUBY_PLATFORM}/#{package}/#{RUBY_VERSION}" add_depend_package(package, "#{directory}/ext/#{package}", top_dir.to_s, :top_build_dir => top_build_dir.to_s, :target_build_dir => build_dir) end -unless check_cairo(:top_dir => top_dir) - exit(false) -end - unless required_pkg_config_package(package_id, :alt_linux => "libcairo-devel", :debian => "libcairo2-dev", :redhat => "cairo-gobject-devel", :arch_linux => "cairo", :homebrew => "cairo") + exit(false) +end + +unless check_cairo(:top_dir => top_dir) exit(false) end create_pkg_config_file("Ruby/CairoGObject", package_id, ruby_gnome2_version,