From: Quim Rovira Date: Sat, 13 Aug 2016 09:49:31 +0000 (+0200) Subject: Add a submodule for the official brotli repo, and use that instead of X-Git-Tag: 0.002~40 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;ds=sidebyside;h=fd0f6b130ce1fb819de157da52d543bcf366bcd4;p=io-compress-brotli.git Add a submodule for the official brotli repo, and use that instead of the local copy of the decoder files. --- diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..094a6d3 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "brotli"] + path = "brotli" + url = "https://github.com/google/brotli.git" diff --git a/Brotli.xs b/Brotli.xs index 60b6428..8cb26c9 100644 --- a/Brotli.xs +++ b/Brotli.xs @@ -6,6 +6,7 @@ #include "ppport.h" #include +#include #define BUFFER_SIZE 1048576 static uint8_t buffer[BUFFER_SIZE]; /* It's almost 2016, is anyone still using ithreads? */ diff --git a/Makefile.PL b/Makefile.PL index a44b607..f522b93 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -13,10 +13,8 @@ WriteMakefile( BUILD_REQUIRES => { qw/File::Slurp 0/, }, - INC => '-I.', - OBJECT => 'Brotli.o bit_reader.o decode.o dictionary.o huffman.o state.o streams.o', - C => [], - depend => {'$(INST_DYNAMIC)' => '$(O_FILES)'}, + INC => '-Ibrotli', + MYEXTLIB => 'brotli/libbrotli$(LIB_EXT)', META_ADD => { dynamic_config => 0, resources => { @@ -24,3 +22,10 @@ WriteMakefile( }, } ); + +sub MY::postamble { +' +$(MYEXTLIB): brotli/Makefile + cd brotli && CFLAGS=-fPIC $(MAKE) lib +' +} diff --git a/brotli b/brotli new file mode 160000 index 0000000..2e0d321 --- /dev/null +++ b/brotli @@ -0,0 +1 @@ +Subproject commit 2e0d3214c2b6248a486822d2c5267d1c961a29d0