ffi 1.7.0.dev → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of ffi might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Rakefile +27 -32
- data/ffi.gemspec +3 -2
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 08d9e4bd775b810d8ca6541f51491d4cf12301b8
|
4
|
+
data.tar.gz: c641ccba1fcb08a552d8b9d27faeef47e254c287
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58cbea900c076f8091b8b5146610a7e313faa73b131c2822d3fb78dab6c6f3aed0d68227921f36570c91875229eaa92eda067eac1d1fa9dd8a927277fb5b86d7
|
7
|
+
data.tar.gz: 12f5440b92613fbdd0a74f0865750f6edad8e1f95470dae0f1c506e9b696028faad1c7d420ffcefc3b8e8667877c5b852ada95534e125486513d1f9fb87ea33d
|
data/Rakefile
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rubygems/package_task'
|
3
|
+
require 'rubygems/tasks'
|
3
4
|
require 'rbconfig'
|
4
5
|
|
5
6
|
USE_RAKE_COMPILER = (RUBY_PLATFORM =~ /java/) ? false : true
|
@@ -64,8 +65,6 @@ OS = case RbConfig::CONFIG['host_os'].downcase
|
|
64
65
|
RbConfig::CONFIG['host_os'].downcase
|
65
66
|
end
|
66
67
|
|
67
|
-
CC = ENV['CC'] || RbConfig::CONFIG['CC'] || "gcc"
|
68
|
-
|
69
68
|
GMAKE = system('which gmake >/dev/null') && 'gmake' || 'make'
|
70
69
|
|
71
70
|
LIBTEST = "build/libtest.#{LIBEXT}"
|
@@ -76,12 +75,6 @@ def gem_spec
|
|
76
75
|
@gem_spec ||= Gem::Specification.load('ffi.gemspec')
|
77
76
|
end
|
78
77
|
|
79
|
-
Gem::PackageTask.new(gem_spec) do |pkg|
|
80
|
-
pkg.need_zip = true
|
81
|
-
pkg.need_tar = true
|
82
|
-
pkg.package_dir = 'pkg'
|
83
|
-
end
|
84
|
-
|
85
78
|
TEST_DEPS = [ LIBTEST ]
|
86
79
|
if RUBY_PLATFORM == "java"
|
87
80
|
desc "Run all specs"
|
@@ -109,25 +102,15 @@ end
|
|
109
102
|
desc "Build all packages"
|
110
103
|
task :package => 'gem:package'
|
111
104
|
|
112
|
-
desc "Install the gem locally"
|
113
|
-
task :install => 'gem:install'
|
114
105
|
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
desc "Clean all built files"
|
122
|
-
task :distclean => :clobber do
|
123
|
-
FileUtils.rm_rf('build')
|
124
|
-
FileUtils.rm_rf(Dir["lib/**/ffi_c.#{RbConfig::CONFIG['DLEXT']}"])
|
125
|
-
FileUtils.rm_rf(Dir["lib/**/ffi_c.so"])
|
126
|
-
FileUtils.rm_rf('lib/ffi/types.conf')
|
127
|
-
FileUtils.rm_rf('conftest.dSYM')
|
128
|
-
FileUtils.rm_rf('pkg')
|
129
|
-
end
|
106
|
+
CLOBBER.include 'build'
|
107
|
+
CLOBBER.include FileList['lib/**/ffi_c.so']
|
108
|
+
CLOBBER.include FileList["lib/**/ffi_c.#{RbConfig::CONFIG['DLEXT']}"]
|
109
|
+
CLOBBER.include 'lib/ffi/types.conf'
|
110
|
+
CLOBBER.include 'conftest.dSYM'
|
111
|
+
CLOBBER.include 'pkg'
|
130
112
|
|
113
|
+
task :distclean => :clobber
|
131
114
|
|
132
115
|
desc "Build the native test lib"
|
133
116
|
file "build/libtest.#{LIBEXT}" => FileList['libtest/**/*.[ch]'] do
|
@@ -200,18 +183,30 @@ if USE_RAKE_COMPILER
|
|
200
183
|
# ext.lib_dir = BUILD_DIR # put binaries into this folder.
|
201
184
|
ext.tmp_dir = BUILD_DIR # temporary folder used during compilation.
|
202
185
|
ext.cross_compile = true # enable cross compilation (requires cross compile toolchain)
|
203
|
-
ext.cross_platform =
|
186
|
+
ext.cross_platform = %w[i386-mingw32 x64-mingw32] # forces the Windows platform instead of the default one
|
204
187
|
end
|
205
188
|
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
189
|
+
ENV['RUBY_CC_VERSION'].to_s.split(':').each do |ruby_version|
|
190
|
+
task "copy:ffi_c:i386-mingw32:#{ruby_version}" do |t|
|
191
|
+
%w[lib #{BUILD_DIR}/i386-mingw32/stage/lib].each do |dir|
|
192
|
+
if File.exists?("#{dir}/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so")
|
193
|
+
sh "i686-w64-mingw32-strip -S #{dir}/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so"
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
task "copy:ffi_c:x64-mingw32:#{ruby_version}" do |t|
|
199
|
+
if File.exists?("#{BUILD_DIR}/x64-mingw32/stage/lib/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so")
|
200
|
+
sh "x86_64-w64-mingw32-strip -S #{dir}/#{ruby_version[/^\d+\.\d+/]}/ffi_c.so"
|
201
|
+
end
|
202
|
+
end
|
212
203
|
end
|
213
204
|
end
|
214
205
|
|
206
|
+
Gem::Tasks.new do |t|
|
207
|
+
t.scm.tag.format = '%s'
|
208
|
+
end
|
209
|
+
|
215
210
|
begin
|
216
211
|
require 'yard'
|
217
212
|
|
data/ffi.gemspec
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'ffi'
|
3
|
-
s.version = '1.7.0
|
3
|
+
s.version = '1.7.0'
|
4
4
|
s.author = 'Wayne Meissner'
|
5
5
|
s.email = 'wmeissner@gmail.com'
|
6
6
|
s.homepage = 'http://wiki.github.com/ffi/ffi'
|
7
7
|
s.summary = 'Ruby FFI'
|
8
8
|
s.description = 'Ruby FFI library'
|
9
|
-
s.files = %w(ffi.gemspec History.txt LICENSE COPYING COPYING.LESSER README.md Rakefile) + Dir.glob("{ext,gen,lib,spec,libtest}/**/*").reject { |f| f =~ /lib\/
|
9
|
+
s.files = %w(ffi.gemspec History.txt LICENSE COPYING COPYING.LESSER README.md Rakefile) + Dir.glob("{ext,gen,lib,spec,libtest}/**/*").reject { |f| f =~ /lib\/[12]\.[089]/}
|
10
10
|
s.extensions << 'ext/ffi_c/extconf.rb'
|
11
11
|
s.has_rdoc = false
|
12
12
|
s.rdoc_options = %w[--exclude=ext/ffi_c/.*\.o$ --exclude=ffi_c\.(bundle|so)$]
|
@@ -16,4 +16,5 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.add_development_dependency 'rake'
|
17
17
|
s.add_development_dependency 'rake-compiler', '>=0.6.0'
|
18
18
|
s.add_development_dependency 'rspec'
|
19
|
+
s.add_development_dependency 'rubygems-tasks'
|
19
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.0
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wayne Meissner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubygems-tasks
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: Ruby FFI library
|
56
70
|
email: wmeissner@gmail.com
|
57
71
|
executables: []
|
@@ -514,9 +528,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
514
528
|
version: 1.8.7
|
515
529
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
516
530
|
requirements:
|
517
|
-
- - '
|
531
|
+
- - '>='
|
518
532
|
- !ruby/object:Gem::Version
|
519
|
-
version:
|
533
|
+
version: '0'
|
520
534
|
requirements: []
|
521
535
|
rubyforge_project:
|
522
536
|
rubygems_version: 2.0.0
|