dep-selector-libgecode 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/libgecode3/extconf.rb +24 -1
- data/lib/dep-selector-libgecode/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0ee4be52d1136e637c0cc0d56468e4555033dd2
|
4
|
+
data.tar.gz: a652be7eb00f256476de90ebb1ed449ad85e2c39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72599c5af7a0ab0228dd1247dbaab1b7b01fda640f75c8b88892614d2eaa219666c45dfbcfc2caf8ac82b52f4379127917ee09d094fe8596d1deaa310254798c
|
7
|
+
data.tar.gz: 13991d034e56cb2870c14815956ddc7b654c037fffc1d964ea965549384f0c58181a717738df1e9dc2cda613bcaf0fde7cfd5803000ac323213384d5efcb6286
|
data/ext/libgecode3/extconf.rb
CHANGED
@@ -86,12 +86,35 @@ module GecodeBuild
|
|
86
86
|
super(*args)
|
87
87
|
end
|
88
88
|
|
89
|
+
def self.num_processors
|
90
|
+
n = case RbConfig::CONFIG['host_os']
|
91
|
+
when /darwin/
|
92
|
+
((`which hwprefs` != '') ? `hwprefs thread_count` : `sysctl -n hw.ncpu`).chomp
|
93
|
+
when /linux/
|
94
|
+
`cat /proc/cpuinfo | grep processor | wc -l`.chomp
|
95
|
+
when /freebsd/
|
96
|
+
`sysctl -n hw.ncpu`.chomp
|
97
|
+
when /mswin|mingw/
|
98
|
+
require 'win32ole'
|
99
|
+
wmi = WIN32OLE.connect("winmgmts://")
|
100
|
+
# This only includes physical cores, HT's are not included.
|
101
|
+
cpu = wmi.ExecQuery("select NumberOfCores from Win32_Processor")
|
102
|
+
cpu.to_enum.first.NumberOfCores
|
103
|
+
else
|
104
|
+
4
|
105
|
+
end
|
106
|
+
n = n.to_i
|
107
|
+
return 1 if n < 1
|
108
|
+
return 4 if n > 4
|
109
|
+
n
|
110
|
+
end
|
111
|
+
|
89
112
|
def self.run_build_commands
|
90
113
|
setup_env
|
91
114
|
patch_configure
|
92
115
|
system(*configure_cmd) &&
|
93
116
|
system("make", "clean") &&
|
94
|
-
system("make", "-j",
|
117
|
+
system("make", "-j", (num_processors + 1).to_s) &&
|
95
118
|
system("make", "install") &&
|
96
119
|
system("make", "distclean")
|
97
120
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dep-selector-libgecode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- danielsdeleo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -888,7 +888,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
888
888
|
version: '0'
|
889
889
|
requirements: []
|
890
890
|
rubyforge_project:
|
891
|
-
rubygems_version: 2.
|
891
|
+
rubygems_version: 2.4.8
|
892
892
|
signing_key:
|
893
893
|
specification_version: 4
|
894
894
|
summary: Installs a vendored copy of Gecode suitable for use with dep-selector
|