dev-lua/lanes: add 4.0.0

Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
This commit is contained in:
Conrad Kostecki
2026-05-14 15:36:14 +02:00
parent 75ec3d735e
commit bb7cfb161d
4 changed files with 128 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST lanes-3.17.2.tar.gz 448975 BLAKE2B 8efc10175fbbaf91f47da02fbce7b115b99cd82b9fda11825d39e6bb5e32b76ff3d31c7e384a13476b5b5605e9c2adfcab3111f4a97fd67748d42a7af2ad0977 SHA512 1d5a7594eb321cfaf2d46668ad2a84e74240e261bc9e7e279b51afa2d8f61024f73fa6ba31a9c05d686bde863f817bb8622b0878b0b2a5e18e87e8348e7eec62
DIST lanes-4.0.0.tar.gz 536121 BLAKE2B 38b6694923eeb6277dd2e7225d62be8e54999b44d18b55b70f9c58996dc29b38c550b1d1c1149640bcdb386e576cf236e3ebba56f568500a8d64739a3fe8810e SHA512 9e7e3aa83214ac554950055b0f518135029f6cdbdc5e6a909364b8d7dcbfa38fd7d76f462e4b6430f917ac5884eb21548466174f433229b2c1566bb6faba4039

View File

@@ -0,0 +1,10 @@
--- a/src/universe.hpp
+++ b/src/universe.hpp
@@ -7,6 +7,7 @@
#include "threading.hpp"
#include "tracker.hpp"
#include "uniquekey.hpp"
+#include <unistd.h>
// #################################################################################################

View File

@@ -0,0 +1,21 @@
--- a/Makefile
+++ b/Makefile
@@ -277,7 +277,6 @@
mkdir -p $(LUA_LIBDIR) $(LUA_SHAREDIR)
install -m 644 $(_LANES_TARGET) $(LUA_LIBDIR)
cp -p src/lanes.lua $(LUA_SHAREDIR)
- install -m 644 $(_DUE_TARGET) $(LUA_LIBDIR)
uninstall:
rm $(LUA_LIBDIR)/lanes_core.$(_SO)
--- a/src/Lanes.makefile
+++ b/src/Lanes.makefile
@@ -29,7 +29,7 @@
# Note: Don't put $(LUA_LIBS) ahead of $^; MSYS will not like that (I think)
#
$(_TARGET): $(_OBJ)
- $(CC) $(LIBFLAG) $^ $(LIBS) $(LUA_LIBS) -o $@
+ $(CC) $(LDFLAGS) $(LIBFLAG) $^ $(LIBS) $(LUA_LIBS) -o $@
clean:
-rm -rf $(_TARGET) *.o *.map *.gch

View File

@@ -0,0 +1,96 @@
# 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="Lightweight, native, lazy evaluating multithreading library"
HOMEPAGE="https://github.com/LuaLanes/lanes"
SRC_URI="https://github.com/LuaLanes/lanes/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
IUSE="test"
REQUIRED_USE="${LUA_REQUIRED_USE}"
# Tests are currently somehow problematic.
# https://github.com/LuaLanes/lanes/issues/197
# https://github.com/LuaLanes/lanes/issues/198
RESTRICT="test"
RDEPEND="${LUA_DEPS}"
DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
test? ( ${RDEPEND} )
"
HTML_DOCS=( "docs/." )
PATCHES=(
"${FILESDIR}/${PN}-4.0.0-glibc-2.43.patch"
"${FILESDIR}/${PN}-4.0.0-makefile.patch"
)
src_prepare() {
default
lua_copy_sources
}
lua_src_compile() {
pushd "${BUILD_DIR}" || die
local myemakeargs=(
"CC=$(tc-getCC)"
"LUA=${ELUA}"
"LUA_FLAGS=$(lua_get_CFLAGS)"
"LUA_LIBS="
"OPT_FLAGS=${CFLAGS}"
)
tc-export PKG_CONFIG
emake "${myemakeargs[@]}"
popd
}
src_compile() {
lua_foreach_impl lua_src_compile
}
lua_src_test() {
pushd "${BUILD_DIR}" || die
emake LUA="${ELUA}" test
popd
}
src_test() {
lua_foreach_impl lua_src_test
}
lua_src_install() {
pushd "${BUILD_DIR}" || die
local myemakeargs=(
"LUA_LIBDIR=${ED}/$(lua_get_cmod_dir)"
"LUA_SHAREDIR=${ED}/$(lua_get_lmod_dir)"
)
emake "${myemakeargs[@]}" install
popd
}
src_install() {
lua_foreach_impl lua_src_install
einstalldocs
}