Imported Upstream version 1.1.7

parent 2218ea1a
/pkg/
/doc/
/Gemfile.lock
rvm:
- 1.8.7
- 1.9.3
- rbx
- ree
- jruby
- ruby-head
notifications:
recipients:
- kou@cozmixng.org
# -*- mode: ruby; coding: utf-8 -*-
#
# Copyright (C) 2011 Kouhei Sutou <kou@clear-code.com>
# Copyright (C) 2011-2013 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
......@@ -13,8 +13,8 @@
#
# 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
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
source :rubygems
source "https://rubygems.org/"
gemspec
= NEWS
== 1.1.7 - 2015-01-16
* Added path for FreeBSD to default paths.
[Reported by Hajime UMEMOTO]
=== Thanks
* Hajime UMEMOTO
== 1.1.6 - 2014/11/12
* Supported Ruby 2.1.
[GitHub:ruby-gnome2/ruby-gnome2#262][Reported by Steve Wills]
=== Thanks
* Steve Wills
== 1.1.5 - 2013/12/29
* Supported XQuartz.
[GitHub:#10][Patch by Masafumi Yokoyama]
=== Thanks
* Masafumi Yokoyama
== 1.1.4 - 2012/08/02
* Supported mswin64 as MSVC environment.
......
......@@ -47,7 +47,7 @@ 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
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
See LGPL-2.1 file for details.
......
......@@ -14,7 +14,7 @@
#
# 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
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
task :default => :test
......
# Copyright 2008-2011 Kouhei Sutou <kou@cozmixng.org>
# Copyright 2008-2016 Kouhei Sutou <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
......@@ -12,7 +12,7 @@
#
# 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
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
begin
require "pkg-config/version"
......@@ -90,7 +90,11 @@ class PackageConfig
rescue DL::DLError
return nil
end
extern "const char *dln_find_exe(const char *, const char *)"
begin
extern "const char *dln_find_exe(const char *, const char *)"
rescue DL::DLError
return nil
end
end
path = dln.dln_find_exe(pkg_config.to_s, nil)
if path.nil? or path.size.zero?
......@@ -192,12 +196,13 @@ class PackageConfig
private
def collect_cflags
all_cflags = all_required_packages.collect do |package|
cflags_set = [declaration("Cflags")]
cflags_set += all_required_packages.collect do |package|
self.class.new(package, @options).cflags
end
all_cflags = [declaration("Cflags")] + all_cflags
all_cflags = all_cflags.join(" ").gsub(/-I /, '-I').split.uniq
all_cflags = normalize_cflags(Shellwords.split(cflags_set.join(" ")))
path_flags, other_flags = all_cflags.partition {|flag| /\A-I/ =~ flag}
path_flags = remove_duplicated_include_paths(path_flags)
path_flags = path_flags.reject do |flag|
flag == "-I/usr/include"
end
......@@ -209,6 +214,27 @@ class PackageConfig
[path_flags, other_flags]
end
def normalize_cflags(cflags)
normalized_cflags = []
enumerator = cflags.to_enum
begin
loop do
cflag = enumerator.next
normalized_cflags << cflag
case cflag
when "-I"
normalized_cflags << enumerator.next
end
end
rescue StopIteration
end
normalized_cflags
end
def remove_duplicated_include_paths(path_flags)
path_flags.uniq
end
def collect_libs
all_libs = required_packages.collect do |package|
self.class.new(package, @options).libs
......@@ -277,16 +303,20 @@ class PackageConfig
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",
arch_depended_path,
"/usr/lib64/pkgconfig",
"/usr/lib/pkgconfig",
"/usr/X11/lib/pkgconfig/",
"/opt/X11/lib/pkgconfig/",
"/usr/share/pkgconfig"].join(SEPARATOR)
default_paths = [
"/usr/local/lib64/pkgconfig",
"/usr/local/lib/pkgconfig",
"/usr/local/libdata/pkgconfig",
"/opt/local/lib/pkgconfig",
arch_depended_path,
"/usr/lib64/pkgconfig",
"/usr/lib/pkgconfig",
"/usr/libdata/pkgconfig",
"/usr/X11/lib/pkgconfig",
"/opt/X11/lib/pkgconfig",
"/usr/share/pkgconfig",
]
default_path = default_paths.join(SEPARATOR)
libdir = ENV["PKG_CONFIG_LIBDIR"]
default_path = [libdir, default_path].join(SEPARATOR) if libdir
......
# Copyright 2012 Kouhei Sutou <kou@cozmixng.org>
# Copyright 2012-2013 Kouhei Sutou <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
......@@ -12,8 +12,8 @@
#
# 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
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
module PKGConfig
VERSION = "1.1.5"
VERSION = "1.1.7"
end
--- !ruby/object:Gem::Specification
name: pkg-config
version: !ruby/object:Gem::Version
version: 1.1.7
platform: ruby
authors:
- Kouhei Sutou
autorequire:
bindir: bin
cert_chain: []
date: 2016-01-06 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: test-unit
requirement: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
- !ruby/object:Gem::Dependency
name: rake
requirement: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
- !ruby/object:Gem::Dependency
name: bundler
requirement: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
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: []
files:
- Gemfile
- LGPL-2.1
- NEWS
- README.rdoc
- Rakefile
- lib/pkg-config.rb
- lib/pkg-config/version.rb
- test/run-test.rb
- test/test_pkg_config.rb
homepage: https://github.com/ruby-gnome2/pkg-config
licenses:
- LGPLv2+
metadata: {}
post_install_message:
rdoc_options: []
require_paths:
- lib
required_ruby_version: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
required_rubygems_version: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
requirements: []
rubyforge_project: cairo
rubygems_version: 2.4.5.1
signing_key:
specification_version: 4
summary: A pkg-config implementation for Ruby
test_files:
- test/run-test.rb
- test/test_pkg_config.rb
has_rdoc:
# -*- mode: ruby; coding: utf-8 -*-
#
# Copyright (C) 2010-2012 Kouhei Sutou <kou@clear-code.com>
#
# 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.
#
# 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
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "lib"))
require "pkg-config/version"
Gem::Specification.new do |spec|
spec.name = "pkg-config"
spec.version = PKGConfig::VERSION
spec.rubyforge_project = "cairo"
spec.homepage = "https://github.com/rcairo/pkg-config"
spec.authors = ["Kouhei Sutou"]
spec.email = ["kou@cozmixng.org"]
spec.summary = 'A pkg-config implementation for Ruby'
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 = ["README.rdoc", "NEWS", "Gemfile", "Rakefile", "LGPL-2.1"]
spec.files += Dir.glob("lib/**/*.rb")
spec.test_files = Dir.glob("test/**/*.rb")
spec.add_development_dependency("test-unit")
spec.add_development_dependency("test-unit-notify")
spec.add_development_dependency("rake")
spec.add_development_dependency("bundler")
end
......@@ -12,10 +12,5 @@ require "bundler/setup"
require 'test-unit'
$LOAD_PATH.unshift(lib_dir)
$LOAD_PATH.unshift(test_dir)
Dir.glob("test/**/test_*.rb") do |file|
require file.gsub(/(?:^test\/|\.rb$)/, '')
end
exit Test::Unit::AutoRunner.run(false)
exit Test::Unit::AutoRunner.run(true)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment