dep_selector 1.0.0.alpha.1 → 1.0.0.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/dep_gecode/extconf.rb +48 -12
- data/lib/dep_selector/dep_selector_version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8649fd62eb39c437fc17f2c7ed3ac12e3cbd0f17
|
4
|
+
data.tar.gz: b99d4e37b75f12200d9fa69e981b202651aac449
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d58e22b2f94b5f944b7d0121ca890ae258e699d369b9186fa3c2c7989131f64108d85d5cdfaeb8700fbcde90322591d420542e888efbd6c6f6d756a406d68ad
|
7
|
+
data.tar.gz: d8283e0b999e49288d31db6c6ae670ac12b96598de634a7c904d8424f0381c7f8369848ea0f992ef7b8d8456d240fc27109011035ed0008fb264046d81fe868d
|
data/ext/dep_gecode/extconf.rb
CHANGED
@@ -24,8 +24,13 @@ if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
|
|
24
24
|
# ./configure --with-architectures=i386,x86_64
|
25
25
|
# to work properly here.
|
26
26
|
require 'mkmf'
|
27
|
+
require 'dep-selector-libgecode'
|
27
28
|
|
28
|
-
|
29
|
+
opt_path = DepSelectorLibgecode.opt_path
|
30
|
+
include_path = DepSelectorLibgecode.include_path
|
31
|
+
find_library("gecodesupport", nil, opt_path)
|
32
|
+
# find_header doesn't seem to work for stuff like `gecode/thing.hh`
|
33
|
+
$INCFLAGS << " -I#{include_path}"
|
29
34
|
|
30
35
|
gecode_installed =
|
31
36
|
# Gecode documentation notes:
|
@@ -57,21 +62,32 @@ if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
|
|
57
62
|
unless gecode_installed
|
58
63
|
STDERR.puts <<EOS
|
59
64
|
=========================================================================================
|
60
|
-
Gecode
|
65
|
+
Gecode ~>3.5 must be installed (http://www.gecode.org/).
|
61
66
|
|
62
67
|
OSX:
|
68
|
+
cd $( brew --prefix )
|
69
|
+
git checkout 3c5ca25 Library/Formula/gecode.rb
|
63
70
|
brew install gecode
|
64
71
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
curl http://
|
71
|
-
|
72
|
-
|
72
|
+
Debian and Ubuntu:
|
73
|
+
sudo apt-get install libgecode-dev
|
74
|
+
|
75
|
+
Build from source:
|
76
|
+
Get gecode 3.7.3 source:
|
77
|
+
curl -O http://www.gecode.org/download/gecode-3.7.3.tar.gz
|
78
|
+
Unpack it:
|
79
|
+
tar zxvf gecode-3.7.3.tar.gz
|
80
|
+
Build:
|
81
|
+
./configure --disable-doc-dot \
|
82
|
+
--disable-doc-search \
|
83
|
+
--disable-doc-tagfile \
|
84
|
+
--disable-doc-chm \
|
85
|
+
--disable-doc-docset \
|
86
|
+
--disable-qt \
|
87
|
+
--disable-examples
|
88
|
+
make
|
89
|
+
(sudo) make install
|
73
90
|
|
74
|
-
Other distributions can build from source.
|
75
91
|
=========================================================================================
|
76
92
|
EOS
|
77
93
|
raise "Gecode not installed"
|
@@ -83,6 +99,22 @@ else # JRUBY
|
|
83
99
|
require 'rbconfig'
|
84
100
|
require 'ffi/platform'
|
85
101
|
|
102
|
+
incflags = "-I."
|
103
|
+
libpath = "-L."
|
104
|
+
|
105
|
+
require 'dep-selector-libgecode'
|
106
|
+
opt_path = DepSelectorLibgecode.opt_path
|
107
|
+
include_path = DepSelectorLibgecode.include_path
|
108
|
+
libpath << " -L#{opt_path}"
|
109
|
+
|
110
|
+
# On MRI, RbConfig::CONFIG["RPATHFLAG"] == "" when using clang/llvm, but this
|
111
|
+
# isn't set on JRuby so we need to detect llvm manually and set rpath on gcc
|
112
|
+
unless `gcc -v` =~ /LLVM/
|
113
|
+
rpath_flag = (" -Wl,-R%1$-s" % [opt_path])
|
114
|
+
libpath << rpath_flag
|
115
|
+
end
|
116
|
+
incflags << " -I#{include_path}"
|
117
|
+
|
86
118
|
cflags = ENV['CFLAGS']
|
87
119
|
cppflags = ENV['CPPFLAGS']
|
88
120
|
cxxflags = ENV['CXXFLAGS']
|
@@ -121,6 +153,8 @@ else # JRUBY
|
|
121
153
|
ENV['CXX'] = cxx
|
122
154
|
ENV["CPPFLAGS"] = cppflags
|
123
155
|
ENV["CXXFLAGS"] = cxxflags
|
156
|
+
ENV['INCFLAGS'] = incflags
|
157
|
+
ENV['LIBPATH'] = libpath
|
124
158
|
|
125
159
|
dlext = FFI::Platform::LIBSUFFIX
|
126
160
|
|
@@ -145,7 +179,9 @@ CFLAGS = #{ENV['CFLAGS']}
|
|
145
179
|
LDFLAGS = #{ENV['LDFLAGS']}
|
146
180
|
CPPFLAGS = #{ENV['CPPFLAGS']}
|
147
181
|
CXXFLAGS = #{ENV['CXXFLAGS']}
|
148
|
-
INCFLAGS =
|
182
|
+
INCFLAGS = #{ENV['INCFLAGS']}
|
183
|
+
LIBPATH = #{ENV['LIBPATH']}
|
184
|
+
|
149
185
|
LDSHAREDXX = #{ldsharedxx}
|
150
186
|
|
151
187
|
empty =
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dep_selector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.alpha.
|
4
|
+
version: 1.0.0.alpha.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Walters
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-04-
|
12
|
+
date: 2014-04-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|
@@ -25,6 +25,20 @@ dependencies:
|
|
25
25
|
- - ~>
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.9'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: dep-selector-libgecode
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 1.0.0.alpha
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ~>
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 1.0.0.alpha
|
28
42
|
- !ruby/object:Gem::Dependency
|
29
43
|
name: rake
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|