gecoder-with-gecode 0.7.1-mswin32 → 0.8.0-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +7 -0
- data/README +10 -1
- data/lib/gecode.dll +0 -0
- data/lib/gecoder/bindings/bindings.rb +407 -731
- data/lib/gecoder/interface/binding_changes.rb +1 -1
- data/lib/gecoder/interface/branch.rb +25 -25
- data/lib/gecoder/interface/constraints.rb +47 -4
- data/lib/gecoder/interface/constraints/bool/boolean.rb +18 -16
- data/lib/gecoder/interface/constraints/bool_enum/boolean.rb +13 -11
- data/lib/gecoder/interface/constraints/int/arithmetic.rb +5 -4
- data/lib/gecoder/interface/constraints/int/domain.rb +8 -9
- data/lib/gecoder/interface/constraints/int/linear.rb +10 -8
- data/lib/gecoder/interface/constraints/int_enum/arithmetic.rb +4 -4
- data/lib/gecoder/interface/constraints/int_enum/channel.rb +2 -2
- data/lib/gecoder/interface/constraints/int_enum/count.rb +4 -5
- data/lib/gecoder/interface/constraints/int_enum/distinct.rb +7 -2
- data/lib/gecoder/interface/constraints/int_enum/element.rb +2 -2
- data/lib/gecoder/interface/constraints/int_enum/equality.rb +6 -3
- data/lib/gecoder/interface/constraints/int_enum/sort.rb +17 -5
- data/lib/gecoder/interface/constraints/set_enum/distinct.rb +0 -36
- data/lib/gecoder/interface/constraints/set_var_constraints.rb +5 -0
- data/lib/gecoder/interface/model.rb +3 -3
- data/lib/gecoder/interface/search.rb +5 -4
- data/lib/gecoder/version.rb +1 -1
- data/specs/branch.rb +27 -27
- data/specs/constraints/arithmetic.rb +48 -30
- data/specs/constraints/bool_enum.rb +39 -19
- data/specs/constraints/boolean.rb +10 -10
- data/specs/constraints/cardinality.rb +12 -9
- data/specs/constraints/channel.rb +6 -6
- data/specs/constraints/connection.rb +22 -26
- data/specs/constraints/constraint_helper.rb +125 -41
- data/specs/constraints/count.rb +22 -15
- data/specs/constraints/distinct.rb +10 -64
- data/specs/constraints/element.rb +14 -12
- data/specs/constraints/equality.rb +4 -4
- data/specs/constraints/int_domain.rb +8 -7
- data/specs/constraints/int_relation.rb +12 -8
- data/specs/constraints/linear.rb +4 -4
- data/specs/constraints/reification_sugar.rb +22 -4
- data/specs/constraints/selection.rb +2 -2
- data/specs/constraints/set_domain.rb +7 -3
- data/specs/constraints/set_operation.rb +2 -2
- data/specs/constraints/set_relation.rb +2 -6
- data/specs/constraints/sort.rb +20 -16
- data/specs/model.rb +4 -4
- data/tasks/dependencies.txt +21 -0
- data/tasks/distribution.rake +13 -5
- data/vendor/gecode/win32/lib/libgecodeint.dll +0 -0
- data/vendor/gecode/win32/lib/libgecodekernel.dll +0 -0
- data/vendor/gecode/win32/lib/libgecodeminimodel.dll +0 -0
- data/vendor/gecode/win32/lib/libgecodesearch.dll +0 -0
- data/vendor/gecode/win32/lib/libgecodeset.dll +0 -0
- data/vendor/gecode/win32/lib/libgecodesupport.dll +0 -0
- data/vendor/rust/include/rust_checks.hh +2 -1
- data/vendor/rust/include/rust_conversions.hh +2 -2
- data/vendor/rust/rust/attribute.rb +2 -2
- data/vendor/rust/rust/class.rb +2 -2
- data/vendor/rust/rust/cxxclass.rb +0 -2
- data/vendor/rust/rust/function.rb +2 -2
- data/vendor/rust/rust/templates/AttributeDefinition.rusttpl +1 -1
- data/vendor/rust/rust/templates/StandaloneClassDeclarations.rusttpl +1 -1
- data/vendor/rust/rust/templates/VariableFunctionCall.rusttpl +1 -1
- data/vendor/rust/rust/type.rb +1 -1
- metadata +4 -3
- data/tasks/building.howto +0 -65
data/vendor/rust/rust/class.rb
CHANGED
@@ -41,7 +41,7 @@ module Rust
|
|
41
41
|
# and a few other needed information.
|
42
42
|
#
|
43
43
|
# Don't call this function directly, use Namespace.add_cxx_class
|
44
|
-
def initialize(name, namespace, bindname = name.
|
44
|
+
def initialize(name, namespace, bindname = name.gsub(/::([^<>]+)$/,'\1') ) # :notnew:
|
45
45
|
super()
|
46
46
|
|
47
47
|
@name = name
|
@@ -220,7 +220,7 @@ module Rust
|
|
220
220
|
super
|
221
221
|
|
222
222
|
@varname =
|
223
|
-
"f#{@parent.namespace.name.gsub("::","_")}_#{@parent.
|
223
|
+
"f#{@parent.namespace.name.gsub("::","_")}_#{@parent.varname}_#{@name}"
|
224
224
|
|
225
225
|
@definition_template = Templates["CxxMethodStub"]
|
226
226
|
@initialization_template = Templates["MethodInitBinding"]
|
@@ -117,7 +117,7 @@ module Rust
|
|
117
117
|
@parent = params[:parent]
|
118
118
|
@optional_count = 0
|
119
119
|
|
120
|
-
@varname = "f#{@parent.varname}#{@name}"
|
120
|
+
@varname = "f#{@parent.varname}#{@name.gsub('::', '_').gsub(/[<>]/, '')}"
|
121
121
|
|
122
122
|
@aliases = Set.new
|
123
123
|
@variable = false # Variable arguments function
|
@@ -139,7 +139,7 @@ module Rust
|
|
139
139
|
add_expansion 'function_parameters', 'ruby_parameters'
|
140
140
|
add_expansion 'function_call', 'stub'
|
141
141
|
add_expansion 'function_varname', 'varname'
|
142
|
-
add_expansion 'function_cname', '
|
142
|
+
add_expansion 'function_cname', 'varname'
|
143
143
|
add_expansion 'function_paramcount', 'paramcount'
|
144
144
|
add_expansion 'function_bindname', '@bindname'
|
145
145
|
add_expansion 'parent_varname', '@parent.varname'
|
@@ -5,7 +5,7 @@ VALUE set!parent_varname!!attribute_bindname!(VALUE self, VALUE val) {
|
|
5
5
|
!c_class_name!* tmp = ruby2!class_varcname!Ptr(self);
|
6
6
|
if ( ! tmp ) return Qnil;
|
7
7
|
|
8
|
-
tmp->!attribute_name! = ruby2!
|
8
|
+
tmp->!attribute_name! = ruby2!attribute_convert_name!(val);
|
9
9
|
return Qnil;
|
10
10
|
}
|
11
11
|
|
@@ -4,4 +4,4 @@ typedef std::map<VALUE, !c_class_name!*> T!class_ptrmap!;
|
|
4
4
|
extern T!class_ptrmap! !class_ptrmap!;
|
5
5
|
static void !class_varname!_free(void *p);
|
6
6
|
static void !class_varname!_mark(void *p);
|
7
|
-
static void !class_varname!_free_map_entry(void *p);
|
7
|
+
static void !class_varname!_free_map_entry(void *p);
|
data/vendor/rust/rust/type.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: gecoder-with-gecode
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2008-
|
6
|
+
version: 0.8.0
|
7
|
+
date: 2008-04-10 00:00:00 +02:00
|
8
8
|
summary: Ruby interface to Gecode, an environment for constraint programming.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -153,7 +153,7 @@ files:
|
|
153
153
|
- tasks/svn.rake
|
154
154
|
- tasks/rcov.rake
|
155
155
|
- tasks/specs.rake
|
156
|
-
- tasks/
|
156
|
+
- tasks/dependencies.txt
|
157
157
|
- specs/constraints
|
158
158
|
- specs/constraints/boolean.rb
|
159
159
|
- specs/constraints/bool_enum.rb
|
@@ -193,6 +193,7 @@ files:
|
|
193
193
|
- vendor/gecode/win32/lib/libgecodeminimodel.dll
|
194
194
|
- vendor/gecode/win32/lib/libgecodesearch.dll
|
195
195
|
- vendor/gecode/win32/lib/libgecodeset.dll
|
196
|
+
- vendor/gecode/win32/lib/libgecodesupport.dll
|
196
197
|
- lib/gecode.dll
|
197
198
|
test_files:
|
198
199
|
- specs/constraints/boolean.rb
|
data/tasks/building.howto
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
Doing the full "release" task requires a number of gems:
|
2
|
-
|
3
|
-
# To run the Rake scripts.
|
4
|
-
rake
|
5
|
-
|
6
|
-
# To generate the website.
|
7
|
-
webgen
|
8
|
-
coderay
|
9
|
-
|
10
|
-
# To run the specs and produce a report for the website.
|
11
|
-
rspec
|
12
|
-
|
13
|
-
# To release files to RubyForge.
|
14
|
-
meta_project
|
15
|
-
rubyforge
|
16
|
-
|
17
|
-
Crosscompiling the win32 binaries under Linux requires the following.
|
18
|
-
|
19
|
-
http://www.libsdl.org/extras/win32/cross/README.txt
|
20
|
-
http://www.mingw.org/
|
21
|
-
http://www.profv.de/mingw_cross_env/
|
22
|
-
http://www.mingw.org/MinGWiki/index.php/build%20a%20Win32%20x-compiler%20for%20Linux
|
23
|
-
http://www.mingw.org/MinGWiki/index.php/BuildMingwCross
|
24
|
-
|
25
|
-
Used the patch in the end of
|
26
|
-
http://www.mingw.org/MinGWiki/index.php/build%20a%20Win32%20x-compiler%20for%20Linux
|
27
|
-
but with
|
28
|
-
BINUTILS_ARCHIVE="binutils-2.18.50-20071123-src.tar.gz"
|
29
|
-
|
30
|
-
Generate rbconfig.rb by following:
|
31
|
-
http://eigenclass.org/hiki.rb?cross+compiling+rcovrt
|
32
|
-
|
33
|
-
In ext do:
|
34
|
-
ruby -I win32 extconf.rb
|
35
|
-
make
|
36
|
-
|
37
|
-
# ruby -Iwin32 -Iwin32/gecode-1.3.1/include/ -Iwin32/gecode-1.3.1/lib/ -I~/cross-compile/ruby-mingw32/lib/ruby/1.8/i386-mingw32/ extconf-win32.rb
|
38
|
-
|
39
|
-
|
40
|
-
get mingw32 via modified install script (need at least gcc4.2 due to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27650)
|
41
|
-
add bin to bath, make i386-* symbolic links: ruby -e "Dir['*'].each{ |x| %x{ln -s -T #{x} i386-#{x}} }"
|
42
|
-
compile Ruby with cross-compile script
|
43
|
-
comment out the read, write and select macros in ruby-mingw32/lib/ruby/1.8/i386-mingw32/win32/win32.h
|
44
|
-
edit rbconfig.rb to use mingw32-g++ instead of mingw32-gcc in "LDSHARED".
|
45
|
-
copy the produced rbconfig.rb file to ext/win32
|
46
|
-
compile Gecode with the cross-compile script
|
47
|
-
move dlls to ext/, move includes to ext/win32
|
48
|
-
install pexports (included in mingw-utils)
|
49
|
-
create definitions from MSVC dlls: ruby -e "Dir['*.dll'].each{ |x| %x{pexports #{x} > #{x.sub('dll', 'def')}} }"
|
50
|
-
ruby -e "Dir['*.def'].each{ |x| %x{mingw32-dlltool -U -d #{x} > lib#{x.downcase.chomp('def')}a} }"
|
51
|
-
ruby -Iwin32 extconf-win32.rb
|
52
|
-
make
|
53
|
-
|
54
|
-
# Building Gecode and Gecode/R dlls using mingw:
|
55
|
-
get mingw32 via modified install script (need at least gcc4.2 due to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27650)
|
56
|
-
add bin to bath, make i386-* symbolic links: ruby -e "Dir['*'].each{ |x| %x{ln -s -T #{x} i386-#{x}} }"
|
57
|
-
compile Ruby with cross-compile script
|
58
|
-
comment out the read, write and select macros in ruby-mingw32/lib/ruby/1.8/i386-mingw32/win32/win32.h
|
59
|
-
edit rbconfig.rb to use mingw32-g++ instead of mingw32-gcc in "LDSHARED".
|
60
|
-
copy the produced rbconfig.rb file to ext/win32
|
61
|
-
compile Gecode with the cross-compile script
|
62
|
-
move dlls to ext/, move includes to ext/win32
|
63
|
-
ruby -Iwin32 extconf-win32.rb
|
64
|
-
make
|
65
|
-
move gecode.dll to lib/, put the Gecode dlls somewhere in the path
|