xmake-repo

travis-ci appveyor-ci license
Reddit Gitter Telegram QQ Donate

一个官方的xmake包管理仓库

## 简介 xmake-repo是一个官方的xmake包管理仓库,收录了常用的c/c++开发包,提供跨平台支持。 ## 包依赖描述 ## 包依赖管理 如果你想要了解更多,请参考: * [在线文档](https://xmake.io/#/zh/) * [在线源码](https://github.com/xmake-io/xmake) * [项目主页](https://xmake.io/cn) ## 提交一个新包到仓库 在`packages/x/xxx/xmake.lua`中写个关于新包的xmake.lua描述,然后提交一个pull-request到dev分支。 例如:[packages/z/zlib/xmake.lua](https://github.com/xmake-io/xmake-repo/blob/dev/packages/z/zlib/xmake.lua): 关于如何制作包的更详细描述,请参看文档:[制作和提交到官方仓库](https://xmake.io/#/zh-cn/package/remote_package?id=%e6%b7%bb%e5%8a%a0%e5%8c%85%e5%88%b0%e4%bb%93%e5%ba%93) ```lua package("zlib") set_homepage("http://www.zlib.net") set_description("A Massively Spiffy Yet Delicately Unobtrusive Compression Library") set_urls("http://zlib.net/zlib-$(version).tar.gz", "https://downloads.sourceforge.net/project/libpng/zlib/$(version)/zlib-$(version).tar.gz") add_versions("1.2.10", "8d7e9f698ce48787b6e1c67e6bff79e487303e66077e25cb9784ac8835978017") add_versions("1.2.11", "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1") on_install("windows", function (package) io.gsub("win32/Makefile.msc", "%-MD", "-" .. package:config("vs_runtime")) os.vrun("nmake -f win32\\Makefile.msc zlib.lib") os.cp("zlib.lib", package:installdir("lib")) os.cp("*.h", package:installdir("include")) end) on_install("linux", "macosx", function (package) import("package.tools.autoconf").install(package, {"--static"}) end) on_install("iphoneos", "android@linux,macosx", "mingw@linux,macosx", function (package) import("package.tools.autoconf").configure(package, {host = "", "--static"}) io.gsub("Makefile", "\nAR=.-\n", "\nAR=" .. (package:build_getenv("ar") or "") .. "\n") io.gsub("Makefile", "\nARFLAGS=.-\n", "\nARFLAGS=cr\n") io.gsub("Makefile", "\nRANLIB=.-\n", "\nRANLIB=\n") os.vrun("make install -j4") end) on_test(function (package) assert(package:has_cfuncs("inflate", {includes = "zlib.h"})) end) ``` ## 被支持的包列表 |linux|windows|mingw|iphoneos|macosx|android| |-----|-------|-----|--------|------|-------| |autoconf|bzip2|doctest|doctest|autoconf|doctest|| |automake|cairo|nlohmann_json|libev|automake|libjpeg|| |bzip2|cmake|tbox|libjpeg|bzip2|libpng|| |cairo|doctest|zlib|libpng|cairo|libuv|| |cjson|expat||libuv|cjson|nlohmann_json|| |cmake(x86_64)|freeglut||nlohmann_json|cmake|tbox|| |doctest|freetype||tbox|doctest|zlib|| |expat|glew||zlib|expat||| |ffmpeg|go|||ffmpeg||| |fontconfig|libjpeg|||fontconfig||| |freeglut|libpng|||freetype||| |freetype|libsdl|||glew||| |glew|libuv|||go||| |go|lua|||gperf||| |gperf|luajit|||json-c||| |json-c|make|||libev||| |libev|nlohmann_json|||libiconv||| |libiconv|patch|||libjpeg||| |libjpeg|pcre|||libmill||| |libmill|pixman|||libpng||| |libpng|python|||libsdl||| |libsdl|sqlite3|||libtask||| |libtask|tbox|||libtool||| |libtool|zlib|||libuv||| |libuv||||libxml2||| |libxml2||||lua||| 这里只显示了部分包,如果你想看所有包列表,可以看下:[PKGLIST.md](https://github.com/xmake-io/xmake-repo/blob/master/PKGLIST.md) 我们也非常欢迎大家能够贡献一些进来。🙏