diff options
author | Rod Kay | 2023-06-09 17:15:24 +1000 |
---|---|---|
committer | Rod Kay | 2023-06-09 17:15:24 +1000 |
commit | 2aeb6dd04d139611f03811eb668fecda662ab913 (patch) | |
tree | 3eb9105951e2ab61002aa62c2f4880e4dc2d994c | |
download | aur-2aeb6dd04d139611f03811eb668fecda662ab913.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 33 | ||||
-rw-r--r-- | 0003-Honour-DESTDIR-in-installation-targets.patch | 43 | ||||
-rw-r--r-- | PKGBUILD | 96 | ||||
-rw-r--r-- | gps.desktop | 8 | ||||
-rw-r--r-- | patch-dap.gpr | 11 |
5 files changed, 191 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..33088d8bf327 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,33 @@ +pkgbase = gnatstudio + pkgdesc = GNAT Programming Studio for Ada. + pkgver = 24.0w + pkgrel = 1 + epoch = 1 + url = https://github.com/AdaCore/gps + arch = i686 + arch = x86_64 + license = GPL + makedepends = gprbuild + makedepends = texlive-latexextra + makedepends = graphviz + depends = clang + depends = ada_language_server + depends = gnatcoll-python + depends = gnatcoll-xref + depends = gnatcoll-db2ada + depends = gtkada + depends = python-gobject + depends = python-cairo + depends = python-yaml + conflicts = gnat-gps + conflicts = gnatstudio-bin + source = file:///opt/gnatstudio-sources/gnatstudio-24.0w-20230428-16588-src.tar.gz + source = 0003-Honour-DESTDIR-in-installation-targets.patch + source = patch-dap.gpr + source = gps.desktop + sha256sums = ae17d963f063657fe665be243362eccb6b3f122fe846fe64dd1270775120fb52 + sha256sums = 5607c451dbf63dba346eeb2ef602a86321d310bdfb6ef777870bb32761b596d5 + sha256sums = b4701fa61cdd64f2fb689e68de06e209d2bb809fd5d98d81d9ccd7a77c6caff8 + sha256sums = e21894fc1a0fbc90c25b0c524969703d685f283adc09225744d9013de3b00533 + +pkgname = gnatstudio diff --git a/0003-Honour-DESTDIR-in-installation-targets.patch b/0003-Honour-DESTDIR-in-installation-targets.patch new file mode 100644 index 000000000000..303d220e6768 --- /dev/null +++ b/0003-Honour-DESTDIR-in-installation-targets.patch @@ -0,0 +1,43 @@ +From 60e49aa020efbb58a81c1e1cfbec90b59bb33272 Mon Sep 17 00:00:00 2001 +From: Xiretza <xiretza@xiretza.xyz> +Date: Sun, 24 May 2020 11:23:29 +0200 +Subject: [PATCH 3/5] Honour DESTDIR= in installation targets + +--- + Makefile.in | 6 +++--- + docs/Makefile.in | 4 ++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index da439c1629..18be4f7699 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -11,9 +11,9 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_DATA = @INSTALL_DATA@ + GNATCOLL_INSTALL = @GNATCOLL_INSTALL@ + prefix = @prefix@ +-bindir = $(prefix)/bin +-sharedir = $(prefix)/share +-examplesdir = $(prefix)/share/examples/gnatstudio ++bindir = $(DESTDIR)$(prefix)/bin ++sharedir = $(DESTDIR)$(prefix)/share ++examplesdir = $(DESTDIR)$(prefix)/share/examples/gnatstudio + + SYS := $(shell gcc -dumpmachine) + +diff --git a/docs/Makefile.in b/docs/Makefile.in +index 34f3d0aee8..16e273e7f7 100644 +--- a/docs/Makefile.in ++++ b/docs/Makefile.in +@@ -1,6 +1,6 @@ + prefix = @prefix@ +-docdir = $(prefix)/share/doc/gnatstudio +-sharedir = $(prefix)/share/gnatstudio ++docdir = $(DESTDIR)$(prefix)/share/doc/gnatstudio ++sharedir = $(DESTDIR)$(prefix)/share/gnatstudio + + MKDIR = mkdir -p + INSTALL = @INSTALL@ +-- +2.26.2 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..fe24310c3f77 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,96 @@ +# 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> + +epoch=1 + +pkgname=gnatstudio +pkgver=24.0w +pkgrel=1 +pkgdesc='GNAT Programming Studio for Ada.' + +arch=(i686 x86_64) +url=https://github.com/AdaCore/gps +license=(GPL) + +conflicts=(gnat-gps gnatstudio-bin) + +depends=(clang + ada_language_server + gnatcoll-python + gnatcoll-xref + gnatcoll-db2ada + gtkada + python-gobject + python-cairo + python-yaml) + +makedepends=(gprbuild + texlive-latexextra + graphviz) + +source=(file:///opt/gnatstudio-sources/$pkgname-$pkgver-20230428-16588-src.tar.gz + 0003-Honour-DESTDIR-in-installation-targets.patch + patch-dap.gpr + gps.desktop) + +sha256sums=(ae17d963f063657fe665be243362eccb6b3f122fe846fe64dd1270775120fb52 + 5607c451dbf63dba346eeb2ef602a86321d310bdfb6ef777870bb32761b596d5 + b4701fa61cdd64f2fb689e68de06e209d2bb809fd5d98d81d9ccd7a77c6caff8 + e21894fc1a0fbc90c25b0c524969703d685f283adc09225744d9013de3b00533) + + +prepare() +{ + cd $srcdir/$pkgname-$pkgver-20230428-16588-src + + patch -p1 < $srcdir/0003-Honour-DESTDIR-in-installation-targets.patch + patch -p0 < $srcdir/patch-dap.gpr +} + + +build() +{ + cd $srcdir/$pkgname-$pkgver-20230428-16588-src + + export OS=unix + + ./configure --prefix=/usr + + # The release tarball contains a bunch of sphinx build artefacts. + 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 + + export BUILD=Production + make -j32 OS=unix PROCESSORS=0 BUILD=Production PRJ_BUILD=Release LIBRARY_TYPE=relocatable GPRBUILD_FLAGS="-R -cargs $ADA_FLAGS -fno-strict-aliasing -largs $LDFLAGS -lpython3.11 -gargs" + +# make -C docs all ### Docs are currently broken. +} + + +package() +{ + cd $srcdir/$pkgname-$pkgver-20230428-16588-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 +}
\ No newline at end of file diff --git a/gps.desktop b/gps.desktop new file mode 100644 index 000000000000..e57bac492fbe --- /dev/null +++ b/gps.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=GNAT Studio (GPS) +Exec=gnatstudio +Icon=/usr/share/gnatstudio/icons/hicolor/32x32/apps/gnatstudio_logo.png +Terminal=false +Categories=Development;Languages;Ada; diff --git a/patch-dap.gpr b/patch-dap.gpr new file mode 100644 index 000000000000..6fb4a806dea9 --- /dev/null +++ b/patch-dap.gpr @@ -0,0 +1,11 @@ +--- dap/dap.gpr-orig 2022-10-07 00:20:05.000000000 +1100 ++++ dap/dap.gpr 2022-11-22 14:27:09.005758016 +1100 +@@ -7,7 +7,7 @@ + with "../views/views"; + with "../browsers/browsers"; + with "../gvd/gvd"; +-with "../subprojects/VSS/gnat/vss_text"; ++with "vss_text"; + + project DAP is + |