{
  "added_at": "2026-11-09",
  "category": "reconstruction-cases",
  "class": "game",
  "description_en": "Portal 2 is statically recompiled from its Linux x86 modules into a native ARM64 application for macOS and iPhone. Preparation tools lay out ELF modules and apply relocations; a lifter emits C functions that are compiled with a runtime for libc, threading, SDL2, graphics and Steam interfaces. The author reports playable builds on Mac and iPhone.",
  "description_zh": "该项目把 Portal 2 的 Linux x86 模块静态重编译为适用于 macOS 和 iPhone 的 ARM64 应用。准备工具处理 ELF 模块布局与重定位，提升器将函数转换为 C，再与实现 libc、线程、SDL2、图形和 Steam 接口的运行时一起编译。作者报告 Mac 和 iPhone 版本可游玩。",
  "entry_url": "https://awesomerea.org/resources/portal-2-apple-silicon-recomp-case/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/portal-2-apple-silicon-recomp-case/",
  "evidence_class": 1,
  "evidence_status": "observed",
  "evidence_url": "https://github.com/kanapitsas/portal2-recomp/blob/270429142bd00e772d0c9eb69d553f9c591dfd8a/README.md",
  "group": "cases",
  "id": "portal-2-apple-silicon-recomp-case",
  "json_url": "https://awesomerea.org/resources/portal-2-apple-silicon-recomp-case/record.json",
  "kind": "case-study",
  "markdown_url": "https://awesomerea.org/resources/portal-2-apple-silicon-recomp-case/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/portal-2-apple-silicon-recomp-case/index.md",
  "name": "Portal 2: static recompilation for Apple silicon",
  "name_zh": "Portal 2：面向 Apple silicon 的静态重编译",
  "preview_kind": "image",
  "preview_url": "https://awesomerea.org/previews/portal-2-apple-silicon-recomp-case.jpg",
  "reconstruction_method": "static-recompilation",
  "record_type": "resource",
  "relationship": "independent-reconstruction",
  "requirement_facets": [
    "prerequisites",
    "prerequisites",
    "prerequisites",
    "limits",
    "license"
  ],
  "requirements": [
    "An Apple silicon Mac with Python 3.9 or newer, Homebrew, Xcode command line tools, SDL2, FreeType and Fontconfig.",
    "An owned Portal 2 copy with its game folder and Linux binaries from Steam depot 661.",
    "iPhone builds require Xcode, iOS 17 or newer, Developer Mode and about 12 GB of device space.",
    "Built against Linux depot 661 manifest 8940703274703023246; another release needs new indirect-call roots.",
    "GPL-3.0 license."
  ],
  "requirements_zh": [
    "需要 Apple silicon Mac、Python 3.9 或更高版本、Homebrew、Xcode 命令行工具、SDL2、FreeType 和 Fontconfig。",
    "需要自有的 Portal 2 游戏文件夹，以及 Steam depot 661 的 Linux 二进制文件。",
    "iPhone 版本需要 Xcode、iOS 17 或更高版本、开发者模式及约 12 GB 设备空间。",
    "当前构建针对 Linux depot 661 的 manifest 8940703274703023246；其他版本需要补充新的间接调用目标。",
    "采用 GPL-3.0 许可证。"
  ],
  "scope": "partial",
  "targets": [
    "game"
  ],
  "url": "https://github.com/kanapitsas/portal2-recomp",
  "verification": "source-reviewed",
  "verified_at": "2026-11-08"
}
