public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: dev-util/lua-language-server/files/, dev-util/lua-language-server/
@ 2023-01-01 23:08 Mathis Winterer
  0 siblings, 0 replies; 8+ messages in thread
From: Mathis Winterer @ 2023-01-01 23:08 UTC (permalink / raw
  To: gentoo-commits

commit:     08285c8c5a479dce78ca70dfac51828aee4c59e9
Author:     Mathis Winterer <mrmagic223325 <AT> fedora <DOT> email>
AuthorDate: Sun Jan  1 23:06:47 2023 +0000
Commit:     Mathis Winterer <mrmagic223325 <AT> fedora <DOT> email>
CommitDate: Sun Jan  1 23:06:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=08285c8c

dev-util/lua-language-server: Stop prestripping binaries, Remove direct calls to gcc, patch build scripts to respect CFLAGS/CXXFLAGS/LDFLAGS

Closes: https://bugs.gentoo.org/889302
Closes: https://bugs.gentoo.org/889308
Closes: https://bugs.gentoo.org/889306
Closes: https://bugs.gentoo.org/889304
Signed-off-by: Mathis Winterer <mrmagic223325 <AT> fedora.email>

 .../lua-language-server/files/build.ninja.patch    | 142 +++++++++++++++++++++
 .../lua-language-server/files/linux.ninja.patch    |  94 ++++++++++++++
 .../lua-language-server-3.6.4.ebuild               |  35 ++++-
 3 files changed, 269 insertions(+), 2 deletions(-)

diff --git a/dev-util/lua-language-server/files/build.ninja.patch b/dev-util/lua-language-server/files/build.ninja.patch
new file mode 100644
index 000000000..49111813b
--- /dev/null
+++ b/dev-util/lua-language-server/files/build.ninja.patch
@@ -0,0 +1,142 @@
+--- a/build/build.ninja	2023-01-01 23:53:30.813718024 +0100
++++ b/build/build.ninja	2023-01-01 23:04:59.011627739 +0100
+@@ -2,7 +2,7 @@
+ builddir = build
+ bin = bin
+ obj = $builddir/obj
+-cc = x86_64-pc-linux-gnu-gcc
++cc = REPLACE_ME
+ luamake = $
+     /var/tmp/portage/dev-util/lua-language-server-3.6.4/work/3rd/luamake/luamake
+ rule configure
+@@ -13,17 +13,17 @@
+     3rd/bee.lua/compile/config.lua 3rd/bee.lua/compile/common.lua $
+     make/code_format.lua
+ rule c_source_bee
+-  command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall -Werror $
+-    -fvisibility=hidden -I3rd/bee.lua/3rd/lua-seri -I$builddir/lua54 $
+-    -DNDEBUG -fPIC -o $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d -std=c11 $
++    -I3rd/bee.lua/3rd/lua-seri -I$builddir/lua54 $
++    -DNDEBUG -o $out -c $in CFLAGS
+   description = Compile C   $out
+   deps = gcc
+   depfile = $out.d
+ build $obj/source_bee/lua-seri.obj: c_source_bee $
+     3rd/bee.lua/3rd/lua-seri/lua-seri.c
+ rule cxx_source_bee
+-  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall -Werror $
+-    -fvisibility=hidden -I3rd/bee.lua/bee/nonstd -DNDEBUG -fPIC -o $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
++    -I3rd/bee.lua/bee/nonstd -DNDEBUG -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -31,8 +31,8 @@
+     3rd/bee.lua/bee/nonstd/fmt/format.cc
+ build $obj/source_bee/os.obj: cxx_source_bee 3rd/bee.lua/bee/nonstd/fmt/os.cc
+ rule cxx_source_bee_1
+-  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall -Werror $
+-    -fvisibility=hidden -I3rd/bee.lua -DNDEBUG -fPIC -o $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
++    -I3rd/bee.lua -DNDEBUG -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -56,9 +56,9 @@
+ build $obj/source_bee/path_helper.obj: cxx_source_bee_1 $
+     3rd/bee.lua/bee/utility/path_helper.cpp
+ rule cxx_source_bee_2
+-  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall -Werror $
+-    -fvisibility=hidden -I3rd/bee.lua/3rd/lua-seri -I3rd/bee.lua $
+-    -I$builddir/lua54 -DBEE_STATIC -DNDEBUG -fPIC -o $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
++    -I3rd/bee.lua/3rd/lua-seri -I3rd/bee.lua $
++    -I$builddir/lua54 -DBEE_STATIC -DNDEBUG -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -79,26 +79,26 @@
+ build $obj/source_bee/lua_time.obj: cxx_source_bee_2 $
+     3rd/bee.lua/binding/lua_time.cpp
+ rule c_source_lua
+-  command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall -Werror $
+-    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d -std=c11 $
++    -DNDEBUG -o $out -c $in CFLAGS
+   description = Compile C   $out
+   deps = gcc
+   depfile = $out.d
+ build $obj/source_lua/utf8_crt.obj: c_source_lua $
+     3rd/bee.lua/3rd/lua/utf8_crt.c
+ rule c_source_lua_1
+-  command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall -Werror $
+-    -DMAKE_LIB -DLUA_USE_LINUX -DNDEBUG -fPIC -Wno-maybe-uninitialized -o $
+-    $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d -std=c11 $
++    -DMAKE_LIB -DLUA_USE_LINUX -DNDEBUG -o $
++    $out -c $in CFLAGS
+   description = Compile C   $out
+   deps = gcc
+   depfile = $out.d
+ build $obj/source_lua/linit.obj: c_source_lua_1 3rd/bee.lua/3rd/lua/linit.c
+ build $obj/source_lua/onelua.obj: c_source_lua_1 3rd/bee.lua/3rd/lua/onelua.c
+ rule cxx_source_bootstrap
+-  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall -Werror $
+-    -fvisibility=hidden -I3rd/bee.lua/3rd/lua -I3rd/bee.lua -DLUA_USE_LINUX $
+-    -DNDEBUG -fPIC -o $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
++    -I3rd/bee.lua/3rd/lua -I3rd/bee.lua -DLUA_USE_LINUX $
++    -DNDEBUG -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -108,7 +108,7 @@
+     3rd/bee.lua/bootstrap/progdir.cpp
+ rule link_bootstrap
+   command = $cc $in -o $out -lm -ldl -Wl,-E -lstdc++fs -pthread $
+-    -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -static-libgcc -s
++    -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -static-libgcc LDFLAGS
+   description = Link    Exe $out
+ build /bootstrap: link_bootstrap $obj/source_bootstrap/main.obj $
+     $obj/source_bootstrap/progdir.obj $obj/source_bee/lua-seri.obj $
+@@ -146,10 +146,10 @@
+     3rd/bee.lua/test/test_thread.lua 3rd/bee.lua/test/test_time.lua | $
+     /bootstrap copy_script
+ rule cxx_code_format
+-  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall $
+-    -fvisibility=hidden -I3rd/EmmyLuaCodeStyle/include $
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
++    -I3rd/EmmyLuaCodeStyle/include $
+     -I3rd/bee.lua/3rd/lua -I3rd/EmmyLuaCodeStyle/3rd/wildcards/include $
+-    -DNDEBUG -march=native -O2 -pipe -o $out -c $in
++    -DNDEBUG -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -274,9 +274,9 @@
+ build $obj/code_format/Utf8.obj: cxx_code_format $
+     3rd/EmmyLuaCodeStyle/Util/src/Utf8.cpp
+ rule c_lpeglabel
+-  command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall $
+-    -fvisibility=hidden -I3rd/bee.lua/3rd/lua -DMAXRECLEVEL=1000 -DNDEBUG $
+-    -o $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d -std=c11 $
++    -I3rd/bee.lua/3rd/lua -DMAXRECLEVEL=1000 -DNDEBUG $
++    -o $out -c $in CFLAGS
+   description = Compile C   $out
+   deps = gcc
+   depfile = $out.d
+@@ -286,9 +286,9 @@
+ build $obj/lpeglabel/lpltree.obj: c_lpeglabel 3rd/lpeglabel/lpltree.c
+ build $obj/lpeglabel/lplvm.obj: c_lpeglabel 3rd/lpeglabel/lplvm.c
+ rule cxx_lua_language_server
+-  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall $
+-    -fvisibility=hidden -I3rd/bee.lua -I3rd/bee.lua/3rd/lua -DCODE_FORMAT $
+-    -DNDEBUG -o $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
++    -I3rd/bee.lua -I3rd/bee.lua/3rd/lua -DCODE_FORMAT $
++    -DNDEBUG -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d

diff --git a/dev-util/lua-language-server/files/linux.ninja.patch b/dev-util/lua-language-server/files/linux.ninja.patch
new file mode 100644
index 000000000..a9a853ed7
--- /dev/null
+++ b/dev-util/lua-language-server/files/linux.ninja.patch
@@ -0,0 +1,94 @@
+--- a/3rd/luamake/compile/ninja/linux.ninja	2022-11-29 13:53:05.000000000 +0100
++++ b/3rd/luamake/compile/ninja/linux.ninja	2023-01-01 22:40:43.690777107 +0100
+@@ -2,20 +2,20 @@
+ builddir = build/linux
+ bin = $builddir/bin
+ obj = $builddir/obj
+-cc = gcc
++cc = REPLACE_ME
+ luamake = luamake
+ rule c_source_bee
+-  command = $cc -MMD -MT $out -MF $out.d  -O2 -Wall -Werror $
+-    -fvisibility=hidden -I3rd/bee.lua/3rd/lua-seri -Itools/lua54 -DNDEBUG $
+-    -fPIC -o $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d $
++    -I3rd/bee.lua/3rd/lua-seri -Itools/lua54 -DNDEBUG $
++    -o $out -c $in CFLAGS
+   description = Compile C   $out
+   deps = gcc
+   depfile = $out.d
+ build $obj/source_bee/lua-seri.obj: c_source_bee $
+     3rd/bee.lua/3rd/lua-seri/lua-seri.c
+ rule cxx_source_bee
+-  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall -Werror $
+-    -fvisibility=hidden -I3rd/bee.lua/bee/nonstd -DNDEBUG -fPIC -o $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
++    -I3rd/bee.lua/bee/nonstd -DNDEBUG -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -23,8 +23,8 @@
+     3rd/bee.lua/bee/nonstd/fmt/format.cc
+ build $obj/source_bee/os.obj: cxx_source_bee 3rd/bee.lua/bee/nonstd/fmt/os.cc
+ rule cxx_source_bee_1
+-  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall -Werror $
+-    -fvisibility=hidden -I3rd/bee.lua -DNDEBUG -fPIC -o $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
++    -I3rd/bee.lua -DNDEBUG -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -48,9 +48,9 @@
+ build $obj/source_bee/path_helper.obj: cxx_source_bee_1 $
+     3rd/bee.lua/bee/utility/path_helper.cpp
+ rule cxx_source_bee_2
+-  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall -Werror $
+-    -fvisibility=hidden -I3rd/bee.lua/3rd/lua-seri -I3rd/bee.lua $
+-    -Itools/lua54 -DBEE_STATIC -DNDEBUG -fPIC -o $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
++    -I3rd/bee.lua/3rd/lua-seri -I3rd/bee.lua $
++    -Itools/lua54 -DBEE_STATIC -DNDEBUG -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -71,24 +71,24 @@
+ build $obj/source_bee/lua_time.obj: cxx_source_bee_2 $
+     3rd/bee.lua/binding/lua_time.cpp
+ rule c_source_lua
+-  command = $cc -MMD -MT $out -MF $out.d  -O2 -Wall -Werror $
+-    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d $
++    -DNDEBUG -o $out -c $in CFLAGS
+   description = Compile C   $out
+   deps = gcc
+   depfile = $out.d
+ build $obj/source_lua/utf8_crt.obj: c_source_lua $
+     3rd/bee.lua/3rd/lua/utf8_crt.c
+ rule c_source_lua_1
+-  command = $cc -MMD -MT $out -MF $out.d  -O2 -Wall -Werror -DMAKE_LIB $
+-    -DLUA_USE_LINUX -DNDEBUG -fPIC -Wno-maybe-uninitialized -o $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d -DMAKE_LIB $
++    -DLUA_USE_LINUX -DNDEBUG -o $out -c $in CFLAGS
+   description = Compile C   $out
+   deps = gcc
+   depfile = $out.d
+ build $obj/source_lua/onelua.obj: c_source_lua_1 3rd/bee.lua/3rd/lua/onelua.c
+ rule cxx_source_bootstrap
+-  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall -Werror $
+-    -fvisibility=hidden -I3rd/bee.lua/3rd/lua -I3rd/bee.lua -DLUA_USE_LINUX $
+-    -DNDEBUG -fPIC -o $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
++    -I3rd/bee.lua/3rd/lua -I3rd/bee.lua -DLUA_USE_LINUX $
++    -DNDEBUG -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -98,7 +98,7 @@
+     3rd/bee.lua/bootstrap/progdir.cpp
+ rule link_luamake
+   command = $cc $in -o $out -lm -ldl -Wl,-E -lstdc++fs -pthread $
+-    -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -static-libgcc -s
++    -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -static-libgcc LDFLAGS
+   description = Link    Exe $out
+ build $bin/luamake: link_luamake $obj/source_bootstrap/main.obj $
+     $obj/source_bootstrap/progdir.obj $obj/source_bee/lua-seri.obj $

diff --git a/dev-util/lua-language-server/lua-language-server-3.6.4.ebuild b/dev-util/lua-language-server/lua-language-server-3.6.4.ebuild
index bd99b8d38..f0cf3d9c3 100644
--- a/dev-util/lua-language-server/lua-language-server-3.6.4.ebuild
+++ b/dev-util/lua-language-server/lua-language-server-3.6.4.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit ninja-utils
+inherit ninja-utils toolchain-funcs
 
 DESCRIPTION="Lua language server"
 HOMEPAGE="https://github.com/sumneko/lua-language-server"
@@ -18,14 +18,45 @@ BDPEND="
 	${NINJA_DEPEND}
 	app-arch/unzip
 	dev-util/ninja
-	sys-devel/gcc
 "
 RESTRICT="!test? ( test )"
+PATCHES=( "${FILESDIR}/linux.ninja.patch" )
+
+src_prepare() {
+	# Remove hardcoded gcc references
+	sed -i "/lm.cxx/a lm.cc = '$(tc-getCC)'" \
+		make.lua || die
+	sed -i "s/CC = gcc/ CC = ${tc-getCC}/" \
+		3rd/lpeglabel/makefile || die
+	sed -i "s/flags = \"-Wall -Werror\"/flags =\"${CXXFLAGS}\"/" \
+		make/code_format.lua || die
+	# Patch
+	default
+	# Shipped file doesn't respect CFLAGS/CXXFLAGS
+	sed -i -e "s/^cc = REPLACE_ME/cc = $(tc-getCC)/" \
+		-e "s/CFLAGS/${CFLAGS}/" \
+		-e "s/CXXFLAGS/${CXXFLAGS}/" \
+		-e "s/LDFLAGS/${LDFLAGS}/" \
+		3rd/luamake/compile/ninja/linux.ninja || die
+}
 
 src_compile() {
 	eninja -C 3rd/luamake -f compile/ninja/linux.ninja "$(usex test "test" "luamake")"
 	use test && eninja -C 3rd/luamake -f compile/ninja/linux.ninja luamake
 	./3rd/luamake/luamake init || die
+
+	eapply "${FILESDIR}/build.ninja.patch"
+
+	sed -i "s/^cc = gcc/cc = $(tc-getCC)/" \
+		build/build.ninja || die
+
+	# Generated file doesn't respect CFLAGS/CXXFLAGS
+	sed -i -e "s/^cc = REPLACE_ME/cc = $(tc-getCC)/" \
+		-e "s/CFLAGS/${CFLAGS}/" \
+		-e "s/CXXFLAGS/${CXXFLAGS}/" \
+		-e "s/LDFLAGS/${LDFLAGS}/" \
+		build/build.ninja || die
+
 	# Tests are broken
 	eninja -f build/build.ninja all
 }


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: dev-util/lua-language-server/files/, dev-util/lua-language-server/
@ 2023-01-19 20:14 Mathis Winterer
  0 siblings, 0 replies; 8+ messages in thread
From: Mathis Winterer @ 2023-01-19 20:14 UTC (permalink / raw
  To: gentoo-commits

commit:     358ab9012ee99f716417959bbd77384cbae2c3c2
Author:     Mathis Winterer <mrmagic223325 <AT> fedora <DOT> email>
AuthorDate: Thu Jan 19 20:09:44 2023 +0000
Commit:     Mathis Winterer <mrmagic223325 <AT> fedora <DOT> email>
CommitDate: Thu Jan 19 20:09:44 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=358ab901

dev-util/lua-language-server: add 3.6.6, drop 3.6.4

Signed-off-by: Mathis Winterer <mrmagic223325 <AT> fedora.email>

 dev-util/lua-language-server/Manifest              |  2 +-
 .../lua-language-server/files/build.ninja.patch    | 83 ++++++++--------------
 .../lua-language-server/files/linux.ninja.patch    | 36 +++++-----
 ...6.4.ebuild => lua-language-server-3.6.6.ebuild} | 18 ++---
 4 files changed, 59 insertions(+), 80 deletions(-)

diff --git a/dev-util/lua-language-server/Manifest b/dev-util/lua-language-server/Manifest
index 7144f1ceb..98fa5f139 100644
--- a/dev-util/lua-language-server/Manifest
+++ b/dev-util/lua-language-server/Manifest
@@ -1 +1 @@
-DIST lua-language-server-3.6.4.zip 32188348 BLAKE2B 4d249af12cdf151d77b7af1c63cff2de103d7cf80416422bf3cf9fbb6031546963f59dcf1d39f8b8dbe41a3cde29dbdf04ba9fc5760cb310575ebdc0494ec604 SHA512 9f47becc9ade0f205d28ad75abeb5895b06486a21c3afa2b16331c34db25fce70a20a80599f48aa0ba485bad75316e1c0d4080f8bb49eaeb30ccc6eff7b12d13
+DIST lua-language-server-3.6.6.zip 32324475 BLAKE2B 240149ac50a7024f4135d9ad25246058e7160ebee8cf2613b65ba25bc44fdd65101763fbcbfce12c666927200ec64887783ad16d0daccc326177d168334189df SHA512 4dc60fe7bfbf17df1bdac2566fc8bdb16750cf8ea0220ba3c3eb787baa544f79f7fa3d08f519b45b5143cc793f2fe2063ef46a7ba3f3b0d2069d1bd8f72cc83b

diff --git a/dev-util/lua-language-server/files/build.ninja.patch b/dev-util/lua-language-server/files/build.ninja.patch
index d736f3619..3760f9367 100644
--- a/dev-util/lua-language-server/files/build.ninja.patch
+++ b/dev-util/lua-language-server/files/build.ninja.patch
@@ -1,23 +1,13 @@
 --- a/build/build.ninja
 +++ b/build/build.ninja
-@@ -2,7 +2,7 @@
- builddir = build
- bin = bin
- obj = $builddir/obj
--cc = x86_64-pc-linux-gnu-gcc
-+cc = REPLACE_ME
- luamake = $
-     /var/tmp/portage/dev-util/lua-language-server-3.6.4/work/3rd/luamake/luamake
- rule configure
-@@ -13,17 +13,17 @@
+@@ -12,17 +12,17 @@
      3rd/bee.lua/compile/config.lua 3rd/bee.lua/compile/common.lua $
      make/code_format.lua
  rule c_source_bee
 -  command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall -Werror $
--    -fvisibility=hidden -I3rd/bee.lua/3rd/lua-seri -I$builddir/lua54 $
++  command = $cc -MMD -MT $out -MF $out.d -std=c11 -Wall $
+     -fvisibility=hidden -I3rd/bee.lua/3rd/lua-seri -I$builddir/lua54 $
 -    -DNDEBUG -fPIC -o $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d -std=c11 $
-+    -I3rd/bee.lua/3rd/lua-seri -I$builddir/lua54 $
 +    -DNDEBUG -o $out -c $in CFLAGS
    description = Compile C   $out
    deps = gcc
@@ -27,43 +17,42 @@
  rule cxx_source_bee
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall -Werror $
 -    -fvisibility=hidden -I3rd/bee.lua/bee/nonstd -DNDEBUG -fPIC -o $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
-+    -I3rd/bee.lua/bee/nonstd -DNDEBUG -o $out -c $in CXXFLAGS
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -Wall $
++    -fvisibility=hidden -I3rd/bee.lua/bee/nonstd -DNDEBUG -o $out -c $in CXXFLAGS
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -31,8 +31,8 @@
+@@ -30,8 +30,8 @@
      3rd/bee.lua/bee/nonstd/fmt/format.cc
  build $obj/source_bee/os.obj: cxx_source_bee 3rd/bee.lua/bee/nonstd/fmt/os.cc
  rule cxx_source_bee_1
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall -Werror $
 -    -fvisibility=hidden -I3rd/bee.lua -DNDEBUG -fPIC -o $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
-+    -I3rd/bee.lua -DNDEBUG -o $out -c $in CXXFLAGS
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -Wall $
++    -fvisibility=hidden -I3rd/bee.lua -DNDEBUG -o $out -c $in CXXFLAGS
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -56,9 +56,9 @@
+@@ -55,9 +55,9 @@
  build $obj/source_bee/path_helper.obj: cxx_source_bee_1 $
      3rd/bee.lua/bee/utility/path_helper.cpp
  rule cxx_source_bee_2
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall -Werror $
--    -fvisibility=hidden -I3rd/bee.lua/3rd/lua-seri -I3rd/bee.lua $
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -Wall $
+     -fvisibility=hidden -I3rd/bee.lua/3rd/lua-seri -I3rd/bee.lua $
 -    -I$builddir/lua54 -DBEE_STATIC -DNDEBUG -fPIC -o $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
-+    -I3rd/bee.lua/3rd/lua-seri -I3rd/bee.lua $
 +    -I$builddir/lua54 -DBEE_STATIC -DNDEBUG -o $out -c $in CXXFLAGS
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -79,26 +79,26 @@
+@@ -78,26 +78,26 @@
  build $obj/source_bee/lua_time.obj: cxx_source_bee_2 $
      3rd/bee.lua/binding/lua_time.cpp
  rule c_source_lua
 -  command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall -Werror $
 -    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d -std=c11 $
-+    -DNDEBUG -o $out -c $in CFLAGS
++  command = $cc -MMD -MT $out -MF $out.d -std=c11 -Wall $
++    -fvisibility=hidden -DNDEBUG -o $out -c $in CFLAGS
    description = Compile C   $out
    deps = gcc
    depfile = $out.d
@@ -73,8 +62,8 @@
 -  command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall -Werror $
 -    -DMAKE_LIB -DLUA_USE_LINUX -DNDEBUG -fPIC -Wno-maybe-uninitialized -o $
 -    $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d -std=c11 $
-+    -DMAKE_LIB -DLUA_USE_LINUX -DNDEBUG -o $
++  command = $cc -MMD -MT $out -MF $out.d -std=c11 -Wall $
++    -DMAKE_LIB -DLUA_USE_LINUX -DNDEBUG -Wno-maybe-uninitialized -o $
 +    $out -c $in CFLAGS
    description = Compile C   $out
    deps = gcc
@@ -83,15 +72,14 @@
  build $obj/source_lua/onelua.obj: c_source_lua_1 3rd/bee.lua/3rd/lua/onelua.c
  rule cxx_source_bootstrap
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall -Werror $
--    -fvisibility=hidden -I3rd/bee.lua/3rd/lua -I3rd/bee.lua -DLUA_USE_LINUX $
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -Wall $
+     -fvisibility=hidden -I3rd/bee.lua/3rd/lua -I3rd/bee.lua -DLUA_USE_LINUX $
 -    -DNDEBUG -fPIC -o $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
-+    -I3rd/bee.lua/3rd/lua -I3rd/bee.lua -DLUA_USE_LINUX $
 +    -DNDEBUG -o $out -c $in CXXFLAGS
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -108,7 +108,7 @@
+@@ -107,7 +107,7 @@
      3rd/bee.lua/bootstrap/progdir.cpp
  rule link_bootstrap
    command = $cc $in -o $out -lm -ldl -Wl,-E -lstdc++fs -pthread $
@@ -100,43 +88,34 @@
    description = Link    Exe $out
  build /bootstrap: link_bootstrap $obj/source_bootstrap/main.obj $
      $obj/source_bootstrap/progdir.obj $obj/source_bee/lua-seri.obj $
-@@ -146,10 +146,10 @@
+@@ -145,10 +145,10 @@
      3rd/bee.lua/test/test_thread.lua 3rd/bee.lua/test/test_time.lua | $
      /bootstrap copy_script
  rule cxx_code_format
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall $
--    -fvisibility=hidden -I3rd/EmmyLuaCodeStyle/include $
-+  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
-+    -I3rd/EmmyLuaCodeStyle/include $
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -Wall $
+     -fvisibility=hidden -I3rd/EmmyLuaCodeStyle/include $
      -I3rd/bee.lua/3rd/lua -I3rd/EmmyLuaCodeStyle/3rd/wildcards/include $
 -    -DNDEBUG -Wall -Werror -o $out -c $in
-+    -DNDEBUG -o $out -c $in CXXFLAGS
++    -DNDEBUG -Wall -o $out -c $in CXXFLAGS
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -274,9 +274,9 @@
+@@ -273,7 +273,7 @@
  build $obj/code_format/Utf8.obj: cxx_code_format $
      3rd/EmmyLuaCodeStyle/Util/src/Utf8.cpp
  rule c_lpeglabel
 -  command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall $
--    -fvisibility=hidden -I3rd/bee.lua/3rd/lua -DMAXRECLEVEL=1000 -DNDEBUG $
--    -o $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d -std=c11 $
-+    -I3rd/bee.lua/3rd/lua -DMAXRECLEVEL=1000 -DNDEBUG $
-+    -o $out -c $in CFLAGS
++  command = $cc -MMD -MT $out -MF $out.d -std=c11 -Wall $
+     -fvisibility=hidden -I3rd/bee.lua/3rd/lua -DMAXRECLEVEL=1000 -DNDEBUG $
+     -o $out -c $in
    description = Compile C   $out
-   deps = gcc
-   depfile = $out.d
-@@ -286,9 +286,9 @@
+@@ -285,7 +285,7 @@
  build $obj/lpeglabel/lpltree.obj: c_lpeglabel 3rd/lpeglabel/lpltree.c
  build $obj/lpeglabel/lplvm.obj: c_lpeglabel 3rd/lpeglabel/lplvm.c
  rule cxx_lua_language_server
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall $
--    -fvisibility=hidden -I3rd/bee.lua -I3rd/bee.lua/3rd/lua -DCODE_FORMAT $
--    -DNDEBUG -o $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
-+    -I3rd/bee.lua -I3rd/bee.lua/3rd/lua -DCODE_FORMAT $
-+    -DNDEBUG -o $out -c $in CXXFLAGS
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -Wall $
+     -fvisibility=hidden -I3rd/bee.lua -I3rd/bee.lua/3rd/lua -DCODE_FORMAT $
+     -DNDEBUG -o $out -c $in
    description = Compile C++ $out
-   deps = gcc
-   depfile = $out.d

diff --git a/dev-util/lua-language-server/files/linux.ninja.patch b/dev-util/lua-language-server/files/linux.ninja.patch
index b5dbb5348..a16055fd7 100644
--- a/dev-util/lua-language-server/files/linux.ninja.patch
+++ b/dev-util/lua-language-server/files/linux.ninja.patch
@@ -9,10 +9,9 @@
  luamake = luamake
  rule c_source_bee
 -  command = $cc -MMD -MT $out -MF $out.d  -O2 -Wall -Werror $
--    -fvisibility=hidden -I3rd/bee.lua/3rd/lua-seri -Itools/lua54 -DNDEBUG $
++  command = $cc -MMD -MT $out -MF $out.d -Wall $
+     -fvisibility=hidden -I3rd/bee.lua/3rd/lua-seri -Itools/lua54 -DNDEBUG $
 -    -fPIC -o $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d $
-+    -I3rd/bee.lua/3rd/lua-seri -Itools/lua54 -DNDEBUG $
 +    -o $out -c $in CFLAGS
    description = Compile C   $out
    deps = gcc
@@ -22,8 +21,8 @@
  rule cxx_source_bee
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall -Werror $
 -    -fvisibility=hidden -I3rd/bee.lua/bee/nonstd -DNDEBUG -fPIC -o $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
-+    -I3rd/bee.lua/bee/nonstd -DNDEBUG -o $out -c $in CXXFLAGS
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -Wall $
++    -fvisibility=hidden -I3rd/bee.lua/bee/nonstd -DNDEBUG -o $out -c $in CXXFLAGS
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
@@ -33,8 +32,8 @@
  rule cxx_source_bee_1
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall -Werror $
 -    -fvisibility=hidden -I3rd/bee.lua -DNDEBUG -fPIC -o $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
-+    -I3rd/bee.lua -DNDEBUG -o $out -c $in CXXFLAGS
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -Wall $
++    -fvisibility=hidden -I3rd/bee.lua -DNDEBUG -o $out -c $in CXXFLAGS
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
@@ -43,22 +42,21 @@
      3rd/bee.lua/bee/utility/path_helper.cpp
  rule cxx_source_bee_2
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall -Werror $
--    -fvisibility=hidden -I3rd/bee.lua/3rd/lua-seri -I3rd/bee.lua $
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -Wall $
+     -fvisibility=hidden -I3rd/bee.lua/3rd/lua-seri -I3rd/bee.lua $
 -    -Itools/lua54 -DBEE_STATIC -DNDEBUG -fPIC -o $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
-+    -I3rd/bee.lua/3rd/lua-seri -I3rd/bee.lua $
 +    -Itools/lua54 -DBEE_STATIC -DNDEBUG -o $out -c $in CXXFLAGS
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -71,24 +71,24 @@
+@@ -71,25 +71,25 @@
  build $obj/source_bee/lua_time.obj: cxx_source_bee_2 $
      3rd/bee.lua/binding/lua_time.cpp
  rule c_source_lua
 -  command = $cc -MMD -MT $out -MF $out.d  -O2 -Wall -Werror $
 -    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d $
-+    -DNDEBUG -o $out -c $in CFLAGS
++  command = $cc -MMD -MT $out -MF $out.d -Wall $
++    -fvisibility=hidden -DNDEBUG -o $out -c $in CFLAGS
    description = Compile C   $out
    deps = gcc
    depfile = $out.d
@@ -67,23 +65,23 @@
  rule c_source_lua_1
 -  command = $cc -MMD -MT $out -MF $out.d  -O2 -Wall -Werror -DMAKE_LIB $
 -    -DLUA_USE_LINUX -DNDEBUG -fPIC -Wno-maybe-uninitialized -o $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d -DMAKE_LIB $
-+    -DLUA_USE_LINUX -DNDEBUG -o $out -c $in CFLAGS
++  command = $cc -MMD -MT $out -MF $out.d -Wall -DMAKE_LIB $
++    -DLUA_USE_LINUX -DNDEBUG -Wno-maybe-uninitialized -o $out -c $in CFLAGS
    description = Compile C   $out
    deps = gcc
    depfile = $out.d
+ build $obj/source_lua/linit.obj: c_source_lua_1 3rd/bee.lua/3rd/lua/linit.c
  build $obj/source_lua/onelua.obj: c_source_lua_1 3rd/bee.lua/3rd/lua/onelua.c
  rule cxx_source_bootstrap
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall -Werror $
--    -fvisibility=hidden -I3rd/bee.lua/3rd/lua -I3rd/bee.lua -DLUA_USE_LINUX $
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -Wall $
+     -fvisibility=hidden -I3rd/bee.lua/3rd/lua -I3rd/bee.lua -DLUA_USE_LINUX $
 -    -DNDEBUG -fPIC -o $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d -std=c++17 $
-+    -I3rd/bee.lua/3rd/lua -I3rd/bee.lua -DLUA_USE_LINUX $
 +    -DNDEBUG -o $out -c $in CXXFLAGS
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -98,7 +98,7 @@
+@@ -99,7 +99,7 @@
      3rd/bee.lua/bootstrap/progdir.cpp
  rule link_luamake
    command = $cc $in -o $out -lm -ldl -Wl,-E -lstdc++fs -pthread $

diff --git a/dev-util/lua-language-server/lua-language-server-3.6.4.ebuild b/dev-util/lua-language-server/lua-language-server-3.6.6.ebuild
similarity index 82%
rename from dev-util/lua-language-server/lua-language-server-3.6.4.ebuild
rename to dev-util/lua-language-server/lua-language-server-3.6.6.ebuild
index 1284b7e95..b4a2bfe1e 100644
--- a/dev-util/lua-language-server/lua-language-server-3.6.4.ebuild
+++ b/dev-util/lua-language-server/lua-language-server-3.6.6.ebuild
@@ -20,7 +20,7 @@ BDPEND="
 	dev-util/ninja
 "
 RESTRICT="!test? ( test )"
-PATCHES=( "${FILESDIR}/linux.ninja.patch" )
+PATCHES=( "${FILESDIR}/linux.ninja.patch" "${FILESDIR}/build.ninja.patch" )
 
 src_prepare() {
 	# Remove hardcoded gcc references
@@ -28,9 +28,9 @@ src_prepare() {
 		make.lua || die
 	sed -i "s/CC = gcc/ CC = ${tc-getCC}/" \
 		3rd/lpeglabel/makefile || die
-	# Patch
-	default
 	# Shipped file doesn't respect CFLAGS/CXXFLAGS
+	eapply "${FILESDIR}/linux.ninja.patch"
+	eapply_user
 	sed -i -e "s/^cc = REPLACE_ME/cc = $(tc-getCC)/" \
 		-e "s/CFLAGS/${CFLAGS}/" \
 		-e "s/CXXFLAGS/${CXXFLAGS}/" \
@@ -43,16 +43,18 @@ src_compile() {
 	use test && eninja -C 3rd/luamake -f compile/ninja/linux.ninja luamake
 	./3rd/luamake/luamake init || die
 
-	eapply "${FILESDIR}/build.ninja.patch"
-
-	sed -i "s/^cc = gcc/cc = $(tc-getCC)/" \
+	# Generated file doesn't respect CFLAGS/CXXFLAGS
+	sed -i -e "s/^cc =.*./cc = REPLACE_ME/" \
+		-e "s/^luamake =.*./luamake = LUAMAKE_PATH/" \
 		build/build.ninja || die
 
-	# Generated file doesn't respect CFLAGS/CXXFLAGS
-	sed -i -e "s/^cc = REPLACE_ME/cc = $(tc-getCC)/" \
+	eapply "${FILESDIR}/build.ninja.patch"
+	sed -i -e "s/REPLACE_ME/$(tc-getCC)/" \
+		-e "s|LUAMAKE_PATH|${S}/3rd/luamake/luamake|" \
 		-e "s/CFLAGS/${CFLAGS}/" \
 		-e "s/CXXFLAGS/${CXXFLAGS}/" \
 		-e "s/LDFLAGS/${LDFLAGS}/" \
+		-e "7d" \
 		build/build.ninja || die
 
 	# Tests are broken


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: dev-util/lua-language-server/files/, dev-util/lua-language-server/
@ 2023-03-13 22:02 Mathis Winterer
  0 siblings, 0 replies; 8+ messages in thread
From: Mathis Winterer @ 2023-03-13 22:02 UTC (permalink / raw
  To: gentoo-commits

commit:     54297db3c91d8b9a0eec01c5e1c35f97d4afd1e4
Author:     Mathis Winterer <mrmagic223325 <AT> fedora <DOT> email>
AuthorDate: Mon Mar 13 21:54:25 2023 +0000
Commit:     Mathis Winterer <mrmagic223325 <AT> fedora <DOT> email>
CommitDate: Mon Mar 13 22:02:18 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=54297db3

dev-util/lua-language-server: add 3.6.17, drop 3.6.11; Close bug (thanks
tastytea)
https://schlomp.space/tastytea/overlay/src/branch/master/dev-util/lua-language-server

Closes: https://bugs.gentoo.org/900545
Signed-off-by: Mathis Winterer <mrmagic223325 <AT> fedora.email>

 dev-util/lua-language-server/Manifest              |  3 +-
 .../lua-language-server/files/build.ninja.patch    | 29 +++++-----
 dev-util/lua-language-server/files/wrapper.sh      | 15 +++++
 .../lua-language-server-3.6.13.ebuild              | 67 ----------------------
 ...11.ebuild => lua-language-server-3.6.17.ebuild} | 32 ++++++++---
 5 files changed, 55 insertions(+), 91 deletions(-)

diff --git a/dev-util/lua-language-server/Manifest b/dev-util/lua-language-server/Manifest
index c7658e94d..df201ba8c 100644
--- a/dev-util/lua-language-server/Manifest
+++ b/dev-util/lua-language-server/Manifest
@@ -1,2 +1 @@
-DIST lua-language-server-3.6.11.zip 32022639 BLAKE2B 9e5a33b12e40f8b9f7b3eb5a8b049e09e8a7f0b5a5569ee15d5aa2a2035a13a6e75036321aac439a97c56c401914908f878e2f02a136c1de9413f2a9879a56c1 SHA512 6474ad8c84af034002e124a802a28afccb7f7ea439b00b508639a4a20471b5eed995dacf12fe0c8cb2313530fba787fa1127712093402e4e67c7d72e5118ce59
-DIST lua-language-server-3.6.13.zip 30691495 BLAKE2B 376b5f792d1002a0b1e0942e4d91aed4bbdccc5cf033cad56e9fafc6df3a5ef28247fc611c2563c6b3c499e491699bf6f21edc9ac6106440a7dc4662803f8aee SHA512 ce595dfe2e16bb468e90c2e73d5569eeac2cf093a0caaa0006e23ec876edcf491be92dad88e35369f9c250949c887850e8c1805736e8b8f20b0c643a56d6faed
+DIST lua-language-server-3.6.17.zip 30696826 BLAKE2B a6d65b45efd7e10afef4a48986a3e7f622885146830df26647653065efd35c8bada7421ad74ea990cfb3842756dd42fe304c6bfbb3346d00621dd1c4d1e653f8 SHA512 44cbdb25fbd90ca9931669a3cb90216bb6f33ac1e2dc0dea4c28a4340f9c2feb92c005b2212fadc33066481944bb27c03c541cd0c6d0cd7706eeeca34339d567

diff --git a/dev-util/lua-language-server/files/build.ninja.patch b/dev-util/lua-language-server/files/build.ninja.patch
index 5bd6ac190..ff953cae3 100644
--- a/dev-util/lua-language-server/files/build.ninja.patch
+++ b/dev-util/lua-language-server/files/build.ninja.patch
@@ -1,6 +1,6 @@
 --- a/build/build.ninja
 +++ b/build/build.ninja
-@@ -12,17 +12,17 @@
+@@ -12,26 +12,26 @@
      3rd/bee.lua/compile/config.lua 3rd/bee.lua/compile/common.lua $
      make/code_format.lua
  rule c_source_bee
@@ -16,15 +16,16 @@
      3rd/bee.lua/3rd/lua-seri/lua-seri.c
  rule cxx_source_bee
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
--    -Werror -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in
+-    -Werror -fvisibility=hidden -I3rd/bee.lua/bee/nonstd/3rd -DNDEBUG -fPIC $
+-    -o $out -c $in
 +  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -Wall $
-+    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
++    -fvisibility=hidden -I3rd/bee.lua/bee/nonstd/3rd -DNDEBUG -fPIC $
++    -o $out -c $in CXXFLAGS
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -30,8 +30,8 @@
-     3rd/bee.lua/bee/nonstd/3rd/format.cc
- build $obj/source_bee/os.obj: cxx_source_bee 3rd/bee.lua/bee/nonstd/3rd/os.cc
+ build $obj/source_bee/format.obj: cxx_source_bee $
+     3rd/bee.lua/bee/nonstd/3rd/fmt/format.cc
  rule cxx_source_bee_1
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
 -    -Werror -fvisibility=hidden -I3rd/bee.lua -DNDEBUG -fPIC -o $out -c $in
@@ -33,7 +34,7 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -55,9 +55,9 @@
+@@ -57,9 +57,9 @@
  build $obj/source_bee/path_helper.obj: cxx_source_bee_1 $
      3rd/bee.lua/bee/utility/path_helper.cpp
  rule cxx_source_bee_2
@@ -46,7 +47,7 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -78,26 +78,26 @@
+@@ -80,26 +80,26 @@
  build $obj/source_bee/lua_time.obj: cxx_source_bee_2 $
      3rd/bee.lua/binding/lua_time.cpp
  rule c_source_lua
@@ -80,18 +81,18 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -107,7 +107,7 @@
+@@ -109,7 +109,7 @@
      3rd/bee.lua/bootstrap/progdir.cpp
  rule link_bootstrap
    command = $cc $in -o $out -lm -ldl -Wl,-E -lstdc++fs -pthread $
 -    -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -static-libgcc -s
 +    -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -static-libgcc LDFLAGS
    description = Link    Exe $out
- build /bootstrap: link_bootstrap $obj/source_bootstrap/main.obj $
+ build $bin/bootstrap: link_bootstrap $obj/source_bootstrap/main.obj $
      $obj/source_bootstrap/progdir.obj $obj/source_bee/lua-seri.obj $
-@@ -145,10 +145,10 @@
+@@ -148,10 +148,10 @@
      3rd/bee.lua/test/test_thread.lua 3rd/bee.lua/test/test_time.lua | $
-     /bootstrap copy_script
+     $bin/bootstrap copy_script
  rule cxx_code_format
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall $
 +  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -Wall $
@@ -102,7 +103,7 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -243,9 +243,9 @@
+@@ -246,9 +246,9 @@
  build $obj/code_format/Utf8.obj: cxx_code_format $
      3rd/EmmyLuaCodeStyle/Util/src/Utf8.cpp
  rule c_lpeglabel
@@ -114,7 +115,7 @@
    description = Compile C   $out
    deps = gcc
    depfile = $out.d
-@@ -255,9 +255,9 @@
+@@ -258,9 +258,9 @@
  build $obj/lpeglabel/lpltree.obj: c_lpeglabel 3rd/lpeglabel/lpltree.c
  build $obj/lpeglabel/lplvm.obj: c_lpeglabel 3rd/lpeglabel/lplvm.c
  rule cxx_lua_language_server

diff --git a/dev-util/lua-language-server/files/wrapper.sh b/dev-util/lua-language-server/files/wrapper.sh
new file mode 100644
index 000000000..271f66ae7
--- /dev/null
+++ b/dev-util/lua-language-server/files/wrapper.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Thanks To tastytea for the script <https://schlomp.space/tastytea/overlay/src/branch/master/dev-util/lua-language-server/files/wrapper-r1.sh>
+
+# Some paths must be writable, so we put them into user-owned directories
+
+DATAPATH="${XDG_DATA_HOME:-${HOME}/.local/share}/lua-language-server"
+STATEPATH="${XDG_STATE_HOME:-${HOME}/.local/state}/lua-language-server"
+
+mkdir --parents ${DATAPATH} ${STATEPATH}
+
+exec @GENTOO_PORTAGE_EPREFIX@/opt/lua-language-server/bin/lua-language-server \
+	--logpath="${STATEPATH}/log" \
+	--metapath="${DATAPATH}/meta" \
+	"${@}"

diff --git a/dev-util/lua-language-server/lua-language-server-3.6.13.ebuild b/dev-util/lua-language-server/lua-language-server-3.6.13.ebuild
deleted file mode 100644
index 823cceb46..000000000
--- a/dev-util/lua-language-server/lua-language-server-3.6.13.ebuild
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 2022-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit ninja-utils toolchain-funcs
-
-DESCRIPTION="Lua language server"
-HOMEPAGE="https://github.com/LuaLS/lua-language-server"
-SRC_URI="https://github.com/LuaLS/lua-language-server/releases/download/${PV}/${P}-submodules.zip -> ${P}.zip"
-S="${WORKDIR}"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="test"
-BDPEND="
-	${NINJA_DEPEND}
-	app-arch/unzip
-	dev-util/ninja
-"
-RESTRICT="!test? ( test )"
-PATCHES=( "${FILESDIR}/linux.ninja.patch" "${FILESDIR}/build.ninja.patch" )
-
-src_prepare() {
-	# Remove hardcoded gcc references
-	sed -i "/lm.cxx/a lm.cc = '$(tc-getCC)'" \
-		make.lua || die
-	sed -i "s/CC = gcc/ CC = ${tc-getCC}/" \
-		3rd/lpeglabel/makefile || die
-	# Shipped file doesn't respect CFLAGS/CXXFLAGS
-	eapply "${FILESDIR}/linux.ninja.patch"
-	eapply_user
-	sed -i -e "s/^cc = REPLACE_ME/cc = $(tc-getCC)/" \
-		-e "s/CFLAGS/${CFLAGS}/" \
-		-e "s/CXXFLAGS/${CXXFLAGS}/" \
-		-e "s/LDFLAGS/${LDFLAGS}/" \
-		3rd/luamake/compile/ninja/linux.ninja || die
-}
-
-src_compile() {
-	eninja -C 3rd/luamake -f compile/ninja/linux.ninja "$(usex test "test" "luamake")"
-	use test && eninja -C 3rd/luamake -f compile/ninja/linux.ninja luamake
-	./3rd/luamake/luamake init || die
-
-	# Generated file doesn't respect CFLAGS/CXXFLAGS
-	sed -i -e "s/^cc =.*./cc = REPLACE_ME/" \
-		-e "s/^luamake =.*./luamake = LUAMAKE_PATH/" \
-		build/build.ninja || die
-
-	eapply "${FILESDIR}/build.ninja.patch"
-	sed -i -e "s/REPLACE_ME/$(tc-getCC)/" \
-		-e "s|LUAMAKE_PATH|${S}/3rd/luamake/luamake|" \
-		-e "s/CFLAGS/${CFLAGS}/" \
-		-e "s/CXXFLAGS/${CXXFLAGS}/" \
-		-e "s/LDFLAGS/${LDFLAGS}/" \
-		-e "7d" \
-		build/build.ninja || die
-
-	# Tests are broken
-	eninja -f build/build.ninja all
-}
-
-src_install() {
-	dobin ./bin/{main.lua,lua-language-server}
-	dodoc changelog.md README.md
-}

diff --git a/dev-util/lua-language-server/lua-language-server-3.6.11.ebuild b/dev-util/lua-language-server/lua-language-server-3.6.17.ebuild
similarity index 72%
rename from dev-util/lua-language-server/lua-language-server-3.6.11.ebuild
rename to dev-util/lua-language-server/lua-language-server-3.6.17.ebuild
index 823cceb46..ac2bf19c0 100644
--- a/dev-util/lua-language-server/lua-language-server-3.6.11.ebuild
+++ b/dev-util/lua-language-server/lua-language-server-3.6.17.ebuild
@@ -3,7 +3,9 @@
 
 EAPI=8
 
-inherit ninja-utils toolchain-funcs
+LUA_COMPAT=( lua{5-{1,3,4},jit} )
+
+inherit ninja-utils toolchain-funcs lua-single prefix
 
 DESCRIPTION="Lua language server"
 HOMEPAGE="https://github.com/LuaLS/lua-language-server"
@@ -14,8 +16,11 @@ LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE="test"
+REQUIRE_USE="${LUA_REQUIRED_USE}"
+
+DEPEND="${LUA_DEPS}"
+RDEPEND="${DEPEND}"
 BDPEND="
-	${NINJA_DEPEND}
 	app-arch/unzip
 	dev-util/ninja
 "
@@ -28,7 +33,7 @@ src_prepare() {
 		make.lua || die
 	sed -i "s/CC = gcc/ CC = ${tc-getCC}/" \
 		3rd/lpeglabel/makefile || die
-	# Shipped file doesn't respect CFLAGS/CXXFLAGS
+	# Shipped file doesn't respect CFLAGS/CXXFLAGS/LDFLAGS
 	eapply "${FILESDIR}/linux.ninja.patch"
 	eapply_user
 	sed -i -e "s/^cc = REPLACE_ME/cc = $(tc-getCC)/" \
@@ -36,6 +41,8 @@ src_prepare() {
 		-e "s/CXXFLAGS/${CXXFLAGS}/" \
 		-e "s/LDFLAGS/${LDFLAGS}/" \
 		3rd/luamake/compile/ninja/linux.ninja || die
+
+	prefixify_ro "${FILESDIR}/wrapper.sh"
 }
 
 src_compile() {
@@ -43,7 +50,7 @@ src_compile() {
 	use test && eninja -C 3rd/luamake -f compile/ninja/linux.ninja luamake
 	./3rd/luamake/luamake init || die
 
-	# Generated file doesn't respect CFLAGS/CXXFLAGS
+	# Generated file doesn't respect CFLAGS/CXXFLAGS/LDFLAGS
 	sed -i -e "s/^cc =.*./cc = REPLACE_ME/" \
 		-e "s/^luamake =.*./luamake = LUAMAKE_PATH/" \
 		build/build.ninja || die
@@ -57,11 +64,20 @@ src_compile() {
 		-e "7d" \
 		build/build.ninja || die
 
-	# Tests are broken
-	eninja -f build/build.ninja all
+	use test && eninja -f build/build.ninja || eninja -f build/build.ninja all
 }
 
 src_install() {
-	dobin ./bin/{main.lua,lua-language-server}
-	dodoc changelog.md README.md
+	newbin "${T}/wrapper.sh" ${PN}
+
+	into /opt/${PN}
+	dobin bin/${PN}
+
+	insinto /opt/${PN}/bin
+	doins bin/main.lua
+
+	insinto /opt/${PN}
+	doins -r debugger.lua main.lua locale meta script
+
+	einstalldocs
 }


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: dev-util/lua-language-server/files/, dev-util/lua-language-server/
@ 2023-03-28 13:51 Mathis Winterer
  0 siblings, 0 replies; 8+ messages in thread
From: Mathis Winterer @ 2023-03-28 13:51 UTC (permalink / raw
  To: gentoo-commits

commit:     cfa8c2c6246f781b517883b92471b045e9228732
Author:     Mathis Winterer <mrmagic223325 <AT> fedora <DOT> email>
AuthorDate: Tue Mar 28 13:48:37 2023 +0000
Commit:     Mathis Winterer <mrmagic223325 <AT> fedora <DOT> email>
CommitDate: Tue Mar 28 13:48:37 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=cfa8c2c6

dev-util/lua-language-server: add 3.6.18, drop 3.6.17

Signed-off-by: Mathis Winterer <mrmagic223325 <AT> fedora.email>

 dev-util/lua-language-server/Manifest              |  2 +-
 .../lua-language-server/files/build.ninja.patch    | 22 +++++++--------
 .../lua-language-server/files/linux.ninja.patch    | 31 +++++++---------------
 ...17.ebuild => lua-language-server-3.6.18.ebuild} |  0
 4 files changed, 21 insertions(+), 34 deletions(-)

diff --git a/dev-util/lua-language-server/Manifest b/dev-util/lua-language-server/Manifest
index df201ba8c..5176e1a31 100644
--- a/dev-util/lua-language-server/Manifest
+++ b/dev-util/lua-language-server/Manifest
@@ -1 +1 @@
-DIST lua-language-server-3.6.17.zip 30696826 BLAKE2B a6d65b45efd7e10afef4a48986a3e7f622885146830df26647653065efd35c8bada7421ad74ea990cfb3842756dd42fe304c6bfbb3346d00621dd1c4d1e653f8 SHA512 44cbdb25fbd90ca9931669a3cb90216bb6f33ac1e2dc0dea4c28a4340f9c2feb92c005b2212fadc33066481944bb27c03c541cd0c6d0cd7706eeeca34339d567
+DIST lua-language-server-3.6.18.zip 30708893 BLAKE2B 69bc01187fd85582766bf0d8f217bea163234d05698490b860d0ff446fcc0515f3b842600ff2ea980ff8c30acfb7b394df9a98b81a5b537df445cc18a70b744e SHA512 b2bc488734df7eb0ad00993d352917d9d328b73603319fa8f1b0da8e93586cfdb85e715d6c3bd2ad6a9189551cc1e86a2fe35d3df4951f5feb80745c498424d2

diff --git a/dev-util/lua-language-server/files/build.ninja.patch b/dev-util/lua-language-server/files/build.ninja.patch
index ff953cae3..3e03c7d5d 100644
--- a/dev-util/lua-language-server/files/build.ninja.patch
+++ b/dev-util/lua-language-server/files/build.ninja.patch
@@ -1,6 +1,6 @@
 --- a/build/build.ninja
 +++ b/build/build.ninja
-@@ -12,26 +12,26 @@
+@@ -12,25 +12,25 @@
      3rd/bee.lua/compile/config.lua 3rd/bee.lua/compile/common.lua $
      make/code_format.lua
  rule c_source_bee
@@ -16,16 +16,14 @@
      3rd/bee.lua/3rd/lua-seri/lua-seri.c
  rule cxx_source_bee
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
--    -Werror -fvisibility=hidden -I3rd/bee.lua/bee/nonstd/3rd -DNDEBUG -fPIC $
--    -o $out -c $in
+-    -Werror -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in
 +  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -Wall $
-+    -fvisibility=hidden -I3rd/bee.lua/bee/nonstd/3rd -DNDEBUG -fPIC $
-+    -o $out -c $in CXXFLAGS
++    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
  build $obj/source_bee/format.obj: cxx_source_bee $
-     3rd/bee.lua/bee/nonstd/3rd/fmt/format.cc
+     3rd/bee.lua/bee/nonstd/3rd/format.cc
  rule cxx_source_bee_1
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
 -    -Werror -fvisibility=hidden -I3rd/bee.lua -DNDEBUG -fPIC -o $out -c $in
@@ -34,7 +32,7 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -57,9 +57,9 @@
+@@ -56,9 +56,9 @@
  build $obj/source_bee/path_helper.obj: cxx_source_bee_1 $
      3rd/bee.lua/bee/utility/path_helper.cpp
  rule cxx_source_bee_2
@@ -47,7 +45,7 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -80,26 +80,26 @@
+@@ -79,26 +79,26 @@
  build $obj/source_bee/lua_time.obj: cxx_source_bee_2 $
      3rd/bee.lua/binding/lua_time.cpp
  rule c_source_lua
@@ -81,7 +79,7 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -109,7 +109,7 @@
+@@ -108,7 +108,7 @@
      3rd/bee.lua/bootstrap/progdir.cpp
  rule link_bootstrap
    command = $cc $in -o $out -lm -ldl -Wl,-E -lstdc++fs -pthread $
@@ -90,7 +88,7 @@
    description = Link    Exe $out
  build $bin/bootstrap: link_bootstrap $obj/source_bootstrap/main.obj $
      $obj/source_bootstrap/progdir.obj $obj/source_bee/lua-seri.obj $
-@@ -148,10 +148,10 @@
+@@ -147,10 +147,10 @@
      3rd/bee.lua/test/test_thread.lua 3rd/bee.lua/test/test_time.lua | $
      $bin/bootstrap copy_script
  rule cxx_code_format
@@ -103,7 +101,7 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -246,9 +246,9 @@
+@@ -247,9 +247,9 @@
  build $obj/code_format/Utf8.obj: cxx_code_format $
      3rd/EmmyLuaCodeStyle/Util/src/Utf8.cpp
  rule c_lpeglabel
@@ -115,7 +113,7 @@
    description = Compile C   $out
    deps = gcc
    depfile = $out.d
-@@ -258,9 +258,9 @@
+@@ -259,9 +259,9 @@
  build $obj/lpeglabel/lpltree.obj: c_lpeglabel 3rd/lpeglabel/lpltree.c
  build $obj/lpeglabel/lplvm.obj: c_lpeglabel 3rd/lpeglabel/lplvm.c
  rule cxx_lua_language_server

diff --git a/dev-util/lua-language-server/files/linux.ninja.patch b/dev-util/lua-language-server/files/linux.ninja.patch
index 7068459ab..baf0d5350 100644
--- a/dev-util/lua-language-server/files/linux.ninja.patch
+++ b/dev-util/lua-language-server/files/linux.ninja.patch
@@ -1,6 +1,6 @@
 --- a/3rd/luamake/compile/ninja/linux.ninja
 +++ b/3rd/luamake/compile/ninja/linux.ninja
-@@ -2,20 +2,20 @@
+@@ -2,29 +2,29 @@
  builddir = build/linux
  bin = $builddir/bin
  obj = $builddir/obj
@@ -20,15 +20,16 @@
      bee.lua/3rd/lua-seri/lua-seri.c
  rule cxx_source_bee
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
--    -Werror -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in
+-    -Werror -fvisibility=hidden -Ibee.lua/bee/nonstd/3rd -DNDEBUG -fPIC -o $
+-    $out -c $in
 +  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -Wall $
-+    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
++    -fvisibility=hidden -Ibee.lua/bee/nonstd/3rd -DNDEBUG -fPIC -o $
++    $out -c $in CXXFLAGS
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -23,8 +23,8 @@
-     bee.lua/bee/nonstd/3rd/format.cc
- build $obj/source_bee/os.obj: cxx_source_bee bee.lua/bee/nonstd/3rd/os.cc
+ build $obj/source_bee/format.obj: cxx_source_bee $
+     bee.lua/bee/nonstd/3rd/fmt/format.cc
  rule cxx_source_bee_1
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
 -    -Werror -fvisibility=hidden -Ibee.lua -DNDEBUG -fPIC -o $out -c $in
@@ -37,7 +38,7 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -47,9 +47,9 @@
+@@ -49,9 +49,9 @@
  build $obj/source_bee/path_helper.obj: cxx_source_bee_1 $
      bee.lua/bee/utility/path_helper.cpp
  rule cxx_source_bee_2
@@ -50,7 +51,7 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -70,24 +70,24 @@
+@@ -72,15 +72,15 @@
  build $obj/source_bee/lua_time.obj: cxx_source_bee_2 $
      bee.lua/binding/lua_time.cpp
  rule c_source_lua
@@ -70,19 +71,7 @@
    description = Compile C   $out
    deps = gcc
    depfile = $out.d
- build $obj/source_lua/linit.obj: c_source_lua_1 bee.lua/3rd/lua/linit.c
- build $obj/source_lua/onelua.obj: c_source_lua_1 bee.lua/3rd/lua/onelua.c
- rule cxx_source_bootstrap
--  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
--    -Werror -fvisibility=hidden -Ibee.lua/3rd/lua -Ibee.lua -DLUA_USE_LINUX $
--    -DNDEBUG -fPIC -o $out -c $in
-+  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -Wall $
-+    -fvisibility=hidden -Ibee.lua/3rd/lua -Ibee.lua -DLUA_USE_LINUX $
-+    -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
-   description = Compile C++ $out
-   deps = gcc
-   depfile = $out.d
-@@ -97,7 +97,7 @@
+@@ -99,7 +99,7 @@
      bee.lua/bootstrap/progdir.cpp
  rule link_luamake
    command = $cc $in -o $out -lm -ldl -Wl,-E -lstdc++fs -pthread $

diff --git a/dev-util/lua-language-server/lua-language-server-3.6.17.ebuild b/dev-util/lua-language-server/lua-language-server-3.6.18.ebuild
similarity index 100%
rename from dev-util/lua-language-server/lua-language-server-3.6.17.ebuild
rename to dev-util/lua-language-server/lua-language-server-3.6.18.ebuild


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: dev-util/lua-language-server/files/, dev-util/lua-language-server/
@ 2023-04-27 17:16 Mathis Winterer
  0 siblings, 0 replies; 8+ messages in thread
From: Mathis Winterer @ 2023-04-27 17:16 UTC (permalink / raw
  To: gentoo-commits

commit:     902721305fa52d46884e660a80053b372d14743e
Author:     Mathis Winterer <mrmagic223325 <AT> fedora <DOT> email>
AuthorDate: Thu Apr 27 17:15:13 2023 +0000
Commit:     Mathis Winterer <mrmagic223325 <AT> fedora <DOT> email>
CommitDate: Thu Apr 27 17:15:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=90272130

dev-util/lua-language-server: new package, add 3.6.19

Signed-off-by: Mathis Winterer <mrmagic223325 <AT> fedora.email>

 dev-util/lua-language-server/Manifest              |  2 +-
 .../lua-language-server/files/build.ninja.patch    | 47 ++++++------
 .../lua-language-server/files/linux.ninja.patch    | 56 ++++++++-------
 .../lua-language-server-3.6.19.ebuild              | 83 ++++++++++++++++++++++
 4 files changed, 143 insertions(+), 45 deletions(-)

diff --git a/dev-util/lua-language-server/Manifest b/dev-util/lua-language-server/Manifest
index 5176e1a31..0ff38cf52 100644
--- a/dev-util/lua-language-server/Manifest
+++ b/dev-util/lua-language-server/Manifest
@@ -1 +1 @@
-DIST lua-language-server-3.6.18.zip 30708893 BLAKE2B 69bc01187fd85582766bf0d8f217bea163234d05698490b860d0ff446fcc0515f3b842600ff2ea980ff8c30acfb7b394df9a98b81a5b537df445cc18a70b744e SHA512 b2bc488734df7eb0ad00993d352917d9d328b73603319fa8f1b0da8e93586cfdb85e715d6c3bd2ad6a9189551cc1e86a2fe35d3df4951f5feb80745c498424d2
+DIST lua-language-server-3.6.19.zip 31131706 BLAKE2B 6a01d97f42354440597709a7f2e66282fadffa309f6ab40714f46a545c03acf9c29b4e9f06ee68af6d7e48bd03b43cde46078182c7aa810ea2823a60be176628 SHA512 7fd6020140cbcd0ae4e9f1d894736499b8ce8c25c536e85d71033ea7205f7be07799eb08fe4fc884362067a3a88de683154ddf79bed03588f89c8185705e10f4

diff --git a/dev-util/lua-language-server/files/build.ninja.patch b/dev-util/lua-language-server/files/build.ninja.patch
index 3e03c7d5d..3d3e8cc79 100644
--- a/dev-util/lua-language-server/files/build.ninja.patch
+++ b/dev-util/lua-language-server/files/build.ninja.patch
@@ -1,14 +1,13 @@
 --- a/build/build.ninja
 +++ b/build/build.ninja
-@@ -12,25 +12,25 @@
+@@ -12,23 +12,23 @@
      3rd/bee.lua/compile/config.lua 3rd/bee.lua/compile/common.lua $
      make/code_format.lua
  rule c_source_bee
 -  command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall -Werror $
+-    -fvisibility=hidden -I$builddir/lua54 -DNDEBUG -fPIC -o $out -c $in
 +  command = $cc -MMD -MT $out -MF $out.d -std=c11 -Wall $
-     -fvisibility=hidden -I3rd/bee.lua/3rd/lua-seri -I$builddir/lua54 $
--    -DNDEBUG -fPIC -o $out -c $in
-+    -DNDEBUG -fPIC -o $out -c $in CFLAGS
++    -fvisibility=hidden -I$builddir/lua54 -DNDEBUG -fPIC -o $out -c $in CFLAGS
    description = Compile C   $out
    deps = gcc
    depfile = $out.d
@@ -22,8 +21,7 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
- build $obj/source_bee/format.obj: cxx_source_bee $
-     3rd/bee.lua/bee/nonstd/3rd/format.cc
+ build $obj/source_bee/format.obj: cxx_source_bee 3rd/bee.lua/3rd/fmt/format.cc
  rule cxx_source_bee_1
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
 -    -Werror -fvisibility=hidden -I3rd/bee.lua -DNDEBUG -fPIC -o $out -c $in
@@ -32,20 +30,20 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -56,9 +56,9 @@
+@@ -54,9 +54,9 @@
  build $obj/source_bee/path_helper.obj: cxx_source_bee_1 $
      3rd/bee.lua/bee/utility/path_helper.cpp
  rule cxx_source_bee_2
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
--    -Werror -fvisibility=hidden -I3rd/bee.lua/3rd/lua-seri -I3rd/bee.lua $
--    -I$builddir/lua54 -DBEE_STATIC -DNDEBUG -fPIC -o $out -c $in
+-    -Werror -fvisibility=hidden -I3rd/bee.lua -I$builddir/lua54 $
+-    -DBEE_STATIC -DNDEBUG -fPIC -o $out -c $in
 +  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -Wall $
-+    -fvisibility=hidden -I3rd/bee.lua/3rd/lua-seri -I3rd/bee.lua $
-+    -I$builddir/lua54 -DBEE_STATIC -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
++    -fvisibility=hidden -I3rd/bee.lua -I$builddir/lua54 $
++    -DBEE_STATIC -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -79,26 +79,26 @@
+@@ -77,26 +77,26 @@
  build $obj/source_bee/lua_time.obj: cxx_source_bee_2 $
      3rd/bee.lua/binding/lua_time.cpp
  rule c_source_lua
@@ -61,7 +59,7 @@
  rule c_source_lua_1
 -  command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall -Werror $
 +  command = $cc -MMD -MT $out -MF $out.d -std=c11 -Wall $
-     -DMAKE_LIB -DLUA_USE_LINUX -DNDEBUG -fPIC -Wno-maybe-uninitialized -o $
+     -DMAKE_LIB -DLUA_USE_LINUX -DNDEBUG -Wno-maybe-uninitialized -fPIC -o $
 -    $out -c $in
 +    $out -c $in CFLAGS
    description = Compile C   $out
@@ -79,16 +77,16 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -108,7 +108,7 @@
+@@ -106,7 +106,7 @@
      3rd/bee.lua/bootstrap/progdir.cpp
  rule link_bootstrap
-   command = $cc $in -o $out -lm -ldl -Wl,-E -lstdc++fs -pthread $
--    -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -static-libgcc -s
-+    -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -static-libgcc LDFLAGS
+   command = $cc $in -o $out -Wl,-E -static-libgcc -lm -ldl -lstdc++fs $
+-    -pthread -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -s
++    -pthread -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic LDFLAGS
    description = Link    Exe $out
  build $bin/bootstrap: link_bootstrap $obj/source_bootstrap/main.obj $
      $obj/source_bootstrap/progdir.obj $obj/source_bee/lua-seri.obj $
-@@ -147,10 +147,10 @@
+@@ -144,10 +144,10 @@
      3rd/bee.lua/test/test_thread.lua 3rd/bee.lua/test/test_time.lua | $
      $bin/bootstrap copy_script
  rule cxx_code_format
@@ -101,7 +99,7 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -247,9 +247,9 @@
+@@ -244,9 +244,9 @@
  build $obj/code_format/Utf8.obj: cxx_code_format $
      3rd/EmmyLuaCodeStyle/Util/src/Utf8.cpp
  rule c_lpeglabel
@@ -113,7 +111,7 @@
    description = Compile C   $out
    deps = gcc
    depfile = $out.d
-@@ -259,9 +259,9 @@
+@@ -256,9 +256,9 @@
  build $obj/lpeglabel/lpltree.obj: c_lpeglabel 3rd/lpeglabel/lpltree.c
  build $obj/lpeglabel/lplvm.obj: c_lpeglabel 3rd/lpeglabel/lplvm.c
  rule cxx_lua_language_server
@@ -125,3 +123,12 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
+@@ -266,7 +266,7 @@
+     make/modules.cpp
+ rule link_lua_language_server
+   command = $cc $in -o $out -lm -ldl -lstdc++fs -pthread -Wl,-Bstatic $
+-    -lstdc++ -Wl,-Bdynamic -s
++    -lstdc++ -Wl,-Bdynamic LDFLAGS
+   description = Link    Exe $out
+ build $bin/lua-language-server: link_lua_language_server $
+     $obj/lua-language-server/modules.obj $obj/lpeglabel/lplcap.obj $

diff --git a/dev-util/lua-language-server/files/linux.ninja.patch b/dev-util/lua-language-server/files/linux.ninja.patch
index baf0d5350..fe2d89f61 100644
--- a/dev-util/lua-language-server/files/linux.ninja.patch
+++ b/dev-util/lua-language-server/files/linux.ninja.patch
@@ -1,6 +1,6 @@
 --- a/3rd/luamake/compile/ninja/linux.ninja
 +++ b/3rd/luamake/compile/ninja/linux.ninja
-@@ -2,29 +2,29 @@
+@@ -2,26 +2,26 @@
  builddir = build/linux
  bin = $builddir/bin
  obj = $builddir/obj
@@ -9,10 +9,9 @@
  luamake = luamake
  rule c_source_bee
 -  command = $cc -MMD -MT $out -MF $out.d  -O2 -Wall -Werror $
+-    -fvisibility=hidden -Itools/lua54 -DNDEBUG -fPIC -o $out -c $in
 +  command = $cc -MMD -MT $out -MF $out.d -Wall $
-     -fvisibility=hidden -Ibee.lua/3rd/lua-seri -Itools/lua54 -DNDEBUG -fPIC $
--    -o $out -c $in
-+    -o $out -c $in CFLAGS
++    -fvisibility=hidden -Itools/lua54 -DNDEBUG -fPIC -o $out -c $in CFLAGS
    description = Compile C   $out
    deps = gcc
    depfile = $out.d
@@ -20,16 +19,13 @@
      bee.lua/3rd/lua-seri/lua-seri.c
  rule cxx_source_bee
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
--    -Werror -fvisibility=hidden -Ibee.lua/bee/nonstd/3rd -DNDEBUG -fPIC -o $
--    $out -c $in
+-    -Werror -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in
 +  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -Wall $
-+    -fvisibility=hidden -Ibee.lua/bee/nonstd/3rd -DNDEBUG -fPIC -o $
-+    $out -c $in CXXFLAGS
++    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
- build $obj/source_bee/format.obj: cxx_source_bee $
-     bee.lua/bee/nonstd/3rd/fmt/format.cc
+ build $obj/source_bee/format.obj: cxx_source_bee bee.lua/3rd/fmt/format.cc
  rule cxx_source_bee_1
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
 -    -Werror -fvisibility=hidden -Ibee.lua -DNDEBUG -fPIC -o $out -c $in
@@ -38,20 +34,20 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -49,9 +49,9 @@
+@@ -46,9 +46,9 @@
  build $obj/source_bee/path_helper.obj: cxx_source_bee_1 $
      bee.lua/bee/utility/path_helper.cpp
  rule cxx_source_bee_2
 -  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
--    -Werror -fvisibility=hidden -Ibee.lua/3rd/lua-seri -Ibee.lua $
--    -Itools/lua54 -DBEE_STATIC -DNDEBUG -fPIC -o $out -c $in
+-    -Werror -fvisibility=hidden -Ibee.lua -Itools/lua54 -DBEE_STATIC $
+-    -DNDEBUG -fPIC -o $out -c $in
 +  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -Wall $
-+    -fvisibility=hidden -Ibee.lua/3rd/lua-seri -Ibee.lua $
-+    -Itools/lua54 -DBEE_STATIC -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
++    -fvisibility=hidden -Ibee.lua -Itools/lua54 -DBEE_STATIC $
++    -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -72,15 +72,15 @@
+@@ -69,24 +69,24 @@
  build $obj/source_bee/lua_time.obj: cxx_source_bee_2 $
      bee.lua/binding/lua_time.cpp
  rule c_source_lua
@@ -65,18 +61,30 @@
  build $obj/source_lua/utf8_crt.obj: c_source_lua bee.lua/3rd/lua/utf8_crt.c
  rule c_source_lua_1
 -  command = $cc -MMD -MT $out -MF $out.d  -O2 -Wall -Werror -DMAKE_LIB $
--    -DLUA_USE_LINUX -DNDEBUG -fPIC -Wno-maybe-uninitialized -o $out -c $in
+-    -DLUA_USE_LINUX -DNDEBUG -Wno-maybe-uninitialized -fPIC -o $out -c $in
 +  command = $cc -MMD -MT $out -MF $out.d -Wall -DMAKE_LIB $
-+    -DLUA_USE_LINUX -DNDEBUG -fPIC -Wno-maybe-uninitialized -o $out -c $in CFLAGS
++    -DLUA_USE_LINUX -DNDEBUG -Wno-maybe-uninitialized -fPIC -o $out -c $in CFLAGS
    description = Compile C   $out
    deps = gcc
    depfile = $out.d
-@@ -99,7 +99,7 @@
+ build $obj/source_lua/linit.obj: c_source_lua_1 bee.lua/3rd/lua/linit.c
+ build $obj/source_lua/onelua.obj: c_source_lua_1 bee.lua/3rd/lua/onelua.c
+ rule cxx_source_bootstrap
+-  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
+-    -Werror -fvisibility=hidden -Ibee.lua/3rd/lua -Ibee.lua -DLUA_USE_LINUX $
+-    -DNDEBUG -fPIC -o $out -c $in
++  command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -Wall $
++    -fvisibility=hidden -Ibee.lua/3rd/lua -Ibee.lua -DLUA_USE_LINUX $
++    -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -96,7 +96,7 @@
      bee.lua/bootstrap/progdir.cpp
- rule link_luamake
-   command = $cc $in -o $out -lm -ldl -Wl,-E -lstdc++fs -pthread $
--    -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -static-libgcc -s
-+    -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -static-libgcc LDFLAGS
+ rule link_bootstrap
+   command = $cc $in -o $out -Wl,-E -static-libgcc -lm -ldl -lstdc++fs $
+-    -pthread -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -s
++    -pthread -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic LDFLAGS
    description = Link    Exe $out
- build $bin/luamake: link_luamake $obj/source_bootstrap/main.obj $
+ build $bin/bootstrap: link_bootstrap $obj/source_bootstrap/main.obj $
      $obj/source_bootstrap/progdir.obj $obj/source_bee/lua-seri.obj $

diff --git a/dev-util/lua-language-server/lua-language-server-3.6.19.ebuild b/dev-util/lua-language-server/lua-language-server-3.6.19.ebuild
new file mode 100644
index 000000000..ac2bf19c0
--- /dev/null
+++ b/dev-util/lua-language-server/lua-language-server-3.6.19.ebuild
@@ -0,0 +1,83 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua{5-{1,3,4},jit} )
+
+inherit ninja-utils toolchain-funcs lua-single prefix
+
+DESCRIPTION="Lua language server"
+HOMEPAGE="https://github.com/LuaLS/lua-language-server"
+SRC_URI="https://github.com/LuaLS/lua-language-server/releases/download/${PV}/${P}-submodules.zip -> ${P}.zip"
+S="${WORKDIR}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+REQUIRE_USE="${LUA_REQUIRED_USE}"
+
+DEPEND="${LUA_DEPS}"
+RDEPEND="${DEPEND}"
+BDPEND="
+	app-arch/unzip
+	dev-util/ninja
+"
+RESTRICT="!test? ( test )"
+PATCHES=( "${FILESDIR}/linux.ninja.patch" "${FILESDIR}/build.ninja.patch" )
+
+src_prepare() {
+	# Remove hardcoded gcc references
+	sed -i "/lm.cxx/a lm.cc = '$(tc-getCC)'" \
+		make.lua || die
+	sed -i "s/CC = gcc/ CC = ${tc-getCC}/" \
+		3rd/lpeglabel/makefile || die
+	# Shipped file doesn't respect CFLAGS/CXXFLAGS/LDFLAGS
+	eapply "${FILESDIR}/linux.ninja.patch"
+	eapply_user
+	sed -i -e "s/^cc = REPLACE_ME/cc = $(tc-getCC)/" \
+		-e "s/CFLAGS/${CFLAGS}/" \
+		-e "s/CXXFLAGS/${CXXFLAGS}/" \
+		-e "s/LDFLAGS/${LDFLAGS}/" \
+		3rd/luamake/compile/ninja/linux.ninja || die
+
+	prefixify_ro "${FILESDIR}/wrapper.sh"
+}
+
+src_compile() {
+	eninja -C 3rd/luamake -f compile/ninja/linux.ninja "$(usex test "test" "luamake")"
+	use test && eninja -C 3rd/luamake -f compile/ninja/linux.ninja luamake
+	./3rd/luamake/luamake init || die
+
+	# Generated file doesn't respect CFLAGS/CXXFLAGS/LDFLAGS
+	sed -i -e "s/^cc =.*./cc = REPLACE_ME/" \
+		-e "s/^luamake =.*./luamake = LUAMAKE_PATH/" \
+		build/build.ninja || die
+
+	eapply "${FILESDIR}/build.ninja.patch"
+	sed -i -e "s/REPLACE_ME/$(tc-getCC)/" \
+		-e "s|LUAMAKE_PATH|${S}/3rd/luamake/luamake|" \
+		-e "s/CFLAGS/${CFLAGS}/" \
+		-e "s/CXXFLAGS/${CXXFLAGS}/" \
+		-e "s/LDFLAGS/${LDFLAGS}/" \
+		-e "7d" \
+		build/build.ninja || die
+
+	use test && eninja -f build/build.ninja || eninja -f build/build.ninja all
+}
+
+src_install() {
+	newbin "${T}/wrapper.sh" ${PN}
+
+	into /opt/${PN}
+	dobin bin/${PN}
+
+	insinto /opt/${PN}/bin
+	doins bin/main.lua
+
+	insinto /opt/${PN}
+	doins -r debugger.lua main.lua locale meta script
+
+	einstalldocs
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: dev-util/lua-language-server/files/, dev-util/lua-language-server/
@ 2024-05-27 16:36 Brahmajit Das
  0 siblings, 0 replies; 8+ messages in thread
From: Brahmajit Das @ 2024-05-27 16:36 UTC (permalink / raw
  To: gentoo-commits

commit:     dd4f7b2169cddd5db6729c0379107c2f27d272fa
Author:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Mon May 27 16:31:19 2024 +0000
Commit:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
CommitDate: Mon May 27 16:33:42 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=dd4f7b21

dev-util/lua-language-server: add 3.9.1

Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>

 dev-util/lua-language-server/Manifest              |   1 +
 .../lua-language-server/files/build.ninja_v2.patch | 102 +++++++++++++++++++++
 .../lua-language-server/files/linux.ninja_v2.patch |  71 ++++++++++++++
 .../lua-language-server-3.9.1.ebuild               |  88 ++++++++++++++++++
 4 files changed, 262 insertions(+)

diff --git a/dev-util/lua-language-server/Manifest b/dev-util/lua-language-server/Manifest
index 9044b8e6e..7c1f24262 100644
--- a/dev-util/lua-language-server/Manifest
+++ b/dev-util/lua-language-server/Manifest
@@ -1 +1,2 @@
 DIST lua-language-server-3.7.3.zip 31522954 BLAKE2B 979f6de423d56b8781bfd3315d2d64cfe3082e3eecdf1203d7159d93f7bffa01f7330fe41c73949ece01fede8b987726cba54b884a07088d6ce6111802bede0a SHA512 db59d2987b09bb90fcdc362294d7b28b1652613414970856b54343c2a6ec791744dd524e505cb1495c0014c37288a8f5f5a849c64391a3e1a716bbe6788adcf2
+DIST lua-language-server-3.9.1.zip 32595453 BLAKE2B 53e13639a6b60805c074b617c53503360388da3c6ee1c887845bff472dfea7048b5b8793968df068c747c925648feb3f851a2eca42c6a21e33b0f6242b1b80e7 SHA512 305b036d804d3864a0baecabf4cc9bf46f0bd9ffcf3cb5ced9f57b0b29b8d9231b7283970ef38bd1669be05da795f08627a56a5eb83a70d71e2768254cf497bc

diff --git a/dev-util/lua-language-server/files/build.ninja_v2.patch b/dev-util/lua-language-server/files/build.ninja_v2.patch
new file mode 100644
index 000000000..5485c3186
--- /dev/null
+++ b/dev-util/lua-language-server/files/build.ninja_v2.patch
@@ -0,0 +1,102 @@
+--- b/build/build.ninja
++++ b/build/build.ninja
+@@ -14,7 +14,7 @@
+     make/code_format.lua
+ rule c_source_bee
+   command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall $
+-    -fvisibility=hidden -I$builddir/lua54 -DNDEBUG -fPIC -o $out -c $in
++    -fvisibility=hidden -I$builddir/lua54 -DNDEBUG -fPIC -o $out -c $in CFLAGS
+   description = Compile C   $out
+   deps = gcc
+   depfile = $out.d
+@@ -22,14 +22,14 @@
+     3rd/bee.lua/3rd/lua-seri/lua-seri.c
+ rule cxx_source_bee
+   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
+-    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in
++    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+ build $obj/source_bee/format.obj: cxx_source_bee 3rd/bee.lua/3rd/fmt/format.cc
+ rule cxx_source_bee_1
+   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
+-    -fvisibility=hidden -I3rd/bee.lua -DNDEBUG -fPIC -o $out -c $in
++    -fvisibility=hidden -I3rd/bee.lua -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -65,7 +65,7 @@
+ rule cxx_source_bee_2
+   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
+     -fvisibility=hidden -I3rd/bee.lua -I$builddir/lua54 -DBEE_STATIC $
+-    -DNDEBUG -fPIC -o $out -c $in
++    -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -94,7 +94,7 @@
+     3rd/bee.lua/binding/luaref.cpp
+ rule c_source_lua
+   command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall -DMAKE_LIB $
+-    -DLUA_USE_LINUX -DNDEBUG -fPIC -Wno-maybe-uninitialized -o $out -c $in
++    -DLUA_USE_LINUX -DNDEBUG -fPIC -Wno-maybe-uninitialized -o $out -c $in CFLAGS
+   description = Compile C   $out
+   deps = gcc
+   depfile = $out.d
+@@ -104,7 +104,7 @@
+ rule cxx_source_bootstrap
+   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
+     -fvisibility=hidden -I3rd/bee.lua/3rd/lua -I3rd/bee.lua -DLUA_USE_LINUX $
+-    -DNDEBUG -fPIC -o $out -c $in
++    -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -112,7 +112,7 @@
+     3rd/bee.lua/bootstrap/main.cpp
+ rule link_bootstrap
+   command = $cc $in -o $out -Wl,-E -static-libgcc -lm -ldl -lstdc++fs $
+-    -pthread -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -s
++    -pthread -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic LDFLAGS
+   description = Link    Exe $out
+ build $bin/bootstrap: link_bootstrap $obj/source_bootstrap/main.obj $
+     $obj/source_bee/lua-seri.obj $obj/source_bee/format.obj $
+@@ -155,8 +155,8 @@
+     -fvisibility=hidden -I3rd/EmmyLuaCodeStyle/Util/include $
+     -I3rd/EmmyLuaCodeStyle/CodeFormatCore/include $
+     -I3rd/EmmyLuaCodeStyle/LuaParser/include -I3rd/bee.lua/3rd/lua $
+-    -I3rd/EmmyLuaCodeStyle/3rd/wildcards/include -DNDEBUG -Wall -Werror -o $
+-    $out -c $in
++    -I3rd/EmmyLuaCodeStyle/3rd/wildcards/include -DNDEBUG -Wall -o $
++    $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -259,7 +259,7 @@
+ rule c_lpeglabel
+   command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall $
+     -fvisibility=hidden -I3rd/bee.lua/3rd/lua -DMAXRECLEVEL=1000 -DNDEBUG $
+-    -o $out -c $in
++    -o $out -c $in CFLAGS
+   description = Compile C   $out
+   deps = gcc
+   depfile = $out.d
+@@ -271,7 +271,7 @@
+ rule cxx_lua_language_server
+   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall $
+     -fvisibility=hidden -I3rd/bee.lua -I3rd/bee.lua/3rd/lua -DCODE_FORMAT $
+-    -DNDEBUG -o $out -c $in
++    -DNDEBUG -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -279,7 +279,7 @@
+     make/modules.cpp
+ rule link_lua_language_server
+   command = $cc $in -o $out -lm -ldl -lstdc++fs -pthread -Wl,-Bstatic $
+-    -lstdc++ -Wl,-Bdynamic -s
++    -lstdc++ -Wl,-Bdynamic LDFLAGS
+   description = Link    Exe $out
+ build $bin/lua-language-server: link_lua_language_server $
+     $obj/lua-language-server/modules.obj $obj/lpeglabel/lplcap.obj $

diff --git a/dev-util/lua-language-server/files/linux.ninja_v2.patch b/dev-util/lua-language-server/files/linux.ninja_v2.patch
new file mode 100644
index 000000000..b4eba4b75
--- /dev/null
+++ b/dev-util/lua-language-server/files/linux.ninja_v2.patch
@@ -0,0 +1,71 @@
+--- a/3rd/luamake/compile/ninja/linux.ninja
++++ b/3rd/luamake/compile/ninja/linux.ninja
+@@ -2,12 +2,12 @@ ninja_required_version = 1.7
+ builddir = build/linux
+ bin = $builddir/bin
+ obj = $builddir/obj
+-cc = gcc
+-ar = ar
++cc = REPLACE_ME
++ar = REPLACE_AR
+ luamake = luamake
+ rule c_source_bee
+   command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall $
+-    -fvisibility=hidden -Itools/lua54 -DNDEBUG -fPIC -o $out -c $in
++    -fvisibility=hidden -Itools/lua54 -DNDEBUG -fPIC -o $out -c $in CFLAGS
+   description = Compile C   $out
+   deps = gcc
+   depfile = $out.d
+@@ -15,14 +15,14 @@ build $obj/source_bee/lua-seri.obj: c_source_bee $
+     bee.lua/3rd/lua-seri/lua-seri.c
+ rule cxx_source_bee
+   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
+-    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in
++    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+ build $obj/source_bee/format.obj: cxx_source_bee bee.lua/3rd/fmt/format.cc
+ rule cxx_source_bee_1
+   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
+-    -fvisibility=hidden -Ibee.lua -DNDEBUG -fPIC -o $out -c $in
++    -fvisibility=hidden -Ibee.lua -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -58,7 +58,7 @@ build $obj/source_bee/version.obj: cxx_source_bee_1 bee.lua/bee/version.cpp
+ rule cxx_source_bee_2
+   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
+     -fvisibility=hidden -Ibee.lua -Itools/lua54 -DBEE_STATIC -DNDEBUG -fPIC $
+-    -o $out -c $in
++    -o $out -c $in CXXFLAGS
+   description = Compile C++ $out
+   deps = gcc
+   depfile = $out.d
+@@ -88,7 +88,7 @@ build $obj/source_bee/luaref.obj: cxx_source_bee_2 bee.lua/binding/luaref.cpp
+ rule c_source_lua
+   command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall -DMAKE_LIB $
+     -DLUA_USE_LINUX -DNDEBUG -fPIC -Wno-maybe-uninitialized -o $out -c $in
+-  description = Compile C   $out
++  description = Compile C   $out CFLAGS
+   deps = gcc
+   depfile = $out.d
+ build $obj/source_lua/linit.obj: c_source_lua bee.lua/3rd/lua/linit.c
+@@ -97,14 +97,14 @@ rule cxx_source_bootstrap
+   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
+     -fvisibility=hidden -Ibee.lua/3rd/lua -Ibee.lua -DLUA_USE_LINUX $
+     -DNDEBUG -fPIC -o $out -c $in
+-  description = Compile C++ $out
++  description = Compile C++ $out CXXFLAGS
+   deps = gcc
+   depfile = $out.d
+ build $obj/source_bootstrap/main.obj: cxx_source_bootstrap $
+     bee.lua/bootstrap/main.cpp
+ rule link_bootstrap
+-  command = $cc $in -o $out -Wl,-E -static-libgcc -lm -ldl -lstdc++fs $
+-    -pthread -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -s
++  command = $cc $in -o $out -Wl,-E -static-libgcc -lm -ldl $
++    -pthread -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic LDFLAGS
+   description = Link    Exe $out
+ rule copy
+   command = cp -fv $in$input $out 1>/dev/null

diff --git a/dev-util/lua-language-server/lua-language-server-3.9.1.ebuild b/dev-util/lua-language-server/lua-language-server-3.9.1.ebuild
new file mode 100644
index 000000000..a70ce930c
--- /dev/null
+++ b/dev-util/lua-language-server/lua-language-server-3.9.1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua{5-{1,3,4},jit} )
+
+inherit ninja-utils toolchain-funcs lua-single prefix
+
+DESCRIPTION="Lua language server"
+HOMEPAGE="https://github.com/LuaLS/lua-language-server"
+SRC_URI="https://github.com/LuaLS/lua-language-server/releases/download/${PV}/${P}-submodules.zip -> ${P}.zip"
+S="${WORKDIR}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+REQUIRE_USE="${LUA_REQUIRED_USE}"
+
+DEPEND="${LUA_DEPS}"
+RDEPEND="${DEPEND}"
+BDEPEND="
+	app-alternatives/ninja
+	app-arch/unzip
+"
+RESTRICT="!test? ( test )"
+PATCHES=(
+	"${FILESDIR}/linux.ninja.patch"
+	"${FILESDIR}/build.ninja.patch"
+)
+
+src_prepare() {
+	# Remove hardcoded gcc references
+	sed -i "/lm.cxx/a lm.cc = '$(tc-getCC)'" \
+		make.lua || die
+	sed -i "s/CC = gcc/ CC = ${tc-getCC}/" \
+		3rd/lpeglabel/makefile || die
+	# Shipped file doesn't respect CFLAGS/CXXFLAGS/LDFLAGS
+	eapply "${FILESDIR}/linux.ninja_v2.patch"
+	eapply_user
+	sed -i -e "s/^cc = REPLACE_ME/cc = $(tc-getCC)/" \
+		-e "s/^ar = REPLACE_AR/ar = $(tc-getAR)/" \
+		-e "s/CFLAGS/${CFLAGS}/" \
+		-e "s/CXXFLAGS/${CXXFLAGS}/" \
+		-e "s/LDFLAGS/${LDFLAGS}/" \
+		3rd/luamake/compile/ninja/linux.ninja || die
+
+	prefixify_ro "${FILESDIR}/wrapper.sh"
+}
+
+src_compile() {
+	eninja -C 3rd/luamake -f compile/ninja/linux.ninja "$(usex test "test" "luamake")"
+	use test && eninja -C 3rd/luamake -f compile/ninja/linux.ninja luamake
+	./3rd/luamake/luamake init || die
+
+	# Generated file doesn't respect CFLAGS/CXXFLAGS/LDFLAGS
+	sed -i -e "s/^cc =.*./cc = REPLACE_ME/" \
+		-e "s/^ar =.*./ar = REPLACE_AR/" \
+		build/build.ninja || die
+
+	eapply "${FILESDIR}/build.ninja_v2.patch"
+	sed -i -e "s/REPLACE_ME/$(tc-getCC)/" \
+		-e "s/REPLACE_AR/$(tc-getAR)/" \
+		-e "s|LUAMAKE_PATH|${S}/3rd/luamake/luamake|" \
+		-e "s/CFLAGS/${CFLAGS}/" \
+		-e "s/CXXFLAGS/${CXXFLAGS}/" \
+		-e "s/LDFLAGS/${LDFLAGS}/" \
+		build/build.ninja || die
+
+	use test && eninja -f build/build.ninja || eninja -f build/build.ninja all
+	rm -rf meta/198256b1
+}
+
+src_install() {
+	newbin "${T}/wrapper.sh" ${PN}
+
+	into /opt/${PN}
+	dobin bin/${PN}
+
+	insinto /opt/${PN}/bin
+	doins bin/main.lua
+
+	insinto /opt/${PN}
+	doins -r debugger.lua main.lua locale meta script
+
+	einstalldocs
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: dev-util/lua-language-server/files/, dev-util/lua-language-server/
@ 2024-05-29 23:01 Brahmajit Das
  0 siblings, 0 replies; 8+ messages in thread
From: Brahmajit Das @ 2024-05-29 23:01 UTC (permalink / raw
  To: gentoo-commits

commit:     f3f33bb207fcc3db02a3388ae1073e2d200c3459
Author:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Wed May 29 23:00:31 2024 +0000
Commit:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
CommitDate: Wed May 29 23:00:31 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f3f33bb2

dev-util/lua-language-server: Drop 3.7.3

Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>

 dev-util/lua-language-server/Manifest              |   1 -
 .../lua-language-server/files/build.ninja.patch    |  19 +---
 .../lua-language-server/files/build.ninja_v2.patch | 102 ---------------------
 .../lua-language-server/files/linux.ninja.patch    |  33 +++----
 .../lua-language-server/files/linux.ninja_v2.patch |  71 --------------
 .../lua-language-server-3.7.3.ebuild               |  85 -----------------
 .../lua-language-server-3.9.1.ebuild               |   4 +-
 7 files changed, 19 insertions(+), 296 deletions(-)

diff --git a/dev-util/lua-language-server/Manifest b/dev-util/lua-language-server/Manifest
index 7c1f24262..0deeaf219 100644
--- a/dev-util/lua-language-server/Manifest
+++ b/dev-util/lua-language-server/Manifest
@@ -1,2 +1 @@
-DIST lua-language-server-3.7.3.zip 31522954 BLAKE2B 979f6de423d56b8781bfd3315d2d64cfe3082e3eecdf1203d7159d93f7bffa01f7330fe41c73949ece01fede8b987726cba54b884a07088d6ce6111802bede0a SHA512 db59d2987b09bb90fcdc362294d7b28b1652613414970856b54343c2a6ec791744dd524e505cb1495c0014c37288a8f5f5a849c64391a3e1a716bbe6788adcf2
 DIST lua-language-server-3.9.1.zip 32595453 BLAKE2B 53e13639a6b60805c074b617c53503360388da3c6ee1c887845bff472dfea7048b5b8793968df068c747c925648feb3f851a2eca42c6a21e33b0f6242b1b80e7 SHA512 305b036d804d3864a0baecabf4cc9bf46f0bd9ffcf3cb5ced9f57b0b29b8d9231b7283970ef38bd1669be05da795f08627a56a5eb83a70d71e2768254cf497bc

diff --git a/dev-util/lua-language-server/files/build.ninja.patch b/dev-util/lua-language-server/files/build.ninja.patch
index bb9891e2d..5485c3186 100644
--- a/dev-util/lua-language-server/files/build.ninja.patch
+++ b/dev-util/lua-language-server/files/build.ninja.patch
@@ -1,4 +1,4 @@
---- a/build/build.ninja
+--- b/build/build.ninja
 +++ b/build/build.ninja
 @@ -14,7 +14,7 @@
      make/code_format.lua
@@ -35,21 +35,12 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -87,7 +87,7 @@
-     3rd/bee.lua/binding/lua_time.cpp
+@@ -94,7 +94,7 @@
+     3rd/bee.lua/binding/luaref.cpp
  rule c_source_lua
-   command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall $
--    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in
-+    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in CFLAGS
-   description = Compile C   $out
-   deps = gcc
-   depfile = $out.d
-@@ -95,7 +95,7 @@
-     3rd/bee.lua/3rd/lua/utf8_crt.c
- rule c_source_lua_1
    command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall -DMAKE_LIB $
--    -DLUA_USE_LINUX -DNDEBUG -Wno-maybe-uninitialized -fPIC -o $out -c $in
-+    -DLUA_USE_LINUX -DNDEBUG -Wno-maybe-uninitialized -fPIC -o $out -c $in CFLAGS
+-    -DLUA_USE_LINUX -DNDEBUG -fPIC -Wno-maybe-uninitialized -o $out -c $in
++    -DLUA_USE_LINUX -DNDEBUG -fPIC -Wno-maybe-uninitialized -o $out -c $in CFLAGS
    description = Compile C   $out
    deps = gcc
    depfile = $out.d

diff --git a/dev-util/lua-language-server/files/build.ninja_v2.patch b/dev-util/lua-language-server/files/build.ninja_v2.patch
deleted file mode 100644
index 5485c3186..000000000
--- a/dev-util/lua-language-server/files/build.ninja_v2.patch
+++ /dev/null
@@ -1,102 +0,0 @@
---- b/build/build.ninja
-+++ b/build/build.ninja
-@@ -14,7 +14,7 @@
-     make/code_format.lua
- rule c_source_bee
-   command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall $
--    -fvisibility=hidden -I$builddir/lua54 -DNDEBUG -fPIC -o $out -c $in
-+    -fvisibility=hidden -I$builddir/lua54 -DNDEBUG -fPIC -o $out -c $in CFLAGS
-   description = Compile C   $out
-   deps = gcc
-   depfile = $out.d
-@@ -22,14 +22,14 @@
-     3rd/bee.lua/3rd/lua-seri/lua-seri.c
- rule cxx_source_bee
-   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
--    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in
-+    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
-   description = Compile C++ $out
-   deps = gcc
-   depfile = $out.d
- build $obj/source_bee/format.obj: cxx_source_bee 3rd/bee.lua/3rd/fmt/format.cc
- rule cxx_source_bee_1
-   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
--    -fvisibility=hidden -I3rd/bee.lua -DNDEBUG -fPIC -o $out -c $in
-+    -fvisibility=hidden -I3rd/bee.lua -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
-   description = Compile C++ $out
-   deps = gcc
-   depfile = $out.d
-@@ -65,7 +65,7 @@
- rule cxx_source_bee_2
-   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-     -fvisibility=hidden -I3rd/bee.lua -I$builddir/lua54 -DBEE_STATIC $
--    -DNDEBUG -fPIC -o $out -c $in
-+    -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
-   description = Compile C++ $out
-   deps = gcc
-   depfile = $out.d
-@@ -94,7 +94,7 @@
-     3rd/bee.lua/binding/luaref.cpp
- rule c_source_lua
-   command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall -DMAKE_LIB $
--    -DLUA_USE_LINUX -DNDEBUG -fPIC -Wno-maybe-uninitialized -o $out -c $in
-+    -DLUA_USE_LINUX -DNDEBUG -fPIC -Wno-maybe-uninitialized -o $out -c $in CFLAGS
-   description = Compile C   $out
-   deps = gcc
-   depfile = $out.d
-@@ -104,7 +104,7 @@
- rule cxx_source_bootstrap
-   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-     -fvisibility=hidden -I3rd/bee.lua/3rd/lua -I3rd/bee.lua -DLUA_USE_LINUX $
--    -DNDEBUG -fPIC -o $out -c $in
-+    -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
-   description = Compile C++ $out
-   deps = gcc
-   depfile = $out.d
-@@ -112,7 +112,7 @@
-     3rd/bee.lua/bootstrap/main.cpp
- rule link_bootstrap
-   command = $cc $in -o $out -Wl,-E -static-libgcc -lm -ldl -lstdc++fs $
--    -pthread -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -s
-+    -pthread -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic LDFLAGS
-   description = Link    Exe $out
- build $bin/bootstrap: link_bootstrap $obj/source_bootstrap/main.obj $
-     $obj/source_bee/lua-seri.obj $obj/source_bee/format.obj $
-@@ -155,8 +155,8 @@
-     -fvisibility=hidden -I3rd/EmmyLuaCodeStyle/Util/include $
-     -I3rd/EmmyLuaCodeStyle/CodeFormatCore/include $
-     -I3rd/EmmyLuaCodeStyle/LuaParser/include -I3rd/bee.lua/3rd/lua $
--    -I3rd/EmmyLuaCodeStyle/3rd/wildcards/include -DNDEBUG -Wall -Werror -o $
--    $out -c $in
-+    -I3rd/EmmyLuaCodeStyle/3rd/wildcards/include -DNDEBUG -Wall -o $
-+    $out -c $in CXXFLAGS
-   description = Compile C++ $out
-   deps = gcc
-   depfile = $out.d
-@@ -259,7 +259,7 @@
- rule c_lpeglabel
-   command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall $
-     -fvisibility=hidden -I3rd/bee.lua/3rd/lua -DMAXRECLEVEL=1000 -DNDEBUG $
--    -o $out -c $in
-+    -o $out -c $in CFLAGS
-   description = Compile C   $out
-   deps = gcc
-   depfile = $out.d
-@@ -271,7 +271,7 @@
- rule cxx_lua_language_server
-   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -O2 -Wall $
-     -fvisibility=hidden -I3rd/bee.lua -I3rd/bee.lua/3rd/lua -DCODE_FORMAT $
--    -DNDEBUG -o $out -c $in
-+    -DNDEBUG -o $out -c $in CXXFLAGS
-   description = Compile C++ $out
-   deps = gcc
-   depfile = $out.d
-@@ -279,7 +279,7 @@
-     make/modules.cpp
- rule link_lua_language_server
-   command = $cc $in -o $out -lm -ldl -lstdc++fs -pthread -Wl,-Bstatic $
--    -lstdc++ -Wl,-Bdynamic -s
-+    -lstdc++ -Wl,-Bdynamic LDFLAGS
-   description = Link    Exe $out
- build $bin/lua-language-server: link_lua_language_server $
-     $obj/lua-language-server/modules.obj $obj/lpeglabel/lplcap.obj $

diff --git a/dev-util/lua-language-server/files/linux.ninja.patch b/dev-util/lua-language-server/files/linux.ninja.patch
index 4fedbaccc..b4eba4b75 100644
--- a/dev-util/lua-language-server/files/linux.ninja.patch
+++ b/dev-util/lua-language-server/files/linux.ninja.patch
@@ -1,6 +1,6 @@
 --- a/3rd/luamake/compile/ninja/linux.ninja
 +++ b/3rd/luamake/compile/ninja/linux.ninja
-@@ -2,12 +2,12 @@
+@@ -2,12 +2,12 @@ ninja_required_version = 1.7
  builddir = build/linux
  bin = $builddir/bin
  obj = $builddir/obj
@@ -16,7 +16,7 @@
    description = Compile C   $out
    deps = gcc
    depfile = $out.d
-@@ -15,14 +15,14 @@
+@@ -15,14 +15,14 @@ build $obj/source_bee/lua-seri.obj: c_source_bee $
      bee.lua/3rd/lua-seri/lua-seri.c
  rule cxx_source_bee
    command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
@@ -33,7 +33,7 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -57,7 +57,7 @@
+@@ -58,7 +58,7 @@ build $obj/source_bee/version.obj: cxx_source_bee_1 bee.lua/bee/version.cpp
  rule cxx_source_bee_2
    command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
      -fvisibility=hidden -Ibee.lua -Itools/lua54 -DBEE_STATIC -DNDEBUG -fPIC $
@@ -42,30 +42,21 @@
    description = Compile C++ $out
    deps = gcc
    depfile = $out.d
-@@ -80,14 +80,14 @@
+@@ -88,7 +88,7 @@ build $obj/source_bee/luaref.obj: cxx_source_bee_2 bee.lua/binding/luaref.cpp
  rule c_source_lua
-   command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall $
-     -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in
--  description = Compile C   $out
-+  description = Compile C   $out CFLAGS
-   deps = gcc
-   depfile = $out.d
- build $obj/source_lua/utf8_crt.obj: c_source_lua bee.lua/3rd/lua/utf8_crt.c
- rule c_source_lua_1
    command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall -DMAKE_LIB $
-     -DLUA_USE_LINUX -DNDEBUG -Wno-maybe-uninitialized -fPIC -o $out -c $in
+     -DLUA_USE_LINUX -DNDEBUG -fPIC -Wno-maybe-uninitialized -o $out -c $in
 -  description = Compile C   $out
 +  description = Compile C   $out CFLAGS
    deps = gcc
    depfile = $out.d
- build $obj/source_lua/linit.obj: c_source_lua_1 bee.lua/3rd/lua/linit.c
-@@ -95,15 +95,15 @@
- rule cxx_source_bootstrap
+ build $obj/source_lua/linit.obj: c_source_lua bee.lua/3rd/lua/linit.c
+@@ -97,14 +97,14 @@ rule cxx_source_bootstrap
    command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
      -fvisibility=hidden -Ibee.lua/3rd/lua -Ibee.lua -DLUA_USE_LINUX $
--    -DNDEBUG -fPIC -o $out -c $in
-+    -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
-   description = Compile C++ $out
+     -DNDEBUG -fPIC -o $out -c $in
+-  description = Compile C++ $out
++  description = Compile C++ $out CXXFLAGS
    deps = gcc
    depfile = $out.d
  build $obj/source_bootstrap/main.obj: cxx_source_bootstrap $
@@ -76,5 +67,5 @@
 +  command = $cc $in -o $out -Wl,-E -static-libgcc -lm -ldl $
 +    -pthread -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic LDFLAGS
    description = Link    Exe $out
- build $bin/bootstrap: link_bootstrap $obj/source_bootstrap/main.obj $
-     $obj/source_bee/lua-seri.obj $obj/source_bee/format.obj $
+ rule copy
+   command = cp -fv $in$input $out 1>/dev/null

diff --git a/dev-util/lua-language-server/files/linux.ninja_v2.patch b/dev-util/lua-language-server/files/linux.ninja_v2.patch
deleted file mode 100644
index b4eba4b75..000000000
--- a/dev-util/lua-language-server/files/linux.ninja_v2.patch
+++ /dev/null
@@ -1,71 +0,0 @@
---- a/3rd/luamake/compile/ninja/linux.ninja
-+++ b/3rd/luamake/compile/ninja/linux.ninja
-@@ -2,12 +2,12 @@ ninja_required_version = 1.7
- builddir = build/linux
- bin = $builddir/bin
- obj = $builddir/obj
--cc = gcc
--ar = ar
-+cc = REPLACE_ME
-+ar = REPLACE_AR
- luamake = luamake
- rule c_source_bee
-   command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall $
--    -fvisibility=hidden -Itools/lua54 -DNDEBUG -fPIC -o $out -c $in
-+    -fvisibility=hidden -Itools/lua54 -DNDEBUG -fPIC -o $out -c $in CFLAGS
-   description = Compile C   $out
-   deps = gcc
-   depfile = $out.d
-@@ -15,14 +15,14 @@ build $obj/source_bee/lua-seri.obj: c_source_bee $
-     bee.lua/3rd/lua-seri/lua-seri.c
- rule cxx_source_bee
-   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
--    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in
-+    -fvisibility=hidden -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
-   description = Compile C++ $out
-   deps = gcc
-   depfile = $out.d
- build $obj/source_bee/format.obj: cxx_source_bee bee.lua/3rd/fmt/format.cc
- rule cxx_source_bee_1
-   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
--    -fvisibility=hidden -Ibee.lua -DNDEBUG -fPIC -o $out -c $in
-+    -fvisibility=hidden -Ibee.lua -DNDEBUG -fPIC -o $out -c $in CXXFLAGS
-   description = Compile C++ $out
-   deps = gcc
-   depfile = $out.d
-@@ -58,7 +58,7 @@ build $obj/source_bee/version.obj: cxx_source_bee_1 bee.lua/bee/version.cpp
- rule cxx_source_bee_2
-   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-     -fvisibility=hidden -Ibee.lua -Itools/lua54 -DBEE_STATIC -DNDEBUG -fPIC $
--    -o $out -c $in
-+    -o $out -c $in CXXFLAGS
-   description = Compile C++ $out
-   deps = gcc
-   depfile = $out.d
-@@ -88,7 +88,7 @@ build $obj/source_bee/luaref.obj: cxx_source_bee_2 bee.lua/binding/luaref.cpp
- rule c_source_lua
-   command = $cc -MMD -MT $out -MF $out.d -std=c11 -O2 -Wall -DMAKE_LIB $
-     -DLUA_USE_LINUX -DNDEBUG -fPIC -Wno-maybe-uninitialized -o $out -c $in
--  description = Compile C   $out
-+  description = Compile C   $out CFLAGS
-   deps = gcc
-   depfile = $out.d
- build $obj/source_lua/linit.obj: c_source_lua bee.lua/3rd/lua/linit.c
-@@ -97,14 +97,14 @@ rule cxx_source_bootstrap
-   command = $cc -MMD -MT $out -MF $out.d -std=c++17 -fno-rtti -O2 -Wall $
-     -fvisibility=hidden -Ibee.lua/3rd/lua -Ibee.lua -DLUA_USE_LINUX $
-     -DNDEBUG -fPIC -o $out -c $in
--  description = Compile C++ $out
-+  description = Compile C++ $out CXXFLAGS
-   deps = gcc
-   depfile = $out.d
- build $obj/source_bootstrap/main.obj: cxx_source_bootstrap $
-     bee.lua/bootstrap/main.cpp
- rule link_bootstrap
--  command = $cc $in -o $out -Wl,-E -static-libgcc -lm -ldl -lstdc++fs $
--    -pthread -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -s
-+  command = $cc $in -o $out -Wl,-E -static-libgcc -lm -ldl $
-+    -pthread -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic LDFLAGS
-   description = Link    Exe $out
- rule copy
-   command = cp -fv $in$input $out 1>/dev/null

diff --git a/dev-util/lua-language-server/lua-language-server-3.7.3.ebuild b/dev-util/lua-language-server/lua-language-server-3.7.3.ebuild
deleted file mode 100644
index f7a6bd85c..000000000
--- a/dev-util/lua-language-server/lua-language-server-3.7.3.ebuild
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 2022-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua{5-{1,3,4},jit} )
-
-inherit ninja-utils toolchain-funcs lua-single prefix
-
-DESCRIPTION="Lua language server"
-HOMEPAGE="https://github.com/LuaLS/lua-language-server"
-SRC_URI="https://github.com/LuaLS/lua-language-server/releases/download/${PV}/${P}-submodules.zip -> ${P}.zip"
-S="${WORKDIR}"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="test"
-REQUIRE_USE="${LUA_REQUIRED_USE}"
-
-DEPEND="${LUA_DEPS}"
-RDEPEND="${DEPEND}"
-BDEPEND="
-	app-alternatives/ninja
-	app-arch/unzip
-"
-RESTRICT="!test? ( test )"
-PATCHES=( "${FILESDIR}/linux.ninja.patch" "${FILESDIR}/build.ninja.patch" )
-
-src_prepare() {
-	# Remove hardcoded gcc references
-	sed -i "/lm.cxx/a lm.cc = '$(tc-getCC)'" \
-		make.lua || die
-	sed -i "s/CC = gcc/ CC = ${tc-getCC}/" \
-		3rd/lpeglabel/makefile || die
-	# Shipped file doesn't respect CFLAGS/CXXFLAGS/LDFLAGS
-	eapply "${FILESDIR}/linux.ninja.patch"
-	eapply_user
-	sed -i -e "s/^cc = REPLACE_ME/cc = $(tc-getCC)/" \
-		-e "s/^ar = REPLACE_AR/ar = $(tc-getAR)/" \
-		-e "s/CFLAGS/${CFLAGS}/" \
-		-e "s/CXXFLAGS/${CXXFLAGS}/" \
-		-e "s/LDFLAGS/${LDFLAGS}/" \
-		3rd/luamake/compile/ninja/linux.ninja || die
-
-	prefixify_ro "${FILESDIR}/wrapper.sh"
-}
-
-src_compile() {
-	eninja -C 3rd/luamake -f compile/ninja/linux.ninja "$(usex test "test" "luamake")"
-	use test && eninja -C 3rd/luamake -f compile/ninja/linux.ninja luamake
-	./3rd/luamake/luamake init || die
-
-	# Generated file doesn't respect CFLAGS/CXXFLAGS/LDFLAGS
-	sed -i -e "s/^cc =.*./cc = REPLACE_ME/" \
-		-e "s/^ar =.*./ar = REPLACE_AR/" \
-		build/build.ninja || die
-
-	eapply "${FILESDIR}/build.ninja.patch"
-	sed -i -e "s/REPLACE_ME/$(tc-getCC)/" \
-		-e "s/REPLACE_AR/$(tc-getAR)/" \
-		-e "s|LUAMAKE_PATH|${S}/3rd/luamake/luamake|" \
-		-e "s/CFLAGS/${CFLAGS}/" \
-		-e "s/CXXFLAGS/${CXXFLAGS}/" \
-		-e "s/LDFLAGS/${LDFLAGS}/" \
-		build/build.ninja || die
-
-	use test && eninja -f build/build.ninja || eninja -f build/build.ninja all
-	rm -rf meta/198256b1
-}
-
-src_install() {
-	newbin "${T}/wrapper.sh" ${PN}
-
-	into /opt/${PN}
-	dobin bin/${PN}
-
-	insinto /opt/${PN}/bin
-	doins bin/main.lua
-
-	insinto /opt/${PN}
-	doins -r debugger.lua main.lua locale meta script
-
-	einstalldocs
-}

diff --git a/dev-util/lua-language-server/lua-language-server-3.9.1.ebuild b/dev-util/lua-language-server/lua-language-server-3.9.1.ebuild
index a70ce930c..5e90591cb 100644
--- a/dev-util/lua-language-server/lua-language-server-3.9.1.ebuild
+++ b/dev-util/lua-language-server/lua-language-server-3.9.1.ebuild
@@ -37,7 +37,7 @@ src_prepare() {
 	sed -i "s/CC = gcc/ CC = ${tc-getCC}/" \
 		3rd/lpeglabel/makefile || die
 	# Shipped file doesn't respect CFLAGS/CXXFLAGS/LDFLAGS
-	eapply "${FILESDIR}/linux.ninja_v2.patch"
+	eapply "${FILESDIR}/linux.ninja.patch"
 	eapply_user
 	sed -i -e "s/^cc = REPLACE_ME/cc = $(tc-getCC)/" \
 		-e "s/^ar = REPLACE_AR/ar = $(tc-getAR)/" \
@@ -59,7 +59,7 @@ src_compile() {
 		-e "s/^ar =.*./ar = REPLACE_AR/" \
 		build/build.ninja || die
 
-	eapply "${FILESDIR}/build.ninja_v2.patch"
+	eapply "${FILESDIR}/build.ninja.patch"
 	sed -i -e "s/REPLACE_ME/$(tc-getCC)/" \
 		-e "s/REPLACE_AR/$(tc-getAR)/" \
 		-e "s|LUAMAKE_PATH|${S}/3rd/luamake/luamake|" \


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: dev-util/lua-language-server/files/, dev-util/lua-language-server/
@ 2024-08-19 20:46 Brahmajit Das
  0 siblings, 0 replies; 8+ messages in thread
From: Brahmajit Das @ 2024-08-19 20:46 UTC (permalink / raw
  To: gentoo-commits

commit:     843cf24cbffb34545832573f774ca31900da7143
Author:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Mon Aug 19 20:45:56 2024 +0000
Commit:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
CommitDate: Mon Aug 19 20:46:19 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=843cf24c

dev-util/lua-language-server: Fix building for 3.10.5

Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>

 .../files/lua-language-server-3.10.5-uint32_t-fix.patch        | 10 ++++++++++
 dev-util/lua-language-server/lua-language-server-3.10.5.ebuild |  2 ++
 2 files changed, 12 insertions(+)

diff --git a/dev-util/lua-language-server/files/lua-language-server-3.10.5-uint32_t-fix.patch b/dev-util/lua-language-server/files/lua-language-server-3.10.5-uint32_t-fix.patch
new file mode 100644
index 000000000..2f38d8970
--- /dev/null
+++ b/dev-util/lua-language-server/files/lua-language-server-3.10.5-uint32_t-fix.patch
@@ -0,0 +1,10 @@
+--- a/3rd/EmmyLuaCodeStyle/Util/include/Util/SymSpell/SymSpell.h
++++ b/3rd/EmmyLuaCodeStyle/Util/include/Util/SymSpell/SymSpell.h
+@@ -29,6 +29,7 @@
+ #include <unordered_map>
+ #include <unordered_set>
+ #include <vector>
++#include <stdint.h>
+ 
+ class SymSpell {
+ public:

diff --git a/dev-util/lua-language-server/lua-language-server-3.10.5.ebuild b/dev-util/lua-language-server/lua-language-server-3.10.5.ebuild
index 5e90591cb..97e025164 100644
--- a/dev-util/lua-language-server/lua-language-server-3.10.5.ebuild
+++ b/dev-util/lua-language-server/lua-language-server-3.10.5.ebuild
@@ -28,6 +28,7 @@ RESTRICT="!test? ( test )"
 PATCHES=(
 	"${FILESDIR}/linux.ninja.patch"
 	"${FILESDIR}/build.ninja.patch"
+	"${FILESDIR}/${PN}-3.10.5-uint32_t-fix.patch"
 )
 
 src_prepare() {
@@ -60,6 +61,7 @@ src_compile() {
 		build/build.ninja || die
 
 	eapply "${FILESDIR}/build.ninja.patch"
+	eapply "${FILESDIR}/${PN}-3.10.5-uint32_t-fix.patch"
 	sed -i -e "s/REPLACE_ME/$(tc-getCC)/" \
 		-e "s/REPLACE_AR/$(tc-getAR)/" \
 		-e "s|LUAMAKE_PATH|${S}/3rd/luamake/luamake|" \


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-08-19 20:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-13 22:02 [gentoo-commits] repo/proj/guru:dev commit in: dev-util/lua-language-server/files/, dev-util/lua-language-server/ Mathis Winterer
  -- strict thread matches above, loose matches on Subject: below --
2024-08-19 20:46 Brahmajit Das
2024-05-29 23:01 Brahmajit Das
2024-05-27 16:36 Brahmajit Das
2023-04-27 17:16 Mathis Winterer
2023-03-28 13:51 Mathis Winterer
2023-01-19 20:14 Mathis Winterer
2023-01-01 23:08 Mathis Winterer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox