Skip to content

Add zix 0.8.0 to xrepo#9871

Open
EZ4Stephen wants to merge 2 commits intoxmake-io:devfrom
EZ4Stephen:EZ4Stephen-patch-3
Open

Add zix 0.8.0 to xrepo#9871
EZ4Stephen wants to merge 2 commits intoxmake-io:devfrom
EZ4Stephen:EZ4Stephen-patch-3

Conversation

@EZ4Stephen
Copy link
Copy Markdown
Contributor

@EZ4Stephen EZ4Stephen commented Apr 26, 2026

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.

This closes #9839 .

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`.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/z/zix/xmake.lua Outdated
@@ -0,0 +1,29 @@
package("zix")
set_description("A lightweight C99 portability and data structure library")
set_license("0BSD", "ISC")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

set_license should ideally be a single string following the SPDX expression format (e.g., "0BSD OR ISC" or "0BSD AND ISC"). Passing multiple arguments may result in only the first license being correctly recognized by the package manager metadata parser.

    set_license("0BSD OR ISC")

Comment thread packages/z/zix/xmake.lua
Comment on lines +12 to +25
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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New Package]: zix

1 participant