extbrotli 0.0.1.PROTOTYPE → 0.0.1.PROTOTYPE2

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
  SHA1:
3
- metadata.gz: 225210d4ad573aa1a26b917faf6397d32f08bbee
4
- data.tar.gz: 77895f4fa587b3c2b4eac7fbe0529225543a3d9d
3
+ metadata.gz: c0c3d57ba594cbbe3f06249d3969709af1ffb03f
4
+ data.tar.gz: 12529eff9041aa454509024eb65d71dc37e46bee
5
5
  SHA512:
6
- metadata.gz: d7a2f8b536e5d34d54c27718b17e3ec544d8b8dd2be6a77a32dc5bd9c740e1dc3c75ef87aea0f964f888e989c0957f61732c4a2196186a857980d7e1dc337163
7
- data.tar.gz: a07e19915f969cabf324bdfee186a58d68e696d4671aeb166700cb038c713847257e5b43878d1425e8766051c5f4bb19bba1dfeb07509234c50fd9d35be350c5
6
+ metadata.gz: 45f280511b663810cb49ec42470dcb8f744bbd95c847b89b4f3c3164a637654d37a390344345e7c3b0ccf24dc1375ed791b9063d97d06a6f9063153497c20f17
7
+ data.tar.gz: 4598f4d341c18ab45adc28dffe213900e08e8c0987b7cfa636e5d519fb858bdae5a16aa770305ca528984d7364158b0ec9d74d840b84218429ddc854e4fe685d
data/ext/extconf.rb CHANGED
@@ -18,6 +18,7 @@ files = Dir.glob(target).map { |n| File.basename n }
18
18
  rejects = (RbConfig::CONFIG["arch"] =~ /mswin|mingw/) ? /_pthreads_/ : /_win32_/
19
19
  files.reject! { |n| n =~ rejects }
20
20
  $srcs = files + [encsrc, decsrc]
21
+ $srcs.uniq!
21
22
 
22
23
  #$VPATH.push "$(srcdir)/../contrib"
23
24
 
@@ -0,0 +1,35 @@
1
+ #!ruby
2
+ #vim: set fileencoding:utf-8
3
+
4
+ require "mkmf"
5
+
6
+ dir = File.dirname(__FILE__).gsub(/[\[\{\?\*]/, "[\\0]")
7
+
8
+ encfiles = Dir.glob(File.join(dir, "../contrib/brotli/enc/*.cc")).sort
9
+ encsrc = "brotli_encoder.cc"
10
+ File.write encsrc, encfiles.map {|n| "#include \"#{n}\"" }.join("\n")
11
+ decfiles = Dir.glob(File.join(dir, "../contrib/brotli/dec/*.c")).sort
12
+ decsrc = "brotli_decoder.c"
13
+ File.write decsrc, decfiles.map {|n| "#include \"#{n}\"" }.join("\n")
14
+
15
+ filepattern = "*.c{,c,pp}"
16
+ target = File.join(dir, filepattern)
17
+ files = Dir.glob(target).map { |n| File.basename n }
18
+ rejects = (RbConfig::CONFIG["arch"] =~ /mswin|mingw/) ? /_pthreads_/ : /_win32_/
19
+ files.reject! { |n| n =~ rejects }
20
+ $srcs = files + [encsrc, decsrc]
21
+
22
+ #$VPATH.push "$(srcdir)/../contrib"
23
+
24
+ #find_header "brotli/enc/encode.h", "$(srcdir)/../contrib" or abort
25
+ find_header "brotli/dec/decode.h", "$(srcdir)/../contrib" or abort
26
+
27
+ if RbConfig::CONFIG["arch"] =~ /mingw/
28
+ #$CPPFLAGS << " -D__forceinline=__attribute__\\(\\(always_inline\\)\\)"
29
+ $CXXFLAGS << " -std=gnu++11"
30
+ $LDFLAGS << " -static-libgcc -static-libstdc++"
31
+ end
32
+
33
+ try_link "void main(void){}", " -Wl,-Bsymbolic " and $LDFLAGS << " -Wl,-Bsymbolic "
34
+
35
+ create_makefile("extbrotli")
@@ -1,3 +1,3 @@
1
1
  module Brotli
2
- VERSION = "0.0.1.PROTOTYPE"
2
+ VERSION = "0.0.1.PROTOTYPE2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extbrotli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.PROTOTYPE
4
+ version: 0.0.1.PROTOTYPE2
5
5
  platform: ruby
6
6
  authors:
7
7
  - dearblue
@@ -103,6 +103,7 @@ files:
103
103
  - ext/extbrotli.cc
104
104
  - ext/extbrotli.h
105
105
  - ext/extconf.rb
106
+ - ext/extconf.rb.orig
106
107
  - ext/lldecoder.c
107
108
  - ext/llencoder.cc
108
109
  - gemstub.rb