summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--0004-Honour-GPRBUILD_FLAGS-in-cli-Makefile.patch22
-rw-r--r--PKGBUILD119
-rw-r--r--patch-filter_panels.adb46
-rw-r--r--patch-gtkada-search_entry.adb54
-rw-r--r--patch-gtkada-search_entry.ads12
-rw-r--r--patch-share-support-core-extensions-__init__.py9
-rw-r--r--patch-share-support-core-modules.py20
-rw-r--r--patch-share-support-core-tool_output.py14
-rw-r--r--patch-share-support-ui-pygps-__init__.py32
-rw-r--r--patch-shared.gpr.in11
10 files changed, 260 insertions, 79 deletions
diff --git a/0004-Honour-GPRBUILD_FLAGS-in-cli-Makefile.patch b/0004-Honour-GPRBUILD_FLAGS-in-cli-Makefile.patch
index f4bf3650017b..63c3da14a240 100644
--- a/0004-Honour-GPRBUILD_FLAGS-in-cli-Makefile.patch
+++ b/0004-Honour-GPRBUILD_FLAGS-in-cli-Makefile.patch
@@ -1,20 +1,7 @@
-From 1b9588773387109753218a6395c77014b56bd8ea Mon Sep 17 00:00:00 2001
-From: Xiretza <xiretza@xiretza.xyz>
-Date: Sun, 24 May 2020 11:23:55 +0200
-Subject: [PATCH 4/5] Honour GPRBUILD_FLAGS= in cli/Makefile
-
----
- cli/Makefile | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/cli/Makefile b/cli/Makefile
-index 3b0630d8ef..8c6218cf5a 100644
---- a/cli/Makefile
-+++ b/cli/Makefile
-@@ -1,8 +1,9 @@
- GPRBUILD=gprbuild
+--- cli/Makefile 2021-06-15 15:19:41.000000000 +1000
++++ cli/Makefile-new 2021-07-22 05:39:00.350093341 +1000
+@@ -2,7 +2,7 @@
GPRCLEAN=gprclean
-+GPRBUILD_FLAGS=
all default:
- $(GPRBUILD) -p -Pcli
@@ -23,6 +10,3 @@ index 3b0630d8ef..8c6218cf5a 100644
clean:
- $(GPRCLEAN) -q -r -Pcli
+ $(GPRCLEAN) $(GPRBUILD_FLAGS) -q -r -Pcli
---
-2.26.2
-
diff --git a/PKGBUILD b/PKGBUILD
index 41f29377e325..a12cd31c4e46 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,88 +1,79 @@
-# Maintainer: xiretza <xiretza+aur@gmail.com>
+# Maintainer: xiretza <xiretza+aur@gmail.com>
# Maintainer: Rod Kay <charlie5 on #ada at freenode.net>
# Contributor: Patrick Kelly <kameo76890 at gmail dot com>
# Contributor: Georgios Tsalikis <aliverius somewhere near tsalikis and a net>
pkgname=gnat-gps
-pkgver=2020
-pkgrel=8
+_upstream_ver=2021-20210701-19B6B
+pkgver=2021
+pkgrel=1
pkgdesc="GNAT Programming Studio for Ada"
arch=('i686' 'x86_64')
url="https://github.com/AdaCore/gps"
license=('GPL')
-depends=("clang" "libadalang"
- "gnatcoll-xref" "gnatcoll-python2" "gnatcoll-db2ada"
- "gnatcoll-gnatinspect" "gtkada"
- "gnome-icon-theme" "gnome-icon-theme-extras" "gnome-icon-theme-symbolic"
- "python2-gobject" "python2-gobject2")
-optdepends=('python2-jedi')
-makedepends=('gprbuild' 'texlive-latexextra' 'graphviz' "python2-pip")
-
-_gps_version=21.0w-20200427-15496
-_gps_checksum=bfa68dd61a9288c79e9c08676878cac95e0fe628
+#depends=("clang" "ada_language_server"
+# "gnatcoll-python2" "gnatcoll-db2ada"
+# "gnatcoll-gnatinspect" "gtkada"
+# "gnome-icon-theme" "gnome-icon-theme-extras" "gnome-icon-theme-symbolic"
+# "python2-gobject" "python2-gobject2")
+depends=("clang" "ada_language_server"
+ "gnatcoll-python2" "gnatcoll-xref"
+ "gtkada")
-_als_ver=21.0w-20200427-156B6
-_als_checksum=05e31f6e36e2ff4313013d27f0551416de5a1b4e
-
-_laltools_ver=21.0w-20200425-15675
-_laltools_checksum=334dca036084a92552860451619321faee571797
+optdepends=('python2-jedi')
+makedepends=('gprbuild' 'texlive-latexextra' 'graphviz')
-source=("gps-$_gps_version-src.tar.gz::https://community.download.adacore.com/v1/$_gps_checksum?filename="
- "als-$_als_ver-src.tar.gz::https://community.download.adacore.com/v1/$_als_checksum?filename="
- "libadalang-tools-$_laltools_ver-src.tar.gz::https://community.download.adacore.com/v1/$_laltools_checksum?filename="
- 0002-Ignore-absence-of-version-number-in-user_guide.patch
+_checksum=e940520a321c0aa8b624be178306147970c6b6f9
+source=("${pkgname}-${_upstream_ver}-src.tar.gz::https://community.download.adacore.com/v1/${_checksum}?filename=${pkgname}-${_upstream_ver}-src.tar.gz"
0003-Honour-DESTDIR-in-installation-targets.patch
0004-Honour-GPRBUILD_FLAGS-in-cli-Makefile.patch
- 0005-Fix-recursive-make-in-docs.patch
+ patch-shared.gpr.in
+ patch-filter_panels.adb
+ patch-gtkada-search_entry.ads
+ patch-gtkada-search_entry.adb
+ patch-share-support-core-extensions-__init__.py
+ patch-share-support-core-modules.py
+ patch-share-support-core-tool_output.py
+ patch-share-support-ui-pygps-__init__.py
gps.desktop)
-sha1sums=("$_gps_checksum"
- "$_als_checksum"
- "$_laltools_checksum"
- '525f0b9d64fecb9c2e669cf64b60548b86c575d9'
+sha1sums=("$_checksum"
'4c13859aa25c5142bd5d0fde7b645217ddeccb50'
- '26f6fac439ec973facccee5412dc4c86b7c6d8c7'
- '6dd1f880f55c9612a2a67d41e6606df26cd829c6'
+ '4e6cb35c4e2e74d343d0917b926c7377a81b1aba'
+ 'c71a4484b1e791ea8455a44e602b236dc7497c4d'
+ '7a928f86dad330590a8c9e9aff04291e458fd1c6'
+ '8815ffbf0077a50c4c2023637d214b1847be40f1'
+ '6ec11d04620cb5225df8a43c9a5dbd98e3e3ca53'
+ '6c4ec35fcb80336d62960b3b59fbe82ea305f738'
+ '79da1943438f081e6a863011c82c80ccec280e03'
+ '0a03a65eda52b70c7197aef858e3c552a3fbda34'
+ '4492bad6e6a368526654e9c6ac6cc853d4b0fe48'
'b399c7b3a1fe48152da18081def3dced2e74763b')
prepare()
{
- # Ensure python2 sphinx is installed.
- if test -f "/usr/bin/sphinx-build2"; then
- # Sphinx has already been installed via pacman.
- mkdir -p "$srcdir/.local/bin"
- ln -sfT /usr/bin/sphinx-build2 "$srcdir/.local/bin/sphinx-build"
- else
- # Install obsolete python2 packages that can no longer be auto-installed via makedepends.
- # Note that exports made here are visible in build() and package() as well.
- # Use a persistent but package-specific download cache.
- export PYTHONUSERBASE="$srcdir/.local"
- pip2 install --user --cache-dir "$startdir/.cache/pip2" sphinx
- fi
- export PATH="$srcdir/.local/bin:$PATH"
-
- # Destination directory already populated by pip2 install.
- ln -sfT /usr/bin/python2 "$srcdir/.local/bin/python"
- ln -sfT /usr/bin/python2-config "$srcdir/.local/bin/python-config"
-
- cd "$srcdir/gps-$_gps_version-src"
+ cd "$srcdir/gps-$_upstream_ver-src"
- patch -p1 < "$srcdir/0002-Ignore-absence-of-version-number-in-user_guide.patch"
- patch -p1 < "$srcdir/0003-Honour-DESTDIR-in-installation-targets.patch"
- patch -p1 < "$srcdir/0004-Honour-GPRBUILD_FLAGS-in-cli-Makefile.patch"
- patch -p1 < "$srcdir/0005-Fix-recursive-make-in-docs.patch"
+ patch -Np0 -i ../patch-shared.gpr.in
+ patch -Np1 -i ../patch-filter_panels.adb
+ patch -Np1 -i ../patch-gtkada-search_entry.ads
+ patch -Np1 -i ../patch-gtkada-search_entry.adb
+
+ patch -Np0 -i ../patch-share-support-core-extensions-__init__.py
+ patch -Np0 -i ../patch-share-support-core-modules.py
+ patch -Np0 -i ../patch-share-support-core-tool_output.py
+ patch -Np0 -i ../patch-share-support-ui-pygps-__init__.py
- # Link libadalang-tools and ada_language_server into the GPS source tree.
- ln -sf "$srcdir/libadalang-tools-$_laltools_ver-src" "$srcdir/gps-$_gps_version-src/laltools"
- ln -sf "$srcdir/als-$_als_ver-src" "$srcdir/gps-$_gps_version-src/ada_language_server"
+ patch -p1 < "$srcdir/0003-Honour-DESTDIR-in-installation-targets.patch"
+ patch -p0 < "$srcdir/0004-Honour-GPRBUILD_FLAGS-in-cli-Makefile.patch"
}
build()
{
- cd "$srcdir/gps-$_gps_version-src"
+ cd "$srcdir/gps-$_upstream_ver-src"
export OS=unix
@@ -92,21 +83,29 @@ build()
make -C docs clean
make -C gnatdoc/docs/users_guide clean
+ ADA_FLAGS="$CFLAGS"
+ ADA_FLAGS="${ADA_FLAGS//-Wformat}"
+ ADA_FLAGS="${ADA_FLAGS//-Werror=format-security}"
+
# GPS uses a lot of Unchecked_Conversion (too many to patch), so we have to build with -fno-strict-aliasing.
# https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gnat_ugn/Optimization-and-Strict-Aliasing.html
- make PROCESSORS=0 Build=Production GPRBUILD_FLAGS="-R -cargs $CFLAGS -fno-strict-aliasing -largs $LDFLAGS -gargs"
+
+ make -j1 OS=unix PROCESSORS=0 BUILD=Production LIBRARY_TYPE=relocatable GPRBUILD_FLAGS="-R -cargs $ADA_FLAGS -fno-strict-aliasing -largs $LDFLAGS -lpython2.7 -lpython3.9 -gargs"
make -C docs all
}
-
package()
{
- cd "$srcdir/gps-$_gps_version-src"
+ cd "$srcdir/gps-$_upstream_ver-src"
export OS=unix
-
make DESTDIR="$pkgdir/" install
# Add the desktop config.
install -Dm644 -t "$pkgdir/usr/share/applications/" "$srcdir/gps.desktop"
+
+ # Install the license.
+ install -D -m644 \
+ "COPYING3" \
+ "$pkgdir/usr/share/licenses/$pkgname/COPYING3"
}
diff --git a/patch-filter_panels.adb b/patch-filter_panels.adb
new file mode 100644
index 000000000000..b9b02b2442d7
--- /dev/null
+++ b/patch-filter_panels.adb
@@ -0,0 +1,46 @@
+--- gps-2021-20210701-19B6B-src-pristine/kernel/src/filter_panels.adb
++++ gps-2021-20210701-19B6B-src/kernel/src/filter_panels.adb
+@@ -26,6 +26,7 @@
+ with Gtk.GEntry; use Gtk.GEntry;
+ with Gtk.Menu_Item; use Gtk.Menu_Item;
+ with Gtk.Separator_Menu_Item; use Gtk.Separator_Menu_Item;
++with Gtk.Main;
+
+ with Gtkada.Handlers; use Gtkada.Handlers;
+
+@@ -65,8 +66,7 @@
+
+ procedure On_Pattern_Config_Menu
+ (Self : access GObject_Record'Class;
+- Pos : Gtk_Entry_Icon_Position;
+- Event : Gdk_Event);
++ Pos : Gtk_Entry_Icon_Position);
+ -- Creates the popup menu to configure the filter settings.
+
+ function On_Filter_Focus_Out
+@@ -400,13 +400,13 @@
+
+ procedure On_Pattern_Config_Menu
+ (Self : access GObject_Record'Class;
+- Pos : Gtk_Entry_Icon_Position;
+- Event : Gdk_Event)
++ Pos : Gtk_Entry_Icon_Position)
+ is
+ pragma Unreferenced (Pos); -- unreliable with gtk+ 3.8
+ use Glib;
+
+ Panel : constant Filter_Panel := Filter_Panel (Self);
++ Event : constant Gdk_Event := Gtk.Main.Get_Current_Event;
+
+ procedure Func
+ (Menu : not null access Gtk_Menu_Record'Class;
+@@ -425,7 +425,7 @@
+ end Func;
+
+ begin
+- if Panel.Pattern.Get_Icon_Position (Event.Button) =
++ if Panel.Pattern.Get_Icon_Position (Event) =
+ Gtk_Entry_Icon_Primary
+ then
+ Panel.Pattern_Config_Menu.Show_All;
+
diff --git a/patch-gtkada-search_entry.adb b/patch-gtkada-search_entry.adb
new file mode 100644
index 000000000000..3929fcd06e2b
--- /dev/null
+++ b/patch-gtkada-search_entry.adb
@@ -0,0 +1,54 @@
+--- gps-2021-20210701-19B6B-src-pristine/kernel/src/gtkada-search_entry.adb
++++ gps-2021-20210701-19B6B-src/kernel/src/gtkada-search_entry.adb
+@@ -21,13 +21,13 @@
+ with Gtk.Widget; use Gtk.Widget;
+ with Gtkada.Handlers; use Gtkada.Handlers;
+ with GPS.Intl; use GPS.Intl;
++with Gtk.Main;
+
+ package body Gtkada.Search_Entry is
+
+ procedure On_Clear_Entry
+- (Self : access Gtk_Entry_Record'Class;
+- Pos : Gtk_Entry_Icon_Position;
+- Event : Gdk_Event);
++ (Self : access Gtk_Entry_Record'Class;
++ Pos : Gtk_Entry_Icon_Position);
+ -- Called when the user presses the "clear" icon
+
+ procedure On_Changed (Self : access Gtk_Widget_Record'Class);
+@@ -39,14 +39,14 @@
+
+ function Get_Icon_Position
+ (Self : access Gtkada_Search_Entry_Record'Class;
+- Event : Gdk_Event_Button) return Gtk_Entry_Icon_Position
++ Event : Gdk_Event) return Gtk_Entry_Icon_Position
+ is
+ Alloc : Gtk_Allocation;
+ Rect : Gdk_Rectangle;
+ X, Y : Gint;
+ begin
+ Self.Get_Allocation (Alloc);
+- Get_Position (Event.Window, X, Y);
++ Get_Position (Get_Window (Event), X, Y);
+
+ Self.Get_Icon_Area (Gtk_Entry_Icon_Primary, Rect);
+
+@@ -62,13 +62,12 @@
+ --------------------
+
+ procedure On_Clear_Entry
+- (Self : access Gtk_Entry_Record'Class;
+- Pos : Gtk_Entry_Icon_Position;
+- Event : Gdk_Event)
++ (Self : access Gtk_Entry_Record'Class;
++ Pos : Gtk_Entry_Icon_Position)
+ is
+ pragma Unreferenced (Pos); -- unreliable with gtk+ 3.8
+ begin
+- if Gtkada_Search_Entry (Self).Get_Icon_Position (Event.Button) =
++ if Gtkada_Search_Entry (Self).Get_Icon_Position (Gtk.Main.Get_Current_Event) =
+ Gtk_Entry_Icon_Secondary
+ then
+ Self.Set_Text ("");
+
diff --git a/patch-gtkada-search_entry.ads b/patch-gtkada-search_entry.ads
new file mode 100644
index 000000000000..21c2f2f72427
--- /dev/null
+++ b/patch-gtkada-search_entry.ads
@@ -0,0 +1,12 @@
+--- gps-2021-20210701-19B6B-src-pristine/kernel/src/gtkada-search_entry.ads
++++ gps-2021-20210701-19B6B-src/kernel/src/gtkada-search_entry.ads
+@@ -35,7 +35,7 @@
+
+ function Get_Icon_Position
+ (Self : access Gtkada_Search_Entry_Record'Class;
+- Event : Gdk_Event_Button) return Gtk_Entry_Icon_Position;
++ Event : Gdk_Event) return Gtk_Entry_Icon_Position;
+ -- Returns the icon which was clicked on.
+ -- For some reason, gtk+ always seems to return the primary icon otherwise.
+
+
diff --git a/patch-share-support-core-extensions-__init__.py b/patch-share-support-core-extensions-__init__.py
new file mode 100644
index 000000000000..a12f9a697a71
--- /dev/null
+++ b/patch-share-support-core-extensions-__init__.py
@@ -0,0 +1,9 @@
+--- share/support/core/extensions/__init__.py 2021-06-18 15:08:58.353612000 +1000
++++ share/support/core/extensions/__init__.py-new 2021-07-22 04:06:50.554067912 +1000
+@@ -1,5 +1,5 @@
+ import json
+-import urllib.request, urllib.parse, urllib.error
++import urllib
+ import GPS
+ #########################################
+ # Decorators and auto submodules import #
diff --git a/patch-share-support-core-modules.py b/patch-share-support-core-modules.py
new file mode 100644
index 000000000000..b8ba37de2a12
--- /dev/null
+++ b/patch-share-support-core-modules.py
@@ -0,0 +1,20 @@
+--- share/support/core/modules.py 2021-06-18 15:08:58.357612000 +1000
++++ share/support/core/modules.py-new 2021-07-22 02:05:16.386551000 +1000
+@@ -118,13 +118,16 @@
+ GPS.Hook("gps_started").add(Module_Metaclass.setup_all_modules)
+
+
+-class Module(object, metaclass=Module_Metaclass):
++#class Module(object, metaclass=Module_Metaclass):
++class Module(object):
+
+ """
+ A Module is a singleton, so this class also ensures that pattern is
+ followed. As a result, a Module's __init__ method is only called once.
+ """
+
++ __metaclass__ = Module_Metaclass
++
+ abstract = True
+ # Not a real module, so should never call setup()
+
diff --git a/patch-share-support-core-tool_output.py b/patch-share-support-core-tool_output.py
new file mode 100644
index 000000000000..fbf315fca678
--- /dev/null
+++ b/patch-share-support-core-tool_output.py
@@ -0,0 +1,14 @@
+--- share/support/core/tool_output.py 2021-06-18 15:08:58.357612000 +1000
++++ share/support/core/tool_output.py-new 2021-07-22 02:08:08.422285000 +1000
+@@ -52,7 +52,10 @@
+ return getattr(self, 'name', self.__name__).lower()
+
+
+-class OutputParser(object, metaclass=OutputParserMetaClass):
++#class OutputParser(object, metaclass=OutputParserMetaClass):
++class OutputParser(object):
++ __metaclass__ = OutputParserMetaClass
++
+ def __init__(self, child):
+ self.child = child
+
diff --git a/patch-share-support-ui-pygps-__init__.py b/patch-share-support-ui-pygps-__init__.py
new file mode 100644
index 000000000000..ad10883175e2
--- /dev/null
+++ b/patch-share-support-ui-pygps-__init__.py
@@ -0,0 +1,32 @@
+--- share/support/ui/pygps/__init__.py 2021-06-23 15:03:03.040414000 +1000
++++ share/support/ui/pygps/__init__.py-new 2021-07-22 02:06:52.486421000 +1000
+@@ -24,7 +24,8 @@
+
+ import GPS
+ import sys
+-from pynput.keyboard import Key, Controller
++#import pynput
++#from pynput.keyboard import Key, Controller
+
+ global last_sent_event
+ last_sent_event = None
+@@ -127,7 +128,8 @@
+ def __iter__(self):
+ return self
+
+- def __next__(self):
++ # def __next__(self):
++ def next(self):
+ # Never delete elements from self.to_traverse, otherwise pygobject
+ # will call decref on it, and it is possible that the gtk+ widget
+ # will be destroyed as a result
+@@ -176,7 +178,8 @@
+ def __iter__(self):
+ return self
+
+- def __next__(self):
++ # def __next__(self):
++ def next(self):
+ # Never delete elements from self.to_traverse, otherwise pygobject
+ # will call decref on it, and it is possible that the gtk+ widget
+ # will be destroyed as a result
diff --git a/patch-shared.gpr.in b/patch-shared.gpr.in
new file mode 100644
index 000000000000..1f17ec7f2b43
--- /dev/null
+++ b/patch-shared.gpr.in
@@ -0,0 +1,11 @@
+--- shared.gpr.in 2021-07-02 15:15:23.763371000 +1000
++++ shared.gpr.in-new 2021-07-18 05:36:29.262718754 +1000
+@@ -82,7 +82,7 @@
+ package Linker is
+ -- ??? missing hack to force libiconv first (working around
+ -- a faulty libiconv in macports)
+- for Switches ("Ada") use Clang_Libs & ("-lstdc++") & Python_shared_libs;
++ for Switches ("Ada") use Clang_Libs & ("-lstdc++", "-lpython2.7", "-lpython3.9") & Python_shared_libs;
+
+ case OS is
+ when "osx" =>