mgem 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/bin/mgem +44 -10
  2. metadata +2 -2
data/bin/mgem CHANGED
@@ -61,21 +61,55 @@ elsif ARGV[0] == 'update'
61
61
  puts "#{new_gems} new GEMs!"
62
62
  end
63
63
  elsif ARGV[0] == 'config'
64
- puts <<__CONFIG__
65
- MRuby::Build.new do |conf|
66
- conf.cc = ENV['CC'] || 'gcc'
67
- conf.ld = ENV['LD'] || 'gcc'
68
- conf.ar = ENV['AR'] || 'ar'
64
+ puts <<__TOOLCHAIN_SELECT__
65
+
66
+ Please choose your toolchain:
67
+ 'gcc' for GNU Compiler Collection
68
+ 'clang' for LLVM C Compiler
69
+ 'vs' for Visual Studio 2012 on Windows
69
70
 
70
- conf.cflags << (ENV['CFLAGS'] || %w(-g -O3 -Wall -Werror-implicit-function-declaration))
71
- conf.ldflags << (ENV['LDFLAGS'] || %w(-lm))
71
+ __TOOLCHAIN_SELECT__
72
+
73
+ print 'Toolchain: '
74
+ STDOUT.flush
75
+ toolchain = case STDIN.gets.chomp
76
+ when 'vs'
77
+ 'vs2012'
78
+ when 'clang'
79
+ 'clang'
80
+ when 'gcc'
81
+ 'gcc'
82
+ else
83
+ puts <<__ERROR__
72
84
 
73
- #{
74
- gems.active.map do |g|
85
+ Your input "#{toolchain}" wasn't valid.
86
+ Fallback to GCC toolchain!
87
+ __ERROR__
88
+
89
+ 'gcc'
90
+ end
91
+
92
+ gem_command = gems.active.map do |g|
75
93
  " conf.gem :git => \'#{g.repository}\'"
76
94
  end.join("\n")
77
- }
95
+
96
+ if gem_command == ''
97
+ gem_command = ' # No GEMs activated'
98
+ end
99
+
100
+ puts <<__CONFIG__
101
+
102
+ ############################
103
+ # Start of your build_config
104
+
105
+ MRuby::Build.new do |conf|
106
+ toolchain :#{toolchain}
107
+
108
+ #{gem_command}
78
109
  end
110
+
111
+ # End of your build_config
112
+ ############################
79
113
  __CONFIG__
80
114
  else
81
115
  puts <<INFO
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: mgem
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Bovensiepen
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-12 00:00:00.000000000 Z
12
+ date: 2013-01-21 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: mgem helps you search and find GEMs specifically written for mruby. It also supports by creating a mruby build configuration.
15
15
  email: daniel@bovensiepen.net