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 +4 -4
- data/ext/extconf.rb +1 -0
- data/ext/extconf.rb.orig +35 -0
- data/lib/extbrotli/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0c3d57ba594cbbe3f06249d3969709af1ffb03f
|
4
|
+
data.tar.gz: 12529eff9041aa454509024eb65d71dc37e46bee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/ext/extconf.rb.orig
ADDED
@@ -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")
|
data/lib/extbrotli/version.rb
CHANGED
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.
|
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
|