diff --git a/.agents/docs/2026-05-30-official-mcpp-index-migration-plan.md b/.agents/docs/2026-05-30-official-mcpp-index-migration-plan.md new file mode 100644 index 00000000..b10f2766 --- /dev/null +++ b/.agents/docs/2026-05-30-official-mcpp-index-migration-plan.md @@ -0,0 +1,84 @@ +# xlings: Official mcpp-index Migration Plan + +> 状态: in progress +> 分支: `codex/use-official-mcpp-index` +> PR: https://github.com/openxlings/xlings/pull/314 +> 目标: xlings 不再维护项目本地 mcpp 索引,直接使用默认官方 mcpp-index,并保持 `mcpp.toml` 简洁可维护。 + +## 当前问题 + +当前 `mcpp.toml` 直接包含大量第三方 C 库 configure 宏,并通过本地索引声明 `xlings.libarchive`。这能构建,但不是理想生态: + +- xlings 承担了 libarchive/xz/zstd/zlib 等包的维护责任。 +- 宏污染根 manifest,后续其他项目无法复用。 +- 默认 mcpp-index 不能独立满足 xlings 构建。 + +## 目标形态 + +```toml +[indices] +# 不再需要项目本地 xlings mcpp index。 + +[dependencies] +ftxui = "6.1.9" + +[dependencies.compat] +libarchive = "3.8.7" + +[dependencies.mcpplibs] +cmdline = "0.0.2" +xpkg = "0.0.41" +tinyhttps = "0.2.3" +capi.lua = "0.0.3" +``` + +官方包索引采用 `compat.libarchive`,因此 xlings 使用 `[dependencies.compat]` 显式声明归档库,避免项目维护自定义 index。 + +## xlings 侧待办 + +- [x] 等 mcpp 0.0.35 发布并本地安装。 +- [x] mcpp-index PR #17 提供 `compat.libarchive` 及其传递依赖。 +- [x] xim-pkgindex PR #259 已合入,`xim:mcpp` bootstrap 版本升到 `0.0.35`。 +- [x] 删除 `mcpp/pkgs/*`。 +- [x] 删除 `mcpp/include/*` 中仅为第三方包服务的配置头。 +- [x] 精简 `mcpp.toml` 的 `build.cflags`,只保留 xlings 自身语义。 +- [x] 更新 `mcpp.lock`。 +- [x] 本地验证 glibc target。 +- [x] 本地验证 musl static target。 +- [x] 创建 xlings PR draft。 +- [ ] CI 通过后合入并发布新版本。 + +## 验证命令 + +```bash +mcpp self doctor +mcpp build +mcpp build --target x86_64-linux-musl +target/x86_64-linux-gnu/*/bin/xlings --version +target/x86_64-linux-musl/*/bin/xlings --version +``` + +## Checkpoints + +- [x] 文档 checkpoint commit。 +- [x] mcpp 0.0.35 本地联调通过。 +- [x] 官方 mcpp-index 联调通过。 +- [x] xlings PR draft 创建: https://github.com/openxlings/xlings/pull/314 +- [ ] CI 每 120s 检查一次直到完成。 +- [ ] 合入后发布 xlings 新版本。 + +## 当前 CI 状态 + +旧 run 的三平台 CI 失败在 `mcpp build` 的 `compat.libarchive@3.8.7` +下载阶段。根因是 GitHub runner 当时使用的官方 mcpp-index `main` 尚未包含 +`compat.libarchive`。 + +截至 2026-05-30: + +- mcpp PR #88 已合入并发布 `v0.0.35`。 +- mcpplibs/mcpp-index PR #17 已合入 main。 +- openxlings/xim-pkgindex PR #259 已合入 main,CI/release 现在 pin 到 + `cf3d0fa64e8be120c3c703c8702f294f271026ad`,包含 `xim:mcpp@0.0.35`。 +- xlings CI/release 在安装 mcpp 后会清理缓存中的默认 `mcpplibs` index checkout, + 避免 actions/cache 恢复旧 index 后看不到刚合入的 `compat.*` 包。 +- 下一步是重跑 xlings PR #314 CI,验证官方 index 路径和新版 mcpp bootstrap。 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ced83168..c29437f2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,8 +16,8 @@ env: # Pinned bootstrap xlings used to install mcpp. Bump together with # XIM_PKGINDEX_REF so release uses a known-good xlings + package index pair. BOOTSTRAP_XLINGS_VERSION: v0.4.44 - # Includes mcpp 0.0.33 for all release builds. - XIM_PKGINDEX_REF: ab8e20d496741caadad4627706e5ce2c46a6c4b1 + # Includes mcpp 0.0.35 for all release builds. + XIM_PKGINDEX_REF: cf3d0fa64e8be120c3c703c8702f294f271026ad jobs: build-linux: @@ -71,6 +71,11 @@ jobs: mcpp --version mcpp self version + - name: Refresh mcpp package index cache + run: | + rm -rf "$HOME/.mcpp/registry/data/mcpplibs" + rm -rf "$GITHUB_WORKSPACE/.mcpp/registry/data/mcpplibs" + - name: Prepare fixture index repo run: | bash tests/e2e/prepare_fixture_index.sh @@ -132,6 +137,11 @@ jobs: mcpp --version mcpp self version + - name: Refresh mcpp package index cache + run: | + rm -rf "$HOME/.mcpp/registry/data/mcpplibs" + rm -rf "$GITHUB_WORKSPACE/.mcpp/registry/data/mcpplibs" + - name: Build (macos_release) run: | chmod +x ./tools/macos_release.sh @@ -198,6 +208,12 @@ jobs: mcpp --version mcpp self version + - name: Refresh mcpp package index cache + shell: pwsh + run: | + Remove-Item -Recurse -Force "$env:USERPROFILE\.mcpp\registry\data\mcpplibs" -ErrorAction SilentlyContinue + Remove-Item -Recurse -Force "$env:GITHUB_WORKSPACE\.mcpp\registry\data\mcpplibs" -ErrorAction SilentlyContinue + - name: Build (windows_release) shell: pwsh run: | diff --git a/.github/workflows/xlings-ci-linux.yml b/.github/workflows/xlings-ci-linux.yml index 469ed071..497233ea 100644 --- a/.github/workflows/xlings-ci-linux.yml +++ b/.github/workflows/xlings-ci-linux.yml @@ -14,8 +14,8 @@ env: # Pinned bootstrap xlings used to install mcpp. Bump together with # XIM_PKGINDEX_REF so CI uses a known-good xlings + package index pair. BOOTSTRAP_XLINGS_VERSION: v0.4.44 - # Includes mcpp 0.0.33 for all CI/release mcpp builds. - XIM_PKGINDEX_REF: ab8e20d496741caadad4627706e5ce2c46a6c4b1 + # Includes mcpp 0.0.35 for all CI/release mcpp builds. + XIM_PKGINDEX_REF: cf3d0fa64e8be120c3c703c8702f294f271026ad jobs: build-and-test: @@ -72,6 +72,11 @@ jobs: mcpp --version mcpp self version + - name: Refresh mcpp package index cache + run: | + rm -rf "$HOME/.mcpp/registry/data/mcpplibs" + rm -rf "$GITHUB_WORKSPACE/.mcpp/registry/data/mcpplibs" + - name: Prepare unit fixture index repo run: | bash tests/e2e/prepare_fixture_index.sh ../xim-pkgindex diff --git a/.github/workflows/xlings-ci-macos.yml b/.github/workflows/xlings-ci-macos.yml index 2b5fa958..273a7ee1 100644 --- a/.github/workflows/xlings-ci-macos.yml +++ b/.github/workflows/xlings-ci-macos.yml @@ -15,8 +15,8 @@ env: # Pinned bootstrap xlings used to install mcpp. Bump together with # XIM_PKGINDEX_REF so CI uses a known-good xlings + package index pair. BOOTSTRAP_XLINGS_VERSION: v0.4.44 - # Includes mcpp 0.0.33 for all CI/release mcpp builds. - XIM_PKGINDEX_REF: ab8e20d496741caadad4627706e5ce2c46a6c4b1 + # Includes mcpp 0.0.35 for all CI/release mcpp builds. + XIM_PKGINDEX_REF: cf3d0fa64e8be120c3c703c8702f294f271026ad jobs: build-and-test: @@ -68,6 +68,11 @@ jobs: mcpp --version mcpp self version + - name: Refresh mcpp package index cache + run: | + rm -rf "$HOME/.mcpp/registry/data/mcpplibs" + rm -rf "$GITHUB_WORKSPACE/.mcpp/registry/data/mcpplibs" + - name: Prepare unit fixture index repo run: | bash tests/e2e/prepare_fixture_index.sh ../xim-pkgindex diff --git a/.github/workflows/xlings-ci-windows.yml b/.github/workflows/xlings-ci-windows.yml index 70e907a0..26e44d7a 100644 --- a/.github/workflows/xlings-ci-windows.yml +++ b/.github/workflows/xlings-ci-windows.yml @@ -14,8 +14,8 @@ env: # Pinned bootstrap xlings used to install mcpp. Bump together with # XIM_PKGINDEX_REF so CI uses a known-good xlings + package index pair. BOOTSTRAP_XLINGS_VERSION: v0.4.44 - # Includes mcpp 0.0.33 for all CI/release mcpp builds. - XIM_PKGINDEX_REF: ab8e20d496741caadad4627706e5ce2c46a6c4b1 + # Includes mcpp 0.0.35 for all CI/release mcpp builds. + XIM_PKGINDEX_REF: cf3d0fa64e8be120c3c703c8702f294f271026ad jobs: build-and-test: @@ -76,6 +76,12 @@ jobs: mcpp --version mcpp self version + - name: Refresh mcpp package index cache + shell: pwsh + run: | + Remove-Item -Recurse -Force "$env:USERPROFILE\.mcpp\registry\data\mcpplibs" -ErrorAction SilentlyContinue + Remove-Item -Recurse -Force "$env:GITHUB_WORKSPACE\.mcpp\registry\data\mcpplibs" -ErrorAction SilentlyContinue + - name: Prepare unit fixture index repo shell: bash run: | diff --git a/.xlings.json b/.xlings.json index 2e681424..3796687f 100644 --- a/.xlings.json +++ b/.xlings.json @@ -3,6 +3,6 @@ "projectScope": false, "mirror": "GLOBAL", "workspace": { - "mcpp": "0.0.33" + "mcpp": "0.0.35" } } diff --git a/mcpp.lock b/mcpp.lock index d24d169c..2016fb0e 100644 --- a/mcpp.lock +++ b/mcpp.lock @@ -1,6 +1,12 @@ # Auto-generated by mcpp. Do not edit by hand. version = 2 +[package."compat.libarchive"] +namespace = "compat" +version = "3.8.7" +source = "index+compat@3.8.7" +hash = "fnv1a:e412742c0533bef7" + [package."ftxui"] namespace = "mcpplibs" version = "6.1.9" @@ -31,8 +37,3 @@ version = "0.0.41" source = "index+mcpplibs@0.0.41" hash = "fnv1a:6b8e5df6e20e74c3" -[package."xlings.libarchive"] -namespace = "xlings" -version = "3.8.7" -source = "index+xlings@3.8.7" -hash = "fnv1a:034847c4d720ad37" diff --git a/mcpp.toml b/mcpp.toml index 937e187f..a8cf0730 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -6,60 +6,7 @@ license = "Apache-2.0" repo = "https://github.com/openxlings/xlings" [build] -include_dirs = ["mcpp/include", "src/libs/json"] -cflags = [ - "-D_GNU_SOURCE", - "-DSIZEOF_SIZE_T=8", - "-DHAVE_STDBOOL_H=1", - "-DHAVE__BOOL=1", - "-DHAVE_STDINT_H=1", - "-DHAVE_INTTYPES_H=1", - "-DZSTD_DISABLE_ASM=1", - "-include xlings_lua_platform_config.h", - "-include xlings_zlib_config.h", - "-DLIBARCHIVE_STATIC", - "-DPLATFORM_CONFIG_H=\\\"xlings_libarchive_config.h\\\"", - "-DHAVE_BZLIB_H=1", - "-DHAVE_LIBBZ2=1", - "-DHAVE_LZ4_H=1", - "-DHAVE_LZ4HC_H=1", - "-DHAVE_LIBLZ4=1", - "-DHAVE_ZSTD_H=1", - "-DHAVE_LIBZSTD=1", - "-DHAVE_ZSTD_compressStream=1", - "-DHAVE_ZSTD_minCLevel=1", - "-DHAVE_LZMA_H=1", - "-DHAVE_LIBLZMA=1", - "-DTUKLIB_SYMBOL_PREFIX=lzma_", - "-DHAVE_CHECK_CRC32=1", - "-DHAVE_CHECK_CRC64=1", - "-DHAVE_CHECK_SHA256=1", - "-DHAVE_ENCODERS=1", - "-DHAVE_DECODERS=1", - "-DHAVE_ENCODER_LZMA1=1", - "-DHAVE_ENCODER_LZMA2=1", - "-DHAVE_ENCODER_DELTA=1", - "-DHAVE_ENCODER_X86=1", - "-DHAVE_ENCODER_POWERPC=1", - "-DHAVE_ENCODER_IA64=1", - "-DHAVE_ENCODER_ARM=1", - "-DHAVE_ENCODER_ARMTHUMB=1", - "-DHAVE_ENCODER_ARM64=1", - "-DHAVE_ENCODER_SPARC=1", - "-DHAVE_ENCODER_RISCV=1", - "-DHAVE_DECODER_LZMA1=1", - "-DHAVE_DECODER_LZMA2=1", - "-DHAVE_DECODER_DELTA=1", - "-DHAVE_DECODER_X86=1", - "-DHAVE_DECODER_POWERPC=1", - "-DHAVE_DECODER_IA64=1", - "-DHAVE_DECODER_ARM=1", - "-DHAVE_DECODER_ARMTHUMB=1", - "-DHAVE_DECODER_ARM64=1", - "-DHAVE_DECODER_SPARC=1", - "-DHAVE_DECODER_RISCV=1", - "-DHAVE_LZIP_DECODER=1", -] +include_dirs = ["src/libs/json"] cxxflags = ["-DLIBARCHIVE_STATIC", "-DXLINGS_USE_GTEST_MAIN=1", "-DUNICODE", "-D_UNICODE"] [targets.xlings] @@ -75,12 +22,11 @@ windows = "llvm@20.1.7" toolchain = "gcc@15.1.0-musl" linkage = "static" -[indices] -xlings = { path = "mcpp" } - [dependencies] ftxui = "6.1.9" -"xlings.libarchive" = "3.8.7" + +[dependencies.compat] +libarchive = "3.8.7" [dependencies.mcpplibs] cmdline = "0.0.2" diff --git a/mcpp/.gitignore b/mcpp/.gitignore deleted file mode 100644 index af16046a..00000000 --- a/mcpp/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.xlings-index-cache.json diff --git a/mcpp/include/localcharset.h b/mcpp/include/localcharset.h deleted file mode 100644 index 7246f7fd..00000000 --- a/mcpp/include/localcharset.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -static inline const char* locale_charset(void) { - return "UTF-8"; -} diff --git a/mcpp/include/xlings_libarchive_config.h b/mcpp/include/xlings_libarchive_config.h deleted file mode 100644 index e4f214ce..00000000 --- a/mcpp/include/xlings_libarchive_config.h +++ /dev/null @@ -1,113 +0,0 @@ -#pragma once - -#if defined(_WIN32) && !defined(__CYGWIN__) -#include "contrib/android/config/windows_host.h" -#else -#include "contrib/android/config/linux_host.h" -#endif - -#define __LIBARCHIVE_CONFIG_H_INCLUDED 1 - -#if !defined(__linux__) -#undef HAVE_LINUX_FIEMAP_H -#undef HAVE_LINUX_FS_H -#undef HAVE_LINUX_MAGIC_H -#undef HAVE_LINUX_TYPES_H -#undef HAVE_SYS_STATFS_H -#undef HAVE_SYS_VFS_H -#endif - -#if defined(__APPLE__) -#undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC -#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 -#undef HAVE_FUTIMESAT -#undef HAVE_ICONV -#undef HAVE_ICONV_H -#endif - -#if defined(_WIN32) && !defined(__CYGWIN__) -#include -#pragma comment(lib, "advapi32.lib") -#pragma comment(lib, "xmllite.lib") -#undef HAVE_UNISTD_H -#undef HAVE_DECL_SSIZE_MAX -#define HAVE_DECL_SSIZE_MAX 0 -#define HAVE__GET_TIMEZONE 1 -typedef ptrdiff_t ssize_t; -typedef int pid_t; -typedef unsigned short mode_t; -#ifndef PROV_RSA_AES -#define PROV_RSA_AES 24 -#endif -#ifndef CALG_SHA_256 -#define CALG_SHA_256 0x0000800c -#endif -#ifndef CALG_SHA_384 -#define CALG_SHA_384 0x0000800d -#endif -#ifndef CALG_SHA_512 -#define CALG_SHA_512 0x0000800e -#endif -// Match the project-private xmake libarchive build: all bundled -// compression backends are dependencies of the mcpp package. -#undef HAVE_BZLIB_H -#define HAVE_BZLIB_H 1 -#undef HAVE_LIBBZ2 -#define HAVE_LIBBZ2 1 -#undef HAVE_LIBLZ4 -#define HAVE_LIBLZ4 1 -#undef HAVE_LIBLZMA -#define HAVE_LIBLZMA 1 -#undef HAVE_LIBZ -#define HAVE_LIBZ 1 -#undef HAVE_LIBZSTD -#define HAVE_LIBZSTD 1 -#undef HAVE_LZ4_H -#define HAVE_LZ4_H 1 -#undef HAVE_LZ4HC_H -#define HAVE_LZ4HC_H 1 -#undef HAVE_LZMA_H -#define HAVE_LZMA_H 1 -// Keep this undefined: libarchive checks this macro with #ifdef. -#undef HAVE_LZMA_STREAM_ENCODER_MT -#undef HAVE_ZLIB_H -#define HAVE_ZLIB_H 1 -#undef HAVE_ZSTD_H -#define HAVE_ZSTD_H 1 -#undef HAVE_ZSTD_compressStream -#define HAVE_ZSTD_compressStream 1 -#undef HAVE_ZSTD_minCLevel -#define HAVE_ZSTD_minCLevel 1 -#endif - -#undef HAVE_LOCALCHARSET_H -#define HAVE_LOCALCHARSET_H 1 - -#undef HAVE_LOCALE_CHARSET -#define HAVE_LOCALE_CHARSET 1 - -#undef HAVE_CLOSEFROM -#define HAVE_CLOSEFROM 0 - -#undef HAVE_CLOSE_RANGE -#define HAVE_CLOSE_RANGE 0 - -#ifndef HAVE_DECL_INT32_MAX -#define HAVE_DECL_INT32_MAX 1 -#endif - -#ifndef HAVE_DECL_INT32_MIN -#define HAVE_DECL_INT32_MIN 1 -#endif - -#ifndef HAVE_DECL_UINTMAX_MAX -#define HAVE_DECL_UINTMAX_MAX 1 -#endif - -#ifndef HAVE_DECL_INTMAX_MAX -#define HAVE_DECL_INTMAX_MAX 1 -#endif - -#ifndef HAVE_DECL_INTMAX_MIN -#define HAVE_DECL_INTMAX_MIN 1 -#endif diff --git a/mcpp/include/xlings_lua_platform_config.h b/mcpp/include/xlings_lua_platform_config.h deleted file mode 100644 index e23c2b07..00000000 --- a/mcpp/include/xlings_lua_platform_config.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef XLINGS_LUA_PLATFORM_CONFIG_H -#define XLINGS_LUA_PLATFORM_CONFIG_H - -#if !defined(_WIN32) && !defined(LUA_USE_LINUX) && !defined(LUA_USE_MACOSX) -#if defined(__APPLE__) -#define LUA_USE_MACOSX -#else -#define LUA_USE_LINUX -#endif -#endif - -#endif diff --git a/mcpp/include/xlings_zlib_config.h b/mcpp/include/xlings_zlib_config.h deleted file mode 100644 index 45accbc3..00000000 --- a/mcpp/include/xlings_zlib_config.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef XLINGS_ZLIB_CONFIG_H -#define XLINGS_ZLIB_CONFIG_H - -#if !defined(_WIN32) -#define Z_HAVE_UNISTD_H 1 -#endif - -#endif diff --git a/mcpp/pkgs/b/bzip2.lua b/mcpp/pkgs/b/bzip2.lua deleted file mode 100644 index 9247a776..00000000 --- a/mcpp/pkgs/b/bzip2.lua +++ /dev/null @@ -1,47 +0,0 @@ -package = { - spec = "1", - name = "bzip2", - description = "A freely available high-quality data compressor", - licenses = {"bzip2-1.0.6"}, - repo = "https://sourceware.org/bzip2/", - type = "package", - - xpm = { - linux = { - ["1.0.8"] = { - url = "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz", - sha256 = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269", - }, - }, - macosx = { - ["1.0.8"] = { - url = "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz", - sha256 = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269", - }, - }, - windows = { - ["1.0.8"] = { - url = "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz", - sha256 = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269", - }, - }, - }, - - mcpp = { - language = "c++23", - import_std = false, - c_standard = "c11", - include_dirs = {"*"}, - sources = { - "*/blocksort.c", - "*/bzlib.c", - "*/compress.c", - "*/crctable.c", - "*/decompress.c", - "*/huffman.c", - "*/randtable.c", - }, - targets = { ["bzip2"] = { kind = "lib" } }, - deps = {}, - }, -} diff --git a/mcpp/pkgs/l/libarchive.lua b/mcpp/pkgs/l/libarchive.lua deleted file mode 100644 index 75fc85b0..00000000 --- a/mcpp/pkgs/l/libarchive.lua +++ /dev/null @@ -1,173 +0,0 @@ -package = { - spec = "1", - name = "libarchive", - description = "Multi-format archive and compression library", - licenses = {"BSD-2-Clause"}, - repo = "https://libarchive.org/", - type = "package", - - xpm = { - linux = { - ["3.8.7"] = { - url = "https://libarchive.org/downloads/libarchive-3.8.7.tar.gz", - sha256 = "4b787cca6697a95c7725e45293c973c208cbdc71ae2279f30ef09f52472b9166", - }, - }, - macosx = { - ["3.8.7"] = { - url = "https://libarchive.org/downloads/libarchive-3.8.7.tar.gz", - sha256 = "4b787cca6697a95c7725e45293c973c208cbdc71ae2279f30ef09f52472b9166", - }, - }, - windows = { - ["3.8.7"] = { - url = "https://github.com/libarchive/libarchive/archive/refs/tags/v3.8.7.zip", - sha256 = "8e16ac8797510144ab71ead4181ea1efb28e036b9fed283e57490ea39b8180d2", - }, - }, - }, - - mcpp = { - language = "c++23", - import_std = false, - c_standard = "c11", - include_dirs = {"*", "*/libarchive"}, - sources = { - "*/libarchive/archive_acl.c", - "*/libarchive/archive_blake2s_ref.c", - "*/libarchive/archive_blake2sp_ref.c", - "*/libarchive/archive_check_magic.c", - "*/libarchive/archive_cmdline.c", - "*/libarchive/archive_cryptor.c", - "*/libarchive/archive_digest.c", - "*/libarchive/archive_entry.c", - "*/libarchive/archive_entry_copy_stat.c", - "*/libarchive/archive_entry_link_resolver.c", - "*/libarchive/archive_entry_sparse.c", - "*/libarchive/archive_entry_stat.c", - "*/libarchive/archive_entry_strmode.c", - "*/libarchive/archive_entry_xattr.c", - "*/libarchive/archive_hmac.c", - "*/libarchive/archive_match.c", - "*/libarchive/archive_options.c", - "*/libarchive/archive_pack_dev.c", - "*/libarchive/archive_parse_date.c", - "*/libarchive/archive_pathmatch.c", - "*/libarchive/archive_ppmd8.c", - "*/libarchive/archive_ppmd7.c", - "*/libarchive/archive_random.c", - "*/libarchive/archive_rb.c", - "*/libarchive/archive_read.c", - "*/libarchive/archive_read_add_passphrase.c", - "*/libarchive/archive_read_append_filter.c", - "*/libarchive/archive_read_data_into_fd.c", - "*/libarchive/archive_read_disk_entry_from_file.c", - "*/libarchive/archive_read_disk_posix.c", - "*/libarchive/archive_read_disk_windows.c", - "*/libarchive/archive_read_disk_set_standard_lookup.c", - "*/libarchive/archive_read_extract.c", - "*/libarchive/archive_read_extract2.c", - "*/libarchive/archive_read_open_fd.c", - "*/libarchive/archive_read_open_file.c", - "*/libarchive/archive_read_open_filename.c", - "*/libarchive/archive_read_open_memory.c", - "*/libarchive/archive_read_set_format.c", - "*/libarchive/archive_read_set_options.c", - "*/libarchive/archive_read_support_filter_all.c", - "*/libarchive/archive_read_support_filter_by_code.c", - "*/libarchive/archive_read_support_filter_bzip2.c", - "*/libarchive/archive_read_support_filter_compress.c", - "*/libarchive/archive_read_support_filter_gzip.c", - "*/libarchive/archive_read_support_filter_grzip.c", - "*/libarchive/archive_read_support_filter_lrzip.c", - "*/libarchive/archive_read_support_filter_lz4.c", - "*/libarchive/archive_read_support_filter_lzop.c", - "*/libarchive/archive_read_support_filter_none.c", - "*/libarchive/archive_read_support_filter_program.c", - "*/libarchive/archive_read_support_filter_rpm.c", - "*/libarchive/archive_read_support_filter_uu.c", - "*/libarchive/archive_read_support_filter_xz.c", - "*/libarchive/archive_read_support_filter_zstd.c", - "*/libarchive/archive_read_support_format_7zip.c", - "*/libarchive/archive_read_support_format_all.c", - "*/libarchive/archive_read_support_format_ar.c", - "*/libarchive/archive_read_support_format_by_code.c", - "*/libarchive/archive_read_support_format_cab.c", - "*/libarchive/archive_read_support_format_cpio.c", - "*/libarchive/archive_read_support_format_empty.c", - "*/libarchive/archive_read_support_format_iso9660.c", - "*/libarchive/archive_read_support_format_lha.c", - "*/libarchive/archive_read_support_format_mtree.c", - "*/libarchive/archive_read_support_format_rar.c", - "*/libarchive/archive_read_support_format_rar5.c", - "*/libarchive/archive_read_support_format_raw.c", - "*/libarchive/archive_read_support_format_tar.c", - "*/libarchive/archive_read_support_format_warc.c", - "*/libarchive/archive_read_support_format_xar.c", - "*/libarchive/archive_read_support_format_zip.c", - "*/libarchive/archive_string.c", - "*/libarchive/archive_string_sprintf.c", - "*/libarchive/archive_time.c", - "*/libarchive/archive_util.c", - "*/libarchive/archive_version_details.c", - "*/libarchive/archive_virtual.c", - "*/libarchive/archive_windows.c", - "*/libarchive/archive_write.c", - "*/libarchive/archive_write_disk_posix.c", - "*/libarchive/archive_write_disk_windows.c", - "*/libarchive/archive_write_disk_set_standard_lookup.c", - "*/libarchive/archive_write_open_fd.c", - "*/libarchive/archive_write_open_file.c", - "*/libarchive/archive_write_open_filename.c", - "*/libarchive/archive_write_open_memory.c", - "*/libarchive/archive_write_add_filter.c", - "*/libarchive/archive_write_add_filter_b64encode.c", - "*/libarchive/archive_write_add_filter_by_name.c", - "*/libarchive/archive_write_add_filter_bzip2.c", - "*/libarchive/archive_write_add_filter_compress.c", - "*/libarchive/archive_write_add_filter_grzip.c", - "*/libarchive/archive_write_add_filter_gzip.c", - "*/libarchive/archive_write_add_filter_lrzip.c", - "*/libarchive/archive_write_add_filter_lz4.c", - "*/libarchive/archive_write_add_filter_lzop.c", - "*/libarchive/archive_write_add_filter_none.c", - "*/libarchive/archive_write_add_filter_program.c", - "*/libarchive/archive_write_add_filter_uuencode.c", - "*/libarchive/archive_write_add_filter_xz.c", - "*/libarchive/archive_write_add_filter_zstd.c", - "*/libarchive/archive_write_set_format.c", - "*/libarchive/archive_write_set_format_7zip.c", - "*/libarchive/archive_write_set_format_ar.c", - "*/libarchive/archive_write_set_format_by_name.c", - "*/libarchive/archive_write_set_format_cpio.c", - "*/libarchive/archive_write_set_format_cpio_binary.c", - "*/libarchive/archive_write_set_format_cpio_newc.c", - "*/libarchive/archive_write_set_format_cpio_odc.c", - "*/libarchive/archive_write_set_format_filter_by_ext.c", - "*/libarchive/archive_write_set_format_gnutar.c", - "*/libarchive/archive_write_set_format_iso9660.c", - "*/libarchive/archive_write_set_format_mtree.c", - "*/libarchive/archive_write_set_format_pax.c", - "*/libarchive/archive_write_set_format_raw.c", - "*/libarchive/archive_write_set_format_shar.c", - "*/libarchive/archive_write_set_format_ustar.c", - "*/libarchive/archive_write_set_format_v7tar.c", - "*/libarchive/archive_write_set_format_warc.c", - "*/libarchive/archive_write_set_format_xar.c", - "*/libarchive/archive_write_set_format_zip.c", - "*/libarchive/archive_write_set_options.c", - "*/libarchive/archive_write_set_passphrase.c", - "*/libarchive/filter_fork_posix.c", - "*/libarchive/filter_fork_windows.c", - "*/libarchive/xxhash.c", - }, - targets = { ["libarchive"] = { kind = "lib" } }, - deps = { - ["xlings.zlib"] = "v1.3.2", - ["xlings.bzip2"] = "1.0.8", - ["xlings.lz4"] = "v1.10.0", - ["xlings.zstd"] = "v1.5.7", - ["xlings.xz"] = "5.8.3", - }, - }, -} diff --git a/mcpp/pkgs/l/lz4.lua b/mcpp/pkgs/l/lz4.lua deleted file mode 100644 index 44997fe8..00000000 --- a/mcpp/pkgs/l/lz4.lua +++ /dev/null @@ -1,39 +0,0 @@ -package = { - spec = "1", - name = "lz4", - description = "LZ4 extremely fast compression", - licenses = {"BSD-2-Clause"}, - repo = "https://github.com/lz4/lz4", - type = "package", - - xpm = { - linux = { - ["v1.10.0"] = { - url = "https://github.com/lz4/lz4/archive/refs/tags/v1.10.0.tar.gz", - sha256 = "537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b", - }, - }, - macosx = { - ["v1.10.0"] = { - url = "https://github.com/lz4/lz4/archive/refs/tags/v1.10.0.tar.gz", - sha256 = "537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b", - }, - }, - windows = { - ["v1.10.0"] = { - url = "https://github.com/lz4/lz4/archive/refs/tags/v1.10.0.tar.gz", - sha256 = "537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b", - }, - }, - }, - - mcpp = { - language = "c++23", - import_std = false, - c_standard = "c11", - include_dirs = {"*/lib"}, - sources = {"*/lib/*.c"}, - targets = { ["lz4"] = { kind = "lib" } }, - deps = {}, - }, -} diff --git a/mcpp/pkgs/x/xz.lua b/mcpp/pkgs/x/xz.lua deleted file mode 100644 index 7aded386..00000000 --- a/mcpp/pkgs/x/xz.lua +++ /dev/null @@ -1,124 +0,0 @@ -package = { - spec = "1", - name = "xz", - description = "XZ Utils liblzma compression library", - licenses = {"0BSD", "LGPL-2.1-or-later"}, - repo = "https://github.com/tukaani-project/xz", - type = "package", - - xpm = { - linux = { - ["5.8.3"] = { - url = "https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.gz", - sha256 = "3d3a1b973af218114f4f889bbaa2f4c037deaae0c8e815eec381c3d546b974a0", - }, - }, - macosx = { - ["5.8.3"] = { - url = "https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.gz", - sha256 = "3d3a1b973af218114f4f889bbaa2f4c037deaae0c8e815eec381c3d546b974a0", - }, - }, - windows = { - ["5.8.3"] = { - url = "https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.gz", - sha256 = "3d3a1b973af218114f4f889bbaa2f4c037deaae0c8e815eec381c3d546b974a0", - }, - }, - }, - - mcpp = { - language = "c++23", - import_std = false, - c_standard = "c11", - include_dirs = { - "*/src/liblzma/api", - "*/src/liblzma/common", - "*/src/liblzma/check", - "*/src/liblzma/lz", - "*/src/liblzma/rangecoder", - "*/src/liblzma/lzma", - "*/src/liblzma/delta", - "*/src/liblzma/simple", - "*/src/common", - }, - sources = { - "*/src/common/tuklib_physmem.c", - "*/src/liblzma/check/check.c", - "*/src/liblzma/check/crc32_fast.c", - "*/src/liblzma/check/crc64_fast.c", - "*/src/liblzma/check/sha256.c", - "*/src/liblzma/common/alone_decoder.c", - "*/src/liblzma/common/alone_encoder.c", - "*/src/liblzma/common/auto_decoder.c", - "*/src/liblzma/common/block_buffer_decoder.c", - "*/src/liblzma/common/block_buffer_encoder.c", - "*/src/liblzma/common/block_decoder.c", - "*/src/liblzma/common/block_encoder.c", - "*/src/liblzma/common/block_header_decoder.c", - "*/src/liblzma/common/block_header_encoder.c", - "*/src/liblzma/common/block_util.c", - "*/src/liblzma/common/common.c", - "*/src/liblzma/common/easy_buffer_encoder.c", - "*/src/liblzma/common/easy_decoder_memusage.c", - "*/src/liblzma/common/easy_encoder.c", - "*/src/liblzma/common/easy_encoder_memusage.c", - "*/src/liblzma/common/easy_preset.c", - "*/src/liblzma/common/file_info.c", - "*/src/liblzma/common/filter_buffer_decoder.c", - "*/src/liblzma/common/filter_buffer_encoder.c", - "*/src/liblzma/common/filter_common.c", - "*/src/liblzma/common/filter_decoder.c", - "*/src/liblzma/common/filter_encoder.c", - "*/src/liblzma/common/filter_flags_decoder.c", - "*/src/liblzma/common/filter_flags_encoder.c", - "*/src/liblzma/common/hardware_physmem.c", - "*/src/liblzma/common/index.c", - "*/src/liblzma/common/index_decoder.c", - "*/src/liblzma/common/index_encoder.c", - "*/src/liblzma/common/index_hash.c", - "*/src/liblzma/common/lzip_decoder.c", - "*/src/liblzma/common/microlzma_decoder.c", - "*/src/liblzma/common/microlzma_encoder.c", - "*/src/liblzma/common/stream_buffer_decoder.c", - "*/src/liblzma/common/stream_buffer_encoder.c", - "*/src/liblzma/common/stream_decoder.c", - "*/src/liblzma/common/stream_encoder.c", - "*/src/liblzma/common/stream_flags_common.c", - "*/src/liblzma/common/stream_flags_decoder.c", - "*/src/liblzma/common/stream_flags_encoder.c", - "*/src/liblzma/common/string_conversion.c", - "*/src/liblzma/common/vli_decoder.c", - "*/src/liblzma/common/vli_encoder.c", - "*/src/liblzma/common/vli_size.c", - "*/src/liblzma/delta/delta_common.c", - "*/src/liblzma/delta/delta_decoder.c", - "*/src/liblzma/delta/delta_encoder.c", - "*/src/liblzma/lz/lz_decoder.c", - "*/src/liblzma/lz/lz_encoder.c", - "*/src/liblzma/lz/lz_encoder_mf.c", - "*/src/liblzma/lzma/fastpos_table.c", - "*/src/liblzma/lzma/lzma2_decoder.c", - "*/src/liblzma/lzma/lzma2_encoder.c", - "*/src/liblzma/lzma/lzma_decoder.c", - "*/src/liblzma/lzma/lzma_encoder.c", - "*/src/liblzma/lzma/lzma_encoder_optimum_fast.c", - "*/src/liblzma/lzma/lzma_encoder_optimum_normal.c", - "*/src/liblzma/lzma/lzma_encoder_presets.c", - "*/src/liblzma/rangecoder/price_table.c", - "*/src/liblzma/simple/arm.c", - "*/src/liblzma/simple/arm64.c", - "*/src/liblzma/simple/armthumb.c", - "*/src/liblzma/simple/ia64.c", - "*/src/liblzma/simple/powerpc.c", - "*/src/liblzma/simple/riscv.c", - "*/src/liblzma/simple/simple_coder.c", - "*/src/liblzma/simple/simple_decoder.c", - "*/src/liblzma/simple/simple_encoder.c", - "*/src/liblzma/simple/sparc.c", - "*/src/liblzma/simple/x86.c", - }, - targets = { ["xz"] = { kind = "lib" } }, - deps = {}, - }, -} diff --git a/mcpp/pkgs/z/zlib.lua b/mcpp/pkgs/z/zlib.lua deleted file mode 100644 index c2c94291..00000000 --- a/mcpp/pkgs/z/zlib.lua +++ /dev/null @@ -1,55 +0,0 @@ -package = { - spec = "1", - name = "zlib", - description = "A compression library", - licenses = {"Zlib"}, - repo = "https://github.com/madler/zlib", - type = "package", - - xpm = { - linux = { - ["v1.3.2"] = { - url = "https://github.com/madler/zlib/archive/refs/tags/v1.3.2.tar.gz", - sha256 = "b99a0b86c0ba9360ec7e78c4f1e43b1cbdf1e6936c8fa0f6835c0cd694a495a1", - }, - }, - macosx = { - ["v1.3.2"] = { - url = "https://github.com/madler/zlib/archive/refs/tags/v1.3.2.tar.gz", - sha256 = "b99a0b86c0ba9360ec7e78c4f1e43b1cbdf1e6936c8fa0f6835c0cd694a495a1", - }, - }, - windows = { - ["v1.3.2"] = { - url = "https://github.com/madler/zlib/archive/refs/tags/v1.3.2.tar.gz", - sha256 = "b99a0b86c0ba9360ec7e78c4f1e43b1cbdf1e6936c8fa0f6835c0cd694a495a1", - }, - }, - }, - - mcpp = { - language = "c++23", - import_std = false, - c_standard = "c11", - include_dirs = {"*"}, - sources = { - "*/adler32.c", - "*/compress.c", - "*/crc32.c", - "*/deflate.c", - "*/gzclose.c", - "*/gzlib.c", - "*/gzread.c", - "*/gzwrite.c", - "*/inflate.c", - "*/infback.c", - "*/inftrees.c", - "*/inffast.c", - "*/trees.c", - "*/uncompr.c", - "*/zutil.c", - }, - targets = { ["zlib"] = { kind = "lib" } }, - deps = {}, - }, -} diff --git a/mcpp/pkgs/z/zstd.lua b/mcpp/pkgs/z/zstd.lua deleted file mode 100644 index 5015da7b..00000000 --- a/mcpp/pkgs/z/zstd.lua +++ /dev/null @@ -1,51 +0,0 @@ -package = { - spec = "1", - name = "zstd", - description = "Zstandard real-time compression algorithm", - licenses = {"BSD-3-Clause"}, - repo = "https://github.com/facebook/zstd", - type = "package", - - xpm = { - linux = { - ["v1.5.7"] = { - url = "https://github.com/facebook/zstd/archive/refs/tags/v1.5.7.tar.gz", - sha256 = "37d7284556b20954e56e1ca85b80226768902e2edabd3b649e9e72c0c9012ee3", - }, - }, - macosx = { - ["v1.5.7"] = { - url = "https://github.com/facebook/zstd/archive/refs/tags/v1.5.7.tar.gz", - sha256 = "37d7284556b20954e56e1ca85b80226768902e2edabd3b649e9e72c0c9012ee3", - }, - }, - windows = { - ["v1.5.7"] = { - url = "https://github.com/facebook/zstd/archive/refs/tags/v1.5.7.tar.gz", - sha256 = "37d7284556b20954e56e1ca85b80226768902e2edabd3b649e9e72c0c9012ee3", - }, - }, - }, - - mcpp = { - language = "c++23", - import_std = false, - c_standard = "c11", - include_dirs = { - "*/lib", - "*/lib/common", - "*/lib/compress", - "*/lib/decompress", - }, - -- libarchive only needs the public zstd compression/decompression API. - -- dictBuilder pulls in qsort_r, which is not portable to Windows. - sources = { - "*/lib/common/*.c", - "*/lib/compress/*.c", - "*/lib/decompress/*.c", - "!*/lib/common/zstd_trace.c", - }, - targets = { ["zstd"] = { kind = "lib" } }, - deps = {}, - }, -}