Skip to content

Commit c082928

Browse files
committed
Add libsnappy for hap encoding support
Closes #443
1 parent e13f9ee commit c082928

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

scripts.d/50-snappy.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
SCRIPT_REPO="https://github.com/google/snappy.git"
4+
SCRIPT_COMMIT="32ded457c0b1fe78ceb8397632c416568d6714a0"
5+
6+
ffbuild_enabled() {
7+
return 0
8+
}
9+
10+
ffbuild_dockerbuild() {
11+
mkdir build && cd build
12+
13+
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
14+
-DBUILD_SHARED_LIBS=OFF -DSNAPPY_BUILD_TESTS=OFF -DSNAPPY_BUILD_BENCHMARKS=OFF -DSNAPPY_FUZZING_BUILD=OFF \
15+
-DSNAPPY_REQUIRE_AVX=OFF -DSNAPPY_REQUIRE_AVX2=OFF ..
16+
make -j$(nproc)
17+
make install
18+
}
19+
20+
ffbuild_configure() {
21+
echo --enable-libsnappy
22+
}
23+
24+
ffbuild_unconfigure() {
25+
echo --disable-libsnappy
26+
}

0 commit comments

Comments
 (0)