summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRod Kay2021-08-15 01:20:20 +1000
committerRod Kay2021-08-15 01:21:10 +1000
commit4952cb8dcf1d252c5b7e65b491bac8529f04bd1a (patch)
tree29f05825becb8b8fa203002f1fcea8ca732332b4
parentaa23f776a135651b23abc85cdbce6ce9fac3b031 (diff)
downloadaur-4952cb8dcf1d252c5b7e65b491bac8529f04bd1a.tar.gz
Fix bugs when using gcc-11.
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD24
-rw-r--r--patch-sdl-video-palettes.ads11
-rw-r--r--patch-sdl-video-pixel_formats.ads12
4 files changed, 48 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 802b346a51c4..190613687e94 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,19 @@
pkgbase = sdlada
pkgdesc = An Ada binding to SDL
pkgver = 2.5.3
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/Lucretia/sdlada/
arch = i686
arch = x86_64
license = zlib
depends = gcc-ada
depends = sdl2_ttf
+ depends = sdl2_image
source = https://github.com/Lucretia/sdlada/archive/v2.5.3.tar.gz
+ source = patch-sdl-video-pixel_formats.ads
+ source = patch-sdl-video-palettes.ads
md5sums = 8d0245cb6c03db3ed136c012d4cc9055
+ md5sums = db308de4a3297e497415b89e0aadbed4
+ md5sums = 0ec6787e90fe1022270a78f3b5320e42
pkgname = sdlada
-
diff --git a/PKGBUILD b/PKGBUILD
index c038488e26b4..bed7ffa752cd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,18 +1,32 @@
-# Contributor: Rod Kay <charlie5 on #ada at freenode.net>
+# Maintainer: Rod Kay <rodakay5 at gnmail.com
pkgname=sdlada
pkgver=2.5.3
-pkgrel=1
+pkgrel=2
pkgdesc="An Ada binding to SDL"
arch=('i686' 'x86_64')
url="https://github.com/Lucretia/sdlada/"
license=('zlib')
-depends=("gcc-ada" "sdl2_ttf")
+depends=("gcc-ada" "sdl2_ttf" "sdl2_image")
-source=(https://github.com/Lucretia/sdlada/archive/v$pkgver.tar.gz)
-md5sums=('8d0245cb6c03db3ed136c012d4cc9055')
+source=(https://github.com/Lucretia/sdlada/archive/v$pkgver.tar.gz
+ patch-sdl-video-pixel_formats.ads
+ patch-sdl-video-palettes.ads)
+
+md5sums=('8d0245cb6c03db3ed136c012d4cc9055'
+ 'db308de4a3297e497415b89e0aadbed4'
+ '0ec6787e90fe1022270a78f3b5320e42')
+
+
+prepare()
+{
+ cd $srcdir/$pkgname-$pkgver
+
+ patch -Np0 -i ../patch-sdl-video-pixel_formats.ads
+ patch -Np0 -i ../patch-sdl-video-palettes.ads
+}
build()
diff --git a/patch-sdl-video-palettes.ads b/patch-sdl-video-palettes.ads
new file mode 100644
index 000000000000..e3e2643493d6
--- /dev/null
+++ b/patch-sdl-video-palettes.ads
@@ -0,0 +1,11 @@
+--- ./src/sdl-video-palettes.ads 2020-06-17 01:27:26.000000000 +1000
++++ ./src/sdl-video-palettes.ads-new 2021-08-15 01:13:17.306319118 +1000
+@@ -121,7 +121,7 @@
+ Data : Internal_Palette_Access;
+ end record;
+
+- type Palette_Constant_Access is access constant Palette;
++ type Palette_Constant_Access is access constant Palette'Class;
+
+ type Cursor is
+ record
diff --git a/patch-sdl-video-pixel_formats.ads b/patch-sdl-video-pixel_formats.ads
new file mode 100644
index 000000000000..56444958ed4a
--- /dev/null
+++ b/patch-sdl-video-pixel_formats.ads
@@ -0,0 +1,12 @@
+--- ./src/sdl-video-pixel_formats.ads 2020-06-17 01:27:26.000000000 +1000
++++ ./src/sdl-video-pixel_formats.ads-new 2021-08-15 01:06:01.298705154 +1000
+@@ -653,8 +653,7 @@
+
+ -- This is mainly padding to make sure the record size matches what is expected from C.
+ Private_Part : Private_Pixel_Format;
+- end record with
+- Convention => C;
++ end record;
+
+ -- TODO: Possibly change this to a controlled type.
+ type Pixel_Format_Access is access all Pixel_Format with