pkg-config 1.3.7 → 1.3.8

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: 4657b85e9f8971fcb4c962494770ad50f66f0517904e815f62a49b60bbced375
4
- data.tar.gz: fcd422845f64d152fa196a94a62b0d3c0136f2ca9dd1ab6f3beacbe692994dfc
3
+ metadata.gz: a47d4bf798e1d6eb5ad3c16fad3ab29dead0f05b2d41e39d98ecb3b3642ac6ea
4
+ data.tar.gz: 3ca7a21d13ffba40247e65134cbac57a07690c69312898af8e29fd5394616293
5
5
  SHA512:
6
- metadata.gz: ba1320c3c3f5f51ae3b5b51cf665d58d7c9f2c7b4fb384b329917d381d6dfc0f8908bf6408ddee6617c39cd5d3e96da4d6acf444852cfd805a883e45b7f2c5cd
7
- data.tar.gz: d05605e7648547cca52dbe9f0f474d84645b0d6905a7af766984c52818d346b23b5249cf20991f590430483dd65c2698fa9bee3d35430485d53b4be7e6490558
6
+ metadata.gz: 21d73b0dd4803571c903e01410c1d199297af2d3c17a5254197511285f1f1807875c70d819e06cc1b28a6158c715111be694aae997799432af1eb4c41e657aaf
7
+ data.tar.gz: 31a9e5bae18a521b65c6ba3b82cffb3197cd076e0318682b44b2f71c65dbd80fe40369ba09125ed3a4b2ad2ce1b9c39a11237922e798583fe94ed060bb329e06
data/NEWS CHANGED
@@ -1,5 +1,16 @@
1
1
  = NEWS
2
2
 
