chunkio 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2dacb80115dac7f7ee66fd6861676d8bf067094a3fc665d07c5ea743182573e8
4
- data.tar.gz: fed0c298eac59c86d2750569e6301b3c4bab9386597ab651db033f0a4d4200e3
3
+ metadata.gz: 139f7e476d3ecb148f675198f0affafc0920f9cbc4ea9b2e5cb3b3b1e9ef6cd5
4
+ data.tar.gz: 9e878c73d0cf18becd1167b5b86f8b29f25b4ca20047d30ad00a242b28ee9733
5
5
  SHA512:
6
- metadata.gz: f60a3da59e787f0307fc42808ab73e785779cb9b17fd408456866130eb797741a7d77a67b39f41cb35da7a2ac4ae1e92b92e4f8e105e94169e1a0ca7727a0deb
7
- data.tar.gz: c6f92cd5115314caa020c43780a92aa07741dfc8b55474a87bfc6bbf009f09cdd49fe5eeb228adb71b19f5a604f105c50a9e2bddae687d9f432eb00bae359ba0
6
+ metadata.gz: 7d3569ba99d80cd2f9ccae8d945479e22ec3edca7782f361ed5c2d3e08b0a63cd709c31407ac7b1469918e32c3ffd3c5e4201cd6ba2652cc0800e44be5465f72
7
+ data.tar.gz: c2018918a915bdd90615dd1276d51cf607aa2b6749b2f9017e8c31b0a2fd415a16712a9e7c57ba647fc38d0600a929fdf7a3126b298833e53761b550640583ee
@@ -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;
@@ -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/4773b4e7d27c8b8396f797c09dd22db5ffadeda8',
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-static')
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'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ChunkIO
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
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.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-09 00:00:00.000000000 Z
11
+ date: 2019-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mini_portile2