gear 0.0.2 → 0.0.3
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.
- checksums.yaml +4 -4
- data/gear.gemspec +1 -1
- data/lib/gear.rb +1 -1
- data/lib/gears/apngasm.rb +10 -1
- data/lib/gears/boost.rb +4 -4
- data/lib/gears/cmake.rb +51 -0
- data/lib/gears/libarchive.rb +51 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 445603b1e01a4640e1961abf51b9fee905cda6a3
|
4
|
+
data.tar.gz: bbdc3d2eecbf4a8d572646bf500c96b4d870ad0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2811ae13eafa601a8891ce094275b5d9c24582a86026ed8d5a50127b52864b84c7f00196048145bba8b4a075bca15dd4d2af8cb136ceb63dcea54a21c1ad3a71
|
7
|
+
data.tar.gz: 363bc374f3b826c76cd3c0ab416d6c1fc8e3c29e44a8927f76b4e6d0df1057d46b6ffcaaf393c642a6adf67a8d393d79314a439bf477bb825f77c5b6634975cd
|
data/gear.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'gear'
|
3
|
-
s.version = '0.0.
|
3
|
+
s.version = '0.0.3'
|
4
4
|
s.license = 'GPL-3'
|
5
5
|
s.summary = 'modular dependency build system for native extensions'
|
6
6
|
s.description = 'gear provides a modular framework to encapsulate build tasks for native ' +
|
data/lib/gear.rb
CHANGED
data/lib/gears/apngasm.rb
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
require
|
1
|
+
require 'gear'
|
2
|
+
|
3
|
+
require 'gears/boost'
|
4
|
+
require 'gears/cmake'
|
2
5
|
|
3
6
|
module Gears
|
4
7
|
class APNGAsm < Gear
|
@@ -19,6 +22,12 @@ module Gears
|
|
19
22
|
end
|
20
23
|
|
21
24
|
def build()
|
25
|
+
# prerequisites
|
26
|
+
cm = Gears::CMake.new
|
27
|
+
cm.engage
|
28
|
+
boost = Gears::Boost.new
|
29
|
+
boost.engage
|
30
|
+
|
22
31
|
Dir.chdir(@build_path)
|
23
32
|
FileUtils.mkdir_p('build') # `mkdir build`
|
24
33
|
Dir.chdir('build') # `cd build`
|
data/lib/gears/boost.rb
CHANGED
@@ -20,10 +20,10 @@ module Gears
|
|
20
20
|
|
21
21
|
def build()
|
22
22
|
Dir.chdir(@build_path)
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
`./bootstrap.sh --without-libraries=python --prefix=#{@@install_path}`
|
24
|
+
`./b2 headers`
|
25
|
+
`./b2`
|
26
|
+
`./b2 install --prefix=#{@@install_path}`
|
27
27
|
@built = true
|
28
28
|
return true
|
29
29
|
end
|
data/lib/gears/cmake.rb
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'gear'
|
2
|
+
|
3
|
+
require 'gears/libarchive'
|
4
|
+
|
5
|
+
module Gears
|
6
|
+
class CMake < Gear
|
7
|
+
@gear_name = "CMake"
|
8
|
+
|
9
|
+
def check()
|
10
|
+
gear_exec 'cmake --version'
|
11
|
+
if $?.exitstatus == 0
|
12
|
+
@checked = true
|
13
|
+
return true
|
14
|
+
end
|
15
|
+
@checked = false
|
16
|
+
return false
|
17
|
+
end
|
18
|
+
|
19
|
+
def obtain()
|
20
|
+
github_obtain('Kitware', 'CMake')
|
21
|
+
end
|
22
|
+
|
23
|
+
def build()
|
24
|
+
la = Gears::LibArchive.new
|
25
|
+
la.engage
|
26
|
+
|
27
|
+
Dir.chdir(@build_path)
|
28
|
+
`sh bootstrap --prefix=#{@@install_path}`
|
29
|
+
`make`
|
30
|
+
@built = true
|
31
|
+
return true
|
32
|
+
end
|
33
|
+
|
34
|
+
def install()
|
35
|
+
std_make_install
|
36
|
+
end
|
37
|
+
|
38
|
+
def uninstall()
|
39
|
+
FileUtils.rm_f("#{@@install_path}/bin/ccmake")
|
40
|
+
FileUtils.rm_f("#{@@install_path}/bin/cmake")
|
41
|
+
FileUtils.rm_f("#{@@install_path}/bin/cmakexbuild")
|
42
|
+
FileUtils.rm_f("#{@@install_path}/bin/cpack")
|
43
|
+
FileUtils.rm_f("#{@@install_path}/bin/ctest")
|
44
|
+
FileUtils.rm_rf(Dir.glob("#{@@install_path}/doc/cmake-*"))
|
45
|
+
FileUtils.rm_rf("#{@@install_path}/share/aclocal")
|
46
|
+
FileUtils.rm_rf(Dir.glob("#{@@install_path}/share/cmake-*"))
|
47
|
+
@installed = false
|
48
|
+
return true
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require "gear"
|
2
|
+
|
3
|
+
module Gears
|
4
|
+
class LibArchive < Gear
|
5
|
+
@gear_name = "libarchive"
|
6
|
+
|
7
|
+
def check()
|
8
|
+
gear_exec 'ldconfig -p | grep libarchive'
|
9
|
+
if $?.exitstatus == 0
|
10
|
+
@checked = true
|
11
|
+
return true
|
12
|
+
end
|
13
|
+
@checked = false
|
14
|
+
return false
|
15
|
+
end
|
16
|
+
|
17
|
+
def obtain()
|
18
|
+
github_obtain('libarchive', 'libarchive')
|
19
|
+
end
|
20
|
+
|
21
|
+
def build()
|
22
|
+
Dir.chdir(@build_path)
|
23
|
+
`sh build/autogen.sh`
|
24
|
+
`./configure --prefix=#{@@install_path}`
|
25
|
+
`make`
|
26
|
+
@built = true
|
27
|
+
return true
|
28
|
+
end
|
29
|
+
|
30
|
+
def install()
|
31
|
+
std_make_install
|
32
|
+
end
|
33
|
+
|
34
|
+
def uninstall()
|
35
|
+
FileUtils.rm_f("#{@@install_path}/bin/bsdcat")
|
36
|
+
FileUtils.rm_f("#{@@install_path}/bin/bsdcpio")
|
37
|
+
FileUtils.rm_f("#{@@install_path}/bin/bsdtar")
|
38
|
+
FileUtils.rm_f("#{@@install_path}/include/archive_entry.h")
|
39
|
+
FileUtils.rm_f("#{@@install_path}/include/archive.h")
|
40
|
+
FileUtils.rm_f(Dir.glob("#{@@install_path}/lib/libarchive.*"))
|
41
|
+
FileUtils.rm_rf("#{@@install_path}/lib/pkgconfig")
|
42
|
+
FileUtils.rm_f("#{@@install_path}/share/man/man1/bsdcat.1")
|
43
|
+
FileUtils.rm_f("#{@@install_path}/share/man/man1/bsdcpio.1")
|
44
|
+
FileUtils.rm_f("#{@@install_path}/share/man/man1/bsdtar.1")
|
45
|
+
FileUtils.rm_rf("#{@@install_path}/share/man/man3")
|
46
|
+
FileUtils.rm_rf("#{@@install_path}/share/man/man5")
|
47
|
+
@installed = false
|
48
|
+
return true
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gear
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rei Kagetsuki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|
@@ -35,6 +35,8 @@ files:
|
|
35
35
|
- lib/gear.rb
|
36
36
|
- lib/gears/apngasm.rb
|
37
37
|
- lib/gears/boost.rb
|
38
|
+
- lib/gears/cmake.rb
|
39
|
+
- lib/gears/libarchive.rb
|
38
40
|
- lib/gears/swig.rb
|
39
41
|
homepage: https://github.com/Kagetsuki/gear
|
40
42
|
licenses:
|