From e75a16203904086f1101e4fd87ebf018d2f49b14 Mon Sep 17 00:00:00 2001 From: Blady Date: Tue, 29 Nov 2022 21:36:41 +0100 Subject: [PATCH 1/7] GNATDoc and GNATStudio_CLI: use XDG_DATA_DIRS to get share folder in case of app bundled. --- cli/src/gps-cli_kernels.adb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cli/src/gps-cli_kernels.adb b/cli/src/gps-cli_kernels.adb index 042f8812d3..182c8e6843 100644 --- a/cli/src/gps-cli_kernels.adb +++ b/cli/src/gps-cli_kernels.adb @@ -18,6 +18,8 @@ with GNATCOLL.Projects; with GNATCOLL.Utils; +with Ada.Environment_Variables; + package body GPS.CLI_Kernels is --------------------- @@ -59,11 +61,14 @@ package body GPS.CLI_Kernels is return GNATCOLL.VFS.Virtual_File is pragma Unreferenced (Self); + use Ada.Environment_Variables; Dir : GNATCOLL.VFS.Virtual_File := Create (+GNATCOLL.Utils.Executable_Location); begin - if Dir.Base_Dir_Name = "obj" then + if Exists ("XDG_DATA_DIRS") then + Dir := Create (+(Value ("XDG_DATA_DIRS")) & "/gnatstudio/"); + elsif Dir.Base_Dir_Name = "obj" then Dir := Create_From_Dir (Dir.Get_Parent.Get_Parent, "share/"); else Dir := Create_From_Dir (Dir, "share/gnatstudio/"); From da911b55057a0124c476455d8fedd874755b480f Mon Sep 17 00:00:00 2001 From: Blady Date: Tue, 29 Nov 2022 21:45:06 +0100 Subject: [PATCH 2/7] Fix configure test logic when GTKAda testing. (Maybe macOS specific with zsh) --- configure | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 98cd647848..abb5cfe4a0 100755 --- a/configure +++ b/configure @@ -4387,7 +4387,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GtkAda - version >= $min_gtk_version" >&5 $as_echo_n "checking for GtkAda - version >= $min_gtk_version... " >&6; } - if test "$GNATDRV" = "no" -o ! `$GNATDRV ls -Pgtkada` ; then +test ! "$GNATDRV" = "no" +retval=$? +if test $retval -eq 0 ; then + $GNATDRV ls -Pgtkada > /dev/null + retval=$? +fi + + if test $retval -ne 0 ; then no_gtk=yes else # Full version number From 7172108259f44005466e10ad94ba1438c8d2a3c3 Mon Sep 17 00:00:00 2001 From: Blady Date: Tue, 29 Nov 2022 21:46:27 +0100 Subject: [PATCH 3/7] Fix configure test of Python minor version greater than 9. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index abb5cfe4a0..0233994a55 100755 --- a/configure +++ b/configure @@ -4586,7 +4586,7 @@ $as_echo_n "checking for $am_display_PYTHON version... " >&6; } if ${am_cv_python_version+:} false; then : $as_echo_n "(cached) " >&6 else - am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` + am_cv_python_version=`$PYTHON -c "import sys,re; sys.stdout.write(re.findall(r'(\d+\.\d+)\.', sys.version)[0])"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 $as_echo "$am_cv_python_version" >&6; } From b2716cbed62fe711beb604bd0a99a59f2b14aefd Mon Sep 17 00:00:00 2001 From: Blady Date: Tue, 29 Nov 2022 21:49:27 +0100 Subject: [PATCH 4/7] Fix configure library list setting for Python. (Maybe macOS specific with zsh) --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 0233994a55..048ec5fcf8 100755 --- a/configure +++ b/configure @@ -5108,7 +5108,7 @@ See \`config.log' for more details" "$LINENO" 5; } - value=$PYTHON_LIBS $PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LDFLAGS + value="$PYTHON_LIBS $PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LDFLAGS" # Special handling on darwin for gcc 4.5 and 4.7 case "$build_os" in From b6206aa32b2a20704441c516f70b1ccb9cd47445 Mon Sep 17 00:00:00 2001 From: Blady Date: Tue, 29 Nov 2022 22:07:04 +0100 Subject: [PATCH 5/7] Change withed VSS path of dap.gpr like other ones. (for instance, common.gpr) --- dap/dap.gpr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dap/dap.gpr b/dap/dap.gpr index 95814a1550..0c470ed528 100644 --- a/dap/dap.gpr +++ b/dap/dap.gpr @@ -7,7 +7,7 @@ with "../refactoring/ui/refactoring_ui"; with "../views/views"; with "../browsers/browsers"; with "../gvd/gvd"; -with "../subprojects/VSS/gnat/vss_text"; +with "vss_text"; project DAP is From 7a3a36b9842d072899f1c88d667a8defa0fde1a9 Mon Sep 17 00:00:00 2001 From: Blady Date: Thu, 1 Dec 2022 21:37:10 +0100 Subject: [PATCH 6/7] Fix compatibility with Python 3.10. --- share/support/core/gs_utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/support/core/gs_utils/__init__.py b/share/support/core/gs_utils/__init__.py index 4850fc5324..02f20dcaca 100644 --- a/share/support/core/gs_utils/__init__.py +++ b/share/support/core/gs_utils/__init__.py @@ -2,7 +2,7 @@ # exported by GPS to make it easier to write plugins from GPS import pwd, cd, Action, EditorBuffer, MDI -from collections import MutableMapping as DictMixin +from collections.abc import MutableMapping as DictMixin import types import GPS import GPS.Browsers From e1a89efe95e515f51ad497139bdbbedc44552b56 Mon Sep 17 00:00:00 2001 From: Blady Date: Thu, 1 Dec 2022 21:39:33 +0100 Subject: [PATCH 7/7] Add BUILD variable needed by GPRBUILD_BUILD_TYPE_FLAGS. --- testsuite/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/testsuite/Makefile b/testsuite/Makefile index c97e52f41e..eca58db184 100644 --- a/testsuite/Makefile +++ b/testsuite/Makefile @@ -1,5 +1,6 @@ GPRBUILD=gprbuild GPRCLEAN=gprclean +BUILD?=Debug SYS := $(shell gcc -dumpmachine) ifeq ($(OS),Windows_NT)