5

我正在整理一个私有 podspec 来专门在 5.1.5 版中构建 Lua,并对 Lua 进行了一些添加。

以下 podspec 应该对应于我们的“手动组合”代码,并为 Lua 提供 openssl、socket 和 zlib 支持。

{
  "name": "Lua51",
  "version": "5.1.5",
  "summary": "The lua language (for embedding).",
  "homepage": "https://github.com/qmx/lua",
  "license": {
    "type": "MIT"
  },
  "authors": {
    "The Lua team": "team@lua.org"
  },
  "source": {
    "http": "http://www.lua.org/ftp/lua-5.1.5.tar.gz",
    "sha1": "b3882111ad02ecc6b972f8c1241647905cb2e3fc"
  },
  "platforms": {
    "ios": "4.0",
    "osx": "10.6"
  },
  "public_header_files": "src/*.h",
  "source_files": "src/*.{c,h}",
  "exclude_files": [
    "src/lua.c",
    "src/luac.c"
  ],
  "requires_arc": false,
  "subspecs": [
    {
      "name": "Socket",
      "license": {
        "file": "LICENSE"
      },
      "authors": {
        "Bruno Silvestre": ""
      },
      "source": {
        "git": "https://github.com/brunoos/luasocket.git",
        "commit": "5edf093643cceb329392aec9606ab3988579b821"
      },
      "source_files": "src/*.*"
    },
    {
      "name": "Sec",
      "license": {
        "file": "LICENSE"
      },
      "authors": {
        "Bruno Silvestre": ""
      },
      "source": {
        "git": "https://github.com/brunoos/luasec.git",
        "tag": "luasec-0.5"
      },
      "source_files": [
        "src/*.c",
        "src/*.h",
        "src/*.lua",
        "src/luasocket/*.c",
        "src/luasocket/*.h"
      ],
      "public_header_files": [
        "src/*.h",
        "src/luasocket/*.h"
      ]
    },
    {
      "name": "z",
      "license": {
        "type": "Info-ZIP"
      },
      "authors": {
        "Kresten Krab Thorup": "krab@trifork.com"
      },
      "source": {
        "git": "https://github.com/krestenkrab/luaz.git",
        "commit": "ff51dbce77997d5e1c3fce206a7e5885bdf135a8"
      },
      "source_files": "src/*.*",
      "exclude_files": []
    }
  ]
}

但是,在检查以下输出时:

pod spec lint Specs/Lua51/5.1.5/Lua51.podspec.json --verbose

我注意到应该下载和编译的 .c 文件不是。

例如,“luaz” repo 包含一个 luau.c 文件,该文件无处可见。仅编译主规范(lua-5.1.5.tar.gz)中包含的 .c 文件,不编译任何子规范中的文件。

在过去的一天半里,我已经阅读并重读了 cocoapods 指南,但它并没有帮助我找出问题所在。

你能帮我弄清楚如何将我添加的 Lua 编译为 cocoapod 吗?

4

0 回答 0