Otok public index

apotocki/expat

Expat, a stream-oriented XML parser library written in C.

Library
expat
Newest
2.10.0 (r1, android)
Targets
android, apple, linux, windows
License
MIT
Homepage
https://libexpat.github.io
Documentation
https://libexpat.github.io/doc/
Keywords
xml, parser

Use it

In otok.toml:

[deps.expat]
recipe = "apotocki/expat"
version = "~> 2.10.0"

Versions

VersionTargetChannelPublishedStatus
2.10.0 (r1, android) android stable 2026-11-13
2.10.0 (r1, apple) apple stable 2026-11-14
2.10.0 (r1, linux) linux stable 2026-11-14
2.10.0 (r1, windows) windows stable 2026-11-13

2.10.0 (r1, android)

Platforms

android

Toolchains

Recipe files

build.lua 603 bytes · raw
-- Expat's CMake project, the library only (no xmlwf, examples or tests). What it installs: libexpat.a, or libexpat.so with its links.
function build(slice, options, deps)
    local static = slice.linkage == "static"
    otok.cmake{ defines = {
        EXPAT_SHARED_LIBS = not static, EXPAT_BUILD_TOOLS = false, EXPAT_BUILD_EXAMPLES = false, EXPAT_BUILD_TESTS = false,
        EXPAT_BUILD_DOCS = false, EXPAT_BUILD_FUZZERS = false,
    } }
    local p = slice.prefix
    return { libraries = { expat = otok.glob(static and "lib/libexpat.a" or "lib/libexpat.so", p)[1] }, headers = p .. "/include" }
end
recipe.toml 985 bytes · raw
# The otok recipe of Expat (https://github.com/apotocki/otok): libexpat for Android, from the release archive, with Expat's CMake, the
# library only (no xmlwf, examples or tests); static or dynamic.
[recipe]
api = 1
library = "expat"
name = "expat"
version = "2.10.0"
revision = 1
license = "MIT"
license-files = ["COPYING"]
homepage = "https://libexpat.github.io"
documentation = "https://libexpat.github.io/doc/"
description = "Expat, a stream-oriented XML parser library written in C."
keywords = ["xml", "parser"]
linkage = ["static", "dynamic"]

[source]
url = "https://github.com/libexpat/libexpat/releases/download/R_2_10_0/expat-2.10.0.tar.xz"
sha256 = "c624ba2998fc65df1163a49641ff3f9ab73138b11641d92c86bee0fb01b1bc7f"

[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 = "Expat"
libraries = ["expat"]