Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to inherit base package #2011

Closed
waruqi opened this issue Jan 25, 2022 · 2 comments
Closed

Support to inherit base package #2011

waruqi opened this issue Jan 25, 2022 · 2 comments

Comments

@waruqi
Copy link
Member

waruqi commented Jan 25, 2022

I can use this feature set_base to override the partial configuration of builtin package in xmake-repo.

Override package configuration

for example: override package urls, ...

package("myzlib")
    set_base("zlib")
    set_urls("https://github.com/madler/zlib.git")
package_end()

add_requires("myzlib", {system = false, alias = "zlib"})

target("test")
    set_kind("binary")
    add_files("src/*.c")
    add_packages("zlib")

Define alias package in repositories

like this, an alias package(onetbb -> tbb): https://github.com/xmake-io/xmake-repo/blob/master/packages/o/onetbb/xmake.lua

package("onetbb", {base = "tbb"})

or

package("onetbb")
    set_base("tbb")

xmake.lua

add_requires("onetbb")

Related issues: #2010

@maximegmd
Copy link

Does this mean we can also add versions without making a PR?

@waruqi
Copy link
Member Author

waruqi commented Jan 25, 2022

Does this mean we can also add versions without making a PR?

You can do it, but I still hope you can open pr to help update the package versions in the repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants