commit:     0e3d7b468206d8246aa99c615d824a07a66bd6f1
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Wed Dec  4 09:26:06 2024 +0000
Commit:     Nicolas PARLANT <ppn <AT> parhuet <DOT> fr>
CommitDate: Wed Dec  4 13:45:25 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0e3d7b46

dev-lua/cqueues: remove call to vendor/compat53 with sed

Keep compat53 for all lua_targets :
(https://github.com/wahern/cqueues/pull/258#issuecomment-2516151601)
minor QA
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>

 dev-lua/cqueues/cqueues-20200726.ebuild            | 20 +++++--
 .../cqueues/files/cqueues-20200726-5-4_tests.patch |  1 +
 .../cqueues-20200726-rm-vendor-compat53.patch      | 62 ----------------------
 3 files changed, 16 insertions(+), 67 deletions(-)

diff --git a/dev-lua/cqueues/cqueues-20200726.ebuild 
b/dev-lua/cqueues/cqueues-20200726.ebuild
index 66cdca9e1..99fefd8db 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}"
@@ -33,7 +34,6 @@ DOCS=( "doc/." )
 
 PATCHES=(
        "${FILESDIR}"/${PN}-20200726-5-4_tests.patch
-       "${FILESDIR}"/${PN}-20200726-rm-vendor-compat53.patch
 )
 
 lua_src_prepare() {
@@ -55,20 +55,30 @@ lua_src_prepare() {
                rm "${BUILD_DIR}"/regress/152-thread-integer-passing.lua || die
        fi
 
-       # install test 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
+       # 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 '/HAVE_API_FN =/d' \
                -e '/ALL_CFLAGS += -g/d' \
-               -e 's:$(shell env CC="$(CC)" 
$(d)/mk/vendor.cc):'$(tc-get-compiler-type)':' \
                -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

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 dd17075b8..34fee2174 100644
--- a/dev-lua/cqueues/files/cqueues-20200726-5-4_tests.patch
+++ b/dev-lua/cqueues/files/cqueues-20200726-5-4_tests.patch
@@ -1,3 +1,4 @@
+https://github.com/wahern/cqueues/commit/ad517a210caa3cd6cc18da73015886a5a2b88b3f
 Subject: [PATCH] add 5.4
 
 ---

diff --git a/dev-lua/cqueues/files/cqueues-20200726-rm-vendor-compat53.patch 
b/dev-lua/cqueues/files/cqueues-20200726-rm-vendor-compat53.patch
deleted file mode 100644
index be20242a9..000000000
--- a/dev-lua/cqueues/files/cqueues-20200726-rm-vendor-compat53.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Subject: [PATCH] remove vendor compat53
-
----
- src/GNUmakefile | 14 ++------------
- src/cqueues.h   |  2 +-
- 2 files changed, 3 insertions(+), 13 deletions(-)
-
-diff --git a/src/GNUmakefile b/src/GNUmakefile
-index 0b15461..99aba94 100644
---- a/src/GNUmakefile
-+++ b/src/GNUmakefile
-@@ -22,7 +22,7 @@ VENDOR_$(d) = $(or $(CQUEUES_VENDOR),$(shell 
$(<D)/../mk/changelog author))
- VERSION_$(d) = $(or $(CQUEUES_VERSION),$(shell $(<D)/../mk/changelog version))
- COMMIT_$(d) = $(shell $(<D)/../mk/changelog commit)
- 
--CPPFLAGS_$(d) = $(ALL_CPPFLAGS) -DCOMPAT53_PREFIX=cqueues
-+CPPFLAGS_$(d) = $(ALL_CPPFLAGS)
- CFLAGS_$(d) = $(ALL_CFLAGS)
- SOFLAGS_$(d) = $(ALL_SOFLAGS)
- LDFLAGS_$(d) = $(ALL_LDFLAGS)
-@@ -50,7 +50,7 @@ define BUILD_$(d)
- $$(d)/$(1)/cqueues.so: $$(addprefix $$(d)/$(1)/, $$(OBJS_$(d))) 
$$(d)/lib/libnonlua.a
-       $$(CC) -o $$@ $$^ $$(SOFLAGS_$$(abspath $$(@D)/..)) 
$$(LDFLAGS_$$(abspath $$(@D)/..)) $$(LIBS_$$(abspath $$(@D)/..))
- 
--$$(d)/$(1)/%.o: $$(d)/%.c $$(d)/cqueues.h 
$$(d)/../vendor/compat53/c-api/compat-5.3.h $$(d)/config.h
-+$$(d)/$(1)/%.o: $$(d)/%.c $$(d)/cqueues.h $$(d)/config.h
-       $$(MKDIR) -p $$(@D)
-       $$(CC) $$(CFLAGS_$$(<D)) $$(ALL_LUA$(subst .,,$(1))_CPPFLAGS) 
$$(CPPFLAGS_$$(<D)) -c -o $$@ $$<
- 
-@@ -66,16 +66,6 @@ $$(d)/$(1)/thread.o: $$(d)/lib/llrb.h
- 
- $$(d)/$(1)/notify.o: $$(d)/lib/notify.h
- 
--ifneq ($(1), 5.3)
--ifneq ($(1), 5.4)
--$$(d)/$(1)/compat53.o: $$(d)/../vendor/compat53/c-api/compat-5.3.c 
$$(d)/../vendor/compat53/c-api/compat-5.3.h $$(d)/config.h
--      $$(MKDIR) -p $$(@D)
--      $$(CC) $$(CFLAGS_$(d)) $$(ALL_LUA$(subst .,,$(1))_CPPFLAGS) 
$$(CPPFLAGS_$(d)) -c -o $$@ $$<
--
--$$(d)/$(1)/cqueues.so: $$(d)/$(1)/compat53.o
--endif
--endif
--
- .SECONDARY: liblua$(1)-cqueues cqueues$(1) cqueues
- 
- liblua$(1)-cqueues cqueues$(1) cqueues: $$(d)/$(1)/cqueues.so
-diff --git a/src/cqueues.h b/src/cqueues.h
-index ef803ea..bc07024 100644
---- a/src/cqueues.h
-+++ b/src/cqueues.h
-@@ -40,7 +40,7 @@
- #include <lualib.h>
- #include <lauxlib.h>
- 
--#include "../vendor/compat53/c-api/compat-5.3.h"
-+#include <compat-5.3.h>
- 
- 
- /*
--- 
-2.45.2
-

Reply via email to