mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
3d056d084a
| Previous Name | New Name | |------------------------------|-------------------------| | MRB_ENABLE_ALL_SYMBOLS | MRB_USE_ALL_SYMBOLS | | MRB_ENABLE_SYMBOLL_ALL | MRB_USE_ALL_SYMBOLS | | MRB_ENABLE_CXX_ABI | MRB_USE_CXX_ABI | | MRB_ENABLE_CXX_EXCEPTION | MRB_USE_CXX_EXCEPTION | | MRB_ENABLE_DEBUG_HOOK | MRB_USE_DEBUG_HOOK | | MRB_DISABLE_DIRECT_THREADING | MRB_NO_DIRECT_THREADING | | MRB_DISABLE_STDIO | MRB_NO_STDIO | | ENABLE_LINENOISE | MRB_USE_LINENOISE | | ENABLE_READLINE | MRB_USE_READLINE | | DISABLE_MIRB_UNDERSCORE | MRB_NO_MIRB_UNDERSCORE | | DISABLE_GEMS | MRB_NO_GEMS | * `MRB_ENABLE_SYMBOLL_ALL` seems to be a typo, so it is fixed. * `MRB_` prefix is added to those without. * The previous names can also be used for compatibility.
43 lines
1.5 KiB
Ruby
43 lines
1.5 KiB
Ruby
MRuby::Gem::Specification.new('mruby-bin-mirb') do |spec|
|
|
spec.license = 'MIT'
|
|
spec.author = 'mruby developers'
|
|
spec.summary = 'mirb command'
|
|
|
|
if spec.build.cc.search_header_path 'readline/readline.h'
|
|
spec.cc.defines << "MRB_USE_READLINE"
|
|
if spec.build.cc.search_header_path 'termcap.h'
|
|
if MRUBY_BUILD_HOST_IS_CYGWIN || MRUBY_BUILD_HOST_IS_OPENBSD
|
|
if spec.build.cc.search_header_path 'termcap.h'
|
|
if MRUBY_BUILD_HOST_IS_CYGWIN then
|
|
spec.linker.libraries << 'ncurses'
|
|
else
|
|
spec.linker.libraries << 'termcap'
|
|
end
|
|
end
|
|
end
|
|
end
|
|
if RUBY_PLATFORM.include?('netbsd')
|
|
spec.linker.libraries << 'edit'
|
|
else
|
|
spec.linker.libraries << 'readline'
|
|
if RUBY_PLATFORM.include?('darwin')
|
|
# Workaround to build with Homebrew's readline on Mac (#4537)
|
|
lib_path = spec.build.cc.header_search_paths.find do |include_path|
|
|
lib_path = File.expand_path("#{include_path}/../lib")
|
|
break lib_path if File.exist?("#{lib_path}/libreadline.dylib") ||
|
|
File.exist?("#{lib_path}/libreadline.a")
|
|
end
|
|
spec.linker.library_paths << lib_path if lib_path
|
|
end
|
|
if spec.build.cc.search_header_path 'curses.h'
|
|
spec.linker.libraries << 'ncurses'
|
|
end
|
|
end
|
|
elsif spec.build.cc.search_header_path 'linenoise.h'
|
|
spec.cc.defines << "MRB_USE_LINENOISE"
|
|
end
|
|
|
|
spec.bins = %w(mirb)
|
|
spec.add_dependency('mruby-compiler', :core => 'mruby-compiler')
|
|
end
|