Skip to content

Lua language (library, interpreter, compiler) - Build2 package

License

Notifications You must be signed in to change notification settings

build2-packaging/lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build2 Package Repository for Lua

This is a build2 package repository for the Lua scripting language. Lua is intended to be used both as an embeddable language for any program that needs one, and as a lightweight and efficient stand-alone language.

This repository is a community-maintained effort and is not officially endorsed by the Lua authors.

Package Summary Status
liblua Lua C/C++ Library cppget.org queue.cppget.org
lua Lua Interpreter and Compiler cppget.org queue.cppget.org

Usage

If you want to use one of the Lua packages in your build2-based project, add an appropriate repository manifest to your project's repositories.manifest and refer to the accompanying package descriptions.

repositories.manifest

To be able to fetch this repository's packages, add one of the following prerequisites to your project's repositories.manifest.

Option A: cppget.org (Recommended)

Based on your project's stability requirements, choose either the stable section for thoroughly tested versions or the testing section for the latest releases before they are marked as stable. For example:

:
role: prerequisite
location: https://pkg.cppget.org/1/stable
# trust: ...

Option B: Git Repository

:
role: prerequisite
location: https://github.com/build2-packaging/lua.git

Development Setup

The development setup for this repository uses the standard bdep-based workflow. For general information and guidance on package maintenance, please see the build2 Documentation.

First, clone the repository via SSH or HTTPS.

git clone --recurse https://github.com/build2-packaging/lua.git  # HTTPS
git clone --recurse git@github.com:build2-packaging/lua.git      # SSH

Inside the repository's directory, initialize your build configuration.

bdep init -C @gcc cc config.cxx=g++ config.install.root=../.install config.dist.root=../.dist

Afterwards, use b or bdep to build, test, install, and distribute the packages.

Issues and Notes

  • Upstream Sources: Lua's source code and test suite are not available as versioned Git repositories. They are manually copied into the upstream/ and upstream-tests/ directories from the official download and testing pages. The LICENSE file is also copied from the Lua website. For each version update, it is recommended to directly delete the upstream/ and upstream-tests/ directories and move the newly downloaded sources to these locations.

  • Packaging Decisions:

    • The lua and luac executables are kept in a single lua package to simplify maintenance and maintain backward compatibility.
    • Documentation files are only installed with the lua package to prevent redundancy.
    • The packages build Lua's source code using a C compiler by default, as this is the library's native language. While the sources are compatible with C++ compilers, this choice could introduce subtle differences in areas such as linker and standard library behavior, compiler optimizations, or error reporting. If building with a C++ compiler is a requirement for your project, please open an issue to discuss the possibility of adding a configuration variable.
  • Testing Limitations:

    • Upstream does not provide a comprehensive test suite for the C library; therefore, the liblua package only includes basic smoke tests.
    • The luac executable in the lua package is built but not extensively tested due to a lack of upstream tests.
    • The lua-tests package executes only the basic Lua script tests. The complete or internal test suite is not used as it is expected to fail by design in this build context (see here).
    • On Windows (MSVC/Clang), the basic tests are known to fail in unoptimized builds, likely due to an intentional stack overflow test.
  • Currently, the lua and luac executables in the lua package do not provide any build2 metadata.

Contributing

Contributions are welcome and greatly appreciated! Please start by opening an issue to report a bug, suggest an improvement, or request a version update. This helps us coordinate efforts and avoid duplicate work. You are then welcome to submit a pull request that references the issue. For guidance on package maintenance, please see the build2 Packaging Guidelines.

About

Lua language (library, interpreter, compiler) - Build2 package

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •