Skip to content

Commit

Permalink
Add libsnappy for hap encoding support
Browse files Browse the repository at this point in the history
Closes BtbN#443
  • Loading branch information
BtbN committed Jan 12, 2025
1 parent e13f9ee commit c082928
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions scripts.d/50-snappy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

SCRIPT_REPO="https://github.com/google/snappy.git"
SCRIPT_COMMIT="32ded457c0b1fe78ceb8397632c416568d6714a0"

ffbuild_enabled() {
return 0
}

ffbuild_dockerbuild() {
mkdir build && cd build

cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
-DBUILD_SHARED_LIBS=OFF -DSNAPPY_BUILD_TESTS=OFF -DSNAPPY_BUILD_BENCHMARKS=OFF -DSNAPPY_FUZZING_BUILD=OFF \
-DSNAPPY_REQUIRE_AVX=OFF -DSNAPPY_REQUIRE_AVX2=OFF ..
make -j$(nproc)
make install
}

ffbuild_configure() {
echo --enable-libsnappy
}

ffbuild_unconfigure() {
echo --disable-libsnappy
}

0 comments on commit c082928

Please sign in to comment.