Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xmake-io/xmake-repo
π¦ An official xmake package repository
https://github.com/xmake-io/xmake-repo
build cross-platform package repository xmake
Last synced: 5 days ago
JSON representation
π¦ An official xmake package repository
- Host: GitHub
- URL: https://github.com/xmake-io/xmake-repo
- Owner: xmake-io
- License: apache-2.0
- Created: 2017-04-09T13:56:00.000Z (over 7 years ago)
- Default Branch: dev
- Last Pushed: 2024-10-29T14:08:42.000Z (about 1 month ago)
- Last Synced: 2024-10-29T16:09:33.235Z (about 1 month ago)
- Topics: build, cross-platform, package, repository, xmake
- Language: Lua
- Homepage: https://xrepo.xmake.io
- Size: 8.73 MB
- Stars: 684
- Watchers: 16
- Forks: 398
- Open Issues: 282
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-xmake - xmake-repo
README
## Supporting the project
Support this project by [becoming a sponsor](https://xmake.io/#/about/sponsor). Your logo will show up here with a link to your website. π
## Introduction ([δΈζ](/README_zh.md))
xmake-repo is an official xmake package repository.
## Package dependences
## Package management
If you want to know more, please refer to the xmake documentation:
* [Documents](https://xmake.io/#/package/remote_package)
* [Github](https://github.com/xmake-io/xmake)
* [HomePage](https://xmake.io)## Xrepo
xrepo is a cross-platform C/C++ package manager based on [Xmake](https://github.com/xmake-io/xmake).
It is based on the runtime provided by xmake, but it is a complete and independent package management program. Compared with package managers such as vcpkg/homebrew, xrepo can provide C/C++ packages for more platforms and architectures at the same time.
If you want to know more, please refer to the xrepo documentation:
* [Documents](https://xrepo.xmake.io/#/getting_started)
* [Github](https://github.com/xmake-io/xrepo)
* [Gitee](https://gitee.com/tboox/xrepo)![](https://xrepo.xmake.io/assets/img/xrepo.gif)
## Submit package to repository
Write a xmake.lua of new package in `packages/x/xxx/xmake.lua` and push a pull-request to the dev branch.
For example, [packages/z/zlib/xmake.lua](https://github.com/xmake-io/xmake-repo/blob/dev/packages/z/zlib/xmake.lua):
If you want to known more, please see: [Create and Submit packages to the official repository](https://xmake.io/#/package/remote_package?id=submit-packages-to-the-official-repository)
## Create a package template from Github
We need to install the [gh](https://github.com/cli/cli) cli tool first, and then execute the following command to log in to github.
```console
$ gh auth login
```Create a package configuration file to this warehouse based on the package address of github.
```console
$ xmake l scripts/new.lua github:glennrp/libpng
package("libpng")
set_homepage("http://libpng.sf.net")
set_description("LIBPNG: Portable Network Graphics support, official libpng repository")add_urls("https://github.com/glennrp/libpng/archive/refs/tags/$(version).tar.gz",
"https://github.com/glennrp/libpng.git")
add_versions("v1.6.35", "6d59d6a154ccbb772ec11772cb8f8beb0d382b61e7ccc62435bf7311c9f4b210")add_deps("cmake")
on_install(function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end)on_test(function (package)
assert(package:has_cfuncs("foo", {includes = "foo.h"}))
end)
packages/l/libpng/xmake.lua generated!
```### Test a package in local
```console
$ xmake l scripts/test.lua --shallow -vD zlib
$ xmake l scripts/test.lua --shallow -vD -p iphoneos zlib
$ xmake l scripts/test.lua --shallow -vD -k shared -m debug zlib
$ xmake l scripts/test.lua --shallow -vD --vs_runtime=MD zlib
```