dev-lua/lunix - 99999999 (mva)

Search

Install

Install this version:

emerge -a =dev-lua/lunix-99999999

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =dev-lua/lunix-99999999

Or alternatively:

emerge --autounmask-write -a =dev-lua/lunix-99999999

Package Information

Description:
Lua Unix Module
Homepage:
https://github.com/wahern/lunix
License:
MIT

Ebuild Details

Version EAPI Keywords Slot
99999999 8 0
View Raw Ebuild
# Copyright 2026 mva
# Distributed under the terms of the Public Domain or CC0 License

EAPI=8

LUA_COMPAT=( lua{5-{1..4},jit} )

inherit lua git-r3 toolchain-funcs

DESCRIPTION="Lua Unix Module"
HOMEPAGE="https://github.com/wahern/lunix"
EGIT_REPO_URI="https://github.com/wahern/lunix"

LICENSE="MIT"
SLOT="0"
IUSE="examples"
REQIUIRED_USE="${LUA_REQIUIRED_USE}"

DEPEND="
	${LUA_DEPS}
	dev-libs/openssl:*
"
RDEPEND="${DEPEND}"

src_prepare() {
	eerror "currently lunix is totally broken:"
	eerror "- doesn't build with default makefiles (and they don't conform gentoo way to build),"
	eerror "- miss many headers (compiler complains on implicit declarations and non-defined NL_TEXTMAX)"
	die "TODO: check someday if it is already fixed (last check: 02.11.2022, still broken)"
	default
	sed  -r \
		-e "s@(^prefix ).*@\1=/usr@" \
		-e "s@(^libdir .*prefix\)).*@\1/$(get_libdir)@" \
		-i GNUmakefile
	lua_copy_sources
}

each_lua_compile() {
	pushd "${BUILD_DIR}"

	$(tc-getCC) ${CFLAGS} -I$(lua_get_include_dir) ${LDFLAGS} -fPIC -shared src/*.c -o unix.so || die

	popd
}

each_lua_install() {
	pushd "${BUILD_DIR}"
	insinto "$(lua_get_lmod_dir)"
	doins unix.so
	popd
}

src_compile() {
	lua_foreach_impl each_lua_compile
}

src_install() {
	lua_foreach_impl each_lua_install
	if use examples; then
		DOCS+=(examples)
		docompress -x "/usr/share/doc/${PF}/examples"
	fi
	einstalldocs
}

USE Flags

Manage flags for this package: euse -i <flag> -p dev-lua/lunix | euse -E <flag> -p dev-lua/lunix | euse -D <flag> -p dev-lua/lunix

Global/Standard Flags

Inherited Eclasses

lua

Dependencies

DEPEND

	
	dev-libs/openssl:*

RDEPEND

	
	dev-libs/openssl:*