diff -Nru ruby-pkg-config-1.1.2~git20110615/debian/changelog ruby-pkg-config-1.1.2/debian/changelog --- ruby-pkg-config-1.1.2~git20110615/debian/changelog 2011-07-02 20:22:47.000000000 +0000 +++ ruby-pkg-config-1.1.2/debian/changelog 2011-08-11 18:08:03.000000000 +0000 @@ -1,3 +1,12 @@ +ruby-pkg-config (1.1.2-1) unstable; urgency=low + + * New upstream release. + + Fixed to build on non-Intel+Linux platforms #632323 - dropped + Debian-specific patch + * Run tests with debian/ruby-tests.rb; drop build dependency on rake + + -- Antonio Terceiro Thu, 11 Aug 2011 10:24:20 -0700 + ruby-pkg-config (1.1.2~git20110615-2) unstable; urgency=low * Fix debian/watch: use upstream name instead of Debian name diff -Nru ruby-pkg-config-1.1.2~git20110615/debian/control ruby-pkg-config-1.1.2/debian/control --- ruby-pkg-config-1.1.2~git20110615/debian/control 2011-06-16 00:49:52.000000000 +0000 +++ ruby-pkg-config-1.1.2/debian/control 2011-08-11 17:33:01.000000000 +0000 @@ -2,9 +2,9 @@ Section: ruby Priority: optional Maintainer: Debian Ruby Extras Maintainers -Uploaders: Antonio Terceiro +Uploaders: Antonio Terceiro DM-Upload-Allowed: yes -Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.2.4~), rake, libcairo2-dev +Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.2.4~), libcairo2-dev Standards-Version: 3.9.2 Vcs-Git: git://git.debian.org/pkg-ruby-extras/ruby-pkg-config.git Vcs-Browser: http://git.debian.org/?p=pkg-ruby-extras/ruby-pkg-config.git;a=summary diff -Nru ruby-pkg-config-1.1.2~git20110615/debian/patches/debian-changes ruby-pkg-config-1.1.2/debian/patches/debian-changes --- ruby-pkg-config-1.1.2~git20110615/debian/patches/debian-changes 2011-07-02 20:23:26.000000000 +0000 +++ ruby-pkg-config-1.1.2/debian/patches/debian-changes 2011-08-11 18:08:31.000000000 +0000 @@ -1,26 +1,23 @@ This patch contains all the Debian-specific changes mixed together. To review them separately, please inspect the VCS history at http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/ruby-pkg-config.git;a=summary ---- ruby-pkg-config-1.1.2~git20110615.orig/lib/pkg-config.rb -+++ ruby-pkg-config-1.1.2~git20110615/lib/pkg-config.rb -@@ -270,12 +270,14 @@ class PackageConfig +--- ruby-pkg-config-1.1.2.orig/test/test_pkg_config.rb ++++ ruby-pkg-config-1.1.2/test/test_pkg_config.rb +@@ -17,13 +17,11 @@ class PkgConfigTest < Test::Unit::TestCa end - def guess_default_path -+ arch_pkgconfig_dir = Dir.glob('/usr/lib/*/pkgconfig').join(SEPARATOR) - default_path = ["/usr/local/lib64/pkgconfig", - "/usr/local/lib/pkgconfig", - "/usr/local/libdata/pkgconfig", - "/opt/local/lib/pkgconfig", - "/usr/lib/pkgconfig", - "/usr/lib64/pkgconfig", -+ arch_pkgconfig_dir, - "/usr/lib/x86_64-linux-gnu/pkgconfig", - "/usr/lib/i386-linux-gnu/pkgconfig", - "/usr/X11/lib/pkgconfig/", ---- ruby-pkg-config-1.1.2~git20110615.orig/test/test_pkg_config.rb -+++ ruby-pkg-config-1.1.2~git20110615/test/test_pkg_config.rb -@@ -107,9 +107,10 @@ class PkgConfigTest < Test::Unit::TestCa + def test_cflags +- omit("this is known bug in 1.1.2") if PKGConfig::VERSION == "1.1.2" + assert_pkg_config("cairo", ["--cflags"], @cairo.cflags) + assert_pkg_config("cairo-png", ["--cflags"], @cairo_png.cflags) + end + + def test_cflags_only_I +- omit("this is known bug in 1.1.2") if PKGConfig::VERSION == "1.1.2" + assert_pkg_config("cairo", ["--cflags-only-I"], @cairo.cflags_only_I) + assert_pkg_config("cairo-png", ["--cflags-only-I"], @cairo_png.cflags_only_I) + end +@@ -109,9 +107,10 @@ class PkgConfigTest < Test::Unit::TestCa end def assert_pkg_config(package, pkg_config_args, actual) diff -Nru ruby-pkg-config-1.1.2~git20110615/debian/ruby-tests.rake ruby-pkg-config-1.1.2/debian/ruby-tests.rake --- ruby-pkg-config-1.1.2~git20110615/debian/ruby-tests.rake 2011-06-16 00:41:28.000000000 +0000 +++ ruby-pkg-config-1.1.2/debian/ruby-tests.rake 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -require 'rake/testtask' -Rake::TestTask.new do |t| - t.libs << 'debian/ruby-pkg-config/usr/lib/ruby/vendor_ruby' - t.test_files = FileList['test/test_*.rb'] - t.ruby_opts << '-rtest/unit' -end -task :default => :test diff -Nru ruby-pkg-config-1.1.2~git20110615/debian/ruby-tests.rb ruby-pkg-config-1.1.2/debian/ruby-tests.rb --- ruby-pkg-config-1.1.2~git20110615/debian/ruby-tests.rb 1970-01-01 00:00:00.000000000 +0000 +++ ruby-pkg-config-1.1.2/debian/ruby-tests.rb 2011-08-11 17:30:40.000000000 +0000 @@ -0,0 +1,4 @@ +require 'test/unit' +Dir.glob('test/test_*.rb').each do |f| + require f +end diff -Nru ruby-pkg-config-1.1.2~git20110615/Gemfile ruby-pkg-config-1.1.2/Gemfile --- ruby-pkg-config-1.1.2~git20110615/Gemfile 1970-01-01 00:00:00.000000000 +0000 +++ ruby-pkg-config-1.1.2/Gemfile 2011-07-06 21:09:14.000000000 +0000 @@ -0,0 +1,25 @@ +# -*- mode: ruby; coding: utf-8 -*- +# +# Copyright (C) 2011 Kouhei Sutou +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License version 2.1 as published by the Free Software Foundation. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +source "http://rubygems.org/" + +group :development, :test do + gem "test-unit" + gem "test-unit-notify" + gem "rake" + gem "jeweler" +end diff -Nru ruby-pkg-config-1.1.2~git20110615/.gitignore ruby-pkg-config-1.1.2/.gitignore --- ruby-pkg-config-1.1.2~git20110615/.gitignore 2011-06-15 22:07:02.000000000 +0000 +++ ruby-pkg-config-1.1.2/.gitignore 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -/pkg/ -/doc/ -/Makefile -/test-unit/ diff -Nru ruby-pkg-config-1.1.2~git20110615/lib/pkg-config.rb ruby-pkg-config-1.1.2/lib/pkg-config.rb --- ruby-pkg-config-1.1.2~git20110615/lib/pkg-config.rb 2011-06-15 22:07:02.000000000 +0000 +++ ruby-pkg-config-1.1.2/lib/pkg-config.rb 2011-07-06 21:09:14.000000000 +0000 @@ -104,6 +104,7 @@ path = @options[:path] || ENV["PKG_CONFIG_PATH"] @paths = [path, guess_default_path].compact.join(SEPARATOR).split(SEPARATOR) @paths.unshift(*(@options[:paths] || [])) + @paths = normalize_paths(@paths) @msvc_syntax = @options[:msvc_syntax] @variables = @declarations = nil override_variables = self.class.custom_override_variables @@ -113,7 +114,7 @@ end def exist? - not pc.nil? + not pc_path.nil? end def requires @@ -176,15 +177,15 @@ expand_value(@declarations[name]) end - private - def pc + def pc_path @paths.each do |path| - pc_name = File.join(path, "#{@name}.pc") - return pc_name if File.exist?(pc_name) + _pc_path = File.join(path, "#{@name}.pc") + return _pc_path if File.exist?(_pc_path) end - return nil + nil end + private def collect_cflags all_cflags = all_required_packages.collect do |package| self.class.new(package, @options).cflags @@ -233,7 +234,7 @@ raise ".pc for #{@name} doesn't exist." unless exist? @variables = {} @declarations = {} - File.open(pc) do |input| + File.open(pc_path) do |input| input.each_line do |line| line = line.gsub(/#.*/, '').strip next if line.empty? @@ -270,14 +271,14 @@ end def guess_default_path + arch_depended_path = Dir.glob('/usr/lib/*/pkgconfig').join(SEPARATOR) default_path = ["/usr/local/lib64/pkgconfig", "/usr/local/lib/pkgconfig", "/usr/local/libdata/pkgconfig", "/opt/local/lib/pkgconfig", - "/usr/lib/pkgconfig", + arch_depended_path, "/usr/lib64/pkgconfig", - "/usr/lib/x86_64-linux-gnu/pkgconfig", - "/usr/lib/i386-linux-gnu/pkgconfig", + "/usr/lib/pkgconfig", "/usr/X11/lib/pkgconfig/", "/usr/share/pkgconfig"].join(SEPARATOR) libdir = ENV["PKG_CONFIG_LIBDIR"] @@ -285,8 +286,13 @@ pkg_config = self.class.native_pkg_config return default_path unless pkg_config.absolute? - [(pkg_config.parent.parent + "lib" + "pkgconfig").to_s, - (pkg_config.parent.parent + "libdata" + "pkgconfig").to_s, + pkg_config_prefix = pkg_config.parent.parent + pkg_config_arch_depended_path = + Dir.glob((pkg_config_prefix + "lib/*/pkgconfig").to_s).join(SEPARATOR) + [pkg_config_arch_depended_path, + (pkg_config_prefix + "lib64/pkgconfig").to_s, + (pkg_config_prefix + "lib/pkgconfig").to_s, + (pkg_config_prefix + "libdata/pkgconfig").to_s, default_path].join(SEPARATOR) end @@ -301,6 +307,12 @@ @name == package end.uniq end + + def normalize_paths(paths) + paths.reject do |path| + path.empty? or !File.exist?(path) + end + end end module PKGConfig @@ -365,9 +377,9 @@ package_config(pkg).variable(name) end - def check_version?(pkg, major = 0, minor = 0, micro = 0) + def check_version?(pkg, major=0, minor=0, micro=0) return false unless exist?(pkg) - ver = modversion(pkg).split(".").collect{|item| item.to_i} + ver = modversion(pkg).split(".").collect {|item| item.to_i} (0..2).each {|i| ver[i] = 0 unless ver[i]} (ver[0] > major || @@ -376,7 +388,7 @@ ver[2] >= micro)) end - def have_package(pkg, major = nil, minor = 0, micro = 0) + def have_package(pkg, major=nil, minor=0, micro=0) message = "#{pkg}" unless major.nil? message << " version (>= #{major}.#{minor}.#{micro})" diff -Nru ruby-pkg-config-1.1.2~git20110615/Manifest.txt ruby-pkg-config-1.1.2/Manifest.txt --- ruby-pkg-config-1.1.2~git20110615/Manifest.txt 2011-06-15 22:07:02.000000000 +0000 +++ ruby-pkg-config-1.1.2/Manifest.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -LGPL-2.1 -NEWS -README.rdoc -Rakefile -extconf.rb -lib/pkg-config.rb -test/run-test.rb -test/test_pkg_config.rb diff -Nru ruby-pkg-config-1.1.2~git20110615/metadata.yml ruby-pkg-config-1.1.2/metadata.yml --- ruby-pkg-config-1.1.2~git20110615/metadata.yml 1970-01-01 00:00:00.000000000 +0000 +++ ruby-pkg-config-1.1.2/metadata.yml 2011-07-06 21:09:14.000000000 +0000 @@ -0,0 +1,129 @@ +--- !ruby/object:Gem::Specification +name: pkg-config +version: !ruby/object:Gem::Version + hash: 23 + prerelease: + segments: + - 1 + - 1 + - 2 + version: 1.1.2 +platform: ruby +authors: +- Kouhei Sutou +autorequire: +bindir: bin +cert_chain: [] + +date: 2011-07-04 00:00:00 Z +dependencies: +- !ruby/object:Gem::Dependency + version_requirements: &id001 !ruby/object:Gem::Requirement + none: false + requirements: + - - ">=" + - !ruby/object:Gem::Version + hash: 3 + segments: + - 0 + version: "0" + name: test-unit + prerelease: false + type: :development + requirement: *id001 +- !ruby/object:Gem::Dependency + version_requirements: &id002 !ruby/object:Gem::Requirement + none: false + requirements: + - - ">=" + - !ruby/object:Gem::Version + hash: 3 + segments: + - 0 + version: "0" + name: test-unit-notify + prerelease: false + type: :development + requirement: *id002 +- !ruby/object:Gem::Dependency + version_requirements: &id003 !ruby/object:Gem::Requirement + none: false + requirements: + - - ">=" + - !ruby/object:Gem::Version + hash: 3 + segments: + - 0 + version: "0" + name: rake + prerelease: false + type: :development + requirement: *id003 +- !ruby/object:Gem::Dependency + version_requirements: &id004 !ruby/object:Gem::Requirement + none: false + requirements: + - - ">=" + - !ruby/object:Gem::Version + hash: 3 + segments: + - 0 + version: "0" + name: jeweler + prerelease: false + type: :development + requirement: *id004 +description: pkg-config can be used in your extconf.rb to properly detect need libraries for compiling Ruby native extensions +email: +- kou@cozmixng.org +executables: [] + +extensions: [] + +extra_rdoc_files: +- README.rdoc +files: +- Gemfile +- LGPL-2.1 +- Rakefile +- lib/pkg-config.rb +- setup.rb +- README.rdoc +- test/test_pkg_config.rb +- test/run-test.rb +homepage: http://github.com/rcairo/pkg-config +licenses: +- LGPLv2+ +post_install_message: +rdoc_options: [] + +require_paths: +- lib +required_ruby_version: !ruby/object:Gem::Requirement + none: false + requirements: + - - ">=" + - !ruby/object:Gem::Version + hash: 3 + segments: + - 0 + version: "0" +required_rubygems_version: !ruby/object:Gem::Requirement + none: false + requirements: + - - ">=" + - !ruby/object:Gem::Version + hash: 3 + segments: + - 0 + version: "0" +requirements: [] + +rubyforge_project: cairo +rubygems_version: 1.7.2 +signing_key: +specification_version: 3 +summary: A pkg-config implementation for Ruby +test_files: +- test/test_pkg_config.rb +- test/run-test.rb diff -Nru ruby-pkg-config-1.1.2~git20110615/NEWS ruby-pkg-config-1.1.2/NEWS --- ruby-pkg-config-1.1.2~git20110615/NEWS 2011-06-15 22:07:02.000000000 +0000 +++ ruby-pkg-config-1.1.2/NEWS 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -= NEWS - -== 1.1.1 - 2011/05/03 - -* [ruby-gnome-devel-en] add - /usr/lib/i386-linux-gnu/pkgconfig to the default paths. - (Reported by Andrea B.C.) - -=== Thanks - - * Funky Bibimba - -== 1.1.0 - 2011/04/03 - -* [#3270846] add /usr/lib/x86_64-linux-gnu/pkgconfig to default paths. - (Reported by Funky Bibimbap) - -=== Thanks - - * Funky Bibimba - -== 1.0.8 - 2011/01/30 - -* fix a bug that multiple PKGConfig.add_path doesn't work. - -== 1.0.7 - 2010/09/30 - -* suppress warnings on Ruby 1.9. - -== 1.0.6 - 2010/09/23 - -* add PKGConfig.libs_only_L. - -== 1.0.5 - 2010/09/23 - -* suppress duplicated configure arguments processing. -* use mkmf.rb message functions. - -== 1.0.4 - 2010/09/23 - -* add PKGConfig.variable. - -== 1.0.3 - 2010/09/07 - -* add path and override_variable customize API. -* support description. - -== 1.0.2 - 2010/09/02 - -* fix packaing miss. - -== 1.0.1 - 2010/09/02 - -* support installing without gem. - -== 1.0.0 - 2010/09/02 - -* Initial release! - diff -Nru ruby-pkg-config-1.1.2~git20110615/Rakefile ruby-pkg-config-1.1.2/Rakefile --- ruby-pkg-config-1.1.2~git20110615/Rakefile 2011-06-15 22:07:02.000000000 +0000 +++ ruby-pkg-config-1.1.2/Rakefile 2011-07-06 21:09:14.000000000 +0000 @@ -1,6 +1,6 @@ # -*- coding: utf-8; mode: ruby -*- # -# Copyright (C) 20010-2011 Kouhei Sutou +# Copyright (C) 2010-2011 Kouhei Sutou # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -21,7 +21,7 @@ require 'pathname' require 'fileutils' require 'rubygems' -require 'hoe' +require 'jeweler' base_dir = Pathname(__FILE__).dirname lib_dir = base_dir + "lib" @@ -33,22 +33,29 @@ end ENV["VERSION"] ||= guess_version -version = ENV["VERSION"] -project = Hoe.spec('pkg-config') do |project| - project.version = version - project.rubyforge_name = 'cairo' - project.author = "Kouhei Sutou" - project.readme_file = "README.rdoc" - project.email = ['kou@cozmixng.org'] - project.summary = 'A pkg-config implementation for Ruby' - project.url = 'http://github.com/rcairo/pkg-config' - project.spec_extras = { - :require_paths => ['lib'], - :has_rdoc => false, - } - news = base_dir + "NEWS" - project.changes = news.read.split(/^== .*$/)[1].strip - project.description = "pkg-config can be used in your extconf.rb to properly detect neeed libraries for compiling Ruby native extensions" +version = ENV["VERSION"].dup +spec = nil +Jeweler::Tasks.new do |_spec| + spec = _spec + spec.name = "pkg-config" + spec.version = version + spec.rubyforge_project = 'cairo' + spec.author = "Kouhei Sutou" + spec.email = ['kou@cozmixng.org'] + spec.summary = 'A pkg-config implementation for Ruby' + spec.homepage = 'http://github.com/rcairo/pkg-config' + spec.description = "pkg-config can be used in your extconf.rb to properly detect need libraries for compiling Ruby native extensions" + spec.license = "LGPLv2+" + spec.files = FileList["lib/**/*.rb", + "*.rb", + "Gemfile", + "Rakefile", + "LGPL-2.1"] + spec.test_files = FileList["test/**/*.rb"] +end + +Rake::Task["release"].prerequisites.clear +Jeweler::RubygemsDotOrgTasks.new do end desc "tag the current veresion" diff -Nru ruby-pkg-config-1.1.2~git20110615/test/run-test.rb ruby-pkg-config-1.1.2/test/run-test.rb --- ruby-pkg-config-1.1.2~git20110615/test/run-test.rb 2011-06-15 22:07:02.000000000 +0000 +++ ruby-pkg-config-1.1.2/test/run-test.rb 2011-07-06 21:09:14.000000000 +0000 @@ -3,12 +3,10 @@ $VERBOSE = true base_dir = File.expand_path(File.join(File.dirname(__FILE__), "..")) -test_unit_dir = File.join(base_dir, "test-unit", "lib") lib_dir = File.join(base_dir, "lib") test_dir = File.join(base_dir, "test") -$LOAD_PATH.unshift(test_unit_dir) - +gem 'test-unit' require 'test/unit' $LOAD_PATH.unshift(base_dir) diff -Nru ruby-pkg-config-1.1.2~git20110615/test/test_pkg_config.rb ruby-pkg-config-1.1.2/test/test_pkg_config.rb --- ruby-pkg-config-1.1.2~git20110615/test/test_pkg_config.rb 2011-06-15 22:07:02.000000000 +0000 +++ ruby-pkg-config-1.1.2/test/test_pkg_config.rb 2011-07-06 21:09:14.000000000 +0000 @@ -17,11 +17,13 @@ end def test_cflags + omit("this is known bug in 1.1.2") if PKGConfig::VERSION == "1.1.2" assert_pkg_config("cairo", ["--cflags"], @cairo.cflags) assert_pkg_config("cairo-png", ["--cflags"], @cairo_png.cflags) end def test_cflags_only_I + omit("this is known bug in 1.1.2") if PKGConfig::VERSION == "1.1.2" assert_pkg_config("cairo", ["--cflags-only-I"], @cairo.cflags_only_I) assert_pkg_config("cairo-png", ["--cflags-only-I"], @cairo_png.cflags_only_I) end