3
+ == 1.3.8 - 2019-08-13
4
+
5
+ === Improvements
6
+
7
+ * Added support for -framework on macOS.
8
+ [GitHub:ruby-gnome2/ruby-gnome2#1287][Reported by Viko]
9
+
10
+ === Thanks
11
+
12
+ * Viko
13
+
3
14
  == 1.3.7 - 2019-03-17
4
15
 
5
16
  === Improvements
@@ -293,8 +293,8 @@ class PackageConfig
293
293
  self.class.new(package, @options).libs
294
294
  end
295
295
  all_libs = [declaration("Libs")] + all_libs
296
- all_libs = all_libs.join(" ").gsub(/-([Ll]) /, '\1').split.uniq
297
- path_flags, other_flags = all_libs.partition {|flag| /\A-L/ =~ flag}
296
+ all_flags = split_lib_flags(all_libs.join(" "))
297
+ path_flags, other_flags = all_flags.partition {|flag| /\A-L/ =~ flag}
298
298
  path_flags = normalize_path_flags(path_flags, "-L")
299
299
  path_flags = path_flags.reject do |flag|
300
300
  /\A-L\/usr\/lib(?:64|x32)?\z/ =~ flag
@@ -314,6 +314,29 @@ class PackageConfig
314
314
  [path_flags, other_flags]
315
315
  end
316
316
 
317
+ def split_lib_flags(libs_command_line)
318
+ all_flags = {}
319
+ flags = []
320
+ in_option = false
321
+ libs_command_line.gsub(/-([Ll]) /, '\1').split.each do |arg|
322
+ if in_option
323
+ flags << arg
324
+ in_option = false
325
+ else
326
+ case arg
327
+ when /-[lL]/
328
+ next if all_flags.key?(arg)
329
+ all_flags[arg] = true
330
+ flags << arg
331
+ in_option = true
332
+ else
333
+ flags << arg
334
+ end
335
+ end
336
+ end
337
+ flags
338
+ end
339
+
317
340
  IDENTIFIER_RE = /[a-zA-Z\d_\.]+/
318
341
  def parse_pc
319
342
  raise ".pc for #{@name} doesn't exist." unless exist?
@@ -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.3.7"
18
+ VERSION = "1.3.8"
19
19
  end
@@ -36,10 +36,61 @@ class PkgConfigTest < Test::Unit::TestCase
36
36
  assert_pkg_config("cairo-png", ["--cflags-only-I"], @cairo_png.cflags_only_I)
37
37
  end
38
38
 
39
+ def split_lib_flags(libs_command_line)
40
+ @cairo.__send__(:split_lib_flags, libs_command_line)
41
+ end
42
+
43
+ def test_split_libs
44
+ assert_equal([
45
+ "-L/usr/local/Cellar/gtk+3/3.24.10/lib",
46
+ "-L/usr/local/Cellar/pango/1.44.3/lib",
47
+ "-L/usr/local/Cellar/harfbuzz/2.5.3/lib",
48
+ "-L/usr/local/Cellar/gdk-pixbuf/2.38.1_1/lib",
49
+ "-L/usr/local/Cellar/cairo/1.16.0_2/lib",
50
+ "-L/usr/local/Cellar/glib/2.60.6/lib",
51
+ "-L/usr/local/opt/gettext/lib",
52
+ "-lgdk-3",
53
+ "-framework", "Cocoa",
54
+ "-framework", "Carbon",
55
+ "-framework", "CoreGraphics",
56
+ "-lpangocairo-1.0",
57
+ "-lpango-1.0",
58
+ "-lharfbuzz",
59
+ "-lgdk_pixbuf-2.0",
60
+ "-lcairo-gobject",
61
+ "-lcairo",
62
+ "-lgobject-2.0",
63
+ "-lglib-2.0",
64
+ "-lintl"
65
+ ],
66
+ split_lib_flags("-L/usr/local/Cellar/gtk+3/3.24.10/lib " +
67
+ "-L/usr/local/Cellar/pango/1.44.3/lib " +
68
+ "-L/usr/local/Cellar/harfbuzz/2.5.3/lib " +
69
+ "-L/usr/local/Cellar/gdk-pixbuf/2.38.1_1/lib " +
70
+ "-L/usr/local/Cellar/cairo/1.16.0_2/lib " +
71
+ "-L/usr/local/Cellar/glib/2.60.6/lib " +
72
+ "-L/usr/local/opt/gettext/lib " +
73
+ "-lgdk-3 " +
74
+ "-framework Cocoa " +
75
+ "-framework Carbon " +
76
+ "-framework CoreGraphics " +
77
+ "-lpangocairo-1.0 " +
78
+ "-lpango-1.0 " +
79
+ "-lharfbuzz " +
80
+ "-lgdk_pixbuf-2.0 " +
81
+ "-lcairo-gobject " +
82
+ "-lcairo " +
83
+ "-lgobject-2.0 " +
84
+ "-lglib-2.0 " +
85
+ "-lintl"))
86
+ end
87
+
39
88
  def test_libs
40
89
  assert_pkg_config("cairo", ["--libs"], @cairo.libs)
41
90
  assert_pkg_config("cairo-png", ["--libs"], @cairo_png.libs)
91
+ end
42
92
 
93
+ def test_libs_msvc
43
94
  @cairo.msvc_syntax = true
44
95
  result = pkg_config("cairo", "--libs")
45
96
  msvc_result = result.gsub(/-lcairo\b/, "cairo.lib")
@@ -51,7 +102,9 @@ class PkgConfigTest < Test::Unit::TestCase
51
102
  def test_libs_only_l
52
103
  assert_pkg_config("cairo", ["--libs-only-l"], @cairo.libs_only_l)
53
104
  assert_pkg_config("cairo-png", ["--libs-only-l"], @cairo_png.libs_only_l)
105
+ end
54
106
 
107
+ def test_libs_only_l_msvc
55
108
  @cairo_png.msvc_syntax = true
56
109
  result = pkg_config("cairo-png", "--libs-only-l")
57
110
  msvc_result = result.gsub(/-l(cairo|png[0-9]+|z)\b/, '\1.lib')
@@ -62,7 +115,9 @@ class PkgConfigTest < Test::Unit::TestCase
62
115
  def test_libs_only_L
63
116
  assert_pkg_config("cairo", ["--libs-only-L"], @cairo.libs_only_L)
64
117
  assert_pkg_config("cairo-png", ["--libs-only-L"], @cairo_png.libs_only_L)
118
+ end
65
119
 
120
+ def test_libs_only_L_msvc
66
121
  @cairo_png.msvc_syntax = true
67
122
  result = pkg_config("cairo-png", "--libs-only-L")
68
123
  msvc_result = result.gsub(/-L/, '/libpath:')
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.3.7
4
+ version: 1.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-17 00:00:00.000000000 Z
11
+ date: 2019-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  version: '0'
91
91
  requirements: []
92
92
  rubyforge_project:
93
- rubygems_version: 2.7.6
93
+ rubygems_version: 2.7.6.2
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: A pkg-config implementation for Ruby