summaryrefslogtreecommitdiff
path: root/dev-lua/cqueues
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2024-12-04 18:50:47 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2024-12-04 18:50:47 +0000
commit2e0fe0ea29315336eebdbcd88c0d03ed85569bfd (patch)
treeb4fa03aeb6aee137ca6b4f1e9048aeffb98cb07e /dev-lua/cqueues
parent93f3f34f270e2687319c9ec473fb2211eafba198 (diff)
downloadbaldeagleos-repo-2e0fe0ea29315336eebdbcd88c0d03ed85569bfd.tar.gz
baldeagleos-repo-2e0fe0ea29315336eebdbcd88c0d03ed85569bfd.tar.xz
baldeagleos-repo-2e0fe0ea29315336eebdbcd88c0d03ed85569bfd.zip
Adding metadata
Diffstat (limited to 'dev-lua/cqueues')
-rw-r--r--dev-lua/cqueues/cqueues-20200726.ebuild75
-rw-r--r--dev-lua/cqueues/files/cqueues-20200726-5-4_tests.patch4
2 files changed, 53 insertions, 26 deletions
diff --git a/dev-lua/cqueues/cqueues-20200726.ebuild b/dev-lua/cqueues/cqueues-20200726.ebuild
index 6fbcf7080b89..7df37a9fa7bc 100644
--- a/dev-lua/cqueues/cqueues-20200726.ebuild
+++ b/dev-lua/cqueues/cqueues-20200726.ebuild
@@ -9,7 +9,8 @@ MY_P="${PN}-rel-${PV}"
inherit lua toolchain-funcs
DESCRIPTION="Stackable Continuation Queues"
-HOMEPAGE="http://25thandclement.com/~william/projects/cqueues.html https://github.com/wahern/cqueues"
+HOMEPAGE="https://github.com/wahern/cqueues"
+HOMEPAGE+=" http://25thandclement.com/~william/projects/cqueues.html"
SRC_URI="https://github.com/wahern/${PN}/archive/rel-${PV}.tar.gz -> ${MY_P}.tar.gz"
S="${WORKDIR}/${MY_P}"
@@ -24,22 +25,60 @@ REQUIRED_USE="${LUA_REQUIRED_USE}"
DEPEND="
${LUA_DEPS}
dev-libs/openssl:0=
+ dev-lua/compat53[${LUA_USEDEP}]
"
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"
DOCS=( "doc/." )
-PATCHES="${FILESDIR}/cqueues-20200726-5-4_tests.patch"
+PATCHES=(
+ "${FILESDIR}"/${PN}-20200726-5-4_tests.patch
+)
+
+lua_src_prepare() {
+ pushd "${BUILD_DIR}" || die
+
+ if [[ ${ELUA} != luajit ]]; then
+ LUA_VERSION="$(ver_cut 1-2 $(lua_get_version))"
+ # these two tests are forced upstream for luajit only
+ rm "${BUILD_DIR}"/regress/{44-resolvers-gc,51-join-defunct-thread}.lua || die
+ else
+ # Thanks to dev-lua/luaossl for this workaround
+ # This is a workaround for luajit, as it confirms to lua5.1
+ # and the 'GNUmakefile' doesn't understand LuaJITs version.
+ LUA_VERSION="5.1"
+ fi
+
+ if [[ ${LUA_VERSION} != 5.3 ]]; then
+ # this test is forced upstream for lua5-3 only
+ rm "${BUILD_DIR}"/regress/152-thread-integer-passing.lua || die
+ fi
+
+ # install tests for lua_version only
+ sed -e 's:for V in 5.1 5.2 5.3 5.4:for V in '${LUA_VERSION}':' \
+ -i "${BUILD_DIR}"/regress/GNUmakefile || die
+
+ popd
+}
src_prepare() {
default
-
+ rm -r vendor || die
sed \
- -e '/LUAPATH :=/d' \
- -e '/LUAPATH_FN =/d' \
+ -e '/HAVE_API_FN =/d' \
+ -e '/ALL_CFLAGS += -g/d' \
-i GNUmakefile || die
+ # use header from package compat53 instead of vendor
+ sed -e 's:-DCOMPAT53_PREFIX=cqueues::' \
+ -e 's:$$(d)/../vendor/compat53/c-api/compat-5.3.h::' \
+ -e '/)\/compat53/,/)\/compat53/d' \
+ -i src/GNUmakefile || die
+
+ sed -e 's:"../vendor/compat53/c-api\/compat-5.3.h":<compat-5.3.h>:' \
+ -i src/cqueues.h || die
+
# tests deleted :
# 22, 73, 87 = weak/old ssl
# 30 = call google.com
@@ -49,6 +88,7 @@ src_prepare() {
regress/30-starttls-completion.lua || die
lua_copy_sources
+ lua_foreach_impl lua_src_prepare
}
lua_src_compile() {
@@ -57,18 +97,13 @@ lua_src_compile() {
if [[ ${ELUA} != luajit ]]; then
LUA_VERSION="$(ver_cut 1-2 $(lua_get_version))"
else
- # Thanks to dev-lua/luaossl for this workaround
- # This is a workaround for luajit, as it confirms to lua5.1
- # and the 'GNUmakefile' doesn't understand LuaJITs version.
LUA_VERSION="5.1"
fi
- emake CC="$(tc-getCC)" \
- ALL_CFLAGS="${CFLAGS} -std=gnu99 -fPIC $(lua_get_CFLAGS)" \
- ALL_CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE" \
- ALL_SOFLAGS="${SOFLAGS} -shared" \
- ALL_LDFLAGS="${LDFLAGS}" \
- all${LUA_VERSION}
+ tc-env_build emake \
+ $(lua_get_CFLAGS) \
+ ALL_LDFLAGS="${LDFLAGS}" \
+ all${LUA_VERSION}
popd
}
@@ -82,18 +117,11 @@ lua_src_test() {
if [[ ${ELUA} != luajit ]]; then
LUA_VERSION="$(ver_cut 1-2 $(lua_get_version))"
- # these two tests are forced upstream for luajit only
- rm "${BUILD_DIR}"/regress/{44-resolvers-gc,51-join-defunct-thread}.lua || die
else
LUA_VERSION="5.1"
fi
- if [[ ${ELUA} != lua5.3 ]]; then
- # this test is forced upstream for lua5-3 only
- rm "${BUILD_DIR}"/regress/152-thread-integer-passing.lua || die
- fi
-
- default
+ emake CC=$(tc-getCC) check
popd
}
@@ -111,7 +139,8 @@ lua_src_install() {
LUA_VERSION="5.1"
fi
- emake "DESTDIR=${D}" \
+ emake CC=$(tc-getCC) \
+ "DESTDIR=${D}" \
"lua${LUA_VERSION/./}cpath=$(lua_get_cmod_dir)" \
"lua${LUA_VERSION/./}path=$(lua_get_lmod_dir)" \
"prefix=${EPREFIX}/usr" \
diff --git a/dev-lua/cqueues/files/cqueues-20200726-5-4_tests.patch b/dev-lua/cqueues/files/cqueues-20200726-5-4_tests.patch
index 92c2bb944a3d..34fee2174ed4 100644
--- a/dev-lua/cqueues/files/cqueues-20200726-5-4_tests.patch
+++ b/dev-lua/cqueues/files/cqueues-20200726-5-4_tests.patch
@@ -1,6 +1,4 @@
-From ef7c2b2547fc3e1d26bc1d423edc2792a8056649 Mon Sep 17 00:00:00 2001
-From: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
-Date: Mon, 2 Dec 2024 09:14:19 +0000
+https://github.com/wahern/cqueues/commit/ad517a210caa3cd6cc18da73015886a5a2b88b3f
Subject: [PATCH] add 5.4
---