pkg-config 1.5.1 → 1.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c90e9d9dd81d99b7fd6412e1befe74deaabf67d3c181d50261846a2da0fe9d43
4
- data.tar.gz: 9dd90a3ffc4e140bce369c8b45ba0c34ba8f3ccea6f0a49ce884b8ba6a2d9825
3
+ metadata.gz: 02f5ffc55f6c6be0c817f99382bf952d6034409f5739b028df92ca7c14df81c2
4
+ data.tar.gz: dff862614b13e2f884baa5d97769cce3fda34045d70f4edd7ce909eaaf14b529
5
5
  SHA512:
6
- metadata.gz: de054c89cbe328715e28258636442959dfbca1c859e1fbff4f076bd945e019ced3aa0515f69cdb470288c76811b2d0138293b65398470acc24415c4631f298bc
7
- data.tar.gz: a5414ffd42e1bc9cdde74df9ae83689473c9799ef7b6606ee9bb02379017b42db93b5d80f550820f9cea9befddd2a3402cf65435290b0f78db578c55480b9c00
6
+ metadata.gz: 35d5915bb0394db4eedea0c7cec0f527678cca9d77ecf709aa40b764f1fcc05c51e9c9dfb916d318d800890659f4249c81e16ef92bc21edd61c620629e38208f
7
+ data.tar.gz: 9bd75f5f78dd824aae20e96ff2f8e4aa221c2310d6464db465b2ae2fd319fb2969ac916659d9b22363f31220ce832a5c75bb2e552bd55d69766fa4b76b5c2d61
data/NEWS CHANGED
@@ -1,5 +1,44 @@
1
1
  = NEWS
2
2
 
3
+ == 1.5.6 - 2023-11-19
4
+
5
+ === Improvements
6
+
7
+ * Added support for "<" and ">" operators in "Requires:".
8
+
9
+ GH-23
10
+
11
+ Patch by Daisuke Fujimura
12
+
13
+ === Thanks
14
+
15
+ * Daisuke Fujimura
16
+
17
+ == 1.5.5 - 2023-09-05
18
+
19
+ === Fixes
20
+
21
+ * Fixed a bug in 1.5.4 that success detection doesn't work.
22
+
23
+ == 1.5.4 - 2023-09-05
24
+
25
+ === Improvements
26
+
27
+ * Added package version to unsatisfied version is only found case.
28
+
29
+ == 1.5.3 - 2023-08-29
30
+
31
+ === Improvements
32
+
33
+ * Accepted spaces between "=" and ":". For example, "prefix = /usr"
34
+ is accepted.
35
+
36
+ == 1.5.2 - 2023-06-25
37
+
38
+ === Improvements
39
+
40
+ * Added support for conda.
41
+
3
42
  == 1.5.1 - 2022-11-23
4
43
 
5
44
  === Improvements
@@ -1,4 +1,4 @@
1
- # Copyright 2012-2022 Sutou Kouhei <kou@cozmixng.org>
1
+ # Copyright 2012-2023 Sutou Kouhei <kou@cozmixng.org>
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or
4
4
  # modify it under the terms of the GNU Lesser General Public
@@ -15,5 +15,5 @@
15
15
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
  module PKGConfig
18
- VERSION = "1.5.1"
18
+ VERSION = "1.5.6"
19
19
  end
data/lib/pkg-config.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright 2008-2022 Sutou Kouhei <kou@cozmixng.org>
1
+ # Copyright 2008-2023 Sutou Kouhei <kou@cozmixng.org>
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or
4
4
  # modify it under the terms of the GNU Lesser General Public
@@ -170,6 +170,10 @@ class PackageConfig
170
170
  default_paths << (pkg_config_prefix + "libdata/pkgconfig").to_s
171
171
  default_paths << (pkg_config_prefix + "share/pkgconfig").to_s
172
172
  end
173
+ conda_prefix = ENV["CONDA_PREFIX"]
174
+ if conda_prefix
175
+ default_paths << File.join(conda_prefix, "lib", "pkgconfig")
176
+ end
173
177
  default_paths << "/usr/local/lib64/pkgconfig"
174
178
  default_paths << "/usr/local/libx32/pkgconfig"
175
179
  default_paths << "/usr/local/lib/pkgconfig"
@@ -505,9 +509,9 @@ class PackageConfig
505
509
  line = line.gsub(/#.*/, "").strip
506
510
  next if line.empty?
507
511
  case line
508
- when /^(#{IDENTIFIER_RE})=/
512
+ when /^(#{IDENTIFIER_RE})\s*=\s*/
509
513
  @variables[$1] = $POSTMATCH.strip
510
- when /^(#{IDENTIFIER_RE}):/
514
+ when /^(#{IDENTIFIER_RE})\s*:\s*/
511
515
  @declarations[$1] = $POSTMATCH.strip
512
516
  end
513
517
  end
@@ -516,7 +520,7 @@ class PackageConfig
516
520
 
517
521
  def parse_requires(requires)
518
522
  return [] if requires.nil?
519
- requires_without_version = requires.gsub(/[<>]?=\s*[\d.a-zA-Z_-]+\s*/, "")
523
+ requires_without_version = requires.gsub(/(?:<|>|<=|>=|=)\s*[\d.a-zA-Z_-]+\s*/, "")
520
524
  requires_without_version.split(/[,\s]+/)
521
525
  end
522
526
 
@@ -640,10 +644,14 @@ module PKGConfig
640
644
  if check_version?(pkg, major, minor, micro)
641
645
  "yes (#{modversion(pkg)})"
642
646
  else
643
- "no"
647
+ if exist?(pkg)
648
+ "no (#{modversion(pkg)}"
649
+ else
650
+ "no (nonexistent)"
651
+ end
644
652
  end
645
653
  end
646
- enough_version = (result != "no")
654
+ enough_version = result.start_with?("yes")
647
655
  if enough_version
648
656
  libraries = libs_only_l(pkg)
649
657
  dldflags = libs(pkg)
@@ -237,5 +237,30 @@ class PkgConfigTest < Test::Unit::TestCase
237
237
  assert_equal(["fribidi"],
238
238
  parse_requires("fribidi >= fribidi_required_dep"))
239
239
  end
240
+
241
+ def test_greater_than_or_equals_to
242
+ assert_equal(["fribidi"],
243
+ parse_requires("fribidi >= 1.0"))
244
+ end
245
+
246
+ def test_greater_than
247
+ assert_equal(["fribidi"],
248
+ parse_requires("fribidi > 1.0"))
249
+ end
250
+
251
+ def test_less_than_or_equals_to
252
+ assert_equal(["fribidi"],
253
+ parse_requires("fribidi <= 1.0"))
254
+ end
255
+
256
+ def test_less_than
257
+ assert_equal(["fribidi"],
258
+ parse_requires("fribidi < 1.0"))
259
+ end
260
+
261
+ def test_equals_to
262
+ assert_equal(["fribidi"],
263
+ parse_requires("fribidi = 1.0"))
264
+ end
240
265
  end
241
266
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pkg-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-23 00:00:00.000000000 Z
11
+ date: 2023-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit
@@ -89,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  requirements: []
92
- rubygems_version: 3.4.0.dev
92
+ rubygems_version: 3.5.0.dev
93
93
  signing_key:
94
94
  specification_version: 4
95
95
  summary: A pkg-config implementation for Ruby