mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-21 21:17:37 -08:00
dev-ada/ada_language_server: add gtk use flags, fix errors
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
parent
5b32235e2c
commit
a03a5a8853
@ -14,7 +14,7 @@ SRC_URI="https://github.com/AdaCore/${PN}/archive/refs/tags/${PV}.tar.gz
|
|||||||
LICENSE="GPL-3"
|
LICENSE="GPL-3"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||||
IUSE="test"
|
IUSE="gtk test"
|
||||||
RESTRICT="test" # Tests do not work
|
RESTRICT="test" # Tests do not work
|
||||||
|
|
||||||
RDEPEND="${ADA_DEPS}
|
RDEPEND="${ADA_DEPS}
|
||||||
@ -31,7 +31,7 @@ RDEPEND="${ADA_DEPS}
|
|||||||
>=dev-ada/libadalang-tools-23:=[${ADA_USEDEP}]
|
>=dev-ada/libadalang-tools-23:=[${ADA_USEDEP}]
|
||||||
dev-ada/libgpr:=[${ADA_USEDEP}]
|
dev-ada/libgpr:=[${ADA_USEDEP}]
|
||||||
dev-ada/prettier-ada:=[${ADA_USEDEP}]
|
dev-ada/prettier-ada:=[${ADA_USEDEP}]
|
||||||
dev-ada/spawn:=[${ADA_USEDEP}]
|
dev-ada/spawn:=[${ADA_USEDEP},gtk?]
|
||||||
dev-ada/templates-parser:=[${ADA_USEDEP},shared(+)]
|
dev-ada/templates-parser:=[${ADA_USEDEP},shared(+)]
|
||||||
>=dev-ada/VSS-25.0.0:=[${ADA_USEDEP},shared]
|
>=dev-ada/VSS-25.0.0:=[${ADA_USEDEP},shared]
|
||||||
dev-ada/xmlada:=[${ADA_USEDEP},shared]
|
dev-ada/xmlada:=[${ADA_USEDEP},shared]
|
||||||
@ -43,6 +43,8 @@ BDEPEND="dev-ada/gprbuild[${ADA_USEDEP}]
|
|||||||
|
|
||||||
REQUIRED_USE="${ADA_REQUIRED_USE}"
|
REQUIRED_USE="${ADA_REQUIRED_USE}"
|
||||||
|
|
||||||
|
PATCHES=( "${FILESDIR}"/${P}-accessCheck.patch )
|
||||||
|
|
||||||
src_compile() {
|
src_compile() {
|
||||||
gprbuild -v -m -j$(makeopts_jobs) -P gnat/lsp_server.gpr -p \
|
gprbuild -v -m -j$(makeopts_jobs) -P gnat/lsp_server.gpr -p \
|
||||||
-XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable \
|
-XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable \
|
||||||
@ -60,6 +62,12 @@ src_compile() {
|
|||||||
-XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable \
|
-XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable \
|
||||||
-XGPR_BUILD=relocatable -cargs:Ada ${ADAFLAGS} -largs ${LDFLAGS} \
|
-XGPR_BUILD=relocatable -cargs:Ada ${ADAFLAGS} -largs ${LDFLAGS} \
|
||||||
|| die
|
|| die
|
||||||
|
if use gtk; then
|
||||||
|
gprbuild -v -m -j$(makeopts_jobs) -P gnat/lsp_client_glib.gpr -p \
|
||||||
|
-XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable \
|
||||||
|
-XGPR_BUILD=relocatable -cargs:Ada ${ADAFLAGS} -largs ${LDFLAGS} \
|
||||||
|
|| die
|
||||||
|
fi
|
||||||
mkdir -p integration/vscode/ada/x64/linux
|
mkdir -p integration/vscode/ada/x64/linux
|
||||||
cp -f .obj/server/ada_language_server integration/vscode/ada/x64/linux || die
|
cp -f .obj/server/ada_language_server integration/vscode/ada/x64/linux || die
|
||||||
}
|
}
|
||||||
@ -74,6 +82,11 @@ src_install() {
|
|||||||
gprinstall -v -f -P gnat/lsp_client.gpr -p -r --mode=dev \
|
gprinstall -v -f -P gnat/lsp_client.gpr -p -r --mode=dev \
|
||||||
--prefix="${D}"/usr -XLIBRARY_TYPE=relocatable \
|
--prefix="${D}"/usr -XLIBRARY_TYPE=relocatable \
|
||||||
-XXMLADA_BUILD=relocatable -XGPR_BUILD=relocatable || die
|
-XXMLADA_BUILD=relocatable -XGPR_BUILD=relocatable || die
|
||||||
|
if use gtk; then
|
||||||
|
gprinstall -v -f -P gnat/lsp_client_glib.gpr -p -r --mode=dev \
|
||||||
|
--prefix="${D}"/usr -XLIBRARY_TYPE=relocatable \
|
||||||
|
-XXMLADA_BUILD=relocatable -XGPR_BUILD=relocatable || die
|
||||||
|
fi
|
||||||
rm "${D}"/usr/share/gpr/gnatcoll.gpr || die
|
rm "${D}"/usr/share/gpr/gnatcoll.gpr || die
|
||||||
einstalldocs
|
einstalldocs
|
||||||
}
|
}
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
--- a/source/server/lsp-servers.adb 2025-05-28 14:26:39.929607310 +0200
|
||||||
|
+++ b/source/server/lsp-servers.adb 2025-05-28 20:40:01.934644123 +0200
|
||||||
|
@@ -840,13 +840,14 @@
|
||||||
|
else
|
||||||
|
declare
|
||||||
|
Waste : Server_Message_Access;
|
||||||
|
+ use type Server_Message_Access;
|
||||||
|
|
||||||
|
begin
|
||||||
|
-- Call Process_Job at least once to complete a fenced
|
||||||
|
-- job if any.
|
||||||
|
Server.Scheduler.Process_Job (Server.all, Waste);
|
||||||
|
|
||||||
|
- if Waste.Assigned then
|
||||||
|
+ if Waste /= null then
|
||||||
|
Server.Destroy_Queue.Enqueue (Waste);
|
||||||
|
end if;
|
||||||
|
|
||||||
|
@@ -893,6 +894,7 @@
|
||||||
|
end Process_Message;
|
||||||
|
|
||||||
|
Request : Server_Message_Access;
|
||||||
|
+ use type Server_Message_Access;
|
||||||
|
begin
|
||||||
|
-- Perform initialization
|
||||||
|
accept Start
|
||||||
|
@@ -919,7 +921,7 @@
|
||||||
|
Continue := False;
|
||||||
|
end select;
|
||||||
|
|
||||||
|
- if Request.Assigned then
|
||||||
|
+ if Request /= null then
|
||||||
|
Process_Message (Request);
|
||||||
|
end if;
|
||||||
|
end loop;
|
||||||
|
@@ -930,7 +932,7 @@
|
||||||
|
|
||||||
|
Execute_Jobs (Server.Look_Ahead);
|
||||||
|
|
||||||
|
- if not Server.Look_Ahead.Assigned then
|
||||||
|
+ if Server.Look_Ahead = null then
|
||||||
|
-- there is no jobs any more, just wait for input messages
|
||||||
|
|
||||||
|
select
|
||||||
|
--- a/source/server/lsp-job_schedulers.adb 2025-05-28 20:27:48.015040064 +0200
|
||||||
|
+++ b/source/server/lsp-job_schedulers.adb 2025-05-28 20:38:31.969675280 +0200
|
||||||
|
@@ -38,8 +38,9 @@
|
||||||
|
(Self : in out Job_Scheduler'Class;
|
||||||
|
Next : LSP.Server_Messages.Server_Message_Access;
|
||||||
|
Waste : out LSP.Server_Messages.Server_Message_Access) is
|
||||||
|
+ use type LSP.Server_Jobs.Server_Job_Access;
|
||||||
|
begin
|
||||||
|
- if Self.Done.Assigned then
|
||||||
|
+ if Self.Done /= null then
|
||||||
|
Self.Done.Complete (Next);
|
||||||
|
Waste := Self.Done.Message;
|
||||||
|
Free (Self.Done);
|
||||||
|
@@ -92,8 +93,9 @@
|
||||||
|
--------------
|
||||||
|
|
||||||
|
function Has_Jobs (Self : Job_Scheduler'Class) return Boolean is
|
||||||
|
+ use type LSP.Server_Jobs.Server_Job_Access;
|
||||||
|
begin
|
||||||
|
- return Self.Blocker.Assigned or else
|
||||||
|
+ return Self.Blocker /= null or else
|
||||||
|
(for some List of Self.Jobs => not List.Is_Empty);
|
||||||
|
end Has_Jobs;
|
||||||
|
|
||||||
|
@@ -169,10 +171,11 @@
|
||||||
|
From : LSP.Server_Jobs.Job_Priority := LSP.Server_Jobs.Lowest)
|
||||||
|
is
|
||||||
|
Status : LSP.Server_Jobs.Execution_Status;
|
||||||
|
+ use type LSP.Server_Messages.Server_Message_Access;
|
||||||
|
begin
|
||||||
|
Self.Complete_Last_Fence_Job (null, Waste);
|
||||||
|
|
||||||
|
- if not Waste.Assigned then
|
||||||
|
+ if Waste = null then
|
||||||
|
for List of reverse Self.Jobs (From .. LSP.Server_Jobs.High)
|
||||||
|
when not List.Is_Empty
|
||||||
|
loop
|
||||||
Loading…
x
Reference in New Issue
Block a user