ffi-yajl 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: 0ea13f5cd3d083b7f3eb9e37fd096aac99084e85
4
- data.tar.gz: 5503b294adb725c70a1f8645bde0269ea4892f9d
3
+ metadata.gz: 7fc1e4d856cb2a0f70f69d21fb2480e6c81cd602
4
+ data.tar.gz: 8d058ff7aa83ba76370f0955182e673a1e76f94a
5
5
  SHA512:
6
- metadata.gz: b9d92fad2aa9af3192db242f555defc51d5fef487a7a0beda40c484ce1ce539e9119353554692dc36f309a294a91402b78b950faa2bba034a9d7addf4729df4e
7
- data.tar.gz: b88476c6397cc61936ff10fa4c690ad0eabaf81e6f4ef9ef136611d75a476c0f18b66784f07df9e95e9f1a6d8fff3d42be1f209098ec379391ef62c0df0127a4
6
+ metadata.gz: 19a465ce3288cce49d3f9a7828d6b4f9081238d7b88340f2822413af3afa207d61ac18bcd610b9b445f3b072c29de30232cb67f73be684781daf2cf4bb1c7afd
7
+ data.tar.gz: 66485e276cfa5ff2e0581c663ca2544d110c1ecae0e0d1dc1aa9fb4b706c23db818e5b85166154805053925a0403d42c0f5a6e47ced5e059bda8ec0b6b0cc258
@@ -2,14 +2,11 @@ require 'mkmf'
2
2
  require 'rubygems'
3
3
  require 'libyajl2'
4
4
 
5
- # the customer is always right, ruby is always compiled to be stupid
6
- $CFLAGS = ENV['CFLAGS'] if ENV['CFLAGS']
7
- $LDFLAGS = ENV['LDFLAGS'] if ENV['LDFLAGS']
8
5
  RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
9
6
 
10
7
  # pick up the vendored libyajl2 out of the libyajl2 gem
11
- $CFLAGS = "-I#{Libyajl2.include_path} -L#{Libyajl2.opt_path} #{$CFLAGS}"
12
- $LDFLAGS = "-L#{Libyajl2.opt_path} #{$LDFLAGS}"
8
+ $CFLAGS = " -I#{Libyajl2.include_path} #{$CFLAGS}"
9
+ $LDFLAGS = " -L#{Libyajl2.opt_path} #{$LDFLAGS}"
13
10
 
14
11
  puts $CFLAGS
15
12
  puts $LDFLAGS
@@ -22,7 +19,14 @@ if RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc|clang/
22
19
  $CFLAGS << " -Wall"
23
20
  end
24
21
 
25
- #$LDFLAGS << " -lyajl"
22
+ def windows?
23
+ !!(RUBY_PLATFORM =~ /mswin|mingw|windows/)
24
+ end
25
+
26
+ if windows?
27
+ # include our libyajldll.a definitions on windows in the libyajl2 gem
28
+ $libs = "#{$libs} -lyajldll"
29
+ end
26
30
 
27
31
  dir_config 'encoder'
28
32
 
@@ -2,13 +2,10 @@ require 'mkmf'
2
2
  require 'rubygems'
3
3
  require 'libyajl2'
4
4
 
5
- # the customer is always right, ruby is always compiled to be stupid
6
- $CFLAGS = ENV['CFLAGS'] if ENV['CFLAGS']
7
- $LDFLAGS = ENV['LDFLAGS'] if ENV['LDFLAGS']
8
5
  RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
9
6
 
10
7
  # pick up the vendored libyajl2 out of the libyajl2 gem
11
- $CFLAGS = "-I#{Libyajl2.include_path} -L#{Libyajl2.opt_path} #{$CFLAGS}"
8
+ $CFLAGS = "-I#{Libyajl2.include_path} #{$CFLAGS}"
12
9
  $LDFLAGS = "-L#{Libyajl2.opt_path} #{$LDFLAGS}"
13
10
 
14
11
  puts $CFLAGS
@@ -22,7 +19,14 @@ if RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc|clang/
22
19
  $CFLAGS << " -Wall"
23
20
  end
24
21
 
25
- #$LDFLAGS << " -lyajl"
22
+ def windows?
23
+ !!(RUBY_PLATFORM =~ /mswin|mingw|windows/)
24
+ end
25
+
26
+ if windows?
27
+ # include our libyajldll.a definitions on windows in the libyajl2 gem
28
+ $libs = "#{$libs} -lyajldll"
29
+ end
26
30
 
27
31
  dir_config 'parser'
28
32
 
@@ -1,3 +1,3 @@
1
1
  module FFI_Yajl
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-yajl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lamont Granquist
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-20 00:00:00.000000000 Z
11
+ date: 2014-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake