5

I am putting together a private podspec to build Lua specifically in version 5.1.5 and with a number of additions to Lua.

The following podspec should correspond to our "manually put together"-code and provide Lua with openssl, socket and zlib support.

{
  "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": []
    }
  ]
}

However when inspecting the output from:

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

I noticed that the .c files that were supposed to be downloaded and compiled, isn't.

For instance the "luaz" repo contains a luau.c file which is nowhere to be seen. Only .c files contained in the main spec (lua-5.1.5.tar.gz) are compiled, none from any subspecs are compiled.

I have read and reread the cocoapods guides over the past day and a half now and it has not helped me figure what is wrong.

Can you help me figure out how to compile Lua with my additions as a cocoapod?

MGY
  • 7,245
  • 5
  • 41
  • 74
CodeReaper
  • 5,988
  • 3
  • 35
  • 56

0 Answers0