Install this version:
emerge -a =dev-lua/lua-periphery-2.5.0
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =dev-lua/lua-periphery-2.5.0
Or alternatively:
emerge --autounmask-write -a =dev-lua/lua-periphery-2.5.0
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LUA_COMPAT=( lua5-{1..4} luajit )
inherit lua toolchain-funcs
DESCRIPTION="Lua library for GPIO, LED, PWM, SPI, I2C, MMIO and serial I/O in Linux"
HOMEPAGE="https://github.com/vsergeev/lua-periphery"
SRC_URI="https://github.com/vsergeev/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64"
REQUIRED_USE="${LUA_REQUIRED_USE}"
# The test suite drives real peripherals on specific boards.
RESTRICT="test"
RDEPEND="
${LUA_DEPS}
>=dev-libs/c-periphery-2.5.0:=
"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${P}-system-c-periphery.patch
"${FILESDIR}"/${P}-mmio-read64-hex.patch
)
src_prepare() {
default
lua_copy_sources
}
lua_src_compile() {
pushd "${BUILD_DIR}" || die
emake \
CC="$(tc-getCC)" \
PKG_CONFIG="$(tc-getPKG_CONFIG)" \
LUA_INCDIR="$(lua_get_include_dir)"
popd || die
}
src_compile() {
lua_foreach_impl lua_src_compile
}
lua_src_install() {
exeinto "$(lua_get_cmod_dir)"
doexe "${BUILD_DIR}"/periphery.so
}
src_install() {
lua_foreach_impl lua_src_install
dodoc README.md CHANGELOG.md docs/*.md
}
>=dev-libs/c-periphery-2.5.0:=
>=dev-libs/c-periphery-2.5.0:=
virtual/pkgconfig
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | lua-periphery-2.5.0.tar.gz | 43412 bytes | https://github.com/vsergeev/lua-periphery/archive/v2.5.0.tar.gz |