apotocki/bzip2 1.0.8 (r1, apple)
- Library
- bzip2
- Variant
- apple, target apple
- Channel
- stable
- Published
- 2026-11-07
- Recipe source
- https://github.com/otok-dev/recipes
32756a87cf5bd189ca4c9825159bf0713ea8cf5einrecipes/bzip2/1.0/apple/ - Recipe SHA-256
9bfbcd2ea0c33c2d6f49ab43b42314be3acb80c5f1275b899c4a52c646bf9cfe
Recipe files changed
Inputs
| source.sha256 | ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269 |
|---|---|
| source.url | https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz |
Platforms
ios, iossim, macosx, catalyst, tvos, tvossim, watchos, watchossim, xros, xrossim
Toolchains
cmake { default-recipe = "apotocki/cmake", version = ">= 3.20" }ninja { default-recipe = "apotocki/ninja", version = ">= 1.10" }
Recipe files
CMakeLists.txt
# libbz2 of the otok recipe: the objects of the release's Makefile (OBJS), without the bzip2 and bzip2recover
# programs, static or shared as BUILD_SHARED_LIBS says.
cmake_minimum_required(VERSION 3.20...4.0)
project(bzip2 VERSION 1.0.8 LANGUAGES C)
add_library(bz2 blocksort.c huffman.c crctable.c randtable.c compress.c decompress.c bzlib.c)
# the soname of Makefile-libbz2_so: libbz2.so.1.0
set_target_properties(bz2 PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION 1.0)
if(WIN32)
# bzlib.h declares the API without dllexport
set_target_properties(bz2 PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
if(MSVC)
target_compile_definitions(bz2 PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()
install(TARGETS bz2 RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
install(FILES bzlib.h DESTINATION include)
build.lua
-- libbz2 through the recipe's CMakeLists.txt: the release has only makefiles (a static library, a Linux
-- shared one, MSVC's makefile.msc), no CMake project.
function build(slice, options, deps)
otok.copy(slice.recipe .. "/CMakeLists.txt", slice.source .. "/CMakeLists.txt")
otok.cmake{}
local p = slice.prefix
return { libraries = { bz2 = p .. "/lib/libbz2.a" }, headers = p .. "/include" }
end
recipe.toml
# The otok recipe of bzip2 (https://github.com/apotocki/otok): libbz2 for every Apple platform, from the release
# archive; static.
[recipe]
api = 1
library = "bzip2"
name = "bzip2"
version = "1.0.8"
revision = 1
license = "bzip2-1.0.6"
license-files = ["LICENSE"]
homepage = "https://sourceware.org/bzip2/"
description = "libbz2, the bzip2 compression library."
keywords = ["compression", "bzip2"]
linkage = ["static"]
[source]
url = "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz"
sha256 = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"
[platforms]
supported = ["ios", "iossim", "macosx", "catalyst", "tvos", "tvossim", "watchos", "watchossim", "xros", "xrossim"]
build-on = ["macos/xcode"]
[toolchains]
cmake = { version = ">= 3.20", default-recipe = "apotocki/cmake" }
ninja = { version = ">= 1.10", default-recipe = "apotocki/ninja" }
[[product]]
name = "BZip2"
libraries = ["bz2"]
apple = { privacy-manifest = "none" }