chunkio 0.1.1 → 0.1.2
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/ext/chunkio/chunkio.h +0 -9
- data/ext/chunkio/extconf.rb +29 -6
- data/lib/chunkio/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 139f7e476d3ecb148f675198f0affafc0920f9cbc4ea9b2e5cb3b3b1e9ef6cd5
|
4
|
+
data.tar.gz: 9e878c73d0cf18becd1167b5b86f8b29f25b4ca20047d30ad00a242b28ee9733
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d3569ba99d80cd2f9ccae8d945479e22ec3edca7782f361ed5c2d3e08b0a63cd709c31407ac7b1469918e32c3ffd3c5e4201cd6ba2652cc0800e44be5465f72
|
7
|
+
data.tar.gz: c2018918a915bdd90615dd1276d51cf607aa2b6749b2f9017e8c31b0a2fd415a16712a9e7c57ba647fc38d0600a929fdf7a3126b298833e53761b550640583ee
|
data/ext/chunkio/chunkio.h
CHANGED
@@ -2,17 +2,8 @@
|
|
2
2
|
#define RB_CHUNKIO_CHUNKIO_H
|
3
3
|
|
4
4
|
#include <ruby.h>
|
5
|
-
|
6
5
|
#include <chunkio/chunkio.h>
|
7
|
-
#include <chunkio/chunkio_compat.h>
|
8
|
-
#include <crc32/crc32.h>
|
9
|
-
#include <chunkio/cio_crc32.h>
|
10
|
-
#include <chunkio/cio_log.h>
|
11
|
-
#include <chunkio/cio_stream.h>
|
12
|
-
#include <chunkio/cio_chunk.h>
|
13
6
|
#include <chunkio/cio_meta.h>
|
14
|
-
#include <chunkio/cio_scan.h>
|
15
|
-
#include <chunkio/cio_utils.h>
|
16
7
|
|
17
8
|
typedef struct chunkio_chunk {
|
18
9
|
struct cio_chunk* inner;
|
data/ext/chunkio/extconf.rb
CHANGED
@@ -9,9 +9,36 @@ message "Building chunkio\n"
|
|
9
9
|
recipe = MiniPortileCMake.new('chunkio', 'v0.0.1')
|
10
10
|
|
11
11
|
recipe.files << {
|
12
|
-
url: 'https://github.com/ganmacs/chunkio/tarball/
|
12
|
+
url: 'https://github.com/ganmacs/chunkio/tarball/6a1bd00a455b410085dbae7bbf29edc6139b3e29',
|
13
13
|
}
|
14
14
|
|
15
|
+
class << recipe
|
16
|
+
def compile
|
17
|
+
execute('compile', make_cmd)
|
18
|
+
|
19
|
+
execute('extract libchunk-static', 'ar xv src/libchunkio-static.a')
|
20
|
+
execute('extract libcio_crc32', 'ar xv deps/crc32/libcio-crc32.a')
|
21
|
+
# TODO
|
22
|
+
# it can't find the symbol: update_crc without it. so it creates static library by itself
|
23
|
+
execute('archive', 'ar vrcs libchunkio.a chunkio.c.o cio_file.c.o cio_memfs.c.o cio_os.c.o cio_stats.c.o cio_utils.c.o cio_chunk.c.o cio_log.c.o cio_meta.c.o cio_scan.c.o cio_stream.c.o crc32.c.o')
|
24
|
+
end
|
25
|
+
|
26
|
+
def install
|
27
|
+
lib_path = File.join(port_path, 'lib')
|
28
|
+
include_path = File.join(port_path, 'include')
|
29
|
+
|
30
|
+
FileUtils.mkdir_p([lib_path, include_path])
|
31
|
+
FileUtils.cp(File.join(work_path, 'libchunkio.a'), lib_path)
|
32
|
+
|
33
|
+
FileUtils.cp_r(File.join(work_path, 'include/chunkio'), include_path)
|
34
|
+
FileUtils.cp_r(File.join(work_path, 'deps/monkey/include/monkey'), include_path)
|
35
|
+
|
36
|
+
crc32 = File.join(include_path, 'crc32')
|
37
|
+
FileUtils.mkdir_p(crc32)
|
38
|
+
FileUtils.cp(File.join(work_path, 'deps/crc32/crc32.h'), crc32)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
15
42
|
recipe.cook
|
16
43
|
$LIBPATH = ["#{recipe.path}/lib"] + $LIBPATH
|
17
44
|
$CPPFLAGS << " -I#{recipe.path}/include"
|
@@ -22,12 +49,8 @@ unless have_header('chunkio/chunkio.h')
|
|
22
49
|
abort 'chunkio/chunkio.h is not found'
|
23
50
|
end
|
24
51
|
|
25
|
-
unless have_library('chunkio
|
52
|
+
unless have_library('chunkio')
|
26
53
|
abort 'libchunkio-static not found'
|
27
54
|
end
|
28
55
|
|
29
|
-
unless have_library('cio-crc32')
|
30
|
-
abort 'libcio-crc32 not found'
|
31
|
-
end
|
32
|
-
|
33
56
|
create_makefile 'chunkio'
|
data/lib/chunkio/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chunkio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuta Iwama
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_portile2
|