Skip to content

Commit

Permalink
Update libwebp to 1.0.2 (GoogleChromeLabs#439)
Browse files Browse the repository at this point in the history
* Update package.json

* Update package.json

* Update README.md

* Update README.md

* Use cmake for libwebp

* Minimize libwebp
  • Loading branch information
EwoutH authored and jakearchibald committed Feb 5, 2019
1 parent 356a8bd commit 4026714
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 40 deletions.
2 changes: 1 addition & 1 deletion codecs/webp_dec/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# WebP decoder

- Source: <https://github.com/webmproject/libwebp>
- Version: v0.6.1
- Version: v1.0.2

## Example

Expand Down
30 changes: 28 additions & 2 deletions codecs/webp_dec/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,33 @@ export OPTIMIZE="-Os"
export LDFLAGS="${OPTIMIZE}"
export CFLAGS="${OPTIMIZE}"
export CPPFLAGS="${OPTIMIZE}"
apt-get update
apt-get install -qqy autoconf libtool libpng-dev pkg-config

echo "============================================="
echo "Compiling libwebp"
echo "============================================="
test -n "$SKIP_LIBWEBP" || (
cd node_modules/libwebp
autoreconf -fiv
rm -rf build || true
mkdir -p build && cd build
emconfigure ../configure \
--disable-libwebpdemux \
--disable-wic \
--disable-gif \
--disable-tiff \
--disable-jpeg \
--disable-png \
--disable-sdl \
--disable-gl \
--disable-threading \
--disable-neon-rtcd \
--disable-neon \
--disable-sse2 \
--disable-sse4.1
emmake make
)
echo "============================================="
echo "Compiling wasm bindings"
echo "============================================="
Expand All @@ -20,9 +46,9 @@ echo "============================================="
--std=c++11 \
-I node_modules/libwebp \
-o ./webp_dec.js \
node_modules/libwebp/src/{dec,dsp,demux,enc,mux,utils}/*.c \
-x c++ \
webp_dec.cpp
webp_dec.cpp \
node_modules/libwebp/build/src/.libs/libwebp.a
)
echo "============================================="
echo "Compiling wasm bindings done"
Expand Down
2 changes: 1 addition & 1 deletion codecs/webp_dec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"build": "docker run --rm -v $(pwd):/src trzeci/emscripten ./build.sh"
},
"napa": {
"libwebp": "webmproject/libwebp#v1.0.0"
"libwebp": "webmproject/libwebp#v1.0.2"
},
"devDependencies": {
"napa": "3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion codecs/webp_dec/webp_dec.js

Large diffs are not rendered by default.

Binary file modified codecs/webp_dec/webp_dec.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion codecs/webp_enc/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# WebP encoder

- Source: <https://github.com/webmproject/libwebp>
- Version: v0.6.1
- Version: v1.0.2

## Dependencies

Expand Down
31 changes: 29 additions & 2 deletions codecs/webp_enc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,33 @@ export LDFLAGS="${OPTIMIZE}"
export CFLAGS="${OPTIMIZE}"
export CPPFLAGS="${OPTIMIZE}"

apt-get update
apt-get install -qqy autoconf libtool libpng-dev pkg-config

echo "============================================="
echo "Compiling libwebp"
echo "============================================="
test -n "$SKIP_LIBWEBP" || (
cd node_modules/libwebp
autoreconf -fiv
rm -rf build || true
mkdir -p build && cd build
emconfigure ../configure \
--disable-libwebpdemux \
--disable-wic \
--disable-gif \
--disable-tiff \
--disable-jpeg \
--disable-png \
--disable-sdl \
--disable-gl \
--disable-threading \
--disable-neon-rtcd \
--disable-neon \
--disable-sse2 \
--disable-sse4.1
emmake make
)
echo "============================================="
echo "Compiling wasm bindings"
echo "============================================="
Expand All @@ -20,9 +47,9 @@ echo "============================================="
--std=c++11 \
-I node_modules/libwebp \
-o ./webp_enc.js \
node_modules/libwebp/src/{dec,dsp,demux,enc,mux,utils}/*.c \
-x c++ \
webp_enc.cpp
webp_enc.cpp \
node_modules/libwebp/build/src/.libs/libwebp.a
)
echo "============================================="
echo "Compiling wasm bindings done"
Expand Down
2 changes: 1 addition & 1 deletion codecs/webp_enc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"build": "docker run --rm -v $(pwd):/src trzeci/emscripten ./build.sh"
},
"napa": {
"libwebp": "webmproject/libwebp#v1.0.0"
"libwebp": "webmproject/libwebp#v1.0.2"
},
"devDependencies": {
"napa": "3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion codecs/webp_enc/webp_enc.js

Large diffs are not rendered by default.

Binary file modified codecs/webp_enc/webp_enc.wasm
Binary file not shown.
41 changes: 11 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4026714

Please sign in to comment.