Otok public index

apotocki/zstd

apotocki/zstd 1.5.7 (r1, android)

Library
zstd
Variant
android, target android
Channel
stable
Published
2026-11-13
Recipe source
https://github.com/otok-dev/recipes.git
b970f0bb534a7425d6b6fdf304db08dca4a92f7b in recipes/zstd/1.5/android/
Recipe SHA-256
33286c1b0e13b6dfec960bd804fb90901da4f75c7bc18f2509255d9383e353b6

Recipe files changed

Inputs

source.sha256eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3
source.urlhttps://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz

Platforms

android

Toolchains

Recipe files

build.lua 868 bytes · raw
-- The CMake project in build/cmake, the library only (no programs, tests or contrib). What it installs: libzstd.a, or libzstd.so
-- with its links.
function build(slice, options, deps)
    local static = slice.linkage == "static"
    otok.cmake{
        source = slice.source .. "/build/cmake",
        defines = { ZSTD_BUILD_STATIC = static, ZSTD_BUILD_SHARED = not static, ZSTD_BUILD_PROGRAMS = false,
            ZSTD_BUILD_TESTS = false, ZSTD_BUILD_CONTRIB = false, ZSTD_FRAMEWORK = false,
            -- zstd tests the level to know whether bionic has fseeko, and its CMake leaves threads off for Android
            ANDROID_PLATFORM_LEVEL = slice.android.api, ZSTD_MULTITHREAD_SUPPORT = true },
    }
    local p = slice.prefix
    return { libraries = { zstd = otok.glob(static and "lib/libzstd.a" or "lib/libzstd.so", p)[1] }, headers = p .. "/include" }
end
recipe.toml 1010 bytes · raw
# The otok recipe of Zstandard (https://github.com/apotocki/otok): libzstd for Android, from the release archive, with the
# CMake project in build/cmake, the library only; static or dynamic.
[recipe]
api = 1
library = "zstd"
name = "zstd"
version = "1.5.7"
revision = 1
license = "BSD-3-Clause OR GPL-2.0-only"
license-files = ["LICENSE"]
homepage = "https://facebook.github.io/zstd/"
documentation = "https://facebook.github.io/zstd/zstd_manual.html"
description = "Zstandard, a fast lossless compression algorithm."
keywords = ["compression", "zstd"]
linkage = ["static", "dynamic"]

[source]
url = "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz"
sha256 = "eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3"

[platforms]
supported = ["android"]
build-on = ["*/ndk"]

[toolchains]
cmake = { version = ">= 3.20", default-recipe = "apotocki/cmake" }
ninja = { version = ">= 1.10", default-recipe = "apotocki/ninja" }

[[product]]
name = "Zstd"
libraries = ["zstd"]