Add zix 0.8.0 to xrepo#9871
Conversation
Added 2 licenses, not sure if it needs change. (per https://gitlab.com/drobilla/zix/-/tree/main/LICENSES?ref_type=heads ) Adds zix-0 to include paths Adds ZIX_STATIC define Disabled benchmarks fully. Unsure if it should be optional, but if it should be optional, glib would need to be added as a dependency when building with benchmarks enabled. Available options at https://gitlab.com/drobilla/zix/-/blob/main/meson_options.txt?ref_type=heads -Note html and singlehtml are within docs folder, so disabling docs disables those as well, removing need for adding `-Dhtml=disabled` or `-Dsinglehtml=disabled`.
There was a problem hiding this comment.
Code Review
This pull request introduces the zix package, a C99 portability and data structure library. The review feedback highlights the need to use a single SPDX string for the license and recommends moving metadata configurations like includedirs and defines to an on_load block to follow idiomatic practices and resolve indentation inconsistencies.
| @@ -0,0 +1,29 @@ | |||
| package("zix") | |||
| set_description("A lightweight C99 portability and data structure library") | |||
| set_license("0BSD", "ISC") | |||
There was a problem hiding this comment.
| on_install(function (package) | ||
| local configs = { | ||
| "-Dbenchmarks=disabled", | ||
| "-Ddocs=disabled", | ||
| "-Dtests=disabled", | ||
| "-Dtests_cpp=disabled", | ||
| } | ||
| import("package.tools.meson").install(package, configs) | ||
| package:add("includedirs", path.join("include", "zix-0")) | ||
| if not package:config("shared") then | ||
| package:add("defines", "ZIX_STATIC") | ||
| end | ||
|
|
||
| end) |
There was a problem hiding this comment.
The on_install block contains inconsistent indentation, mixing tabs and spaces. Additionally, it is more idiomatic in xmake-repo to place exported configurations like includedirs and defines in an on_load block. This ensures that the package metadata is correctly configured regardless of the installation state (e.g., when the package is already cached).
on_load(function (package)
package:add("includedirs", "include/zix-0")
if not package:config("shared") then
package:add("defines", "ZIX_STATIC")
end
end)
on_install(function (package)
local configs = {
"-Dbenchmarks=disabled",
"-Ddocs=disabled",
"-Dtests=disabled",
"-Dtests_cpp=disabled",
}
import("package.tools.meson").install(package, configs)
end)
Removed the tabs. Set ISC only as license. Put the setting of include path and the static define in an on_load block.
Added 2 licenses, not sure if it needs change. (per https://gitlab.com/drobilla/zix/-/tree/main/LICENSES?ref_type=heads )
Adds zix-0 to include paths
Adds ZIX_STATIC define
Disabled benchmarks fully. Unsure if it should be optional, but if it should be optional, glib would need to be added as a dependency when building with benchmarks enabled.
Available options at https://gitlab.com/drobilla/zix/-/blob/main/meson_options.txt?ref_type=heads
-Note html and singlehtml are within docs folder, so disabling docs disables those as well, removing need for adding
-Dhtml=disabledor-Dsinglehtml=disabled.This closes #9839 .