Otok public index

apotocki/libpng

apotocki/libpng 1.6.47 (r1, linux)

Library
libpng
Variant
linux, target linux
Channel
stable
Published
2026-11-07
Recipe source
https://github.com/otok-dev/recipes
32756a87cf5bd189ca4c9825159bf0713ea8cf5e in recipes/libpng/1.6/linux/
Recipe SHA-256
71e8caa18ea839185a96299444cccbf1d4ab66dbc9fa8f8589321e25aeb28e86

Recipe files changed

Inputs

source.commit872555f4ba910252783af1507f9e7fe1653be252
source.githttps://github.com/pnggroup/libpng
source.tagv1.6.47

Platforms

linux

Dependencies

LibraryVersionRecipeDetails
zlib >= 1.2 apotocki/zlib

Toolchains

Recipe files

build.lua 726 bytes · raw
-- libpng's CMake project, the library only. What it installs: libpng16.a, or libpng16.so with its links (libpng16d in
-- debug); the headers in include/ and include/libpng16/, and libpng.pc.
function build(slice, options, deps)
    local static = slice.linkage == "static"
    -- FindZLIB takes a static zlib only when told to look for one
    otok.cmake{ defines = { PNG_SHARED = not static, PNG_STATIC = static, PNG_TESTS = false, PNG_TOOLS = false, PNG_FRAMEWORK = false,
        ZLIB_USE_STATIC_LIBS = deps.zlib.linkage == "static" } }
    local p = slice.prefix
    local lib = otok.glob(static and "lib/libpng16*.a" or "lib/libpng16*.so", p)[1]
    return { libraries = { png16 = lib }, headers = p .. "/include" }
end
recipe.toml 925 bytes · raw
# The otok recipe of libpng (https://github.com/apotocki/otok): libpng16 for Linux, from the release tag, with zlib of
# its own recipe; static or dynamic.
[recipe]
api = 1
library = "libpng"
name = "libpng"
version = "1.6.47"
revision = 1
license = "libpng-2.0"
license-files = ["LICENSE"]
homepage = "http://www.libpng.org/pub/png/libpng.html"
description = "libpng, the reference library for PNG images."
keywords = ["png", "image"]
linkage = ["static", "dynamic"]

[source]
git = "https://github.com/pnggroup/libpng"
commit = "872555f4ba910252783af1507f9e7fe1653be252"
tag = "v1.6.47"

[platforms]
supported = ["linux"]
build-on = ["linux/gcc", "linux/clang"]

[deps.zlib]
version = ">= 1.2"
default-recipe = "apotocki/zlib"

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

[[product]]
name = "PNG"
libraries = ["png16"]