diff options
Diffstat (limited to 'dev-lua/cqueues')
-rw-r--r-- | dev-lua/cqueues/Manifest | 5 | ||||
-rw-r--r-- | dev-lua/cqueues/cqueues-20200726_p20241204.ebuild | 142 | ||||
-rw-r--r-- | dev-lua/cqueues/files/cqueues-20200726_p20241204-qa-flags.patch | 39 | ||||
-rw-r--r-- | dev-lua/cqueues/files/cqueues-20200726_p20241204-rm-vendor-compat53.patch | 48 | ||||
-rw-r--r-- | dev-lua/cqueues/metadata.xml | 15 |
5 files changed, 249 insertions, 0 deletions
diff --git a/dev-lua/cqueues/Manifest b/dev-lua/cqueues/Manifest new file mode 100644 index 000000000000..148d1db8b68d --- /dev/null +++ b/dev-lua/cqueues/Manifest @@ -0,0 +1,5 @@ +AUX cqueues-20200726_p20241204-qa-flags.patch 1733 BLAKE2B 69c947d2746e693fe6fdf0768b4a34073a868266e1d878e868530a310b6748e9e17a0df83ae5ed9a83ba9cb689df4de6ba776168e11e524a11d06210f438255d SHA512 330852bbc2c00b148235d64682812b57ea81937bce0fd94144112266391a4fe24094a78b16c3503ff1a4813d92512423371dc644f789ecfafde6d1631fc84007 +AUX cqueues-20200726_p20241204-rm-vendor-compat53.patch 1746 BLAKE2B d0fda0543ae1a19a12d8e64b5e4843eecbf46faaf8b585a34813acaa06714391c6484082d04de4f59c390eb2cc077e82dd71997219d88c20e6f421063166f3d7 SHA512 5fa185c77dde76f0f3ab8b4f3473ccc4d9687d9df463d881899427982346addc1f9a5f8cd08b06f468b09aa9c0bacaba7a1c51f2c1d0b786ef8873560d8efc73 +DIST cqueues-20200726_p20241204.tar.gz 511991 BLAKE2B 13aeb72435fbfd84e3af11f7d79547ca72b2863ffff4d24d1e14115225973f175b19440732c1d9f4f57c22ef454b3abfe503e7b18de145b4c04f44e87297365c SHA512 9e510c3da50ce601d7fde8cf4e3f4262aa9ec1e81099e4411cf233a138338f5098de8eddce5600732ff7ad97329a7eb501f7c51b911b0c3dd82cd4f0220e4c99 +EBUILD cqueues-20200726_p20241204.ebuild 3028 BLAKE2B 87ed30bbde72e3b2a7f3026776ab257f4e328f94dd3b9a0e00ceefecf024a2d8abadfd7a47e213b74c7a8f336465f95fdce745522fee68cab69395c11df88ab4 SHA512 68023a925ec90f034ad769eb6e8bd29e575e98a32867bfc50a57f8e2c9701c602147ff7ee68782d69c50ac9fc4b9378b8f1f0d9ac96070c207717e0589480796 +MISC metadata.xml 470 BLAKE2B 3eca8f608fe761cd0299d87980f46eadb65d4793b2117d3c0caca3ac8dfc56841273fffbac3c5d864a3458ef545930923bec4485d78a92b3eb4c7e18351c618d SHA512 688cffab22678f3d716b50006f408c79d5b8aadc94dc2d67face460d315bc239c731dbb31f29dafc7614965f65ecae02d709eafddf65a508ea7796d37d851609 diff --git a/dev-lua/cqueues/cqueues-20200726_p20241204.ebuild b/dev-lua/cqueues/cqueues-20200726_p20241204.ebuild new file mode 100644 index 000000000000..09c3e2b459aa --- /dev/null +++ b/dev-lua/cqueues/cqueues-20200726_p20241204.ebuild @@ -0,0 +1,142 @@ +# Copyright 2024 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="Stackable Continuation Queues" +HOMEPAGE="https://github.com/wahern/cqueues" +HOMEPAGE+=" http://25thandclement.com/~william/projects/cqueues.html" +EGIT_COMMIT="8c0142577d3cb1f24917879997678bef0d084815" +SRC_URI="https://github.com/wahern/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + +S="${WORKDIR}/${PN}-${EGIT_COMMIT}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="examples" + +REQUIRED_USE="${LUA_REQUIRED_USE}" + +COMMON_DEPEND=" + ${LUA_DEPS} + dev-libs/openssl:0= +" +DEPEND=" + ${COMMON_DEPEND} + dev-lua/compat53[${LUA_USEDEP}] +" +RDEPEND="${COMMON_DEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/cqueues-20200726_p20241204-qa-flags.patch + "${FILESDIR}"/cqueues-20200726_p20241204-rm-vendor-compat53.patch +) + +DOCS=( "doc/." ) + +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 || die +} + +src_prepare() { + default + rm -r vendor || die + + # tests deleted : + # 22, 73, 87 = weak/old ssl + # 30,62,153 = network required + rm regress/22-client-dtls.lua \ + regress/73-starttls-buffering.lua \ + regress/87-alpn-disappears.lua \ + regress/30-starttls-completion.lua \ + regress/62-noname.lua \ + regress/153-dns-resolvers.lua || die + + lua_copy_sources + lua_foreach_impl lua_src_prepare +} + +lua_src_compile() { + pushd "${BUILD_DIR}" || die + + if [[ ${ELUA} != luajit ]]; then + LUA_VERSION="$(ver_cut 1-2 $(lua_get_version))" + else + LUA_VERSION="5.1" + fi + + emake CC=$(tc-getCC) \ + all${LUA_VERSION} + + popd || die +} + +src_compile() { + lua_foreach_impl lua_src_compile +} + +lua_src_test() { + pushd "${BUILD_DIR}" || die + + emake CC=$(tc-getCC) check + + popd || die +} + +src_test() { + lua_foreach_impl lua_src_test +} + +lua_src_install() { + pushd "${BUILD_DIR}" || die + + if [[ ${ELUA} != luajit ]]; then + LUA_VERSION="$(ver_cut 1-2 $(lua_get_version))" + else + LUA_VERSION="5.1" + fi + + 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" \ + install${LUA_VERSION} + + popd || die +} + +src_install() { + lua_foreach_impl lua_src_install + + use examples && dodoc -r "examples/." + einstalldocs +} diff --git a/dev-lua/cqueues/files/cqueues-20200726_p20241204-qa-flags.patch b/dev-lua/cqueues/files/cqueues-20200726_p20241204-qa-flags.patch new file mode 100644 index 000000000000..a1f654877c04 --- /dev/null +++ b/dev-lua/cqueues/files/cqueues-20200726_p20241204-qa-flags.patch @@ -0,0 +1,39 @@ +--- a/GNUmakefile 2024-12-10 19:17:18.107965992 -0000 ++++ b/GNUmakefile 2024-12-10 19:17:25.319850369 -0000 +@@ -19,7 +19,6 @@ + LUAPATH_FN = $(shell env CC='$(subst ',\\',$(CC))' CPPFLAGS='$(subst ',\\',$(CPPFLAGS))' LDFLAGS='$(subst ',\\',$(LDFLAGS))' $(LUAPATH) -krxm3 -I '$(subst ',\\',$(DESTDIR)$(includedir))' -I/usr/include -I/usr/local/include -P '$(subst ',\\',$(DESTDIR)$(bindir))' -P '$(subst ',\\',$(bindir))' -L '$(subst ',\\',$(DESTDIR)$(libdir))' -L '$(subst ',\\',$(libdir))' -v$(1) $(2)) + + # check whether luapath can locate Lua $(1) headers +-HAVE_API_FN = $(and $(filter $(1),$(call LUAPATH_FN,$(1),version)),$(1)$(info enabling Lua $(1))) + + # check whether $(1) in LUA_APIS or $(LUA$(1:.=)_CPPFLAGS) is non-empty + WITH_API_FN = $$(and $$(or $$(filter $(1),$$(LUA_APIS)),$$(LUA$(subst .,,$(1))_CPPFLAGS)),$(1)) +@@ -168,18 +167,15 @@ + ifeq ($(origin ALL_CFLAGS), undefined) + + ifeq ($(VENDOR_CC_$(d)), gcc) +-ALL_CFLAGS += -O2 -std=gnu99 -fPIC +-ALL_CFLAGS += -g -Wall -Wextra $(call cc-option, -Wno-missing-field-initializers) $(call cc-option, -Wno-override-init) -Wno-unused ++ALL_CFLAGS += -std=gnu99 -fPIC + endif + + ifeq ($(VENDOR_CC_$(d)), clang) +-ALL_CFLAGS += -O2 -std=gnu99 -fPIC +-ALL_CFLAGS += -g -Wall -Wextra -Wno-missing-field-initializers -Wno-initializer-overrides -Wno-unused -Wno-dollar-in-identifier-extension ++ALL_CFLAGS += -std=gnu99 -fPIC + endif + + ifeq ($(VENDOR_CC_$(d)), sunpro) + ALL_CFLAGS += -xcode=pic13 +-ALL_CFLAGS += -g + # + # Solaris Studio supports anonymous unions just fine; but it complains + # incessantly about them. +@@ -215,7 +211,6 @@ + # + ifeq ($(origin ALL_LDFLAGS), undefined) + +-ALL_LDFLAGS += -L$(DESTDIR)$(libdir) -L$(libdir) + ALL_LDFLAGS += $(LDFLAGS) + + endif # ALL_LDFLAGS diff --git a/dev-lua/cqueues/files/cqueues-20200726_p20241204-rm-vendor-compat53.patch b/dev-lua/cqueues/files/cqueues-20200726_p20241204-rm-vendor-compat53.patch new file mode 100644 index 000000000000..ed25b17ba21a --- /dev/null +++ b/dev-lua/cqueues/files/cqueues-20200726_p20241204-rm-vendor-compat53.patch @@ -0,0 +1,48 @@ +--- a/src/GNUmakefile 2024-12-10 19:37:27.380639046 -0000 ++++ b/src/GNUmakefile 2024-12-10 19:37:56.648169798 -0000 +@@ -22,7 +22,7 @@ + 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 @@ + $$(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)/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 +--- a/src/cqueues.h 2024-12-10 19:37:27.380639046 -0000 ++++ b/src/cqueues.h 2024-12-10 19:37:38.028468322 -0000 +@@ -40,7 +40,7 @@ + #include <lualib.h> + #include <lauxlib.h> + +-#include "../vendor/compat53/c-api/compat-5.3.h" ++#include <compat-5.3.h> + + + /* diff --git a/dev-lua/cqueues/metadata.xml b/dev-lua/cqueues/metadata.xml new file mode 100644 index 000000000000..2b85a46cd9d9 --- /dev/null +++ b/dev-lua/cqueues/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>nicolas.parlant@parhuet.fr</email> + <name>Nicolas PARLANT</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="github">wahern/cqueues</remote-id> + </upstream> +</pkgmetadata> |