-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmrbgem.rake
More file actions
36 lines (31 loc) · 810 Bytes
/
Copy pathmrbgem.rake
File metadata and controls
36 lines (31 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
require 'mkmf'
# patch for old mkmf bug
if Gem::Version.create(RUBY_VERSION) <= Gem::Version.create('1.9.3')
def try_link(src, opt = '', *opts, &b)
try_link0(src, opt, *opts, &b)
ensure
rm_f ['conftest*', 'c0x32*']
end
end
# patch end
build_extconf = lambda do |fn|
return if File.exist?(fn)
# TODO
# if open this block
# raise error: redefinition of 'struct timespec'
# in windows
if RUBY_PLATFORM !~ /mingw|mswin/
have_func 'setresuid'
have_func 'setreuid'
have_func 'setruid'
have_func 'setuid'
end
create_header fn
end
MRuby::Gem::Specification.new('mruby-process-ext') do |spec|
spec.license = 'MIT'
spec.author = 'ksss <co000ri@gmail.com>'
FileUtils.mkdir_p build_dir
build_extconf["#{build_dir}/extconf.h"]
cc.include_paths << build_dir
end