Class Index [+]

Quicksearch

PKGConfig

Constants

VERSION

Public Instance Methods

add_path(path) click to toggle source
     # File lib/pkg-config.rb, line 299
299:   def add_path(path)
300:     @@paths << path
301:   end
cflags(pkg) click to toggle source
     # File lib/pkg-config.rb, line 334
334:   def cflags(pkg)
335:     package_config(pkg).cflags
336:   end
cflags_only_I(pkg) click to toggle source
     # File lib/pkg-config.rb, line 338
338:   def cflags_only_I(pkg)
339:     package_config(pkg).cflags_only_I
340:   end
check_version?(pkg, major = 0, minor = 0, micro = 0) click to toggle source
     # File lib/pkg-config.rb, line 354
354:   def check_version?(pkg, major = 0, minor = 0, micro = 0)
355:     return false unless exist?(pkg)
356:     ver = modversion(pkg).split(".").collect{|item| item.to_i}
357:     (0..2).each {|i| ver[i] = 0 unless ver[i]}
358: 
359:     (ver[0] > major ||
360:      (ver[0] == major && ver[1] > minor) ||
361:      (ver[0] == major && ver[1] == minor &&
362:       ver[2] >= micro))
363:   end
description(pkg) click to toggle source
     # File lib/pkg-config.rb, line 346
346:   def description(pkg)
347:     package_config(pkg).description
348:   end
exist?(pkg) click to toggle source
     # File lib/pkg-config.rb, line 318
318:   def exist?(pkg)
319:     package_config(pkg).exist?
320:   end
have_package(pkg, major = nil, minor = 0, micro = 0) click to toggle source
     # File lib/pkg-config.rb, line 365
365:   def have_package(pkg, major = nil, minor = 0, micro = 0)
366:     message = "#{pkg}"
367:     unless major.nil?
368:       message << " version (>= #{major}.#{minor}.#{micro})"
369:     end
370:     major ||= 0
371:     enough_version = checking_for(checking_message(message)) do
372:       check_version?(pkg, major, minor, micro)
373:     end
374:     if enough_version
375:       libraries = libs_only_l(pkg)
376:       dldflags = libs(pkg)
377:       dldflags = (Shellwords.shellwords(dldflags) -
378:                   Shellwords.shellwords(libraries))
379:       dldflags = dldflags.map {|s| /\s/ =~ s ? "\"#{s}\"" : s }.join(' ')
380:       $libs   += ' ' + libraries
381:       if /mswin32/ =~ RUBY_PLATFORM
382:         $DLDFLAGS += ' ' + dldflags
383:       else
384:         $LDFLAGS += ' ' + dldflags
385:       end
386:       $CFLAGS += ' ' + cflags(pkg)
387:     end
388:     enough_version
389:   end
libs(pkg) click to toggle source
     # File lib/pkg-config.rb, line 322
322:   def libs(pkg)
323:     package_config(pkg).libs
324:   end
libs_only_L(pkg) click to toggle source
     # File lib/pkg-config.rb, line 330
330:   def libs_only_L(pkg)
331:     package_config(pkg).libs_only_L
332:   end
libs_only_l(pkg) click to toggle source
     # File lib/pkg-config.rb, line 326
326:   def libs_only_l(pkg)
327:     package_config(pkg).libs_only_l
328:   end
modversion(pkg) click to toggle source
     # File lib/pkg-config.rb, line 342
342:   def modversion(pkg)
343:     package_config(pkg).version
344:   end
msvc?() click to toggle source
     # File lib/pkg-config.rb, line 307
307:   def msvc?
308:     /mswin32/.match(RUBY_PLATFORM) and /^cl\b/.match(Config::CONFIG['CC'])
309:   end
package_config(package) click to toggle source
     # File lib/pkg-config.rb, line 311
311:   def package_config(package)
312:     PackageConfig.new(package,
313:                       :msvc_syntax => msvc?,
314:                       :override_variables => @@override_variables,
315:                       :paths => @@paths)
316:   end
set_override_variable(key, value) click to toggle source
     # File lib/pkg-config.rb, line 303
303:   def set_override_variable(key, value)
304:     @@override_variables[key] = value
305:   end
variable(pkg, name) click to toggle source
     # File lib/pkg-config.rb, line 350
350:   def variable(pkg, name)
351:     package_config(pkg).variable(name)
352:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.