* [gentoo-commits] repo/gentoo:master commit in: dev-lua/lanes/, dev-lua/lanes/files/
@ 2020-11-30 21:19 Conrad Kostecki
0 siblings, 0 replies; 2+ messages in thread
From: Conrad Kostecki @ 2020-11-30 21:19 UTC (permalink / raw
To: gentoo-commits
commit: a9d2d1976335b7eb653fb64247b21cfbf2fc93be
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 30 21:01:10 2020 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Mon Nov 30 21:19:13 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9d2d197
dev-lua/lanes: bump to version 3.13.0
Closes: https://bugs.gentoo.org/716710
Closes: https://bugs.gentoo.org/727076
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
dev-lua/lanes/Manifest | 1 +
dev-lua/lanes/files/lanes-3.13.0-makefile.patch | 93 +++++++++++++++++++++++++
dev-lua/lanes/lanes-3.13.0.ebuild | 59 ++++++++++++++++
3 files changed, 153 insertions(+)
diff --git a/dev-lua/lanes/Manifest b/dev-lua/lanes/Manifest
index 017386fd955..7ddec415417 100644
--- a/dev-lua/lanes/Manifest
+++ b/dev-lua/lanes/Manifest
@@ -1 +1,2 @@
DIST lanes-3.10.0.tar.gz 231359 BLAKE2B beb1972a9b37097947fc673a644330fe8b66c826bc09967526b96d8e28838939516ee3ad4640fb8e5dca7061227c2844d55270c48f26416c7a7bd3613a83e648 SHA512 4a49f560623e291a8344ffef69f4f26fd422d21d3926d73dfee9c9ae9ebd4973e5ae2d307dfd42c5a3bf101bfcc277df54f0a46d89390c83483208e36d4e5d9b
+DIST lanes-3.13.0.tar.gz 247978 BLAKE2B e330f3648e865b8b7c1b77061b6a8210f46e1db650066736afe62040dbb20c7e31e0037b420fded8fb0931cc2ac59687e2039fb31f43c1bdf0cae8cd3c031307 SHA512 bb509181757fa2b4f07a55962015b35ca6bb867b18ec89dd655f333babe2e12f56479fa85bc98e0dacf5bec2a523265bbc3a978396dc332dc1fdda4df760b2e5
diff --git a/dev-lua/lanes/files/lanes-3.13.0-makefile.patch b/dev-lua/lanes/files/lanes-3.13.0-makefile.patch
new file mode 100644
index 00000000000..257c9efca46
--- /dev/null
+++ b/dev-lua/lanes/files/lanes-3.13.0-makefile.patch
@@ -0,0 +1,93 @@
+--- lanes-3.13.0.old/Makefile 2018-11-30 13:28:50.000000000 +0100
++++ lanes-3.13.0/Makefile 2020-11-30 21:28:36.769384766 +0100
+@@ -33,7 +33,7 @@
+
+ # Autodetect LUA
+ #
+-LUA=$(word 1,$(shell which lua5.1$(_LUAEXT)) $(shell which lua51$(_LUAEXT)) lua$(_LUAEXT))
++LUA ?= $(word 1,$(shell which lua5.1$(_LUAEXT)) $(shell which lua51$(_LUAEXT)) lua$(_LUAEXT))
+
+ _TARGET_SO=$(_TARGET_DIR)/core.$(_SO)
+
+--- lanes-3.13.0.old/src/Makefile 2018-11-30 13:28:50.000000000 +0100
++++ lanes-3.13.0/src/Makefile 2020-11-30 21:40:06.399382894 +0100
+@@ -15,7 +15,7 @@
+ #
+ LIBFLAG=-shared
+
+-OPT_FLAGS=-O2
++OPT_FLAGS ?=
+ # -O0 -g
+
+ _SO=so
+@@ -38,50 +38,8 @@
+ LUA_LIBS:="$(LUA_DEV)/lua5.1.dll" -lgcc
+ LIBFLAG=-shared -Wl,-Map,lanes.map
+ else
+- # Autodetect LUA_FLAGS and/or LUA_LIBS
+- #
+- ifneq "$(shell which pkg-config)" ""
+- ifeq "$(shell pkg-config --exists luajit && echo 1)" "1"
+- LUA_FLAGS:=$(shell pkg-config --cflags luajit)
+- LUA_LIBS:=$(shell pkg-config --libs luajit)
+- #
+- # Debian: -I/usr/include/luajit-2.0
+- # -lluajit-5.1
+- else
+- ifeq "$(shell pkg-config --exists lua5.1 && echo 1)" "1"
+- LUA_FLAGS:=$(shell pkg-config --cflags lua5.1)
+- LUA_LIBS:=$(shell pkg-config --libs lua5.1)
+- #
+- # Ubuntu: -I/usr/include/lua5.1
+- # -llua5.1
+- else
+- ifeq "$(shell pkg-config --exists lua && echo 1)" "1"
+- LUA_FLAGS:=$(shell pkg-config --cflags lua)
+- LUA_LIBS:=$(shell pkg-config --libs lua)
+- #
+- # OS X fink with pkg-config:
+- # -I/sw/include
+- # -L/sw/lib -llua -lm
+- else
+- $(warning *** 'pkg-config' existed but did not know of 'lua[5.1]' - Good luck!)
+- LUA_FLAGS:=
+- LUA_LIBS:=-llua
+- endif
+- endif
+- endif
+- else
+- # No 'pkg-config'; try defaults
+- #
+- ifeq "$(shell uname -s)" "Darwin"
+- $(warning *** Assuming 'fink' at default path)
+- LUA_FLAGS:=-I/sw/include
+- LUA_LIBS:=-L/sw/lib -llua
+- else
+- $(warning *** Assuming an arbitrary Lua installation; try installing 'pkg-config')
+- LUA_FLAGS:=
+- LUA_LIBS:=-llua
+- endif
+- endif
++ LUA_FLAGS ?= $(shell pkg-config --cflags lua)
++ LUA_LIBS ?= $(shell pkg-config --libs lua)
+ endif
+
+ ifeq "$(shell uname -s)" "Darwin"
+@@ -92,7 +50,7 @@
+ LIBFLAG = -bundle -undefined dynamic_lookup
+ endif
+
+- CFLAGS=-Wall -Werror $(OPT_FLAGS) $(LUA_FLAGS)
++ CFLAGS=-Wall $(OPT_FLAGS) $(LUA_FLAGS)
+ LIBS=$(LUA_LIBS)
+ endif
+
+@@ -125,7 +83,7 @@
+ #
+ $(MODULE_DIR)/core.$(_SO): $(OBJ)
+ mkdir -p $(MODULE_DIR)
+- $(CC) $(LIBFLAG) $^ $(LIBS) $(LUA_LIBS) -o $@
++ $(CC) $(LDFLAGS) $(LIBFLAG) $^ $(LIBS) $(LUA_LIBS) -o $@
+
+ clean:
+ -rm -rf $(MODULE)/core.$(_SO) *.o *.map
diff --git a/dev-lua/lanes/lanes-3.13.0.ebuild b/dev-lua/lanes/lanes-3.13.0.ebuild
new file mode 100644
index 00000000000..e3c4a87c18c
--- /dev/null
+++ b/dev-lua/lanes/lanes-3.13.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit 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 ~x86"
+IUSE="luajit test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ luajit? ( dev-lang/luajit:2 )
+ !luajit? ( dev-lang/lua:0 )
+"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND="
+ virtual/pkgconfig
+ test? ( ${RDEPEND} )
+"
+
+HTML_DOCS=( "docs/." )
+
+PATCHES=( "${FILESDIR}/${PN}-3.13.0-makefile.patch" )
+
+src_compile() {
+ local myemakeargs=(
+ "CC=$(tc-getCC)"
+ "LUA=$(usex luajit 'luajit' 'lua')"
+ "LUA_FLAGS=-I$($(tc-getPKG_CONFIG) --variable $(usex luajit 'includedir' 'INSTALL_INC') $(usex luajit 'luajit' 'lua'))"
+ "LUA_LIBS="
+ "OPT_FLAGS=${CFLAGS}"
+ )
+
+ emake "${myemakeargs[@]}"
+}
+
+src_test() {
+ emake LUA=$(usex luajit 'luajit' 'lua') test
+}
+
+src_install() {
+ local myemakeargs=(
+ "LUA_LIBDIR=${ED}/$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD $(usex luajit 'luajit' 'lua'))"
+ "LUA_SHAREDIR=${ED}/$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD $(usex luajit 'luajit' 'lua'))"
+ )
+
+ emake "${myemakeargs[@]}" install
+
+ einstalldocs
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lua/lanes/, dev-lua/lanes/files/
@ 2024-01-23 21:04 Conrad Kostecki
0 siblings, 0 replies; 2+ messages in thread
From: Conrad Kostecki @ 2024-01-23 21:04 UTC (permalink / raw
To: gentoo-commits
commit: 711bfacdbc15f0fa865d6016a1a700662743f805
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 23 21:01:31 2024 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Tue Jan 23 21:03:47 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=711bfacd
dev-lua/lanes: fix compilation with musl
Closes: https://bugs.gentoo.org/830158
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
dev-lua/lanes/files/lanes-3.16.2-musl.patch | 27 +++++++++++++++++++++++++++
dev-lua/lanes/lanes-3.16.2.ebuild | 7 +++++--
2 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/dev-lua/lanes/files/lanes-3.16.2-musl.patch b/dev-lua/lanes/files/lanes-3.16.2-musl.patch
new file mode 100644
index 000000000000..05508a57d85d
--- /dev/null
+++ b/dev-lua/lanes/files/lanes-3.16.2-musl.patch
@@ -0,0 +1,27 @@
+From 0e959e637b6ee85b0710e0608fe5d678ad7e0b78 Mon Sep 17 00:00:00 2001
+From: Conrad Kostecki <conikost@gentoo.org>
+Date: Tue, 23 Jan 2024 21:58:50 +0100
+Subject: [PATCH] src/threading.h: fix compilation on musl
+
+Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
+---
+ src/threading.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/threading.h b/src/threading.h
+index 3925076..b1706ac 100644
+--- a/src/threading.h
++++ b/src/threading.h
+@@ -113,7 +113,11 @@ enum e_status { PENDING, RUNNING, WAITING, DONE, ERROR_ST, CANCELLED };
+ #include <pthread.h>
+
+ #ifdef PLATFORM_LINUX
+- # define _MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP
++ #if defined(__GLIBC__)
++ # define _MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP
++ #else
++ # define _MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE
++ #endif
+ #else
+ /* OS X, ... */
+ # define _MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE
diff --git a/dev-lua/lanes/lanes-3.16.2.ebuild b/dev-lua/lanes/lanes-3.16.2.ebuild
index 89c99904f4bc..a77abaafcacc 100644
--- a/dev-lua/lanes/lanes-3.16.2.ebuild
+++ b/dev-lua/lanes/lanes-3.16.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -31,7 +31,10 @@ BDEPEND="
HTML_DOCS=( "docs/." )
-PATCHES=( "${FILESDIR}/${PN}-3.13.0-makefile.patch" )
+PATCHES=(
+ "${FILESDIR}/${PN}-3.13.0-makefile.patch"
+ "${FILESDIR}/${PN}-3.16.2-musl.patch"
+)
src_prepare() {
default
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-23 21:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-23 21:04 [gentoo-commits] repo/gentoo:master commit in: dev-lua/lanes/, dev-lua/lanes/files/ Conrad Kostecki
-- strict thread matches above, loose matches on Subject: below --
2020-11-30 21:19 Conrad Kostecki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox