GithubHelp home page GithubHelp logo

lkpot / meta-luarocks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chris2511/meta-luarocks

0.0 0.0 0.0 85 KB

yocto layer for automatic lua recipe creation and build with the help of luarocks

License: MIT License

Lua 21.34% BitBake 78.66%

meta-luarocks's Introduction

meta-luarocks: handle bitbake LUA recipes with luarocks

This layer adds many lua recipes that use the luarocks application to build and install the files.

It also helps adding new recipes with the bin/autogen_bb.lua script.

Easy addition of new LUA package bitbake recipes

  • Enter the meta-luarocks directory
  • Call bin/autogen_bb.lua <lua-package-name>
    • autogen downloads the rockspec file
    • it extracts values for the bitbake recipe
    • downloads the source archive to gather more data (LICENSE, src-dir)
    • creates a new recipe, prefixed by lua- if the package name does not already start with lua
    • repeats it for all dependencies declared in the rockspec
  • Open the new package-name.bb and adapt as needed.
  • Build it with bitbake

This is just a helper script for an easy start, it is not perfect.

Details about the luarocks.bbclass

  • do_configure() creates a luarocks.config file in the WORKDIR.
  • do_compile() calls luarocks from the RECIPE_SYSROOT_NATIVE directory with the luarocks.config. Dependencies are ignored by luarocks and handled by bitbake dependencies. It finally installs the sources in WORKDIR/rockinst/usr, because it has no separate install step
  • do_install() copies all artefacts to ${D}

The luarocks package management files from /usr/lib/luarocks are put into the -dev package.

Compiler variables and settings

Variables that can be added in the recipe to control the compiling behavior:

  • LUAROCKS_EXTRA_CC will be appended to the CC variable in the settings.

  • LUAROCKS_EXTRA_LD will be appended to the LD command, which is by default ${CC} ${LDFLAGS}

  • LUAROCKS_EXTRA_CFLAGS will be appended to the CFLAGS variable.

Native lua packages

All packages get the BBCLASSEXTEND = "native" to be buildable for the host. This comes in handy if you want to call LUA scripts at build-time like for example busted

meta-luarocks's People

Contributors

chris2511 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.