summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/akonadi-search/APKBUILD2
-rw-r--r--user/aspell-dict-lv/APKBUILD2
-rw-r--r--user/assimp/01-rm-revision-test.patch14
-rw-r--r--user/assimp/APKBUILD6
-rw-r--r--user/awesome/APKBUILD11
-rw-r--r--user/awesome/gcc10.patch236
-rw-r--r--user/bash-completion/APKBUILD4
-rw-r--r--user/bash-completion/gcc-x86-tests.patch22
-rw-r--r--user/clazy/APKBUILD4
-rw-r--r--user/clearsans/APKBUILD2
-rw-r--r--user/cups-filters/APKBUILD12
-rw-r--r--user/dhcpcd/APKBUILD6
-rw-r--r--user/digikam/APKBUILD6
-rw-r--r--user/digikam/isdigit.patch12
-rw-r--r--user/dovecot/APKBUILD11
-rw-r--r--user/elixir/APKBUILD4
-rw-r--r--user/erl-rebar3/APKBUILD4
-rw-r--r--user/erlang/APKBUILD12
-rw-r--r--user/firefox-esr/APKBUILD10
-rw-r--r--user/firefox-esr/gcc13.patch10
-rw-r--r--user/fluxbox/APKBUILD9
-rw-r--r--user/fluxbox/modern-c.patch25
-rw-r--r--user/freeglut/APKBUILD8
-rw-r--r--user/gdbm/APKBUILD4
-rw-r--r--user/gitlab-runner/APKBUILD29
-rw-r--r--user/gitlab-runner/clean-tmpdirs.patch21
-rw-r--r--user/gitlab-runner/disable-crap.patch7
-rw-r--r--user/gitlab-runner/fix-multiple-redef-seek.patch38
-rw-r--r--user/gitlab-runner/gccgo.patch60
-rw-r--r--user/gitlab-runner/posix-shell-escape.patch139
-rw-r--r--user/gitlab-runner/posix-shell.patch30
-rw-r--r--user/gitlab-runner/tests.patch47
-rw-r--r--user/glm/APKBUILD20
-rw-r--r--user/gnucobol/APKBUILD2
-rw-r--r--user/gprbuild/APKBUILD25
-rw-r--r--user/grfcodec/APKBUILD26
-rw-r--r--user/grfcodec/va_copy.patch16
-rw-r--r--user/gsl/APKBUILD12
-rw-r--r--user/gsl/static-inline.patch12
-rw-r--r--user/gst-plugins-bad/APKBUILD6
-rw-r--r--user/gst-plugins-bad/fix-arm-parser-alignment.patch32
-rw-r--r--user/horizon/APKBUILD2
-rw-r--r--user/htop/APKBUILD29
-rw-r--r--user/htop/correctness.patch78
-rw-r--r--user/htop/fix-python-path.patch8
-rw-r--r--user/i3lock/APKBUILD29
-rw-r--r--user/ifupdown-ng/APKBUILD110
-rw-r--r--user/ifupdown-ng/ifupdown-ng.initd91
-rw-r--r--user/kaffeine/APKBUILD2
-rw-r--r--user/libetonyek/APKBUILD6
-rw-r--r--user/libgnt/APKBUILD10
-rw-r--r--user/libgnt/ncurses.patch62
-rw-r--r--user/libgphoto2/APKBUILD4
-rw-r--r--user/libixion/APKBUILD15
-rw-r--r--user/liblbxutil/APKBUILD9
-rw-r--r--user/liblbxutil/gcc10.patch18
-rw-r--r--user/libmspub/APKBUILD9
-rw-r--r--user/libmspub/missing-header.patch10
-rw-r--r--user/libnatpmp/APKBUILD4
-rw-r--r--user/libnih/APKBUILD6
-rw-r--r--user/libnih/gcc10.patch15
-rw-r--r--user/liborcus/APKBUILD15
-rw-r--r--user/libpfm/APKBUILD6
-rw-r--r--user/libplist/APKBUILD3
-rw-r--r--user/libptytty/APKBUILD43
-rw-r--r--user/libptytty/force-utmps.patch12
-rw-r--r--user/libstaroffice/APKBUILD9
-rw-r--r--user/libstaroffice/mistake.patch22
-rw-r--r--user/lilo/APKBUILD4
-rw-r--r--user/lilo/gcc10.patch51
-rw-r--r--user/llvm14/APKBUILD23
-rw-r--r--user/llvm14/graph-diff-simple.txt238
-rw-r--r--user/llvm14/musl-ppc64-elfv2.patch2
-rw-r--r--user/llvm14/ppc-gcc-bug.patch22
-rw-r--r--user/llvm18/APKBUILD328
-rw-r--r--user/llvm18/disable-FileSystemTest.CreateDir-perms-assert.patch61
-rw-r--r--user/llvm18/dwarf-info.patch28
-rw-r--r--user/llvm18/dyld-elf-ppc32.patch24
-rw-r--r--user/llvm18/hexagon.patch95
-rw-r--r--user/llvm18/i586-json-test.patch19
-rw-r--r--user/llvm18/llvm-fix-build-with-musl-libc.patch46
-rw-r--r--user/llvm18/m68k-endianness.patch26
-rw-r--r--user/llvm18/macho32.patch17
-rw-r--r--user/llvm18/musl-ppc64-elfv2.patch28
-rw-r--r--user/llvm18/ppc-gcc-bug.patch22
-rw-r--r--user/llvm18/python3-test.patch8
-rw-r--r--user/llvm18/roundeven.patch49
-rw-r--r--user/mariadb/APKBUILD4
-rw-r--r--user/mariadb/missing-header.patch12
-rw-r--r--user/mbedtls/APKBUILD9
-rw-r--r--user/mbedtls/fix-big-endian-alignment-tests.patch313
-rw-r--r--user/mdadm/0001-udev.c-Do-not-require-libudev.h-if-DNO_LIBUDEV.patch28
-rw-r--r--user/mdadm/APKBUILD18
-rw-r--r--user/mdadm/falloc.patch41
-rw-r--r--user/mdadm/missing-header.patch29
-rw-r--r--user/mdadm/sysmacros.patch31
-rw-r--r--user/mdadm/time64.patch2
-rw-r--r--user/mdds/APKBUILD13
-rw-r--r--user/menu-cache/APKBUILD9
-rw-r--r--user/menu-cache/gcc10.patch103
-rw-r--r--user/mesa/APKBUILD11
-rw-r--r--user/mesa/llvm-opaque.patch8467
-rw-r--r--user/mesa/llvm18.patch397
-rw-r--r--user/mimetic/APKBUILD10
-rw-r--r--user/mimetic/nullptr.patch11
-rw-r--r--user/minicom/APKBUILD4
-rw-r--r--user/miniupnpc/APKBUILD4
-rw-r--r--user/mosh/APKBUILD10
-rw-r--r--user/mosh/fix-ppc64le-build-with-musl.patch53
-rw-r--r--user/ncftp/APKBUILD8
-rw-r--r--user/olm/APKBUILD4
-rw-r--r--user/open-vm-tools/APKBUILD4
-rw-r--r--user/open-vm-tools/time64.patch58
-rw-r--r--user/openal-soft/APKBUILD8
-rw-r--r--user/opencv/APKBUILD9
-rw-r--r--user/opencv/fix-headers.manual-patch12
-rw-r--r--user/openttd/APKBUILD2
-rw-r--r--user/openvpn/APKBUILD4
-rw-r--r--user/perl-extutils-cppguess/APKBUILD9
-rw-r--r--user/perl-extutils-cppguess/fix.patch60
-rw-r--r--user/phonon-vlc/APKBUILD2
-rw-r--r--user/pidgin/APKBUILD10
-rw-r--r--user/pidgin/pidgin-2.14.8-libpurple_test_fix.patch52
-rw-r--r--user/postfix/APKBUILD12
-rw-r--r--user/postfix/honour-config-directory.patch2
-rw-r--r--user/postfix/linux-6.patch24
-rw-r--r--user/qca/APKBUILD11
-rw-r--r--user/qca/gcc11.patch26
-rw-r--r--user/qca/test.patch77
-rw-r--r--user/qt-creator/APKBUILD10
-rw-r--r--user/qt-creator/cstdint.patch27
-rw-r--r--user/qt5-qtbase/APKBUILD2
-rw-r--r--user/qt5-qtwebkit/APKBUILD4
-rw-r--r--user/qt5-qtwebkit/missing-header.patch11
-rw-r--r--user/quassel/APKBUILD29
-rw-r--r--user/range-v3/APKBUILD4
-rw-r--r--user/readstat/APKBUILD13
-rw-r--r--user/readstat/big-endian.patch76
-rw-r--r--user/readstat/buf-overflow.patch26
-rw-r--r--user/readstat/use-after-free.patch37
-rw-r--r--user/redis/APKBUILD4
-rw-r--r--user/rspamd/10-conf-split-workers.patch2
-rw-r--r--user/rspamd/APKBUILD13
-rw-r--r--user/rttr/APKBUILD16
-rw-r--r--user/rttr/clang.patch141
-rw-r--r--user/rttr/gcc9.patch103
-rw-r--r--user/rttr/header.patch21
-rw-r--r--user/rttr/no-pessimising-moves.patch65
-rw-r--r--user/rttr/show-warnings-not-error-out.patch16
-rw-r--r--user/rxvt-unicode/APKBUILD16
-rw-r--r--user/rxvt-unicode/kerning.patch2
-rw-r--r--user/sane/APKBUILD19
-rw-r--r--user/sane/BTS-304.patch6
-rw-r--r--user/sane/endian.patch26
-rw-r--r--user/sane/network.patch6
-rw-r--r--user/sane/pidfile.patch2
-rw-r--r--user/seatd/APKBUILD19
-rw-r--r--user/squashfs-tools/APKBUILD15
-rw-r--r--user/squashfs-tools/fix-compat.patch28
-rw-r--r--user/strongswan/APKBUILD1
-rw-r--r--user/supertux/APKBUILD6
-rw-r--r--user/supertux/zip-header.patch30
-rw-r--r--user/swig/APKBUILD15
-rw-r--r--user/swig/fix-overload-simple-cast-test.patch23
-rw-r--r--user/the_silver_searcher/APKBUILD14
-rw-r--r--user/the_silver_searcher/no-common.patch207
-rw-r--r--user/the_silver_searcher/pattern-fix.patch78
-rw-r--r--user/the_silver_searcher/pipe-symlink.patch26
-rw-r--r--user/thunderbird/APKBUILD8
-rw-r--r--user/thunderbird/gcc13.patch10
-rw-r--r--user/v4l-utils/APKBUILD54
-rw-r--r--user/v4l-utils/getsubopt.patch35
-rw-r--r--user/v4l-utils/qv4l2.desktop12
-rw-r--r--user/v4l-utils/qv4l2.svg31
-rw-r--r--user/v4l-utils/time64.patch11
-rw-r--r--user/v4l-utils/types.patch26
-rw-r--r--user/vlc/APKBUILD7
-rw-r--r--user/volume_key/APKBUILD6
-rw-r--r--user/vte/APKBUILD6
-rw-r--r--user/vte/gcc-volatile.patch45
-rw-r--r--user/wget/APKBUILD4
-rw-r--r--user/x11vnc/APKBUILD8
-rw-r--r--user/x11vnc/gcc10.patch42
-rw-r--r--user/xapian-core/APKBUILD9
-rw-r--r--user/xapian-core/sortable-serialise.patch15
-rw-r--r--user/xf86-video-amdgpu/APKBUILD6
-rw-r--r--user/xf86-video-ati/APKBUILD11
-rw-r--r--user/xf86-video-ati/null-deref-exa.patch77
-rw-r--r--user/xf86-video-geode/APKBUILD11
-rw-r--r--user/xf86-video-geode/loader.patch48
-rw-r--r--user/xf86-video-geode/randr.patch30
-rw-r--r--user/xf86-video-intel/APKBUILD7
-rw-r--r--user/xf86-video-intel/fno-common.patch24
-rw-r--r--user/xf86-video-openchrome/APKBUILD1
-rw-r--r--user/xf86-video-vmware/APKBUILD11
-rw-r--r--user/xmoto/APKBUILD4
-rw-r--r--user/xorg-server/APKBUILD8
-rw-r--r--user/xorg-server/gcc12.patch89
-rw-r--r--user/xorg-server/rgb-mask.patch70
-rw-r--r--user/xsane/APKBUILD2
-rw-r--r--user/yubikey-personalization/APKBUILD10
-rw-r--r--user/yubikey-personalization/gcc10.patch25
-rw-r--r--user/yubikey-personalization/uninit.patch204
-rw-r--r--user/yubikey-personalization/wipe-mem.patch29
-rw-r--r--user/zola/APKBUILD754
205 files changed, 13195 insertions, 2363 deletions
diff --git a/user/akonadi-search/APKBUILD b/user/akonadi-search/APKBUILD
index bf40009de..a514ca634 100644
--- a/user/akonadi-search/APKBUILD
+++ b/user/akonadi-search/APKBUILD
@@ -34,7 +34,7 @@ build() {
check() {
# sqlite backend requires D-Bus server.
- QT_QPA_PLATFORM=offscreen CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E 'akonadi-sqlite*'
+ QT_QPA_PLATFORM=offscreen CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E 'akonadi-sqlite*|akonadi-pgsql*'
}
package() {
diff --git a/user/aspell-dict-lv/APKBUILD b/user/aspell-dict-lv/APKBUILD
index 0713ce0f1..455d07b9d 100644
--- a/user/aspell-dict-lv/APKBUILD
+++ b/user/aspell-dict-lv/APKBUILD
@@ -10,7 +10,7 @@ options="!check" # No test suite.
license="GPL-2.0-only"
depends="aspell"
makedepends="cmd:which"
-source="https://dict.dv.lv/download/aspell6-lv-$pkgver.tar.bz2"
+source="https://distfiles.adelielinux.org/source/archive/$pkgname-$pkgver/aspell6-lv-$pkgver.tar.bz2"
builddir="$srcdir/aspell6-lv-$pkgver"
build() {
diff --git a/user/assimp/01-rm-revision-test.patch b/user/assimp/01-rm-revision-test.patch
deleted file mode 100644
index 47a2a61fe..000000000
--- a/user/assimp/01-rm-revision-test.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- assimp-5.0.0/test/unit/utVersion.cpp.orig 2019-10-27 02:51:11.128925442 +0000
-+++ assimp-5.0.0/test/unit/utVersion.cpp 2019-10-27 02:54:22.554333936 +0000
-@@ -66,9 +66,9 @@
- EXPECT_NE( aiGetCompileFlags(), 0U );
- }
-
--TEST_F( utVersion, aiGetVersionRevisionTest ) {
-+/*TEST_F( utVersion, aiGetVersionRevisionTest ) {
- EXPECT_NE( aiGetVersionRevision(), 0U );
--}
-+}*/
-
- TEST_F( utVersion, aiGetBranchNameTest ) {
- EXPECT_NE( nullptr, aiGetBranchName() );
diff --git a/user/assimp/APKBUILD b/user/assimp/APKBUILD
index 8d65667ee..da9d6cca1 100644
--- a/user/assimp/APKBUILD
+++ b/user/assimp/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Russ Webber <russ@rw.id.au>
# Maintainer: Zach van Rijn <me@zv.io>
pkgname=assimp
-pkgver=5.2.5
+pkgver=5.4.1
pkgrel=0
pkgdesc="Open Asset Import Library imports and exports 3D model formats"
url="http://www.assimp.org/"
@@ -11,7 +11,6 @@ depends=""
makedepends="cmake minizip-dev zlib-dev"
subpackages="$pkgname-dev"
source="https://github.com/assimp/assimp/archive/v$pkgver/assimp-v$pkgver.tar.gz
- 01-rm-revision-test.patch
05-remove-failing-x86-test.patch
"
@@ -33,6 +32,5 @@ package() {
make -C build DESTDIR="$pkgdir" install
rm -vf "$pkgdir"/usr/lib/libIrrXML.a
}
-sha512sums="ac0dc4243f9d1ff077966f0037187b4374075ac97e75e1a3cd6bdc1caf5f8e4d40953d9a8a316480969c09524d87daa9d3ed75e6ac6f037dd5b1c5f25fce3afb assimp-v5.2.5.tar.gz
-535a80c5899a2994735e7b17b4e3fdb3ff2b53e64c09ec8fcab1dbcea2ad696fed50aeb1667a3c4e00a8a3ddf411d33ec1d36fcb256e26f02cf951f0e2c83a73 01-rm-revision-test.patch
+sha512sums="980db331ca39950359db116d36968b87f5fea4b470be52960dd983e2ec232e019cae754819182b63a095a13b1d98364d64bd02ac29db1ea4f627d095a03da742 assimp-v5.4.1.tar.gz
bfb321b8493b2ef8c35ab0627173d0f1754519e9bae6f6c59cc164aaf91a07d8ae382fbc92550cfab6f52502565390ba22b7478efa5bba008eec0aa075c5e7d1 05-remove-failing-x86-test.patch"
diff --git a/user/awesome/APKBUILD b/user/awesome/APKBUILD
index 9d58ed199..0029587b0 100644
--- a/user/awesome/APKBUILD
+++ b/user/awesome/APKBUILD
@@ -4,9 +4,9 @@
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=awesome
pkgver=4.3
-pkgrel=0
+pkgrel=1
pkgdesc="lua-configurable window manager framework"
-url="http://awesome.naquadah.org/"
+url="https://awesomewm.org"
arch="all"
options="!check" # Tests require X and D-Bus
license="GPL-2.0+"
@@ -18,7 +18,9 @@ makedepends="lua5.3 lua5.3-dev libxcb-dev pango-dev cairo-dev cmake gperf glib-d
dbus-dev gdk-pixbuf-dev xcb-util-cursor-dev libxkbcommon-dev
xcb-util-xrm-dev libexecinfo-dev xmlto"
subpackages="$pkgname-doc"
-source="https://github.com/awesomeWM/$pkgname-releases/raw/master/$pkgname-$pkgver.tar.xz"
+source="https://github.com/awesomeWM/$pkgname-releases/raw/master/$pkgname-$pkgver.tar.xz
+ gcc10.patch
+ "
build() {
# Awesome does not support in-tree builds
@@ -39,4 +41,5 @@ package() {
make DESTDIR="$pkgdir" -C build install
}
-sha512sums="c5ef1e8dc593e7783b895d22143154aea8f211beeda24672a7ee4ed5112b4f4284043f848a151f3d3c4f569e91308670367a4353f705b20511b36495b22fa3f5 awesome-4.3.tar.xz"
+sha512sums="c5ef1e8dc593e7783b895d22143154aea8f211beeda24672a7ee4ed5112b4f4284043f848a151f3d3c4f569e91308670367a4353f705b20511b36495b22fa3f5 awesome-4.3.tar.xz
+cc0aa85c42eff24ff2599673cc41058c04ec265d153ebecdb7a038d638500389da34a2063c3ce4e04b0f78f8972b9e5c3b793c46a37feeeef5505909ef8167f8 gcc10.patch"
diff --git a/user/awesome/gcc10.patch b/user/awesome/gcc10.patch
new file mode 100644
index 000000000..f1d0c3404
--- /dev/null
+++ b/user/awesome/gcc10.patch
@@ -0,0 +1,236 @@
+From d256d9055095f27a33696e0aeda4ee20ed4fb1a0 Mon Sep 17 00:00:00 2001
+From: Reiner Herrmann <reiner@reiner-h.de>
+Date: Fri, 17 Apr 2020 19:25:40 +0200
+Subject: [PATCH] Move variable declarations from header to C file to fix build
+ with GCC 10
+
+GCC 10 builds with -fno-common by default, which causes linker errors when
+variables are declared in header files and included in multiple places.
+
+See also: https://gcc.gnu.org/gcc-10/porting_to.html
+---
+ common/lualib.c | 2 ++
+ common/lualib.h | 2 +-
+ luaa.c | 2 ++
+ luaa.h | 2 +-
+ objects/button.c | 2 ++
+ objects/button.h | 2 +-
+ objects/client.c | 2 ++
+ objects/client.h | 2 +-
+ objects/drawin.c | 2 ++
+ objects/drawin.h | 2 +-
+ objects/key.c | 2 ++
+ objects/key.h | 2 +-
+ objects/tag.c | 2 ++
+ objects/tag.h | 2 +-
+ objects/window.c | 1 +
+ objects/window.h | 2 +-
+ 16 files changed, 23 insertions(+), 8 deletions(-)
+
+diff --git a/common/lualib.c b/common/lualib.c
+index 312fb2d594..bb110ac716 100644
+--- a/common/lualib.c
++++ b/common/lualib.c
+@@ -20,6 +20,8 @@
+ #include "common/lualib.h"
+ #include "luaa.h"
+
++lua_CFunction lualib_dofunction_on_error;
++
+ void luaA_checkfunction(lua_State *L, int idx)
+ {
+ if(!lua_isfunction(L, idx))
+diff --git a/common/lualib.h b/common/lualib.h
+index 8a3ef089d7..a91261843c 100644
+--- a/common/lualib.h
++++ b/common/lualib.h
+@@ -28,7 +28,7 @@
+ #include "common/util.h"
+
+ /** Lua function to call on dofunction() error */
+-lua_CFunction lualib_dofunction_on_error;
++extern lua_CFunction lualib_dofunction_on_error;
+
+ void luaA_checkfunction(lua_State *, int);
+ void luaA_checktable(lua_State *, int);
+diff --git a/luaa.c b/luaa.c
+index 419a8c2eb2..aeaba9cd1f 100644
+--- a/luaa.c
++++ b/luaa.c
+@@ -91,6 +91,8 @@ extern const struct luaL_Reg awesome_mouse_meta[];
+ extern const struct luaL_Reg awesome_root_methods[];
+ extern const struct luaL_Reg awesome_root_meta[];
+
++signal_array_t global_signals;
++
+ /** A call into the Lua code aborted with an error.
+ *
+ * This signal is used in the example configuration, @{05-awesomerc.md},
+diff --git a/luaa.h b/luaa.h
+index e159258348..d26c437691 100644
+--- a/luaa.h
++++ b/luaa.h
+@@ -317,7 +317,7 @@ const char *luaA_find_config(xdgHandle *, const char *, luaA_config_callback *);
+ bool luaA_parserc(xdgHandle *, const char *);
+
+ /** Global signals */
+-signal_array_t global_signals;
++extern signal_array_t global_signals;
+
+ int luaA_class_index_miss_property(lua_State *, lua_object_t *);
+ int luaA_class_newindex_miss_property(lua_State *, lua_object_t *);
+diff --git a/objects/button.c b/objects/button.c
+index 892347a928..5ffdcd4432 100644
+--- a/objects/button.c
++++ b/objects/button.c
+@@ -35,6 +35,8 @@
+
+ #include "button.h"
+
++lua_class_t button_class;
++
+ /** Button object.
+ *
+ * @tfield int button The mouse button number, or 0 for any button.
+diff --git a/objects/button.h b/objects/button.h
+index fb8bb8da28..8f0b894305 100644
+--- a/objects/button.h
++++ b/objects/button.h
+@@ -39,7 +39,7 @@ typedef struct button_t
+ xcb_button_t button;
+ } button_t;
+
+-lua_class_t button_class;
++extern lua_class_t button_class;
+ LUA_OBJECT_FUNCS(button_class, button_t, button)
+ ARRAY_FUNCS(button_t *, button, DO_NOTHING)
+
+diff --git a/objects/client.c b/objects/client.c
+index 7b2d3a2022..b617a9e7a9 100644
+--- a/objects/client.c
++++ b/objects/client.c
+@@ -106,6 +106,8 @@
+ #include <xcb/shape.h>
+ #include <cairo-xcb.h>
+
++lua_class_t client_class;
++
+ /** Client class.
+ *
+ * This table allow to add more dynamic properties to the clients. For example,
+diff --git a/objects/client.h b/objects/client.h
+index 74a23131c5..387e7c2aea 100644
+--- a/objects/client.h
++++ b/objects/client.h
+@@ -192,7 +192,7 @@ struct client_t
+ ARRAY_FUNCS(client_t *, client, DO_NOTHING)
+
+ /** Client class */
+-lua_class_t client_class;
++extern lua_class_t client_class;
+
+ LUA_OBJECT_FUNCS(client_class, client_t, client)
+
+diff --git a/objects/drawin.c b/objects/drawin.c
+index 3fd1cc4350..3bbd93179c 100644
+--- a/objects/drawin.c
++++ b/objects/drawin.c
+@@ -46,6 +46,8 @@
+ #include <cairo-xcb.h>
+ #include <xcb/shape.h>
+
++lua_class_t drawin_class;
++
+ /** Drawin object.
+ *
+ * @field border_width Border width.
+diff --git a/objects/drawin.h b/objects/drawin.h
+index 31f315aac5..2f8887d944 100644
+--- a/objects/drawin.h
++++ b/objects/drawin.h
+@@ -52,7 +52,7 @@ void luaA_drawin_systray_kickout(lua_State *);
+
+ void drawin_class_setup(lua_State *);
+
+-lua_class_t drawin_class;
++extern lua_class_t drawin_class;
+
+ #endif
+ // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
+diff --git a/objects/key.c b/objects/key.c
+index c42f7446d8..365ba998cc 100644
+--- a/objects/key.c
++++ b/objects/key.c
+@@ -43,6 +43,8 @@
+ #include <xkbcommon/xkbcommon.h>
+ #include <glib.h>
+
++lua_class_t key_class;
++
+ /** Key object.
+ *
+ * @tfield string key The key to trigger an event.
+diff --git a/objects/key.h b/objects/key.h
+index 8aa07ffe3d..45f23cac79 100644
+--- a/objects/key.h
++++ b/objects/key.h
+@@ -36,7 +36,7 @@ typedef struct keyb_t
+ xcb_keycode_t keycode;
+ } keyb_t;
+
+-lua_class_t key_class;
++extern lua_class_t key_class;
+ LUA_OBJECT_FUNCS(key_class, keyb_t, key)
+ DO_ARRAY(keyb_t *, key, DO_NOTHING)
+
+diff --git a/objects/tag.c b/objects/tag.c
+index a0050cc2a9..1b1a135762 100644
+--- a/objects/tag.c
++++ b/objects/tag.c
+@@ -203,6 +203,8 @@
+ #include "ewmh.h"
+ #include "luaa.h"
+
++lua_class_t tag_class;
++
+ /**
+ * @signal request::select
+ */
+diff --git a/objects/tag.h b/objects/tag.h
+index d6bb40e0d8..f830b1e2c5 100644
+--- a/objects/tag.h
++++ b/objects/tag.h
+@@ -46,7 +46,7 @@ struct tag
+ client_array_t clients;
+ };
+
+-lua_class_t tag_class;
++extern lua_class_t tag_class;
+ LUA_OBJECT_FUNCS(tag_class, tag_t, tag)
+
+ void tag_class_setup(lua_State *);
+diff --git a/objects/window.c b/objects/window.c
+index 440970f3d0..371d06bcd3 100644
+--- a/objects/window.c
++++ b/objects/window.c
+@@ -59,6 +59,7 @@
+ #include "property.h"
+ #include "xwindow.h"
+
++lua_class_t window_class;
+ LUA_CLASS_FUNCS(window, window_class)
+
+ static xcb_window_t
+diff --git a/objects/window.h b/objects/window.h
+index 5386fafead..fbc5296cf5 100644
+--- a/objects/window.h
++++ b/objects/window.h
+@@ -80,7 +80,7 @@ typedef struct
+ WINDOW_OBJECT_HEADER
+ } window_t;
+
+-lua_class_t window_class;
++extern lua_class_t window_class;
+
+ void window_class_setup(lua_State *);
+
diff --git a/user/bash-completion/APKBUILD b/user/bash-completion/APKBUILD
index 2862108d5..81a7355ed 100644
--- a/user/bash-completion/APKBUILD
+++ b/user/bash-completion/APKBUILD
@@ -15,6 +15,7 @@ makedepends=""
subpackages="$pkgname-doc"
source="https://github.com/scop/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.xz
fix-tests.patch
+ gcc-x86-tests.patch
"
# Provided with util-linux and networkmanager:
@@ -82,4 +83,5 @@ package() {
}
sha512sums="41585f730b5114d397831ba36d10d05643c6a6179e746ddc49aa1cbef61ea5525fd2f09b2e474adee14e647f99df8d5983ee48e29a59d8a30e1daf7fb1837e06 bash-completion-2.11.tar.xz
-ada80cbec419a6f6b2eab648497d5aa6795883bc52a160c233c04d4479c6d543b5089745ab098c5d6d7b4a0f05d25708cf7cf9d3b565b5b70e96796b3042ca75 fix-tests.patch"
+ada80cbec419a6f6b2eab648497d5aa6795883bc52a160c233c04d4479c6d543b5089745ab098c5d6d7b4a0f05d25708cf7cf9d3b565b5b70e96796b3042ca75 fix-tests.patch
+fb65b60f52da373368dfb5fd8034ca6b2be4c68648d827679596908364d0e0a69ede51c2954411ad5d83cfc4ee7666eeade2b036f2b5f52c004a9dba51f328a7 gcc-x86-tests.patch"
diff --git a/user/bash-completion/gcc-x86-tests.patch b/user/bash-completion/gcc-x86-tests.patch
new file mode 100644
index 000000000..49d7838b0
--- /dev/null
+++ b/user/bash-completion/gcc-x86-tests.patch
@@ -0,0 +1,22 @@
+Now that we have a GCC that supports completions, we have a few test failures.
+
+* -march=native is an x86-specific flag. There is no -march on Power.
+
+* -mtune=generic is x86 and Arm specific; Power's equivalent is powerpc.
+
+Upstream-URL: https://github.com/scop/bash-completion/issues/1201
+
+--- bash-completion-2.11/test/t/test_gcc.py.old 2020-07-25 06:49:49.000000000 -0500
++++ bash-completion-2.11/test/t/test_gcc.py 2024-05-26 21:16:26.236036406 -0500
+@@ -56,9 +56,9 @@
+ assert completion == "fam10"
+
+ @pytest.mark.complete("gcc -march=")
+- def test_march_native(self, completion, gcc_with_completion):
++ def test_march_native(self, completion, gcc_with_completion, gcc_x86):
+ assert "native" in completion
+
+ @pytest.mark.complete("gcc -mtune=")
+- def test_mtune_generic(self, completion, gcc_with_completion):
++ def test_mtune_generic(self, completion, gcc_with_completion, gcc_x86):
+ assert "generic" in completion
diff --git a/user/clazy/APKBUILD b/user/clazy/APKBUILD
index d8e20a742..114cd4556 100644
--- a/user/clazy/APKBUILD
+++ b/user/clazy/APKBUILD
@@ -2,6 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=clazy
pkgver=1.11
+_llvmver=14
pkgrel=0
pkgdesc="Clang compiler plugin to warn about Qt best practices"
url="https://kde.org/applications/development/org.kde.clazy"
@@ -9,7 +10,7 @@ arch="all"
license="LGPL-2.1+"
options="!check" # need 'clang-tools-extra'
depends=""
-makedepends="cmake clang-dev llvm14-dev"
+makedepends="cmake clang-dev llvm$_llvmver-dev"
subpackages="$pkgname-doc"
source="https://download.kde.org/stable/clazy/$pkgver/src/clazy-$pkgver.tar.xz
fix-link-fs-lib.patch
@@ -26,6 +27,7 @@ build() {
-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_C_FLAGS="$CFLAGS" \
+ -DLLVM_ROOT="/usr/lib/llvm$_llvmver" \
${CMAKE_CROSSOPTS} \
.
make
diff --git a/user/clearsans/APKBUILD b/user/clearsans/APKBUILD
index 82c7a7291..64e815afe 100644
--- a/user/clearsans/APKBUILD
+++ b/user/clearsans/APKBUILD
@@ -11,7 +11,7 @@ license="Apache-2.0"
depends="fontconfig"
makedepends=""
subpackages=""
-source="https://01.org/sites/default/files/downloads/clear-sans/clearsans-$pkgver.zip"
+source="https://distfiles.adelielinux.org/source/archive/$pkgname-$pkgver/$pkgname-$pkgver.zip"
builddir="$srcdir"
package() {
diff --git a/user/cups-filters/APKBUILD b/user/cups-filters/APKBUILD
index 346878925..d0e40e35e 100644
--- a/user/cups-filters/APKBUILD
+++ b/user/cups-filters/APKBUILD
@@ -1,16 +1,16 @@
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=cups-filters
-pkgver=1.25.13
+pkgver=1.28.16
pkgrel=0
pkgdesc="OpenPrinting CUPS filters and backends"
url="https://wiki.linuxfoundation.org/openprinting/cups-filters"
arch="all"
license="GPL-2.0-only AND GPL-2.0+ AND GPL-3.0-only AND MIT"
-depends="gnu-ghostscript poppler-utils bc ttf-freefont"
+depends="gnu-ghostscript poppler-utils bc"
checkdepends="ttf-dejavu"
-makedepends="cups-dev libjpeg-turbo-dev poppler-dev zlib-dev libpng-dev
- tiff-dev lcms2-dev freetype-dev fontconfig-dev qpdf-dev dbus-dev linux-headers
- coreutils gnutls-dev python3"
+makedepends="cups-dev dbus-dev fontconfig-dev freetype-dev gnutls-dev lcms2-dev
+ libexif-dev libjpeg-turbo-dev libpng-dev poppler-dev qpdf-dev tiff-dev
+ zlib-dev linux-headers coreutils python3"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="https://www.openprinting.org/download/cups-filters/cups-filters-$pkgver.tar.xz"
@@ -59,4 +59,4 @@ libs() {
mv "$pkgdir"/usr/lib/lib*.so.* "$subpkgdir"/usr/lib/
}
-sha512sums="4b5ef647870235436276db68f3ef1879b578807338a025100a1d43115a7330a8f506be631df9c43edb2f1ec15f9a42f15f7cdc725bb5d39612b37bae04631611 cups-filters-1.25.13.tar.xz"
+sha512sums="0369f96a8ae5e33bf75c8765947d5ad7285b3532e9d9b0ded7e206798834c9ade3a2ac3f1d16e0fdd43346f2bc7852c541130e935cbb20f9c1239a53118d1239 cups-filters-1.28.16.tar.xz"
diff --git a/user/dhcpcd/APKBUILD b/user/dhcpcd/APKBUILD
index d009af3a5..7c3bb273c 100644
--- a/user/dhcpcd/APKBUILD
+++ b/user/dhcpcd/APKBUILD
@@ -3,7 +3,7 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=dhcpcd
-pkgver=9.4.0
+pkgver=9.5.2
pkgrel=0
pkgdesc="RFC2131 compliant DHCP client"
url="https://roy.marples.name/projects/dhcpcd"
@@ -12,7 +12,7 @@ license="BSD-2-Clause"
makedepends="linux-headers bsd-compat-headers eudev-dev"
install="$pkgname.post-upgrade"
subpackages="$pkgname-doc $pkgname-openrc"
-source="https://roy.marples.name/downloads/dhcpcd/$pkgname-$pkgver.tar.xz
+source="https://github.com/NetworkConfiguration/dhcpcd/releases/download/v${pkgver}/$pkgname-$pkgver.tar.xz
fix-chrony-conf-location.patch
dhcpcd.initd
"
@@ -42,6 +42,6 @@ package() {
"$pkgdir"/etc/init.d/dhcpcd
}
-sha512sums="e2cff86564062e8d5f9c8f48f245ffa31406494e2fafadedabc1ba9932b534cbda064783ffdd7fb337544459aba2ef7e9b49ad0973120897dc04159747e8635f dhcpcd-9.4.0.tar.xz
+sha512sums="de9040b6ce6b4eb6dbf193fe3d983984a58a3bc14384bdd7ffbd2040056d72a786bc033a8bc69f7df37fbf9202b35ff3bca4196ae31ee78670eed0d779e5fd6a dhcpcd-9.5.2.tar.xz
1c19eed0f7a008ee96ea392beb327169ff8c83fc27fed20f65f05c9125f60629ebe3474c5e6a7cf4aeeea448fde4264c9b84916efacd67d47ab908c47b1fc3a5 fix-chrony-conf-location.patch
e777432c2efc84285b41e63a4687f3bd543f6864218d037529ab78b5ad934de154f28f478bd9facb56628f2953aad8a932bc2eb8b1dfffa0ce2278ffcfc4d880 dhcpcd.initd"
diff --git a/user/digikam/APKBUILD b/user/digikam/APKBUILD
index 79c57bd29..e2b01ba40 100644
--- a/user/digikam/APKBUILD
+++ b/user/digikam/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=digikam
pkgver=7.6.0
-pkgrel=0
+pkgrel=1
pkgdesc="Professional photo management and digital camera import"
url="https://www.digikam.org/"
arch="all"
@@ -22,6 +22,7 @@ makedepends="cmake extra-cmake-modules qt5-qtbase-dev qt5-qtxmlpatterns-dev
subpackages="$pkgname-doc $pkgname-lang"
source="https://download.kde.org/stable/digikam/$pkgver/digiKam-$pkgver.tar.xz
backport.patch
+ isdigit.patch
"
build() {
@@ -51,4 +52,5 @@ package() {
}
sha512sums="72cae1f36249687d2c82392b7d5bcede39364372f935a2d09ba561d0b7f51b6f9a1e6a83a8974616061a8200f3d997b96fb021a16323a2f30b404cf628188216 digiKam-7.6.0.tar.xz
-44f33f77b327f384764d74aade0567560f2f8cf34f53a9391da42ade06b08d9edc858c8b48cb0f2677dce8fa195e31d866585ee287a49a765d3fd2f8d5ed3c41 backport.patch"
+44f33f77b327f384764d74aade0567560f2f8cf34f53a9391da42ade06b08d9edc858c8b48cb0f2677dce8fa195e31d866585ee287a49a765d3fd2f8d5ed3c41 backport.patch
+691d65a1f8f48820380e98bc72059cb4fb4ac4ace96ae46a04e60f1bc778b1e01af6f7a8c0c2f9951b5597017bca830baea2e919a145b2635e3be468f8e81862 isdigit.patch"
diff --git a/user/digikam/isdigit.patch b/user/digikam/isdigit.patch
new file mode 100644
index 000000000..82122b5d8
--- /dev/null
+++ b/user/digikam/isdigit.patch
@@ -0,0 +1,12 @@
+--- digikam-7.6.0/core/libs/dngwriter/extra/dng_sdk/dng_string.cpp.old 2022-03-01 02:42:07.000000000 -0600
++++ digikam-7.6.0/core/libs/dngwriter/extra/dng_sdk/dng_string.cpp 2024-05-28 18:24:34.849989979 -0500
+@@ -23,9 +23,7 @@
+ #include <windows.h>
+ #endif
+
+-#if qiPhone || qAndroid
+ #include <ctype.h> // for isdigit
+-#endif
+
+ /*****************************************************************************/
+
diff --git a/user/dovecot/APKBUILD b/user/dovecot/APKBUILD
index c7a0ebe1c..39890797a 100644
--- a/user/dovecot/APKBUILD
+++ b/user/dovecot/APKBUILD
@@ -5,13 +5,13 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Lee Starnes <lee@canned-death.us>
pkgname=dovecot
-pkgver=2.3.21
+pkgver=2.3.21.1
case "$pkgver" in
*.*.*.*) _pkgvermajor=${pkgver%.*.*};;
*.*.*) _pkgvermajor=${pkgver%.*};;
esac
pkgrel=0
-_pigeonholevel=0.5.20
+_pigeonholevel=0.5.21.1
pkgdesc="IMAP and POP3 server"
url="https://www.dovecot.org/"
arch="all"
@@ -46,6 +46,9 @@ source="https://www.dovecot.org/releases/$_pkgvermajor/dovecot-$pkgver.tar.gz
_builddir_pigeonhole="$srcdir/$pkgname-$_pkgvermajor-pigeonhole-$_pigeonholevel"
# secfixes:
+# 2.3.21.1-r0:
+# - CVE-2024-23184
+# - CVE-2024-23185
# 2.3.19.1-r0:
# - CVE-2022-30550
# 2.3.19-r0:
@@ -259,8 +262,8 @@ _submv() {
done
}
-sha512sums="2d463c38639c3fd3d617ee5b1a4e4d0c11362339c4d4d62a5a90164a8b10bc58919545679bbf379139bdb743fdb013033abfddc1fc6401eb8099463cdc2401ca dovecot-2.3.21.tar.gz
-45683e6bd678db00fc3e3c61d27a264d30d0e9aeb9ceb7ab55f94f0317d387056fa092e266062117cbe2a9dc2c90ddca03d154e78aad9c0d61fe8cf2c9187603 dovecot-2.3-pigeonhole-0.5.20.tar.gz
+sha512sums="9de6ce3a579ef2040248b692874a6d64a732bb735a9cee3144604927cad49690c4b0e29f7ecf3af23190d56f30956d955d13acd5d352534df62fbdfde4b60f9f dovecot-2.3.21.1.tar.gz
+7387b417611599fe70d1a83d3b408321e66f5a883bf78a9d55c7496b1a17220677daebaefde2061e0d7064fe07c410ecfc64662878bb253ddcd9e128dd83fbaa dovecot-2.3-pigeonhole-0.5.21.1.tar.gz
a73e7323a582ea9504c33ea3591784af8187af8fffbcc47b69f549e33620c532d976853f0f7a9071af6ef2970d4899e2c5b30aac605dd5c933b3c6faa391bad4 fix-time64.patch
fe4fbeaedb377d809f105d9dbaf7c1b961aa99f246b77189a73b491dc1ae0aa9c68678dde90420ec53ec877c08f735b42d23edb13117d7268420e001aa30967a skip-iconv-check.patch
794875dbf0ded1e82c5c3823660cf6996a7920079149cd8eed54231a53580d931b966dfb17185ab65e565e108545ecf6591bae82f935ab1b6ff65bb8ee93d7d5 split-protocols.patch
diff --git a/user/elixir/APKBUILD b/user/elixir/APKBUILD
index 389f7b97f..40b16876e 100644
--- a/user/elixir/APKBUILD
+++ b/user/elixir/APKBUILD
@@ -2,7 +2,7 @@
# Contributor: Marlus Saraiva <marlus.saraiva@gmail.com>
# Maintainer: Lee Starnes <lee@canned-death.us>
pkgname=elixir
-pkgver=1.15.7
+pkgver=1.17.2
pkgrel=0
pkgdesc="Dynamic, functional language designed for building scalable and maintainable applications"
url="https://elixir-lang.org/"
@@ -25,4 +25,4 @@ package() {
make DESTDIR="$pkgdir" PREFIX=/usr install
}
-sha512sums="a46f0569cbff342f15a04776f8d57cf2554867546004adabd9b9dff36c184ec56a78f2df2fc6c0855e65c11277662f694f5e6a8c6e1716cf4e22d8fdd5e1d4ae elixir-1.15.7.tar.gz"
+sha512sums="f9d4983c3e7bd054a76bfe0dfa4aea483a4dd84ada432ae5a144167ff8d268499077704214eaaecfda84469c2f747a3594258ca95a7955bffde0c7b0f65985f2 elixir-1.17.2.tar.gz"
diff --git a/user/erl-rebar3/APKBUILD b/user/erl-rebar3/APKBUILD
index 09b94cc5b..437ca4783 100644
--- a/user/erl-rebar3/APKBUILD
+++ b/user/erl-rebar3/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Alyx Wolcott <alyx@leuhta.com>
# Maintainer: Alyx Wolcott <alyx@leuhta.com>
pkgname=erl-rebar3
-pkgver=3.18.0
+pkgver=3.23.0
pkgrel=0
pkgdesc="Erlang build tool"
url="https://www.rebar3.org/"
@@ -30,4 +30,4 @@ package() {
install -m644 ./manpages/rebar3.1.gz $pkgdir/usr/share/man/man1/
}
-sha512sums="4fcaa1867fba7462df0b9a64fa442f4a887e83530635fdcd19f4b5dcee14ace3e7403c27f35e5e6055fb6bf89c98a91a3ff1e2036ab6e67e3de028f91233e4ed erl-rebar3-3.18.0.tar.gz"
+sha512sums="4da1db8ed830c59fb322c1a652c2efe28d54e09ad74d12a87381ea7a7f13965b91815f383221831fbc14e6deed1a75db1039164f7df128a977d5b64048540cc3 erl-rebar3-3.23.0.tar.gz"
diff --git a/user/erlang/APKBUILD b/user/erlang/APKBUILD
index a314041cf..31778994d 100644
--- a/user/erlang/APKBUILD
+++ b/user/erlang/APKBUILD
@@ -1,21 +1,20 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=erlang
-pkgver=24.3.3
+pkgver=27.0
pkgrel=0
pkgdesc="Soft real-time system programming language"
url="https://www.erlang.org/"
arch="all"
license="Apache-2.0"
depends=""
-makedepends="autoconf automake flex libxml2-utils libxslt-dev m4 ncurses-dev
- openssl-dev perl unixodbc-dev"
+makedepends="flex libxml2-utils libxslt-dev ncurses-dev openssl-dev perl
+ unixodbc-dev"
subpackages="$pkgname-dev"
source="erlang-$pkgver.tar.gz::https://github.com/erlang/otp/archive/OTP-$pkgver.tar.gz"
builddir="$srcdir/otp-OTP-$pkgver"
build() {
- ./otp_build autoconf
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -36,8 +35,7 @@ check() {
make release_tests
for _header in erl_fixed_size_int_types.h \
- ${CHOST}/erl_int_sizes_config.h \
- erl_memory_trace_parser.h; do
+ ${CHOST}/erl_int_sizes_config.h; do
cp erts/include/$_header erts/emulator/beam/
done
cd release/tests/test_server
@@ -48,4 +46,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="5e8ce0ebd50c1c67ca29ce9405fc18f5461793b20a1732418bc8fac404078044deb72526682aab92ee3e737bc9dc9e94e6be162a088e2cb7cc68c14b1d76454e erlang-24.3.3.tar.gz"
+sha512sums="16945c50c09caad9aac6808470ea2a0e282713f23e54cd4ad60510b114811b5deac427acb36cc8049443b4e3c3302c40b02c696cf3f2028f8bd3e836c8c48ea9 erlang-27.0.tar.gz"
diff --git a/user/firefox-esr/APKBUILD b/user/firefox-esr/APKBUILD
index 89989291a..82c29ffd7 100644
--- a/user/firefox-esr/APKBUILD
+++ b/user/firefox-esr/APKBUILD
@@ -2,7 +2,8 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=firefox-esr
pkgver=91.13.0
-pkgrel=3
+_llvmver=14
+pkgrel=4
pkgdesc="Firefox web browser (extended support release)"
url="https://www.mozilla.org/firefox/"
arch="all !ppc" # #837
@@ -14,7 +15,7 @@ depends=""
# system-libs
# actual deps
makedepends="
- autoconf2.13 cargo cbindgen clang llvm14-dev node ncurses-dev
+ autoconf2.13 cargo cbindgen clang llvm${_llvmver}-dev node ncurses-dev
perl python3 rust rust-std cmd:which
ncurses-dev openssl-dev
@@ -50,6 +51,7 @@ source="https://ftp.mozilla.org/pub/firefox/releases/$_ffxver/source/firefox-$_f
stackwalk-x86-ppc.patch
triplet-vendor-support.patch
webrender.patch
+ gcc13.patch
firefox.desktop
firefox-safe.desktop
@@ -95,6 +97,7 @@ prepare() {
}
build() {
+ export PATH="/usr/lib/llvm${_llvmver}/bin:${PATH}" #1230
export SHELL=/bin/sh
export BUILD_OFFICIAL=1
export MOZILLA_OFFICIAL=1
@@ -114,7 +117,7 @@ run() {
export LD_LIBRARY_PATH=.
export PROFILE_DIR="$builddir"/obj-$CHOST/tmp/profile-default
[ -d $PROFILE_DIR ] || ./firefox -no-remote -CreateProfile "Test $PROFILE_DIR"
- ./firefox -no-remote -profile "$builddir"/obj-$CHOST/tmp/profile-default
+ ./firefox -no-remote -profile "$PROFILE_DIR" about:buildconfig
}
package() {
@@ -175,5 +178,6 @@ c9c5610b99e73a1eedd3510e73921cba84f8c6d0c58fc7fe5b4a7ec261bd5fe530560856fba46d6b
452b47b825294779f98ed46bc1065dad76b79ff453521ef049934a120f349c84a1c863b16af1828fe053059823da9690ec917c055ae02dcc5c80c54cad732448 stackwalk-x86-ppc.patch
60ffc4b95ba72aa19fb4f4aaf91393e8c730dae536a19248e2dd21c38cc32891bff69a6b51ea903f185ecc680dae4b21ec11d8cac67b3b038b3f0e757639ad94 triplet-vendor-support.patch
b7c1ac21cd03b7cdc887e005ed970cf13ff95643c7651decf1e6d42094cda6a0464dc2ba3cded3827f6d0f3682c2c9b081a7667f386133aa6e3072d0464e72e8 webrender.patch
+bb57b3ed998543f9a2edcc379a0c5e2d7e855a0d6f538547f18cdfce56f6c91a3c26a8b1505824628fdd394f0f75a8e98c7fb559ef79eac803d4028e5e9827e5 gcc13.patch
f3b7c3e804ce04731012a46cb9e9a6b0769e3772aef9c0a4a8c7520b030fdf6cd703d5e9ff49275f14b7d738fe82a0a4fde3bc3219dff7225d5db0e274987454 firefox.desktop
5dcb6288d0444a8a471d669bbaf61cdb1433663eff38b72ee5e980843f5fc07d0d60c91627a2c1159215d0ad77ae3f115dcc5fdfe87e64ca704b641aceaa44ed firefox-safe.desktop"
diff --git a/user/firefox-esr/gcc13.patch b/user/firefox-esr/gcc13.patch
new file mode 100644
index 000000000..1c4f085e0
--- /dev/null
+++ b/user/firefox-esr/gcc13.patch
@@ -0,0 +1,10 @@
+--- firefox-91.13.0/gfx/2d/Rect.h.old 2022-08-15 13:04:38.000000000 -0500
++++ firefox-91.13.0/gfx/2d/Rect.h 2024-05-28 20:50:50.230975904 -0500
+@@ -15,6 +15,7 @@
+ #include "mozilla/Maybe.h"
+
+ #include <cmath>
++#include <cstdint>
+
+ namespace mozilla {
+
diff --git a/user/fluxbox/APKBUILD b/user/fluxbox/APKBUILD
index c45ce0ec9..bc5882b50 100644
--- a/user/fluxbox/APKBUILD
+++ b/user/fluxbox/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=fluxbox
pkgver=1.3.7
-pkgrel=1
+pkgrel=2
pkgdesc="A lightweight and highly-configurable window manager"
url="http://www.fluxbox.org"
arch="all"
@@ -12,7 +12,9 @@ depends="gxmessage"
makedepends="libxinerama-dev libxpm-dev libxrandr imlib2-dev libxrender-dev
libxrandr-dev libxinerama-dev freetype-dev libxft-dev xorgproto"
subpackages="$pkgname-doc"
-source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2"
+source="https://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2
+ modern-c.patch
+ "
build() {
# TODO: Enable NLS when we get 'gencat'
@@ -29,4 +31,5 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="c40cc765f5d542210e18dca21b98b97a048c6685b605a68e2c64f4e886329f4e6d3a3a7e76b3ca0ce488242f38d0ee2a4d6dfebc9ce97d37c68f84c3948aac8c fluxbox-1.3.7.tar.bz2"
+sha512sums="c40cc765f5d542210e18dca21b98b97a048c6685b605a68e2c64f4e886329f4e6d3a3a7e76b3ca0ce488242f38d0ee2a4d6dfebc9ce97d37c68f84c3948aac8c fluxbox-1.3.7.tar.bz2
+5b06cb617ff7ef9a2b605e4b590d35ed5cab95ded91f56e3a7ad75a1ec1caa0e5543624c4a5f7a5924b60c4568c7b3d7d11811c54ab55c40df7ccd0ef6c45bd1 modern-c.patch"
diff --git a/user/fluxbox/modern-c.patch b/user/fluxbox/modern-c.patch
new file mode 100644
index 000000000..c8890c71f
--- /dev/null
+++ b/user/fluxbox/modern-c.patch
@@ -0,0 +1,25 @@
+From 22866c4d30f5b289c429c5ca88d800200db4fc4f Mon Sep 17 00:00:00 2001
+From: John Sennesael <john@aminking.com>
+Date: Mon, 2 Nov 2015 15:14:32 -0600
+Subject: fixes bug #1138
+
+---
+ util/fluxbox-remote.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/util/fluxbox-remote.cc b/util/fluxbox-remote.cc
+index 59852e6..504015b 100644
+--- a/util/fluxbox-remote.cc
++++ b/util/fluxbox-remote.cc
+@@ -73,7 +73,7 @@ int main(int argc, char **argv) {
+ if (strcmp(cmd, "result") == 0) {
+ XTextProperty text_prop;
+ if (XGetTextProperty(disp, root, &text_prop, atom_result) != 0
+- && text_prop.value > 0
++ && text_prop.value != 0
+ && text_prop.nitems > 0) {
+
+ printf("%s", text_prop.value);
+--
+cgit v0.11.2
+
diff --git a/user/freeglut/APKBUILD b/user/freeglut/APKBUILD
index e6f8fd11d..fa130b8d1 100644
--- a/user/freeglut/APKBUILD
+++ b/user/freeglut/APKBUILD
@@ -1,10 +1,10 @@
# Contributor: Ariadne Conill <ariadne@dereferenced.org>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=freeglut
-pkgver=3.2.1
+pkgver=3.2.2
pkgrel=0
-pkgdesc="free reimplementation of OpenGL Utility Toolkit (GLUT) library"
-url="http://freeglut.sourceforge.net/"
+pkgdesc="Free reimplementation of OpenGL Utility Toolkit (GLUT) library"
+url="https://freeglut.sourceforge.net/"
arch="all"
options="!check" # No test suite.
license="X11"
@@ -27,4 +27,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="aced4bbcd36269ce6f4ee1982e0f9e3fffbf18c94f785d3215ac9f4809b992e166c7ada496ed6174e13d77c0f7ef3ca4c57d8a282e96cbbe6ff086339ade3b08 freeglut-3.2.1.tar.gz"
+sha512sums="190231951d314f854c244bd27f7c20488403bd0eecffc342097a2e3d1621cec87f6c209a77b4c153aabcf44697b4070227930e295ab74fb88953cbbf94fc81d9 freeglut-3.2.2.tar.gz"
diff --git a/user/gdbm/APKBUILD b/user/gdbm/APKBUILD
index 351236639..b52d44fce 100644
--- a/user/gdbm/APKBUILD
+++ b/user/gdbm/APKBUILD
@@ -2,7 +2,7 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer:
pkgname=gdbm
-pkgver=1.18.1
+pkgver=1.23
pkgrel=0
pkgdesc="Set of database routines that use extensible hashing"
url="https://www.gnu.org/software/gdbm/"
@@ -32,4 +32,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="adf9d6c5bc843ff0d7f88c2a1667d509973b2d63378d0001d7e74cc10aee6ea498a4513cc88ddf78c32ba4db5cb040b2794f4f1b3338c65d9894058850e2f5ef gdbm-1.18.1.tar.gz"
+sha512sums="918080cb0225b221c11eb7339634a95e00c526072395f7a3d46ccf42ef020dea7c4c5bec34aff2c4f16033e1fff6583252b7e978f68b8d7f8736b0e025838e10 gdbm-1.23.tar.gz"
diff --git a/user/gitlab-runner/APKBUILD b/user/gitlab-runner/APKBUILD
index a2ef8fd9c..c5b01bd3b 100644
--- a/user/gitlab-runner/APKBUILD
+++ b/user/gitlab-runner/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Max Rees <maxcrees@me.com>
# Maintainer: Zach van Rijn <me@zv.io>
pkgname=gitlab-runner
-pkgver=12.1.0
-pkgrel=1
+pkgver=15.0.0
+pkgrel=0
_testver=91956efe
_branch="${pkgver%.*}"
_branch="${pkgver%%.*}-${_branch#*.}-stable"
@@ -22,19 +22,14 @@ source="https://gitlab.com/gitlab-org/gitlab-runner/-/archive/v$pkgver/gitlab-ru
https://dev.sick.bike/dist/gitlab-test-$_testver.tar.gz
$pkgname.confd
$pkgname.initd
- clean-tmpdirs.patch
disable-crap.patch
gccgo.patch
- posix-shell.patch
- posix-shell-escape.patch
tests.patch
- fix-multiple-redef-seek.patch
"
builddir="$srcdir/$pkgname-v$pkgver"
unpack() {
default_unpack
- mkdir "$builddir"/tmp
mv gitlab-test "$builddir"/tmp
}
@@ -43,7 +38,11 @@ _make() {
}
build() {
- _make build_simple
+ export GO111MODULE=on
+ export GOCACHE="$builddir"/tmp/go-build
+ export GOMODCACHE="$builddir"/go-mod
+ export GOFLAGS="-buildvcs=false -p=$JOBS -v -mod=readonly -modcacherw"
+ go build -o gitlab-runner .
}
check() {
@@ -65,7 +64,7 @@ check() {
}
package() {
- install -Dm755 out/binaries/gitlab-runner \
+ install -Dm755 gitlab-runner \
"$pkgdir"/usr/bin/gitlab-runner
install -dm750 -g gitlab-runner \
"$pkgdir"/etc/gitlab-runner
@@ -78,14 +77,10 @@ package() {
"$pkgdir"/etc/init.d/$pkgname
}
-sha512sums="1b3f06b7000252631bec04a58474dda826b0fb8d28c4144051a231fba5ef0c5c4b6e0f9ca6bdf9bf9b16b9117cbcf6385eb7bac85bda7b9f99de4300cbcc2066 gitlab-runner-v12.1.0.tar.gz
+sha512sums="8ba54e690fc45c1e22d174b649fbe3cf78707fd5a146c738c73cba045e6ac00499ddedd7a5f905c0c7e4e804a533d3fc718f8f7ac3c9ec5581de4dd9b3599c80 gitlab-runner-v15.0.0.tar.gz
7bccab81aa1cb88c6a0f83a6d3dfc509e6f9ecb4d0168a5b30cc4e8fdd823294b95fe3633e09757905466f83bb3bf73b1d28fac475dff2dc3164604db4b5b995 gitlab-test-91956efe.tar.gz
f8a0c7e77cd563d7e5b4fb2319181ceab8de44c555cefa4803e985ad3ac6a9fea7bca469d80b28974edcfb65f2095d019bfdf0abd8a3221464276a8d89debc0d gitlab-runner.confd
7f785a65b46919f6a6695e25fdc414ee3204eb9aa1a3735e7884575434af94b20a48f2fe7a1fb787473de23a7bd2d56bc1e9c1fc6b522c6f0c05c47b3d37ab1c gitlab-runner.initd
-f17a6b5053933d83d90272be7e98d4abf8d63e8a9c5ad30bbb61a29dbfa1e1b55421ba14be9f7db17cae30b2ff04efcb5da68543a2fa3d0e3e1882bc128cac06 clean-tmpdirs.patch
-a32b7a6fa28c7f5bcb505308e615f17de179c15ce8c2ef73078143204195e36d99b18489114ce694c3d821378c1e9ccb26a999a50372b97df163e2512080f07e disable-crap.patch
-4bc8f827cbcec212fcb1c5598aaf725138efa9a1de699d6261a65207cca7ef46f441edc02987efdd6d7c6e62943fda8f3f2a5a596d8d33b49fb78ba5df612e8b gccgo.patch
-444adec507c5eebcfae268f2f475d29316119f30750f06877a91dff56942d0e4d34ed3011b774b0d7acd59acfe2ddbe75082b3cd5aebd72ddb4703fd083ad301 posix-shell.patch
-05d12046448c79a12bf92974089ff97781304083f7bf35abb0b0c0f990c536bd6ff51652e16035a38e4ba5620dcad6e051ecdf4a80eb62039a15371073e525b5 posix-shell-escape.patch
-dae9c3f86fdf21bd41202fc2c0bc7dd764078ea9215d7ddbac1f7bc47b0943f7a912250a3006122f74ed50052378ed2c946eefe5c1ce8400cd682b183221025a tests.patch
-693d3abd94a85be70337bdfcbc3c643d65b95991689e085c573a793e4568f71966e398be960fd6bd985481613a1b85c459af814f83396d23e773afeee956b9f3 fix-multiple-redef-seek.patch"
+020a388f63758ecbcdd19ce3a290d2fd044e852174b6b7e1c79dc39d8d83ac161be5b63df8a9c60da315895e5385e9ac02bd3a46e02d45b96b8f939c90c444cd disable-crap.patch
+6bb477d2f40e651cb59f18ea18cfb051dd06cdfa3f976c6e17b72ee35733e9520a6323cec1f6b34d85fa46050b97bd20d4bb0f08a44f2cbfd4eb6914cfd5d604 gccgo.patch
+9b64665ec4c7f0edb7151b146666ea22283ac109193ff354510da018f14f1442c99707c753e5185caed2eb034600aa93ef5c95d960443339db89696acef96c3c tests.patch"
diff --git a/user/gitlab-runner/clean-tmpdirs.patch b/user/gitlab-runner/clean-tmpdirs.patch
deleted file mode 100644
index 89efd7a22..000000000
--- a/user/gitlab-runner/clean-tmpdirs.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Backport of: https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/1978
-
---- gitlab-runner-v12.1.0/executors/custom/executor.go 2019-07-19 12:13:32.000000000 +0000
-+++ gitlab-runner-v12.1.0/executors/custom/executor.go 2020-04-27 00:19:46.613372635 +0000
-@@ -7,6 +7,7 @@ import (
- "fmt"
- "io"
- "io/ioutil"
-+ "os"
- "path/filepath"
-
- "github.com/sirupsen/logrus"
-@@ -216,6 +217,8 @@ func (e *executor) Cleanup() {
- return
- }
-
-+ defer os.RemoveAll(e.tempDir)
-+
- // nothing to do, as there's no cleanup_script
- if e.config.CleanupExec == "" {
- return
diff --git a/user/gitlab-runner/disable-crap.patch b/user/gitlab-runner/disable-crap.patch
index b375934fc..aab6a98b1 100644
--- a/user/gitlab-runner/disable-crap.patch
+++ b/user/gitlab-runner/disable-crap.patch
@@ -1,9 +1,10 @@
--- gitlab-runner-v12.1.0/main.go 2019-07-19 12:13:32.000000000 +0000
+++ gitlab-runner-v12.1.0/main.go 2020-03-04 22:28:31.741878923 +0000
-@@ -11,18 +11,11 @@ import (
- "gitlab.com/gitlab-org/gitlab-runner/helpers/cli"
+@@ -12,19 +12,11 @@ import (
+ cli_helpers "gitlab.com/gitlab-org/gitlab-runner/helpers/cli"
"gitlab.com/gitlab-org/gitlab-runner/log"
+- _ "gitlab.com/gitlab-org/gitlab-runner/cache/azure"
- _ "gitlab.com/gitlab-org/gitlab-runner/cache/gcs"
- _ "gitlab.com/gitlab-org/gitlab-runner/cache/s3"
_ "gitlab.com/gitlab-org/gitlab-runner/commands"
@@ -16,6 +17,6 @@
_ "gitlab.com/gitlab-org/gitlab-runner/executors/shell"
_ "gitlab.com/gitlab-org/gitlab-runner/executors/ssh"
- _ "gitlab.com/gitlab-org/gitlab-runner/executors/virtualbox"
+ _ "gitlab.com/gitlab-org/gitlab-runner/helpers/secrets/resolvers/vault"
_ "gitlab.com/gitlab-org/gitlab-runner/shells"
)
-
diff --git a/user/gitlab-runner/fix-multiple-redef-seek.patch b/user/gitlab-runner/fix-multiple-redef-seek.patch
deleted file mode 100644
index 5a9d1ef10..000000000
--- a/user/gitlab-runner/fix-multiple-redef-seek.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff -ur a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
---- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go 2023-01-04 02:17:18.689781320 +0000
-+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go 2023-01-04 02:19:46.688219811 +0000
-@@ -45,7 +45,13 @@
-
- // Underlying system call writes to newoffset via pointer.
- // Implemented in assembly to avoid allocation.
--func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
-+func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
-+ var newoffset int64
-+ offsetLow := uint32(offset & 0xffffffff)
-+ offsetHigh := uint32((offset >> 32) & 0xffffffff)
-+ _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
-+ return newoffset, err
-+}
-
- func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- newoffset, errno := seek(fd, offset, whence)
-diff -ur a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go
---- a/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go 2023-01-04 02:17:18.689781320 +0000
-+++ b/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go 2023-01-04 02:20:04.283558738 +0000
-@@ -2,7 +2,7 @@
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
--// +build linux,gccgo,arm
-+// +build linux,!gccgo,arm
-
- package unix
-
-@@ -11,6 +11,7 @@
- "unsafe"
- )
-
-+// this file should not be built
- func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
- var newoffset int64
- offsetLow := uint32(offset & 0xffffffff)
diff --git a/user/gitlab-runner/gccgo.patch b/user/gitlab-runner/gccgo.patch
index 6c10893c7..c8704280c 100644
--- a/user/gitlab-runner/gccgo.patch
+++ b/user/gitlab-runner/gccgo.patch
@@ -12,45 +12,45 @@
BUILT := $(shell date -u +%Y-%m-%dT%H:%M:%S%z)
-export TESTFLAGS ?= -cover
- LATEST_STABLE_TAG := $(shell git -c versionsort.prereleaseSuffix="-rc" -c versionsort.prereleaseSuffix="-RC" tag -l "v*.*.*" --sort=-v:refname | awk '!/rc/' | head -n 1)
+ LATEST_STABLE_TAG := $(shell git -c versionsort.prereleaseSuffix="-rc" -c versionsort.prereleaseSuffix="-RC" tag -l "v*.*.*" | sort -rV | awk '!/rc/' | head -n 1)
export IS_LATEST :=
-@@ -45,14 +44,11 @@ export PATH := $(GOPATH_BIN):$(PATH)
+@@ -36,14 +35,11 @@ export PATH := $(GOPATH_BIN):$(PATH)
+ BUILD_DIR := $(CURDIR)
+ TARGET_DIR := $(BUILD_DIR)/out
- # Packages in vendor/ are included in ./...
- # https://github.com/golang/go/issues/11659
--export OUR_PACKAGES ?= $(subst _$(BUILD_DIR),$(PKG),$(shell go list ./... | grep -v '/vendor/'))
-+export OUR_PACKAGES ?= $(subst _$(BUILD_DIR),$(PKG),$(shell go list ./... | grep -ve '/vendor/' -e '/cache/gcs' -e '/cache/s3' -e '/docker' -e '/kubernetes' -e '/parallels' -e '/virtualbox'))
+ export MAIN_PACKAGE ?= gitlab.com/gitlab-org/gitlab-runner
-GO_LDFLAGS ?= -X $(COMMON_PACKAGE_NAMESPACE).NAME=$(PACKAGE_NAME) -X $(COMMON_PACKAGE_NAMESPACE).VERSION=$(VERSION) \
- -X $(COMMON_PACKAGE_NAMESPACE).REVISION=$(REVISION) -X $(COMMON_PACKAGE_NAMESPACE).BUILT=$(BUILT) \
- -X $(COMMON_PACKAGE_NAMESPACE).BRANCH=$(BRANCH) \
-- -s -w
-+GO_LDFLAGS ?= -s -w
- GO_FILES ?= $(shell find . -name '*.go' | grep -v './.gopath/')
+- -w
++GO_LDFLAGS ?= -w
+ GO_FILES ?= $(shell find . -name '*.go')
-export CGO_ENABLED ?= 0
+export CGO_ENABLED ?= 1
# Development Tools
-@@ -114,7 +110,7 @@ build: $(GOX)
- build_simple: $(GOPATH_SETUP)
- # Building $(NAME) in version $(VERSION) for current platform
-- go build \
-- -ldflags "$(GO_LDFLAGS)" \
-+ go build -v \
-+ -gccgoflags "$(GO_LDFLAGS)" \
- -o "out/binaries/$(NAME)" \
- $(PKG)
-
-@@ -123,7 +119,7 @@ build_current: helper-docker build_simpl
- check_race_conditions:
- @./scripts/check_race_conditions $(OUR_PACKAGES)
+@@ -137,7 +133,7 @@ build_current: helper-docker build_simpl
+ simple-test: TEST_PKG ?= $(shell go list ./...)
+ simple-test:
+ # use env -i to clear parent environment variables for go test
+- ./scripts/go_test_no_env $(TEST_PKG) $(TESTFLAGS) -ldflags "$(GO_LDFLAGS)"
++ ./scripts/go_test_no_env $(TEST_PKG) $(TESTFLAGS) -gccgoflags "$(GO_LDFLAGS)"
--test: $(PKG_BUILD_DIR) helper-docker
-+test: $(PKG_BUILD_DIR)
- go test $(OUR_PACKAGES) $(TESTFLAGS)
-
- parallel_test_prepare: $(GOPATH_SETUP)
+ git1.8-test: export TEST_PKG = gitlab.com/gitlab-org/gitlab-runner/executors/shell gitlab.com/gitlab-org/gitlab-runner/shells
+ git1.8-test:
+--- gitlab-runner-v13.0.0/Makefile.build.mk.old 2020-05-20 03:10:39.000000000 -0500
++++ gitlab-runner-v13.0.0/Makefile.build.mk 2024-05-30 22:18:11.590776424 -0500
+@@ -1,6 +1,5 @@
+ runner-bin: $(GOX)
+ # Building $(NAME) in version $(VERSION) for $(BUILD_PLATFORMS)
+- $(GOX) $(BUILD_PLATFORMS) \
+- -ldflags "$(GO_LDFLAGS)" \
+- -output="out/binaries/$(NAME)-{{.OS}}-{{.Arch}}" \
++ go build -v \
++ -gccgoflags "$(GO_LDFLAGS)" \
+ $(PKG)
--- gitlab-runner-v12.1.0/common/version.go 2019-07-19 12:13:32.000000000 +0000
+++ gitlab-runner-v12.1.0/common/version.go 2020-04-27 00:57:04.923408027 +0000
@@ -9,9 +9,9 @@ import (
@@ -60,9 +60,9 @@
-var VERSION = "development version"
-var REVISION = "HEAD"
-var BRANCH = "HEAD"
-+var VERSION = "12.1.0"
-+var REVISION = "v12.1.0"
-+var BRANCH = "12-1-stable"
++var VERSION = "15.0.0"
++var REVISION = "v15.0.0"
++var BRANCH = "15-0-stable"
var BUILT = "unknown"
var AppVersion AppVersionInfo
diff --git a/user/gitlab-runner/posix-shell-escape.patch b/user/gitlab-runner/posix-shell-escape.patch
deleted file mode 100644
index b454141ed..000000000
--- a/user/gitlab-runner/posix-shell-escape.patch
+++ /dev/null
@@ -1,139 +0,0 @@
---- gitlab-runner-v12.1.0/helpers/shell_escape.go 2019-07-19 12:13:32.000000000 +0000
-+++ gitlab-runner-v12.1.0/helpers/shell_escape.go 2020-04-26 23:12:59.813309281 +0000
-@@ -4,7 +4,6 @@ package helpers
-
- import (
- "bytes"
-- "encoding/hex"
- "strings"
- )
-
-@@ -13,35 +12,10 @@ import (
- */
-
- const (
-- ACK = 6
-- TAB = 9
-- LF = 10
-- CR = 13
-- US = 31
-- SPACE = 32
-- AMPERSTAND = 38
- SINGLE_QUOTE = 39
-- PLUS = 43
-- NINE = 57
-- QUESTION = 63
-- LOWERCASE_Z = 90
-- OPEN_BRACKET = 91
- BACKSLASH = 92
-- UNDERSCORE = 95
-- CLOSE_BRACKET = 93
-- BACKTICK = 96
-- TILDA = 126
-- DEL = 127
- )
-
--// ShellEscape is taken from https://github.com/solidsnack/shell-escape/blob/master/Text/ShellEscape/Bash.hs
--/*
--A Bash escaped string. The strings are wrapped in @$\'...\'@ if any
--bytes within them must be escaped; otherwise, they are left as is.
--Newlines and other control characters are represented as ANSI escape
--sequences. High bytes are represented as hex codes. Thus Bash escaped
--strings will always fit on one line and never contain non-ASCII bytes.
--*/
- func ShellEscape(str string) string {
- if str == "" {
- return "''"
-@@ -50,85 +24,20 @@ func ShellEscape(str string) string {
- out := bytes.NewBuffer(make([]byte, 0, len(str)*2))
- i := 0
- l := len(in)
-- escape := false
--
-- hex := func(char byte) {
-- escape = true
--
-- data := []byte{BACKSLASH, 'x', 0, 0}
-- hex.Encode(data[2:], []byte{char})
-- out.Write(data)
-- }
--
-- backslash := func(char byte) {
-- escape = true
-- out.Write([]byte{BACKSLASH, char})
-- }
--
-- escaped := func(str string) {
-- escape = true
-- out.WriteString(str)
-- }
--
-- quoted := func(char byte) {
-- escape = true
-- out.WriteByte(char)
-- }
--
-- literal := func(char byte) {
-- out.WriteByte(char)
-- }
-
-+ out.WriteByte(SINGLE_QUOTE)
- for i < l {
- char := in[i]
-- switch {
-- case char == TAB:
-- escaped(`\t`)
-- case char == LF:
-- escaped(`\n`)
-- case char == CR:
-- escaped(`\r`)
-- case char <= US:
-- hex(char)
-- case char <= AMPERSTAND:
-- quoted(char)
-- case char == SINGLE_QUOTE:
-- backslash(char)
-- case char <= PLUS:
-- quoted(char)
-- case char <= NINE:
-- literal(char)
-- case char <= QUESTION:
-- quoted(char)
-- case char <= LOWERCASE_Z:
-- literal(char)
-- case char == OPEN_BRACKET:
-- quoted(char)
-- case char == BACKSLASH:
-- backslash(char)
-- case char <= CLOSE_BRACKET:
-- quoted(char)
-- case char == UNDERSCORE:
-- literal(char)
-- case char <= BACKTICK:
-- quoted(char)
-- case char <= TILDA:
-- quoted(char)
-- case char == DEL:
-- hex(char)
-- default:
-- hex(char)
-+ if (char == SINGLE_QUOTE) {
-+ out.Write([]byte{SINGLE_QUOTE, BACKSLASH, SINGLE_QUOTE, SINGLE_QUOTE})
-+ } else {
-+ out.WriteByte(char)
- }
- i++
- }
-+ out.WriteByte(SINGLE_QUOTE)
-
-- outStr := out.String()
--
-- if escape {
-- outStr = "$'" + outStr + "'"
-- }
--
-- return outStr
-+ return out.String()
- }
-
- func ToBackslash(path string) string {
diff --git a/user/gitlab-runner/posix-shell.patch b/user/gitlab-runner/posix-shell.patch
deleted file mode 100644
index 6169c3ecc..000000000
--- a/user/gitlab-runner/posix-shell.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- gitlab-runner-v12.1.0/shells/bash.go 2019-07-19 12:13:32.000000000 +0000
-+++ gitlab-runner-v12.1.0/shells/bash.go 2020-04-26 23:07:57.303304498 +0000
-@@ -102,12 +102,12 @@ func (b *BashWriter) Variable(variable c
- }
-
- func (b *BashWriter) IfDirectory(path string) {
-- b.Line(fmt.Sprintf("if [[ -d %q ]]; then", path))
-+ b.Line(fmt.Sprintf("if [ -d %q ]; then", path))
- b.Indent()
- }
-
- func (b *BashWriter) IfFile(path string) {
-- b.Line(fmt.Sprintf("if [[ -e %q ]]; then", path))
-+ b.Line(fmt.Sprintf("if [ -e %q ]; then", path))
- b.Indent()
- }
-
-@@ -200,9 +200,10 @@ func (b *BashWriter) Finish(trace bool)
- io.WriteString(w, "set -o xtrace\n")
- }
-
-- io.WriteString(w, "set -eo pipefail\n")
-+ io.WriteString(w, "set -e\n")
- io.WriteString(w, "set +o noclobber\n")
-- io.WriteString(w, ": | eval "+helpers.ShellEscape(b.String())+"\n")
-+ io.WriteString(w, "(\nexec </dev/null\n")
-+ io.WriteString(w, b.String() + "\n)\n")
- io.WriteString(w, "exit 0\n")
- w.Flush()
- return buffer.String()
diff --git a/user/gitlab-runner/tests.patch b/user/gitlab-runner/tests.patch
index 1aff6c653..0762b6b13 100644
--- a/user/gitlab-runner/tests.patch
+++ b/user/gitlab-runner/tests.patch
@@ -1,58 +1,23 @@
--- gitlab-runner-v12.1.0/shells/bash_test.go 2019-07-19 12:13:32.000000000 +0000
+++ gitlab-runner-v12.1.0/shells/bash_test.go 2020-04-27 00:07:06.763360621 +0000
-@@ -10,12 +10,12 @@ func TestBash_CommandShellEscapes(t *tes
- writer := &BashWriter{}
+@@ -16,12 +16,12 @@ func TestBash_CommandShellEscapes(t *tes
+ writer := &BashWriter{useNewEscape: false}
writer.Command("foo", "x&(y)")
- assert.Equal(t, `$'foo' "x&(y)"`+"\n", writer.String())
+ assert.Equal(t, `'foo' "x&(y)"`+"\n", writer.String())
}
- func TestBash_IfCmdShellEscapes(t *testing.T) {
- writer := &BashWriter{}
+ func TestBash_IfCmdShellEscapesLegacy(t *testing.T) {
+ writer := &BashWriter{useNewEscape: false}
writer.IfCmd("foo", "x&(y)")
-- assert.Equal(t, `if $'foo' "x&(y)" >/dev/null 2>/dev/null; then`+"\n", writer.String())
+- assert.Equal(t, `if $'foo' "x&(y)" >/dev/null 2>&1; then`+"\n", writer.String())
+ assert.Equal(t, `if 'foo' "x&(y)" >/dev/null 2>/dev/null; then`+"\n", writer.String())
}
---- gitlab-runner-v12.1.0/executors/shell/executor_shell_test.go 2019-07-19 12:13:32.000000000 +0000
-+++ gitlab-runner-v12.1.0/executors/shell/executor_shell_test.go 2020-04-27 00:01:12.813355024 +0000
-@@ -166,7 +166,7 @@ func TestBuildAbort(t *testing.T) {
- defer abortTimer.Stop()
-
- err = runBuild(t, build)
-- assert.EqualError(t, err, "aborted: interrupt")
-+ assert.EqualError(t, err, "aborted: Interrupt")
- })
- }
-
---- gitlab-runner-v12.1.0/executors/custom/executor_integration_test.go 2019-07-19 12:13:32.000000000 +0000
-+++ gitlab-runner-v12.1.0/executors/custom/executor_integration_test.go 2020-04-27 00:00:42.493354545 +0000
-@@ -234,7 +234,7 @@ func TestBuildAbort(t *testing.T) {
- defer abortTimer.Stop()
-
- err = runBuild(t, build)
-- assert.EqualError(t, err, "aborted: interrupt")
-+ assert.EqualError(t, err, "aborted: Interrupt")
- })
- }
-
---- gitlab-runner-v12.1.0/helpers/shell_escape_test.go 2019-07-19 12:13:32.000000000 +0000
-+++ gitlab-runner-v12.1.0/helpers/shell_escape_test.go 2020-04-27 00:02:36.213356343 +0000
-@@ -24,8 +24,8 @@ func TestShellEscape(t *testing.T) {
- in string
- out string
- }{
-- {"standard string", "$'standard string'"},
-- {"+\t\n\r&", "$'+\\t\\n\\r&'"},
-+ {"standard string", "'standard string'"},
-+ {"+\t\n\r&", "'+\t\n\r&'"},
- {"", "''"},
- }
-
--- gitlab-runner-v12.1.0/common/build_test.go 2019-07-19 12:13:32.000000000 +0000
+++ gitlab-runner-v12.1.0/common/build_test.go 2020-04-27 00:23:35.173376249 +0000
-@@ -1133,7 +1133,7 @@ func TestWaitForTerminal(t *testing.T) {
+@@ -1255,7 +1255,7 @@ func TestWaitForTerminal(t *testing.T) {
},
jobTimeout: 3600,
waitForTerminalTimeout: time.Hour,
diff --git a/user/glm/APKBUILD b/user/glm/APKBUILD
index 54c1d2be6..17f12e864 100644
--- a/user/glm/APKBUILD
+++ b/user/glm/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=glm
pkgver=0.9.9.5
-pkgrel=0
+pkgrel=1
pkgdesc="C++ header-only mathematics library for graphics programming"
url="https://glm.g-truc.net/"
arch="noarch"
@@ -14,25 +14,25 @@ builddir="$srcdir/$pkgname"
replaces="glm-dev"
build() {
- mkdir build
- cd build
+ mkdir -p build
- cmake .. \
+ # See #1170, and upstream#1087
+ export CXXFLAGS="$CXXFLAGS -fno-ipa-modref -fno-stack-protector"
+ cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_LIBDIR=lib \
- -DGLM_TEST_ENABLE=bool:ON
- make
+ -DGLM_TEST_ENABLE=bool:ON \
+ -Bbuild
+ make -C build
}
check() {
- cd build
- make test
+ make -C build test
}
package() {
- cd build
- make install DESTDIR="$pkgdir"
+ make -C build install DESTDIR="$pkgdir"
}
sha512sums="ea4f03d31596e27bd8c3d8d0a82a3ae0050ec0df5a747f3d92e467eacab579bb8b191499cb63bf8574da7a1085b9fe6dd7cd0ce93b758d8d7978b2389cc58b94 glm-0.9.9.5.zip
diff --git a/user/gnucobol/APKBUILD b/user/gnucobol/APKBUILD
index 39889457a..f0807703b 100644
--- a/user/gnucobol/APKBUILD
+++ b/user/gnucobol/APKBUILD
@@ -13,7 +13,7 @@ depends="db-dev gmp-dev json-c-dev libxml2-dev ncurses-dev"
makedepends="autoconf automake help2man libtool texinfo"
subpackages="$pkgname-doc $pkgname-lang"
source="https://ftp.gnu.org/gnu/gnucobol/gnucobol-$pkgver.tar.xz
- https://www.itl.nist.gov/div897/ctg/suites/newcob.val.Z
+ https://distfiles.adelielinux.org/source/archive/$pkgname-$pkgver/newcob.val.Z
0001-move-packed-decimal.patch
0002-errno.patch
diff --git a/user/gprbuild/APKBUILD b/user/gprbuild/APKBUILD
index 9400b0400..da94aa56d 100644
--- a/user/gprbuild/APKBUILD
+++ b/user/gprbuild/APKBUILD
@@ -1,8 +1,6 @@
# Maintainer: Samuel Holland <samuel@sholland.org>
pkgname=gprbuild
-pkgver=2020
-_pkgver=2020-20200814-19ABE
-_xmlver=2020-20200814-19BC4
+pkgver=24.0.0
pkgrel=0
pkgdesc="An advanced build system for multi-language systems"
url="https://github.com/AdaCore/gprbuild"
@@ -11,14 +9,19 @@ options="!check" # No test suite.
license="GPL-3.0+"
depends=""
makedepends="gcc-gnat"
-source="$pkgname-$_pkgver-src.tar.gz::https://community.download.adacore.com/v1/4e13d41920eac86fd139b5d7984eb908d697d868?filename=$pkgname-$_pkgver-src.tar.gz
- xmlada-$_xmlver-src.tar.gz::https://community.download.adacore.com/v1/9cf1ab59b526d1260e007fa9719126c5498632d2?filename=xmlada-$_xmlver-src.tar.gz
+source="https://github.com/AdaCore/gprbuild/archive/v$pkgver/$pkgname-$pkgver.tar.gz
+ https://github.com/AdaCore/xmlada/archive/v$pkgver/xmlada-$pkgver.tar.gz
foxkit.xml
"
-builddir="$srcdir/$pkgname-$_pkgver-src"
+
+prepare() {
+ default_prepare
+ ln -s gpr-util-put_resource_usage__unix.adb \
+ "$builddir"/gpr/src/gpr-util-put_resource_usage.adb
+}
build() {
- xmlada="../xmlada-$_xmlver-src"
+ xmlada="../xmlada-$pkgver"
incflags="-Isrc -Igpr/src -I$xmlada/dom -I$xmlada/input_sources \
-I$xmlada/sax -I$xmlada/schema -I$xmlada/unicode"
gcc -c ${CFLAGS} gpr/src/gpr_imports.c -o gpr_imports.o
@@ -40,13 +43,13 @@ package() {
cp gprlib gprbind \
"$pkgdir"/usr/libexec/gprbuild
mkdir -p "$pkgdir"/usr/share/gpr
- cp share/_default.gpr \
+ cp share/_default.gpr share/share.gpr \
"$pkgdir"/usr/share/gpr
mkdir -p "$pkgdir"/usr/share/gprconfig
- cp share/gprconfig/* "$srcdir"/foxkit.xml \
+ cp "$srcdir"/foxkit.xml \
"$pkgdir"/usr/share/gprconfig
}
-sha512sums="cd9cb2a1f7867f17a5b69d8500476f3a97ca4856b171344d3bf887f55a4860d0ae32ec89ad82e9c7cec13fa20e58cd8ab890554115774095111ed38f9760050e gprbuild-2020-20200814-19ABE-src.tar.gz
-51365bc1baaa0886caf46d75d3d27d56b37d5a02f04673321a60bda14a2adda0edd43321f8b34583d4aeaf852f4a21a924f841899c458076b3f261d881bb29a1 xmlada-2020-20200814-19BC4-src.tar.gz
+sha512sums="09da4d54f2f151e9f9453e1a459533e2373eb5d4c51831be2bf90964ebcf653752de2f8b271c77f7b599f62146516fc60258ec3c96779fa2b52cd52979c6bd03 gprbuild-24.0.0.tar.gz
+4e6773a5fdf9b6ebb5afca913d77aba9f697768f28ef9b23b9277aa4ea4ce09de4e53655dd5559e2326ff847327adb53fa6b776775aa923100a2624df415c97d xmlada-24.0.0.tar.gz
e369c094963d3dcfb03d7ac0949825531bae6410ef9c4bec774cb0da70d2bd4a784bdec37db5151c0371ce769712ee02fc04f36896ccc8bddcdb585c1ee8dbbc foxkit.xml"
diff --git a/user/grfcodec/APKBUILD b/user/grfcodec/APKBUILD
index c240a647a..e571af644 100644
--- a/user/grfcodec/APKBUILD
+++ b/user/grfcodec/APKBUILD
@@ -1,27 +1,33 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=grfcodec
-pkgver=6.0.6
+pkgver=6.1.0
pkgrel=0
pkgdesc="Tool for manipulating OpenTTD GRF files"
-url="https://dev.openttdcoop.org/projects/grfcodec"
+url=" "
arch="all"
options="!check" # No test suite.
license="GPL-2.0-only"
depends=""
-makedepends="boost-dev"
+makedepends="boost-dev cmake"
subpackages="$pkgname-doc"
-source="https://cdn.openttd.org/$pkgname-releases/$pkgver/$pkgname-$pkgver-source.tar.xz
- va_copy.patch
- "
+source="https://github.com/OpenTTD/$pkgname/releases/download/$pkgver/$pkgname-$pkgver-source.tar.xz"
build() {
- make
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
+ ${CMAKE_CROSSOPTS} -Bbuild
+ make -C build
}
package() {
- make prefix=/usr DESTDIR="$pkgdir" install
+ DESTDIR="$pkgdir" make -C build install
}
-sha512sums="543123c794bfdb5b6556f7a897bcd2f3bdd09be8ad6a4ff07b138e0cac62621a4801c732bb20099c1bb383ad5822fc4ade276d49acf2744c811edd10d7699480 grfcodec-6.0.6-source.tar.xz
-4e7034132f889ac62b82d08dae8c928c8a7efd5a0c3dc0d3f35d6c394fb78082a37a22678c5a428489bd26608d868054131a14fb10201d5ce478d46eb9c96890 va_copy.patch"
+sha512sums="9129e0f38b151e11c90585e0fe966e042ad08ec90f800ee80f749865aed6c72c733639b8d02ecd613409f2a0ae6d1f72fa1d3524f7c450a0f06ff42ee170f16f grfcodec-6.1.0-source.tar.xz"
diff --git a/user/grfcodec/va_copy.patch b/user/grfcodec/va_copy.patch
deleted file mode 100644
index 04a549d60..000000000
--- a/user/grfcodec/va_copy.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- grfcodec-6.0.6/src/sanity_defines.h.old 2015-05-09 10:59:46.000000000 +0000
-+++ grfcodec-6.0.6/src/sanity_defines.h 2019-01-14 19:17:36.690000000 +0000
-@@ -77,10 +77,10 @@
- ~apWrapper(){va_end(_ap);}
- operator va_list&(){return _ap;}
- operator const va_list&()const{return _ap;}
--#ifdef __va_copy
-+#ifdef va_copy
- va_list&operator=(va_list&ap){
-- __va_copy(_ap,ap);
-- return _ap;
-+ va_copy(_ap,ap);
-+ return _ap;
- }
- #else
- va_list const&operator=(va_list const&ap){
diff --git a/user/gsl/APKBUILD b/user/gsl/APKBUILD
index 35d6417dd..8c694d429 100644
--- a/user/gsl/APKBUILD
+++ b/user/gsl/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=gsl
-pkgver=2.7.1
-pkgrel=2
+pkgver=2.8
+pkgrel=0
pkgdesc="Modern numerical library for C and C++"
url="https://www.gnu.org/software/gsl/gsl.html"
arch="all"
@@ -12,6 +12,7 @@ makedepends=""
subpackages="$pkgname-dev $pkgname-doc"
source="https://ftp.gnu.org/gnu/gsl/gsl-$pkgver.tar.gz
gsl-2.4-portable.patch
+ static-inline.patch
"
prepare() {
@@ -19,7 +20,7 @@ prepare() {
case "$CTARGET_ARCH" in
pmmx) #763 (applies to this entire block)
- override="multifit_nlinear multilarge_nlinear";
+ override="multifit_nlinear multilarge_nlinear specfunc";
for k in $override; do
sed -i $k/Makefile.in \
-e '/^CFLAGS = /s/$/ -O0/g' \
@@ -64,5 +65,6 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="3300a748b63b583374701d5ae2a9db7349d0de51061a9f98e7c145b2f7de9710b3ad58b3318d0be2a9a287ace4cc5735bb9348cdf48075b98c1f6cc1029df131 gsl-2.7.1.tar.gz
-f6a22e82c8f4a1d5ea7b647cbd015cdb9d2e4e9d39728e8f2dba3fdefac64d3f7c8fbc5ec597e6ab315ec1bd49e0e3af4aba091b358a68d9d789884331f4be24 gsl-2.4-portable.patch"
+sha512sums="4427f6ce59dc14eabd6d31ef1fcac1849b4d7357faf48873aef642464ddf21cc9b500d516f08b410f02a2daa9a6ff30220f3995584b0a6ae2f73c522d1abb66b gsl-2.8.tar.gz
+f6a22e82c8f4a1d5ea7b647cbd015cdb9d2e4e9d39728e8f2dba3fdefac64d3f7c8fbc5ec597e6ab315ec1bd49e0e3af4aba091b358a68d9d789884331f4be24 gsl-2.4-portable.patch
+7aa882af7136b6948124885eec6b9bdb2703f581d1656488a6aab8c48f601690fa87f2d6d2566c3a8fa200a5c09310ee076aec847779490ff02e03a5bcd0a2a0 static-inline.patch"
diff --git a/user/gsl/static-inline.patch b/user/gsl/static-inline.patch
new file mode 100644
index 000000000..4f89f30da
--- /dev/null
+++ b/user/gsl/static-inline.patch
@@ -0,0 +1,12 @@
+diff -ur a/gsl_inline.h b/gsl_inline.h
+--- a/gsl_inline.h 2024-06-05 08:59:43.655369544 -0500
++++ b/gsl_inline.h 2024-06-05 09:00:02.707862690 -0500
+@@ -49,7 +49,7 @@
+ #ifdef HAVE_INLINE
+ # if defined(__GNUC_STDC_INLINE__) || defined(GSL_C99_INLINE) || defined(HAVE_C99_INLINE)
+ # define INLINE_DECL inline /* use C99 inline */
+-# define INLINE_FUN inline
++# define INLINE_FUN static inline
+ # else
+ # define INLINE_DECL /* use GNU extern inline */
+ # define INLINE_FUN extern inline
diff --git a/user/gst-plugins-bad/APKBUILD b/user/gst-plugins-bad/APKBUILD
index 2ddff96a5..badfd94c0 100644
--- a/user/gst-plugins-bad/APKBUILD
+++ b/user/gst-plugins-bad/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=gst-plugins-bad
pkgver=1.20.2
-pkgrel=1
+pkgrel=2
pkgdesc="GStreamer multimedia framework - Lower-quality plugins"
url="https://gstreamer.freedesktop.org/modules/gst-plugins-good.html"
arch="all"
@@ -23,6 +23,7 @@ source="https://gstreamer.freedesktop.org/src/$pkgname/$pkgname-$pkgver.tar.xz
curlhttpsrc.patch
mpegts.patch
fix-arm-test-alignment.patch
+ fix-arm-parser-alignment.patch
"
build() {
@@ -47,4 +48,5 @@ sha512sums="3f98973dc07ead745418e0a30f9f6b5c8d328e3d126f54d92c10ab5da04271768a5c
7f6023e766895ac8213f9dabd4d8acbeb03f18c2d98fa27865e7656c439e0ea97d02f9e9f0ea98205238ddb8f6473062af524b799d1da0cbe41a3055a11df250 camerabin.patch
d4bf36560db0e6391cfca84f928d7147bb6b170431c521e78253b29f6bccf122309e1f92e241808855dfa112b9a06e17c1b6ed4363e011a0693f82e1bfe7ea3e curlhttpsrc.patch
d70f409f86b072d689d51b87db6e9fb161c0914a381eccbf66f1ffcd61b9a793f9e4087cdd071e615aaa63687c6ee476f023239920dd1ebd0d3cde346031dc86 mpegts.patch
-566fbdc37c9f9fb5b671ecffa2f596a95f6431668ff8dd8b91bc827a280b5fb18a8fac3122a38f060263cb3f2d2138805af1e1c324eb619188f982c8cc575221 fix-arm-test-alignment.patch"
+566fbdc37c9f9fb5b671ecffa2f596a95f6431668ff8dd8b91bc827a280b5fb18a8fac3122a38f060263cb3f2d2138805af1e1c324eb619188f982c8cc575221 fix-arm-test-alignment.patch
+f394b1643a5d0943e8acd7e9ee11702ce3bbfb27242f3eac140b884ce7bb5dea725ab4bb0a28cbf9d435622dcc68ea0ee0bee1c51a520787c382167dd1e43583 fix-arm-parser-alignment.patch"
diff --git a/user/gst-plugins-bad/fix-arm-parser-alignment.patch b/user/gst-plugins-bad/fix-arm-parser-alignment.patch
new file mode 100644
index 000000000..63715380e
--- /dev/null
+++ b/user/gst-plugins-bad/fix-arm-parser-alignment.patch
@@ -0,0 +1,32 @@
+This patch differs from upstream in the following way(s):
+
+ * Paths changed to accommodate 'builddir'
+
+From 10930661ee8ab2f43078ece482c33ca74c2440fb Mon Sep 17 00:00:00 2001
+From: Zach van Rijn <me@zv.io>
+Date: Thu, 13 Jun 2024 09:11:30 -0500
+Subject: [PATCH] pcapparse: Avoid unaligned memory access
+
+Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3602
+---
+ subprojects/gst-plugins-bad/gst/pcapparse/gstpcapparse.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/subprojects/gst-plugins-bad/gst/pcapparse/gstpcapparse.c b/subprojects/gst-plugins-bad/gst/pcapparse/gstpcapparse.c
+index 53e7ef6fc25..0a9c9a6063b 100644
+--- a/gst/pcapparse/gstpcapparse.c
++++ b/gst/pcapparse/gstpcapparse.c
+@@ -456,8 +456,8 @@ gst_pcap_parse_scan_frame (GstPcapParse * self,
+ return FALSE;
+
+ /* ip info */
+- ip_src_addr = *((guint32 *) (buf_ip + 12));
+- ip_dst_addr = *((guint32 *) (buf_ip + 16));
++ memcpy(&ip_src_addr, buf_ip + 12, sizeof(ip_src_addr));
++ memcpy(&ip_dst_addr, buf_ip + 16, sizeof(ip_dst_addr));
+ buf_proto = buf_ip + ip_header_size;
+ ip_packet_len = GUINT16_FROM_BE (*(guint16 *) (buf_ip + 2));
+
+--
+GitLab
+
diff --git a/user/horizon/APKBUILD b/user/horizon/APKBUILD
index 4ae0f4640..260ddc9b6 100644
--- a/user/horizon/APKBUILD
+++ b/user/horizon/APKBUILD
@@ -30,7 +30,7 @@ build() {
-DBUILD_SHARED_LIBS=True \
-DBUILD_TOOLS=ON \
-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
- -DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-format-truncation" \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-format-truncation -Wno-type-limits" \
-DCMAKE_C_FLAGS="$CFLAGS" \
-DUNSUPPORTED_NONFREE_FIRMWARE=ON \
-DINSTALL=ON \
diff --git a/user/htop/APKBUILD b/user/htop/APKBUILD
index 69994dfab..aba5d2c6b 100644
--- a/user/htop/APKBUILD
+++ b/user/htop/APKBUILD
@@ -1,20 +1,25 @@
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=htop
-pkgver=2.2.0
-pkgrel=1
+pkgver=3.4.0_git20240813
+_pkgcommit=59578afd5e5856e2b017d40e20ebe32102f123aa
+pkgrel=0
pkgdesc="Interactive process viewer"
-url="http://hisham.hm/htop"
+url="https://htop.dev/"
arch="all"
options="!check" # No test suite.
license="GPL-2.0+"
depends=""
-makedepends="libexecinfo-dev ncurses-dev python3"
+makedepends="autoconf automake libexecinfo-dev ncurses-dev python3"
subpackages="$pkgname-doc"
-source="http://hisham.hm/htop/releases/$pkgver/$pkgname-$pkgver.tar.gz
- correctness.patch
- fix-python-path.patch
- "
+#source="https://github.com/htop-dev/htop/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"
+source="${pkgname}-${_pkgcommit}.tar.gz::https://github.com/htop-dev/${pkgname}/archive/${_pkgcommit}.tar.gz"
+builddir="$srcdir"/${pkgname}-${_pkgcommit}
+
+prepare() {
+ default_prepare
+ ./autogen.sh
+}
build() {
LIBS="-lexecinfo" ./configure \
@@ -23,9 +28,7 @@ build() {
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
- --localstatedir=/var \
- --enable-cgroup \
- --enable-taskstats
+ --localstatedir=/var
make
}
@@ -33,6 +36,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="ec1335bf0e3e0387e5e50acbc508d0effad19c4bc1ac312419dc97b82901f4819600d6f87a91668f39d429536d17304d4b14634426a06bec2ecd09df24adc62e htop-2.2.0.tar.gz
-010ca1d42caeea133ba3d0383373a8eca849c73c95bb98fe3222c458c44320d1e2a3aee9431213721f1ccfcbd5af54eb1e54fafd6e0e5ca3b87499ee6d04b49a correctness.patch
-16358bcd6d83181cc04dd8a7971f7cc0804dc49995208bad2042bcca7962f562bbd008c2185f24aa6186c58896e94e4ec02e2053dc46ed14789889d64836b679 fix-python-path.patch"
+sha512sums="0cca8d0947e45875d15a6a18b5959a37a76d4a14ff77ceb2840d446d2dd58814cc80bfa34da4f58949076980cd695a77ad9f12464964937b8f7bcc6328d3e551 htop-59578afd5e5856e2b017d40e20ebe32102f123aa.tar.gz"
diff --git a/user/htop/correctness.patch b/user/htop/correctness.patch
deleted file mode 100644
index 51a9848d2..000000000
--- a/user/htop/correctness.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From: Jonathan Currier <dullfire@yahoo.com>
-
-diff --git a/MainPanel.h b/MainPanel.h
-index 8849659..471870b 100644
---- a/MainPanel.h
-+++ b/MainPanel.h
-@@ -12,6 +12,7 @@ in the source distribution for its full text.
- #include "Panel.h"
- #include "Action.h"
- #include "Settings.h"
-+#include "union-arg.h"
-
- typedef struct MainPanel_ {
- Panel super;
-@@ -21,11 +22,6 @@ typedef struct MainPanel_ {
- pid_t pidSearch;
- } MainPanel;
-
--typedef union {
-- int i;
-- void* v;
--} Arg;
--
- typedef bool(*MainPanel_ForeachProcessFn)(Process*, Arg);
-
- #define MainPanel_getFunctionBar(this_) (((Panel*)(this_))->defaultBar)
-diff --git a/Process.c b/Process.c
-index 471f529..ae617a6 100644
---- a/Process.c
-+++ b/Process.c
-@@ -548,7 +548,9 @@ bool Process_changePriorityBy(Process* this, int delta) {
- return Process_setPriority(this, this->nice + delta);
- }
-
--void Process_sendSignal(Process* this, int sgn) {
-+
-+void Process_sendSignal(Process* this, Arg arg) {
-+ int sgn = arg.i;
- CRT_dropPrivileges();
- kill(this->pid, (int) sgn);
- CRT_restorePrivileges();
-diff --git a/Process.h b/Process.h
-index f702ca0..3011845 100644
---- a/Process.h
-+++ b/Process.h
-@@ -29,6 +29,7 @@ in the source distribution for its full text.
- #include "Object.h"
-
- #include <sys/types.h>
-+#include "union-arg.h"
-
- #define PROCESS_FLAG_IO 0x0001
-
-@@ -199,7 +200,7 @@ bool Process_setPriority(Process* this, int priority);
-
- bool Process_changePriorityBy(Process* this, int delta);
-
--void Process_sendSignal(Process* this, int sgn);
-+void Process_sendSignal(Process* this, Arg arg);
-
- long Process_pidCompare(const void* v1, const void* v2);
-
-diff --git a/union-arg.h b/union-arg.h
-new file mode 100644
-index 0000000..5c8a094
---- /dev/null
-+++ b/union-arg.h
-@@ -0,0 +1,9 @@
-+#ifndef UNION_ARG_HEADER
-+#define UNION_ARG_HEADER
-+
-+typedef union {
-+ int i;
-+ void* v;
-+} Arg;
-+
-+#endif
-
diff --git a/user/htop/fix-python-path.patch b/user/htop/fix-python-path.patch
deleted file mode 100644
index 4d11bfb4a..000000000
--- a/user/htop/fix-python-path.patch
+++ /dev/null
@@ -1,8 +0,0 @@
---- a/scripts/MakeHeader.py
-+++ b/scripts/MakeHeader.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- import os, sys, string, io
- try:
- from StringIO import StringIO
diff --git a/user/i3lock/APKBUILD b/user/i3lock/APKBUILD
index a84c7b712..098767d75 100644
--- a/user/i3lock/APKBUILD
+++ b/user/i3lock/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Johannes Matheis <jomat+alpinebuild@jmt.gr>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=i3lock
-pkgver=2.12
+pkgver=2.15
pkgrel=0
pkgdesc="Simple X11 screen locker"
url="https://i3wm.org/i3lock/"
@@ -9,33 +9,18 @@ arch="all"
options="!check" # No test suite.
license="MIT"
depends="xkeyboard-config"
-makedepends="cairo-dev libev-dev libxkbcommon-dev linux-pam-dev cmd:which
+makedepends="cairo-dev libev-dev libxkbcommon-dev linux-pam-dev meson
xcb-util-image-dev xcb-util-xrm-dev"
subpackages="$pkgname-doc"
-source="$url/$pkgname-$pkgver.tar.bz2"
-
-prepare() {
- default_prepare
- # At present, this has no functional difference.
- # But when we start developing our PAM stack into something more
- # mature, this will be important, because i3lock runs unprivileged.
- sed -i -e 's:login:base-auth:g' pam/i3lock
-}
+source="$url/$pkgname-$pkgver.tar.xz"
build() {
- ./configure \
- --build=$CBUILD \
- --host=$CHOST \
- --prefix=/usr \
- --sysconfdir=/etc \
- --mandir=/usr/share/man \
- --localstatedir=/var
-
- make
+ meson setup -Dprefix=/usr build
+ meson compile -C build
}
package() {
- make DESTDIR="$pkgdir" install
+ DESTDIR="$pkgdir" meson install -C build
}
-sha512sums="84f1558368381bcad9a64f41ab6134a6614dea453d1ee5ecfe886185b9e1baebeeca446c4635158deb8dae5b25c09d47d3990239d76c44e5325ca5bfaad9b2ad i3lock-2.12.tar.bz2"
+sha512sums="6079f5233c0820c6e38f3cd8f3732d585e95e7d670408e4fb18ab580a2e1face8f3d6ea13eaaeedc8671f74def917183667e736b35306bf7c630d40625b41ac2 i3lock-2.15.tar.xz"
diff --git a/user/ifupdown-ng/APKBUILD b/user/ifupdown-ng/APKBUILD
new file mode 100644
index 000000000..8ac58f0e1
--- /dev/null
+++ b/user/ifupdown-ng/APKBUILD
@@ -0,0 +1,110 @@
+# Contributor: Ermine <mustela@erminea.space>
+# Contributor: Ariadne Conill <ariadne@dereferenced.org>
+# Maintainer: Ermine <mustela@erminea.space>
+pkgname=ifupdown-ng
+pkgver=0.12.1
+pkgrel=0
+pkgdesc="Tools for managing network configuration"
+url="https://github.com/ifupdown-ng/ifupdown-ng"
+arch="all"
+license="ISC AND BSD-2-Clause"
+depends="kyua atf"
+makedepends="scdoc"
+subpackages="$pkgname-doc $pkgname-openrc $pkgname-iproute2 $pkgname-ppp
+ $pkgname-wireguard $pkgname-ethtool $pkgname-wifi"
+source="https://distfiles.ariadne.space/ifupdown-ng/ifupdown-ng-$pkgver.tar.xz
+ ifupdown-ng.initd
+ "
+
+# We only install the core executors right now. The other executors are
+# still being ported to run under ifupdown-ng natively, and so we will
+# use the ifupdown scripts for now for those cases. However, it is nice
+# to make the automatic dependency resolution work, and ifupdown-ng
+# provides some stubs to enable that.
+_executor_stubs="bridge bond"
+
+# These are optional executors which do not conflict with what we are
+# presently shipping. These executors require iproute2.
+_executor_iproute2="vrf gre vxlan mpls"
+
+# These are all optional executors we plan to use.
+_executor_opt="ppp wireguard wireguard-quick ethtool wifi $_executor_iproute2"
+
+build() {
+ make
+ make docs
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$pkgdir" EXECUTOR_SCRIPTS_OPT="$_executor_opt" \
+ EXECUTOR_SCRIPTS_STUB="$_executor_stubs" install install_docs
+ install -Dm755 "$srcdir"/ifupdown-ng.initd "$pkgdir"/etc/init.d/ifupdown-ng
+}
+
+iproute2() {
+ pkgdesc="ifupdown-ng integration for iproute2"
+ depends="iproute2"
+ install_if="$pkgname=$pkgver-r$pkgrel $depends"
+
+ mkdir -p "$subpkgdir"/usr/libexec/ifupdown-ng
+ for exec in $_executor_iproute2; do
+ mv "$pkgdir"/usr/libexec/ifupdown-ng/$exec \
+ "$subpkgdir"/usr/libexec/ifupdown-ng/$exec
+ done
+}
+
+ppp() {
+ pkgdesc="ifupdown-ng integration for ppp"
+ depends="ppp"
+ install_if="$pkgname=$pkgver-r$pkgrel $depends"
+
+ mkdir -p "$subpkgdir"/usr/libexec/ifupdown-ng
+ mv "$pkgdir"/usr/libexec/ifupdown-ng/ppp \
+ "$subpkgdir"/usr/libexec/ifupdown-ng/ppp
+}
+
+wireguard() {
+ pkgdesc="ifupdown-ng integration for wireguard"
+ depends="wireguard-tools"
+ install_if="$pkgname=$pkgver-r$pkgrel $depends"
+
+ mkdir -p "$subpkgdir"/usr/libexec/ifupdown-ng
+ mv "$pkgdir"/usr/libexec/ifupdown-ng/wireguard \
+ "$subpkgdir"/usr/libexec/ifupdown-ng/wireguard
+ mv "$pkgdir"/usr/libexec/ifupdown-ng/wireguard-quick \
+ "$subpkgdir"/usr/libexec/ifupdown-ng/wireguard-quick
+}
+
+ethtool() {
+ pkgdesc="ifupdown-ng integration for ethtool"
+ depends="ethtool"
+ install_if="$pkgname=$pkgver-r$pkgrel $depends"
+
+ mkdir -p "$subpkgdir"/usr/libexec/ifupdown-ng
+ mv "$pkgdir"/usr/libexec/ifupdown-ng/ethtool \
+ "$subpkgdir"/usr/libexec/ifupdown-ng/ethtool
+}
+
+wifi() {
+ pkgdesc="ifupdown-ng integration for wifi"
+ depends="wpa_supplicant"
+ install_if="$pkgname=$pkgver-r$pkgrel $depends"
+
+ mkdir -p "$subpkgdir"/usr/libexec/ifupdown-ng
+ mv "$pkgdir"/usr/libexec/ifupdown-ng/wifi \
+ "$subpkgdir"/usr/libexec/ifupdown-ng/wifi
+}
+
+doc() {
+ default_doc
+
+ mkdir -p "$subpkgdir"/etc/network
+ mv "$pkgdir"/etc/network/ifupdown-ng.conf.example \
+ "$subpkgdir"/etc/network/ifupdown-ng.conf.example
+}
+sha512sums="c2c1e27fbd53eeb4150e544a893352f13845b491850e982a5880160c3be03b628794f7989c802ff823ac3e8c6c34dc4ab97c0abcefdda85f06fcd64ced8ac60c ifupdown-ng-0.12.1.tar.xz
+aa1dd3d31872d7ec308b534044e490136de47a3e72575a96522f60c5740ee3b953a17e05013359d27985ac16b048ff8fff76e8ac1103802a4fb75a31d2185d45 ifupdown-ng.initd"
diff --git a/user/ifupdown-ng/ifupdown-ng.initd b/user/ifupdown-ng/ifupdown-ng.initd
new file mode 100644
index 000000000..adae1b66c
--- /dev/null
+++ b/user/ifupdown-ng/ifupdown-ng.initd
@@ -0,0 +1,91 @@
+#!/sbin/openrc-run
+
+# Copyright (c) Natanael Copa
+# This code is licensed under BSD-2-Clause
+#
+# note that the spoofprotect, syncoockies and ip_forward options are set in
+# /etc/sysctl.conf
+
+: ${cfgfile:="/etc/network/interfaces"}
+: ${ifquery:="ifquery"}
+: ${ifstate:="/run/ifstate"}
+
+single_iface="${RC_SVCNAME#*.}"
+if [ "$single_iface" = "$RC_SVCNAME" ]; then
+ single_iface=
+fi
+
+depend() {
+ need localmount hostname
+ want dev-settle
+ after bootmisc hwdrivers modules
+ provide net
+ keyword -jail -prefix -vserver -docker
+}
+
+# find interfaces we want to start
+find_ifaces() {
+ if [ -n "$single_iface" ]; then
+ echo $single_iface
+ return 0
+ fi
+
+ if command -v "$ifquery" >/dev/null; then
+ $ifquery -i "$cfgfile" --list -a
+ return
+ fi
+
+ # fallback in case ifquery does not exist
+ awk '$1 == "auto" {for (i = 2; i <= NF; i = i + 1) printf("%s ", $i)}' "$cfgfile"
+}
+
+# return the list of interfaces we should try stop
+find_running_ifaces() {
+ if [ -n "$single_iface" ]; then
+ echo $single_iface
+ return 0
+ fi
+
+ if command -v "$ifquery" >/dev/null; then
+ $ifquery --state-file $ifstate -i "$cfgfile" --running
+ return
+ fi
+
+ # fallback
+ awk -F= '{print $2}' $ifstate
+}
+
+start() {
+ local iface= ret=1
+ ebegin "Starting networking"
+ eindent
+ for iface in $(find_ifaces); do
+ local r=0
+ ebegin "$iface"
+ if ! ifup -i "$cfgfile" $iface >/dev/null; then
+ ifdown -i "$cfgfile" $iface >/dev/null 2>&1
+ r=1
+ fi
+ # atleast one interface needs to be started for action
+ # to be success
+ eend $r && ret=0
+ done
+ eoutdent
+ return $ret
+}
+
+stop() {
+ local iface=
+ # Don't stop the network at shutdown.
+ yesno ${keep_network:-YES} && yesno $RC_GOINGDOWN && return 0
+
+ ebegin "Stopping networking"
+ eindent
+ for iface in $(find_running_ifaces); do
+ ebegin "$iface"
+ ifdown -i "$cfgfile" -f $iface >/dev/null
+ eend $?
+ done
+ eoutdent
+ return 0
+}
diff --git a/user/kaffeine/APKBUILD b/user/kaffeine/APKBUILD
index 40c15bb0a..bcc1faa94 100644
--- a/user/kaffeine/APKBUILD
+++ b/user/kaffeine/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=kaffeine
pkgver=2.0.18
-pkgrel=0
+pkgrel=1
pkgdesc="Media player with a focus on Digital TV (DVB)"
url="https://www.kde.org/applications/multimedia/kaffeine/"
arch="all"
diff --git a/user/libetonyek/APKBUILD b/user/libetonyek/APKBUILD
index feada550a..3b40c1484 100644
--- a/user/libetonyek/APKBUILD
+++ b/user/libetonyek/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=libetonyek
pkgver=0.1.10
-pkgrel=1
+pkgrel=2
pkgdesc="Import filter and tools for Apple iWork documents"
url="https://wiki.documentfoundation.org/DLP/Libraries/libetonyek"
arch="all"
@@ -13,7 +13,7 @@ checkdepends="cppunit-dev"
makedepends="$depends_dev librevenge-dev liblangtag-dev zlib-dev
libxml2-dev gperf doxygen mdds"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
-source="http://dev-www.libreoffice.org/src/$pkgname/$pkgname-$pkgver.tar.xz"
+source="https://dev-www.libreoffice.org/src/$pkgname/$pkgname-$pkgver.tar.xz"
build() {
./configure \
@@ -26,7 +26,7 @@ build() {
--localstatedir=/var \
--disable-werror \
--disable-static \
- --with-mdds=2.0
+ --with-mdds=2.1
make
}
diff --git a/user/libgnt/APKBUILD b/user/libgnt/APKBUILD
index bd4b921c4..55703f4e8 100644
--- a/user/libgnt/APKBUILD
+++ b/user/libgnt/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=libgnt
-pkgver=2.14.0
+pkgver=2.14.3
pkgrel=0
pkgdesc="Glib Ncurses Toolkit"
url="https://pidgin.im/"
@@ -12,6 +12,7 @@ makedepends="glib-dev gtk-doc meson ncurses-dev ninja"
subpackages="$pkgname-dev $pkgname-doc"
source="https://downloads.sourceforge.net/pidgin/libgnt-$pkgver.tar.xz
tinfo.patch
+ ncurses.patch
"
build() {
@@ -20,7 +21,7 @@ build() {
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
- --buildtype=release \
+ -Dpython2=false \
. output
ninja -C output
}
@@ -33,5 +34,6 @@ package() {
DESTDIR="$pkgdir" ninja -C output install
}
-sha512sums="0d9c5550374696a0e6ede5246cda3c372d7055d21b9ffaf10be88d6a469bdf18c7dd1113ec612acf4889c0e5686ea87bb0e8348ca8985fd5ff8913afc5813b38 libgnt-2.14.0.tar.xz
-56ce8dab03e74714ecfe0cb7dd274c5fce996d84793fff5e247ee329b1c5bebf2d933b96cc6fe916dafb4f402269d3b1b8cacda07deff4c149869d509ee5c416 tinfo.patch"
+sha512sums="7131834cfe585177865bebf26167de08a04fced3da4e9a072d9b09b3becd1194914757b1a1fc8f129ae6c8fefe3ec1ce0d80d6c50cb624a5698b66ee2e06c6c8 libgnt-2.14.3.tar.xz
+56ce8dab03e74714ecfe0cb7dd274c5fce996d84793fff5e247ee329b1c5bebf2d933b96cc6fe916dafb4f402269d3b1b8cacda07deff4c149869d509ee5c416 tinfo.patch
+cfdd0667238948ac45ce992c3b0ef7aa90fc9c8a06ee695d5b516deac17e3e57460dbb3072ee0248ada3bf5d24d2a75736259dd873a6c72483a1040259831b49 ncurses.patch"
diff --git a/user/libgnt/ncurses.patch b/user/libgnt/ncurses.patch
new file mode 100644
index 000000000..0d91c2dbf
--- /dev/null
+++ b/user/libgnt/ncurses.patch
@@ -0,0 +1,62 @@
+# HG changeset patch
+# Node ID 7c4e8ad1e3c7
+# Parent 73d8724225e7
+diff --git a/gntwm.c b/gntwm.c
+--- a/gntwm.c
++++ b/gntwm.c
+@@ -166,38 +166,40 @@
+ int sx, ex, sy, ey, w, y;
+ cchar_t ch;
+ PANEL *below = panel;
++ WINDOW *window = panel_window(panel);
+
+- sx = getbegx(panel->win);
+- ex = getmaxx(panel->win) + sx;
+- sy = getbegy(panel->win);
+- ey = getmaxy(panel->win) + sy;
++ sx = getbegx(window);
++ ex = getmaxx(window) + sx;
++ sy = getbegy(window);
++ ey = getmaxy(window) + sy;
+
+ while ((below = panel_below(below)) != NULL) {
+- if (sy > getbegy(below->win) + getmaxy(below->win) ||
+- ey < getbegy(below->win))
++ window = panel_window(below);
++ if (sy > getbegy(window) + getmaxy(window) ||
++ ey < getbegy(window))
+ continue;
+- if (sx > getbegx(below->win) + getmaxx(below->win) ||
+- ex < getbegx(below->win))
++ if (sx > getbegx(window) + getmaxx(window) ||
++ ex < getbegx(window))
+ continue;
+- for (y = MAX(sy, getbegy(below->win)); y <= MIN(ey, getbegy(below->win) + getmaxy(below->win)); y++) {
+- if (mvwin_wch(below->win, y - getbegy(below->win), sx - 1 - getbegx(below->win), &ch) != OK)
++ for (y = MAX(sy, getbegy(window)); y <= MIN(ey, getbegy(window) + getmaxy(window)); y++) {
++ if (mvwin_wch(window, y - getbegy(window), sx - 1 - getbegx(window), &ch) != OK)
+ goto right;
+ w = widestringwidth(ch.chars);
+ if (w > 1 && (ch.attr & 1)) {
+ ch.chars[0] = ' ';
+ ch.attr &= ~ A_CHARTEXT;
+- mvwadd_wch(below->win, y - getbegy(below->win), sx - 1 - getbegx(below->win), &ch);
+- touchline(below->win, y - getbegy(below->win), 1);
++ mvwadd_wch(window, y - getbegy(window), sx - 1 - getbegx(window), &ch);
++ touchline(window, y - getbegy(window), 1);
+ }
+ right:
+- if (mvwin_wch(below->win, y - getbegy(below->win), ex + 1 - getbegx(below->win), &ch) != OK)
++ if (mvwin_wch(window, y - getbegy(window), ex + 1 - getbegx(window), &ch) != OK)
+ continue;
+ w = widestringwidth(ch.chars);
+ if (w > 1 && !(ch.attr & 1)) {
+ ch.chars[0] = ' ';
+ ch.attr &= ~ A_CHARTEXT;
+- mvwadd_wch(below->win, y - getbegy(below->win), ex + 1 - getbegx(below->win), &ch);
+- touchline(below->win, y - getbegy(below->win), 1);
++ mvwadd_wch(window, y - getbegy(window), ex + 1 - getbegx(window), &ch);
++ touchline(window, y - getbegy(window), 1);
+ }
+ }
+ }
diff --git a/user/libgphoto2/APKBUILD b/user/libgphoto2/APKBUILD
index e152d5e7b..ce6ffa88c 100644
--- a/user/libgphoto2/APKBUILD
+++ b/user/libgphoto2/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer:
pkgname=libgphoto2
pkgver=2.5.25
-pkgrel=0
+pkgrel=1
pkgdesc="Digital camera library"
url="http://www.gphoto.org"
arch="all"
@@ -9,7 +9,7 @@ options="libtool"
license="LGPL-2.1+"
depends=""
depends_dev="libexif-dev libusb-dev"
-makedepends="$depends_dev libjpeg-turbo-dev libtool"
+makedepends="$depends_dev libjpeg-turbo-dev libtool libxml2-dev"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="https://downloads.sourceforge.net/gphoto/libgphoto2-$pkgver.tar.bz2"
diff --git a/user/libixion/APKBUILD b/user/libixion/APKBUILD
index 3cc3e2659..d262e50e6 100644
--- a/user/libixion/APKBUILD
+++ b/user/libixion/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=libixion
-pkgver=0.17.0
+pkgver=0.19.0
pkgrel=0
pkgdesc="A general purpose formula parser & interpreter"
url="https://gitlab.com/ixion/ixion"
@@ -9,14 +9,15 @@ arch="all"
license="MPL-2.0"
depends=""
depends_dev="mdds"
-makedepends="$depends_dev boost-dev spdlog autoconf automake libtool cmd:which"
+makedepends="$depends_dev boost-dev spdlog"
subpackages="$pkgname-dev"
-source="https://gitlab.com/ixion/ixion/-/archive/$pkgver/ixion-$pkgver.tar.bz2"
-
-builddir="$srcdir/ixion-$pkgver"
+source="https://gitlab.com/api/v4/projects/ixion%2Fixion/packages/generic/source/$pkgver/$pkgname-$pkgver.tar.xz"
build() {
- ./autogen.sh \
+ # GCC 13 changed default fp precision behavior. (#1193, #1214)
+ export CXXFLAGS="${CXXFLAGS} -fexcess-precision=fast"
+
+ ./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
@@ -41,4 +42,4 @@ dev() {
mv "$pkgdir"/usr/bin "$subpkgdir"/usr
}
-sha512sums="f6216b06342c43ddf937bcc7eb3104e500bc10d6798f9b24c92c423bda575ac3f7bdae68bb81b2826c164e7dd19bbef940a3848581c5f9e969a6e70934e58d0a ixion-0.17.0.tar.bz2"
+sha512sums="f06edbcf5ae7459a46e01273952ce6fbc4e8f2b7782c7e07645dc30e102f20f542e449acafc26484765207b10656e0b350f4108cbf1e03947ee7267254cf6f97 libixion-0.19.0.tar.xz"
diff --git a/user/liblbxutil/APKBUILD b/user/liblbxutil/APKBUILD
index 2c7f03f5d..1e3c56c36 100644
--- a/user/liblbxutil/APKBUILD
+++ b/user/liblbxutil/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=liblbxutil
pkgver=1.1.0
-pkgrel=0
+pkgrel=1
pkgdesc="Utility library for X11 Low Bandwidth extension"
url="https://www.X.Org/"
arch="all"
@@ -10,7 +10,9 @@ license="MIT"
depends=""
makedepends="xorgproto-dev zlib-dev"
subpackages="$pkgname-dev"
-source="https://www.x.org/releases/individual/lib/liblbxutil-$pkgver.tar.bz2"
+source="https://www.x.org/releases/individual/lib/liblbxutil-$pkgver.tar.bz2
+ gcc10.patch
+ "
prepare() {
default_prepare
@@ -37,4 +39,5 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="93bdefef297d46a301dd1cab35ad186438e340822ba5aac20e9d8f4c51cd66e4118b0d9f4afc48ef33a67c6e413f551bcb59089d01597ed175b400902b9f23f4 liblbxutil-1.1.0.tar.bz2"
+sha512sums="93bdefef297d46a301dd1cab35ad186438e340822ba5aac20e9d8f4c51cd66e4118b0d9f4afc48ef33a67c6e413f551bcb59089d01597ed175b400902b9f23f4 liblbxutil-1.1.0.tar.bz2
+c1abd8d42e11d84019f5bc3e93774a1b65201c9e08b70a5cf0b78680bdc9d6a49043908510c2dccdf1b53dc6b434261377b0330ab603c8d4929cf001b802f44c gcc10.patch"
diff --git a/user/liblbxutil/gcc10.patch b/user/liblbxutil/gcc10.patch
new file mode 100644
index 000000000..5e9b99d91
--- /dev/null
+++ b/user/liblbxutil/gcc10.patch
@@ -0,0 +1,18 @@
+--- liblbxutil-1.1.0/src/lbx_zlib/lbx_zlib.h.old 2009-11-02 23:52:21.000000000 -0600
++++ liblbxutil-1.1.0/src/lbx_zlib/lbx_zlib.h 2024-05-29 21:33:09.169332780 -0500
+@@ -136,9 +136,9 @@
+ #endif
+
+ /* lbx_zlib.c */
+-unsigned long stream_out_compressed;
+-unsigned long stream_out_uncompressed;
+-unsigned long stream_out_plain;
+-unsigned long stream_in_compressed;
+-unsigned long stream_in_uncompressed;
+-unsigned long stream_in_plain;
++extern unsigned long stream_out_compressed;
++extern unsigned long stream_out_uncompressed;
++extern unsigned long stream_out_plain;
++extern unsigned long stream_in_compressed;
++extern unsigned long stream_in_uncompressed;
++extern unsigned long stream_in_plain;
diff --git a/user/libmspub/APKBUILD b/user/libmspub/APKBUILD
index 0d528f945..67095a16c 100644
--- a/user/libmspub/APKBUILD
+++ b/user/libmspub/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=libmspub
pkgver=0.1.4
-pkgrel=1
+pkgrel=2
pkgdesc="Import filter and tools for Microsoft Publisher files"
url="https://wiki.documentfoundation.org/DLP/Libraries/libmspub"
arch="all"
@@ -12,7 +12,9 @@ depends=""
depends_dev="boost-dev"
makedepends="$depends_dev doxygen icu-dev librevenge-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
-source="http://dev-www.libreoffice.org/src/$pkgname/$pkgname-$pkgver.tar.xz"
+source="https://dev-www.libreoffice.org/src/$pkgname/$pkgname-$pkgver.tar.xz
+ missing-header.patch
+ "
build() {
./configure \
@@ -35,4 +37,5 @@ tools() {
mv "$pkgdir"/usr/bin "$subpkgdir"/usr
}
-sha512sums="7275f890645961b3fd56df4584788962e8c064fe3f99f5834c6ba6177ce76d00d544fbe9a25b7ab2f4180d2f3a90c609fe0bb68d61ea24e95b086190390fff31 libmspub-0.1.4.tar.xz"
+sha512sums="7275f890645961b3fd56df4584788962e8c064fe3f99f5834c6ba6177ce76d00d544fbe9a25b7ab2f4180d2f3a90c609fe0bb68d61ea24e95b086190390fff31 libmspub-0.1.4.tar.xz
+3293b4e10f91e2df7aa1817709c7370aa3d68dccbd3ad68c2e52add5b8caf8dded36e6778dea5c24a0cc3f40d9b6c0a00e0b62d1e8264c6b085a9f6e773d2cb2 missing-header.patch"
diff --git a/user/libmspub/missing-header.patch b/user/libmspub/missing-header.patch
new file mode 100644
index 000000000..83b8ef473
--- /dev/null
+++ b/user/libmspub/missing-header.patch
@@ -0,0 +1,10 @@
+--- libmspub-0.1.4/src/lib/MSPUBMetaData.h.old 2018-02-28 05:54:49.000000000 -0600
++++ libmspub-0.1.4/src/lib/MSPUBMetaData.h 2024-05-29 21:40:50.140097148 -0500
+@@ -13,6 +13,7 @@
+ #include <map>
+ #include <utility>
+ #include <vector>
++#include <cstdint>
+
+ #include <librevenge/librevenge.h>
+
diff --git a/user/libnatpmp/APKBUILD b/user/libnatpmp/APKBUILD
index bd2facd27..05f8eaa80 100644
--- a/user/libnatpmp/APKBUILD
+++ b/user/libnatpmp/APKBUILD
@@ -4,14 +4,14 @@ pkgname=libnatpmp
pkgver=20150609
pkgrel=0
pkgdesc="A portable and fully compliant implementation of the NAT-PMP protocol"
-url="https://miniupnp.tuxfamily.org/libnatpmp.html"
+url="http://miniupnp.free.fr/libnatpmp.html"
arch="all"
options="!check"
license="BSD-3-Clause"
depends=""
makedepends=""
subpackages="$pkgname-dev"
-source="https://miniupnp.tuxfamily.org/files/libnatpmp-$pkgver.tar.gz"
+source="http://miniupnp.free.fr/files/libnatpmp-$pkgver.tar.gz"
build() {
make
diff --git a/user/libnih/APKBUILD b/user/libnih/APKBUILD
index a1bd5883e..523b8a1a9 100644
--- a/user/libnih/APKBUILD
+++ b/user/libnih/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=libnih
pkgver=1.0.3
-pkgrel=6
+pkgrel=7
pkgdesc="GLib-like library for embedded use"
url="https://launchpad.net/libnih"
arch="all"
@@ -18,6 +18,7 @@ source="https://launchpad.net/libnih/${pkgver%.*}/${pkgver}/+download/${pkgname}
disable-broken-test.patch
musl-enomem-message.patch
parse-test-fix.patch
+ gcc10.patch
"
prepare() {
@@ -48,4 +49,5 @@ sha512sums="fce40d2445b28c27b8838631681ca3206a4f053b2dd4fc488fc9ef98bbd3d933e3d6
77a979b3076c4e4229359f28c2e9d4fb66d799a66d60391ab6fd7e0dfe2a615b88330a979877b105293a95ed147546596eca174f52b75beca0457c49a017d040 musl-fix-signals.patch
b5b77b1f18d7aa5d603a0d312b785c28200c38b7bbe5c384ee576c762bd9e3163682c29dd5410baf18c5c3734f0b719602caa1de096f1758d624d94b7753066a disable-broken-test.patch
b800c99153ad66c9d7399bc7544a0237de0c7a4ddac129509f13eb1c31805fcac31c93bbf2945da557dfc900c9ec837ec0fded1c3f9887095dae52ff6fc046ec musl-enomem-message.patch
-3f24f648c27e9b5a6872859fe97b34055b0f43b11f0321508852b20b6dd94de5c8d24a6dbaab9d49e7004bf0c571c11ebf520d49630d8a89bceeb7783de7dcd2 parse-test-fix.patch"
+3f24f648c27e9b5a6872859fe97b34055b0f43b11f0321508852b20b6dd94de5c8d24a6dbaab9d49e7004bf0c571c11ebf520d49630d8a89bceeb7783de7dcd2 parse-test-fix.patch
+e2fc351e68ab194723b95a37b4b78c726ef9d7bda173ae51816f979f2f1385f1e776052b75b949cdd794da0cdb53e270fb7a950dc68f2d818ccb1f0013664e0c gcc10.patch"
diff --git a/user/libnih/gcc10.patch b/user/libnih/gcc10.patch
new file mode 100644
index 000000000..a118b1f53
--- /dev/null
+++ b/user/libnih/gcc10.patch
@@ -0,0 +1,15 @@
+GCC 10+ use -fno-common by default, which means we need to declare this 'extern'.
+
+There is no upstream to send this to.
+
+--- libnih-1.0.3/nih-dbus-tool/output.h.old 2010-09-20 18:17:01.000000000 -0500
++++ libnih-1.0.3/nih-dbus-tool/output.h 2024-05-28 13:22:58.501847205 -0500
+@@ -27,7 +27,7 @@
+
+ NIH_BEGIN_EXTERN
+
+-char *output_package;
++extern char *output_package;
+
+ int output (const char *source_path, int source_fd,
+ const char *header_path, int header_fd,
diff --git a/user/liborcus/APKBUILD b/user/liborcus/APKBUILD
index 173452d65..59c3bc2e7 100644
--- a/user/liborcus/APKBUILD
+++ b/user/liborcus/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=liborcus
-pkgver=0.17.2
+pkgver=0.19.2
pkgrel=0
pkgdesc="Library for processing spreadsheet documents"
url="https://gitlab.com/orcus/orcus"
@@ -9,16 +9,15 @@ arch="all"
license="MPL-2.0 AND MIT"
depends=""
depends_dev="boost-dev mdds libixion-dev"
-makedepends="$depends_dev zlib-dev autoconf automake libtool cmd:which"
+makedepends="$depends_dev zlib-dev"
subpackages="$pkgname-dev"
-source="https://gitlab.com/orcus/orcus/-/archive/$pkgver/orcus-$pkgver.tar.bz2"
-
-builddir="$srcdir/orcus-$pkgver"
+source="https://gitlab.com/api/v4/projects/orcus%2Forcus/packages/generic/source/$pkgver/liborcus-$pkgver.tar.xz"
build() {
- export LDFLAGS="-lstdc++fs" #826
+ # GCC 13 changed default fp precision behavior. (#1193, #1215)
+ export CXXFLAGS="${CXXFLAGS} -fexcess-precision=fast"
- ./autogen.sh \
+ ./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
@@ -37,4 +36,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="76ec54dc8ee63e2b6487c865483b7c4eb67b47ac5e9be03dd1ad67705659f640b0cb58cc2dc6fef68210879509d1b53fa460c35f3c3c2900d05d1ca9c0d6cfbd orcus-0.17.2.tar.bz2"
+sha512sums="c955490f57e91615278a83bb48726025cd5f8059b97ed5532f770199e134ca511c7ee6b0cd0a9d3a2d54208a5fdd19117054e95e818162ea568052fa11b21d4e liborcus-0.19.2.tar.xz"
diff --git a/user/libpfm/APKBUILD b/user/libpfm/APKBUILD
index d2c501363..063b041d4 100644
--- a/user/libpfm/APKBUILD
+++ b/user/libpfm/APKBUILD
@@ -1,10 +1,10 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=libpfm
-pkgver=4.11.0
+pkgver=4.13.0
pkgrel=0
pkgdesc="Performance monitoring library"
-url="http://perfmon2.sourceforge.net/"
+url="https://perfmon2.sourceforge.net/"
arch="all"
options="!check" # No test suite.
license="MIT"
@@ -21,4 +21,4 @@ package() {
make PREFIX="/usr" DESTDIR="$pkgdir" install
}
-sha512sums="633035b8a7b35973437572095cdc80d422b2a1a61e74e14f106db95fa8e44e4518e591699cc457f828b8f2fb63f60eef6d0c7535c6b4c9a6c3a70d4550b3c3c7 libpfm-4.11.0.tar.gz"
+sha512sums="e61b210aa2ce80f0e47603c88eee2e4f2fe30ca2c0e194a5472b6a8de3bf9dc1085e5261bbb9ddbe5b6531c4b391fb34f20d038e5ebd8e6f4c14c2112aee508f libpfm-4.13.0.tar.gz"
diff --git a/user/libplist/APKBUILD b/user/libplist/APKBUILD
index 4e20b3bc0..5df5484de 100644
--- a/user/libplist/APKBUILD
+++ b/user/libplist/APKBUILD
@@ -24,7 +24,8 @@ build() {
}
check() {
- make check
+ # -j1 for #1175
+ make -j1 check
}
package() {
diff --git a/user/libptytty/APKBUILD b/user/libptytty/APKBUILD
new file mode 100644
index 000000000..d12a73c33
--- /dev/null
+++ b/user/libptytty/APKBUILD
@@ -0,0 +1,43 @@
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=libptytty
+pkgver=2.0
+pkgrel=0
+pkgdesc="OS independent and secure pty/tty and utmp/wtmp/lastlog handling"
+url="http://software.schmorp.de/pkg/libptytty.html"
+arch="all"
+options="!check" # No test suite.
+license="GPL-2.0+"
+depends=""
+makedepends="cmake utmps-dev"
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://dist.schmorp.de/libptytty/libptytty-$pkgver.tar.gz
+ force-utmps.patch
+ "
+
+build() {
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ export LDFLAGS="$LDFLAGS -Bdynamic"
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ ${CMAKE_CROSSOPTS} \
+ -Bbuild
+ make -C build
+}
+
+check() {
+ CTEST_OUTPUT_ON_FAILURE=TRUE make -C build test
+}
+
+package() {
+ make DESTDIR="$pkgdir" -C build install
+}
+
+sha512sums="9cca5fddbcc4025c2bbe043e3367ac902d0024a34301258dafcf0de70935c055279d88227168d112d0e4c0dc37f1f49e1ea587bd6bddf0b9d92400657bc7be08 libptytty-2.0.tar.gz
+34155b4c06bb8dc8f78777fd3a9e749b1c3c056bd073fd7a0c85404f1dfe29dae6b2513a1ed8093fd528d0eb30cd463a5896c0d05203f47bb4f9cad8067bec26 force-utmps.patch"
diff --git a/user/libptytty/force-utmps.patch b/user/libptytty/force-utmps.patch
new file mode 100644
index 000000000..ce9c34d6d
--- /dev/null
+++ b/user/libptytty/force-utmps.patch
@@ -0,0 +1,12 @@
+We need to ensure linkage to utmps, or utmpx won't work.
+
+--- libptytty-2.0/CMakeLists.txt.old 2021-08-04 09:07:44.000000000 -0500
++++ libptytty-2.0/CMakeLists.txt 2024-05-30 19:50:40.078963587 -0500
+@@ -318,6 +318,7 @@
+ target_link_libraries(ptytty PRIVATE util)
+ list(APPEND LIBS -lutil)
+ endif()
++target_link_libraries(ptytty PRIVATE :libutmps.so.0.1)
+
+ configure_file(
+ libptytty.pc.in
diff --git a/user/libstaroffice/APKBUILD b/user/libstaroffice/APKBUILD
index 6f4829b12..dcbe9de45 100644
--- a/user/libstaroffice/APKBUILD
+++ b/user/libstaroffice/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=libstaroffice
-pkgver=0.0.6
+pkgver=0.0.7
pkgrel=0
pkgdesc="Import filter for StarOffice documents"
url="https://github.com/fosnola/libstaroffice"
@@ -11,7 +11,9 @@ license="MPL-2.0 OR LGPL-2.0+"
depends=""
makedepends="boost-dev doxygen librevenge-dev zlib-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
-source="https://github.com/fosnola/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"
+source="https://github.com/fosnola/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.xz
+ mistake.patch
+ "
build() {
./configure \
@@ -33,4 +35,5 @@ tools() {
mv "$pkgdir"/usr/bin "$subpkgdir"/usr
}
-sha512sums="9b5313a069e29265875f2e744b6b39c261f578d72f67fdefe1454c092aaa28399e1b3dfcb3a2f881f9a60674e0115a29350fba3ee37fb442f0a837982077f324 libstaroffice-0.0.6.tar.xz"
+sha512sums="fae873457a8018c1613667aa92771981503585513ab01bdbd2dd6d506ed4f72a7a8fdcfcb8953a46dfcb8fd902d2c9ef8ccd1a5ff15c83990a89847fb98009f8 libstaroffice-0.0.7.tar.xz
+f7260246b0fa3005425ed4bab110cb80a499027b54f386307a2d9c8d5609a82f007c7d9196827888631404dfa034ef8709a6a090d62476f3517238ffb3f97128 mistake.patch"
diff --git a/user/libstaroffice/mistake.patch b/user/libstaroffice/mistake.patch
new file mode 100644
index 000000000..11c558c34
--- /dev/null
+++ b/user/libstaroffice/mistake.patch
@@ -0,0 +1,22 @@
+From ef427988dd95203938c2f2e8f212347a8c0c678a Mon Sep 17 00:00:00 2001
+From: ALONSO Laurent <laurent.alonso@inria.fr>
+Date: Mon, 17 Apr 2023 12:21:36 +0200
+Subject: [PATCH] STOFFStarMathToMMLConverter.cxx: correct a mistake...
+
+---
+ src/lib/STOFFStarMathToMMLConverter.cxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib/STOFFStarMathToMMLConverter.cxx b/src/lib/STOFFStarMathToMMLConverter.cxx
+index 99abb73..9457815 100644
+--- a/src/lib/STOFFStarMathToMMLConverter.cxx
++++ b/src/lib/STOFFStarMathToMMLConverter.cxx
+@@ -2044,7 +2044,7 @@ bool Parser::convert(librevenge::RVNGString const &starMath, std::vector<LexerDa
+ done=true;
+ }
+ else if (len>=2 && c=='>' && dataList.back().m_string=="?" &&
+- dataList[len-2].LexerData::Special && dataList[len-2].m_string=="<") {
++ dataList[len-2].m_type==LexerData::Special && dataList[len-2].m_string=="<") {
+ dataList[len-2].m_type=LexerData::PlaceHolder;
+ dataList[len-2].m_string="<?>";
+ dataList.resize(len-1);
diff --git a/user/lilo/APKBUILD b/user/lilo/APKBUILD
index 6282c211c..4e29aa282 100644
--- a/user/lilo/APKBUILD
+++ b/user/lilo/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=lilo
pkgver=24.2
-pkgrel=1
+pkgrel=2
pkgdesc="Minimal BIOS bootloader for x86 systems"
url="https://www.joonet.de/lilo/"
arch="pmmx x86 x86_64"
@@ -11,6 +11,7 @@ depends="perl"
makedepends="dev86 linux-headers lvm2-dev sharutils"
subpackages="$pkgname-doc"
source="https://www.joonet.de/lilo/ftp/sources/lilo-$pkgver.tar.gz
+ gcc10.patch
adelie.patch
cflags.patch
initramfs.patch
@@ -48,6 +49,7 @@ package() {
}
sha512sums="4437cae21345f483194a5dc95f686f3f3cb2beec78faae3fba959db25eae29fe2c56732e055c05f1d101682c5d442cdc9561fae8074f61f5537dde0413204c54 lilo-24.2.tar.gz
+0ef0ab379e787767bcee2c77eeb7bc5acce908850077dcc14a1d71f3a78761946e8e252089fecb441c26cbbee66c868021d42a300d05579d083e654026cf8682 gcc10.patch
cf8dab563e88cc7b280f5740c3b0f25049b9ce27c77a67e7b0c55dc21a158f8b2998f0c7743f11bcc4ae893697e6b6cc56054a40919899bf2d6d79b4e1a59190 adelie.patch
ed1ffb03dbbbf6fe6974d045005f72b3657d470cd3f3556d582e09a38836090c3e75a684a1dcfbe7ade91e5ada3706b712ae7111460df85454518a746c60bde4 cflags.patch
98e26319a747e6cc7e9d7c695d20e511ef9d196dfc312403c7171380e75edbbdec6af39c0f1670956bcd7ec9ff203505c4001962c767f651b730da31830ed35f initramfs.patch
diff --git a/user/lilo/gcc10.patch b/user/lilo/gcc10.patch
new file mode 100644
index 000000000..c46b9eebd
--- /dev/null
+++ b/user/lilo/gcc10.patch
@@ -0,0 +1,51 @@
+Description: Fix ftbfs with GCC-10
+
+Author: Ryan Finnie <ryan@finnie.org>
+Bug-Debian: https://bugs.debian.org/957490
+Forwarded: no
+
+---
+
+--- a/src/raid.h
++++ b/src/raid.h
+@@ -8,7 +8,7 @@
+ * in the source directory.
+ */
+
+-int do_md_install, ndisk, md_bios;
++extern int ndisk, md_bios;
+
+ int raid_setup(void);
+ void raid_final(void);
+--- a/src/bsect.c
++++ b/src/bsect.c
+@@ -54,8 +54,6 @@
+ #endif
+
+
+-int boot_dev_nr;
+-
+ static BOOT_SECTOR bsect,bsect_orig;
+ static MENUTABLE menuparams;
+ static DESCR_SECTORS descrs;
+--- a/src/identify.c
++++ b/src/identify.c
+@@ -19,7 +19,6 @@
+ #include "common.h"
+ #include "cfg.h"
+
+-char *identify;
+ static char *opt;
+ static char *first, *dflt;
+ static int idefault;
+--- a/src/raid.c
++++ b/src/raid.c
+@@ -41,7 +41,7 @@
+ static int raid_bios[MAX_RAID+1];
+ static int device;
+ enum {MD_NULL=0, MD_PARALLEL, MD_MIXED, MD_SKEWED};
+-int do_md_install, ndisk, md_bios;
++int ndisk, md_bios;
+ static char *raid_list[MAX_RAID];
+ static int list_index[MAX_RAID];
+ static int nlist, faulty;
diff --git a/user/llvm14/APKBUILD b/user/llvm14/APKBUILD
index cd8d6d7a0..86b4789ea 100644
--- a/user/llvm14/APKBUILD
+++ b/user/llvm14/APKBUILD
@@ -6,7 +6,7 @@ _pkgname=llvm
pkgver=14.0.6
_majorver=${pkgver%%.*}
pkgname=$_pkgname$_majorver
-pkgrel=0
+pkgrel=1
pkgdesc="Low Level Virtual Machine compiler system, version $_majorver"
url="https://llvm.org/"
arch="all"
@@ -25,9 +25,11 @@ source="https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/l
disable-dlclose-test.patch
dwarf-info.patch
dyld-elf-ppc32.patch
+ graph-diff-simple.txt
hexagon.patch
macho32.patch
musl-ppc64-elfv2.patch
+ ppc-gcc-bug.patch
ppc-test.patch
python3-test.patch
roundeven.patch
@@ -41,7 +43,7 @@ case "$CARCH" in
esac
# Whether is this package the default (latest) LLVM version.
-_default_llvm="yes"
+_default_llvm="no"
if [ "$_default_llvm" = yes ]; then
provides="llvm=$pkgver-r$pkgrel"
@@ -89,12 +91,25 @@ prepare() {
test/tools/UpdateTestChecks \
test/ExecutionEngine/MCJIT/load-object-a.ll \
;
+ #1202
+ case $CARCH in
+ pmmx)
+ mv "$srcdir"/graph-diff-simple.txt \
+ test/tools/llvm-xray/X86/graph-diff-simple.txt ;;
+ esac
}
build() {
# Auto-detect it by guessing either.
ffi_include_dir="$(pkg-config --cflags-only-I libffi | sed 's|^-I||g')"
+ case $CTARGET_ARCH in
+ pmmx)
+ # The standard precision breaks more than it fixes; there are
+ # 4 failures in standard mode and only (different) 1 in fast.
+ export CXXFLAGS="$CXXFLAGS -fexcess-precision=fast";;
+ esac
+
cmake -G "Unix Makefiles" -Wno-dev \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/$_prefix \
@@ -252,9 +267,11 @@ f84cd65d7042e89826ba6e8d48c4c302bf4980da369d7f19a55f217e51c00ca8ed178d453df3a3ce
caeec8e4dbd92f5f74940780b69075f3879a267a8623822cbdc193fd14706eb089071e3a5a20d60cc2eca59e4c5b2a61d29827a2f3362ee7c5f74f11d9ace200 disable-dlclose-test.patch
2842bcef71fb962cb49717fa9ba3e7318400c4a9175284a39ae3ff13a00260556794d0d63341430b2c64a0bca1ac76186e02c92e444a737a5dec1b6de27bbc60 dwarf-info.patch
5fa36157f7a76ca70d22af7bd96850db454d6add3a19cc3272962633c453087015755ca9df0de29cc40359e89279e470e91ff1a69d1453596a73291b36f39b23 dyld-elf-ppc32.patch
+a1533f4b9d35e1069fd065fbeb5fedce96fa49fdb007f994d8921d8a04cf2caadca276bbd9553ff86040b0f9dfce489c385fa2a7434e2dee3732942e6914db4e graph-diff-simple.txt
9abe376068801a09b2af01eef0cd319f48862b5ff7cce62af3cf4e7597a0898842125ae574577b545734ec1381f192b924b4f717a9c094f119e32ada81a2b9a2 hexagon.patch
de9791cc476817782b553c4edab696132da4ed2b9a3d80dbf1b85b7dc7a8c5e4caf14f2f26e33c27cd80a91b36709d3b24caea910c0a6315ffbb297cb748468d macho32.patch
-e5ddbc4b6c4928e79846dc3c022eb7928aaa8fed40515c78f5f03b8ab8264f34f1eb8aa8bfc0f436450932f4917e54ad261603032092ea271d9590f11a37cf1e musl-ppc64-elfv2.patch
+189e0967c7c29c6315bd3e8da818b94fc3ed99c8cdce14c3d7ccc2fbd18007b3d97f74689dc3d498f624a10411067c41648b9b67d420d2344fa7e1bf7711c8dd musl-ppc64-elfv2.patch
+02fd3e9869cf3da60b0da17b69dc592fdcd0442d50de940b578b7a9aa19554569324b44f6f84728c03b2897859f99076278741bdd0872fab70660eb844d05f26 ppc-gcc-bug.patch
62de403e4cfd58d9f33f8b35ff31f66c906fd39c667fbcfa394d03f636fb10977c2f53c3a780d0c8e099f9a081951402757e12842d82a7cbd1aef4158f51d5c2 ppc-test.patch
89ef5fbab039b017a5652656adf17b680525f1c5dd0b1afc8034fe0b34a2ca196d87640f54cc826356cfcd88c6e5f10754b7e38f04ca49ede4f3864080b787bd python3-test.patch
dca77af49ea181ab8d41630b8e7575b83aac22686a1119479abf8fe22d8f13032d69ef83a9635b9ad9b935cd3b51251d939e05967ad40db43abf69ac40e0eccd roundeven.patch"
diff --git a/user/llvm14/graph-diff-simple.txt b/user/llvm14/graph-diff-simple.txt
new file mode 100644
index 000000000..fa26daaf9
--- /dev/null
+++ b/user/llvm14/graph-diff-simple.txt
@@ -0,0 +1,238 @@
+#RUN: llvm-xray graph-diff -o - -c min -b min -m %S/Inputs/simple-instrmap.yaml \
+#RUN: %S/Inputs/graph-diff-A.yaml %S/Inputs/graph-diff-B.yaml \
+#RUN: | FileCheck %s -check-prefix=VCEC
+#RUN: llvm-xray graph-diff -o - -c min -m %S/Inputs/simple-instrmap.yaml \
+#RUN: %S/Inputs/graph-diff-A.yaml %S/Inputs/graph-diff-B.yaml \
+#RUN: | FileCheck %s -check-prefix=EC
+#RUN: llvm-xray graph-diff -o - -b min -m %S/Inputs/simple-instrmap.yaml \
+#RUN: %S/Inputs/graph-diff-A.yaml %S/Inputs/graph-diff-B.yaml \
+#RUN: | FileCheck %s -check-prefix=VC
+#RUN: llvm-xray graph-diff -o - -e min -v min -m %S/Inputs/simple-instrmap.yaml \
+#RUN: %S/Inputs/graph-diff-A.yaml %S/Inputs/graph-diff-B.yaml \
+#RUN: | FileCheck %s -check-prefix=ELVL
+#RUN: llvm-xray graph-diff -o - -e min -m %S/Inputs/simple-instrmap.yaml \
+#RUN: %S/Inputs/graph-diff-A.yaml %S/Inputs/graph-diff-B.yaml \
+#RUN: | FileCheck %s -check-prefix=EL
+#RUN: llvm-xray graph-diff -o - -v min -m %S/Inputs/simple-instrmap.yaml \
+#RUN: %S/Inputs/graph-diff-A.yaml %S/Inputs/graph-diff-B.yaml \
+#RUN: | FileCheck %s -check-prefix=VL
+#RUN: llvm-xray graph-diff -o - -v min -b min -m %S/Inputs/simple-instrmap.yaml \
+#RUN: %S/Inputs/graph-diff-A.yaml %S/Inputs/graph-diff-B.yaml \
+#RUN: | FileCheck %s -check-prefix=VLVC
+#RUN: llvm-xray graph-diff -o - -e min -c min -m %S/Inputs/simple-instrmap.yaml \
+#RUN: %S/Inputs/graph-diff-A.yaml %S/Inputs/graph-diff-B.yaml \
+#RUN: | FileCheck %s -check-prefix=ELEC
+
+#VCEC: digraph xrayDiff {
+#VCEC-DAG: F[[F0NO:[0-9]+]] [label="F0"]
+#VCEC-DAG: F[[N1NO:[0-9]+]] [label="#1" color="#276419"]
+#VCEC-DAG: F[[N2NO:[0-9]+]] [label="#2" color="#276419"]
+#VCEC-DAG: F[[N3NO:[0-9]+]] [label="#3" color="#276419"]
+#VCEC-DAG: F[[N4NO:[0-9]+]] [label="#4" color="#9BCE61"]
+#VCEC-DAG: F[[N5NO:[0-9]+]] [label="#5" color="#F7F7F7"]
+#VCEC-DAG: F[[N6NO:[0-9]+]] [label="#6" color="#F5C4E0"]
+#VCEC-DAG: F[[N7NO:[0-9]+]] [label="#7" color="#E17FB4"]
+#VCEC-DAG: F[[N8NO:[0-9]+]] [label="#8" color="#CB3088"]
+#VCEC-DAG: F[[N9NO:[0-9]+]] [label="#9" color="#AD0E69"]
+#VCEC-DAG: F[[NANO:[0-9]+]] [label="#10" color="#00FF00"]
+#VCEC-DAG: F[[NBNO:[0-9]+]] [label="#11" color="#FF0000"]
+#VCEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N1NO]] [tooltip="F0 -> #1" label="" color="#276419" labelfontcolor="#276419" penwidth=8.00]
+#VCEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N2NO]] [tooltip="F0 -> #2" label="" color="#276419" labelfontcolor="#276419" penwidth=3.00]
+#VCEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N3NO]] [tooltip="F0 -> #3" label="" color="#276419" labelfontcolor="#276419" penwidth=1.33]
+#VCEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N4NO]] [tooltip="F0 -> #4" label="" color="#9BCE61" labelfontcolor="#9BCE61" penwidth=1.00]
+#VCEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N5NO]] [tooltip="F0 -> #5" label="" color="#F7F7F7" labelfontcolor="#F7F7F7" penwidth=1.00]
+#VCEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N6NO]] [tooltip="F0 -> #6" label="" color="#F5C4E0" labelfontcolor="#F5C4E0" penwidth=1.00]
+#VCEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N7NO]] [tooltip="F0 -> #7" label="" color="#E17FB4" labelfontcolor="#E17FB4" penwidth=1.00]
+#VCEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N8NO]] [tooltip="F0 -> #8" label="" color="#CB3088" labelfontcolor="#CB3088" penwidth=1.00]
+#VCEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N9NO]] [tooltip="F0 -> #9" label="" color="#AD0E69" labelfontcolor="#AD0E69" penwidth=1.00]
+#VCEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[NANO]] [tooltip="F0 -> #10" label="" color="#00FF00" labelfontcolor="#00FF00" penwidth=1.00]
+#VCEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[NBNO]] [tooltip="F0 -> #11" label="" color="#FF0000" labelfontcolor="#FF0000" penwidth=1.00]
+#VCEC-NEXT:}
+
+
+#EC: digraph xrayDiff {
+#EC-DAG: F[[F0NO:[0-9]+]] [label="F0"]
+#EC-DAG: F[[N1NO:[0-9]+]] [label="#1" color="black"]
+#EC-DAG: F[[N2NO:[0-9]+]] [label="#2" color="black"]
+#EC-DAG: F[[N3NO:[0-9]+]] [label="#3" color="black"]
+#EC-DAG: F[[N4NO:[0-9]+]] [label="#4" color="black"]
+#EC-DAG: F[[N5NO:[0-9]+]] [label="#5" color="black"]
+#EC-DAG: F[[N6NO:[0-9]+]] [label="#6" color="black"]
+#EC-DAG: F[[N7NO:[0-9]+]] [label="#7" color="black"]
+#EC-DAG: F[[N8NO:[0-9]+]] [label="#8" color="black"]
+#EC-DAG: F[[N9NO:[0-9]+]] [label="#9" color="black"]
+#EC-DAG: F[[NANO:[0-9]+]] [label="#10" color="#00FF00"]
+#EC-DAG: F[[NBNO:[0-9]+]] [label="#11" color="#FF0000"]
+#EC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N1NO]] [tooltip="F0 -> #1" label="" color="#276419" labelfontcolor="#276419" penwidth=8.00]
+#EC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N2NO]] [tooltip="F0 -> #2" label="" color="#276419" labelfontcolor="#276419" penwidth=3.00]
+#EC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N3NO]] [tooltip="F0 -> #3" label="" color="#276419" labelfontcolor="#276419" penwidth=1.33]
+#EC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N4NO]] [tooltip="F0 -> #4" label="" color="#9BCE61" labelfontcolor="#9BCE61" penwidth=1.00]
+#EC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N5NO]] [tooltip="F0 -> #5" label="" color="#F7F7F7" labelfontcolor="#F7F7F7" penwidth=1.00]
+#EC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N6NO]] [tooltip="F0 -> #6" label="" color="#F5C4E0" labelfontcolor="#F5C4E0" penwidth=1.00]
+#EC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N7NO]] [tooltip="F0 -> #7" label="" color="#E17FB4" labelfontcolor="#E17FB4" penwidth=1.00]
+#EC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N8NO]] [tooltip="F0 -> #8" label="" color="#CB3088" labelfontcolor="#CB3088" penwidth=1.00]
+#EC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N9NO]] [tooltip="F0 -> #9" label="" color="#AD0E69" labelfontcolor="#AD0E69" penwidth=1.00]
+#EC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[NANO]] [tooltip="F0 -> #10" label="" color="#00FF00" labelfontcolor="#00FF00" penwidth=1.00]
+#EC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[NBNO]] [tooltip="F0 -> #11" label="" color="#FF0000" labelfontcolor="#FF0000" penwidth=1.00]
+#EC-NEXT:}
+
+#VC: digraph xrayDiff {
+#VC-DAG: F[[F0NO:[0-9]+]] [label="F0"]
+#VC-DAG: F[[N1NO:[0-9]+]] [label="#1" color="#276419"]
+#VC-DAG: F[[N2NO:[0-9]+]] [label="#2" color="#276419"]
+#VC-DAG: F[[N3NO:[0-9]+]] [label="#3" color="#276419"]
+#VC-DAG: F[[N4NO:[0-9]+]] [label="#4" color="#9BCE61"]
+#VC-DAG: F[[N5NO:[0-9]+]] [label="#5" color="#F7F7F7"]
+#VC-DAG: F[[N6NO:[0-9]+]] [label="#6" color="#F5C4E0"]
+#VC-DAG: F[[N7NO:[0-9]+]] [label="#7" color="#E17FB4"]
+#VC-DAG: F[[N8NO:[0-9]+]] [label="#8" color="#CB3088"]
+#VC-DAG: F[[N9NO:[0-9]+]] [label="#9" color="#AD0E69"]
+#VC-DAG: F[[NANO:[0-9]+]] [label="#10" color="#00FF00"]
+#VC-DAG: F[[NBNO:[0-9]+]] [label="#11" color="#FF0000"]
+#VC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N1NO]] [tooltip="F0 -> #1" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N2NO]] [tooltip="F0 -> #2" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N3NO]] [tooltip="F0 -> #3" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N4NO]] [tooltip="F0 -> #4" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N5NO]] [tooltip="F0 -> #5" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N6NO]] [tooltip="F0 -> #6" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N7NO]] [tooltip="F0 -> #7" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N8NO]] [tooltip="F0 -> #8" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N9NO]] [tooltip="F0 -> #9" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[NANO]] [tooltip="F0 -> #10" label="" color="#00FF00" labelfontcolor="#00FF00" penwidth=1.00]
+#VC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[NBNO]] [tooltip="F0 -> #11" label="" color="#FF0000" labelfontcolor="#FF0000" penwidth=1.00]
+#VC-NEXT:}
+
+#ELVL: digraph xrayDiff {
+#ELVL-NEXT: node [shape=record]
+#ELVL-DAG: F[[F0NO:[0-9]+]] [label="F0"]
+#ELVL-DAG: F[[N1NO:[0-9]+]] [label="{#1|800.00%}" color="black"]
+#ELVL-DAG: F[[N2NO:[0-9]+]] [label="{#2|300.00%}" color="black"]
+#ELVL-DAG: F[[N3NO:[0-9]+]] [label="{#3|133.33%}" color="black"]
+#ELVL-DAG: F[[N4NO:[0-9]+]] [label="{#4|50.00%}" color="black"]
+#ELVL-DAG: F[[N5NO:[0-9]+]] [label="{#5|0.00%}" color="black"]
+#ELVL-DAG: F[[N6NO:[0-9]+]] [label="{#6|-33.33%}" color="black"]
+#ELVL-DAG: F[[N7NO:[0-9]+]] [label="{#7|-57.14%}" color="black"]
+#ELVL-DAG: F[[N8NO:[0-9]+]] [label="{#8|-75.00%}" color="black"]
+#ELVL-DAG: F[[N9NO:[0-9]+]] [label="{#9|-88.89%}" color="black"]
+#ELVL-DAG: F[[NANO:[0-9]+]] [label="#10" color="#00FF00"]
+#ELVL-DAG: F[[NBNO:[0-9]+]] [label="#11" color="#FF0000"]
+#ELVL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N1NO]] [tooltip="F0 -> #1" label="800.00%" color="black" labelfontcolor="black" penwidth=1.00]
+#ELVL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N2NO]] [tooltip="F0 -> #2" label="300.00%" color="black" labelfontcolor="black" penwidth=1.00]
+#ELVL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N3NO]] [tooltip="F0 -> #3" label="133.33%" color="black" labelfontcolor="black" penwidth=1.00]
+#ELVL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N4NO]] [tooltip="F0 -> #4" label="50.00%" color="black" labelfontcolor="black" penwidth=1.00]
+#ELVL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N5NO]] [tooltip="F0 -> #5" label="0.00%" color="black" labelfontcolor="black" penwidth=1.00]
+#ELVL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N6NO]] [tooltip="F0 -> #6" label="-33.33%" color="black" labelfontcolor="black" penwidth=1.00]
+#ELVL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N7NO]] [tooltip="F0 -> #7" label="-57.14%" color="black" labelfontcolor="black" penwidth=1.00]
+#ELVL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N8NO]] [tooltip="F0 -> #8" label="-75.00%" color="black" labelfontcolor="black" penwidth=1.00]
+#ELVL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N9NO]] [tooltip="F0 -> #9" label="-88.89%" color="black" labelfontcolor="black" penwidth=1.00]
+#ELVL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[NANO]] [tooltip="F0 -> #10" label="" color="#00FF00" labelfontcolor="#00FF00" penwidth=1.00]
+#ELVL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[NBNO]] [tooltip="F0 -> #11" label="" color="#FF0000" labelfontcolor="#FF0000" penwidth=1.00]
+#ELVL-NEXT:}
+
+#EL: digraph xrayDiff {
+#EL-DAG: F[[F0NO:[0-9]+]] [label="F0"]
+#EL-DAG: F[[N1NO:[0-9]+]] [label="#1" color="black"]
+#EL-DAG: F[[N2NO:[0-9]+]] [label="#2" color="black"]
+#EL-DAG: F[[N3NO:[0-9]+]] [label="#3" color="black"]
+#EL-DAG: F[[N4NO:[0-9]+]] [label="#4" color="black"]
+#EL-DAG: F[[N5NO:[0-9]+]] [label="#5" color="black"]
+#EL-DAG: F[[N6NO:[0-9]+]] [label="#6" color="black"]
+#EL-DAG: F[[N7NO:[0-9]+]] [label="#7" color="black"]
+#EL-DAG: F[[N8NO:[0-9]+]] [label="#8" color="black"]
+#EL-DAG: F[[N9NO:[0-9]+]] [label="#9" color="black"]
+#EL-DAG: F[[NANO:[0-9]+]] [label="#10" color="#00FF00"]
+#EL-DAG: F[[NBNO:[0-9]+]] [label="#11" color="#FF0000"]
+#EL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N1NO]] [tooltip="F0 -> #1" label="800.00%" color="black" labelfontcolor="black" penwidth=1.00]
+#EL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N2NO]] [tooltip="F0 -> #2" label="300.00%" color="black" labelfontcolor="black" penwidth=1.00]
+#EL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N3NO]] [tooltip="F0 -> #3" label="133.33%" color="black" labelfontcolor="black" penwidth=1.00]
+#EL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N4NO]] [tooltip="F0 -> #4" label="50.00%" color="black" labelfontcolor="black" penwidth=1.00]
+#EL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N5NO]] [tooltip="F0 -> #5" label="0.00%" color="black" labelfontcolor="black" penwidth=1.00]
+#EL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N6NO]] [tooltip="F0 -> #6" label="-33.33%" color="black" labelfontcolor="black" penwidth=1.00]
+#EL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N7NO]] [tooltip="F0 -> #7" label="-57.14%" color="black" labelfontcolor="black" penwidth=1.00]
+#EL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N8NO]] [tooltip="F0 -> #8" label="-75.00%" color="black" labelfontcolor="black" penwidth=1.00]
+#EL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N9NO]] [tooltip="F0 -> #9" label="-88.89%" color="black" labelfontcolor="black" penwidth=1.00]
+#EL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[NANO]] [tooltip="F0 -> #10" label="" color="#00FF00" labelfontcolor="#00FF00" penwidth=1.00]
+#EL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[NBNO]] [tooltip="F0 -> #11" label="" color="#FF0000" labelfontcolor="#FF0000" penwidth=1.00]
+#EL-NEXT:}
+
+#VL: digraph xrayDiff {
+#VL-NEXT: node [shape=record]
+#VL-DAG: F[[F0NO:[0-9]+]] [label="F0"]
+#VL-DAG: F[[N1NO:[0-9]+]] [label="{#1|800.00%}" color="black"]
+#VL-DAG: F[[N2NO:[0-9]+]] [label="{#2|300.00%}" color="black"]
+#VL-DAG: F[[N3NO:[0-9]+]] [label="{#3|133.33%}" color="black"]
+#VL-DAG: F[[N4NO:[0-9]+]] [label="{#4|50.00%}" color="black"]
+#VL-DAG: F[[N5NO:[0-9]+]] [label="{#5|0.00%}" color="black"]
+#VL-DAG: F[[N6NO:[0-9]+]] [label="{#6|-33.33%}" color="black"]
+#VL-DAG: F[[N7NO:[0-9]+]] [label="{#7|-57.14%}" color="black"]
+#VL-DAG: F[[N8NO:[0-9]+]] [label="{#8|-75.00%}" color="black"]
+#VL-DAG: F[[N9NO:[0-9]+]] [label="{#9|-88.89%}" color="black"]
+#VL-DAG: F[[NANO:[0-9]+]] [label="#10" color="#00FF00"]
+#VL-DAG: F[[NBNO:[0-9]+]] [label="#11" color="#FF0000"]
+#VL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N1NO]] [tooltip="F0 -> #1" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N2NO]] [tooltip="F0 -> #2" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N3NO]] [tooltip="F0 -> #3" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N4NO]] [tooltip="F0 -> #4" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N5NO]] [tooltip="F0 -> #5" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N6NO]] [tooltip="F0 -> #6" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N7NO]] [tooltip="F0 -> #7" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N8NO]] [tooltip="F0 -> #8" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N9NO]] [tooltip="F0 -> #9" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[NANO]] [tooltip="F0 -> #10" label="" color="#00FF00" labelfontcolor="#00FF00" penwidth=1.00]
+#VL-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[NBNO]] [tooltip="F0 -> #11" label="" color="#FF0000" labelfontcolor="#FF0000" penwidth=1.00]
+#VL-NEXT:}
+
+#VLVC: digraph xrayDiff {
+#VLVC-NEXT: node [shape=record]
+#VLVC-DAG: F[[F0NO:[0-9]+]] [label="F0"]
+#VLVC-DAG: F[[N1NO:[0-9]+]] [label="{#1|800.00%}" color="#276419"]
+#VLVC-DAG: F[[N2NO:[0-9]+]] [label="{#2|300.00%}" color="#276419"]
+#VLVC-DAG: F[[N3NO:[0-9]+]] [label="{#3|133.33%}" color="#276419"]
+#VLVC-DAG: F[[N4NO:[0-9]+]] [label="{#4|50.00%}" color="#9BCE61"]
+#VLVC-DAG: F[[N5NO:[0-9]+]] [label="{#5|0.00%}" color="#F7F7F7"]
+#VLVC-DAG: F[[N6NO:[0-9]+]] [label="{#6|-33.33%}" color="#F5C4E0"]
+#VLVC-DAG: F[[N7NO:[0-9]+]] [label="{#7|-57.14%}" color="#E17FB4"]
+#VLVC-DAG: F[[N8NO:[0-9]+]] [label="{#8|-75.00%}" color="#CB3088"]
+#VLVC-DAG: F[[N9NO:[0-9]+]] [label="{#9|-88.89%}" color="#AD0E69"]
+#VLVC-DAG: F[[NANO:[0-9]+]] [label="#10" color="#00FF00"]
+#VLVC-DAG: F[[NBNO:[0-9]+]] [label="#11" color="#FF0000"]
+#VLVC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N1NO]] [tooltip="F0 -> #1" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VLVC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N2NO]] [tooltip="F0 -> #2" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VLVC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N3NO]] [tooltip="F0 -> #3" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VLVC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N4NO]] [tooltip="F0 -> #4" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VLVC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N5NO]] [tooltip="F0 -> #5" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VLVC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N6NO]] [tooltip="F0 -> #6" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VLVC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N7NO]] [tooltip="F0 -> #7" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VLVC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N8NO]] [tooltip="F0 -> #8" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VLVC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N9NO]] [tooltip="F0 -> #9" label="" color="black" labelfontcolor="black" penwidth=1.00]
+#VLVC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[NANO]] [tooltip="F0 -> #10" label="" color="#00FF00" labelfontcolor="#00FF00" penwidth=1.00]
+#VLVC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[NBNO]] [tooltip="F0 -> #11" label="" color="#FF0000" labelfontcolor="#FF0000" penwidth=1.00]
+#VLVC-NEXT:}
+
+#ELEC: digraph xrayDiff {
+#ELEC-DAG: F[[F0NO:[0-9]+]] [label="F0"]
+#ELEC-DAG: F[[N1NO:[0-9]+]] [label="#1" color="black"]
+#ELEC-DAG: F[[N2NO:[0-9]+]] [label="#2" color="black"]
+#ELEC-DAG: F[[N3NO:[0-9]+]] [label="#3" color="black"]
+#ELEC-DAG: F[[N4NO:[0-9]+]] [label="#4" color="black"]
+#ELEC-DAG: F[[N5NO:[0-9]+]] [label="#5" color="black"]
+#ELEC-DAG: F[[N6NO:[0-9]+]] [label="#6" color="black"]
+#ELEC-DAG: F[[N7NO:[0-9]+]] [label="#7" color="black"]
+#ELEC-DAG: F[[N8NO:[0-9]+]] [label="#8" color="black"]
+#ELEC-DAG: F[[N9NO:[0-9]+]] [label="#9" color="black"]
+#ELEC-DAG: F[[NANO:[0-9]+]] [label="#10" color="#00FF00"]
+#ELEC-DAG: F[[NBNO:[0-9]+]] [label="#11" color="#FF0000"]
+#ELEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N1NO]] [tooltip="F0 -> #1" label="800.00%" color="#276419" labelfontcolor="#276419" penwidth=8.00]
+#ELEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N2NO]] [tooltip="F0 -> #2" label="300.00%" color="#276419" labelfontcolor="#276419" penwidth=3.00]
+#ELEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N3NO]] [tooltip="F0 -> #3" label="133.33%" color="#276419" labelfontcolor="#276419" penwidth=1.33]
+#ELEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N4NO]] [tooltip="F0 -> #4" label="50.00%" color="#9BCE61" labelfontcolor="#9BCE61" penwidth=1.00]
+#ELEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N5NO]] [tooltip="F0 -> #5" label="0.00%" color="#F7F7F7" labelfontcolor="#F7F7F7" penwidth=1.00]
+#ELEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N6NO]] [tooltip="F0 -> #6" label="-33.33%" color="#F5C4E0" labelfontcolor="#F5C4E0" penwidth=1.00]
+#ELEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N7NO]] [tooltip="F0 -> #7" label="-57.14%" color="#E17FB4" labelfontcolor="#E17FB4" penwidth=1.00]
+#ELEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N8NO]] [tooltip="F0 -> #8" label="-75.00%" color="#CB3088" labelfontcolor="#CB3088" penwidth=1.00]
+#ELEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[N9NO]] [tooltip="F0 -> #9" label="-88.89%" color="#AD0E69" labelfontcolor="#AD0E69" penwidth=1.00]
+#ELEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[NANO]] [tooltip="F0 -> #10" label="" color="#00FF00" labelfontcolor="#00FF00" penwidth=1.00]
+#ELEC-DAG: F{{.*}}[[F0NO]] -> F{{.*}}[[NBNO]] [tooltip="F0 -> #11" label="" color="#FF0000" labelfontcolor="#FF0000" penwidth=1.00]
+#ELEC-NEXT:}
+
+
diff --git a/user/llvm14/musl-ppc64-elfv2.patch b/user/llvm14/musl-ppc64-elfv2.patch
index 016be5dad..77bc4c780 100644
--- a/user/llvm14/musl-ppc64-elfv2.patch
+++ b/user/llvm14/musl-ppc64-elfv2.patch
@@ -15,7 +15,7 @@ diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTar
index 34410393ef6..c583fba8cab 100644
--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
-@@ -199,6 +199,10 @@ static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT,
+@@ -228,6 +228,10 @@ static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT,
case Triple::ppc64le:
return PPCTargetMachine::PPC_ABI_ELFv2;
case Triple::ppc64:
diff --git a/user/llvm14/ppc-gcc-bug.patch b/user/llvm14/ppc-gcc-bug.patch
new file mode 100644
index 000000000..4fe2f34f4
--- /dev/null
+++ b/user/llvm14/ppc-gcc-bug.patch
@@ -0,0 +1,22 @@
+Upstream: https://github.com/llvm/llvm-project/issues/95594
+Ref: #1204
+
+--- llvm/include/llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h.old 2024-06-15 12:21:32.000000000 -0500
++++ llvm/include/llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h 2024-06-25 21:42:07.495284340 -0500
+@@ -378,6 +378,8 @@
+ return Size;
+ }
+
++#pragma GCC push_options
++#pragma GCC optimize("no-tree-ch")
+ static bool serialize(SPSOutputBuffer &OB, const SequenceT &S) {
+ if (!SPSArgList<uint64_t>::serialize(OB, static_cast<uint64_t>(S.size())))
+ return false;
+@@ -386,6 +388,7 @@
+ return false;
+ return true;
+ }
++#pragma GCC pop_options
+
+ static bool deserialize(SPSInputBuffer &IB, SequenceT &S) {
+ using TBSD = TrivialSPSSequenceDeserialization<SPSElementTagT, SequenceT>;
diff --git a/user/llvm18/APKBUILD b/user/llvm18/APKBUILD
new file mode 100644
index 000000000..8bcd3067f
--- /dev/null
+++ b/user/llvm18/APKBUILD
@@ -0,0 +1,328 @@
+# Contributor: Travis Tilley <ttilley@gmail.com>
+# Contributor: Mitch Tishmack <mitch.tishmack@gmail.com>
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+_pkgname=llvm
+pkgver=18.1.8
+_majorver=${pkgver%%.*}
+pkgname=$_pkgname$_majorver
+pkgrel=0
+pkgdesc="Low Level Virtual Machine compiler system, version $_majorver"
+url="https://llvm.org/"
+arch="all"
+options="!checkroot !dbg"
+license="NCSA AND (Apache-2.0 WITH LLVM-exception)"
+depends=""
+depends_dev="$pkgname=$pkgver-r$pkgrel libexecinfo-dev libxml2-dev"
+checkdepends="cmd:which"
+makedepends="binutils-dev chelf chrpath cmake file libexecinfo-dev libffi-dev
+ libxml2-dev python3 zlib-dev"
+subpackages="$pkgname-static $pkgname-libs $pkgname-dev
+ $pkgname-test-utils:_test_utils"
+source="https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/llvm-project-$pkgver.src.tar.xz
+ llvm-fix-build-with-musl-libc.patch
+ disable-FileSystemTest.CreateDir-perms-assert.patch
+ dyld-elf-ppc32.patch
+ hexagon.patch
+ i586-json-test.patch
+ m68k-endianness.patch
+ macho32.patch
+ musl-ppc64-elfv2.patch
+ ppc-gcc-bug.patch
+ python3-test.patch
+ roundeven.patch
+ "
+builddir="$srcdir/$_pkgname-project-$pkgver.src/llvm"
+
+# ARM has few failures in test suite that we don't care about currently and
+# also it takes forever to run them on the builder.
+case "$CARCH" in
+ arm*) options="$options !check";;
+esac
+
+# Whether is this package the default (latest) LLVM version.
+_default_llvm="yes"
+
+if [ "$_default_llvm" = yes ]; then
+ provides="llvm=$pkgver-r$pkgrel"
+ replaces="llvm"
+fi
+
+# NOTE: It seems that there's no (sane) way how to change includedir, sharedir
+# etc. separately, just the CMAKE_INSTALL_PREFIX. Standard CMake variables and
+# even LLVM-specific variables, that are related to these paths, actually
+# don't work (in llvm 3.7).
+#
+# When building a software that depends on LLVM, utility llvm-config should be
+# used to discover where is LLVM installed. It provides options to print
+# path of bindir, includedir, and libdir separately, but in its source, all
+# these paths are actually hard-coded against INSTALL_PREFIX. We can patch it
+# and move paths manually, but I'm really not sure what it may break...
+#
+# Also note that we should *not* add version suffix to files in llvm bindir!
+# It breaks build system of some software that depends on LLVM, because they
+# don't expect these files to have a sufix.
+#
+# So, we install all the LLVM files into /usr/lib/llvm$_majorver.
+# BTW, Fedora and Debian do the same thing.
+#
+_prefix="usr/lib/llvm$_majorver"
+
+prepare() {
+ default_prepare
+
+ # https://bugs.llvm.org//show_bug.cgi?id=31870
+ rm test/tools/llvm-symbolizer/print_context.c
+
+ case $CARCH in
+ pmmx|x86|ppc|armhf|armv7)
+ # Appears to not work when building 32-bit code on 64-bit host.
+ rm test/tools/llvm-size/radix.test;;
+ esac
+
+ # https://github.com/llvm/llvm-project/issues/96734
+ case $CARCH in
+ ppc64|ppc|mips64|mips)
+ # Appears to be a endianness issue.
+ for _broken in eh_frame linker-llvm-union-fwd-decl; do
+ rm test/tools/dsymutil/X86/$_broken.test;
+ done
+ for _broken in accelerator-dwarf4 accelerator-dwarf5 \
+ dwarf4-macro-short; do
+ rm test/tools/llvm-dwarfutil/ELF/X86/$_broken.test;
+ done
+ for _broken in inlined-static-variable.cpp keep-func.test \
+ odr-fwd-declaration2.test odr-member-functions.cpp \
+ odr-predictable-output2.test odr-string.test \
+ odr-types-in-subprogram1.test odr-uniquing.cpp; do
+ rm test/tools/dsymutil/X86/DWARFLinkerParallel/$_broken
+ done;;
+ esac
+
+ case $CTARGET_ARCH in
+ pmmx)
+ # Broken by fast precision method.
+ rm test/tools/llvm-cov/mcdc-export-json.test;
+ rm test/tools/llvm-xray/X86/graph-diff-simple.txt;
+ ;;
+ ppc)
+ # RISC-V issues are uninvestigated as of yet. #1233
+ rm test/CodeGen/RISCV/rvv/combine-store-extract-crash.ll
+ rm test/CodeGen/RISCV/xtheadmempair.ll
+
+ # ExecutionEngine for PPC32 requires R_PPC_REL24 to be
+ # implemented in RuntimeDyld.
+ for _bad_orc in global-ctor-with-cast.ll \
+ global-variable-alignment.ll \
+ trivial-call-to-function.ll \
+ trivial-call-to-internal-function.ll \
+ trivial-reference-to-global-variable.ll \
+ trivial-reference-to-internal-variable-nonzeroinit.ll \
+ trivial-reference-to-internal-variable-zeroinit.ll \
+ trivial-return-zero.ll \
+ weak-comdat.ll; do
+ rm test/ExecutionEngine/Orc/$_bad_orc;
+ done
+ for _bad_ee in frem.ll mov64zext32.ll \
+ test-interp-vec-arithm_float.ll \
+ test-interp-vec-arithm_int.ll \
+ test-interp-vec-logical.ll \
+ test-interp-vec-setcond-fp.ll \
+ test-interp-vec-setcond-int.ll; do
+ rm test/ExecutionEngine/$_bad_ee;
+ done
+ esac
+
+ # appears to be an issue on musl and glibc, but only fails on musl:
+ # https://github.com/NixOS/nixpkgs/blob/bb7e9e46/pkgs/development/compilers/llvm/8/llvm.nix#L74
+ # rm -f test/CodeGen/AArch64/wineh4.mir
+
+ #1053
+ rm -fr \
+ test/tools/UpdateTestChecks \
+ test/ExecutionEngine/MCJIT/load-object-a.ll \
+ ;
+}
+
+build() {
+ # Auto-detect it by guessing either.
+ ffi_include_dir="$(pkg-config --cflags-only-I libffi | sed 's|^-I||g')"
+
+ arch_config=""
+ case $CTARGET_ARCH in
+ aarch64)
+ # libexecinfo does not work on AArch64 because the GCC port
+ # does not implement RETURN_ADDR_RTX with frame > 0.
+ arch_config="-DLLVM_ENABLE_BACKTRACES=OFF";;
+ pmmx)
+ # The standard precision breaks more than it fixes; there are
+ # 12 failures in standard mode and only (different) 3 in fast.
+ export CXXFLAGS="$CXXFLAGS -fexcess-precision=fast";;
+ esac
+
+ cmake -G "Unix Makefiles" -Wno-dev \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/$_prefix \
+ -DCMAKE_VERBOSE_MAKEFILE=NO \
+ -DFFI_INCLUDE_DIR="$ffi_include_dir" \
+ -DLLVM_BINUTILS_INCDIR=/usr/include \
+ -DLLVM_BUILD_DOCS=OFF \
+ -DLLVM_BUILD_EXAMPLES=OFF \
+ -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON \
+ -DLLVM_BUILD_LLVM_DYLIB=ON \
+ -DLLVM_BUILD_TESTS=ON \
+ -DLLVM_DEFAULT_TARGET_TRIPLE="$CBUILD" \
+ -DLLVM_ENABLE_ASSERTIONS=OFF \
+ -DLLVM_ENABLE_FFI=ON \
+ -DLLVM_ENABLE_LIBCXX=OFF \
+ -DLLVM_ENABLE_PIC=ON \
+ -DLLVM_ENABLE_RTTI=ON \
+ -DLLVM_ENABLE_SPHINX=OFF \
+ -DLLVM_ENABLE_TERMINFO=ON \
+ -DLLVM_ENABLE_ZLIB=ON \
+ -DLLVM_HOST_TRIPLE="$CHOST" \
+ -DLLVM_INCLUDE_BENCHMARKS=OFF \
+ -DLLVM_INCLUDE_EXAMPLES=OFF \
+ -DLLVM_INSTALL_UTILS=ON \
+ -DLLVM_LINK_LLVM_DYLIB=ON \
+ -DLLVM_TARGETS_TO_BUILD='AArch64;AMDGPU;ARM;BPF;Hexagon;Lanai;Mips;MSP430;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86;XCore' \
+ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD='M68k' \
+ $arch_config \
+ -Bbuild .
+
+ make -C build llvm-tblgen
+ make -C build
+
+ python3 utils/lit/setup.py build
+}
+
+check() {
+ make -C build check-llvm
+}
+
+package() {
+ make DESTDIR="$pkgdir" -C build install
+
+ cd "$pkgdir"/$_prefix
+
+ # Remove RPATHs.
+ file lib/*.so bin/* \
+ | awk -F: '$2~/ELF/{print $1}' \
+ | xargs -r chrpath -d
+
+ # Thread 3 requires a lot of stack space to LTO when targeting ARM.
+ # Note that this occurs even when crossing (on a ppc64 host).
+ chelf -s 1048576 bin/llvm-lto2
+
+ # Symlink files from /usr/lib/llvm*/bin to /usr/bin.
+ mkdir -p "$pkgdir"/usr/bin
+ for full_name in bin/*; do
+ bin_name=${full_name##*/}
+ # If this package provides=llvm (i.e. it's the default/latest
+ # llvm package), omit version infix/suffix.
+ if [ "$_default_llvm" = yes ]; then
+ link_name=$bin_name
+ # ..otherwise, add version infix/suffix to the executable name.
+ else case "$bin_name" in
+ llvm-*) link_name="llvm$_majorver-${bin_name#llvm-}";;
+ *) link_name="$bin_name$_majorver";;
+ esac
+ fi
+ case "$name" in
+ FileCheck | obj2yaml | yaml2obj) continue;;
+ esac
+ ln -s ../lib/llvm$_majorver/bin/$bin_name "$pkgdir"/usr/bin/$link_name
+ done
+
+ # Move /usr/lib/$pkgname/include/ into /usr/include/$pkgname/
+ # and symlink it back.
+ mkdir -p "$pkgdir"/usr/include/$pkgname
+ mv include/* "$pkgdir"/usr/include/$pkgname/
+ rmdir include
+ ln -s ../../include/$pkgname include
+
+ ln -s "$pkgdir"/usr/lib/cmake/llvm ../$pkgname/lib/cmake/llvm
+}
+
+static() {
+ pkgdesc="LLVM $_majorver static libraries"
+ _common_subpkg
+
+ mkdir -p "$subpkgdir"/$_prefix/lib
+ mv "$pkgdir"/$_prefix/lib/*.a "$subpkgdir"/$_prefix/lib/
+ strip -d "$subpkgdir"/$_prefix/lib/*.a
+}
+
+libs() {
+ pkgdesc="LLVM $_majorver runtime library"
+ main_soname="libLLVM-$_majorver.so"
+ ver_soname="libLLVM-$pkgver.so"
+ _common_subpkg
+
+ # libLLVM should be in /usr/lib. This is needed for binaries that are
+ # dynamically linked with libLLVM, so they can find it on default path.
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/$_prefix/lib/$main_soname "$subpkgdir"/usr/lib/
+ mv "$pkgdir"/$_prefix/lib/libLLVM.so.$_majorver* "$subpkgdir"/usr/lib/
+ ln -s $main_soname "$subpkgdir"/usr/lib/$ver_soname
+ strip "$subpkgdir"/usr/lib/$ver_soname #797
+
+ # And also symlink it back to the LLVM prefix.
+ mkdir -p "$subpkgdir"/$_prefix/lib
+ ln -s ../../$main_soname "$subpkgdir"/$_prefix/lib/$main_soname
+ ln -s ../../$main_soname "$subpkgdir"/$_prefix/lib/$ver_soname
+ ln -s ../../$main_soname "$subpkgdir"/$_prefix/lib/libLLVM.so
+}
+
+dev() {
+ _common_subpkg
+ default_dev
+
+ mkdir -p "$subpkgdir"/$_prefix/bin
+
+ mv "$pkgdir"/$_prefix/lib "$subpkgdir"/$_prefix/
+ mv "$pkgdir"/$_prefix/include "$subpkgdir"/$_prefix/
+
+ mv "$pkgdir"/$_prefix/bin/llvm-config "$subpkgdir"/$_prefix/bin/
+}
+
+_test_utils() {
+ pkgdesc="LLVM $_majorver utilities for executing LLVM and Clang style test suites"
+ depends="python3"
+ _common_subpkg
+ replaces=""
+
+ litver="$(python3 "$builddir"/utils/lit/setup.py --version 2>/dev/null \
+ | sed 's/\.dev.*$//')"
+ test -n "$litver" || return 1
+ provides="$provides lit=$litver-r$pkgrel"
+
+ cd "$builddir"/build
+
+ install -D -m 755 bin/FileCheck "$subpkgdir"/$_prefix/bin/FileCheck
+ install -D -m 755 bin/count "$subpkgdir"/$_prefix/bin/count
+ install -D -m 755 bin/not "$subpkgdir"/$_prefix/bin/not
+
+ python3 ../utils/lit/setup.py install --prefix=/usr --root="$subpkgdir"
+ ln -s ../../../bin/lit "$subpkgdir"/$_prefix/bin/lit
+}
+
+_common_subpkg() {
+ if [ "$_default_llvm" = yes ]; then
+ replaces="llvm${subpkgname#$pkgname}"
+ provides="$replaces=$pkgver-r$pkgrel"
+ fi
+}
+
+sha512sums="25eeee9984c8b4d0fbc240df90f33cbb000d3b0414baff5c8982beafcc5e59e7ef18f6f85d95b3a5f60cb3d4cd4f877c80487b5768bc21bc833f107698ad93db llvm-project-18.1.8.src.tar.xz
+f84cd65d7042e89826ba6e8d48c4c302bf4980da369d7f19a55f217e51c00ca8ed178d453df3a3cee76598a7cecb94aed0775a6d24fe73266f82749913fc3e71 llvm-fix-build-with-musl-libc.patch
+d56945bb0476561028616222846257f990d66e68b4458894f8791252411038b269831f9400ed9df3b99f571a82443caaac347a8b38a5516c77c3583469118309 disable-FileSystemTest.CreateDir-perms-assert.patch
+9e919d7988b18c7184d9fccd14911d70bbe2acf82d38111bfd41f1ba2976fea07e74527a43c552dad158c982a2cbaaf03f6a1e98c7a1fc02b4e75382cfe6d0b2 dyld-elf-ppc32.patch
+807587a0c897d47a01a846c5c4f7cbf1f2d16437a163b66ee2381a7147e9d04b0141b2c76d022db61903d0d2841ddb267ba98c66c9e41501ca41837659743df8 hexagon.patch
+22dedbbdc99ab4df6c64921186803552fc61cfc00a5cd052295a5450809e7205ac21dd07df158b7e99b960084b2ec3d8832480a8cd073fe1c2d613cd21c90b60 i586-json-test.patch
+b186ce027dca389cfd23dc91b03e023e688c7610745cf62d0b277b6178972bcf55abf0df08453f2a6b85dc61dba929cb565cb30633a2fe0f193a443f54025bf7 m68k-endianness.patch
+64a28241b9ea87cfc4313440bf53b1c85dff9a1c84846f5b7619b67842acd68da878a1196baccb1e28f44a1484c09d5bffd4cf14341ed2b24642006e6d87b90a macho32.patch
+bec1fe4761dae33a8012a54b7bbdd179cac82febcd46ace1844772c06f207661c903f05fcb7a5ebbbece3e33a88b20a5d9b31b40e8a8cd5c626aec04cb6735be musl-ppc64-elfv2.patch
+bda83678acb97be4d4236179792b3555b8000242fa6bd9e2e78dcd4f6182395df7fa9b8742fde946f19b668615ab37db8670340d43683787d36c540937bca523 ppc-gcc-bug.patch
+89ef5fbab039b017a5652656adf17b680525f1c5dd0b1afc8034fe0b34a2ca196d87640f54cc826356cfcd88c6e5f10754b7e38f04ca49ede4f3864080b787bd python3-test.patch
+3dc797036dd976db76c774c4b87609d8548cfcd6575dd1e5322a2170fca4419b6934e12874f1c6650d73b858527d22d70e7abe5270dff79c190feeeb1d965d0a roundeven.patch"
diff --git a/user/llvm18/disable-FileSystemTest.CreateDir-perms-assert.patch b/user/llvm18/disable-FileSystemTest.CreateDir-perms-assert.patch
new file mode 100644
index 000000000..64f13db73
--- /dev/null
+++ b/user/llvm18/disable-FileSystemTest.CreateDir-perms-assert.patch
@@ -0,0 +1,61 @@
+Do not assert permissions of file created in /tmp directory.
+
+This assertion fails, probably due to some specific setup of /tmp
+on build servers.
+
+ FAIL: LLVM-Unit :: Support/SupportTests/FileSystemTest.CreateDir (1293 of 17222)
+ ******************** TEST 'LLVM-Unit :: Support/SupportTests/FileSystemTest.CreateDir' FAILED ********************
+ Note: Google Test filter = FileSystemTest.CreateDir
+ [==========] Running 1 test from 1 test case.
+ [----------] Global test environment set-up.
+ [----------] 1 test from FileSystemTest
+ [ RUN ] FileSystemTest.CreateDir
+ /home/buildozer/aports/testing/llvm3.9/src/llvm-3.9.1.src/unittests/Support/Path.cpp:591: Failure
+ Value of: fs::perms::owner_read | fs::perms::owner_exe
+ Actual: 320
+ Expected: Status.permissions() & fs::perms::all_all
+ Which is: 448
+
+--- a/unittests/Support/Path.cpp
++++ b/unittests/Support/Path.cpp
+@@ -1004,23 +1004,23 @@
+ ASSERT_NO_ERROR(fs::remove(Twine(TestDirectory) + "foo"));
+
+ #ifdef LLVM_ON_UNIX
+- // Set a 0000 umask so that we can test our directory permissions.
+- mode_t OldUmask = ::umask(0000);
+-
+- fs::file_status Status;
+- ASSERT_NO_ERROR(
+- fs::create_directory(Twine(TestDirectory) + "baz500", false,
+- fs::perms::owner_read | fs::perms::owner_exe));
+- ASSERT_NO_ERROR(fs::status(Twine(TestDirectory) + "baz500", Status));
+- ASSERT_EQ(Status.permissions() & fs::perms::all_all,
+- fs::perms::owner_read | fs::perms::owner_exe);
+- ASSERT_NO_ERROR(fs::create_directory(Twine(TestDirectory) + "baz777", false,
+- fs::perms::all_all));
+- ASSERT_NO_ERROR(fs::status(Twine(TestDirectory) + "baz777", Status));
+- ASSERT_EQ(Status.permissions() & fs::perms::all_all, fs::perms::all_all);
+-
+- // Restore umask to be safe.
+- ::umask(OldUmask);
++// // Set a 0000 umask so that we can test our directory permissions.
++// mode_t OldUmask = ::umask(0000);
++//
++// fs::file_status Status;
++// ASSERT_NO_ERROR(
++// fs::create_directory(Twine(TestDirectory) + "baz500", false,
++// fs::perms::owner_read | fs::perms::owner_exe));
++// ASSERT_NO_ERROR(fs::status(Twine(TestDirectory) + "baz500", Status));
++// ASSERT_EQ(Status.permissions() & fs::perms::all_all,
++// fs::perms::owner_read | fs::perms::owner_exe);
++// ASSERT_NO_ERROR(fs::create_directory(Twine(TestDirectory) + "baz777", false,
++// fs::perms::all_all));
++// ASSERT_NO_ERROR(fs::status(Twine(TestDirectory) + "baz777", Status));
++// ASSERT_EQ(Status.permissions() & fs::perms::all_all, fs::perms::all_all);
++//
++// // Restore umask to be safe.
++// ::umask(OldUmask);
+ #endif
+
+ #ifdef _WIN32
diff --git a/user/llvm18/dwarf-info.patch b/user/llvm18/dwarf-info.patch
new file mode 100644
index 000000000..9357c6519
--- /dev/null
+++ b/user/llvm18/dwarf-info.patch
@@ -0,0 +1,28 @@
+Author: A. Wilcox <awilfox@adelielinux.org>
+
+This isn't the proper fix, but debugging the LLVM formatter is a bit
+above my paygrade at the moment.
+
+The issue shows up in the DWARF X86 test on ppc and armv7:
+
+error: Simplified template DW_AT_name could not be reconstituted:
+ original: f3<char, '\x00', '\x01', '\x06', '\a', '\r', '\x0e', '\x1f', ' ', '!', '\x7f', '\x80'>
+ reconstituted: f3<char, '\x00', '\x00', '\x00', '\a', '\r', '\x00', '\x00', ' ', '!', '\x00', '\x00'>
+
+With this patch, this error does not occur. Debugging shows that the
+llvm::format overload called in the error case is <long long>, so I
+think it is having an issue converting a 64-bit value on platforms
+where char is default-unsigned.
+
+(pmmx does not show this issue, and has signed char.)
+--- llvm-14.0.6.src/lib/DebugInfo/DWARF/DWARFDie.cpp.old 2022-06-22 16:46:24.000000000 +0000
++++ llvm-14.0.6.src/lib/DebugInfo/DWARF/DWARFDie.cpp 2022-11-28 10:32:05.573627744 +0000
+@@ -506,7 +506,7 @@
+ OS << (char)Val;
+ OS << "'";
+ } else if (Val < 256)
+- OS << to_string(llvm::format("'\\x%02x'", Val));
++ OS << to_string(llvm::format("'\\x%02x'", (unsigned char)Val));
+ else if (Val <= 0xFFFF)
+ OS << to_string(llvm::format("'\\u%04x'", Val));
+ else
diff --git a/user/llvm18/dyld-elf-ppc32.patch b/user/llvm18/dyld-elf-ppc32.patch
new file mode 100644
index 000000000..7fb744169
--- /dev/null
+++ b/user/llvm18/dyld-elf-ppc32.patch
@@ -0,0 +1,24 @@
+Author: A. Wilcox <awilfox@adelielinux.org>
+Upstream-Status: Pending
+
+This implements the R_PPC_REL32 relocation type, which is needed for the
+OrcJIT to work properly on 32-bit PowerPC.
+
+Needs more tests before submitting upstream, but seems to DTRT.
+
+--- llvm-14.0.6.src/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp.old 2022-06-22 16:46:24.000000000 +0000
++++ llvm-14.0.6.src/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp 2022-11-28 06:33:12.239921624 +0000
+@@ -830,6 +830,13 @@
+ case ELF::R_PPC_ADDR16_HA:
+ writeInt16BE(LocalAddress, applyPPCha(Value + Addend));
+ break;
++ case ELF::R_PPC_REL32:
++ uint32_t FinalAddress = Section.getLoadAddressWithOffset(Offset);
++ int64_t delta = static_cast<int64_t>(Value - FinalAddress + Addend);
++ if (SignExtend64<32>(delta) != delta)
++ llvm_unreachable("Relocation R_PPC_REL32 overflow");
++ writeInt32BE(LocalAddress, delta);
++ break;
+ }
+ }
+
diff --git a/user/llvm18/hexagon.patch b/user/llvm18/hexagon.patch
new file mode 100644
index 000000000..552079b80
--- /dev/null
+++ b/user/llvm18/hexagon.patch
@@ -0,0 +1,95 @@
+From 37605662a99bd0815e2f2e452eb6ab1ce53ecffd Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Mon, 30 May 2022 02:51:34 -0500
+Subject: [PATCH] [Hexagon][Tests] Fix tests on Linux/musl
+
+When running on a host system using musl, the target triple is defined
+as hexagon-unknown-linux-musl by default. The Linux ABI differs from
+the non-Linux one with varargs, so this causes the tests to fail.
+
+Closes BZ49592, PR48936.
+
+Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
+---
+ test/CodeGen/Hexagon/csr-stubs-spill-threshold.ll | 2 +-
+ test/CodeGen/Hexagon/long-calls.ll | 2 +-
+ test/CodeGen/Hexagon/mlong-calls.ll | 2 +-
+ test/CodeGen/Hexagon/pic-regusage.ll | 2 +-
+ test/CodeGen/Hexagon/runtime-stkchk.ll | 2 +-
+ test/CodeGen/Hexagon/swp-memrefs-epilog.ll | 2 +-
+ test/CodeGen/Hexagon/vararg-formal.ll | 2 +-
+ 7 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/test/CodeGen/Hexagon/csr-stubs-spill-threshold.ll b/test/CodeGen/Hexagon/csr-stubs-spill-threshold.ll
+index afbef217911a..d317d7eac800 100644
+--- a/test/CodeGen/Hexagon/csr-stubs-spill-threshold.ll
++++ b/test/CodeGen/Hexagon/csr-stubs-spill-threshold.ll
+@@ -1,4 +1,4 @@
+-; RUN: llc -mtriple=hexagon -O2 -spill-func-threshold=2 < %s | FileCheck %s
++; RUN: llc -march=hexagon -mtriple=hexagon-unknown-linux-gnu -O2 -spill-func-threshold=2 < %s | FileCheck %s
+
+ declare i32 @f0(i32, i32, i32, i32, i32, i32)
+
+diff --git a/test/CodeGen/Hexagon/long-calls.ll b/test/CodeGen/Hexagon/long-calls.ll
+index 628362783c9c..886405a2d91a 100644
+--- a/test/CodeGen/Hexagon/long-calls.ll
++++ b/test/CodeGen/Hexagon/long-calls.ll
+@@ -1,4 +1,4 @@
+-; RUN: llc -mtriple=hexagon -enable-save-restore-long -hexagon-initial-cfg-cleanup=0 < %s | FileCheck %s
++; RUN: llc -march=hexagon -mtriple=hexagon-unknown-linux-gnu -enable-save-restore-long -hexagon-initial-cfg-cleanup=0 < %s | FileCheck %s
+
+ ; Check that the -long-calls feature is supported by the backend.
+
+diff --git a/test/CodeGen/Hexagon/mlong-calls.ll b/test/CodeGen/Hexagon/mlong-calls.ll
+index d76b87f987fe..383486dfe63d 100644
+--- a/test/CodeGen/Hexagon/mlong-calls.ll
++++ b/test/CodeGen/Hexagon/mlong-calls.ll
+@@ -1,4 +1,4 @@
+-; RUN: llc -hexagon-long-calls -mtriple=hexagon -enable-save-restore-long=true < %s | FileCheck %s
++; RUN: llc -hexagon-long-calls -march=hexagon -mtriple=hexagon-unknown-linux-gnu -enable-save-restore-long=true < %s | FileCheck %s
+
+ ; CHECK: call ##f1
+ ; CHECK: jump ##__restore
+diff --git a/test/CodeGen/Hexagon/pic-regusage.ll b/test/CodeGen/Hexagon/pic-regusage.ll
+index 9d3b6cec39e3..077063e36550 100644
+--- a/test/CodeGen/Hexagon/pic-regusage.ll
++++ b/test/CodeGen/Hexagon/pic-regusage.ll
+@@ -1,4 +1,4 @@
+-; RUN: llc -mtriple=hexagon -relocation-model=pic < %s | FileCheck %s
++; RUN: llc -march=hexagon -mtriple=hexagon-unknown-linux-gnu -relocation-model=pic < %s | FileCheck %s
+
+ ; Force the use of R14 (by clobbering everything else in the inline asm).
+ ; Make sure that R14 is not set before the __save call (which will clobber
+diff --git a/test/CodeGen/Hexagon/runtime-stkchk.ll b/test/CodeGen/Hexagon/runtime-stkchk.ll
+index 66e93d02ef51..2f3f2ad10f6a 100644
+--- a/test/CodeGen/Hexagon/runtime-stkchk.ll
++++ b/test/CodeGen/Hexagon/runtime-stkchk.ll
+@@ -1,4 +1,4 @@
+-; RUN: llc -mtriple=hexagon -mcpu=hexagonv55 -enable-stackovf-sanitizer < %s | FileCheck %s
++; RUN: llc -march=hexagon -mcpu=hexagonv55 -mtriple=hexagon-unknown-linux-gnu -enable-stackovf-sanitizer < %s | FileCheck %s
+
+ ; CHECK-LABEL: foo_1
+ ; CHECK: __runtime_stack_check
+diff --git a/test/CodeGen/Hexagon/swp-memrefs-epilog.ll b/test/CodeGen/Hexagon/swp-memrefs-epilog.ll
+index 20e39dd08fd7..b34dfbc31e9d 100644
+--- a/test/CodeGen/Hexagon/swp-memrefs-epilog.ll
++++ b/test/CodeGen/Hexagon/swp-memrefs-epilog.ll
+@@ -1,4 +1,4 @@
+-; RUN: llc -march=hexagon -O2 -fp-contract=fast < %s -pipeliner-experimental-cg=true | FileCheck %s
++; RUN: llc -march=hexagon -mtriple=hexagon-unknown-linux-gnu -O2 -fp-contract=fast < %s -pipeliner-experimental-cg=true | FileCheck %s
+
+ ; Test that the memoperands for instructions in the epilog are updated
+ ; correctly. Previously, the pipeliner updated the offset for the memoperands
+diff --git a/test/CodeGen/Hexagon/vararg-formal.ll b/test/CodeGen/Hexagon/vararg-formal.ll
+index 6bba65fcab16..fb3132929bcf 100644
+--- a/test/CodeGen/Hexagon/vararg-formal.ll
++++ b/test/CodeGen/Hexagon/vararg-formal.ll
+@@ -1,4 +1,4 @@
+-; RUN: llc -march=hexagon < %s | FileCheck %s
++; RUN: llc -march=hexagon -mtriple=hexagon-unknown-linux-gnu < %s | FileCheck %s
+
+ ; Make sure that the first formal argument is not loaded from memory.
+ ; CHECK-NOT: memw
+--
+2.36.0
+
diff --git a/user/llvm18/i586-json-test.patch b/user/llvm18/i586-json-test.patch
new file mode 100644
index 000000000..e72763976
--- /dev/null
+++ b/user/llvm18/i586-json-test.patch
@@ -0,0 +1,19 @@
+--- llvm/unittests/Support/JSONTest.cpp.old 2024-06-15 12:21:32.000000000 -0500
++++ llvm/unittests/Support/JSONTest.cpp 2024-07-08 21:09:43.106973458 -0500
+@@ -313,6 +313,8 @@
+ 1.5,
+ },
+
++ // Broken by -fexcess-precision=fast.
++#ifndef __i586
+ {
+ "Integer, not exact double. Stored as int64, convertible.",
+ int64_t{0x4000000000000001},
+@@ -328,6 +330,7 @@
+ int64_t{-0x4000000000000001},
+ double{-0x4000000000000000},
+ },
++#endif
+
+ // PR46470,
+ // https://developercommunity.visualstudio.com/content/problem/1093399/incorrect-result-when-printing-6917529027641081856.html
diff --git a/user/llvm18/llvm-fix-build-with-musl-libc.patch b/user/llvm18/llvm-fix-build-with-musl-libc.patch
new file mode 100644
index 000000000..6ee91ea44
--- /dev/null
+++ b/user/llvm18/llvm-fix-build-with-musl-libc.patch
@@ -0,0 +1,46 @@
+From 5c571082fdaf61f6df19d9b7137dc26d71334058 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 18 Feb 2016 10:33:04 +0100
+Subject: [PATCH 2/3] Fix build with musl libc
+
+On musl libc the fopen64 and fopen are the same thing, but for
+compatibility they have a `#define fopen64 fopen`. Same applies for
+fseek64, fstat64, fstatvfs64, ftello64, lstat64, stat64 and tmpfile64.
+---
+ include/llvm/Analysis/TargetLibraryInfo.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/include/llvm/Analysis/TargetLibraryInfo.h b/include/llvm/Analysis/TargetLibraryInfo.h
+index 7becdf0..7f14427 100644
+--- a/include/llvm/Analysis/TargetLibraryInfo.h
++++ b/include/llvm/Analysis/TargetLibraryInfo.h
+@@ -18,6 +18,26 @@
+ #include "llvm/IR/Module.h"
+ #include "llvm/Pass.h"
+
++#undef fopen64
++#undef fseeko64
++#undef fstat64
++#undef fstatvfs64
++#undef ftello64
++#undef lstat64
++#undef stat64
++#undef tmpfile64
++#undef F_GETLK64
++#undef F_SETLK64
++#undef F_SETLKW64
++#undef flock64
++#undef open64
++#undef openat64
++#undef creat64
++#undef lockf64
++#undef posix_fadvise64
++#undef posix_fallocate64
++#undef off64_t
++
+ namespace llvm {
+ /// VecDesc - Describes a possible vectorization of a function.
+ /// Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized
+--
+2.7.3
+
diff --git a/user/llvm18/m68k-endianness.patch b/user/llvm18/m68k-endianness.patch
new file mode 100644
index 000000000..49e96a995
--- /dev/null
+++ b/user/llvm18/m68k-endianness.patch
@@ -0,0 +1,26 @@
+Upstream: https://github.com/llvm/llvm-project/issues/94726
+
+diff --git a/lib/Target/M68k/MCTargetDesc/M68kBaseInfo.h b/lib/Target/M68k/MCTargetDesc/M68kBaseInfo.h
+index 1376b06bef6f..62ea03cc9760 100644
+--- a/lib/Target/M68k/MCTargetDesc/M68kBaseInfo.h
++++ b/lib/Target/M68k/MCTargetDesc/M68kBaseInfo.h
+@@ -85,9 +85,16 @@ template <typename value_t> value_t swapWord(value_t Val) {
+ Val = support::endian::byte_swap(Val, llvm::endianness::big);
+ value_t NewVal = 0;
+ for (unsigned i = 0U; i != NumWords; ++i) {
+- uint16_t Part = (Val >> (i * 16)) & 0xFFFF;
+- Part = support::endian::byte_swap(Part, llvm::endianness::big);
+- NewVal |= (Part << (i * 16));
++ if (llvm::endianness::native == llvm::endianness::big) {
++ uint16_t Lo = (Val >> (i * 16)) & 0xFFFF;
++ NewVal |= (Lo << (++i * 16));
++ uint16_t Hi = (Val >> (++i * 16)) & 0xFFFF;
++ NewVal |= (Hi << ((i - 1) * 16));
++ } else {
++ uint16_t Part = (Val >> (i * 16)) & 0xFFFF;
++ Part = support::endian::byte_swap(Part, llvm::endianness::big);
++ NewVal |= (Part << (i * 16));
++ }
+ }
+ return NewVal;
+ }
diff --git a/user/llvm18/macho32.patch b/user/llvm18/macho32.patch
new file mode 100644
index 000000000..e18098372
--- /dev/null
+++ b/user/llvm18/macho32.patch
@@ -0,0 +1,17 @@
+Use integer offset math instead of pointer math to determine load
+command bounds.
+
+Upstream-URL: https://github.com/llvm/llvm-project/issues/56746
+
+--- llvm-14.0.6.src/lib/Object/MachOObjectFile.cpp.old 2022-06-22 16:46:24.000000000 +0000
++++ llvm-14.0.6.src/lib/Object/MachOObjectFile.cpp 2022-11-28 04:21:02.730211841 +0000
+@@ -192,7 +192,8 @@
+ getLoadCommandInfo(const MachOObjectFile &Obj, const char *Ptr,
+ uint32_t LoadCommandIndex) {
+ if (auto CmdOrErr = getStructOrErr<MachO::load_command>(Obj, Ptr)) {
+- if (CmdOrErr->cmdsize + Ptr > Obj.getData().end())
++ uint64_t Offset = Ptr - Obj.getData().begin();
++ if (CmdOrErr->cmdsize + Offset > Obj.getData().size())
+ return malformedError("load command " + Twine(LoadCommandIndex) +
+ " extends past end of file");
+ if (CmdOrErr->cmdsize < 8)
diff --git a/user/llvm18/musl-ppc64-elfv2.patch b/user/llvm18/musl-ppc64-elfv2.patch
new file mode 100644
index 000000000..49f6e5702
--- /dev/null
+++ b/user/llvm18/musl-ppc64-elfv2.patch
@@ -0,0 +1,28 @@
+From 750d323a6060ad92c3d247f85d6555041f55b4a5 Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Thu, 4 Oct 2018 15:26:59 -0500
+Subject: [PATCH] Add support for powerpc64-*-linux-musl targets
+
+This patch ensures that 64-bit PowerPC musl targets use ELFv2 ABI on both
+endians. It additionally adds a test that big endian PPC64 uses ELFv2 on
+musl.
+---
+ lib/Target/PowerPC/PPCTargetMachine.cpp | 4 ++++
+ test/CodeGen/PowerPC/ppc64-elf-abi.ll | 1 +
+ 2 files changed, 5 insertions(+)
+
+diff --git a/test/CodeGen/PowerPC/ppc64-elf-abi.ll b/test/CodeGen/PowerPC/ppc64-elf-abi.ll
+index 1e17930304b..aa594b37b47 100644
+--- a/test/CodeGen/PowerPC/ppc64-elf-abi.ll
++++ b/test/CodeGen/PowerPC/ppc64-elf-abi.ll
+@@ -1,6 +1,7 @@
+ ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv1
+ ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -target-abi elfv1 < %s | FileCheck %s -check-prefix=CHECK-ELFv1
+ ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -target-abi elfv2 < %s | FileCheck %s -check-prefix=CHECK-ELFv2
++; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-musl < %s | FileCheck %s -check-prefix=CHECK-ELFv2
+ ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv2
+ ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -target-abi elfv1 < %s | FileCheck %s -check-prefix=CHECK-ELFv1
+ ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -target-abi elfv2 < %s | FileCheck %s -check-prefix=CHECK-ELFv2
+--
+2.18.0
+
diff --git a/user/llvm18/ppc-gcc-bug.patch b/user/llvm18/ppc-gcc-bug.patch
new file mode 100644
index 000000000..3c1371dc4
--- /dev/null
+++ b/user/llvm18/ppc-gcc-bug.patch
@@ -0,0 +1,22 @@
+Upstream: https://github.com/llvm/llvm-project/issues/95594
+Ref: #1204
+
+--- llvm/include/llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h.old 2024-06-15 12:21:32.000000000 -0500
++++ llvm/include/llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h 2024-06-25 21:42:07.495284340 -0500
+@@ -390,6 +390,8 @@
+ return Size;
+ }
+
++#pragma GCC push_options
++#pragma GCC optimize("no-tree-ch")
+ static bool serialize(SPSOutputBuffer &OB, const SequenceT &S) {
+ if (!SPSArgList<uint64_t>::serialize(OB, static_cast<uint64_t>(S.size())))
+ return false;
+@@ -398,6 +400,7 @@
+ return false;
+ return true;
+ }
++#pragma GCC pop_options
+
+ static bool deserialize(SPSInputBuffer &IB, SequenceT &S) {
+ using TBSD = TrivialSPSSequenceDeserialization<SPSElementTagT, SequenceT>;
diff --git a/user/llvm18/python3-test.patch b/user/llvm18/python3-test.patch
new file mode 100644
index 000000000..76f13385d
--- /dev/null
+++ b/user/llvm18/python3-test.patch
@@ -0,0 +1,8 @@
+--- llvm-7.0.1.src/test/BugPoint/compile-custom.ll.py.old 2014-03-13 00:10:37.000000000 +0000
++++ llvm-7.0.1.src/test/BugPoint/compile-custom.ll.py 2019-03-10 03:48:48.600000000 +0000
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ from __future__ import print_function
+
diff --git a/user/llvm18/roundeven.patch b/user/llvm18/roundeven.patch
new file mode 100644
index 000000000..3747969c1
--- /dev/null
+++ b/user/llvm18/roundeven.patch
@@ -0,0 +1,49 @@
+--- llvm-14.0.4.src/lib/Analysis/TargetLibraryInfo.cpp.old 2022-05-24 22:02:58.000000000 +0000
++++ llvm-14.0.4.src/lib/Analysis/TargetLibraryInfo.cpp 2022-07-06 01:38:22.016862561 +0000
+@@ -634,6 +634,13 @@
+ TLI.setUnavailable(LibFunc_statvfs64);
+ TLI.setUnavailable(LibFunc_tmpfile64);
+
++ // These functions are unavailable on musl.
++ if (T.isMusl()) {
++ TLI.setUnavailable(LibFunc_roundeven);
++ TLI.setUnavailable(LibFunc_roundevenf);
++ TLI.setUnavailable(LibFunc_roundevenl);
++ }
++
+ // Relaxed math functions are included in math-finite.h on Linux (GLIBC).
+ // Note that math-finite.h is no longer supported by top-of-tree GLIBC,
+ // so we keep these functions around just so that they're recognized by
+--- llvm-14.0.4.src/test/Transforms/InstCombine/double-float-shrink-2.ll.old 2022-05-24 22:02:58.000000000 +0000
++++ llvm-14.0.4.src/test/Transforms/InstCombine/double-float-shrink-2.ll 2022-07-06 02:03:20.657791057 +0000
+@@ -1,5 +1,5 @@
+ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+ ; REQUIRES: x86-registered-target,sparc-registered-target
+-; RUN: opt < %s -passes=instcombine -S -mtriple "i386-pc-linux" | FileCheck %s --check-prefixes=CHECK,DOUBLE-4BYTE-ALIGN
++; RUN: opt < %s -passes=instcombine -S -mtriple "i386-pc-linux-gnu" | FileCheck %s --check-prefixes=CHECK,DOUBLE-4BYTE-ALIGN
+ ; RUN: opt < %s -passes=instcombine -S -mtriple "i386-pc-win32" | FileCheck %s --check-prefixes=CHECK,DOUBLE-8BYTE-ALIGN
+ ; RUN: opt < %s -passes=instcombine -S -mtriple "x86_64-pc-win32" | FileCheck %s --check-prefixes=CHECK,DOUBLE-8BYTE-ALIGN
+--- llvm-14.0.4.src/test/ExecutionEngine/Interpreter/intrinsics.ll.old 2022-05-24 22:02:58.000000000 +0000
++++ llvm-14.0.4.src/test/ExecutionEngine/Interpreter/intrinsics.ll 2022-07-23 06:50:59.336665672 +0000
+@@ -13,8 +13,8 @@
+ declare double @llvm.trunc.f64(double)
+ declare float @llvm.round.f32(float)
+ declare double @llvm.round.f64(double)
+-declare float @llvm.roundeven.f32(float)
+-declare double @llvm.roundeven.f64(double)
++;declare float @llvm.roundeven.f32(float)
++;declare double @llvm.roundeven.f64(double)
+ declare float @llvm.copysign.f32(float, float)
+ declare double @llvm.copysign.f64(double, double)
+
+@@ -31,8 +31,8 @@
+ %trunc64 = call double @llvm.trunc.f64(double 0.000000e+00)
+ %round32 = call float @llvm.round.f32(float 0.000000e+00)
+ %round64 = call double @llvm.round.f64(double 0.000000e+00)
+- %roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)
+- %roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)
++ ;%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)
++ ;%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)
+ %copysign32 = call float @llvm.copysign.f32(float 0.000000e+00, float 0.000000e+00)
+ %copysign64 = call double @llvm.copysign.f64(double 0.000000e+00, double 0.000000e+00)
+ ret i32 0
diff --git a/user/mariadb/APKBUILD b/user/mariadb/APKBUILD
index 7c44f4c46..ee293e709 100644
--- a/user/mariadb/APKBUILD
+++ b/user/mariadb/APKBUILD
@@ -3,7 +3,7 @@
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=mariadb
pkgver=10.6.4
-pkgrel=0
+pkgrel=1
pkgdesc="Open source database server"
url="https://mariadb.org/"
arch="all"
@@ -26,6 +26,7 @@ subpackages="$pkgname-client $pkgname-server $pkgname-libs $pkgname-embedded
$pkgname-doc $pkgname-dev"
source="https://archive.mariadb.org/$pkgname-$pkgver/source/$pkgname-$pkgver.tar.gz
ppchax.patch
+ missing-header.patch
mariadb.initd
mariadb-server.limits
"
@@ -270,5 +271,6 @@ doc() {
sha512sums="c216244ce126e6f8954303a76078dc12146e8ea941041edd215dc05201adda1d5158cd7f1c9831328f783aba4f884965ae288f33bbc43229bc6224a4f1079071 mariadb-10.6.4.tar.gz
0cb265173923cb85517a1144cfa904dafe059c1f859e13b4415442cabbb414db5904f2dcee0e865914b0f9c181d1d61d220834cb187b14f8538a0d2552025a9d ppchax.patch
+6618ee5608b06941da08872ea7ea16149b72a0174b157f970c03a9a9110efe0704c72742e63181f8059244e89fe25d1b07f1c87fed72115d62f347f58fafccdd missing-header.patch
1a2b058aad5fd6d6964db58b663591299a5bf82e7ad21a105d53a3e7ad1c3674c737caf3ee12799cce947cf8ead1f3e789dd8afcfc769891f08208b3006f9654 mariadb.initd
d47324b34a87410eddb554f65199d145dfba9ae40407a62fb77df4e1ebf13087d15eb28e61e5e7cc9139eb42f093a0955136edae4020822652a1f0b4e219849e mariadb-server.limits"
diff --git a/user/mariadb/missing-header.patch b/user/mariadb/missing-header.patch
new file mode 100644
index 000000000..bdb89daa3
--- /dev/null
+++ b/user/mariadb/missing-header.patch
@@ -0,0 +1,12 @@
+Needed for compilation on GCC 13.
+
+--- mariadb-10.6.4/tpool/aio_linux.cc.old 2021-08-03 09:48:41.000000000 -0500
++++ mariadb-10.6.4/tpool/aio_linux.cc 2024-05-28 18:55:26.914066003 -0500
+@@ -18,6 +18,7 @@
+
+ # include <thread>
+ # include <atomic>
++# include <cstdio>
+ # include <libaio.h>
+ # include <sys/syscall.h>
+
diff --git a/user/mbedtls/APKBUILD b/user/mbedtls/APKBUILD
index 46d1d5461..912f1f57c 100644
--- a/user/mbedtls/APKBUILD
+++ b/user/mbedtls/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=mbedtls
-pkgver=3.4.1
+pkgver=3.6.0
pkgrel=0
pkgdesc="Lightweight TLS library"
url="https://tls.mbed.org"
@@ -11,9 +11,7 @@ depends=""
checkdepends="python3"
makedepends="cmake"
subpackages="$pkgname-dev"
-source="mbedtls-$pkgver.tar.gz::https://github.com/ARMmbed/mbedtls/archive/refs/tags/v$pkgver.tar.gz
- fix-big-endian-alignment-tests.patch
- "
+source="https://github.com/ARMmbed/mbedtls/releases/download/v$pkgver/$pkgname-$pkgver.tar.bz2"
# secfixes:
# 3.3.0-r0:
@@ -51,5 +49,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="4aa322b55489bdc54f3b6f4e6175515ca22e74b2d3615334b32f89fb61ac13339e24a5c659bfae27dd948e4ac8783d7f2b3628418ac3df412dc5b5decceebc69 mbedtls-3.4.1.tar.gz
-40a4aefd39b63babf1f54bb2ab655278aaca1482da6e0b8943751a55c067307f8a591217b0c3b546a8ae02f7eca72c22da9d74378a5c28e00f8ca97dbcf1b7f8 fix-big-endian-alignment-tests.patch"
+sha512sums="5c395890d486144af882aa96c9430103f79df889139969a64a490c0cafbdd5631a72bb668aa59b062204f19a5bb36dfcc5a096b59d76c7ef27f2560cd2388682 mbedtls-3.6.0.tar.bz2"
diff --git a/user/mbedtls/fix-big-endian-alignment-tests.patch b/user/mbedtls/fix-big-endian-alignment-tests.patch
deleted file mode 100644
index c03fdb426..000000000
--- a/user/mbedtls/fix-big-endian-alignment-tests.patch
+++ /dev/null
@@ -1,313 +0,0 @@
-See also:
-
- * https://git.adelielinux.org/adelie/packages/-/issues/1002
- * https://github.com/Mbed-TLS/mbedtls/issues/7428
- * https://github.com/Mbed-TLS/mbedtls/pull/7440
-
-From 9dc8b6a6a201ccdbfcbf0de8f76b8b0ddfc2f85c Mon Sep 17 00:00:00 2001
-From: Dave Rodgman <dave.rodgman@arm.com>
-Date: Thu, 13 Apr 2023 12:53:35 +0100
-Subject: [PATCH 1/6] Test fixes for big-endian
-
-Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
----
- tests/suites/test_suite_alignment.function | 58 ++++++++++++----------
- 1 file changed, 31 insertions(+), 27 deletions(-)
-
-diff --git a/tests/suites/test_suite_alignment.function b/tests/suites/test_suite_alignment.function
-index f6703318ce7..45080cc7b6a 100644
---- a/tests/suites/test_suite_alignment.function
-+++ b/tests/suites/test_suite_alignment.function
-@@ -17,6 +17,20 @@ int parse_hex_string(char *hex_string, uint64_t *result)
- if (mbedtls_test_unhexify(raw, sizeof(raw), hex_string, &olen) != 0) {
- return 0;
- }
-+
-+ /* If < 8 bytes, shift right and pad with leading zeros for big-endian */
-+ if (MBEDTLS_IS_BIG_ENDIAN) {
-+ if (olen < 8) {
-+ int offset = 8 - olen;
-+ for (int i = olen - 1; i >= 0; i--) {
-+ raw[i + offset] = raw[i];
-+ }
-+ for (int i = 0; i < offset; i++) {
-+ raw[i] = 0;
-+ }
-+ }
-+ }
-+
- *result = 0;
- for (size_t i = 0; i < olen; i++) {
- if (MBEDTLS_IS_BIG_ENDIAN) {
-@@ -57,38 +71,28 @@ void mbedtls_unaligned_access(int size, int offset)
- break;
- }
-
-- /* Generate expected result */
-- uint64_t expected = 0;
-- for (uint8_t i = 0; i < 8; i++) {
-- uint8_t shift;
-- if (MBEDTLS_IS_BIG_ENDIAN) {
-- /*
-- * Similar to little-endian case described below, but the shift needs
-- * to be inverted
-- */
-- shift = 7 - (i * 8);
-- } else {
-- /* example for offset == 1:
-- * expected = (( 1 + 0 ) << (0 * 8)) | (( 1 + 1 ) << (1 * 8)) | (( 1 + 2 ) << (2 * 8)))
-- * = (1 << 0) | (2 << 8) | (3 << 16) ...
-- * = 0x0807060504030201
-- * x = { 0, 1, 2, 3, ... }
-- * ie expected is the value that would be read from x on a LE system, when
-- * byte swapping is not performed
-- */
-- shift = i * 8;
-- }
-- uint64_t b = offset + i;
-- expected |= b << shift;
-+ /* Define expected result by manually aligning the raw bytes, and
-+ * reading back with a normal pointer access. */
-+ uint64_t raw_aligned = 0;
-+ uint8_t *e8 = (uint8_t *) &raw_aligned;
-+ uint8_t *r8 = ((uint8_t *) &raw) + offset;
-+ /* Make aligned copy */
-+ for (int i = 0; i < size / 8; i++) {
-+ e8[i] = r8[i];
- }
--
-- /* Mask out excess bits from expected result */
-+ /* Make a 16/32/64 byte read from the aligned location, and copy to expected */
-+ uint64_t expected = 0;
- switch (size) {
- case 16:
-- expected &= 0xffff;
-+ uint16_t *e16 = (uint16_t *) &raw_aligned;
-+ expected = *e16;
- break;
- case 32:
-- expected &= 0xffffffff;
-+ uint32_t *e32 = (uint32_t *) &raw_aligned;
-+ expected = *e32;
-+ break;
-+ case 64:
-+ expected = raw_aligned;
- break;
- }
-
-
-From 0a05e703dbc303fc5e1154e926bc96cb312ace89 Mon Sep 17 00:00:00 2001
-From: Dave Rodgman <dave.rodgman@arm.com>
-Date: Thu, 13 Apr 2023 13:01:34 +0100
-Subject: [PATCH 2/6] Tidy-up
-
-Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
----
- tests/suites/test_suite_alignment.function | 29 ++++++++--------------
- 1 file changed, 11 insertions(+), 18 deletions(-)
-
-diff --git a/tests/suites/test_suite_alignment.function b/tests/suites/test_suite_alignment.function
-index 45080cc7b6a..cd4502005f0 100644
---- a/tests/suites/test_suite_alignment.function
-+++ b/tests/suites/test_suite_alignment.function
-@@ -19,15 +19,13 @@ int parse_hex_string(char *hex_string, uint64_t *result)
- }
-
- /* If < 8 bytes, shift right and pad with leading zeros for big-endian */
-- if (MBEDTLS_IS_BIG_ENDIAN) {
-- if (olen < 8) {
-- int offset = 8 - olen;
-- for (int i = olen - 1; i >= 0; i--) {
-- raw[i + offset] = raw[i];
-- }
-- for (int i = 0; i < offset; i++) {
-- raw[i] = 0;
-- }
-+ if (MBEDTLS_IS_BIG_ENDIAN && olen < 8) {
-+ int offset = 8 - olen;
-+ for (int i = olen - 1; i >= 0; i--) {
-+ raw[i + offset] = raw[i];
-+ }
-+ for (int i = 0; i < offset; i++) {
-+ raw[i] = 0;
- }
- }
-
-@@ -73,13 +71,8 @@ void mbedtls_unaligned_access(int size, int offset)
-
- /* Define expected result by manually aligning the raw bytes, and
- * reading back with a normal pointer access. */
-- uint64_t raw_aligned = 0;
-- uint8_t *e8 = (uint8_t *) &raw_aligned;
-- uint8_t *r8 = ((uint8_t *) &raw) + offset;
-- /* Make aligned copy */
-- for (int i = 0; i < size / 8; i++) {
-- e8[i] = r8[i];
-- }
-+ uint64_t raw_aligned;
-+ memcpy(&raw_aligned, ((uint8_t*)&raw) + offset, size / 8);
- /* Make a 16/32/64 byte read from the aligned location, and copy to expected */
- uint64_t expected = 0;
- switch (size) {
-@@ -98,7 +91,7 @@ void mbedtls_unaligned_access(int size, int offset)
-
- TEST_EQUAL(r, expected);
-
-- /* Write sentinel to the part of the array we will testing writing to */
-+ /* Write sentinel to the part of the array we will test writing to */
- for (size_t i = 0; i < (size_t) (size / 8); i++) {
- x[i + offset] = 0xff;
- }
-@@ -319,7 +312,7 @@ void unaligned_access_endian_aware(int size, int offset, int big_endian)
- /* Verify read */
- TEST_EQUAL(read, expected);
-
-- /* Test writing back to memory. First write sentiel */
-+ /* Test writing back to memory. First write sentinel */
- for (size_t i = 0; i < (size_t) (size / 8); i++) {
- x[i + offset] = 0xff;
- }
-
-From df2d5b1ca1569f3a6e129e276756d9d15980f719 Mon Sep 17 00:00:00 2001
-From: Dave Rodgman <dave.rodgman@arm.com>
-Date: Thu, 13 Apr 2023 13:41:09 +0100
-Subject: [PATCH 3/6] Fix compile error
-
-Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
----
- tests/suites/test_suite_alignment.function | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/tests/suites/test_suite_alignment.function b/tests/suites/test_suite_alignment.function
-index cd4502005f0..3a5038e98c2 100644
---- a/tests/suites/test_suite_alignment.function
-+++ b/tests/suites/test_suite_alignment.function
-@@ -71,21 +71,21 @@ void mbedtls_unaligned_access(int size, int offset)
-
- /* Define expected result by manually aligning the raw bytes, and
- * reading back with a normal pointer access. */
-- uint64_t raw_aligned;
-- memcpy(&raw_aligned, ((uint8_t*)&raw) + offset, size / 8);
-+ uint64_t raw_aligned_64;
-+ uint16_t *raw_aligned_16 = (uint16_t *) &raw_aligned_64;
-+ uint32_t *raw_aligned_32 = (uint32_t *) &raw_aligned_64;
-+ memcpy(&raw_aligned_64, ((uint8_t *) &raw) + offset, size / 8);
- /* Make a 16/32/64 byte read from the aligned location, and copy to expected */
- uint64_t expected = 0;
- switch (size) {
- case 16:
-- uint16_t *e16 = (uint16_t *) &raw_aligned;
-- expected = *e16;
-+ expected = *raw_aligned_16;
- break;
- case 32:
-- uint32_t *e32 = (uint32_t *) &raw_aligned;
-- expected = *e32;
-+ expected = *raw_aligned_32;
- break;
- case 64:
-- expected = raw_aligned;
-+ expected = raw_aligned_64;
- break;
- }
-
-
-From b169671c50e7c1779763ac89d35af11dc0997477 Mon Sep 17 00:00:00 2001
-From: Dave Rodgman <dave.rodgman@arm.com>
-Date: Thu, 13 Apr 2023 13:46:46 +0100
-Subject: [PATCH 4/6] Tidy-up
-
-Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
----
- tests/suites/test_suite_alignment.function | 9 ++-------
- 1 file changed, 2 insertions(+), 7 deletions(-)
-
-diff --git a/tests/suites/test_suite_alignment.function b/tests/suites/test_suite_alignment.function
-index 3a5038e98c2..b027c4b1165 100644
---- a/tests/suites/test_suite_alignment.function
-+++ b/tests/suites/test_suite_alignment.function
-@@ -20,13 +20,8 @@ int parse_hex_string(char *hex_string, uint64_t *result)
-
- /* If < 8 bytes, shift right and pad with leading zeros for big-endian */
- if (MBEDTLS_IS_BIG_ENDIAN && olen < 8) {
-- int offset = 8 - olen;
-- for (int i = olen - 1; i >= 0; i--) {
-- raw[i + offset] = raw[i];
-- }
-- for (int i = 0; i < offset; i++) {
-- raw[i] = 0;
-- }
-+ memmove(raw + 8 - olen, raw, olen);
-+ memset(raw, 0, 8 - olen);
- }
-
- *result = 0;
-
-From c07df36f9e402ef8b97beb92b25556b04c10c77e Mon Sep 17 00:00:00 2001
-From: Dave Rodgman <dave.rodgman@arm.com>
-Date: Thu, 13 Apr 2023 14:54:12 +0100
-Subject: [PATCH 5/6] More fixes for big-endian
-
-Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
----
- tests/suites/test_suite_alignment.function | 12 +-----------
- 1 file changed, 1 insertion(+), 11 deletions(-)
-
-diff --git a/tests/suites/test_suite_alignment.function b/tests/suites/test_suite_alignment.function
-index b027c4b1165..717c51a6951 100644
---- a/tests/suites/test_suite_alignment.function
-+++ b/tests/suites/test_suite_alignment.function
-@@ -18,19 +18,9 @@ int parse_hex_string(char *hex_string, uint64_t *result)
- return 0;
- }
-
-- /* If < 8 bytes, shift right and pad with leading zeros for big-endian */
-- if (MBEDTLS_IS_BIG_ENDIAN && olen < 8) {
-- memmove(raw + 8 - olen, raw, olen);
-- memset(raw, 0, 8 - olen);
-- }
--
- *result = 0;
- for (size_t i = 0; i < olen; i++) {
-- if (MBEDTLS_IS_BIG_ENDIAN) {
-- *result |= ((uint64_t) raw[i]) << (i * 8);
-- } else {
-- *result |= ((uint64_t) raw[i]) << ((olen - i - 1) * 8);
-- }
-+ *result |= ((uint64_t) raw[i]) << ((olen - i - 1) * 8);
- }
- return 1;
- }
-
-From 9145dc46ed98f0bc19e09d52486ba120c1f14589 Mon Sep 17 00:00:00 2001
-From: Dave Rodgman <dave.rodgman@arm.com>
-Date: Thu, 13 Apr 2023 14:59:03 +0100
-Subject: [PATCH 6/6] Ensure variables initialised
-
-Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
----
- tests/suites/test_suite_alignment.function | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tests/suites/test_suite_alignment.function b/tests/suites/test_suite_alignment.function
-index 717c51a6951..ed8f918d8c3 100644
---- a/tests/suites/test_suite_alignment.function
-+++ b/tests/suites/test_suite_alignment.function
-@@ -12,7 +12,7 @@
- */
- int parse_hex_string(char *hex_string, uint64_t *result)
- {
-- uint8_t raw[8];
-+ uint8_t raw[8] = {0};
- size_t olen;
- if (mbedtls_test_unhexify(raw, sizeof(raw), hex_string, &olen) != 0) {
- return 0;
-@@ -104,7 +104,7 @@ void mbedtls_unaligned_access(int size, int offset)
- /* BEGIN_CASE */
- void mbedtls_byteswap(char *input_str, int size, char *expected_str)
- {
-- uint64_t input, expected;
-+ uint64_t input = 0, expected = 0;
- TEST_ASSERT(parse_hex_string(input_str, &input));
- TEST_ASSERT(parse_hex_string(expected_str, &expected));
-
diff --git a/user/mdadm/0001-udev.c-Do-not-require-libudev.h-if-DNO_LIBUDEV.patch b/user/mdadm/0001-udev.c-Do-not-require-libudev.h-if-DNO_LIBUDEV.patch
new file mode 100644
index 000000000..d0e63fc98
--- /dev/null
+++ b/user/mdadm/0001-udev.c-Do-not-require-libudev.h-if-DNO_LIBUDEV.patch
@@ -0,0 +1,28 @@
+From 1750758c7ff526e3560433f6235e5cfa35cf646a Mon Sep 17 00:00:00 2001
+From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
+Date: Wed, 6 Mar 2024 15:50:55 +0100
+Subject: [PATCH] udev.c: Do not require libudev.h if DNO_LIBUDEV
+
+libudev may not be presented at all, do not require it.
+
+Reported-by: Boian Bonev <bbonev@ipacct.com>
+Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
+
+diff --git a/udev.c b/udev.c
+index bc4722b0..066e6ab1 100644
+--- a/udev.c
++++ b/udev.c
+@@ -26,7 +26,10 @@
+ #include <signal.h>
+ #include <limits.h>
+ #include <syslog.h>
++
++#ifndef NO_LIBUDEV
+ #include <libudev.h>
++#endif
+
+ static char *unblock_path;
+
+--
+2.43.4
+
diff --git a/user/mdadm/APKBUILD b/user/mdadm/APKBUILD
index 13adda8e2..c39bf46ba 100644
--- a/user/mdadm/APKBUILD
+++ b/user/mdadm/APKBUILD
@@ -2,8 +2,8 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=mdadm
-pkgver=4.1
-pkgrel=2
+pkgver=4.3
+pkgrel=0
pkgdesc="Tool for managing Linux soft RAID arrays"
url="http://neil.brown.name/blog/mdadm"
arch="all"
@@ -17,12 +17,14 @@ source="https://mirrors.kernel.org/pub/linux/utils/raid/$pkgname/$pkgname-$pkgve
$pkgname.initd
$pkgname.confd
$pkgname-raid.initd
- sysmacros.patch
time64.patch
+ falloc.patch
+ missing-header.patch
+ 0001-udev.c-Do-not-require-libudev.h-if-DNO_LIBUDEV.patch
"
build() {
- make
+ make CXFLAGS="${CFLAGS} -DNO_LIBUDEV"
}
package() {
@@ -49,9 +51,11 @@ misc() {
install -Dm755 "$builddir"/misc/syslog-events "$subpkgdir"/usr/sbin/handle-mdadm-events
}
-sha512sums="f9bff760795ba7361f19fd1cbc02efedcdaa4b0125b99cf1369e78f30e5c128126751915fde41407d46c544514d864bf82b508419bc08f1db7aa447557e2ca9e mdadm-4.1.tar.gz
+sha512sums="a77af2b371ed27b7bd89b7991302282f0fc77999eb93d7959446fc4b1c28388582d08ff0abfc470a9f9a8c8036acb0158edc44d9a8d406f807ca28111bf74459 mdadm-4.3.tar.gz
ca5f4e3ff5b284102b44e818d11622e1889066e3d18edce2d62c1a44ee8f4cfdc0979121c0462a916c638423c5ebc706c46aa996a7c4f68e030589adc62803f4 mdadm.initd
7d45bf489ef93a4f217ffcf72311eb661b8de7fbf63a5344697252c0d3a684b0123ff60efa5f218da4eb4cda7c88d91c2ef3625d5e44a588e3e1210cb60b0ab9 mdadm.confd
37022593ba090eb0690669b99d6386152242c017c1e608cea7b5420b7a6f754b377e916e4f81e2abf9941e791db78b5820e63db0e706d5de8b35e796678e921c mdadm-raid.initd
-47564bba9d45dfb39d63df9e6cd96ad03b37b314e794af180911481feb4e038035aa1ea6d3de2061982f46b51d1a205168f98e6f0a092f55f6f8e760dbabdae6 sysmacros.patch
-53c2fe442e8657a7a5a011eab1cd1bfcca6c315ee42e4148a50e1314d238f957e7e722e1264c64c548d398a2c6b10600cccf45a4fb69351d3d9ad403f90c1fde time64.patch"
+cb21650ffb7f8bd1a7a72e27e48e5f18de7158cb8ba23315f9fc48ff5fa79662d0a64128d8b61eff76da7a41e0ccbc5be375a10c852823d489aa648baab76ba4 time64.patch
+72544b173499c4ecbcf85284cd4ca5560c2e3548e319e8e7e99967e369f3334e7b77950ff7ed2ed61b6e3c338894595154b2a7c6ccb30b5be1bbd2b75756738c falloc.patch
+669e0f14df7de0650eaa7a395167be3e12c08ed8c53ed0388d45be2a17c2e34dc08a2a77dc0d8692b2cd051154a644d6cc7cfcadbe58125dd4c09f9349bb2451 missing-header.patch
+b8fdfad727872a0bfc9bc97024b0fb49d6d39ae6d9eac81c65adb0c524add014a27bd9157f2c47b14a54fbe30abf87b64fbeb9218f2bc5a0ada48d06e0e6ea66 0001-udev.c-Do-not-require-libudev.h-if-DNO_LIBUDEV.patch"
diff --git a/user/mdadm/falloc.patch b/user/mdadm/falloc.patch
new file mode 100644
index 000000000..9f8d4ddd9
--- /dev/null
+++ b/user/mdadm/falloc.patch
@@ -0,0 +1,41 @@
+From 52bead95d2957437c691891fcdc49bd6afccdd49 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Fri, 12 Apr 2024 18:45:13 +0200
+Subject: Create.c: fix uclibc build
+
+Define FALLOC_FL_ZERO_RANGE if needed as FALLOC_FL_ZERO_RANGE is only
+defined for aarch64 on uclibc-ng resulting in the following or1k build
+failure since commit 577fd10486d8d1472a6b559066f344ac30a3a391:
+
+Create.c: In function 'write_zeroes_fork':
+Create.c:155:35: error: 'FALLOC_FL_ZERO_RANGE' undeclared (first use in this function)
+ 155 | if (fallocate(fd, FALLOC_FL_ZERO_RANGE | FALLOC_FL_KEEP_SIZE,
+ | ^~~~~~~~~~~~~~~~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/0e04bcdb591ca5642053e1f7e31384f06581e989
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
+---
+ Create.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/Create.c b/Create.c
+index 4397ff49..d94253b1 100644
+--- a/Create.c
++++ b/Create.c
+@@ -32,6 +32,10 @@
+ #include <sys/signalfd.h>
+ #include <sys/wait.h>
+
++#ifndef FALLOC_FL_ZERO_RANGE
++#define FALLOC_FL_ZERO_RANGE 16
++#endif
++
+ static int round_size_and_verify(unsigned long long *size, int chunk)
+ {
+ if (*size == 0)
+--
+cgit 1.2.3-korg
+
diff --git a/user/mdadm/missing-header.patch b/user/mdadm/missing-header.patch
new file mode 100644
index 000000000..85dea22a8
--- /dev/null
+++ b/user/mdadm/missing-header.patch
@@ -0,0 +1,29 @@
+From 8bda86099089b44129ef6206764f9de47a45f0db Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Tue, 12 Mar 2024 11:01:50 +0100
+Subject: util.c: add limits.h include for NAME_MAX definition
+
+Add limits.h include for NAME_MAX definition.
+
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
+---
+ util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/util.c b/util.c
+index 05ad3343..49a9c6e2 100644
+--- a/util.c
++++ b/util.c
+@@ -36,7 +36,7 @@
+ #include <ctype.h>
+ #include <dirent.h>
+ #include <dlfcn.h>
+-
++#include <limits.h>
+
+ /*
+ * following taken from linux/blkpg.h because they aren't
+--
+cgit 1.2.3-korg
+
diff --git a/user/mdadm/sysmacros.patch b/user/mdadm/sysmacros.patch
deleted file mode 100644
index 22a393447..000000000
--- a/user/mdadm/sysmacros.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-https://bugs.gentoo.org/580188
-
-From 5c97e465b33bf8fefb17da7f553a1c3812e508d5 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Tue, 19 Apr 2016 18:10:54 -0400
-Subject: [PATCH] include sys/sysmacros.h for major/minor/makedev prototypes
-
-These funcs are defined in sys/sysmacros.h, so include it for them.
-It works today due to an implicit include by sys/types.h, but the
-various Linux C libraries are moving away from that.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- mdadm.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/mdadm.h b/mdadm.h
-index d209488..b8767a7 100755
---- a/mdadm.h
-+++ b/mdadm.h
-@@ -33,6 +33,7 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
- # endif
- #endif
-
-+#include <sys/sysmacros.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <stdint.h>
---
-2.7.4
-
diff --git a/user/mdadm/time64.patch b/user/mdadm/time64.patch
index fd05fcb2f..aff2af9cd 100644
--- a/user/mdadm/time64.patch
+++ b/user/mdadm/time64.patch
@@ -8,7 +8,7 @@
#include <sys/syscall.h>
#include <sys/select.h>
#include <signal.h>
-@@ -447,7 +448,7 @@
+@@ -449,7 +450,7 @@
}
gettimeofday(&tv, NULL);
diff --git a/user/mdds/APKBUILD b/user/mdds/APKBUILD
index 4b56cc780..c782a1649 100644
--- a/user/mdds/APKBUILD
+++ b/user/mdds/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=mdds
-pkgver=2.0.3
+pkgver=2.1.1
pkgrel=0
pkgdesc="Multi-dimensional data index algorithms"
url="https://gitlab.com/mdds/mdds"
@@ -9,13 +9,16 @@ arch="noarch"
license="MIT"
depends=""
checkdepends="boost-dev"
-makedepends="autoconf automake libtool"
+makedepends=""
subpackages="$pkgname-doc"
replaces="$pkgname-dev"
-source="https://gitlab.com/mdds/mdds/-/archive/$pkgver/$pkgname-$pkgver.tar.bz2"
+source="https://gitlab.com/api/v4/projects/mdds%2Fmdds/packages/generic/source/$pkgver/$pkgname-$pkgver.tar.xz"
build() {
- ./autogen.sh \
+ # GCC 13 changed default fp precision behavior. (#1193, #1205)
+ export CXXFLAGS="${CXXFLAGS} -fexcess-precision=fast"
+
+ ./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
@@ -36,4 +39,4 @@ package() {
mv "$pkgdir"/usr/share/pkgconfig "$pkgdir"/usr/lib/
}
-sha512sums="6d069ce4d1a59f15a0aba02ecc7f2082486df734eb23f6e2f865be1dff7b22a023ec421b60b6cb13d1fbf803bf3f68964b83236481c3415e40dca66b217efca8 mdds-2.0.3.tar.bz2"
+sha512sums="5fe345e7d84d2e290a519d65b27332f69001c01da961c05a30abfe2a17cb8545822490bcd63b320d49e1b26291a4a898f77495951919aece83208133027848ea mdds-2.1.1.tar.xz"
diff --git a/user/menu-cache/APKBUILD b/user/menu-cache/APKBUILD
index dd8b8a0f5..3c20b042c 100644
--- a/user/menu-cache/APKBUILD
+++ b/user/menu-cache/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer:
pkgname=menu-cache
pkgver=1.1.0
-pkgrel=0
+pkgrel=1
pkgdesc="Caching mechanism for freedesktop.org menus"
url="https://lxde.org/"
arch="all"
@@ -11,7 +11,9 @@ license="GPL-2.0+"
depends=""
makedepends="glib-dev libfm-extra-dev"
subpackages="$pkgname-dev"
-source="https://downloads.sourceforge.net/lxde/menu-cache/1.1/$pkgname-$pkgver.tar.xz"
+source="https://downloads.sourceforge.net/lxde/menu-cache/1.1/$pkgname-$pkgver.tar.xz
+ gcc10.patch
+ "
build() {
./configure \
@@ -26,4 +28,5 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="e4c6619ade7b9a1b97c1366bb94dffb9975be5664b193cf0c69cf9470ef7ae19bda3390d04d98ee9a5b1658ec48aa5c83508c26c347af689161ee67c076b3c9e menu-cache-1.1.0.tar.xz"
+sha512sums="e4c6619ade7b9a1b97c1366bb94dffb9975be5664b193cf0c69cf9470ef7ae19bda3390d04d98ee9a5b1658ec48aa5c83508c26c347af689161ee67c076b3c9e menu-cache-1.1.0.tar.xz
+ce4aa02e56bca4af6e32ef7ce689c26387309ef6e1d9560f37d344bca6ef5aba6c3c8c9c3ea38127ca71f8aaff0cfbfed47775c7b2cbb9703deae99b6fc78645 gcc10.patch"
diff --git a/user/menu-cache/gcc10.patch b/user/menu-cache/gcc10.patch
new file mode 100644
index 000000000..9949d09a9
--- /dev/null
+++ b/user/menu-cache/gcc10.patch
@@ -0,0 +1,103 @@
+From 4a82095ca4a334ceaf306c128248eb020f11bef1 Mon Sep 17 00:00:00 2001
+From: Mamoru TASAKA <mtasaka@fedoraproject.org>
+Date: Fri, 24 Jan 2020 13:33:00 +0900
+Subject: [PATCH] Support gcc10 compilation
+
+gcc10 now defaults to -fno-common.
+
+(original commit message cut by committer and supplemented below)
+
+Do not define variables in a header file. Declare globally used
+variables as "extern" instead.
+---
+ menu-cache-gen/menu-tags.h | 55 ++++++++++++--------------------------
+ 1 file changed, 17 insertions(+), 38 deletions(-)
+
+diff --git a/menu-cache-gen/menu-tags.h b/menu-cache-gen/menu-tags.h
+index f3fd7d3..f71c0bc 100644
+--- a/menu-cache-gen/menu-tags.h
++++ b/menu-cache-gen/menu-tags.h
+@@ -22,38 +22,17 @@
+ #include <libfm/fm-extra.h>
+ #include <menu-cache.h>
+
+-FmXmlFileTag menuTag_Menu;
+-FmXmlFileTag menuTag_AppDir;
+-FmXmlFileTag menuTag_DefaultAppDirs;
+-FmXmlFileTag menuTag_DirectoryDir;
+-FmXmlFileTag menuTag_DefaultDirectoryDirs;
+-FmXmlFileTag menuTag_Include;
+-FmXmlFileTag menuTag_Exclude;
+-FmXmlFileTag menuTag_Filename;
+-FmXmlFileTag menuTag_Or;
+-FmXmlFileTag menuTag_And;
+-FmXmlFileTag menuTag_Not;
+-FmXmlFileTag menuTag_Category;
+-FmXmlFileTag menuTag_MergeFile;
+-FmXmlFileTag menuTag_MergeDir;
+-FmXmlFileTag menuTag_DefaultMergeDirs;
+-FmXmlFileTag menuTag_Directory;
+-FmXmlFileTag menuTag_Name;
+-FmXmlFileTag menuTag_Deleted;
+-FmXmlFileTag menuTag_NotDeleted;
+-FmXmlFileTag menuTag_OnlyUnallocated;
+-FmXmlFileTag menuTag_NotOnlyUnallocated;
+-FmXmlFileTag menuTag_All;
+-FmXmlFileTag menuTag_LegacyDir;
+-FmXmlFileTag menuTag_KDELegacyDirs;
+-FmXmlFileTag menuTag_Move;
+-FmXmlFileTag menuTag_Old;
+-FmXmlFileTag menuTag_New;
+-FmXmlFileTag menuTag_Layout;
+-FmXmlFileTag menuTag_DefaultLayout;
+-FmXmlFileTag menuTag_Menuname;
+-FmXmlFileTag menuTag_Separator;
+-FmXmlFileTag menuTag_Merge;
++extern FmXmlFileTag menuTag_AppDir;
++extern FmXmlFileTag menuTag_DirectoryDir;
++extern FmXmlFileTag menuTag_Include;
++extern FmXmlFileTag menuTag_Exclude;
++extern FmXmlFileTag menuTag_Filename;
++extern FmXmlFileTag menuTag_Or;
++extern FmXmlFileTag menuTag_And;
++extern FmXmlFileTag menuTag_Not;
++extern FmXmlFileTag menuTag_Category;
++extern FmXmlFileTag menuTag_All;
++extern FmXmlFileTag menuTag_LegacyDir;
+
+ typedef enum {
+ MERGE_NONE, /* starting value */
+@@ -152,19 +131,19 @@ typedef struct {
+ } MenuRule;
+
+ /* requested language(s) */
+-char **languages;
++extern char **languages;
+
+ /* list of menu files to monitor */
+-GSList *MenuFiles;
++extern GSList *MenuFiles;
+
+ /* list of menu dirs to monitor */
+-GSList *MenuDirs;
++extern GSList *MenuDirs;
+
+ /* list of available app dirs */
+-GSList *AppDirs;
++extern GSList *AppDirs;
+
+ /* list of available dir dirs */
+-GSList *DirDirs;
++extern GSList *DirDirs;
+
+ /* parse and merge menu files */
+ MenuMenu *get_merged_menu(const char *file, FmXmlFile **xmlfile, GError **error);
+@@ -177,7 +156,7 @@ gboolean save_menu_cache(MenuMenu *layout, const char *menuname, const char *fil
+ void _free_layout_items(GList *data);
+
+ /* verbosity level */
+-gint verbose;
++extern gint verbose;
+
+ #define DBG if (verbose) g_debug
+ #define VDBG if (verbose > 1) g_debug
diff --git a/user/mesa/APKBUILD b/user/mesa/APKBUILD
index d5f828129..84c658c58 100644
--- a/user/mesa/APKBUILD
+++ b/user/mesa/APKBUILD
@@ -2,7 +2,7 @@
pkgname=mesa
pkgver=21.3.9
_llvmver=14
-pkgrel=0
+pkgrel=2
pkgdesc="Mesa DRI OpenGL library"
url="https://www.mesa3d.org"
arch="all"
@@ -38,6 +38,7 @@ x86* | pmmx)
_dri_drivers="${_dri_drivers},i965"
_gallium_drivers="${_gallium_drivers},i915,svga,iris"
_vulkan_drivers="${_vulkan_drivers},intel"
+ _arch_conf="-Dsse2=false"
;;
aarch64 | arm*)
_gallium_drivers="${_gallium_drivers},vc4,freedreno,tegra,kmsro,v3d,lima,panfrost,etnaviv"
@@ -51,7 +52,15 @@ ppc64)
esac
build() {
+ # This is to fix #796, and is derived from:
+ # https://gitlab.freedesktop.org/mesa/mesa/-/commit/cc2b3a99ccf035a084d768e5c5ffa81478d685c1
+ cat > native.file <<EOF
+[binaries]
+llvm-config = '$(command -v llvm${_llvmver}-config)'
+EOF
+
meson \
+ --native-file=native.file \
-Dprefix=/usr \
-Ddri-drivers-path=$_dri_driverdir \
-Dplatforms=x11,wayland \
diff --git a/user/mesa/llvm-opaque.patch b/user/mesa/llvm-opaque.patch
new file mode 100644
index 000000000..80bd18967
--- /dev/null
+++ b/user/mesa/llvm-opaque.patch
@@ -0,0 +1,8467 @@
+From af20d46a39e4431b85d593f56912a185a157554e Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 15:14:48 +0300
+Subject: [PATCH 01/22] gallium: add opaque pointers shim for LLVM < 8.0
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+LLVM is transitioning to "opaque pointers", and as such deprecates
+LLVMBuildGEP, LLVMBuildCall, LLVMBuildLoad, replacing them with
+LLVMBuildGEP2, LLVMBuildCall2, LLVMBuildLoad2 respectivelly.
+These new functions were added in LLVM 8.0; so for LLVM before 8.0 we
+simply forward to the non-opaque-pointer variants.
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/auxiliary/gallivm/lp_bld.h | 42 ++++++++++++++++++++++++++
+ 1 file changed, 42 insertions(+)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld.h b/src/gallium/auxiliary/gallivm/lp_bld.h
+index 9144428c8e162..5846afa3ce065 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld.h
++++ b/src/gallium/auxiliary/gallivm/lp_bld.h
+@@ -87,4 +87,46 @@
+ #define GALLIVM_HAVE_CORO 0
+ #endif
+
++/* LLVM is transitioning to "opaque pointers", and as such deprecates
++ * LLVMBuildGEP, LLVMBuildCall, LLVMBuildLoad, replacing them with
++ * LLVMBuildGEP2, LLVMBuildCall2, LLVMBuildLoad2 respectivelly.
++ * These new functions were added in LLVM 8.0; so for LLVM before 8.0 we
++ * simply forward to the non-opaque-pointer variants.
++ */
++#if LLVM_VERSION_MAJOR < 8
++
++static inline LLVMValueRef
++LLVMBuildGEP2(LLVMBuilderRef B, LLVMTypeRef Ty,
++ LLVMValueRef Pointer, LLVMValueRef *Indices,
++ unsigned NumIndices, const char *Name)
++{
++ return LLVMBuildGEP(B, Pointer, Indices, NumIndices, Name);
++}
++
++static inline LLVMValueRef
++LLVMBuildInBoundsGEP2(LLVMBuilderRef B, LLVMTypeRef Ty,
++ LLVMValueRef Pointer, LLVMValueRef *Indices,
++ unsigned NumIndices, const char *Name)
++{
++ return LLVMBuildInBoundsGEP(B, Pointer, Indices, NumIndices, Name);
++}
++
++static inline LLVMValueRef
++LLVMBuildLoad2(LLVMBuilderRef B, LLVMTypeRef Ty,
++ LLVMValueRef PointerVal, const char *Name)
++{
++ LLVMValueRef val = LLVMBuildLoad(B, PointerVal, Name);
++ return LLVMTypeOf(val) == Ty ? val : LLVMBuildBitCast(B, val, Ty, Name);
++}
++
++static inline LLVMValueRef
++LLVMBuildCall2(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Fn,
++ LLVMValueRef *Args, unsigned NumArgs,
++ const char *Name)
++{
++ return LLVMBuildCall(B, Fn, Args, NumArgs, Name);
++}
++
++#endif /* LLVM_VERSION_MAJOR < 8 */
++
+ #endif /* LP_BLD_H */
+--
+GitLab
+
+
+From eb9a65c91422eb765df80693b2220f625404468c Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 15:20:01 +0300
+Subject: [PATCH 02/22] gallium: use LLVM opaque pointers in draw_llvm.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/auxiliary/draw/draw_llvm.c | 150 ++++++++++++-------------
+ src/gallium/auxiliary/draw/draw_llvm.h | 7 ++
+ 2 files changed, 81 insertions(+), 76 deletions(-)
+
+diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
+index 5e5ce53a3ab79..1f68170d99e03 100644
+--- a/src/gallium/auxiliary/draw/draw_llvm.c
++++ b/src/gallium/auxiliary/draw/draw_llvm.c
+@@ -639,14 +639,13 @@ create_tcs_jit_output_type(struct gallivm_state *gallivm)
+ }
+
+ static LLVMTypeRef
+-create_tes_jit_input_type(struct gallivm_state *gallivm)
++create_tes_jit_input_deref_type(struct gallivm_state *gallivm)
+ {
+ LLVMTypeRef float_type = LLVMFloatTypeInContext(gallivm->context);
+ LLVMTypeRef input_array;
+
+ input_array = LLVMArrayType(float_type, TGSI_NUM_CHANNELS); /* num channels */
+ input_array = LLVMArrayType(input_array, PIPE_MAX_SHADER_INPUTS); /* num attrs per vertex */
+- input_array = LLVMPointerType(input_array, 0); /* num vertices per prim */
+
+ return input_array;
+ }
+@@ -721,8 +720,7 @@ static void
+ create_jit_types(struct draw_llvm_variant *variant)
+ {
+ struct gallivm_state *gallivm = variant->gallivm;
+- LLVMTypeRef texture_type, sampler_type, context_type, buffer_type,
+- vb_type, image_type;
++ LLVMTypeRef texture_type, sampler_type, context_type, image_type;
+
+ texture_type = create_jit_texture_type(gallivm, "texture");
+ sampler_type = create_jit_sampler_type(gallivm, "sampler");
+@@ -733,11 +731,11 @@ create_jit_types(struct draw_llvm_variant *variant)
+ "draw_jit_context");
+ variant->context_ptr_type = LLVMPointerType(context_type, 0);
+
+- buffer_type = create_jit_dvbuffer_type(gallivm, "draw_vertex_buffer");
+- variant->buffer_ptr_type = LLVMPointerType(buffer_type, 0);
++ variant->buffer_type = create_jit_dvbuffer_type(gallivm, "draw_vertex_buffer");
++ variant->buffer_ptr_type = LLVMPointerType(variant->buffer_type, 0);
+
+- vb_type = create_jit_vertex_buffer_type(gallivm, "pipe_vertex_buffer");
+- variant->vb_ptr_type = LLVMPointerType(vb_type, 0);
++ variant->vb_type = create_jit_vertex_buffer_type(gallivm, "pipe_vertex_buffer");
++ variant->vb_ptr_type = LLVMPointerType(variant->vb_type, 0);
+ }
+
+
+@@ -770,8 +768,7 @@ get_vb_ptr_type(struct draw_llvm_variant *variant)
+ static LLVMTypeRef
+ get_vertex_header_ptr_type(struct draw_llvm_variant *variant)
+ {
+- if (!variant->vertex_header_ptr_type)
+- create_jit_types(variant);
++ assert(variant->vertex_header_ptr_type);
+ return variant->vertex_header_ptr_type;
+ }
+
+@@ -871,7 +868,6 @@ draw_llvm_create_variant(struct draw_llvm *llvm,
+ struct draw_llvm_variant *variant;
+ struct llvm_vertex_shader *shader =
+ llvm_vertex_shader(llvm->draw->vs.vertex_shader);
+- LLVMTypeRef vertex_header;
+ char module_name[64];
+ unsigned char ir_sha1_cache_key[20];
+ struct lp_cached_code cached = { 0 };
+@@ -914,9 +910,8 @@ draw_llvm_create_variant(struct draw_llvm *llvm,
+ draw_llvm_dump_variant_key(&variant->key);
+ }
+
+- vertex_header = create_jit_vertex_header(variant->gallivm, num_inputs);
+-
+- variant->vertex_header_ptr_type = LLVMPointerType(vertex_header, 0);
++ variant->vertex_header_type = create_jit_vertex_header(variant->gallivm, num_inputs);
++ variant->vertex_header_ptr_type = LLVMPointerType(variant->vertex_header_type, 0);
+
+ draw_llvm_generate(llvm, variant);
+
+@@ -957,7 +952,7 @@ do_clamp_vertex_color(struct gallivm_state *gallivm,
+ switch (info->output_semantic_name[attrib]) {
+ case TGSI_SEMANTIC_COLOR:
+ case TGSI_SEMANTIC_BCOLOR:
+- out = LLVMBuildLoad(builder, outputs[attrib][chan], "");
++ out = LLVMBuildLoad2(builder, LLVMTypeOf(bld.zero), outputs[attrib][chan], "");
+ out = lp_build_clamp(&bld, out, bld.zero, bld.one);
+ LLVMBuildStore(builder, out, outputs[attrib][chan]);
+ break;
+@@ -1393,7 +1388,6 @@ store_clip(struct gallivm_state *gallivm,
+ LLVMBuilderRef builder = gallivm->builder;
+ LLVMValueRef soa[4];
+ LLVMValueRef aos[LP_MAX_VECTOR_LENGTH];
+- LLVMValueRef indices[2];
+ LLVMValueRef io_ptrs[LP_MAX_VECTOR_WIDTH / 32];
+ LLVMValueRef inds[LP_MAX_VECTOR_WIDTH / 32];
+ LLVMValueRef clip_ptrs[LP_MAX_VECTOR_WIDTH / 32];
+@@ -1402,9 +1396,6 @@ store_clip(struct gallivm_state *gallivm,
+ 4), 0);
+ int i, j;
+
+- indices[0] =
+- indices[1] = lp_build_const_int32(gallivm, 0);
+-
+ for (i = 0; i < vs_type.length; i++) {
+ inds[i] = lp_build_const_int32(gallivm, i);
+ io_ptrs[i] = LLVMBuildGEP(builder, io_ptr, &inds[i], 1, "");
+@@ -1430,8 +1421,7 @@ store_clip(struct gallivm_state *gallivm,
+ for (j = 0; j < vs_type.length; j++) {
+ LLVMValueRef clip_ptr;
+
+- clip_ptr = LLVMBuildGEP(builder, clip_ptrs[j], indices, 2, "clipo");
+- clip_ptr = LLVMBuildPointerCast(builder, clip_ptr, clip_ptr_type, "");
++ clip_ptr = LLVMBuildPointerCast(builder, clip_ptrs[j], clip_ptr_type, "");
+
+ /* Unaligned store */
+ LLVMSetAlignment(LLVMBuildStore(builder, aos[j], clip_ptr), sizeof(float));
+@@ -1454,7 +1444,7 @@ generate_viewport(struct draw_llvm_variant *variant,
+ struct lp_type f32_type = vs_type;
+ const unsigned pos = variant->llvm->draw->vs.position_output;
+ LLVMTypeRef vs_type_llvm = lp_build_vec_type(gallivm, vs_type);
+- LLVMValueRef out3 = LLVMBuildLoad(builder, outputs[pos][3], ""); /*w0 w1 .. wn*/
++ LLVMValueRef out3 = LLVMBuildLoad2(builder, vs_type_llvm, outputs[pos][3], ""); /*w0 w1 .. wn*/
+ LLVMValueRef const1 = lp_build_const_vec(gallivm, f32_type, 1.0); /*1.0 1.0 1.0 1.0*/
+ LLVMValueRef vp_ptr = draw_jit_context_viewports(gallivm, context_ptr);
+
+@@ -1466,9 +1456,11 @@ generate_viewport(struct draw_llvm_variant *variant,
+ out3 = LLVMBuildFDiv(builder, const1, out3, "");
+ LLVMBuildStore(builder, out3, outputs[pos][3]);
+
++ LLVMTypeRef elem_type = lp_build_elem_type(gallivm, vs_type);
++
+ /* Viewport Mapping */
+ for (i=0; i<3; i++) {
+- LLVMValueRef out = LLVMBuildLoad(builder, outputs[pos][i], ""); /*x0 x1 .. xn*/
++ LLVMValueRef out = LLVMBuildLoad2(builder, vs_type_llvm, outputs[pos][i], ""); /*x0 x1 .. xn*/
+ LLVMValueRef scale;
+ LLVMValueRef trans;
+ LLVMValueRef scale_i;
+@@ -1476,15 +1468,15 @@ generate_viewport(struct draw_llvm_variant *variant,
+ LLVMValueRef index;
+
+ index = lp_build_const_int32(gallivm, i + scale_index_offset);
+- scale_i = LLVMBuildGEP(builder, vp_ptr, &index, 1, "");
++ scale_i = LLVMBuildGEP2(builder, elem_type, vp_ptr, &index, 1, "");
+
+ index = lp_build_const_int32(gallivm, i + trans_index_offset);
+- trans_i = LLVMBuildGEP(builder, vp_ptr, &index, 1, "");
++ trans_i = LLVMBuildGEP2(builder, elem_type, vp_ptr, &index, 1, "");
+
+ scale = lp_build_broadcast(gallivm, vs_type_llvm,
+- LLVMBuildLoad(builder, scale_i, "scale"));
++ LLVMBuildLoad2(builder, elem_type, scale_i, "scale"));
+ trans = lp_build_broadcast(gallivm, vs_type_llvm,
+- LLVMBuildLoad(builder, trans_i, "trans"));
++ LLVMBuildLoad2(builder, elem_type, trans_i, "trans"));
+
+ /* divide by w */
+ out = LLVMBuildFMul(builder, out, out3, "");
+@@ -1543,20 +1535,22 @@ generate_clipmask(struct draw_llvm *llvm,
+ zero = lp_build_const_vec(gallivm, f32_type, 0); /* 0.0f 0.0f 0.0f 0.0f */
+ shift = lp_build_const_int_vec(gallivm, i32_type, 1); /* 1 1 1 1 */
+
++ LLVMTypeRef vec_type = LLVMTypeOf(zero);
++
+ /*
+ * load clipvertex and position from correct locations.
+ * if they are the same just load them once.
+ */
+- pos_x = LLVMBuildLoad(builder, outputs[pos][0], ""); /*x0 x1 .. xn */
+- pos_y = LLVMBuildLoad(builder, outputs[pos][1], ""); /*y0 y1 .. yn */
+- pos_z = LLVMBuildLoad(builder, outputs[pos][2], ""); /*z0 z1 .. zn */
+- pos_w = LLVMBuildLoad(builder, outputs[pos][3], ""); /*w0 w1 .. wn */
++ pos_x = LLVMBuildLoad2(builder, vec_type, outputs[pos][0], ""); /*x0 x1 .. xn */
++ pos_y = LLVMBuildLoad2(builder, vec_type, outputs[pos][1], ""); /*y0 y1 .. yn */
++ pos_z = LLVMBuildLoad2(builder, vec_type, outputs[pos][2], ""); /*z0 z1 .. zn */
++ pos_w = LLVMBuildLoad2(builder, vec_type, outputs[pos][3], ""); /*w0 w1 .. wn */
+
+ if (clip_user && cv != pos) {
+- cv_x = LLVMBuildLoad(builder, outputs[cv][0], ""); /*x0 x1 .. xn */
+- cv_y = LLVMBuildLoad(builder, outputs[cv][1], ""); /*y0 y1 .. yn */
+- cv_z = LLVMBuildLoad(builder, outputs[cv][2], ""); /*z0 z1 .. zn */
+- cv_w = LLVMBuildLoad(builder, outputs[cv][3], ""); /*w0 w1 .. wn */
++ cv_x = LLVMBuildLoad2(builder, vec_type, outputs[cv][0], ""); /*x0 x1 .. xn */
++ cv_y = LLVMBuildLoad2(builder, vec_type, outputs[cv][1], ""); /*y0 y1 .. yn */
++ cv_z = LLVMBuildLoad2(builder, vec_type, outputs[cv][2], ""); /*z0 z1 .. zn */
++ cv_w = LLVMBuildLoad2(builder, vec_type, outputs[cv][3], ""); /*w0 w1 .. wn */
+ } else {
+ cv_x = pos_x;
+ cv_y = pos_y;
+@@ -1641,9 +1635,9 @@ generate_clipmask(struct draw_llvm *llvm,
+
+ *have_clipdist = TRUE;
+ if (i < 4) {
+- clipdist = LLVMBuildLoad(builder, outputs[cd[0]][i], "");
++ clipdist = LLVMBuildLoad2(builder, vec_type, outputs[cd[0]][i], "");
+ } else {
+- clipdist = LLVMBuildLoad(builder, outputs[cd[1]][i-4], "");
++ clipdist = LLVMBuildLoad2(builder, vec_type, outputs[cd[1]][i-4], "");
+ }
+ test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, clipdist);
+ is_nan_or_inf = lp_build_is_inf_or_nan(gallivm, vs_type, clipdist);
+@@ -1652,31 +1646,32 @@ generate_clipmask(struct draw_llvm *llvm,
+ test = LLVMBuildAnd(builder, test, temp, "");
+ mask = LLVMBuildOr(builder, mask, test, "");
+ } else {
++ LLVMTypeRef vs_elem_type = lp_build_elem_type(gallivm, vs_type);
+ LLVMTypeRef vs_type_llvm = lp_build_vec_type(gallivm, vs_type);
+ indices[0] = lp_build_const_int32(gallivm, 0);
+ indices[1] = lp_build_const_int32(gallivm, plane_idx);
+
+ indices[2] = lp_build_const_int32(gallivm, 0);
+ plane_ptr = LLVMBuildGEP(builder, planes_ptr, indices, 3, "");
+- plane1 = LLVMBuildLoad(builder, plane_ptr, "plane_x");
++ plane1 = LLVMBuildLoad2(builder, vs_elem_type, plane_ptr, "plane_x");
+ planes = lp_build_broadcast(gallivm, vs_type_llvm, plane1);
+ sum = LLVMBuildFMul(builder, planes, cv_x, "");
+
+ indices[2] = lp_build_const_int32(gallivm, 1);
+ plane_ptr = LLVMBuildGEP(builder, planes_ptr, indices, 3, "");
+- plane1 = LLVMBuildLoad(builder, plane_ptr, "plane_y");
++ plane1 = LLVMBuildLoad2(builder, vs_elem_type, plane_ptr, "plane_y");
+ planes = lp_build_broadcast(gallivm, vs_type_llvm, plane1);
+ sum = lp_build_fmuladd(builder, planes, cv_y, sum);
+
+ indices[2] = lp_build_const_int32(gallivm, 2);
+ plane_ptr = LLVMBuildGEP(builder, planes_ptr, indices, 3, "");
+- plane1 = LLVMBuildLoad(builder, plane_ptr, "plane_z");
++ plane1 = LLVMBuildLoad2(builder, vs_elem_type, plane_ptr, "plane_z");
+ planes = lp_build_broadcast(gallivm, vs_type_llvm, plane1);
+ sum = lp_build_fmuladd(builder, planes, cv_z, sum);
+
+ indices[2] = lp_build_const_int32(gallivm, 3);
+ plane_ptr = LLVMBuildGEP(builder, planes_ptr, indices, 3, "");
+- plane1 = LLVMBuildLoad(builder, plane_ptr, "plane_w");
++ plane1 = LLVMBuildLoad2(builder, vs_elem_type, plane_ptr, "plane_w");
+ planes = lp_build_broadcast(gallivm, vs_type_llvm, plane1);
+ sum = lp_build_fmuladd(builder, planes, cv_w, sum);
+
+@@ -1694,7 +1689,7 @@ generate_clipmask(struct draw_llvm *llvm,
+ */
+ unsigned edge_attr = llvm->draw->vs.edgeflag_output;
+ LLVMValueRef one = lp_build_const_vec(gallivm, f32_type, 1.0);
+- LLVMValueRef edgeflag = LLVMBuildLoad(builder, outputs[edge_attr][0], "");
++ LLVMValueRef edgeflag = LLVMBuildLoad2(builder, vec_type, outputs[edge_attr][0], "");
+ test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_EQUAL, one, edgeflag);
+ temp = lp_build_const_int_vec(gallivm, i32_type,
+ 1LL << DRAW_TOTAL_CLIP_PLANES);
+@@ -2062,7 +2057,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
+ LLVMVectorType(LLVMInt64TypeInContext(context), 4), "");
+ fake_buf = LLVMBuildBitCast(builder, fake_buf,
+ LLVMPointerType(LLVMInt8TypeInContext(context), 0), "");
+- fake_buf_ptr = LLVMBuildGEP(builder, fake_buf, &bld.zero, 1, "");
++ fake_buf_ptr = LLVMBuildGEP2(builder, LLVMInt8TypeInContext(context), fake_buf, &bld.zero, 1, "");
+
+ /* code generated texture sampling */
+ sampler = draw_llvm_sampler_soa_create(draw_llvm_variant_key_samplers(key), key->nr_samplers);
+@@ -2104,8 +2099,8 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
+ struct lp_build_if_state if_ctx;
+
+ if (velem->src_format != PIPE_FORMAT_NONE) {
+- vbuffer_ptr = LLVMBuildGEP(builder, vbuffers_ptr, &vb_index, 1, "");
+- vb_info = LLVMBuildGEP(builder, vb_ptr, &vb_index, 1, "");
++ vbuffer_ptr = LLVMBuildGEP2(builder, variant->buffer_type, vbuffers_ptr, &vb_index, 1, "");
++ vb_info = LLVMBuildGEP2(builder, variant->vb_type, vb_ptr, &vb_index, 1, "");
+ vb_stride[j] = draw_jit_vbuffer_stride(gallivm, vb_info);
+ vb_stride[j] = LLVMBuildZExt(gallivm->builder, vb_stride[j],
+ LLVMInt32TypeInContext(context), "");
+@@ -2157,8 +2152,9 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
+ buffer_size_adj[j] = LLVMBuildSelect(builder, ofbit, bld.zero,
+ buffer_size_adj[j], "");
+
+- temp_ptr = lp_build_alloca_undef(gallivm,
+- LLVMPointerType(LLVMInt8TypeInContext(context), 0), "");
++ LLVMTypeRef byte_type = LLVMInt8TypeInContext(context);
++ LLVMTypeRef byte_ptr_type = LLVMPointerType(byte_type, 0);
++ temp_ptr = lp_build_alloca_undef(gallivm, byte_ptr_type, "");
+
+ lp_build_if(&if_ctx, gallivm, ofbit);
+ {
+@@ -2166,11 +2162,11 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
+ }
+ lp_build_else(&if_ctx);
+ {
+- map_ptr[j] = LLVMBuildGEP(builder, map_ptr[j], &buf_offset, 1, "");
++ map_ptr[j] = LLVMBuildGEP2(builder, byte_type, map_ptr[j], &buf_offset, 1, "");
+ LLVMBuildStore(builder, map_ptr[j], temp_ptr);
+ }
+ lp_build_endif(&if_ctx);
+- map_ptr[j] = LLVMBuildLoad(builder, temp_ptr, "map_ptr");
++ map_ptr[j] = LLVMBuildLoad2(builder, byte_ptr_type, temp_ptr, "map_ptr");
+
+ if (0) {
+ lp_build_printf(gallivm, "velem %d, vbuf index = %u, vb_stride = %u\n",
+@@ -2196,7 +2192,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
+
+ io_itr = lp_loop.counter;
+
+- io = LLVMBuildGEP(builder, io_ptr, &io_itr, 1, "");
++ io = LLVMBuildGEP2(builder, variant->vertex_header_type, io_ptr, &io_itr, 1, "");
+ #if DEBUG_STORE
+ lp_build_printf(gallivm, " --- io %d = %p, loop counter %d\n",
+ io_itr, io, lp_loop.counter);
+@@ -2259,7 +2255,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
+ }
+ lp_build_endif(&if_ctx);
+
+- true_index_array = LLVMBuildLoad(builder, index_store, "");
++ true_index_array = LLVMBuildLoad2(builder, blduivec.vec_type, index_store, "");
+
+ for (j = 0; j < key->nr_vertex_elements; ++j) {
+ struct pipe_vertex_element *velem = &key->vertex_element[j];
+@@ -2329,7 +2325,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
+
+ /* do cliptest */
+ if (enable_cliptest) {
+- LLVMValueRef temp = LLVMBuildLoad(builder, clipmask_bool_ptr, "");
++ LLVMValueRef temp = LLVMBuildLoad2(builder, blduivec.vec_type, clipmask_bool_ptr, "");
+ /* allocate clipmask, assign it integer type */
+ clipmask = generate_clipmask(llvm,
+ gallivm,
+@@ -2788,13 +2784,13 @@ draw_gs_llvm_generate(struct draw_llvm *llvm,
+
+ assert(variant->vertex_header_ptr_type);
+
++ LLVMTypeRef prim_id_type = LLVMVectorType(int32_type, vector_length);
+ arg_types[0] = get_gs_context_ptr_type(variant); /* context */
+ arg_types[1] = variant->input_array_type; /* input */
+ arg_types[2] = LLVMPointerType(variant->vertex_header_ptr_type, 0); /* vertex_header */
+ arg_types[3] = int32_type; /* num_prims */
+ arg_types[4] = int32_type; /* instance_id */
+- arg_types[5] = LLVMPointerType(
+- LLVMVectorType(int32_type, vector_length), 0); /* prim_id_ptr */
++ arg_types[5] = LLVMPointerType(prim_id_type, 0); /* prim_id_ptr */
+ arg_types[6] = int32_type;
+ arg_types[7] = int32_type;
+
+@@ -2874,7 +2870,7 @@ draw_gs_llvm_generate(struct draw_llvm *llvm,
+ lp_build_mask_begin(&mask, gallivm, gs_type, mask_val);
+
+ if (gs_info->uses_primid) {
+- system_values.prim_id = LLVMBuildLoad(builder, prim_id_ptr, "prim_id");
++ system_values.prim_id = LLVMBuildLoad2(builder, prim_id_type, prim_id_ptr, "prim_id");
+ }
+
+ if (gallivm_debug & (GALLIVM_DEBUG_TGSI | GALLIVM_DEBUG_IR)) {
+@@ -3459,15 +3455,15 @@ draw_tcs_llvm_generate(struct draw_llvm *llvm,
+ args[4] = patch_vertices_in;
+ args[5] = view_index;
+ args[6] = loop_state[0].counter;
+- LLVMValueRef coro_entry = LLVMBuildGEP(builder, coro_hdls, &loop_state[0].counter, 1, "");
+- LLVMValueRef coro_hdl = LLVMBuildLoad(builder, coro_entry, "coro_hdl");
++ LLVMValueRef coro_entry = LLVMBuildGEP2(builder, hdl_ptr_type, coro_hdls, &loop_state[0].counter, 1, "");
++ LLVMValueRef coro_hdl = LLVMBuildLoad2(builder, hdl_ptr_type, coro_entry, "coro_hdl");
+
+ struct lp_build_if_state ifstate;
+ LLVMValueRef cmp = LLVMBuildICmp(builder, LLVMIntEQ, loop_state[1].counter,
+ lp_build_const_int32(gallivm, 0), "");
+ /* first time here - call the coroutine function entry point */
+ lp_build_if(&ifstate, gallivm, cmp);
+- LLVMValueRef coro_ret = LLVMBuildCall(builder, variant_coro, args, 7, "");
++ LLVMValueRef coro_ret = LLVMBuildCall2(builder, coro_func_type, variant_coro, args, 7, "");
+ LLVMBuildStore(builder, coro_ret, coro_entry);
+ lp_build_else(&ifstate);
+ /* subsequent calls for this invocation - check if done. */
+@@ -3762,7 +3758,8 @@ create_tes_jit_types(struct draw_tes_llvm_variant *var)
+ "draw_tes_jit_context");
+ var->context_ptr_type = LLVMPointerType(context_type, 0);
+
+- var->input_array_type = create_tes_jit_input_type(gallivm);
++ var->input_array_deref_type = create_tes_jit_input_deref_type(gallivm);
++ var->input_array_type = LLVMPointerType(var->input_array_deref_type, 0); /* num vertices per prim */
+ }
+
+ static LLVMTypeRef
+@@ -3841,8 +3838,8 @@ draw_tes_llvm_fetch_vertex_input(const struct lp_build_tes_iface *tes_iface,
+ indices[1] = attr_chan_index;
+ indices[2] = swiz_chan_index;
+
+- channel_vec = LLVMBuildGEP(builder, tes->input, indices, 3, "");
+- channel_vec = LLVMBuildLoad(builder, channel_vec, "");
++ channel_vec = LLVMBuildGEP2(builder, tes->variant->input_array_deref_type, tes->input, indices, 3, "");
++ channel_vec = LLVMBuildLoad2(builder, LLVMFloatTypeInContext(gallivm->context), channel_vec, "");
+
+ res = LLVMBuildInsertElement(builder, res, channel_vec, idx, "");
+ }
+@@ -3851,8 +3848,8 @@ draw_tes_llvm_fetch_vertex_input(const struct lp_build_tes_iface *tes_iface,
+ indices[1] = attrib_index;
+ indices[2] = swizzle_index;
+
+- res = LLVMBuildGEP(builder, tes->input, indices, 3, "");
+- res = LLVMBuildLoad(builder, res, "");
++ res = LLVMBuildGEP2(builder, tes->variant->input_array_deref_type, tes->input, indices, 3, "");
++ res = LLVMBuildLoad2(builder, LLVMFloatTypeInContext(gallivm->context), res, "");
+ res = lp_build_broadcast_scalar(bld, res);
+ }
+ return res;
+@@ -3891,8 +3888,8 @@ draw_tes_llvm_fetch_patch_input(const struct lp_build_tes_iface *tes_iface,
+ indices[1] = attr_chan_index;
+ indices[2] = swizzle_index;
+
+- channel_vec = LLVMBuildGEP(builder, tes->input, indices, 3, "");
+- channel_vec = LLVMBuildLoad(builder, channel_vec, "");
++ channel_vec = LLVMBuildGEP2(builder, tes->variant->input_array_deref_type, tes->input, indices, 3, "");
++ channel_vec = LLVMBuildLoad2(builder, LLVMFloatTypeInContext(gallivm->context), channel_vec, "");
+
+ res = LLVMBuildInsertElement(builder, res, channel_vec, idx, "");
+ }
+@@ -3901,8 +3898,8 @@ draw_tes_llvm_fetch_patch_input(const struct lp_build_tes_iface *tes_iface,
+ indices[1] = attrib_index;
+ indices[2] = swizzle_index;
+
+- res = LLVMBuildGEP(builder, tes->input, indices, 3, "");
+- res = LLVMBuildLoad(builder, res, "");
++ res = LLVMBuildGEP2(builder, tes->variant->input_array_deref_type, tes->input, indices, 3, "");
++ res = LLVMBuildLoad2(builder, LLVMFloatTypeInContext(gallivm->context), res, "");
+ res = lp_build_broadcast_scalar(bld, res);
+ }
+ return res;
+@@ -3946,6 +3943,9 @@ draw_tes_llvm_generate(struct draw_llvm *llvm,
+
+ snprintf(func_name, sizeof(func_name), "draw_llvm_tes_variant");
+
++ LLVMTypeRef tess_outer_deref_type = LLVMArrayType(flt_type, 4);
++ LLVMTypeRef tess_inner_deref_type = LLVMArrayType(flt_type, 2);
++
+ arg_types[0] = get_tes_context_ptr_type(variant); /* context */
+ arg_types[1] = variant->input_array_type; /* input */
+ arg_types[2] = variant->vertex_header_ptr_type;
+@@ -3953,8 +3953,8 @@ draw_tes_llvm_generate(struct draw_llvm *llvm,
+ arg_types[4] = int32_type;
+ arg_types[5] = LLVMPointerType(flt_type, 0);
+ arg_types[6] = LLVMPointerType(flt_type, 0);
+- arg_types[7] = LLVMPointerType(LLVMArrayType(flt_type, 4), 0);
+- arg_types[8] = LLVMPointerType(LLVMArrayType(flt_type, 2), 0);
++ arg_types[7] = LLVMPointerType(tess_outer_deref_type, 0);
++ arg_types[8] = LLVMPointerType(tess_inner_deref_type, 0);
+ arg_types[9] = int32_type;
+ arg_types[10] = int32_type;
+
+@@ -4025,8 +4025,8 @@ draw_tes_llvm_generate(struct draw_llvm *llvm,
+ variant->key.nr_images);
+ step = lp_build_const_int32(gallivm, vector_length);
+
+- system_values.tess_outer = LLVMBuildLoad(builder, tess_outer, "");
+- system_values.tess_inner = LLVMBuildLoad(builder, tess_inner, "");
++ system_values.tess_outer = LLVMBuildLoad2(builder, tess_outer_deref_type, tess_outer, "");
++ system_values.tess_inner = LLVMBuildLoad2(builder, tess_inner_deref_type, tess_inner, "");
+
+ system_values.prim_id = lp_build_broadcast_scalar(&bldvec, prim_id);
+
+@@ -4046,7 +4046,7 @@ draw_tes_llvm_generate(struct draw_llvm *llvm,
+ {
+ LLVMValueRef io;
+
+- io = LLVMBuildGEP(builder, io_ptr, &lp_loop.counter, 1, "");
++ io = LLVMBuildGEP2(builder, variant->vertex_header_type, io_ptr, &lp_loop.counter, 1, "");
+ mask_val = generate_tes_mask_value(variant, tes_type, num_tess_coord, lp_loop.counter);
+ lp_build_mask_begin(&mask, gallivm, tes_type, mask_val);
+
+@@ -4122,7 +4122,6 @@ draw_tes_llvm_create_variant(struct draw_llvm *llvm,
+ {
+ struct draw_tes_llvm_variant *variant;
+ struct llvm_tess_eval_shader *shader = llvm_tess_eval_shader(llvm->draw->tes.tess_eval_shader);
+- LLVMTypeRef vertex_header;
+ char module_name[64];
+ unsigned char ir_sha1_cache_key[20];
+ struct lp_cached_code cached = { 0 };
+@@ -4157,9 +4156,8 @@ draw_tes_llvm_create_variant(struct draw_llvm *llvm,
+
+ create_tes_jit_types(variant);
+
+- vertex_header = create_jit_vertex_header(variant->gallivm, num_outputs);
+-
+- variant->vertex_header_ptr_type = LLVMPointerType(vertex_header, 0);
++ variant->vertex_header_type = create_jit_vertex_header(variant->gallivm, num_outputs);
++ variant->vertex_header_ptr_type = LLVMPointerType(variant->vertex_header_type, 0);
+
+ if (gallivm_debug & (GALLIVM_DEBUG_TGSI | GALLIVM_DEBUG_IR)) {
+ nir_print_shader(llvm->draw->tes.tess_eval_shader->state.ir.nir, stderr);
+diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h
+index 7506a87161ee8..4e118bef091b9 100644
+--- a/src/gallium/auxiliary/draw/draw_llvm.h
++++ b/src/gallium/auxiliary/draw/draw_llvm.h
+@@ -681,6 +681,10 @@ struct draw_llvm_variant
+ LLVMTypeRef vb_ptr_type;
+ LLVMTypeRef vertex_header_ptr_type;
+
++ LLVMTypeRef buffer_type;
++ LLVMTypeRef vb_type;
++ LLVMTypeRef vertex_header_type;
++
+ LLVMValueRef function;
+ draw_jit_vert_func jit_func;
+
+@@ -755,6 +759,9 @@ struct draw_tes_llvm_variant
+ LLVMTypeRef input_array_type;
+ LLVMTypeRef patch_input_array_type;
+
++ LLVMTypeRef input_array_deref_type;
++ LLVMTypeRef vertex_header_type;
++
+ LLVMValueRef context_ptr;
+ LLVMValueRef io_ptr;
+ LLVMValueRef num_prims;
+--
+GitLab
+
+
+From f90d71f51831cc04e09466553afa56f5f62aed5d Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 15:26:25 +0300
+Subject: [PATCH 03/22] gallium/llvmpipe: use LLVM opaque pointers in
+ lp_bld_interp.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/drivers/llvmpipe/lp_bld_interp.c | 60 +++++++++++---------
+ src/gallium/drivers/llvmpipe/lp_bld_interp.h | 1 +
+ 2 files changed, 34 insertions(+), 27 deletions(-)
+
+diff --git a/src/gallium/drivers/llvmpipe/lp_bld_interp.c b/src/gallium/drivers/llvmpipe/lp_bld_interp.c
+index a93879c9382f9..e0a57116c5d9d 100644
+--- a/src/gallium/drivers/llvmpipe/lp_bld_interp.c
++++ b/src/gallium/drivers/llvmpipe/lp_bld_interp.c
+@@ -191,6 +191,20 @@ calc_centroid_offsets(struct lp_build_interp_soa_context *bld,
+ *centroid_y = lp_build_select(coeff_bld, s_mask_and, pix_center_offset, centroid_y_offset);
+ }
+
++/* Note: this assumes the pointer to elem_type is in address space 0 */
++static LLVMValueRef
++load_casted(LLVMBuilderRef builder, LLVMTypeRef elem_type, LLVMValueRef ptr, const char *name) {
++ ptr = LLVMBuildBitCast(builder, ptr, LLVMPointerType(elem_type, 0), name);
++ return LLVMBuildLoad2(builder, elem_type, ptr, name);
++}
++
++static LLVMValueRef
++indexed_load(LLVMBuilderRef builder, LLVMTypeRef gep_type,
++ LLVMTypeRef elem_type, LLVMValueRef ptr, LLVMValueRef index, const char *name) {
++ ptr = LLVMBuildGEP2(builder, gep_type, ptr, &index, 1, name);
++ return load_casted(builder, elem_type, ptr, name);
++}
++
+ /* Much easier, and significantly less instructions in the per-stamp
+ * part (less than half) but overall more instructions so a loss if
+ * most quads are active. Might be a win though with larger vectors.
+@@ -224,36 +238,27 @@ coeffs_init_simple(struct lp_build_interp_soa_context *bld,
+ const unsigned interp = bld->interp[attrib];
+ LLVMValueRef index = lp_build_const_int32(gallivm,
+ attrib * TGSI_NUM_CHANNELS);
+- LLVMValueRef ptr;
+ LLVMValueRef dadxaos = setup_bld->zero;
+ LLVMValueRef dadyaos = setup_bld->zero;
+ LLVMValueRef a0aos = setup_bld->zero;
+
++ /* See: lp_state_fs.c / generate_fragment() / fs_elem_type */
++ LLVMTypeRef fs_elem_type = LLVMFloatTypeInContext(gallivm->context);
++
+ switch (interp) {
+ case LP_INTERP_PERSPECTIVE:
+ FALLTHROUGH;
+
+ case LP_INTERP_LINEAR:
+- ptr = LLVMBuildGEP(builder, dadx_ptr, &index, 1, "");
+- ptr = LLVMBuildBitCast(builder, ptr,
+- LLVMPointerType(setup_bld->vec_type, 0), "");
+- dadxaos = LLVMBuildLoad(builder, ptr, "");
+-
+- ptr = LLVMBuildGEP(builder, dady_ptr, &index, 1, "");
+- ptr = LLVMBuildBitCast(builder, ptr,
+- LLVMPointerType(setup_bld->vec_type, 0), "");
+- dadyaos = LLVMBuildLoad(builder, ptr, "");
+-
++ dadxaos = indexed_load(builder, fs_elem_type, setup_bld->vec_type, dadx_ptr, index, "");
++ dadyaos = indexed_load(builder, fs_elem_type, setup_bld->vec_type, dady_ptr, index, "");
+ attrib_name(dadxaos, attrib, 0, ".dadxaos");
+ attrib_name(dadyaos, attrib, 0, ".dadyaos");
+ FALLTHROUGH;
+
+ case LP_INTERP_CONSTANT:
+ case LP_INTERP_FACING:
+- ptr = LLVMBuildGEP(builder, a0_ptr, &index, 1, "");
+- ptr = LLVMBuildBitCast(builder, ptr,
+- LLVMPointerType(setup_bld->vec_type, 0), "");
+- a0aos = LLVMBuildLoad(builder, ptr, "");
++ a0aos = indexed_load(builder, fs_elem_type, setup_bld->vec_type, a0_ptr, index, "");
+ attrib_name(a0aos, attrib, 0, ".a0aos");
+ break;
+
+@@ -297,10 +302,10 @@ attribs_update_simple(struct lp_build_interp_soa_context *bld,
+ /* could do this with code-generated passed in pixel offsets too */
+
+ assert(loop_iter);
+- ptr = LLVMBuildGEP(builder, bld->xoffset_store, &loop_iter, 1, "");
+- pixoffx = LLVMBuildLoad(builder, ptr, "");
+- ptr = LLVMBuildGEP(builder, bld->yoffset_store, &loop_iter, 1, "");
+- pixoffy = LLVMBuildLoad(builder, ptr, "");
++ ptr = LLVMBuildGEP2(builder, bld->store_elem_type, bld->xoffset_store, &loop_iter, 1, "");
++ pixoffx = LLVMBuildLoad2(builder, bld->store_elem_type, ptr, "");
++ ptr = LLVMBuildGEP2(builder, bld->store_elem_type, bld->yoffset_store, &loop_iter, 1, "");
++ pixoffy = LLVMBuildLoad2(builder, bld->store_elem_type, ptr, "");
+
+ pixoffx = LLVMBuildFAdd(builder, pixoffx,
+ lp_build_broadcast_scalar(coeff_bld, bld->x), "");
+@@ -529,10 +534,10 @@ lp_build_interp_soa(struct lp_build_interp_soa_context *bld,
+ /* could do this with code-generated passed in pixel offsets too */
+
+ assert(loop_iter);
+- ptr = LLVMBuildGEP(builder, bld->xoffset_store, &loop_iter, 1, "");
+- pixoffx = LLVMBuildLoad(builder, ptr, "");
+- ptr = LLVMBuildGEP(builder, bld->yoffset_store, &loop_iter, 1, "");
+- pixoffy = LLVMBuildLoad(builder, ptr, "");
++ ptr = LLVMBuildGEP2(builder, bld->store_elem_type, bld->xoffset_store, &loop_iter, 1, "");
++ pixoffx = LLVMBuildLoad2(builder, bld->store_elem_type, ptr, "");
++ ptr = LLVMBuildGEP2(builder, bld->store_elem_type, bld->yoffset_store, &loop_iter, 1, "");
++ pixoffy = LLVMBuildLoad2(builder, bld->store_elem_type, ptr, "");
+
+ pixoffx = LLVMBuildFAdd(builder, pixoffx,
+ lp_build_broadcast_scalar(coeff_bld, bld->x), "");
+@@ -769,20 +774,21 @@ lp_build_interp_soa_init(struct lp_build_interp_soa_context *bld,
+ LLVMValueRef pixoffx, pixoffy, index;
+ LLVMValueRef ptr;
+
++ bld->store_elem_type = lp_build_vec_type(gallivm, type);
+ bld->xoffset_store = lp_build_array_alloca(gallivm,
+- lp_build_vec_type(gallivm, type),
++ bld->store_elem_type,
+ lp_build_const_int32(gallivm, num_loops),
+ "");
+ bld->yoffset_store = lp_build_array_alloca(gallivm,
+- lp_build_vec_type(gallivm, type),
++ bld->store_elem_type,
+ lp_build_const_int32(gallivm, num_loops),
+ "");
+ for (i = 0; i < num_loops; i++) {
+ index = lp_build_const_int32(gallivm, i);
+ calc_offsets(&bld->coeff_bld, i*type.length/4, &pixoffx, &pixoffy);
+- ptr = LLVMBuildGEP(builder, bld->xoffset_store, &index, 1, "");
++ ptr = LLVMBuildGEP2(builder, bld->store_elem_type, bld->xoffset_store, &index, 1, "");
+ LLVMBuildStore(builder, pixoffx, ptr);
+- ptr = LLVMBuildGEP(builder, bld->yoffset_store, &index, 1, "");
++ ptr = LLVMBuildGEP2(builder, bld->store_elem_type, bld->yoffset_store, &index, 1, "");
+ LLVMBuildStore(builder, pixoffy, ptr);
+ }
+ }
+diff --git a/src/gallium/drivers/llvmpipe/lp_bld_interp.h b/src/gallium/drivers/llvmpipe/lp_bld_interp.h
+index f77d2192258a6..6525ffb0bf038 100644
+--- a/src/gallium/drivers/llvmpipe/lp_bld_interp.h
++++ b/src/gallium/drivers/llvmpipe/lp_bld_interp.h
+@@ -107,6 +107,7 @@ struct lp_build_interp_soa_context
+
+ LLVMValueRef xoffset_store;
+ LLVMValueRef yoffset_store;
++ LLVMTypeRef store_elem_type;
+
+ /*
+ * Convenience pointers. Callers may access this one.
+--
+GitLab
+
+
+From d53fe793c38344382a71a89e3790249a31e3d4f3 Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 15:28:22 +0300
+Subject: [PATCH 04/22] gallium/llvmpipe: use LLVM opaque pointers in
+ lp_bld_depth.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/drivers/llvmpipe/lp_bld_depth.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/gallium/drivers/llvmpipe/lp_bld_depth.c b/src/gallium/drivers/llvmpipe/lp_bld_depth.c
+index dc559bc3ffb10..cb4a727fa3cf8 100644
+--- a/src/gallium/drivers/llvmpipe/lp_bld_depth.c
++++ b/src/gallium/drivers/llvmpipe/lp_bld_depth.c
+@@ -510,7 +510,7 @@ lp_build_occlusion_count(struct gallivm_state *gallivm,
+ count = LLVMBuildZExt(builder, count, LLVMIntTypeInContext(context, 64), "");
+ }
+ }
+- newcount = LLVMBuildLoad(builder, counter, "origcount");
++ newcount = LLVMBuildLoad2(builder, LLVMTypeOf(count), counter, "origcount");
+ newcount = LLVMBuildAdd(builder, newcount, count, "newcount");
+ LLVMBuildStore(builder, newcount, counter);
+ }
+@@ -551,7 +551,8 @@ lp_build_depth_stencil_load_swizzled(struct gallivm_state *gallivm,
+ struct lp_type zs_load_type = zs_type;
+
+ zs_load_type.length = zs_load_type.length / 2;
+- load_ptr_type = LLVMPointerType(lp_build_vec_type(gallivm, zs_load_type), 0);
++ LLVMTypeRef zs_dst_type = lp_build_vec_type(gallivm, zs_load_type);
++ load_ptr_type = LLVMPointerType(zs_dst_type, 0);
+
+ if (z_src_type.length == 4) {
+ unsigned i;
+@@ -590,14 +591,14 @@ lp_build_depth_stencil_load_swizzled(struct gallivm_state *gallivm,
+ /* Load current z/stencil values from z/stencil buffer */
+ zs_dst_ptr = LLVMBuildGEP(builder, depth_ptr, &depth_offset1, 1, "");
+ zs_dst_ptr = LLVMBuildBitCast(builder, zs_dst_ptr, load_ptr_type, "");
+- zs_dst1 = LLVMBuildLoad(builder, zs_dst_ptr, "");
++ zs_dst1 = LLVMBuildLoad2(builder, zs_dst_type, zs_dst_ptr, "");
+ if (is_1d) {
+ zs_dst2 = lp_build_undef(gallivm, zs_load_type);
+ }
+ else {
+ zs_dst_ptr = LLVMBuildGEP(builder, depth_ptr, &depth_offset2, 1, "");
+ zs_dst_ptr = LLVMBuildBitCast(builder, zs_dst_ptr, load_ptr_type, "");
+- zs_dst2 = LLVMBuildLoad(builder, zs_dst_ptr, "");
++ zs_dst2 = LLVMBuildLoad2(builder, zs_dst_type, zs_dst_ptr, "");
+ }
+
+ *z_fb = LLVMBuildShuffleVector(builder, zs_dst1, zs_dst2,
+--
+GitLab
+
+
+From 1e1ebbe6df456a4677d64a535bbb553ba4f702ea Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 15:31:29 +0300
+Subject: [PATCH 05/22] gallivm: use LLVM opaque pointers in lp_bld_arit.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_arit.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
+index 9cff0162b2334..2061902a215a3 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
+@@ -3757,7 +3757,7 @@ lp_build_fpstate_set_denorms_zero(struct gallivm_state *gallivm,
+ LLVMBuilderRef builder = gallivm->builder;
+ LLVMValueRef mxcsr_ptr = lp_build_fpstate_get(gallivm);
+ LLVMValueRef mxcsr =
+- LLVMBuildLoad(builder, mxcsr_ptr, "mxcsr");
++ LLVMBuildLoad2(builder, LLVMInt32TypeInContext(gallivm->context), mxcsr_ptr, "mxcsr");
+
+ if (util_get_cpu_caps()->has_daz) {
+ /* Enable denormals are zero mode */
+--
+GitLab
+
+
+From 70e9db951d5134546d0115cf773593ec33d5b5d2 Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 15:32:25 +0300
+Subject: [PATCH 06/22] gallivm: use LLVM opaque pointers in lp_bld_assert.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_assert.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_assert.c b/src/gallium/auxiliary/gallivm/lp_bld_assert.c
+index 02755765c0eac..f50da3c127e61 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_assert.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_assert.c
+@@ -75,9 +75,11 @@ lp_build_assert(struct gallivm_state *gallivm,
+ arg_types[0] = LLVMInt32TypeInContext(context);
+ arg_types[1] = LLVMPointerType(LLVMInt8TypeInContext(context), 0);
+
+- function = lp_build_const_func_pointer(gallivm,
++ LLVMTypeRef function_type = LLVMFunctionType(ret_type, arg_types, 2, 0);
++
++ function = lp_build_const_func_pointer_from_type(gallivm,
+ func_to_pointer((func_pointer)lp_assert),
+- ret_type, arg_types, ARRAY_SIZE(arg_types),
++ function_type,
+ "assert");
+
+ /* build function call param list */
+@@ -87,6 +89,5 @@ lp_build_assert(struct gallivm_state *gallivm,
+ /* check arg types */
+ assert(LLVMTypeOf(args[0]) == arg_types[0]);
+ assert(LLVMTypeOf(args[1]) == arg_types[1]);
+-
+- LLVMBuildCall(builder, function, args, ARRAY_SIZE(args), "");
++ LLVMBuildCall2(builder, function_type, function, args, ARRAY_SIZE(args), "");
+ }
+--
+GitLab
+
+
+From 6867b184cac892e3f6aaf3fab3e0453bd784aaf7 Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 15:41:12 +0300
+Subject: [PATCH 07/22] gallivm: use LLVM opaque pointers in
+ lp_bld_format_aos.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Also extract lp_build_const_func_pointer_from_type() in lp_bld_const.h
+taking explicit function type.
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_const.c | 25 ++++++-----
+ src/gallium/auxiliary/gallivm/lp_bld_const.h | 6 +++
+ .../auxiliary/gallivm/lp_bld_format_aos.c | 45 +++++++++----------
+ 3 files changed, 40 insertions(+), 36 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_const.c b/src/gallium/auxiliary/gallivm/lp_bld_const.c
+index 4f4bddf44b813..7d9f3176ec1bd 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_const.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_const.c
+@@ -455,6 +455,17 @@ lp_build_const_string(struct gallivm_state *gallivm,
+ return string;
+ }
+
++LLVMValueRef
++lp_build_const_func_pointer_from_type(struct gallivm_state *gallivm,
++ const void *ptr,
++ LLVMTypeRef function_type,
++ const char *name)
++{
++ return LLVMBuildBitCast(gallivm->builder,
++ lp_build_const_int_pointer(gallivm, ptr),
++ LLVMPointerType(function_type, 0),
++ name);
++}
+
+ /**
+ * Build a callable function pointer.
+@@ -470,16 +481,6 @@ lp_build_const_func_pointer(struct gallivm_state *gallivm,
+ unsigned num_args,
+ const char *name)
+ {
+- LLVMTypeRef function_type;
+- LLVMValueRef function;
+-
+- function_type = LLVMFunctionType(ret_type, arg_types, num_args, 0);
+-
+- function = lp_build_const_int_pointer(gallivm, ptr);
+-
+- function = LLVMBuildBitCast(gallivm->builder, function,
+- LLVMPointerType(function_type, 0),
+- name);
+-
+- return function;
++ LLVMTypeRef function_type = LLVMFunctionType(ret_type, arg_types, num_args, 0);
++ return lp_build_const_func_pointer_from_type(gallivm, ptr, function_type, name);
+ }
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_const.h b/src/gallium/auxiliary/gallivm/lp_bld_const.h
+index 385b5b02d038e..d4098765f5e7a 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_const.h
++++ b/src/gallium/auxiliary/gallivm/lp_bld_const.h
+@@ -176,4 +176,10 @@ lp_build_const_func_pointer(struct gallivm_state *gallivm,
+ const char *name);
+
+
++LLVMValueRef
++lp_build_const_func_pointer_from_type(struct gallivm_state *gallivm,
++ const void *ptr,
++ LLVMTypeRef function_type,
++ const char *name);
++
+ #endif /* !LP_BLD_CONST_H */
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
+index 74fe1672b27f8..86cca0bb0e8f1 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
+@@ -820,6 +820,7 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
+ * Declare and bind format_desc->fetch_rgba_8unorm().
+ */
+
++ LLVMTypeRef function_type;
+ {
+ /*
+ * Function to call looks like:
+@@ -827,7 +828,6 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
+ */
+ LLVMTypeRef ret_type;
+ LLVMTypeRef arg_types[4];
+- LLVMTypeRef function_type;
+
+ ret_type = LLVMVoidTypeInContext(gallivm->context);
+ arg_types[0] = pi8t;
+@@ -836,19 +836,16 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
+ arg_types[3] = i32t;
+ function_type = LLVMFunctionType(ret_type, arg_types,
+ ARRAY_SIZE(arg_types), 0);
+-
+- if (gallivm->cache)
+- gallivm->cache->dont_cache = true;
+- /* make const pointer for the C fetch_rgba_8unorm function */
+- function = lp_build_const_int_pointer(gallivm,
+- func_to_pointer((func_pointer) unpack->fetch_rgba_8unorm));
+-
+- /* cast the callee pointer to the function's type */
+- function = LLVMBuildBitCast(builder, function,
+- LLVMPointerType(function_type, 0),
+- "cast callee");
+ }
+
++ if (gallivm->cache)
++ gallivm->cache->dont_cache = true;
++ /* make const pointer for the C fetch_rgba_8unorm function */
++ function = lp_build_const_int_pointer(gallivm,
++ func_to_pointer((func_pointer) unpack->fetch_rgba_8unorm));
++ /* cast the callee pointer to the function's type */
++ function = LLVMBuildBitCast(builder, function, LLVMPointerType(function_type, 0), "cast callee");
++
+ tmp_ptr = lp_build_alloca(gallivm, i32t, "");
+
+ res = LLVMGetUndef(LLVMVectorType(i32t, num_pixels));
+@@ -875,9 +872,9 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
+ args[3] = LLVMBuildExtractElement(builder, j, index, "");
+ }
+
+- LLVMBuildCall(builder, function, args, ARRAY_SIZE(args), "");
++ LLVMBuildCall2(builder, function_type, function, args, ARRAY_SIZE(args), "");
+
+- tmp = LLVMBuildLoad(builder, tmp_ptr, "");
++ tmp = LLVMBuildLoad2(builder, i32t, tmp_ptr, "");
+
+ if (num_pixels == 1) {
+ res = tmp;
+@@ -929,6 +926,7 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
+ * Declare and bind unpack->fetch_rgba_float().
+ */
+
++ LLVMTypeRef function_type = NULL;
+ {
+ /*
+ * Function to call looks like:
+@@ -942,15 +940,14 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
+ arg_types[1] = pi8t;
+ arg_types[2] = i32t;
+ arg_types[3] = i32t;
+-
+- if (gallivm->cache)
+- gallivm->cache->dont_cache = true;
+- function = lp_build_const_func_pointer(gallivm,
+- func_to_pointer((func_pointer) fetch_rgba),
+- ret_type,
+- arg_types, ARRAY_SIZE(arg_types),
+- format_desc->short_name);
++ function_type = LLVMFunctionType(ret_type, arg_types, ARRAY_SIZE(arg_types), 0);
+ }
++ if (gallivm->cache)
++ gallivm->cache->dont_cache = true;
++ function = lp_build_const_func_pointer_from_type(gallivm,
++ func_to_pointer((func_pointer) fetch_rgba),
++ function_type,
++ format_desc->short_name);
+
+ tmp_ptr = lp_build_alloca(gallivm, f32x4t, "");
+
+@@ -976,9 +973,9 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
+ args[3] = LLVMBuildExtractElement(builder, j, index, "");
+ }
+
+- LLVMBuildCall(builder, function, args, ARRAY_SIZE(args), "");
++ LLVMBuildCall2(builder, function_type, function, args, ARRAY_SIZE(args), "");
+
+- tmps[k] = LLVMBuildLoad(builder, tmp_ptr, "");
++ tmps[k] = LLVMBuildLoad2(builder, f32x4t, tmp_ptr, "");
+ }
+
+ lp_build_conv(gallivm,
+--
+GitLab
+
+
+From f1fc0bb567e5fdc92abd121a43fe2a632150c91c Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 15:44:19 +0300
+Subject: [PATCH 08/22] gallivm: use LLVM opaque pointers in lp_bld_conv.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_conv.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_conv.c b/src/gallium/auxiliary/gallivm/lp_bld_conv.c
+index 1073ff4fa66c3..69494ed22aaed 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_conv.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_conv.c
+@@ -229,7 +229,7 @@ lp_build_float_to_half(struct gallivm_state *gallivm,
+ */
+ LLVMValueRef f16 = lp_build_intrinsic_unary(builder, "llvm.convert.to.fp16", i16t, f32);
+ #else
+- LLVMValueRef f16 = LLVMBuildCall(builder, func, &f32, 1, "");
++ LLVMValueRef f16 = LLVMBuildCall2(builder, func_type, func, &f32, 1, "");
+ #endif
+ ref_result = LLVMBuildInsertElement(builder, ref_result, f16, index, "");
+ }
+--
+GitLab
+
+
+From 2a6e9d13fb9e02e88cb9bfc3a89864f72156a91e Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 15:51:30 +0300
+Subject: [PATCH 09/22] gallivm: use LLVM opaque pointers in lp_bld_coro.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_coro.c | 15 +++++++++++----
+ src/gallium/auxiliary/gallivm/lp_bld_init.h | 3 +++
+ 2 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_coro.c b/src/gallium/auxiliary/gallivm/lp_bld_coro.c
+index d3d5e6dc9693c..a423f60d939a6 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_coro.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_coro.c
+@@ -169,8 +169,10 @@ void lp_build_coro_declare_malloc_hooks(struct gallivm_state *gallivm)
+ LLVMTypeRef int32_type = LLVMInt32TypeInContext(gallivm->context);
+ LLVMTypeRef mem_ptr_type = LLVMPointerType(LLVMInt8TypeInContext(gallivm->context), 0);
+ LLVMTypeRef malloc_type = LLVMFunctionType(mem_ptr_type, &int32_type, 1, 0);
++ gallivm->coro_malloc_hook_type = malloc_type;
+ gallivm->coro_malloc_hook = LLVMAddFunction(gallivm->module, "coro_malloc", malloc_type);
+ LLVMTypeRef free_type = LLVMFunctionType(LLVMVoidTypeInContext(gallivm->context), &mem_ptr_type, 1, 0);
++ gallivm->coro_free_hook_type = free_type;
+ gallivm->coro_free_hook = LLVMAddFunction(gallivm->module, "coro_free", free_type);
+ }
+
+@@ -184,7 +186,10 @@ LLVMValueRef lp_build_coro_begin_alloc_mem(struct gallivm_state *gallivm, LLVMVa
+ LLVMValueRef alloc_mem;
+
+ assert(gallivm->coro_malloc_hook);
+- alloc_mem = LLVMBuildCall(gallivm->builder, gallivm->coro_malloc_hook, &coro_size, 1, "");
++ LLVMTypeRef malloc_type =
++ LLVMFunctionType(mem_ptr_type,
++ (LLVMTypeRef[]){LLVMInt32TypeInContext(gallivm->context)}, 1, 0);
++ alloc_mem = LLVMBuildCall2(gallivm->builder, malloc_type, gallivm->coro_malloc_hook, &coro_size, 1, "");
+ lp_build_endif(&if_state_coro);
+
+ LLVMValueRef phi = LLVMBuildPhi(gallivm->builder, mem_ptr_type, "");
+@@ -212,7 +217,8 @@ LLVMValueRef lp_build_coro_alloc_mem_array(struct gallivm_state *gallivm,
+ LLVMValueRef alloc_mem;
+ LLVMValueRef alloc_size = LLVMBuildMul(gallivm->builder, coro_num_hdls, coro_size, "");
+ assert(gallivm->coro_malloc_hook);
+- alloc_mem = LLVMBuildCall(gallivm->builder, gallivm->coro_malloc_hook, &alloc_size, 1, "");
++ assert(gallivm->coro_malloc_hook_type);
++ alloc_mem = LLVMBuildCall2(gallivm->builder, gallivm->coro_malloc_hook_type, gallivm->coro_malloc_hook, &alloc_size, 1, "");
+ LLVMBuildStore(gallivm->builder, alloc_mem, coro_hdl_ptr);
+ lp_build_endif(&if_state_coro);
+
+@@ -223,8 +229,9 @@ void lp_build_coro_free_mem(struct gallivm_state *gallivm, LLVMValueRef coro_id,
+ {
+ LLVMValueRef alloc_mem = lp_build_coro_free(gallivm, coro_id, coro_hdl);
+
+- assert(gallivm->coro_malloc_hook);
+- alloc_mem = LLVMBuildCall(gallivm->builder, gallivm->coro_free_hook, &alloc_mem, 1, "");
++ assert(gallivm->coro_free_hook);
++ assert(gallivm->coro_free_hook_type);
++ alloc_mem = LLVMBuildCall2(gallivm->builder, gallivm->coro_free_hook_type, gallivm->coro_free_hook, &alloc_mem, 1, "");
+ }
+
+ void lp_build_coro_suspend_switch(struct gallivm_state *gallivm, const struct lp_build_coro_suspend_info *sus_info,
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.h b/src/gallium/auxiliary/gallivm/lp_bld_init.h
+index 7c516b2b266d6..7eaaa31745b8f 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_init.h
++++ b/src/gallium/auxiliary/gallivm/lp_bld_init.h
+@@ -57,6 +57,9 @@ struct gallivm_state
+ LLVMValueRef coro_malloc_hook;
+ LLVMValueRef coro_free_hook;
+ LLVMValueRef debug_printf_hook;
++
++ LLVMTypeRef coro_malloc_hook_type;
++ LLVMTypeRef coro_free_hook_type;
+ };
+
+
+--
+GitLab
+
+
+From 1e0ddda79679955f2a3ad9487ce4eab84b0ec7b1 Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 15:53:10 +0300
+Subject: [PATCH 10/22] gallivm: use LLVM opaque pointers in lp_bld_printf.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_printf.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_printf.c b/src/gallium/auxiliary/gallivm/lp_bld_printf.c
+index 4db2c09423114..5e08a0c2fe6dc 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_printf.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_printf.c
+@@ -63,11 +63,11 @@ lp_build_print_args(struct gallivm_state* gallivm,
+ args[i] = LLVMBuildFPExt(builder, args[i], LLVMDoubleTypeInContext(context), "");
+ }
+
++ LLVMTypeRef printf_type = LLVMFunctionType(LLVMInt32TypeInContext(context), NULL, 0, 1);
+ if (!gallivm->debug_printf_hook) {
+- LLVMTypeRef printf_type = LLVMFunctionType(LLVMInt32TypeInContext(context), NULL, 0, 1);
+ gallivm->debug_printf_hook = LLVMAddFunction(gallivm->module, "debug_printf", printf_type);
+ }
+- return LLVMBuildCall(builder, gallivm->debug_printf_hook, args, argcount, "");
++ return LLVMBuildCall2(builder, printf_type, gallivm->debug_printf_hook, args, argcount, "");
+ }
+
+
+--
+GitLab
+
+
+From 3143f871ac948cda9608579f08ca059e063882fa Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 15:54:57 +0300
+Subject: [PATCH 11/22] gallivm: use LLVM opaque pointers in lp_bld_flow.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_flow.c | 19 +++++++++++--------
+ src/gallium/auxiliary/gallivm/lp_bld_flow.h | 7 +++++--
+ 2 files changed, 16 insertions(+), 10 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_flow.c b/src/gallium/auxiliary/gallivm/lp_bld_flow.c
+index d5d903f66f237..8858aac9cb4ff 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_flow.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_flow.c
+@@ -168,8 +168,9 @@ lp_build_mask_begin(struct lp_build_mask_context *mask,
+ memset(mask, 0, sizeof *mask);
+
+ mask->reg_type = LLVMIntTypeInContext(gallivm->context, type.width * type.length);
++ mask->var_type = lp_build_int_vec_type(gallivm, type);
+ mask->var = lp_build_alloca(gallivm,
+- lp_build_int_vec_type(gallivm, type),
++ mask->var_type,
+ "execution_mask");
+
+ LLVMBuildStore(gallivm->builder, value, mask->var);
+@@ -181,7 +182,7 @@ lp_build_mask_begin(struct lp_build_mask_context *mask,
+ LLVMValueRef
+ lp_build_mask_value(struct lp_build_mask_context *mask)
+ {
+- return LLVMBuildLoad(mask->skip.gallivm->builder, mask->var, "");
++ return LLVMBuildLoad2(mask->skip.gallivm->builder, mask->var_type, mask->var, "");
+ }
+
+
+@@ -233,7 +234,8 @@ lp_build_loop_begin(struct lp_build_loop_state *state,
+
+ state->block = lp_build_insert_new_block(gallivm, "loop_begin");
+
+- state->counter_var = lp_build_alloca(gallivm, LLVMTypeOf(start), "loop_counter");
++ state->counter_type = LLVMTypeOf(start);
++ state->counter_var = lp_build_alloca(gallivm, state->counter_type, "loop_counter");
+ state->gallivm = gallivm;
+
+ LLVMBuildStore(builder, start, state->counter_var);
+@@ -242,7 +244,7 @@ lp_build_loop_begin(struct lp_build_loop_state *state,
+
+ LLVMPositionBuilderAtEnd(builder, state->block);
+
+- state->counter = LLVMBuildLoad(builder, state->counter_var, "");
++ state->counter = LLVMBuildLoad2(builder, state->counter_type, state->counter_var, "");
+ }
+
+
+@@ -272,7 +274,7 @@ lp_build_loop_end_cond(struct lp_build_loop_state *state,
+
+ LLVMPositionBuilderAtEnd(builder, after_block);
+
+- state->counter = LLVMBuildLoad(builder, state->counter_var, "");
++ state->counter = LLVMBuildLoad2(builder, state->counter_type, state->counter_var, "");
+ }
+
+ void
+@@ -287,7 +289,7 @@ void
+ lp_build_loop_force_reload_counter(struct lp_build_loop_state *state)
+ {
+ LLVMBuilderRef builder = state->gallivm->builder;
+- state->counter = LLVMBuildLoad(builder, state->counter_var, "");
++ state->counter = LLVMBuildLoad2(builder, state->counter_type, state->counter_var, "");
+ }
+
+ void
+@@ -324,7 +326,8 @@ lp_build_for_loop_begin(struct lp_build_for_loop_state *state,
+
+ state->begin = lp_build_insert_new_block(gallivm, "loop_begin");
+ state->step = step;
+- state->counter_var = lp_build_alloca(gallivm, LLVMTypeOf(start), "loop_counter");
++ state->counter_type = LLVMTypeOf(start);
++ state->counter_var = lp_build_alloca(gallivm, state->counter_type, "loop_counter");
+ state->gallivm = gallivm;
+ state->cond = cmp_op;
+ state->end = end;
+@@ -333,7 +336,7 @@ lp_build_for_loop_begin(struct lp_build_for_loop_state *state,
+ LLVMBuildBr(builder, state->begin);
+
+ LLVMPositionBuilderAtEnd(builder, state->begin);
+- state->counter = LLVMBuildLoad(builder, state->counter_var, "");
++ state->counter = LLVMBuildLoad2(builder, state->counter_type, state->counter_var, "");
+
+ state->body = lp_build_insert_new_block(gallivm, "loop_body");
+ LLVMPositionBuilderAtEnd(builder, state->body);
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_flow.h b/src/gallium/auxiliary/gallivm/lp_bld_flow.h
+index c4ffa833e2add..c79502af5c4de 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_flow.h
++++ b/src/gallium/auxiliary/gallivm/lp_bld_flow.h
+@@ -73,7 +73,8 @@ struct lp_build_mask_context
+ struct lp_build_skip_context skip;
+
+ LLVMTypeRef reg_type;
+-
++ LLVMTypeRef var_type;
++ /* 'var' is a pointer (alloca) pointing to 'var_type' */
+ LLVMValueRef var;
+ };
+
+@@ -107,7 +108,7 @@ lp_build_mask_end(struct lp_build_mask_context *mask);
+
+ /**
+ * LLVM's IR doesn't represent for-loops directly. Furthermore it
+- * it requires creating code blocks, branches, phi variables, so it
++ * requires creating code blocks, branches, phi variables, so it
+ * requires a fair amount of code.
+ *
+ * @sa http://www.llvm.org/docs/tutorial/LangImpl5.html#for
+@@ -117,6 +118,7 @@ struct lp_build_loop_state
+ LLVMBasicBlockRef block;
+ LLVMValueRef counter_var;
+ LLVMValueRef counter;
++ LLVMTypeRef counter_type;
+ struct gallivm_state *gallivm;
+ };
+
+@@ -154,6 +156,7 @@ struct lp_build_for_loop_state
+ LLVMBasicBlockRef exit;
+ LLVMValueRef counter_var;
+ LLVMValueRef counter;
++ LLVMTypeRef counter_type;
+ LLVMValueRef step;
+ LLVMIntPredicate cond;
+ LLVMValueRef end;
+--
+GitLab
+
+
+From 84ba15ac06285b5851e4363837ba57380c12d07a Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 15:56:33 +0300
+Subject: [PATCH 12/22] gallivm: use LLVM opaque pointers in lp_bld_intr.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_intr.c | 50 ++++++++++++---------
+ src/gallium/auxiliary/gallivm/lp_bld_intr.h | 5 +++
+ 2 files changed, 34 insertions(+), 21 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_intr.c b/src/gallium/auxiliary/gallivm/lp_bld_intr.c
+index 2ce723c7e5ddc..99f5c77c4f03a 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_intr.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_intr.c
+@@ -103,19 +103,13 @@ lp_format_intrinsic(char *name,
+
+
+ LLVMValueRef
+-lp_declare_intrinsic(LLVMModuleRef module,
+- const char *name,
+- LLVMTypeRef ret_type,
+- LLVMTypeRef *arg_types,
+- unsigned num_args)
++lp_declare_intrinsic_with_type(LLVMModuleRef module,
++ const char *name,
++ LLVMTypeRef function_type)
+ {
+- LLVMTypeRef function_type;
+- LLVMValueRef function;
+-
+ assert(!LLVMGetNamedFunction(module, name));
+
+- function_type = LLVMFunctionType(ret_type, arg_types, num_args, 0);
+- function = LLVMAddFunction(module, name, function_type);
++ LLVMValueRef function = LLVMAddFunction(module, name, function_type);
+
+ LLVMSetFunctionCallConv(function, LLVMCCallConv);
+ LLVMSetLinkage(function, LLVMExternalLinkage);
+@@ -126,6 +120,18 @@ lp_declare_intrinsic(LLVMModuleRef module,
+ }
+
+
++LLVMValueRef
++lp_declare_intrinsic(LLVMModuleRef module,
++ const char *name,
++ LLVMTypeRef ret_type,
++ LLVMTypeRef *arg_types,
++ unsigned num_args)
++{
++ LLVMTypeRef function_type = LLVMFunctionType(ret_type, arg_types, num_args, 0);
++ return lp_declare_intrinsic_with_type(module, name, function_type);
++}
++
++
+ #if LLVM_VERSION_MAJOR < 4
+ static LLVMAttribute lp_attr_to_llvm_attr(enum lp_func_attr attr)
+ {
+@@ -232,19 +238,21 @@ lp_build_intrinsic(LLVMBuilderRef builder,
+ bool set_callsite_attrs = LLVM_VERSION_MAJOR >= 4 &&
+ !(attr_mask & LP_FUNC_ATTR_LEGACY);
+
+- function = LLVMGetNamedFunction(module, name);
+- if(!function) {
+- LLVMTypeRef arg_types[LP_MAX_FUNC_ARGS];
+- unsigned i;
++ LLVMTypeRef arg_types[LP_MAX_FUNC_ARGS];
++
++ assert(num_args <= LP_MAX_FUNC_ARGS);
+
+- assert(num_args <= LP_MAX_FUNC_ARGS);
++ for(unsigned i = 0; i < num_args; ++i) {
++ assert(args[i]);
++ arg_types[i] = LLVMTypeOf(args[i]);
++ }
+
+- for(i = 0; i < num_args; ++i) {
+- assert(args[i]);
+- arg_types[i] = LLVMTypeOf(args[i]);
+- }
++ LLVMTypeRef function_type = LLVMFunctionType(ret_type, arg_types, num_args, 0);
+
+- function = lp_declare_intrinsic(module, name, ret_type, arg_types, num_args);
++ function = LLVMGetNamedFunction(module, name);
++
++ if(!function) {
++ function = lp_declare_intrinsic_with_type(module, name, function_type);
+
+ /*
+ * If llvm removes an intrinsic we use, we'll hit this abort (rather
+@@ -265,7 +273,7 @@ lp_build_intrinsic(LLVMBuilderRef builder,
+ }
+ }
+
+- call = LLVMBuildCall(builder, function, args, num_args, "");
++ call = LLVMBuildCall2(builder, function_type, function, args, num_args, "");
+ if (set_callsite_attrs)
+ lp_add_func_attributes(call, attr_mask);
+ return call;
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_intr.h b/src/gallium/auxiliary/gallivm/lp_bld_intr.h
+index ed90979f16fbb..98dfb0d0cb31d 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_intr.h
++++ b/src/gallium/auxiliary/gallivm/lp_bld_intr.h
+@@ -78,6 +78,11 @@ lp_declare_intrinsic(LLVMModuleRef module,
+ LLVMTypeRef *arg_types,
+ unsigned num_args);
+
++LLVMValueRef
++lp_declare_intrinsic_with_type(LLVMModuleRef module,
++ const char *name,
++ LLVMTypeRef function_type);
++
+ void
+ lp_add_function_attr(LLVMValueRef function_or_call,
+ int attr_idx, enum lp_func_attr attr);
+--
+GitLab
+
+
+From 61da78c31109a44b503c9350794d471a3acc7c7f Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 15:59:55 +0300
+Subject: [PATCH 13/22] gallivm: use LLVM opaque pointers in
+ lp_bld_format_s3tc.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ .../auxiliary/gallivm/lp_bld_format_s3tc.c | 39 +++++++------------
+ 1 file changed, 15 insertions(+), 24 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
+index 497d403fad372..8f972b840fa66 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
+@@ -1097,13 +1097,12 @@ lp_build_gather_s3tc_simple_scalar(struct gallivm_state *gallivm,
+ LLVMValueRef elem, shuf;
+ LLVMTypeRef type32 = LLVMIntTypeInContext(gallivm->context, 32);
+ LLVMTypeRef src_type = LLVMIntTypeInContext(gallivm->context, block_bits);
+- LLVMTypeRef src_ptr_type = LLVMPointerType(src_type, 0);
+ LLVMTypeRef type32_4 = LLVMVectorType(type32, 4);
+
+ assert(block_bits == 64 || block_bits == 128);
+
+- ptr = LLVMBuildBitCast(builder, ptr, src_ptr_type, "");
+- elem = LLVMBuildLoad(builder, ptr, "");
++ ptr = LLVMBuildBitCast(builder, ptr, LLVMPointerType(src_type, 0), "");
++ elem = LLVMBuildLoad2(builder, src_type, ptr, "");
+
+ if (block_bits == 128) {
+ /* just return block as is */
+@@ -1139,15 +1138,13 @@ s3tc_store_cached_block(struct gallivm_state *gallivm,
+ LLVMBuildStore(builder, tag_value, ptr);
+
+ indices[1] = lp_build_const_int32(gallivm, LP_BUILD_FORMAT_CACHE_MEMBER_DATA);
+- hash_index = LLVMBuildMul(builder, hash_index,
+- lp_build_const_int32(gallivm, 16), "");
++ hash_index = LLVMBuildMul(builder, hash_index, lp_build_const_int32(gallivm, 16), "");
+ for (count = 0; count < 4; count++) {
+ indices[2] = hash_index;
+ ptr = LLVMBuildGEP(builder, cache, indices, ARRAY_SIZE(indices), "");
+ ptr = LLVMBuildBitCast(builder, ptr, type_ptr4x32, "");
+ LLVMBuildStore(builder, col[count], ptr);
+- hash_index = LLVMBuildAdd(builder, hash_index,
+- lp_build_const_int32(gallivm, 4), "");
++ hash_index = LLVMBuildAdd(builder, hash_index, lp_build_const_int32(gallivm, 4), "");
+ }
+ }
+
+@@ -1177,8 +1174,9 @@ s3tc_lookup_tag_data(struct gallivm_state *gallivm,
+ indices[0] = lp_build_const_int32(gallivm, 0);
+ indices[1] = lp_build_const_int32(gallivm, LP_BUILD_FORMAT_CACHE_MEMBER_TAGS);
+ indices[2] = index;
++ LLVMTypeRef tag_type = LLVMInt64TypeInContext(gallivm->context);
+ member_ptr = LLVMBuildGEP(builder, ptr, indices, ARRAY_SIZE(indices), "");
+- return LLVMBuildLoad(builder, member_ptr, "tag_data");
++ return LLVMBuildLoad2(builder, tag_type, member_ptr, "tag_data");
+ }
+
+ #if LP_BUILD_FORMAT_CACHE_DEBUG
+@@ -1996,24 +1994,17 @@ update_cached_block(struct gallivm_state *gallivm,
+ format_desc->short_name);
+ function = LLVMGetNamedFunction(module, name);
+
+- if (!function) {
+- LLVMTypeRef ret_type;
+- LLVMTypeRef arg_types[3];
+- LLVMTypeRef function_type;
+- unsigned arg;
++ LLVMTypeRef ret_type = LLVMVoidTypeInContext(gallivm->context);
++ LLVMTypeRef arg_types[3];
++ arg_types[0] = pi8t;
++ arg_types[1] = LLVMInt32TypeInContext(gallivm->context);
++ arg_types[2] = LLVMTypeOf(cache); // XXX: put right type here
++ LLVMTypeRef function_type = LLVMFunctionType(ret_type, arg_types, ARRAY_SIZE(arg_types), 0);
+
+- /*
+- * Generate the function prototype.
+- */
+-
+- ret_type = LLVMVoidTypeInContext(gallivm->context);
+- arg_types[0] = pi8t;
+- arg_types[1] = LLVMInt32TypeInContext(gallivm->context);
+- arg_types[2] = LLVMTypeOf(cache); // XXX: put right type here
+- function_type = LLVMFunctionType(ret_type, arg_types, ARRAY_SIZE(arg_types), 0);
++ if (!function) {
+ function = LLVMAddFunction(module, name, function_type);
+
+- for (arg = 0; arg < ARRAY_SIZE(arg_types); ++arg)
++ for (unsigned arg = 0; arg < ARRAY_SIZE(arg_types); ++arg)
+ if (LLVMGetTypeKind(arg_types[arg]) == LLVMPointerTypeKind)
+ lp_add_function_attr(function, arg + 1, LP_FUNC_ATTR_NOALIAS);
+
+@@ -2026,7 +2017,7 @@ update_cached_block(struct gallivm_state *gallivm,
+ args[1] = hash_index;
+ args[2] = cache;
+
+- LLVMBuildCall(builder, function, args, ARRAY_SIZE(args), "");
++ LLVMBuildCall2(builder, function_type, function, args, ARRAY_SIZE(args), "");
+ bb = LLVMGetInsertBlock(builder);
+ inst = LLVMGetLastInstruction(bb);
+ LLVMSetInstructionCallConv(inst, LLVMFastCallConv);
+--
+GitLab
+
+
+From 36c45736ce03c7e66c8fe5422d0df49b5954a213 Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 16:01:52 +0300
+Subject: [PATCH 14/22] gallivm: use LLVM opaque pointers in lp_bld_gather.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_gather.c | 17 ++++++++---------
+ 1 file changed, 8 insertions(+), 9 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_gather.c b/src/gallium/auxiliary/gallivm/lp_bld_gather.c
+index 42cc17371a0db..2f2506803cf9a 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_gather.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_gather.c
+@@ -55,7 +55,8 @@ lp_build_gather_elem_ptr(struct gallivm_state *gallivm,
+ LLVMValueRef offset;
+ LLVMValueRef ptr;
+
+- assert(LLVMTypeOf(base_ptr) == LLVMPointerType(LLVMInt8TypeInContext(gallivm->context), 0));
++ ASSERTED LLVMTypeRef element_type = LLVMInt8TypeInContext(gallivm->context);
++ assert(LLVMTypeOf(base_ptr) == LLVMPointerType(element_type, 0));
+
+ if (length == 1) {
+ assert(i == 0);
+@@ -65,7 +66,7 @@ lp_build_gather_elem_ptr(struct gallivm_state *gallivm,
+ offset = LLVMBuildExtractElement(gallivm->builder, offsets, index, "");
+ }
+
+- ptr = LLVMBuildGEP(gallivm->builder, base_ptr, &offset, 1, "");
++ ptr = LLVMBuildGEP2(gallivm->builder, element_type, base_ptr, &offset, 1, "");
+
+ return ptr;
+ }
+@@ -88,7 +89,6 @@ lp_build_gather_elem(struct gallivm_state *gallivm,
+ boolean vector_justify)
+ {
+ LLVMTypeRef src_type = LLVMIntTypeInContext(gallivm->context, src_width);
+- LLVMTypeRef src_ptr_type = LLVMPointerType(src_type, 0);
+ LLVMTypeRef dst_elem_type = LLVMIntTypeInContext(gallivm->context, dst_width);
+ LLVMValueRef ptr;
+ LLVMValueRef res;
+@@ -96,8 +96,8 @@ lp_build_gather_elem(struct gallivm_state *gallivm,
+ assert(LLVMTypeOf(base_ptr) == LLVMPointerType(LLVMInt8TypeInContext(gallivm->context), 0));
+
+ ptr = lp_build_gather_elem_ptr(gallivm, length, base_ptr, offsets, i);
+- ptr = LLVMBuildBitCast(gallivm->builder, ptr, src_ptr_type, "");
+- res = LLVMBuildLoad(gallivm->builder, ptr, "");
++ ptr = LLVMBuildBitCast(gallivm->builder, ptr, LLVMPointerType(src_type, 0), "");
++ res = LLVMBuildLoad2(gallivm->builder, src_type, ptr, "");
+
+ /* XXX
+ * On some archs we probably really want to avoid having to deal
+@@ -173,12 +173,11 @@ lp_build_gather_elem_vec(struct gallivm_state *gallivm,
+ boolean vector_justify)
+ {
+ LLVMValueRef ptr, res;
+- LLVMTypeRef src_ptr_type = LLVMPointerType(src_type, 0);
+ assert(LLVMTypeOf(base_ptr) == LLVMPointerType(LLVMInt8TypeInContext(gallivm->context), 0));
+
+ ptr = lp_build_gather_elem_ptr(gallivm, length, base_ptr, offsets, i);
+- ptr = LLVMBuildBitCast(gallivm->builder, ptr, src_ptr_type, "");
+- res = LLVMBuildLoad(gallivm->builder, ptr, "");
++ ptr = LLVMBuildBitCast(gallivm->builder, ptr, LLVMPointerType(src_type, 0), "");
++ res = LLVMBuildLoad2(gallivm->builder, src_type, ptr, "");
+
+ /* XXX
+ * On some archs we probably really want to avoid having to deal
+@@ -324,7 +323,7 @@ lp_build_gather_avx2(struct gallivm_state *gallivm,
+ assert(LLVMTypeOf(offsets) == i32_vec_type);
+ offsets = LLVMBuildSDiv(builder, offsets, scale, "");
+
+- src_ptr = LLVMBuildGEP(builder, base_ptr, &offsets, 1, "vector-gep");
++ src_ptr = LLVMBuildGEP2(builder, src_type, base_ptr, &offsets, 1, "vector-gep");
+
+ char intrinsic[64];
+ snprintf(intrinsic, sizeof intrinsic, "llvm.masked.gather.v%u%s%u",
+--
+GitLab
+
+
+From 2a59fdb96d5a7bfe8c10b6ce7eec621480abd092 Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 16:03:36 +0300
+Subject: [PATCH 15/22] gallivm: use LLVM opaque pointers in lp_bld_nir_soa.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ .../auxiliary/gallivm/lp_bld_nir_soa.c | 89 ++++++++++---------
+ 1 file changed, 45 insertions(+), 44 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
+index 5a8fd02561bfb..e31faf577077b 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
+@@ -282,8 +282,8 @@ build_gather(struct lp_build_nir_context *bld_base,
+ index = LLVMBuildExtractElement(builder,
+ indexes, si, "");
+ }
+- scalar_ptr = LLVMBuildGEP(builder, base_ptr,
+- &index, 1, "gather_ptr");
++
++ scalar_ptr = LLVMBuildGEP(builder, base_ptr, &index, 1, "gather_ptr");
+ scalar = LLVMBuildLoad(builder, scalar_ptr, "");
+
+ res = LLVMBuildInsertElement(builder, res, scalar, di, "");
+@@ -324,8 +324,8 @@ emit_mask_scatter(struct lp_build_nir_soa_context *bld,
+ for (i = 0; i < bld->bld_base.base.type.length; i++) {
+ LLVMValueRef ii = lp_build_const_int32(gallivm, i);
+ LLVMValueRef index = LLVMBuildExtractElement(builder, indexes, ii, "");
+- LLVMValueRef scalar_ptr = LLVMBuildGEP(builder, base_ptr, &index, 1, "scatter_ptr");
+ LLVMValueRef val = LLVMBuildExtractElement(builder, values, ii, "scatter_val");
++ LLVMValueRef scalar_ptr = LLVMBuildGEP(builder, base_ptr, &index, 1, "scatter_ptr");
+ LLVMValueRef scalar_pred = pred ?
+ LLVMBuildExtractElement(builder, pred, ii, "scatter_pred") : NULL;
+
+@@ -335,7 +335,7 @@ emit_mask_scatter(struct lp_build_nir_soa_context *bld,
+
+ if (scalar_pred) {
+ LLVMValueRef real_val, dst_val;
+- dst_val = LLVMBuildLoad(builder, scalar_ptr, "");
++ dst_val = LLVMBuildLoad2(builder, LLVMTypeOf(val), scalar_ptr, "");
+ scalar_pred = LLVMBuildTrunc(builder, scalar_pred, LLVMInt1TypeInContext(gallivm->context), "");
+ real_val = LLVMBuildSelect(builder, scalar_pred, val, dst_val, "");
+ LLVMBuildStore(builder, real_val, scalar_ptr);
+@@ -862,13 +862,13 @@ static void emit_load_global(struct lp_build_nir_context *bld_base,
+ LLVMValueRef value_ptr = lp_build_pointer_get(builder, addr_ptr, lp_build_const_int32(gallivm, c));
+
+ LLVMValueRef temp_res;
+- temp_res = LLVMBuildLoad(builder, result, "");
++ temp_res = LLVMBuildLoad2(builder, res_bld->vec_type, result, "");
+ temp_res = LLVMBuildInsertElement(builder, temp_res, value_ptr, loop_state.counter, "");
+ LLVMBuildStore(builder, temp_res, result);
+ lp_build_endif(&ifthen);
+ lp_build_loop_end_cond(&loop_state, lp_build_const_int32(gallivm, uint_bld->type.length),
+ NULL, LLVMIntUGE);
+- outval[c] = LLVMBuildLoad(builder, result, "");
++ outval[c] = LLVMBuildLoad2(builder, res_bld->vec_type, result, "");
+ }
+ }
+
+@@ -1007,11 +1007,11 @@ static void emit_atomic_global(struct lp_build_nir_context *bld_base,
+ LLVMAtomicOrderingSequentiallyConsistent,
+ false);
+ }
+- temp_res = LLVMBuildLoad(builder, atom_res, "");
++ temp_res = LLVMBuildLoad2(builder, LLVMTypeOf(val), atom_res, "");
+ temp_res = LLVMBuildInsertElement(builder, temp_res, scalar, loop_state.counter, "");
+ LLVMBuildStore(builder, temp_res, atom_res);
+ lp_build_else(&ifthen);
+- temp_res = LLVMBuildLoad(builder, atom_res, "");
++ temp_res = LLVMBuildLoad2(builder, LLVMTypeOf(val), atom_res, "");
+ bool is_float = LLVMTypeOf(val) == bld_base->base.vec_type;
+ LLVMValueRef zero_val;
+ if (is_float) {
+@@ -1031,7 +1031,7 @@ static void emit_atomic_global(struct lp_build_nir_context *bld_base,
+ lp_build_endif(&ifthen);
+ lp_build_loop_end_cond(&loop_state, lp_build_const_int32(gallivm, uint_bld->type.length),
+ NULL, LLVMIntUGE);
+- *result = LLVMBuildLoad(builder, atom_res, "");
++ *result = LLVMBuildLoad2(builder, LLVMTypeOf(val), atom_res, "");
+ }
+
+ static void emit_load_ubo(struct lp_build_nir_context *bld_base,
+@@ -1135,7 +1135,7 @@ mem_access_base_pointer(struct lp_build_nir_context *bld_base,
+ *bounds = NULL;
+ }
+
+- /* Cast it to the pointer type of the access this instruciton is doing. */
++ /* Cast it to the pointer type of the access this instruction is doing. */
+ if (bit_size == 32)
+ return ptr;
+ else
+@@ -1187,7 +1187,7 @@ static void emit_load_mem(struct lp_build_nir_context *bld_base,
+ LLVMBuildStore(builder, lp_build_pointer_get(builder, mem_ptr, chan_offset), res_store);
+ lp_build_endif(&ifthen);
+
+- scalar = LLVMBuildLoad(builder, res_store, "");
++ scalar = LLVMBuildLoad2(builder, LLVMTypeOf(zero), res_store, "");
+ } else {
+ scalar = lp_build_pointer_get(builder, mem_ptr, chan_offset);
+ }
+@@ -1233,11 +1233,11 @@ static void emit_load_mem(struct lp_build_nir_context *bld_base,
+ lp_build_if(&ifthen, gallivm, fetch_cond);
+ LLVMValueRef scalar = lp_build_pointer_get(builder, mem_ptr, loop_index);
+
+- temp_res = LLVMBuildLoad(builder, result[c], "");
++ temp_res = LLVMBuildLoad2(builder, load_bld->vec_type, result[c], "");
+ temp_res = LLVMBuildInsertElement(builder, temp_res, scalar, loop_state.counter, "");
+ LLVMBuildStore(builder, temp_res, result[c]);
+ lp_build_else(&ifthen);
+- temp_res = LLVMBuildLoad(builder, result[c], "");
++ temp_res = LLVMBuildLoad2(builder, load_bld->vec_type, result[c], "");
+ LLVMValueRef zero = lp_build_zero_bits(gallivm, bit_size);
+ temp_res = LLVMBuildInsertElement(builder, temp_res, zero, loop_state.counter, "");
+ LLVMBuildStore(builder, temp_res, result[c]);
+@@ -1248,7 +1248,7 @@ static void emit_load_mem(struct lp_build_nir_context *bld_base,
+ lp_build_loop_end_cond(&loop_state, lp_build_const_int32(gallivm, uint_bld->type.length),
+ NULL, LLVMIntUGE);
+ for (unsigned c = 0; c < nc; c++)
+- outval[c] = LLVMBuildLoad(gallivm->builder, result[c], "");
++ outval[c] = LLVMBuildLoad2(gallivm->builder, load_bld->vec_type, result[c], "");
+
+ }
+
+@@ -1356,7 +1356,7 @@ static void emit_atomic_mem(struct lp_build_nir_context *bld_base,
+ loop_state.counter, "");
+ value_ptr = LLVMBuildBitCast(gallivm->builder, value_ptr, atomic_bld->elem_type, "");
+
+- LLVMValueRef scalar_ptr = LLVMBuildGEP(builder, mem_ptr, &loop_offset, 1, "");
++ LLVMValueRef scalar_ptr = LLVMBuildGEP2(builder, atomic_bld->elem_type, mem_ptr, &loop_offset, 1, "");
+
+ struct lp_build_if_state ifthen;
+ LLVMValueRef inner_cond, temp_res;
+@@ -1423,11 +1423,11 @@ static void emit_atomic_mem(struct lp_build_nir_context *bld_base,
+ LLVMAtomicOrderingSequentiallyConsistent,
+ false);
+ }
+- temp_res = LLVMBuildLoad(builder, atom_res, "");
++ temp_res = LLVMBuildLoad2(builder, atomic_bld->vec_type, atom_res, "");
+ temp_res = LLVMBuildInsertElement(builder, temp_res, scalar, loop_state.counter, "");
+ LLVMBuildStore(builder, temp_res, atom_res);
+ lp_build_else(&ifthen);
+- temp_res = LLVMBuildLoad(builder, atom_res, "");
++ temp_res = LLVMBuildLoad2(builder, atomic_bld->vec_type, atom_res, "");
+ LLVMValueRef zero = lp_build_zero_bits(gallivm, bit_size);
+ temp_res = LLVMBuildInsertElement(builder, temp_res, zero, loop_state.counter, "");
+ LLVMBuildStore(builder, temp_res, atom_res);
+@@ -1436,7 +1436,7 @@ static void emit_atomic_mem(struct lp_build_nir_context *bld_base,
+ lp_build_endif(&exec_ifthen);
+ lp_build_loop_end_cond(&loop_state, lp_build_const_int32(gallivm, uint_bld->type.length),
+ NULL, LLVMIntUGE);
+- *result = LLVMBuildLoad(builder, atom_res, "");
++ *result = LLVMBuildLoad2(builder, atomic_bld->vec_type, atom_res, "");
+ }
+
+ static void emit_barrier(struct lp_build_nir_context *bld_base)
+@@ -1614,7 +1614,7 @@ static void emit_tex(struct lp_build_nir_context *bld_base,
+ lp_build_endif(&ifthen);
+ lp_build_loop_end_cond(&loop_state, lp_build_const_int32(gallivm, bld_base->uint_bld.type.length),
+ NULL, LLVMIntUGE);
+- LLVMValueRef idx_val = LLVMBuildLoad(builder, res_store, "");
++ LLVMValueRef idx_val = LLVMBuildLoad2(builder, bld_base->uint_bld.elem_type, res_store, "");
+ params->texture_index_offset = idx_val;
+ }
+
+@@ -1856,7 +1856,7 @@ increment_vec_ptr_by_mask(struct lp_build_nir_context * bld_base,
+ LLVMValueRef mask)
+ {
+ LLVMBuilderRef builder = bld_base->base.gallivm->builder;
+- LLVMValueRef current_vec = LLVMBuildLoad(builder, ptr, "");
++ LLVMValueRef current_vec = LLVMBuildLoad2(builder, LLVMTypeOf(mask), ptr, "");
+
+ current_vec = LLVMBuildSub(builder, current_vec, mask, "");
+
+@@ -1869,7 +1869,7 @@ clear_uint_vec_ptr_from_mask(struct lp_build_nir_context * bld_base,
+ LLVMValueRef mask)
+ {
+ LLVMBuilderRef builder = bld_base->base.gallivm->builder;
+- LLVMValueRef current_vec = LLVMBuildLoad(builder, ptr, "");
++ LLVMValueRef current_vec = LLVMBuildLoad2(builder, bld_base->uint_bld.vec_type, ptr, "");
+
+ current_vec = lp_build_select(&bld_base->uint_bld,
+ mask,
+@@ -1902,7 +1902,7 @@ static void emit_vertex(struct lp_build_nir_context *bld_base, uint32_t stream_i
+ return;
+ assert(bld->gs_iface->emit_vertex);
+ LLVMValueRef total_emitted_vertices_vec =
+- LLVMBuildLoad(builder, bld->total_emitted_vertices_vec_ptr[stream_id], "");
++ LLVMBuildLoad2(builder, bld->bld_base.uint_bld.vec_type, bld->total_emitted_vertices_vec_ptr[stream_id], "");
+ LLVMValueRef mask = mask_vec(bld_base);
+ mask = clamp_mask_to_max_output_vertices(bld, mask,
+ total_emitted_vertices_vec);
+@@ -1929,11 +1929,11 @@ end_primitive_masked(struct lp_build_nir_context * bld_base,
+ return;
+ struct lp_build_context *uint_bld = &bld_base->uint_bld;
+ LLVMValueRef emitted_vertices_vec =
+- LLVMBuildLoad(builder, bld->emitted_vertices_vec_ptr[stream_id], "");
++ LLVMBuildLoad2(builder, bld->bld_base.uint_bld.vec_type, bld->emitted_vertices_vec_ptr[stream_id], "");
+ LLVMValueRef emitted_prims_vec =
+- LLVMBuildLoad(builder, bld->emitted_prims_vec_ptr[stream_id], "");
++ LLVMBuildLoad2(builder, bld->bld_base.uint_bld.vec_type, bld->emitted_prims_vec_ptr[stream_id], "");
+ LLVMValueRef total_emitted_vertices_vec =
+- LLVMBuildLoad(builder, bld->total_emitted_vertices_vec_ptr[stream_id], "");
++ LLVMBuildLoad2(builder, bld->bld_base.uint_bld.vec_type, bld->total_emitted_vertices_vec_ptr[stream_id], "");
+
+ LLVMValueRef emitted_mask = lp_build_cmp(uint_bld,
+ PIPE_FUNC_NOTEQUAL,
+@@ -1977,8 +1977,7 @@ emit_prologue(struct lp_build_nir_soa_context *bld)
+ LLVMValueRef lindex =
+ lp_build_const_int32(gallivm, index * 4 + chan);
+ LLVMValueRef input_ptr =
+- LLVMBuildGEP(gallivm->builder, bld->inputs_array,
+- &lindex, 1, "");
++ LLVMBuildGEP2(gallivm->builder, vec_type, bld->inputs_array, &lindex, 1, "");
+ LLVMValueRef value = bld->inputs[index][chan];
+ if (value)
+ LLVMBuildStore(gallivm->builder, value, input_ptr);
+@@ -2015,7 +2014,7 @@ static void emit_vote(struct lp_build_nir_context *bld_base, LLVMValueRef src,
+ lp_build_endif(&ifthen);
+ lp_build_loop_end_cond(&loop_state, lp_build_const_int32(gallivm, bld_base->uint_bld.type.length),
+ NULL, LLVMIntUGE);
+- init_val = LLVMBuildLoad(builder, eq_store, "");
++ init_val = LLVMBuildLoad2(builder, get_int_bld(bld_base, true, bit_size)->elem_type, eq_store, "");
+ } else {
+ LLVMBuildStore(builder, lp_build_const_int32(gallivm, instr->intrinsic == nir_intrinsic_vote_any ? 0 : -1), res_store);
+ }
+@@ -2029,7 +2028,7 @@ static void emit_vote(struct lp_build_nir_context *bld_base, LLVMValueRef src,
+ if_cond = LLVMBuildExtractElement(gallivm->builder, outer_cond, loop_state.counter, "");
+
+ lp_build_if(&ifthen, gallivm, if_cond);
+- res = LLVMBuildLoad(builder, res_store, "");
++ res = LLVMBuildLoad2(builder, bld_base->uint_bld.elem_type, res_store, "");
+
+ if (instr->intrinsic == nir_intrinsic_vote_feq) {
+ struct lp_build_context *flt_bld = get_flt_bld(bld_base, bit_size);
+@@ -2050,7 +2049,8 @@ static void emit_vote(struct lp_build_nir_context *bld_base, LLVMValueRef src,
+ lp_build_endif(&ifthen);
+ lp_build_loop_end_cond(&loop_state, lp_build_const_int32(gallivm, bld_base->uint_bld.type.length),
+ NULL, LLVMIntUGE);
+- result[0] = lp_build_broadcast_scalar(&bld_base->uint_bld, LLVMBuildLoad(builder, res_store, ""));
++ result[0] = lp_build_broadcast_scalar(&bld_base->uint_bld,
++ LLVMBuildLoad2(builder, bld_base->uint_bld.elem_type, res_store, ""));
+ }
+
+ static void emit_ballot(struct lp_build_nir_context *bld_base, LLVMValueRef src, nir_intrinsic_instr *instr, LLVMValueRef result[4])
+@@ -2065,7 +2065,7 @@ static void emit_ballot(struct lp_build_nir_context *bld_base, LLVMValueRef src,
+ lp_build_loop_begin(&loop_state, gallivm, lp_build_const_int32(gallivm, 0));
+ LLVMValueRef value_ptr = LLVMBuildExtractElement(gallivm->builder, src,
+ loop_state.counter, "");
+- res = LLVMBuildLoad(builder, res_store, "");
++ res = LLVMBuildLoad2(builder, bld_base->int_bld.elem_type, res_store, "");
+ res = LLVMBuildOr(builder,
+ res,
+ LLVMBuildAnd(builder, value_ptr, LLVMBuildShl(builder, lp_build_const_int32(gallivm, 1), loop_state.counter, ""), ""), "");
+@@ -2073,7 +2073,8 @@ static void emit_ballot(struct lp_build_nir_context *bld_base, LLVMValueRef src,
+
+ lp_build_loop_end_cond(&loop_state, lp_build_const_int32(gallivm, bld_base->uint_bld.type.length),
+ NULL, LLVMIntUGE);
+- result[0] = lp_build_broadcast_scalar(&bld_base->uint_bld, LLVMBuildLoad(builder, res_store, ""));
++ result[0] = lp_build_broadcast_scalar(&bld_base->uint_bld,
++ LLVMBuildLoad2(builder, bld_base->int_bld.elem_type, res_store, ""));
+ }
+
+ static void emit_elect(struct lp_build_nir_context *bld_base, LLVMValueRef result[4])
+@@ -2094,7 +2095,7 @@ static void emit_elect(struct lp_build_nir_context *bld_base, LLVMValueRef resul
+ lp_build_const_int32(gallivm, -1), "");
+ LLVMValueRef cond2 = LLVMBuildICmp(gallivm->builder,
+ LLVMIntEQ,
+- LLVMBuildLoad(builder, found_store, ""),
++ LLVMBuildLoad2(builder, bld_base->int_bld.elem_type, found_store, ""),
+ lp_build_const_int32(gallivm, 0), "");
+
+ cond = LLVMBuildAnd(builder, cond, cond2, "");
+@@ -2108,7 +2109,7 @@ static void emit_elect(struct lp_build_nir_context *bld_base, LLVMValueRef resul
+
+ result[0] = LLVMBuildInsertElement(builder, bld_base->uint_bld.zero,
+ lp_build_const_int32(gallivm, -1),
+- LLVMBuildLoad(builder, idx_store, ""),
++ LLVMBuildLoad2(builder, bld_base->int_bld.elem_type, idx_store, ""),
+ "");
+ }
+
+@@ -2316,9 +2317,9 @@ static void emit_reduce(struct lp_build_nir_context *bld_base, LLVMValueRef src,
+ LLVMValueRef value = LLVMBuildExtractElement(gallivm->builder, src, loop_state.counter, "");
+
+ LLVMValueRef res = NULL;
+- LLVMValueRef scan_val = LLVMBuildLoad(gallivm->builder, scan_store, "");
++ LLVMValueRef scan_val = LLVMBuildLoad2(gallivm->builder, int_bld->elem_type, scan_store, "");
+ if (instr->intrinsic != nir_intrinsic_reduce)
+- res = LLVMBuildLoad(gallivm->builder, res_store, "");
++ res = LLVMBuildLoad2(gallivm->builder, int_bld->vec_type, res_store, "");
+
+ if (instr->intrinsic == nir_intrinsic_exclusive_scan)
+ res = LLVMBuildInsertElement(builder, res, scan_val, loop_state.counter, "");
+@@ -2374,9 +2375,9 @@ static void emit_reduce(struct lp_build_nir_context *bld_base, LLVMValueRef src,
+ lp_build_loop_end_cond(&loop_state, lp_build_const_int32(gallivm, bld_base->uint_bld.type.length),
+ NULL, LLVMIntUGE);
+ if (instr->intrinsic == nir_intrinsic_reduce)
+- result[0] = lp_build_broadcast_scalar(int_bld, LLVMBuildLoad(builder, scan_store, ""));
++ result[0] = lp_build_broadcast_scalar(int_bld, LLVMBuildLoad2(builder, int_bld->elem_type, scan_store, ""));
+ else
+- result[0] = LLVMBuildLoad(builder, res_store, "");
++ result[0] = LLVMBuildLoad2(builder, int_bld->vec_type, res_store, "");
+ }
+
+ static void emit_read_invocation(struct lp_build_nir_context *bld_base,
+@@ -2409,7 +2410,7 @@ static void emit_read_invocation(struct lp_build_nir_context *bld_base,
+
+ lp_build_loop_end_cond(&loop_state, lp_build_const_int32(gallivm, -1),
+ lp_build_const_int32(gallivm, -1), LLVMIntEQ);
+- idx = LLVMBuildLoad(builder, res_store, "");
++ idx = LLVMBuildLoad2(builder, bld_base->int_bld.elem_type, res_store, "");
+
+ LLVMValueRef value = LLVMBuildExtractElement(gallivm->builder,
+ src, idx, "");
+@@ -2492,18 +2493,18 @@ emit_load_scratch(struct lp_build_nir_context *bld_base,
+ LLVMValueRef ptr2 = LLVMBuildBitCast(builder, bld->scratch_ptr, LLVMPointerType(load_bld->elem_type, 0), "");
+ scalar = lp_build_pointer_get(builder, ptr2, loop_index);
+
+- temp_res = LLVMBuildLoad(builder, result, "");
++ temp_res = LLVMBuildLoad2(builder, load_bld->vec_type, result, "");
+ temp_res = LLVMBuildInsertElement(builder, temp_res, scalar, loop_state.counter, "");
+ LLVMBuildStore(builder, temp_res, result);
+ lp_build_else(&ifthen);
+- temp_res = LLVMBuildLoad(builder, result, "");
++ temp_res = LLVMBuildLoad2(builder, load_bld->vec_type, result, "");
+ LLVMValueRef zero = lp_build_zero_bits(gallivm, bit_size);
+ temp_res = LLVMBuildInsertElement(builder, temp_res, zero, loop_state.counter, "");
+ LLVMBuildStore(builder, temp_res, result);
+ lp_build_endif(&ifthen);
+ lp_build_loop_end_cond(&loop_state, lp_build_const_int32(gallivm, uint_bld->type.length),
+ NULL, LLVMIntUGE);
+- outval[c] = LLVMBuildLoad(gallivm->builder, result, "");
++ outval[c] = LLVMBuildLoad2(gallivm->builder, load_bld->vec_type, result, "");
+ }
+ }
+
+@@ -2737,10 +2738,10 @@ void lp_build_nir_soa(struct gallivm_state *gallivm,
+ end_primitive_masked(&bld.bld_base, lp_build_mask_value(bld.mask), i);
+
+ total_emitted_vertices_vec =
+- LLVMBuildLoad(builder, bld.total_emitted_vertices_vec_ptr[i], "");
++ LLVMBuildLoad2(builder, bld.bld_base.uint_bld.vec_type, bld.total_emitted_vertices_vec_ptr[i], "");
+
+ emitted_prims_vec =
+- LLVMBuildLoad(builder, bld.emitted_prims_vec_ptr[i], "");
++ LLVMBuildLoad2(builder, bld.bld_base.uint_bld.vec_type, bld.emitted_prims_vec_ptr[i], "");
+ bld.gs_iface->gs_epilogue(bld.gs_iface,
+ total_emitted_vertices_vec,
+ emitted_prims_vec, i);
+--
+GitLab
+
+
+From 12cac07fe6e02d4557f0b4843e7eb526dc2f2292 Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 16:04:44 +0300
+Subject: [PATCH 16/22] gallivm: use LLVM opaque pointers in lp_bld_sample.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_sample.c | 49 ++++++++-----------
+ 1 file changed, 20 insertions(+), 29 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+index f04b692204fc7..97f9766798856 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+@@ -1163,6 +1163,16 @@ lp_build_linear_mip_levels(struct lp_build_sample_context *bld,
+ lp_build_name(*lod_fpart_inout, "texture%u_mipweight", texture_unit);
+ }
+
++/**
++ * A helper function that factorizes this common pattern.
++ */
++static LLVMValueRef
++load_mip(struct gallivm_state *gallivm, LLVMValueRef offsets, LLVMValueRef index1) {
++ LLVMValueRef zero = lp_build_const_int32(gallivm, 0);
++ LLVMValueRef indexes[2] = {zero, index1};
++ LLVMValueRef ptr = LLVMBuildGEP(gallivm->builder, offsets, indexes, ARRAY_SIZE(indexes), "");
++ return LLVMBuildLoad(gallivm->builder, ptr, "");
++}
+
+ /**
+ * Return pointer to a single mipmap level.
+@@ -1172,14 +1182,9 @@ LLVMValueRef
+ lp_build_get_mipmap_level(struct lp_build_sample_context *bld,
+ LLVMValueRef level)
+ {
++ LLVMValueRef mip_offset = load_mip(bld->gallivm, bld->mip_offsets, level);
+ LLVMBuilderRef builder = bld->gallivm->builder;
+- LLVMValueRef indexes[2], data_ptr, mip_offset;
+-
+- indexes[0] = lp_build_const_int32(bld->gallivm, 0);
+- indexes[1] = level;
+- mip_offset = LLVMBuildGEP(builder, bld->mip_offsets, indexes, 2, "");
+- mip_offset = LLVMBuildLoad(builder, mip_offset, "");
+- data_ptr = LLVMBuildGEP(builder, bld->base_ptr, &mip_offset, 1, "");
++ LLVMValueRef data_ptr = LLVMBuildGEP(builder, bld->base_ptr, &mip_offset, 1, "");
+ return data_ptr;
+ }
+
+@@ -1192,13 +1197,10 @@ lp_build_get_mip_offsets(struct lp_build_sample_context *bld,
+ LLVMValueRef level)
+ {
+ LLVMBuilderRef builder = bld->gallivm->builder;
+- LLVMValueRef indexes[2], offsets, offset1;
++ LLVMValueRef offsets, offset1;
+
+- indexes[0] = lp_build_const_int32(bld->gallivm, 0);
+ if (bld->num_mips == 1) {
+- indexes[1] = level;
+- offset1 = LLVMBuildGEP(builder, bld->mip_offsets, indexes, 2, "");
+- offset1 = LLVMBuildLoad(builder, offset1, "");
++ offset1 = load_mip(bld->gallivm, bld->mip_offsets, level);
+ offsets = lp_build_broadcast_scalar(&bld->int_coord_bld, offset1);
+ }
+ else if (bld->num_mips == bld->coord_bld.type.length / 4) {
+@@ -1207,10 +1209,8 @@ lp_build_get_mip_offsets(struct lp_build_sample_context *bld,
+ offsets = bld->int_coord_bld.undef;
+ for (i = 0; i < bld->num_mips; i++) {
+ LLVMValueRef indexi = lp_build_const_int32(bld->gallivm, i);
++ offset1 = load_mip(bld->gallivm, bld->mip_offsets, LLVMBuildExtractElement(builder, level, indexi, ""));
+ LLVMValueRef indexo = lp_build_const_int32(bld->gallivm, 4 * i);
+- indexes[1] = LLVMBuildExtractElement(builder, level, indexi, "");
+- offset1 = LLVMBuildGEP(builder, bld->mip_offsets, indexes, 2, "");
+- offset1 = LLVMBuildLoad(builder, offset1, "");
+ offsets = LLVMBuildInsertElement(builder, offsets, offset1, indexo, "");
+ }
+ offsets = lp_build_swizzle_scalar_aos(&bld->int_coord_bld, offsets, 0, 4);
+@@ -1223,9 +1223,7 @@ lp_build_get_mip_offsets(struct lp_build_sample_context *bld,
+ offsets = bld->int_coord_bld.undef;
+ for (i = 0; i < bld->num_mips; i++) {
+ LLVMValueRef indexi = lp_build_const_int32(bld->gallivm, i);
+- indexes[1] = LLVMBuildExtractElement(builder, level, indexi, "");
+- offset1 = LLVMBuildGEP(builder, bld->mip_offsets, indexes, 2, "");
+- offset1 = LLVMBuildLoad(builder, offset1, "");
++ offset1 = load_mip(bld->gallivm, bld->mip_offsets, LLVMBuildExtractElement(builder, level, indexi, ""));
+ offsets = LLVMBuildInsertElement(builder, offsets, offset1, indexi, "");
+ }
+ }
+@@ -1310,12 +1308,9 @@ lp_build_get_level_stride_vec(struct lp_build_sample_context *bld,
+ LLVMValueRef stride_array, LLVMValueRef level)
+ {
+ LLVMBuilderRef builder = bld->gallivm->builder;
+- LLVMValueRef indexes[2], stride, stride1;
+- indexes[0] = lp_build_const_int32(bld->gallivm, 0);
++ LLVMValueRef stride, stride1;
+ if (bld->num_mips == 1) {
+- indexes[1] = level;
+- stride1 = LLVMBuildGEP(builder, stride_array, indexes, 2, "");
+- stride1 = LLVMBuildLoad(builder, stride1, "");
++ stride1 = load_mip(bld->gallivm, stride_array, level);
+ stride = lp_build_broadcast_scalar(&bld->int_coord_bld, stride1);
+ }
+ else if (bld->num_mips == bld->coord_bld.type.length / 4) {
+@@ -1325,10 +1320,8 @@ lp_build_get_level_stride_vec(struct lp_build_sample_context *bld,
+ stride = bld->int_coord_bld.undef;
+ for (i = 0; i < bld->num_mips; i++) {
+ LLVMValueRef indexi = lp_build_const_int32(bld->gallivm, i);
++ stride1 = load_mip(bld->gallivm, stride_array, LLVMBuildExtractElement(builder, level, indexi, ""));
+ LLVMValueRef indexo = lp_build_const_int32(bld->gallivm, 4 * i);
+- indexes[1] = LLVMBuildExtractElement(builder, level, indexi, "");
+- stride1 = LLVMBuildGEP(builder, stride_array, indexes, 2, "");
+- stride1 = LLVMBuildLoad(builder, stride1, "");
+ stride = LLVMBuildInsertElement(builder, stride, stride1, indexo, "");
+ }
+ stride = lp_build_swizzle_scalar_aos(&bld->int_coord_bld, stride, 0, 4);
+@@ -1342,9 +1335,7 @@ lp_build_get_level_stride_vec(struct lp_build_sample_context *bld,
+ stride = bld->int_coord_bld.undef;
+ for (i = 0; i < bld->coord_bld.type.length; i++) {
+ LLVMValueRef indexi = lp_build_const_int32(bld->gallivm, i);
+- indexes[1] = LLVMBuildExtractElement(builder, level, indexi, "");
+- stride1 = LLVMBuildGEP(builder, stride_array, indexes, 2, "");
+- stride1 = LLVMBuildLoad(builder, stride1, "");
++ stride1 = load_mip(bld->gallivm, stride_array, LLVMBuildExtractElement(builder, level, indexi, ""));
+ stride = LLVMBuildInsertElement(builder, stride, stride1, indexi, "");
+ }
+ }
+--
+GitLab
+
+
+From 1f636e7fb20292a1d377ea89404b8c10f5cf061e Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 16:06:06 +0300
+Subject: [PATCH 17/22] gallivm: use LLVM opaque pointers in
+ lp_bld_sample_soa.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ .../auxiliary/gallivm/lp_bld_sample_soa.c | 171 +++++++++---------
+ 1 file changed, 86 insertions(+), 85 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+index 8417cdd79fc9d..09f6080fca223 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+@@ -1078,6 +1078,8 @@ lp_build_sample_image_linear(struct lp_build_sample_context *bld,
+ flt_size,
+ &flt_width_vec, &flt_height_vec, &flt_depth_vec);
+
++ LLVMTypeRef int1t = LLVMInt1TypeInContext(bld->gallivm->context);
++
+ /*
+ * Compute integer texcoords.
+ */
+@@ -1130,7 +1132,6 @@ lp_build_sample_image_linear(struct lp_build_sample_context *bld,
+ }
+ else {
+ struct lp_build_if_state edge_if;
+- LLVMTypeRef int1t;
+ LLVMValueRef new_faces[4], new_xcoords[4][2], new_ycoords[4][2];
+ LLVMValueRef coord0, coord1, have_edge, have_corner;
+ LLVMValueRef fall_off_ym_notxm, fall_off_ym_notxp, fall_off_x, fall_off_y;
+@@ -1183,7 +1184,6 @@ lp_build_sample_image_linear(struct lp_build_sample_context *bld,
+ have_edge = lp_build_any_true_range(ivec_bld, ivec_bld->type.length, have_edge);
+
+ /* needed for accurate corner filtering branch later, rely on 0 init */
+- int1t = LLVMInt1TypeInContext(bld->gallivm->context);
+ have_corners = lp_build_alloca(bld->gallivm, int1t, "have_corner");
+
+ for (texel_index = 0; texel_index < 4; texel_index++) {
+@@ -1302,18 +1302,19 @@ lp_build_sample_image_linear(struct lp_build_sample_context *bld,
+
+ lp_build_endif(&edge_if);
+
+- x00 = LLVMBuildLoad(builder, xs[0], "");
+- x01 = LLVMBuildLoad(builder, xs[1], "");
+- x10 = LLVMBuildLoad(builder, xs[2], "");
+- x11 = LLVMBuildLoad(builder, xs[3], "");
+- y00 = LLVMBuildLoad(builder, ys[0], "");
+- y01 = LLVMBuildLoad(builder, ys[1], "");
+- y10 = LLVMBuildLoad(builder, ys[2], "");
+- y11 = LLVMBuildLoad(builder, ys[3], "");
+- z00 = LLVMBuildLoad(builder, zs[0], "");
+- z01 = LLVMBuildLoad(builder, zs[1], "");
+- z10 = LLVMBuildLoad(builder, zs[2], "");
+- z11 = LLVMBuildLoad(builder, zs[3], "");
++ LLVMTypeRef type = ivec_bld->vec_type;
++ x00 = LLVMBuildLoad2(builder, type, xs[0], "");
++ x01 = LLVMBuildLoad2(builder, type, xs[1], "");
++ x10 = LLVMBuildLoad2(builder, type, xs[2], "");
++ x11 = LLVMBuildLoad2(builder, type, xs[3], "");
++ y00 = LLVMBuildLoad2(builder, type, ys[0], "");
++ y01 = LLVMBuildLoad2(builder, type, ys[1], "");
++ y10 = LLVMBuildLoad2(builder, type, ys[2], "");
++ y11 = LLVMBuildLoad2(builder, type, ys[3], "");
++ z00 = LLVMBuildLoad2(builder, type, zs[0], "");
++ z01 = LLVMBuildLoad2(builder, type, zs[1], "");
++ z10 = LLVMBuildLoad2(builder, type, zs[2], "");
++ z11 = LLVMBuildLoad2(builder, type, zs[3], "");
+ }
+
+ if (linear_mask) {
+@@ -1411,7 +1412,7 @@ lp_build_sample_image_linear(struct lp_build_sample_context *bld,
+ colorss[2] = lp_build_alloca(bld->gallivm, coord_bld->vec_type, "cs2");
+ colorss[3] = lp_build_alloca(bld->gallivm, coord_bld->vec_type, "cs3");
+
+- have_corner = LLVMBuildLoad(builder, have_corners, "");
++ have_corner = LLVMBuildLoad2(builder, int1t, have_corners, "");
+
+ lp_build_if(&corner_if, bld->gallivm, have_corner);
+
+@@ -1668,10 +1669,10 @@ lp_build_sample_image_linear(struct lp_build_sample_context *bld,
+
+ lp_build_endif(&corner_if);
+
+- colors0[0] = LLVMBuildLoad(builder, colorss[0], "");
+- colors0[1] = LLVMBuildLoad(builder, colorss[1], "");
+- colors0[2] = LLVMBuildLoad(builder, colorss[2], "");
+- colors0[3] = LLVMBuildLoad(builder, colorss[3], "");
++ colors0[0] = LLVMBuildLoad2(builder, coord_bld->vec_type, colorss[0], "");
++ colors0[1] = LLVMBuildLoad2(builder, coord_bld->vec_type, colorss[1], "");
++ colors0[2] = LLVMBuildLoad2(builder, coord_bld->vec_type, colorss[2], "");
++ colors0[3] = LLVMBuildLoad2(builder, coord_bld->vec_type, colorss[3], "");
+ }
+
+ if (dims == 3) {
+@@ -2306,7 +2307,7 @@ lp_build_sample_aniso(struct lp_build_sample_context *bld,
+ LLVMBuildBr(builder, v_loop_block);
+ LLVMPositionBuilderAtEnd(builder, v_loop_block);
+
+- LLVMValueRef v_val = LLVMBuildLoad(builder, v_limiter, "");
++ LLVMValueRef v_val = LLVMBuildLoad2(builder, bld->int_coord_bld.vec_type, v_limiter, "");
+ LLVMValueRef v_mask = LLVMBuildICmp(builder,
+ LLVMIntSLE,
+ v_val,
+@@ -2338,7 +2339,7 @@ lp_build_sample_aniso(struct lp_build_sample_context *bld,
+ LLVMBuildBr(builder, u_loop_block);
+ LLVMPositionBuilderAtEnd(builder, u_loop_block);
+
+- LLVMValueRef u_val = LLVMBuildLoad(builder, u_limiter, "");
++ LLVMValueRef u_val = LLVMBuildLoad2(builder, bld->int_coord_bld.vec_type, u_limiter, "");
+ LLVMValueRef u_mask = LLVMBuildICmp(builder,
+ LLVMIntSLE,
+ u_val,
+@@ -2347,7 +2348,7 @@ lp_build_sample_aniso(struct lp_build_sample_context *bld,
+ /* loop over U values */
+ {
+ /* q = (int)q */
+- q = lp_build_itrunc(coord_bld, LLVMBuildLoad(builder, q_store, ""));
++ q = lp_build_itrunc(coord_bld, LLVMBuildLoad2(builder, bld->coord_bld.vec_type, q_store, ""));
+
+ /*
+ * avoid OOB access to filter table, generate a mask for q > 1024,
+@@ -2403,7 +2404,7 @@ lp_build_sample_aniso(struct lp_build_sample_context *bld,
+ temp_colors);
+
+ for (chan = 0; chan < 4; chan++) {
+- LLVMValueRef tcolor = LLVMBuildLoad(builder, colors0[chan], "");
++ LLVMValueRef tcolor = LLVMBuildLoad2(builder, bld->texel_bld.vec_type, colors0[chan], "");
+
+ tcolor = lp_build_add(&bld->texel_bld, tcolor, lp_build_mul(&bld->texel_bld, temp_colors[chan], weights));
+ LLVMBuildStore(builder, tcolor, colors0[chan]);
+@@ -2411,22 +2412,22 @@ lp_build_sample_aniso(struct lp_build_sample_context *bld,
+
+ /* multiple colors by weight and add in. */
+ /* den += weight; */
+- LLVMValueRef den = LLVMBuildLoad(builder, den_store, "");
++ LLVMValueRef den = LLVMBuildLoad2(builder, bld->texel_bld.vec_type, den_store, "");
+ den = lp_build_add(&bld->texel_bld, den, weights);
+ LLVMBuildStore(builder, den, den_store);
+
+ lp_build_endif(&noloadw0);
+ /* q += dq; */
+ /* dq += ddq; */
+- q = LLVMBuildLoad(builder, q_store, "");
+- dq = LLVMBuildLoad(builder, dq_store, "");
++ q = LLVMBuildLoad2(builder, bld->texel_bld.vec_type, q_store, "");
++ dq = LLVMBuildLoad2(builder, bld->texel_bld.vec_type, dq_store, "");
+ q = lp_build_add(coord_bld, q, dq);
+ dq = lp_build_add(coord_bld, dq, ddq);
+ LLVMBuildStore(builder, q, q_store);
+ LLVMBuildStore(builder, dq, dq_store);
+ }
+ /* u += 1 */
+- u_val = LLVMBuildLoad(builder, u_limiter, "");
++ u_val = LLVMBuildLoad2(builder, bld->int_coord_bld.vec_type, u_limiter, "");
+ u_val = lp_build_add(&bld->int_coord_bld, u_val, bld->int_coord_bld.one);
+ LLVMBuildStore(builder, u_val, u_limiter);
+
+@@ -2447,7 +2448,7 @@ lp_build_sample_aniso(struct lp_build_sample_context *bld,
+ }
+
+ /* v += 1 */
+- v_val = LLVMBuildLoad(builder, v_limiter, "");
++ v_val = LLVMBuildLoad2(builder, bld->int_coord_bld.vec_type, v_limiter, "");
+ v_val = lp_build_add(&bld->int_coord_bld, v_val, bld->int_coord_bld.one);
+ LLVMBuildStore(builder, v_val, v_limiter);
+
+@@ -2465,10 +2466,10 @@ lp_build_sample_aniso(struct lp_build_sample_context *bld,
+
+ LLVMPositionBuilderAtEnd(builder, v_end_loop);
+
+- LLVMValueRef den = LLVMBuildLoad(builder, den_store, "");
++ LLVMValueRef den = LLVMBuildLoad2(builder, bld->texel_bld.vec_type, den_store, "");
+
+ for (chan = 0; chan < 4; chan++)
+- colors0[chan] = lp_build_div(&bld->texel_bld, LLVMBuildLoad(builder, colors0[chan], ""), den);
++ colors0[chan] = lp_build_div(&bld->texel_bld, LLVMBuildLoad2(builder, bld->texel_bld.vec_type, colors0[chan], ""), den);
+ LLVMValueRef den0 = lp_build_cmp(&bld->coord_bld, PIPE_FUNC_EQUAL, den, bld->coord_bld.zero);
+
+ LLVMValueRef den0_any = lp_build_any_true_range(&bld->coord_bld, bld->coord_bld.type.length, den0);
+@@ -2710,7 +2711,7 @@ lp_build_clamp_border_color(struct lp_build_sample_context *bld,
+ lp_build_const_int32(gallivm, 0));
+ border_color_ptr = LLVMBuildBitCast(builder, border_color_ptr,
+ LLVMPointerType(vec4_bld.vec_type, 0), "");
+- border_color = LLVMBuildLoad(builder, border_color_ptr, "");
++ border_color = LLVMBuildLoad2(builder, vec4_bld.vec_type, border_color_ptr, "");
+ /* we don't have aligned type in the dynamic state unfortunately */
+ LLVMSetAlignment(border_color, 4);
+
+@@ -3055,7 +3056,7 @@ lp_build_sample_general(struct lp_build_sample_context *bld,
+ }
+
+ for (chan = 0; chan < 4; ++chan) {
+- colors_out[chan] = LLVMBuildLoad(builder, texels[chan], "");
++ colors_out[chan] = LLVMBuildLoad2(builder, bld->texel_bld.vec_type, texels[chan], "");
+ lp_build_name(colors_out[chan], "sampler%u_texel_%c", sampler_unit, "xyzw"[chan]);
+ }
+ }
+@@ -4116,60 +4117,60 @@ lp_build_sample_soa_func(struct gallivm_state *gallivm,
+
+ function = LLVMGetNamedFunction(module, func_name);
+
+- if(!function) {
+- LLVMTypeRef arg_types[LP_MAX_TEX_FUNC_ARGS];
+- LLVMTypeRef ret_type;
+- LLVMTypeRef function_type;
+- LLVMTypeRef val_type[4];
+- unsigned num_param = 0;
++ LLVMTypeRef arg_types[LP_MAX_TEX_FUNC_ARGS];
++ LLVMTypeRef ret_type;
++ LLVMTypeRef val_type[4];
++ unsigned num_param = 0;
+
+- /*
+- * Generate the function prototype.
+- */
++ /*
++ * Generate the function prototype.
++ */
+
+- arg_types[num_param++] = LLVMTypeOf(params->context_ptr);
+- if (params->aniso_filter_table)
+- arg_types[num_param++] = LLVMTypeOf(params->aniso_filter_table);
+- if (need_cache) {
+- arg_types[num_param++] = LLVMTypeOf(params->thread_data_ptr);
+- }
+- for (i = 0; i < num_coords; i++) {
+- arg_types[num_param++] = LLVMTypeOf(coords[0]);
+- assert(LLVMTypeOf(coords[0]) == LLVMTypeOf(coords[i]));
+- }
+- if (layer) {
+- arg_types[num_param++] = LLVMTypeOf(coords[layer]);
+- assert(LLVMTypeOf(coords[0]) == LLVMTypeOf(coords[layer]));
+- }
+- if (sample_key & LP_SAMPLER_SHADOW) {
+- arg_types[num_param++] = LLVMTypeOf(coords[0]);
+- }
+- if (sample_key & LP_SAMPLER_FETCH_MS) {
+- arg_types[num_param++] = LLVMTypeOf(params->ms_index);
+- }
+- if (sample_key & LP_SAMPLER_OFFSETS) {
+- for (i = 0; i < num_offsets; i++) {
+- arg_types[num_param++] = LLVMTypeOf(offsets[0]);
+- assert(LLVMTypeOf(offsets[0]) == LLVMTypeOf(offsets[i]));
+- }
+- }
+- if (lod_control == LP_SAMPLER_LOD_BIAS ||
+- lod_control == LP_SAMPLER_LOD_EXPLICIT) {
+- arg_types[num_param++] = LLVMTypeOf(params->lod);
++ arg_types[num_param++] = LLVMTypeOf(params->context_ptr);
++ if (params->aniso_filter_table)
++ arg_types[num_param++] = LLVMTypeOf(params->aniso_filter_table);
++ if (need_cache) {
++ arg_types[num_param++] = LLVMTypeOf(params->thread_data_ptr);
++ }
++ for (i = 0; i < num_coords; i++) {
++ arg_types[num_param++] = LLVMTypeOf(coords[0]);
++ assert(LLVMTypeOf(coords[0]) == LLVMTypeOf(coords[i]));
++ }
++ if (layer) {
++ arg_types[num_param++] = LLVMTypeOf(coords[layer]);
++ assert(LLVMTypeOf(coords[0]) == LLVMTypeOf(coords[layer]));
++ }
++ if (sample_key & LP_SAMPLER_SHADOW) {
++ arg_types[num_param++] = LLVMTypeOf(coords[0]);
++ }
++ if (sample_key & LP_SAMPLER_FETCH_MS) {
++ arg_types[num_param++] = LLVMTypeOf(params->ms_index);
++ }
++ if (sample_key & LP_SAMPLER_OFFSETS) {
++ for (i = 0; i < num_offsets; i++) {
++ arg_types[num_param++] = LLVMTypeOf(offsets[0]);
++ assert(LLVMTypeOf(offsets[0]) == LLVMTypeOf(offsets[i]));
+ }
+- else if (lod_control == LP_SAMPLER_LOD_DERIVATIVES) {
+- for (i = 0; i < num_derivs; i++) {
+- arg_types[num_param++] = LLVMTypeOf(derivs->ddx[i]);
+- arg_types[num_param++] = LLVMTypeOf(derivs->ddy[i]);
+- assert(LLVMTypeOf(derivs->ddx[0]) == LLVMTypeOf(derivs->ddx[i]));
+- assert(LLVMTypeOf(derivs->ddy[0]) == LLVMTypeOf(derivs->ddy[i]));
+- }
++ }
++ if (lod_control == LP_SAMPLER_LOD_BIAS ||
++ lod_control == LP_SAMPLER_LOD_EXPLICIT) {
++ arg_types[num_param++] = LLVMTypeOf(params->lod);
++ }
++ else if (lod_control == LP_SAMPLER_LOD_DERIVATIVES) {
++ for (i = 0; i < num_derivs; i++) {
++ arg_types[num_param++] = LLVMTypeOf(derivs->ddx[i]);
++ arg_types[num_param++] = LLVMTypeOf(derivs->ddy[i]);
++ assert(LLVMTypeOf(derivs->ddx[0]) == LLVMTypeOf(derivs->ddx[i]));
++ assert(LLVMTypeOf(derivs->ddy[0]) == LLVMTypeOf(derivs->ddy[i]));
+ }
++ }
+
+- val_type[0] = val_type[1] = val_type[2] = val_type[3] =
++ val_type[0] = val_type[1] = val_type[2] = val_type[3] =
+ lp_build_vec_type(gallivm, params->type);
+- ret_type = LLVMStructTypeInContext(gallivm->context, val_type, 4, 0);
+- function_type = LLVMFunctionType(ret_type, arg_types, num_param, 0);
++ ret_type = LLVMStructTypeInContext(gallivm->context, val_type, 4, 0);
++ LLVMTypeRef function_type = LLVMFunctionType(ret_type, arg_types, num_param, 0);
++
++ if(!function) {
+ function = LLVMAddFunction(module, func_name, function_type);
+
+ for (i = 0; i < num_param; ++i) {
+@@ -4232,7 +4233,7 @@ lp_build_sample_soa_func(struct gallivm_state *gallivm,
+
+ assert(num_args <= LP_MAX_TEX_FUNC_ARGS);
+
+- *tex_ret = LLVMBuildCall(builder, function, args, num_args, "");
++ *tex_ret = LLVMBuildCall2(builder, function_type, function, args, num_args, "");
+ bb = LLVMGetInsertBlock(builder);
+ inst = LLVMGetLastInstruction(bb);
+ LLVMSetInstructionCallConv(inst, LLVMFastCallConv);
+@@ -4529,8 +4530,8 @@ lp_build_do_atomic_soa(struct gallivm_state *gallivm,
+ return;
+ }
+
+- LLVMValueRef atom_res = lp_build_alloca(gallivm,
+- LLVMVectorType(LLVMInt32TypeInContext(gallivm->context), type.length), "");
++ LLVMTypeRef atom_res_elem_type = LLVMVectorType(LLVMInt32TypeInContext(gallivm->context), type.length);
++ LLVMValueRef atom_res = lp_build_alloca(gallivm, atom_res_elem_type, "");
+
+ offset = LLVMBuildGEP(gallivm->builder, base_ptr, &offset, 1, "");
+ struct lp_build_loop_state loop_state;
+@@ -4567,14 +4568,14 @@ lp_build_do_atomic_soa(struct gallivm_state *gallivm,
+ false);
+ }
+
+- LLVMValueRef temp_res = LLVMBuildLoad(gallivm->builder, atom_res, "");
++ LLVMValueRef temp_res = LLVMBuildLoad2(gallivm->builder, atom_res_elem_type, atom_res, "");
+ temp_res = LLVMBuildInsertElement(gallivm->builder, temp_res, data, loop_state.counter, "");
+ LLVMBuildStore(gallivm->builder, temp_res, atom_res);
+
+ lp_build_endif(&ifthen);
+ lp_build_loop_end_cond(&loop_state, lp_build_const_int32(gallivm, type.length),
+ NULL, LLVMIntUGE);
+- atomic_result[0] = LLVMBuildLoad(gallivm->builder, atom_res, "");
++ atomic_result[0] = LLVMBuildLoad2(gallivm->builder, atom_res_elem_type, atom_res, "");
+ }
+
+ static void
+--
+GitLab
+
+
+From c8520c2a8fed749e6c280895748effb589bff79d Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 16:08:16 +0300
+Subject: [PATCH 18/22] gallivm: use LLVM opaque pointers in lp_bld_struct.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_struct.c | 17 +++++------------
+ 1 file changed, 5 insertions(+), 12 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_struct.c b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+index 067740b5c8853..bd969d4681ae6 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_struct.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+@@ -134,15 +134,7 @@ lp_build_pointer_get(LLVMBuilderRef builder,
+ LLVMValueRef ptr,
+ LLVMValueRef index)
+ {
+- LLVMValueRef element_ptr;
+- LLVMValueRef res;
+- assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
+- element_ptr = LLVMBuildGEP(builder, ptr, &index, 1, "");
+- res = LLVMBuildLoad(builder, element_ptr, "");
+-#ifdef DEBUG
+- lp_build_name(res, "%s[%s]", LLVMGetValueName(ptr), LLVMGetValueName(index));
+-#endif
+- return res;
++ return lp_build_pointer_get_unaligned(builder, ptr, index, 0);
+ }
+
+
+@@ -157,7 +149,8 @@ lp_build_pointer_get_unaligned(LLVMBuilderRef builder,
+ assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
+ element_ptr = LLVMBuildGEP(builder, ptr, &index, 1, "");
+ res = LLVMBuildLoad(builder, element_ptr, "");
+- LLVMSetAlignment(res, alignment);
++ if (alignment)
++ LLVMSetAlignment(res, alignment);
+ #ifdef DEBUG
+ lp_build_name(res, "%s[%s]", LLVMGetValueName(ptr), LLVMGetValueName(index));
+ #endif
+@@ -172,7 +165,7 @@ lp_build_pointer_set(LLVMBuilderRef builder,
+ LLVMValueRef value)
+ {
+ LLVMValueRef element_ptr;
+- element_ptr = LLVMBuildGEP(builder, ptr, &index, 1, "");
++ element_ptr = LLVMBuildGEP2(builder, LLVMTypeOf(value), ptr, &index, 1, "");
+ LLVMBuildStore(builder, value, element_ptr);
+ }
+
+@@ -186,7 +179,7 @@ lp_build_pointer_set_unaligned(LLVMBuilderRef builder,
+ {
+ LLVMValueRef element_ptr;
+ LLVMValueRef instr;
+- element_ptr = LLVMBuildGEP(builder, ptr, &index, 1, "");
++ element_ptr = LLVMBuildGEP2(builder, LLVMTypeOf(value), ptr, &index, 1, "");
+ instr = LLVMBuildStore(builder, value, element_ptr);
+ LLVMSetAlignment(instr, alignment);
+ }
+--
+GitLab
+
+
+From 32a55651cf4ecb830801acafe6410df3f66afca9 Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 16:09:40 +0300
+Subject: [PATCH 19/22] gallivm: use LLVM opaque pointers in lp_bld_tgsi_soa.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ .../auxiliary/gallivm/lp_bld_tgsi_soa.c | 82 ++++++++++---------
+ 1 file changed, 42 insertions(+), 40 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+index afaf35e5b11b7..262fa533b3a29 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+@@ -597,9 +597,10 @@ build_gather(struct lp_build_tgsi_context *bld_base,
+ index = LLVMBuildExtractElement(builder,
+ indexes, si, "");
+ }
+- scalar_ptr = LLVMBuildGEP(builder, base_ptr,
++ LLVMTypeRef scalar_type = LLVMGetElementType(LLVMTypeOf(res));
++ scalar_ptr = LLVMBuildGEP2(builder, scalar_type, base_ptr,
+ &index, 1, "gather_ptr");
+- scalar = LLVMBuildLoad(builder, scalar_ptr, "");
++ scalar = LLVMBuildLoad2(builder, scalar_type, scalar_ptr, "");
+
+ res = LLVMBuildInsertElement(builder, res, scalar, di, "");
+ }
+@@ -640,8 +641,8 @@ emit_mask_scatter(struct lp_build_tgsi_soa_context *bld,
+ for (i = 0; i < bld->bld_base.base.type.length; i++) {
+ LLVMValueRef ii = lp_build_const_int32(gallivm, i);
+ LLVMValueRef index = LLVMBuildExtractElement(builder, indexes, ii, "");
+- LLVMValueRef scalar_ptr = LLVMBuildGEP(builder, base_ptr, &index, 1, "scatter_ptr");
+ LLVMValueRef val = LLVMBuildExtractElement(builder, values, ii, "scatter_val");
++ LLVMValueRef scalar_ptr = LLVMBuildGEP2(builder, LLVMTypeOf(val), base_ptr, &index, 1, "scatter_ptr");
+ LLVMValueRef scalar_pred = pred ?
+ LLVMBuildExtractElement(builder, pred, ii, "scatter_pred") : NULL;
+
+@@ -651,7 +652,7 @@ emit_mask_scatter(struct lp_build_tgsi_soa_context *bld,
+
+ if (scalar_pred) {
+ LLVMValueRef real_val, dst_val;
+- dst_val = LLVMBuildLoad(builder, scalar_ptr, "");
++ dst_val = LLVMBuildLoad2(builder, LLVMTypeOf(val), scalar_ptr, "");
+ real_val = lp_build_select(&bld->elem_bld, scalar_pred, val, dst_val);
+ LLVMBuildStore(builder, real_val, scalar_ptr);
+ }
+@@ -690,7 +691,7 @@ get_indirect_index(struct lp_build_tgsi_soa_context *bld,
+ assert(swizzle < 4);
+ switch (indirect_reg->File) {
+ case TGSI_FILE_ADDRESS:
+- rel = LLVMBuildLoad(builder,
++ rel = LLVMBuildLoad2(builder, bld->bld_base.base.int_elem_type,
+ bld->addr[indirect_reg->Index][swizzle],
+ "load addr reg");
+ /* ADDR LLVM values already have LLVM integer type. */
+@@ -890,23 +891,23 @@ emit_fetch_constant(
+ res = LLVMBuildInsertElement(builder, res, scalar, shuffles[0], "");
+ res = LLVMBuildInsertElement(builder, res, scalar2, shuffles[1], "");
+ } else {
++ LLVMTypeRef scalar_type = NULL;
+ if (stype == TGSI_TYPE_DOUBLE) {
+- LLVMTypeRef dptr_type = LLVMPointerType(LLVMDoubleTypeInContext(gallivm->context), 0);
+- scalar_ptr = LLVMBuildBitCast(builder, scalar_ptr, dptr_type, "");
++ scalar_type = LLVMPointerType(LLVMDoubleTypeInContext(gallivm->context), 0);
++ scalar_ptr = LLVMBuildBitCast(builder, scalar_ptr, scalar_type, "");
+ bld_broad = &bld_base->dbl_bld;
+ } else if (stype == TGSI_TYPE_UNSIGNED64) {
+- LLVMTypeRef u64ptr_type = LLVMPointerType(LLVMInt64TypeInContext(gallivm->context), 0);
+- scalar_ptr = LLVMBuildBitCast(builder, scalar_ptr, u64ptr_type, "");
++ scalar_type = LLVMPointerType(LLVMInt64TypeInContext(gallivm->context), 0);
++ scalar_ptr = LLVMBuildBitCast(builder, scalar_ptr, scalar_type, "");
+ bld_broad = &bld_base->uint64_bld;
+ } else if (stype == TGSI_TYPE_SIGNED64) {
+- LLVMTypeRef i64ptr_type = LLVMPointerType(LLVMInt64TypeInContext(gallivm->context), 0);
+- scalar_ptr = LLVMBuildBitCast(builder, scalar_ptr, i64ptr_type, "");
++ scalar_type = LLVMPointerType(LLVMInt64TypeInContext(gallivm->context), 0);
++ scalar_ptr = LLVMBuildBitCast(builder, scalar_ptr, scalar_type, "");
+ bld_broad = &bld_base->int64_bld;
+ }
+- scalar = LLVMBuildLoad(builder, scalar_ptr, "");
++ scalar = LLVMBuildLoad2(builder, scalar_type, scalar_ptr, "");
+ res = lp_build_broadcast_scalar(bld_broad, scalar);
+ }
+-
+ }
+
+ if (stype == TGSI_TYPE_SIGNED || stype == TGSI_TYPE_UNSIGNED || stype == TGSI_TYPE_DOUBLE || stype == TGSI_TYPE_SIGNED64 || stype == TGSI_TYPE_UNSIGNED64) {
+@@ -1003,7 +1004,7 @@ emit_fetch_immediate(
+ gep[1] = lp_build_const_int32(gallivm, reg->Register.Index * 4 + swizzle);
+ LLVMValueRef imms_ptr = LLVMBuildGEP(builder,
+ bld->imms_array, gep, 2, "");
+- res = LLVMBuildLoad(builder, imms_ptr, "");
++ res = LLVMBuildLoad2(builder, bld_base->base.vec_type, imms_ptr, "");
+
+ if (tgsi_type_is_64bit(stype)) {
+ LLVMValueRef imms_ptr2;
+@@ -1012,7 +1013,7 @@ emit_fetch_immediate(
+ reg->Register.Index * 4 + (swizzle_in >> 16));
+ imms_ptr2 = LLVMBuildGEP(builder,
+ bld->imms_array, gep, 2, "");
+- res2 = LLVMBuildLoad(builder, imms_ptr2, "");
++ res2 = LLVMBuildLoad2(builder, bld_base->base.vec_type, imms_ptr2, "");
+ res = emit_fetch_64bit(bld_base, stype, res, res2);
+ }
+ }
+@@ -1076,10 +1077,10 @@ emit_fetch_input(
+ if (bld->indirect_files & (1 << TGSI_FILE_INPUT)) {
+ LLVMValueRef lindex = lp_build_const_int32(gallivm,
+ reg->Register.Index * 4 + swizzle);
+- LLVMValueRef input_ptr = LLVMBuildGEP(builder,
++ LLVMValueRef input_ptr = LLVMBuildGEP2(builder, bld_base->base.vec_type,
+ bld->inputs_array, &lindex, 1, "");
+
+- res = LLVMBuildLoad(builder, input_ptr, "");
++ res = LLVMBuildLoad2(builder, bld_base->base.vec_type, input_ptr, "");
+ if (tgsi_type_is_64bit(stype)) {
+ LLVMValueRef lindex1;
+ LLVMValueRef input_ptr2;
+@@ -1087,9 +1088,9 @@ emit_fetch_input(
+
+ lindex1 = lp_build_const_int32(gallivm,
+ reg->Register.Index * 4 + (swizzle_in >> 16));
+- input_ptr2 = LLVMBuildGEP(builder,
++ input_ptr2 = LLVMBuildGEP2(builder, bld_base->base.vec_type,
+ bld->inputs_array, &lindex1, 1, "");
+- res2 = LLVMBuildLoad(builder, input_ptr2, "");
++ res2 = LLVMBuildLoad2(builder, bld_base->base.vec_type, input_ptr2, "");
+ res = emit_fetch_64bit(bld_base, stype, res, res2);
+ }
+ }
+@@ -1444,13 +1445,13 @@ emit_fetch_temporary(
+ else {
+ LLVMValueRef temp_ptr;
+ temp_ptr = lp_get_temp_ptr_soa(bld, reg->Register.Index, swizzle);
+- res = LLVMBuildLoad(builder, temp_ptr, "");
++ res = LLVMBuildLoad2(builder, bld->bld_base.base.vec_type, temp_ptr, "");
+
+ if (tgsi_type_is_64bit(stype)) {
+ LLVMValueRef temp_ptr2, res2;
+
+ temp_ptr2 = lp_get_temp_ptr_soa(bld, reg->Register.Index, swizzle_in >> 16);
+- res2 = LLVMBuildLoad(builder, temp_ptr2, "");
++ res2 = LLVMBuildLoad2(builder, bld->bld_base.base.vec_type, temp_ptr2, "");
+ res = emit_fetch_64bit(bld_base, stype, res, res2);
+ }
+ }
+@@ -3539,17 +3540,17 @@ load_emit(
+ lp_build_if(&ifthen, gallivm, cond);
+ scalar = lp_build_pointer_get(builder, scalar_ptr, loop_index);
+
+- temp_res = LLVMBuildLoad(builder, result, "");
++ temp_res = LLVMBuildLoad2(builder, uint_bld->vec_type, result, "");
+ temp_res = LLVMBuildInsertElement(builder, temp_res, scalar, loop_state.counter, "");
+ LLVMBuildStore(builder, temp_res, result);
+ lp_build_else(&ifthen);
+- temp_res = LLVMBuildLoad(builder, result, "");
++ temp_res = LLVMBuildLoad2(builder, uint_bld->vec_type, result, "");
+ temp_res = LLVMBuildInsertElement(builder, temp_res, lp_build_const_int32(gallivm, 0), loop_state.counter, "");
+ LLVMBuildStore(builder, temp_res, result);
+ lp_build_endif(&ifthen);
+ lp_build_loop_end_cond(&loop_state, lp_build_const_int32(gallivm, uint_bld->type.length),
+ NULL, LLVMIntUGE);
+- emit_data->output[chan_index] = LLVMBuildLoad(gallivm->builder, result, "");
++ emit_data->output[chan_index] = LLVMBuildLoad2(gallivm->builder, uint_bld->vec_type, result, "");
+ }
+ }
+ }
+@@ -3875,18 +3876,18 @@ atomic_emit(
+ LLVMAtomicOrderingSequentiallyConsistent,
+ false);
+ }
+- temp_res = LLVMBuildLoad(builder, atom_res, "");
++ temp_res = LLVMBuildLoad2(builder, uint_bld->vec_type, atom_res, "");
+ temp_res = LLVMBuildInsertElement(builder, temp_res, scalar, loop_state.counter, "");
+ LLVMBuildStore(builder, temp_res, atom_res);
+ lp_build_else(&ifthen);
+- temp_res = LLVMBuildLoad(builder, atom_res, "");
++ temp_res = LLVMBuildLoad2(builder, uint_bld->vec_type, atom_res, "");
+ temp_res = LLVMBuildInsertElement(builder, temp_res, lp_build_const_int32(gallivm, 0), loop_state.counter, "");
+ LLVMBuildStore(builder, temp_res, atom_res);
+ lp_build_endif(&ifthen);
+
+ lp_build_loop_end_cond(&loop_state, lp_build_const_int32(gallivm, uint_bld->type.length),
+ NULL, LLVMIntUGE);
+- emit_data->output[emit_data->chan] = LLVMBuildLoad(gallivm->builder, atom_res, "");
++ emit_data->output[emit_data->chan] = LLVMBuildLoad2(gallivm->builder, uint_bld->vec_type, atom_res, "");
+ }
+ }
+
+@@ -3921,7 +3922,7 @@ increment_vec_ptr_by_mask(struct lp_build_tgsi_context * bld_base,
+ LLVMValueRef mask)
+ {
+ LLVMBuilderRef builder = bld_base->base.gallivm->builder;
+- LLVMValueRef current_vec = LLVMBuildLoad(builder, ptr, "");
++ LLVMValueRef current_vec = LLVMBuildLoad2(builder, LLVMTypeOf(mask), ptr, "");
+
+ current_vec = LLVMBuildSub(builder, current_vec, mask, "");
+
+@@ -3934,7 +3935,7 @@ clear_uint_vec_ptr_from_mask(struct lp_build_tgsi_context * bld_base,
+ LLVMValueRef mask)
+ {
+ LLVMBuilderRef builder = bld_base->base.gallivm->builder;
+- LLVMValueRef current_vec = LLVMBuildLoad(builder, ptr, "");
++ LLVMValueRef current_vec = LLVMBuildLoad2(builder, LLVMTypeOf(mask), ptr, "");
+
+ current_vec = lp_build_select(&bld_base->uint_bld,
+ mask,
+@@ -3973,7 +3974,7 @@ emit_vertex(
+ emit_data->inst->Src[0].Register.SwizzleX);
+ LLVMValueRef mask = mask_vec(bld_base);
+ LLVMValueRef total_emitted_vertices_vec =
+- LLVMBuildLoad(builder, bld->total_emitted_vertices_vec_ptr, "");
++ LLVMBuildLoad2(builder, LLVMTypeOf(mask), bld->total_emitted_vertices_vec_ptr, "");
+
+ mask = clamp_mask_to_max_output_vertices(bld, mask,
+ total_emitted_vertices_vec);
+@@ -4009,11 +4010,11 @@ end_primitive_masked(struct lp_build_tgsi_context * bld_base,
+ if (bld->gs_iface->end_primitive) {
+ struct lp_build_context *uint_bld = &bld_base->uint_bld;
+ LLVMValueRef emitted_vertices_vec =
+- LLVMBuildLoad(builder, bld->emitted_vertices_vec_ptr, "");
++ LLVMBuildLoad2(builder, uint_bld->vec_type, bld->emitted_vertices_vec_ptr, "");
+ LLVMValueRef emitted_prims_vec =
+- LLVMBuildLoad(builder, bld->emitted_prims_vec_ptr, "");
++ LLVMBuildLoad2(builder, uint_bld->vec_type, bld->emitted_prims_vec_ptr, "");
+ LLVMValueRef total_emitted_vertices_vec =
+- LLVMBuildLoad(builder, bld->total_emitted_vertices_vec_ptr, "");
++ LLVMBuildLoad2(builder, uint_bld->vec_type, bld->total_emitted_vertices_vec_ptr, "");
+ LLVMValueRef emitted_mask = lp_build_cmp(uint_bld, PIPE_FUNC_NOTEQUAL,
+ emitted_vertices_vec,
+ uint_bld->zero);
+@@ -4048,7 +4049,7 @@ end_primitive_masked(struct lp_build_tgsi_context * bld_base,
+ #if DUMP_GS_EMITS
+ lp_build_print_value(bld->bld_base.base.gallivm,
+ " +++ end prim emitted verts2 = ",
+- LLVMBuildLoad(builder,
++ LLVMBuildLoad2(builder, uint_bld->vec_type,
+ bld->emitted_vertices_vec_ptr, ""));
+ #endif
+ }
+@@ -4312,14 +4313,15 @@ static void emit_prologue(struct lp_build_tgsi_context * bld_base)
+
+ for (index = 0; index < bld_base->info->num_inputs; ++index) {
+ for (chan = 0; chan < TGSI_NUM_CHANNELS; ++chan) {
+- LLVMValueRef lindex =
+- lp_build_const_int32(gallivm, index * 4 + chan);
+- LLVMValueRef input_ptr =
+- LLVMBuildGEP(gallivm->builder, bld->inputs_array,
+- &lindex, 1, "");
+ LLVMValueRef value = bld->inputs[index][chan];
+- if (value)
++ if (value) {
++ LLVMValueRef lindex =
++ lp_build_const_int32(gallivm, index * 4 + chan);
++ LLVMValueRef input_ptr =
++ LLVMBuildGEP2(gallivm->builder, LLVMTypeOf(value), bld->inputs_array,
++ &lindex, 1, "");
+ LLVMBuildStore(gallivm->builder, value, input_ptr);
++ }
+ }
+ }
+ }
+--
+GitLab
+
+
+From 051f588bfef33169db2162ecf4a0e7d5e063100f Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 16:10:19 +0300
+Subject: [PATCH 20/22] gallivm: use LLVM opaque pointers in lp_bld_tgsi_aos.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
+index 85b2e8a207ea6..d04b84700c78e 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
+@@ -206,7 +206,8 @@ emit_fetch_temporary(
+ struct lp_build_tgsi_aos_context * bld = lp_aos_context(bld_base);
+ LLVMBuilderRef builder = bld_base->base.gallivm->builder;
+ LLVMValueRef temp_ptr = bld->temps[reg->Register.Index];
+- LLVMValueRef res = LLVMBuildLoad(builder, temp_ptr, "");
++ LLVMTypeRef vec_type = lp_build_vec_type(bld->bld_base.base.gallivm, bld->bld_base.base.type);
++ LLVMValueRef res = LLVMBuildLoad2(builder, vec_type, temp_ptr, "");
+ assert(!reg->Register.Indirect);
+ if (!res)
+ return bld->bld_base.base.undef;
+@@ -286,8 +287,8 @@ lp_emit_store_aos(
+
+ if (mask) {
+ LLVMValueRef orig_value;
+-
+- orig_value = LLVMBuildLoad(builder, ptr, "");
++ LLVMTypeRef vec_type = lp_build_vec_type(bld->bld_base.base.gallivm, bld->bld_base.base.type);
++ orig_value = LLVMBuildLoad2(builder, vec_type, ptr, "");
+ value = lp_build_select(&bld->bld_base.base,
+ mask, value, orig_value);
+ }
+--
+GitLab
+
+
+From ccbee20f6b4d84240865caa6c4eabcbc6091f0f6 Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 2 May 2022 16:11:07 +0300
+Subject: [PATCH 21/22] gallivm: LLVM opaque pointers small changes
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c | 2 +-
+ src/gallium/auxiliary/gallivm/lp_bld_ir_common.c | 6 +++---
+ src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c
+index 7d106195d0a56..bc0bd4f4831ae 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c
+@@ -80,7 +80,7 @@ lp_build_fetch_rgba_aos_array(struct gallivm_state *gallivm,
+ */
+ ptr = LLVMBuildGEP(builder, base_ptr, &offset, 1, "");
+ ptr = LLVMBuildPointerCast(builder, ptr, LLVMPointerType(src_vec_type, 0), "");
+- res = LLVMBuildLoad(builder, ptr, "");
++ res = LLVMBuildLoad2(builder, src_vec_type, ptr, "");
+ LLVMSetAlignment(res, src_type.width / 8);
+
+ /* Truncate doubles to float */
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c b/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c
+index cecc8abc31b88..d127ea0c7ff84 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c
+@@ -215,7 +215,7 @@ void lp_exec_mask_store(struct lp_exec_mask *mask,
+ if (exec_mask) {
+ LLVMValueRef res, dst;
+
+- dst = LLVMBuildLoad(builder, dst_ptr, "");
++ dst = LLVMBuildLoad2(builder, LLVMTypeOf(val), dst_ptr, "");
+ if (bld_store->type.width < 32)
+ exec_mask = LLVMBuildTrunc(builder, exec_mask, bld_store->vec_type, "");
+ res = lp_build_select(bld_store, exec_mask, val, dst);
+@@ -230,7 +230,7 @@ void lp_exec_bgnloop_post_phi(struct lp_exec_mask *mask)
+ struct function_ctx *ctx = func_ctx(mask);
+
+ if (ctx->loop_stack_size != ctx->bgnloop_stack_size) {
+- mask->break_mask = LLVMBuildLoad(builder, ctx->break_var, "");
++ mask->break_mask = LLVMBuildLoad2(builder, mask->int_vec_type, ctx->break_var, "");
+ lp_exec_mask_update(mask);
+ ctx->bgnloop_stack_size = ctx->loop_stack_size;
+ }
+@@ -303,7 +303,7 @@ void lp_exec_endloop(struct gallivm_state *gallivm,
+ LLVMBuildStore(builder, mask->break_mask, ctx->break_var);
+
+ /* Decrement the loop limiter */
+- limiter = LLVMBuildLoad(builder, ctx->loop_limiter, "");
++ limiter = LLVMBuildLoad2(builder, int_type, ctx->loop_limiter, "");
+
+ limiter = LLVMBuildSub(
+ builder,
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
+index 0564b156d97cb..b0a9f48e8e016 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
+@@ -1191,7 +1191,7 @@ lp_build_sample_aos(struct lp_build_sample_context *bld,
+ lp_build_endif(&if_ctx);
+ }
+
+- packed = LLVMBuildLoad(builder, packed_var, "");
++ packed = LLVMBuildLoad2(builder, u8n_bld.vec_type, packed_var, "");
+
+ /*
+ * Convert to SoA and swizzle.
+--
+GitLab
+
+
+From ae6d32c938fc79ff5019806a2592097ca97bd945 Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Wed, 20 Apr 2022 14:30:30 +0300
+Subject: [PATCH 22/22] gallium: refactor a channel loop in draw_llvm.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15893>
+---
+ src/gallium/auxiliary/draw/draw_llvm.c | 36 ++++++++++----------------
+ 1 file changed, 13 insertions(+), 23 deletions(-)
+
+diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
+index 1f68170d99e03..ee4ff8178a8a5 100644
+--- a/src/gallium/auxiliary/draw/draw_llvm.c
++++ b/src/gallium/auxiliary/draw/draw_llvm.c
+@@ -1651,29 +1651,19 @@ generate_clipmask(struct draw_llvm *llvm,
+ indices[0] = lp_build_const_int32(gallivm, 0);
+ indices[1] = lp_build_const_int32(gallivm, plane_idx);
+
+- indices[2] = lp_build_const_int32(gallivm, 0);
+- plane_ptr = LLVMBuildGEP(builder, planes_ptr, indices, 3, "");
+- plane1 = LLVMBuildLoad2(builder, vs_elem_type, plane_ptr, "plane_x");
+- planes = lp_build_broadcast(gallivm, vs_type_llvm, plane1);
+- sum = LLVMBuildFMul(builder, planes, cv_x, "");
+-
+- indices[2] = lp_build_const_int32(gallivm, 1);
+- plane_ptr = LLVMBuildGEP(builder, planes_ptr, indices, 3, "");
+- plane1 = LLVMBuildLoad2(builder, vs_elem_type, plane_ptr, "plane_y");
+- planes = lp_build_broadcast(gallivm, vs_type_llvm, plane1);
+- sum = lp_build_fmuladd(builder, planes, cv_y, sum);
+-
+- indices[2] = lp_build_const_int32(gallivm, 2);
+- plane_ptr = LLVMBuildGEP(builder, planes_ptr, indices, 3, "");
+- plane1 = LLVMBuildLoad2(builder, vs_elem_type, plane_ptr, "plane_z");
+- planes = lp_build_broadcast(gallivm, vs_type_llvm, plane1);
+- sum = lp_build_fmuladd(builder, planes, cv_z, sum);
+-
+- indices[2] = lp_build_const_int32(gallivm, 3);
+- plane_ptr = LLVMBuildGEP(builder, planes_ptr, indices, 3, "");
+- plane1 = LLVMBuildLoad2(builder, vs_elem_type, plane_ptr, "plane_w");
+- planes = lp_build_broadcast(gallivm, vs_type_llvm, plane1);
+- sum = lp_build_fmuladd(builder, planes, cv_w, sum);
++ for (int i = 0; i < 4; ++i) {
++ indices[2] = lp_build_const_int32(gallivm, i);
++ plane_ptr = LLVMBuildGEP(builder, planes_ptr, indices, 3, "");
++ plane1 = LLVMBuildLoad2(builder, vs_elem_type, plane_ptr,
++ (const char *[]){"plane_x", "plane_y", "plane_z", "plane_w"}[i]);
++ planes = lp_build_broadcast(gallivm, vs_type_llvm, plane1);
++ if (i == 0) {
++ sum = LLVMBuildFMul(builder, planes, cv_x, "");
++ } else {
++ sum = lp_build_fmuladd(builder, planes,
++ (LLVMValueRef[]){cv_x, cv_y, cv_z, cv_w}[i], sum);
++ }
++ }
+
+ test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, sum);
+ temp = lp_build_const_int_vec(gallivm, i32_type, 1LL << plane_idx);
+--
+GitLab
+
+From b549394992553330f191b589b32a30a1f6fb792f Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Thu, 30 Jun 2022 09:14:02 +0300
+Subject: [PATCH 1/4] gallivm: fix a few llvm non-opaque pointers
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+As LLVM 15 transitions to opaque pointers, we need to update
+the deprecated methods dealing with non-opaque pointers.
+
+Reviewed-by: Brian Paul <brianp@vmware.com>
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17650>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_coro.c | 2 +-
+ src/gallium/auxiliary/gallivm/lp_bld_format.c | 10 ++++++----
+ src/gallium/auxiliary/gallivm/lp_bld_format.h | 2 ++
+ .../auxiliary/gallivm/lp_bld_format_aos_array.c | 3 ++-
+ src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c | 12 +++++++-----
+ 5 files changed, 18 insertions(+), 11 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_coro.c b/src/gallium/auxiliary/gallivm/lp_bld_coro.c
+index a423f60d939a6..0214dcf674203 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_coro.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_coro.c
+@@ -206,7 +206,7 @@ LLVMValueRef lp_build_coro_alloc_mem_array(struct gallivm_state *gallivm,
+ LLVMValueRef coro_num_hdls)
+ {
+ LLVMTypeRef mem_ptr_type = LLVMPointerType(LLVMInt8TypeInContext(gallivm->context), 0);
+- LLVMValueRef alloced_ptr = LLVMBuildLoad(gallivm->builder, coro_hdl_ptr, "");
++ LLVMValueRef alloced_ptr = LLVMBuildLoad2(gallivm->builder, mem_ptr_type, coro_hdl_ptr, "");
+
+ LLVMValueRef not_alloced = LLVMBuildICmp(gallivm->builder, LLVMIntEQ, alloced_ptr, LLVMConstNull(mem_ptr_type), "");
+ LLVMValueRef coro_size = lp_build_coro_size(gallivm);
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format.c b/src/gallium/auxiliary/gallivm/lp_bld_format.c
+index a82fd8feee815..d26485eb4973a 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_format.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_format.c
+@@ -28,7 +28,10 @@
+
+ #include "lp_bld_format.h"
+
+-
++LLVMTypeRef lp_build_format_cache_member_data_type(struct gallivm_state *gallivm)
++{
++ return LLVMArrayType(LLVMInt32TypeInContext(gallivm->context), LP_BUILD_FORMAT_CACHE_SIZE * 16);
++}
+
+ LLVMTypeRef
+ lp_build_format_cache_type(struct gallivm_state *gallivm)
+@@ -36,9 +39,8 @@ lp_build_format_cache_type(struct gallivm_state *gallivm)
+ LLVMTypeRef elem_types[LP_BUILD_FORMAT_CACHE_MEMBER_COUNT];
+ LLVMTypeRef s;
+
+- elem_types[LP_BUILD_FORMAT_CACHE_MEMBER_DATA] =
+- LLVMArrayType(LLVMInt32TypeInContext(gallivm->context),
+- LP_BUILD_FORMAT_CACHE_SIZE * 16);
++ elem_types[LP_BUILD_FORMAT_CACHE_MEMBER_DATA] = lp_build_format_cache_member_data_type(gallivm);
++
+ elem_types[LP_BUILD_FORMAT_CACHE_MEMBER_TAGS] =
+ LLVMArrayType(LLVMInt64TypeInContext(gallivm->context),
+ LP_BUILD_FORMAT_CACHE_SIZE);
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format.h b/src/gallium/auxiliary/gallivm/lp_bld_format.h
+index 425b2f572f515..0ed1dca38864c 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_format.h
++++ b/src/gallium/auxiliary/gallivm/lp_bld_format.h
+@@ -82,6 +82,8 @@ enum {
+ LLVMTypeRef
+ lp_build_format_cache_type(struct gallivm_state *gallivm);
+
++LLVMTypeRef
++lp_build_format_cache_member_data_type(struct gallivm_state *gallivm);
+
+ /*
+ * AoS
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c
+index bc0bd4f4831ae..55b5bec53e591 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c
+@@ -78,7 +78,8 @@ lp_build_fetch_rgba_aos_array(struct gallivm_state *gallivm,
+ * (If all callers can guarantee element type alignment, we should
+ * relax alignment restrictions elsewhere.)
+ */
+- ptr = LLVMBuildGEP(builder, base_ptr, &offset, 1, "");
++ LLVMTypeRef byte_type = LLVMInt8TypeInContext(gallivm->context);
++ ptr = LLVMBuildGEP2(builder, byte_type, base_ptr, &offset, 1, "");
+ ptr = LLVMBuildPointerCast(builder, ptr, LLVMPointerType(src_vec_type, 0), "");
+ res = LLVMBuildLoad2(builder, src_vec_type, ptr, "");
+ LLVMSetAlignment(res, src_type.width / 8);
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
+index 8f972b840fa66..5d91c779e88d2 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
+@@ -1134,14 +1134,15 @@ s3tc_store_cached_block(struct gallivm_state *gallivm,
+ indices[0] = lp_build_const_int32(gallivm, 0);
+ indices[1] = lp_build_const_int32(gallivm, LP_BUILD_FORMAT_CACHE_MEMBER_TAGS);
+ indices[2] = hash_index;
+- ptr = LLVMBuildGEP(builder, cache, indices, ARRAY_SIZE(indices), "");
++ LLVMTypeRef cache_type = lp_build_format_cache_type(gallivm);
++ ptr = LLVMBuildGEP2(builder, cache_type, cache, indices, ARRAY_SIZE(indices), "");
+ LLVMBuildStore(builder, tag_value, ptr);
+
+ indices[1] = lp_build_const_int32(gallivm, LP_BUILD_FORMAT_CACHE_MEMBER_DATA);
+ hash_index = LLVMBuildMul(builder, hash_index, lp_build_const_int32(gallivm, 16), "");
+ for (count = 0; count < 4; count++) {
+ indices[2] = hash_index;
+- ptr = LLVMBuildGEP(builder, cache, indices, ARRAY_SIZE(indices), "");
++ ptr = LLVMBuildGEP2(builder, cache_type, cache, indices, ARRAY_SIZE(indices), "");
+ ptr = LLVMBuildBitCast(builder, ptr, type_ptr4x32, "");
+ LLVMBuildStore(builder, col[count], ptr);
+ hash_index = LLVMBuildAdd(builder, hash_index, lp_build_const_int32(gallivm, 4), "");
+@@ -1150,7 +1151,7 @@ s3tc_store_cached_block(struct gallivm_state *gallivm,
+
+ static LLVMValueRef
+ s3tc_lookup_cached_pixel(struct gallivm_state *gallivm,
+- LLVMValueRef ptr,
++ LLVMValueRef cache,
+ LLVMValueRef index)
+ {
+ LLVMBuilderRef builder = gallivm->builder;
+@@ -1159,8 +1160,9 @@ s3tc_lookup_cached_pixel(struct gallivm_state *gallivm,
+ indices[0] = lp_build_const_int32(gallivm, 0);
+ indices[1] = lp_build_const_int32(gallivm, LP_BUILD_FORMAT_CACHE_MEMBER_DATA);
+ indices[2] = index;
+- member_ptr = LLVMBuildGEP(builder, ptr, indices, ARRAY_SIZE(indices), "");
+- return LLVMBuildLoad(builder, member_ptr, "cache_data");
++ member_ptr = LLVMBuildGEP2(builder, lp_build_format_cache_type(gallivm), cache, indices, ARRAY_SIZE(indices), "");
++
++ return LLVMBuildLoad2(builder, lp_build_format_cache_member_data_type(gallivm), member_ptr, "cache_data");
+ }
+
+ static LLVMValueRef
+--
+GitLab
+
+
+From 8c4aef2abb9170c1f5590a7921383345b4626b1d Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Fri, 1 Jul 2022 12:52:25 +0300
+Subject: [PATCH 2/4] gallivm: refactor a bit the cache access in view of LLVM
+ opaque pointers
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+LLVM 15 requires transition to opaque pointers; factorize a bit the cache
+memthods to help this transition.
+
+Reviewed-by: Brian Paul <brianp@vmware.com>
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17650>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_format.c | 30 +++++++++++----
+ src/gallium/auxiliary/gallivm/lp_bld_format.h | 7 +++-
+ .../auxiliary/gallivm/lp_bld_format_s3tc.c | 38 ++++++++++---------
+ 3 files changed, 49 insertions(+), 26 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format.c b/src/gallium/auxiliary/gallivm/lp_bld_format.c
+index d26485eb4973a..796277feee702 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_format.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_format.c
+@@ -28,9 +28,24 @@
+
+ #include "lp_bld_format.h"
+
+-LLVMTypeRef lp_build_format_cache_member_data_type(struct gallivm_state *gallivm)
+-{
+- return LLVMArrayType(LLVMInt32TypeInContext(gallivm->context), LP_BUILD_FORMAT_CACHE_SIZE * 16);
++LLVMTypeRef lp_build_format_cache_elem_type(struct gallivm_state *gallivm, enum cache_member member) {
++ assert(member == LP_BUILD_FORMAT_CACHE_MEMBER_DATA || member == LP_BUILD_FORMAT_CACHE_MEMBER_TAGS);
++ switch (member) {
++ case LP_BUILD_FORMAT_CACHE_MEMBER_DATA:
++ return LLVMInt32TypeInContext(gallivm->context);
++ case LP_BUILD_FORMAT_CACHE_MEMBER_TAGS:
++ return LLVMInt64TypeInContext(gallivm->context);
++ default:
++ unreachable("lp_build_format_cache_elem_type unhandled member type");
++ }
++}
++
++LLVMTypeRef lp_build_format_cache_member_type(struct gallivm_state *gallivm, enum cache_member member) {
++ assert(member == LP_BUILD_FORMAT_CACHE_MEMBER_DATA || member == LP_BUILD_FORMAT_CACHE_MEMBER_TAGS);
++ unsigned elem_count =
++ member == LP_BUILD_FORMAT_CACHE_MEMBER_DATA ? LP_BUILD_FORMAT_CACHE_SIZE * 16 :
++ member == LP_BUILD_FORMAT_CACHE_MEMBER_TAGS ? LP_BUILD_FORMAT_CACHE_SIZE : 0;
++ return LLVMArrayType(lp_build_format_cache_elem_type(gallivm, member), elem_count);
+ }
+
+ LLVMTypeRef
+@@ -39,11 +54,12 @@ lp_build_format_cache_type(struct gallivm_state *gallivm)
+ LLVMTypeRef elem_types[LP_BUILD_FORMAT_CACHE_MEMBER_COUNT];
+ LLVMTypeRef s;
+
+- elem_types[LP_BUILD_FORMAT_CACHE_MEMBER_DATA] = lp_build_format_cache_member_data_type(gallivm);
++ int members[] = {LP_BUILD_FORMAT_CACHE_MEMBER_DATA, LP_BUILD_FORMAT_CACHE_MEMBER_TAGS};
++ for (int i = 0; i < ARRAY_SIZE(members); ++i) {
++ int member = members[i];
++ elem_types[member] = lp_build_format_cache_member_type(gallivm, member);
++ }
+
+- elem_types[LP_BUILD_FORMAT_CACHE_MEMBER_TAGS] =
+- LLVMArrayType(LLVMInt64TypeInContext(gallivm->context),
+- LP_BUILD_FORMAT_CACHE_SIZE);
+ #if LP_BUILD_FORMAT_CACHE_DEBUG
+ elem_types[LP_BUILD_FORMAT_CACHE_MEMBER_ACCESS_TOTAL] =
+ LLVMInt64TypeInContext(gallivm->context);
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format.h b/src/gallium/auxiliary/gallivm/lp_bld_format.h
+index 0ed1dca38864c..74a625dce7292 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_format.h
++++ b/src/gallium/auxiliary/gallivm/lp_bld_format.h
+@@ -68,7 +68,7 @@ struct lp_build_format_cache
+ };
+
+
+-enum {
++enum cache_member {
+ LP_BUILD_FORMAT_CACHE_MEMBER_DATA = 0,
+ LP_BUILD_FORMAT_CACHE_MEMBER_TAGS,
+ #if LP_BUILD_FORMAT_CACHE_DEBUG
+@@ -83,7 +83,10 @@ LLVMTypeRef
+ lp_build_format_cache_type(struct gallivm_state *gallivm);
+
+ LLVMTypeRef
+-lp_build_format_cache_member_data_type(struct gallivm_state *gallivm);
++lp_build_format_cache_member_type(struct gallivm_state *gallivm, enum cache_member member);
++
++LLVMTypeRef
++lp_build_format_cache_elem_type(struct gallivm_state *gallivm, enum cache_member member);
+
+ /*
+ * AoS
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
+index 5d91c779e88d2..fe44841528cb0 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
+@@ -1150,35 +1150,39 @@ s3tc_store_cached_block(struct gallivm_state *gallivm,
+ }
+
+ static LLVMValueRef
+-s3tc_lookup_cached_pixel(struct gallivm_state *gallivm,
+- LLVMValueRef cache,
+- LLVMValueRef index)
+-{
++lookup_cache_member(struct gallivm_state *gallivm, LLVMValueRef cache, enum cache_member member, LLVMValueRef index) {
++ assert(member == LP_BUILD_FORMAT_CACHE_MEMBER_DATA || member == LP_BUILD_FORMAT_CACHE_MEMBER_TAGS);
+ LLVMBuilderRef builder = gallivm->builder;
+ LLVMValueRef member_ptr, indices[3];
+
+ indices[0] = lp_build_const_int32(gallivm, 0);
+- indices[1] = lp_build_const_int32(gallivm, LP_BUILD_FORMAT_CACHE_MEMBER_DATA);
++ indices[1] = lp_build_const_int32(gallivm, member);
+ indices[2] = index;
+- member_ptr = LLVMBuildGEP2(builder, lp_build_format_cache_type(gallivm), cache, indices, ARRAY_SIZE(indices), "");
+
+- return LLVMBuildLoad2(builder, lp_build_format_cache_member_data_type(gallivm), member_ptr, "cache_data");
++ const char *name =
++ member == LP_BUILD_FORMAT_CACHE_MEMBER_DATA ? "cache_data" :
++ member == LP_BUILD_FORMAT_CACHE_MEMBER_TAGS ? "tag_data" : "";
++
++ member_ptr = LLVMBuildGEP2(builder, lp_build_format_cache_type(gallivm),
++ cache, indices, ARRAY_SIZE(indices), "cache_gep");
++
++ return LLVMBuildLoad2(builder, lp_build_format_cache_elem_type(gallivm, member), member_ptr, name);
++}
++
++static LLVMValueRef
++s3tc_lookup_cached_pixel(struct gallivm_state *gallivm,
++ LLVMValueRef cache,
++ LLVMValueRef index)
++{
++ return lookup_cache_member(gallivm, cache, LP_BUILD_FORMAT_CACHE_MEMBER_DATA, index);
+ }
+
+ static LLVMValueRef
+ s3tc_lookup_tag_data(struct gallivm_state *gallivm,
+- LLVMValueRef ptr,
++ LLVMValueRef cache,
+ LLVMValueRef index)
+ {
+- LLVMBuilderRef builder = gallivm->builder;
+- LLVMValueRef member_ptr, indices[3];
+-
+- indices[0] = lp_build_const_int32(gallivm, 0);
+- indices[1] = lp_build_const_int32(gallivm, LP_BUILD_FORMAT_CACHE_MEMBER_TAGS);
+- indices[2] = index;
+- LLVMTypeRef tag_type = LLVMInt64TypeInContext(gallivm->context);
+- member_ptr = LLVMBuildGEP(builder, ptr, indices, ARRAY_SIZE(indices), "");
+- return LLVMBuildLoad2(builder, tag_type, member_ptr, "tag_data");
++ return lookup_cache_member(gallivm, cache, LP_BUILD_FORMAT_CACHE_MEMBER_TAGS, index);
+ }
+
+ #if LP_BUILD_FORMAT_CACHE_DEBUG
+--
+GitLab
+
+
+From f0fda08739e46dfcb552d4510c387130ee14874d Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Tue, 12 Jul 2022 23:21:49 +0300
+Subject: [PATCH 3/4] gallivm: add lp_build_struct_get() variants that take the
+ LLVM type
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This is needed for LLVM-15 opaque pointers.
+The new variants taking the type are named with the suffix "2", using
+the same naming pattern LLVM (e.g. LLVMBuildGEP2 vs. LLVMBuildGEP).
+
+Reviewed-by: Brian Paul <brianp@vmware.com>
+Acked-by: Marek Olšák <marek.olsak@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17650>
+---
+ src/gallium/auxiliary/draw/draw_llvm.c | 165 +++++++++---------
+ src/gallium/auxiliary/draw/draw_llvm.h | 145 +++++++--------
+ src/gallium/auxiliary/gallivm/lp_bld_struct.c | 49 +++++-
+ src/gallium/auxiliary/gallivm/lp_bld_struct.h | 22 +++
+ 4 files changed, 225 insertions(+), 156 deletions(-)
+
+diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
+index 4f952e0e17c48..4ec2883c2dd0a 100644
+--- a/src/gallium/auxiliary/draw/draw_llvm.c
++++ b/src/gallium/auxiliary/draw/draw_llvm.c
+@@ -307,37 +307,28 @@ create_jit_image_type(struct gallivm_state *gallivm, const char *struct_name)
+ * Create LLVM type for struct draw_jit_context
+ */
+ static LLVMTypeRef
+-create_jit_context_type(struct gallivm_state *gallivm,
+- LLVMTypeRef texture_type, LLVMTypeRef sampler_type,
+- LLVMTypeRef image_type,
+- const char *struct_name)
++create_jit_context_type(struct gallivm_state *gallivm, const char *struct_name)
+ {
++ LLVMTypeRef texture_type = create_jit_texture_type(gallivm, "texture");
++ LLVMTypeRef sampler_type = create_jit_sampler_type(gallivm, "sampler");
++ LLVMTypeRef image_type = create_jit_image_type(gallivm, "image");
++
+ LLVMTargetDataRef target = gallivm->target;
+ LLVMTypeRef float_type = LLVMFloatTypeInContext(gallivm->context);
+ LLVMTypeRef int_type = LLVMInt32TypeInContext(gallivm->context);
+ LLVMTypeRef elem_types[DRAW_JIT_CTX_NUM_FIELDS];
+- LLVMTypeRef context_type;
+
+- elem_types[0] = LLVMArrayType(LLVMPointerType(float_type, 0), /* vs_constants */
+- LP_MAX_TGSI_CONST_BUFFERS);
+- elem_types[1] = LLVMArrayType(int_type, /* num_vs_constants */
+- LP_MAX_TGSI_CONST_BUFFERS);
+- elem_types[2] = LLVMPointerType(LLVMArrayType(LLVMArrayType(float_type, 4),
+- DRAW_TOTAL_CLIP_PLANES), 0);
+- elem_types[3] = LLVMPointerType(float_type, 0); /* viewports */
+- elem_types[4] = LLVMArrayType(texture_type,
+- PIPE_MAX_SHADER_SAMPLER_VIEWS); /* textures */
+- elem_types[5] = LLVMArrayType(sampler_type,
+- PIPE_MAX_SAMPLERS); /* samplers */
+- elem_types[6] = LLVMArrayType(image_type,
+- PIPE_MAX_SHADER_IMAGES); /* images */
+- elem_types[7] = LLVMArrayType(LLVMPointerType(int_type, 0), /* vs_ssbo */
+- LP_MAX_TGSI_SHADER_BUFFERS);
+- elem_types[8] = LLVMArrayType(int_type, /* num_vs_ssbos */
+- LP_MAX_TGSI_SHADER_BUFFERS);
+- elem_types[9] = LLVMPointerType(float_type, 0); /* aniso table */
+- context_type = LLVMStructTypeInContext(gallivm->context, elem_types,
+- ARRAY_SIZE(elem_types), 0);
++ elem_types[DRAW_JIT_CTX_CONSTANTS] = LLVMArrayType(LLVMPointerType(float_type, 0), LP_MAX_TGSI_CONST_BUFFERS);
++ elem_types[DRAW_JIT_CTX_NUM_CONSTANTS] = LLVMArrayType(int_type, LP_MAX_TGSI_CONST_BUFFERS);
++ elem_types[DRAW_JIT_CTX_PLANES] = LLVMPointerType(LLVMArrayType(LLVMArrayType(float_type, 4), DRAW_TOTAL_CLIP_PLANES), 0);
++ elem_types[DRAW_JIT_CTX_VIEWPORT] = LLVMPointerType(float_type, 0);
++ elem_types[DRAW_JIT_CTX_TEXTURES] = LLVMArrayType(texture_type, PIPE_MAX_SHADER_SAMPLER_VIEWS);
++ elem_types[DRAW_JIT_CTX_SAMPLERS] = LLVMArrayType(sampler_type, PIPE_MAX_SAMPLERS);
++ elem_types[DRAW_JIT_CTX_IMAGES] = LLVMArrayType(image_type, PIPE_MAX_SHADER_IMAGES);
++ elem_types[DRAW_JIT_CTX_SSBOS] = LLVMArrayType(LLVMPointerType(int_type, 0), LP_MAX_TGSI_SHADER_BUFFERS);
++ elem_types[DRAW_JIT_CTX_NUM_SSBOS] = LLVMArrayType(int_type, LP_MAX_TGSI_SHADER_BUFFERS);
++ elem_types[DRAW_JIT_CTX_ANISO_FILTER_TABLE] = LLVMPointerType(float_type, 0);
++ LLVMTypeRef context_type = LLVMStructTypeInContext(gallivm->context, elem_types, ARRAY_SIZE(elem_types), 0);
+
+ (void) target; /* silence unused var warning for non-debug build */
+ LP_CHECK_MEMBER_OFFSET(struct draw_jit_context, vs_constants,
+@@ -720,16 +711,9 @@ static void
+ create_jit_types(struct draw_llvm_variant *variant)
+ {
+ struct gallivm_state *gallivm = variant->gallivm;
+- LLVMTypeRef texture_type, sampler_type, context_type, image_type;
+
+- texture_type = create_jit_texture_type(gallivm, "texture");
+- sampler_type = create_jit_sampler_type(gallivm, "sampler");
+- image_type = create_jit_image_type(gallivm, "image");
+-
+- context_type = create_jit_context_type(gallivm, texture_type, sampler_type,
+- image_type,
+- "draw_jit_context");
+- variant->context_ptr_type = LLVMPointerType(context_type, 0);
++ variant->context_type = create_jit_context_type(gallivm, "draw_jit_context");
++ variant->context_ptr_type = LLVMPointerType(variant->context_type, 0);
+
+ variant->buffer_type = create_jit_dvbuffer_type(gallivm, "draw_vertex_buffer");
+ variant->buffer_ptr_type = LLVMPointerType(variant->buffer_type, 0);
+@@ -983,13 +967,13 @@ generate_vs(struct draw_llvm_variant *variant,
+ struct draw_llvm *llvm = variant->llvm;
+ const struct tgsi_token *tokens = llvm->draw->vs.vertex_shader->state.tokens;
+ LLVMValueRef consts_ptr =
+- draw_jit_context_vs_constants(variant->gallivm, context_ptr);
++ draw_jit_context_vs_constants(variant, context_ptr);
+ LLVMValueRef num_consts_ptr =
+- draw_jit_context_num_vs_constants(variant->gallivm, context_ptr);
++ draw_jit_context_num_vs_constants(variant, context_ptr);
+ LLVMValueRef ssbos_ptr =
+- draw_jit_context_vs_ssbos(variant->gallivm, context_ptr);
++ draw_jit_context_vs_ssbos(variant, context_ptr);
+ LLVMValueRef num_ssbos_ptr =
+- draw_jit_context_num_vs_ssbos(variant->gallivm, context_ptr);
++ draw_jit_context_num_vs_ssbos(variant, context_ptr);
+
+ struct lp_build_tgsi_params params;
+ memset(&params, 0, sizeof(params));
+@@ -1006,7 +990,7 @@ generate_vs(struct draw_llvm_variant *variant,
+ params.ssbo_ptr = ssbos_ptr;
+ params.ssbo_sizes_ptr = num_ssbos_ptr;
+ params.image = draw_image;
+- params.aniso_filter_table = draw_jit_context_aniso_filter_table(variant->gallivm, context_ptr);
++ params.aniso_filter_table = draw_jit_context_aniso_filter_table(variant, context_ptr);
+
+ if (llvm->draw->vs.vertex_shader->state.ir.nir &&
+ llvm->draw->vs.vertex_shader->state.type == PIPE_SHADER_IR_NIR)
+@@ -1161,13 +1145,14 @@ fetch_vector(struct gallivm_state *gallivm,
+
+ static void
+ store_aos(struct gallivm_state *gallivm,
++ LLVMTypeRef io_type,
+ LLVMValueRef io_ptr,
+ LLVMValueRef index,
+ LLVMValueRef value)
+ {
+ LLVMTypeRef data_ptr_type = LLVMPointerType(lp_build_vec_type(gallivm, lp_float32_vec4_type()), 0);
+ LLVMBuilderRef builder = gallivm->builder;
+- LLVMValueRef data_ptr = draw_jit_header_data(gallivm, io_ptr);
++ LLVMValueRef data_ptr = draw_jit_header_data(gallivm, io_type, io_ptr);
+ LLVMValueRef indices[3];
+
+ indices[0] = lp_build_const_int32(gallivm, 0);
+@@ -1240,6 +1225,7 @@ adjust_mask(struct gallivm_state *gallivm,
+ static void
+ store_aos_array(struct gallivm_state *gallivm,
+ struct lp_type soa_type,
++ LLVMTypeRef io_type,
+ LLVMValueRef io_ptr,
+ LLVMValueRef *indices,
+ LLVMValueRef* aos,
+@@ -1265,7 +1251,7 @@ store_aos_array(struct gallivm_state *gallivm,
+ } else {
+ inds[i] = linear_inds[i];
+ }
+- io_ptrs[i] = LLVMBuildGEP(builder, io_ptr, &inds[i], 1, "");
++ io_ptrs[i] = LLVMBuildGEP2(builder, io_type, io_ptr, &inds[i], 1, "");
+ }
+
+ if (attrib == 0) {
+@@ -1289,7 +1275,7 @@ store_aos_array(struct gallivm_state *gallivm,
+ /* OR with the clipmask */
+ cliptmp = LLVMBuildOr(builder, val, clipmask, "");
+ for (i = 0; i < vector_length; i++) {
+- LLVMValueRef id_ptr = draw_jit_header_id(gallivm, io_ptrs[i]);
++ LLVMValueRef id_ptr = draw_jit_header_id(gallivm, io_type, io_ptrs[i]);
+ val = LLVMBuildExtractElement(builder, cliptmp, linear_inds[i], "");
+ val = adjust_mask(gallivm, val);
+ #if DEBUG_STORE
+@@ -1302,13 +1288,14 @@ store_aos_array(struct gallivm_state *gallivm,
+
+ /* store for each of the n vertices */
+ for (i = 0; i < vector_length; i++) {
+- store_aos(gallivm, io_ptrs[i], attr_index, aos[i]);
++ store_aos(gallivm, io_type, io_ptrs[i], attr_index, aos[i]);
+ }
+ }
+
+
+ static void
+ convert_to_aos(struct gallivm_state *gallivm,
++ LLVMTypeRef io_type,
+ LLVMValueRef io,
+ LLVMValueRef *indices,
+ LLVMValueRef (*outputs)[TGSI_NUM_CHANNELS],
+@@ -1367,7 +1354,9 @@ convert_to_aos(struct gallivm_state *gallivm,
+
+ store_aos_array(gallivm,
+ soa_type,
+- io, indices,
++ io_type,
++ io,
++ indices,
+ aos,
+ attrib,
+ num_outputs,
+@@ -1386,6 +1375,7 @@ convert_to_aos(struct gallivm_state *gallivm,
+ static void
+ store_clip(struct gallivm_state *gallivm,
+ const struct lp_type vs_type,
++ LLVMTypeRef io_type,
+ LLVMValueRef io_ptr,
+ LLVMValueRef (*outputs)[TGSI_NUM_CHANNELS],
+ int idx)
+@@ -1403,7 +1393,7 @@ store_clip(struct gallivm_state *gallivm,
+
+ for (i = 0; i < vs_type.length; i++) {
+ inds[i] = lp_build_const_int32(gallivm, i);
+- io_ptrs[i] = LLVMBuildGEP(builder, io_ptr, &inds[i], 1, "");
++ io_ptrs[i] = LLVMBuildGEP2(builder, io_type, io_ptr, &inds[i], 1, "");
+ }
+
+ soa[0] = LLVMBuildLoad(builder, outputs[idx][0], ""); /*x0 x1 .. xn*/
+@@ -1412,7 +1402,7 @@ store_clip(struct gallivm_state *gallivm,
+ soa[3] = LLVMBuildLoad(builder, outputs[idx][3], ""); /*w0 w1 .. wn*/
+
+ for (i = 0; i < vs_type.length; i++) {
+- clip_ptrs[i] = draw_jit_header_clip_pos(gallivm, io_ptrs[i]);
++ clip_ptrs[i] = draw_jit_header_clip_pos(gallivm, io_type, io_ptrs[i]);
+ }
+
+ lp_build_transpose_aos(gallivm, vs_type, soa, soa);
+@@ -1451,7 +1441,7 @@ generate_viewport(struct draw_llvm_variant *variant,
+ LLVMTypeRef vs_type_llvm = lp_build_vec_type(gallivm, vs_type);
+ LLVMValueRef out3 = LLVMBuildLoad2(builder, vs_type_llvm, outputs[pos][3], ""); /*w0 w1 .. wn*/
+ LLVMValueRef const1 = lp_build_const_vec(gallivm, f32_type, 1.0); /*1.0 1.0 1.0 1.0*/
+- LLVMValueRef vp_ptr = draw_jit_context_viewports(gallivm, context_ptr);
++ LLVMValueRef vp_ptr = draw_jit_context_viewports(variant, context_ptr);
+
+ /* We treat pipe_viewport_state as a float array */
+ const int scale_index_offset = offsetof(struct pipe_viewport_state, scale) / sizeof(float);
+@@ -1504,6 +1494,7 @@ generate_clipmask(struct draw_llvm *llvm,
+ struct lp_type vs_type,
+ LLVMValueRef (*outputs)[TGSI_NUM_CHANNELS],
+ struct draw_llvm_variant_key *key,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ boolean *have_clipdist)
+ {
+@@ -1623,7 +1614,7 @@ generate_clipmask(struct draw_llvm *llvm,
+ }
+
+ if (clip_user) {
+- LLVMValueRef planes_ptr = draw_jit_context_planes(gallivm, context_ptr);
++ LLVMValueRef planes_ptr = draw_jit_context_planes(gallivm, context_type, context_ptr);
+ LLVMValueRef indices[3];
+ LLVMValueRef is_nan_or_inf;
+
+@@ -1834,7 +1825,8 @@ draw_gs_llvm_emit_vertex(const struct lp_build_gs_iface *gs_base,
+ do_clamp_vertex_color(gallivm, gs_type,
+ gs_info, outputs);
+ }
+- convert_to_aos(gallivm, io, indices,
++ convert_to_aos(gallivm, variant->vertex_header_type,
++ io, indices,
+ outputs, clipmask,
+ gs_info->num_outputs, gs_type,
+ FALSE);
+@@ -1854,7 +1846,7 @@ draw_gs_llvm_end_primitive(const struct lp_build_gs_iface *gs_base,
+ struct gallivm_state *gallivm = variant->gallivm;
+ LLVMBuilderRef builder = gallivm->builder;
+ LLVMValueRef prim_lengts_ptr =
+- draw_gs_jit_prim_lengths(variant->gallivm, variant->context_ptr);
++ draw_gs_jit_prim_lengths(variant, variant->context_ptr);
+ unsigned i;
+
+ LLVMValueRef cond = LLVMBuildICmp(gallivm->builder, LLVMIntNE, mask_vec, lp_build_const_int_vec(gallivm, bld->type, 0), "");
+@@ -1889,9 +1881,9 @@ draw_gs_llvm_epilogue(const struct lp_build_gs_iface *gs_base,
+ struct gallivm_state *gallivm = variant->gallivm;
+ LLVMBuilderRef builder = gallivm->builder;
+ LLVMValueRef emitted_verts_ptr =
+- draw_gs_jit_emitted_vertices(gallivm, variant->context_ptr);
++ draw_gs_jit_emitted_vertices(variant, variant->context_ptr);
+ LLVMValueRef emitted_prims_ptr =
+- draw_gs_jit_emitted_prims(gallivm, variant->context_ptr);
++ draw_gs_jit_emitted_prims(variant, variant->context_ptr);
+ LLVMValueRef stream_val = lp_build_const_int32(gallivm, stream);
+
+ emitted_verts_ptr = LLVMBuildGEP(builder, emitted_verts_ptr, &stream_val, 1, "");
+@@ -2097,12 +2089,12 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
+ if (velem->src_format != PIPE_FORMAT_NONE) {
+ vbuffer_ptr = LLVMBuildGEP2(builder, variant->buffer_type, vbuffers_ptr, &vb_index, 1, "");
+ vb_info = LLVMBuildGEP2(builder, variant->vb_type, vb_ptr, &vb_index, 1, "");
+- vb_stride[j] = draw_jit_vbuffer_stride(gallivm, vb_info);
++ vb_stride[j] = draw_jit_vbuffer_stride(gallivm, variant->vb_type, vb_info);
+ vb_stride[j] = LLVMBuildZExt(gallivm->builder, vb_stride[j],
+ LLVMInt32TypeInContext(context), "");
+- vb_buffer_offset = draw_jit_vbuffer_offset(gallivm, vb_info);
+- map_ptr[j] = draw_jit_dvbuffer_map(gallivm, vbuffer_ptr);
+- buffer_size = draw_jit_dvbuffer_size(gallivm, vbuffer_ptr);
++ vb_buffer_offset = draw_jit_vbuffer_offset(gallivm, variant->vb_type, vb_info);
++ map_ptr[j] = draw_jit_dvbuffer_map(gallivm, variant->buffer_type, vbuffer_ptr);
++ buffer_size = draw_jit_dvbuffer_size(gallivm, variant->buffer_type, vbuffer_ptr);
+
+ ofbit = NULL;
+ /*
+@@ -2317,7 +2309,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
+ lp_build_mask_end(&mask);
+ if (pos != -1 && cv != -1) {
+ /* store original positions in clip before further manipulation */
+- store_clip(gallivm, vs_type, io, outputs, pos);
++ store_clip(gallivm, vs_type, variant->vertex_header_type, io, outputs, pos);
+
+ /* do cliptest */
+ if (enable_cliptest) {
+@@ -2328,6 +2320,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
+ vs_type,
+ outputs,
+ key,
++ variant->context_type,
+ context_ptr, &have_clipdist);
+ temp = LLVMBuildOr(builder, clipmask, temp, "");
+ /* store temporary clipping boolean value */
+@@ -2350,7 +2343,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
+ * original positions in clip
+ * and transformed positions in data
+ */
+- convert_to_aos(gallivm, io, NULL, outputs, clipmask,
++ convert_to_aos(gallivm, variant->vertex_header_type, io, NULL, outputs, clipmask,
+ vs_info->num_outputs, vs_type,
+ enable_cliptest && key->need_edgeflags);
+ }
+@@ -2695,18 +2688,18 @@ static void
+ create_gs_jit_types(struct draw_gs_llvm_variant *var)
+ {
+ struct gallivm_state *gallivm = var->gallivm;
+- LLVMTypeRef texture_type, sampler_type, image_type, context_type;
++ LLVMTypeRef texture_type, sampler_type, image_type;
+
+ texture_type = create_jit_texture_type(gallivm, "texture");
+ sampler_type = create_jit_sampler_type(gallivm, "sampler");
+ image_type = create_jit_image_type(gallivm, "image");
+
+- context_type = create_gs_jit_context_type(gallivm,
++ var->context_type = create_gs_jit_context_type(gallivm,
+ var->shader->base.vector_length,
+ texture_type, sampler_type,
+ image_type,
+ "draw_gs_jit_context");
+- var->context_ptr_type = LLVMPointerType(context_type, 0);
++ var->context_ptr_type = LLVMPointerType(var->context_type, 0);
+
+ var->input_array_type = create_gs_jit_input_type(gallivm);
+ }
+@@ -2850,13 +2843,13 @@ draw_gs_llvm_generate(struct draw_llvm *llvm,
+ gs_type.width = 32; /* 32-bit float */
+ gs_type.length = vector_length;
+
+- consts_ptr = draw_gs_jit_context_constants(variant->gallivm, context_ptr);
++ consts_ptr = draw_gs_jit_context_constants(variant, context_ptr);
+ num_consts_ptr =
+- draw_gs_jit_context_num_constants(variant->gallivm, context_ptr);
++ draw_gs_jit_context_num_constants(variant, context_ptr);
+
+- ssbos_ptr = draw_gs_jit_context_ssbos(variant->gallivm, context_ptr);
++ ssbos_ptr = draw_gs_jit_context_ssbos(variant, context_ptr);
+ num_ssbos_ptr =
+- draw_gs_jit_context_num_ssbos(variant->gallivm, context_ptr);
++ draw_gs_jit_context_num_ssbos(variant, context_ptr);
+
+ /* code generated texture sampling */
+ sampler = draw_llvm_sampler_soa_create(variant->key.samplers,
+@@ -2895,7 +2888,7 @@ draw_gs_llvm_generate(struct draw_llvm *llvm,
+ params.ssbo_sizes_ptr = num_ssbos_ptr;
+ params.image = image;
+ params.gs_vertex_streams = variant->shader->base.num_vertex_streams;
+- params.aniso_filter_table = draw_gs_jit_context_aniso_filter_table(gallivm, context_ptr);
++ params.aniso_filter_table = draw_gs_jit_context_aniso_filter_table(variant, context_ptr);
+
+ if (llvm->draw->gs.geometry_shader->state.type == PIPE_SHADER_IR_TGSI)
+ lp_build_tgsi_soa(variant->gallivm,
+@@ -2926,7 +2919,6 @@ draw_gs_llvm_create_variant(struct draw_llvm *llvm,
+ struct draw_gs_llvm_variant *variant;
+ struct llvm_geometry_shader *shader =
+ llvm_geometry_shader(llvm->draw->gs.geometry_shader);
+- LLVMTypeRef vertex_header;
+ char module_name[64];
+ unsigned char ir_sha1_cache_key[20];
+ struct lp_cached_code cached = { 0 };
+@@ -2963,9 +2955,8 @@ draw_gs_llvm_create_variant(struct draw_llvm *llvm,
+
+ create_gs_jit_types(variant);
+
+- vertex_header = create_jit_vertex_header(variant->gallivm, num_outputs);
+-
+- variant->vertex_header_ptr_type = LLVMPointerType(vertex_header, 0);
++ variant->vertex_header_type = create_jit_vertex_header(variant->gallivm, num_outputs);
++ variant->vertex_header_ptr_type = LLVMPointerType(variant->vertex_header_type, 0);
+
+ draw_gs_llvm_generate(llvm, variant);
+
+@@ -3083,20 +3074,20 @@ static void
+ create_tcs_jit_types(struct draw_tcs_llvm_variant *var)
+ {
+ struct gallivm_state *gallivm = var->gallivm;
+- LLVMTypeRef texture_type, sampler_type, image_type, context_type;
++ LLVMTypeRef texture_type, sampler_type, image_type;
+
+ texture_type = create_jit_texture_type(gallivm, "texture");
+ sampler_type = create_jit_sampler_type(gallivm, "sampler");
+ image_type = create_jit_image_type(gallivm, "image");
+
+- context_type = create_tcs_jit_context_type(gallivm,
++ var->context_type = create_tcs_jit_context_type(gallivm,
+ 0,
+ texture_type, sampler_type,
+ image_type,
+ "draw_tcs_jit_context");
+ var->input_array_type = create_tcs_jit_input_type(gallivm);
+ var->output_array_type = create_tcs_jit_output_type(gallivm);
+- var->context_ptr_type = LLVMPointerType(context_type, 0);
++ var->context_ptr_type = LLVMPointerType(var->context_type, 0);
+ }
+
+ static LLVMTypeRef
+@@ -3496,13 +3487,13 @@ draw_tcs_llvm_generate(struct draw_llvm *llvm,
+ patch_vertices_in = LLVMGetParam(variant_coro, 4);
+ view_index = LLVMGetParam(variant_coro, 5);
+
+- consts_ptr = draw_tcs_jit_context_constants(variant->gallivm, context_ptr);
++ consts_ptr = draw_tcs_jit_context_constants(variant, context_ptr);
+ num_consts_ptr =
+- draw_tcs_jit_context_num_constants(variant->gallivm, context_ptr);
++ draw_tcs_jit_context_num_constants(variant, context_ptr);
+
+- ssbos_ptr = draw_tcs_jit_context_ssbos(variant->gallivm, context_ptr);
++ ssbos_ptr = draw_tcs_jit_context_ssbos(variant, context_ptr);
+ num_ssbos_ptr =
+- draw_tcs_jit_context_num_ssbos(variant->gallivm, context_ptr);
++ draw_tcs_jit_context_num_ssbos(variant, context_ptr);
+ sampler = draw_llvm_sampler_soa_create(variant->key.samplers,
+ MAX2(variant->key.nr_samplers,
+ variant->key.nr_sampler_views));
+@@ -3559,7 +3550,7 @@ draw_tcs_llvm_generate(struct draw_llvm *llvm,
+ params.image = image;
+ params.coro = &coro_info;
+ params.tcs_iface = &tcs_iface.base;
+- params.aniso_filter_table = draw_tcs_jit_context_aniso_filter_table(gallivm, context_ptr);
++ params.aniso_filter_table = draw_tcs_jit_context_aniso_filter_table(variant, context_ptr);
+
+ lp_build_nir_soa(variant->gallivm,
+ llvm->draw->tcs.tess_ctrl_shader->state.ir.nir,
+@@ -3745,18 +3736,18 @@ static void
+ create_tes_jit_types(struct draw_tes_llvm_variant *var)
+ {
+ struct gallivm_state *gallivm = var->gallivm;
+- LLVMTypeRef texture_type, sampler_type, image_type, context_type;
++ LLVMTypeRef texture_type, sampler_type, image_type;
+
+ texture_type = create_jit_texture_type(gallivm, "texture");
+ sampler_type = create_jit_sampler_type(gallivm, "sampler");
+ image_type = create_jit_image_type(gallivm, "image");
+
+- context_type = create_tes_jit_context_type(gallivm,
++ var->context_type = create_tes_jit_context_type(gallivm,
+ 0,
+ texture_type, sampler_type,
+ image_type,
+ "draw_tes_jit_context");
+- var->context_ptr_type = LLVMPointerType(context_type, 0);
++ var->context_ptr_type = LLVMPointerType(var->context_type, 0);
+
+ var->input_array_deref_type = create_tes_jit_input_deref_type(gallivm);
+ var->input_array_type = LLVMPointerType(var->input_array_deref_type, 0); /* num vertices per prim */
+@@ -4013,13 +4004,13 @@ draw_tes_llvm_generate(struct draw_llvm *llvm,
+ tes_type.length = vector_length;
+
+ lp_build_context_init(&bldvec, variant->gallivm, lp_int_type(tes_type));
+- consts_ptr = draw_tes_jit_context_constants(variant->gallivm, context_ptr);
++ consts_ptr = draw_tes_jit_context_constants(variant, context_ptr);
+ num_consts_ptr =
+- draw_tes_jit_context_num_constants(variant->gallivm, context_ptr);
++ draw_tes_jit_context_num_constants(variant, context_ptr);
+
+- ssbos_ptr = draw_tes_jit_context_ssbos(variant->gallivm, context_ptr);
++ ssbos_ptr = draw_tes_jit_context_ssbos(variant, context_ptr);
+ num_ssbos_ptr =
+- draw_tes_jit_context_num_ssbos(variant->gallivm, context_ptr);
++ draw_tes_jit_context_num_ssbos(variant, context_ptr);
+ sampler = draw_llvm_sampler_soa_create(variant->key.samplers,
+ MAX2(variant->key.nr_samplers,
+ variant->key.nr_sampler_views));
+@@ -4088,7 +4079,7 @@ draw_tes_llvm_generate(struct draw_llvm *llvm,
+ params.ssbo_sizes_ptr = num_ssbos_ptr;
+ params.image = image;
+ params.tes_iface = &tes_iface.base;
+- params.aniso_filter_table = draw_tes_jit_context_aniso_filter_table(variant->gallivm, context_ptr);
++ params.aniso_filter_table = draw_tes_jit_context_aniso_filter_table(variant, context_ptr);
+
+ lp_build_nir_soa(variant->gallivm,
+ llvm->draw->tes.tess_eval_shader->state.ir.nir,
+@@ -4106,7 +4097,7 @@ draw_tes_llvm_generate(struct draw_llvm *llvm,
+ LLVMValueRef clipmask = lp_build_const_int_vec(gallivm,
+ lp_int_type(tes_type), 0);
+
+- convert_to_aos(gallivm, io, NULL, outputs, clipmask,
++ convert_to_aos(gallivm, variant->vertex_header_type, io, NULL, outputs, clipmask,
+ draw_total_tes_outputs(llvm->draw), tes_type, FALSE);
+ }
+ lp_build_loop_end_cond(&lp_loop, num_tess_coord, step, LLVMIntUGE);
+diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h
+index 50525cbd25b05..3e1946a3144f3 100644
+--- a/src/gallium/auxiliary/draw/draw_llvm.h
++++ b/src/gallium/auxiliary/draw/draw_llvm.h
+@@ -188,17 +188,17 @@ enum {
+ DRAW_JIT_CTX_NUM_FIELDS
+ };
+
+-#define draw_jit_context_vs_constants(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_CTX_CONSTANTS, "vs_constants")
++#define draw_jit_context_vs_constants(_variant, _ptr) \
++ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_JIT_CTX_CONSTANTS, "vs_constants")
+
+-#define draw_jit_context_num_vs_constants(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_CTX_NUM_CONSTANTS, "num_vs_constants")
++#define draw_jit_context_num_vs_constants(_variant, _ptr) \
++ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_JIT_CTX_NUM_CONSTANTS, "num_vs_constants")
+
+-#define draw_jit_context_planes(_gallivm, _ptr) \
+- lp_build_struct_get(_gallivm, _ptr, DRAW_JIT_CTX_PLANES, "planes")
++#define draw_jit_context_planes(_gallivm, _type, _ptr) \
++ lp_build_struct_get2(_gallivm, _type, _ptr, DRAW_JIT_CTX_PLANES, "planes")
+
+-#define draw_jit_context_viewports(_gallivm, _ptr) \
+- lp_build_struct_get(_gallivm, _ptr, DRAW_JIT_CTX_VIEWPORT, "viewports")
++#define draw_jit_context_viewports(_variant, _ptr) \
++ lp_build_struct_get2(_variant->gallivm, _variant->context_type, _ptr, DRAW_JIT_CTX_VIEWPORT, "viewports")
+
+ #define draw_jit_context_textures(_gallivm, _ptr) \
+ lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_CTX_TEXTURES, "textures")
+@@ -209,31 +209,31 @@ enum {
+ #define draw_jit_context_images(_gallivm, _ptr) \
+ lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_CTX_IMAGES, "images")
+
+-#define draw_jit_context_vs_ssbos(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_CTX_SSBOS, "vs_ssbos")
++#define draw_jit_context_vs_ssbos(_variant, _ptr) \
++ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_JIT_CTX_SSBOS, "vs_ssbos")
+
+-#define draw_jit_context_num_vs_ssbos(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_CTX_NUM_SSBOS, "num_vs_ssbos")
++#define draw_jit_context_num_vs_ssbos(_variant, _ptr) \
++ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_JIT_CTX_NUM_SSBOS, "num_vs_ssbos")
+
+-#define draw_jit_context_aniso_filter_table(_gallivm, _ptr) \
+- lp_build_struct_get(_gallivm, _ptr, DRAW_JIT_CTX_ANISO_FILTER_TABLE, "aniso_filter_table")
++#define draw_jit_context_aniso_filter_table(_variant, _ptr) \
++ lp_build_struct_get2(_variant->gallivm, _variant->context_type, _ptr, DRAW_JIT_CTX_ANISO_FILTER_TABLE, "aniso_filter_table")
+
+
+-#define draw_jit_header_id(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_VERTEX_VERTEX_ID, "id")
++#define draw_jit_header_id(_gallivm, _type, _ptr) \
++ lp_build_struct_get_ptr2(_gallivm, _type, _ptr, DRAW_JIT_VERTEX_VERTEX_ID, "id")
+
+-#define draw_jit_header_clip_pos(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_VERTEX_CLIP_POS, "clip_pos")
++#define draw_jit_header_clip_pos(_gallivm, _type, _ptr) \
++ lp_build_struct_get_ptr2(_gallivm, _type, _ptr, DRAW_JIT_VERTEX_CLIP_POS, "clip_pos")
+
+-#define draw_jit_header_data(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_VERTEX_DATA, "data")
++#define draw_jit_header_data(_gallivm, _type, _ptr) \
++ lp_build_struct_get_ptr2(_gallivm, _type, _ptr, DRAW_JIT_VERTEX_DATA, "data")
+
+
+-#define draw_jit_vbuffer_stride(_gallivm, _ptr) \
+- lp_build_struct_get(_gallivm, _ptr, 0, "stride")
++#define draw_jit_vbuffer_stride(_gallivm, _type, _ptr) \
++ lp_build_struct_get2(_gallivm, _type, _ptr, 0, "stride")
+
+-#define draw_jit_vbuffer_offset(_gallivm, _ptr) \
+- lp_build_struct_get(_gallivm, _ptr, 2, "buffer_offset")
++#define draw_jit_vbuffer_offset(_gallivm, _type, _ptr) \
++ lp_build_struct_get2(_gallivm, _type, _ptr, 2, "buffer_offset")
+
+ enum {
+ DRAW_JIT_DVBUFFER_MAP = 0,
+@@ -241,11 +241,11 @@ enum {
+ DRAW_JIT_DVBUFFER_NUM_FIELDS /* number of fields above */
+ };
+
+-#define draw_jit_dvbuffer_map(_gallivm, _ptr) \
+- lp_build_struct_get(_gallivm, _ptr, DRAW_JIT_DVBUFFER_MAP, "map")
++#define draw_jit_dvbuffer_map(_gallivm, _type, _ptr) \
++ lp_build_struct_get2(_gallivm, _type, _ptr, DRAW_JIT_DVBUFFER_MAP, "map")
+
+-#define draw_jit_dvbuffer_size(_gallivm, _ptr) \
+- lp_build_struct_get(_gallivm, _ptr, DRAW_JIT_DVBUFFER_SIZE, "size")
++#define draw_jit_dvbuffer_size(_gallivm, _type, _ptr) \
++ lp_build_struct_get2(_gallivm, _type, _ptr, DRAW_JIT_DVBUFFER_SIZE, "size")
+
+
+ /**
+@@ -302,11 +302,11 @@ enum {
+ DRAW_GS_JIT_CTX_NUM_FIELDS = 13
+ };
+
+-#define draw_gs_jit_context_constants(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_GS_JIT_CTX_CONSTANTS, "constants")
++#define draw_gs_jit_context_constants(_variant, _ptr) \
++ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_GS_JIT_CTX_CONSTANTS, "constants")
+
+-#define draw_gs_jit_context_num_constants(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_GS_JIT_CTX_NUM_CONSTANTS, "num_constants")
++#define draw_gs_jit_context_num_constants(_variant, _ptr) \
++ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_GS_JIT_CTX_NUM_CONSTANTS, "num_constants")
+
+ #define draw_gs_jit_context_planes(_gallivm, _ptr) \
+ lp_build_struct_get(_gallivm, _ptr, DRAW_GS_JIT_CTX_PLANES, "planes")
+@@ -323,23 +323,23 @@ enum {
+ #define draw_gs_jit_context_images(_gallivm, _ptr) \
+ lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_GS_JIT_CTX_IMAGES, "images")
+
+-#define draw_gs_jit_prim_lengths(_gallivm, _ptr) \
+- lp_build_struct_get(_gallivm, _ptr, DRAW_GS_JIT_CTX_PRIM_LENGTHS, "prim_lengths")
++#define draw_gs_jit_prim_lengths(_variant, _ptr) \
++ lp_build_struct_get2(_variant->gallivm, _variant->context_type, _ptr, DRAW_GS_JIT_CTX_PRIM_LENGTHS, "prim_lengths")
+
+-#define draw_gs_jit_emitted_vertices(_gallivm, _ptr) \
+- lp_build_struct_get(_gallivm, _ptr, DRAW_GS_JIT_CTX_EMITTED_VERTICES, "emitted_vertices")
++#define draw_gs_jit_emitted_vertices(_variant, _ptr) \
++ lp_build_struct_get2(_variant->gallivm, _variant->context_type, _ptr, DRAW_GS_JIT_CTX_EMITTED_VERTICES, "emitted_vertices")
+
+-#define draw_gs_jit_emitted_prims(_gallivm, _ptr) \
+- lp_build_struct_get(_gallivm, _ptr, DRAW_GS_JIT_CTX_EMITTED_PRIMS, "emitted_prims")
++#define draw_gs_jit_emitted_prims(_variant, _ptr) \
++ lp_build_struct_get2(_variant->gallivm, _variant->context_type, _ptr, DRAW_GS_JIT_CTX_EMITTED_PRIMS, "emitted_prims")
+
+-#define draw_gs_jit_context_ssbos(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_GS_JIT_CTX_SSBOS, "ssbos")
++#define draw_gs_jit_context_ssbos(_variant, _ptr) \
++ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_GS_JIT_CTX_SSBOS, "ssbos")
+
+-#define draw_gs_jit_context_num_ssbos(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_GS_JIT_CTX_NUM_SSBOS, "num_ssbos")
++#define draw_gs_jit_context_num_ssbos(_variant, _ptr) \
++ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_GS_JIT_CTX_NUM_SSBOS, "num_ssbos")
+
+-#define draw_gs_jit_context_aniso_filter_table(_gallivm, _ptr) \
+- lp_build_struct_get(_gallivm, _ptr, DRAW_GS_JIT_CTX_ANISO_FILTER_TABLE, "aniso_filter_table")
++#define draw_gs_jit_context_aniso_filter_table(_variant, _ptr) \
++ lp_build_struct_get2(_variant->gallivm, _variant->context_type, _ptr, DRAW_GS_JIT_CTX_ANISO_FILTER_TABLE, "aniso_filter_table")
+
+ struct draw_tcs_jit_context {
+ const float *constants[LP_MAX_TGSI_CONST_BUFFERS];
+@@ -371,11 +371,11 @@ enum {
+ DRAW_TCS_JIT_CTX_NUM_FIELDS = 10,
+ };
+
+-#define draw_tcs_jit_context_constants(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TCS_JIT_CTX_CONSTANTS, "constants")
++#define draw_tcs_jit_context_constants(_variant, _ptr) \
++ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_TCS_JIT_CTX_CONSTANTS, "constants")
+
+-#define draw_tcs_jit_context_num_constants(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TCS_JIT_CTX_NUM_CONSTANTS, "num_constants")
++#define draw_tcs_jit_context_num_constants(_variant, _ptr) \
++ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_TCS_JIT_CTX_NUM_CONSTANTS, "num_constants")
+
+ #define draw_tcs_jit_context_textures(_gallivm, _ptr) \
+ lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TCS_JIT_CTX_TEXTURES, "textures")
+@@ -386,14 +386,14 @@ enum {
+ #define draw_tcs_jit_context_images(_gallivm, _ptr) \
+ lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TCS_JIT_CTX_IMAGES, "images")
+
+-#define draw_tcs_jit_context_ssbos(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TCS_JIT_CTX_SSBOS, "ssbos")
++#define draw_tcs_jit_context_ssbos(_variant, _ptr) \
++ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_TCS_JIT_CTX_SSBOS, "ssbos")
+
+-#define draw_tcs_jit_context_num_ssbos(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TCS_JIT_CTX_NUM_SSBOS, "num_ssbos")
++#define draw_tcs_jit_context_num_ssbos(_variant, _ptr) \
++ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_TCS_JIT_CTX_NUM_SSBOS, "num_ssbos")
+
+-#define draw_tcs_jit_context_aniso_filter_table(_gallivm, _ptr) \
+- lp_build_struct_get(_gallivm, _ptr, DRAW_TCS_JIT_CTX_ANISO_FILTER_TABLE, "aniso_filter_table")
++#define draw_tcs_jit_context_aniso_filter_table(_variant, _ptr) \
++ lp_build_struct_get2(_variant->gallivm, _variant->context_type, _ptr, DRAW_TCS_JIT_CTX_ANISO_FILTER_TABLE, "aniso_filter_table")
+
+ struct draw_tes_jit_context {
+ const float *constants[LP_MAX_TGSI_CONST_BUFFERS];
+@@ -425,11 +425,11 @@ enum {
+ DRAW_TES_JIT_CTX_NUM_FIELDS = 10,
+ };
+
+-#define draw_tes_jit_context_constants(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TES_JIT_CTX_CONSTANTS, "constants")
++#define draw_tes_jit_context_constants(_variant, _ptr) \
++ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_TES_JIT_CTX_CONSTANTS, "constants")
+
+-#define draw_tes_jit_context_num_constants(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TES_JIT_CTX_NUM_CONSTANTS, "num_constants")
++#define draw_tes_jit_context_num_constants(_variant, _ptr) \
++ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_TES_JIT_CTX_NUM_CONSTANTS, "num_constants")
+
+ #define draw_tes_jit_context_textures(_gallivm, _ptr) \
+ lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TES_JIT_CTX_TEXTURES, "textures")
+@@ -440,14 +440,14 @@ enum {
+ #define draw_tes_jit_context_images(_gallivm, _ptr) \
+ lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TES_JIT_CTX_IMAGES, "images")
+
+-#define draw_tes_jit_context_ssbos(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TES_JIT_CTX_SSBOS, "ssbos")
++#define draw_tes_jit_context_ssbos(_variant, _ptr) \
++ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_TES_JIT_CTX_SSBOS, "ssbos")
+
+-#define draw_tes_jit_context_num_ssbos(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TES_JIT_CTX_NUM_SSBOS, "num_ssbos")
++#define draw_tes_jit_context_num_ssbos(_variant, _ptr) \
++ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_TES_JIT_CTX_NUM_SSBOS, "num_ssbos")
+
+-#define draw_tes_jit_context_aniso_filter_table(_gallivm, _ptr) \
+- lp_build_struct_get(_gallivm, _ptr, DRAW_TES_JIT_CTX_ANISO_FILTER_TABLE, "aniso_filter_table")
++#define draw_tes_jit_context_aniso_filter_table(_variant, _ptr) \
++ lp_build_struct_get2(_variant->gallivm, _variant->context_type, _ptr, DRAW_TES_JIT_CTX_ANISO_FILTER_TABLE, "aniso_filter_table")
+
+ typedef boolean
+ (*draw_jit_vert_func)(struct draw_jit_context *context,
+@@ -688,14 +688,17 @@ struct draw_llvm_variant
+ struct gallivm_state *gallivm;
+
+ /* LLVM JIT builder types */
++ LLVMTypeRef context_type;
+ LLVMTypeRef context_ptr_type;
+- LLVMTypeRef buffer_ptr_type;
+- LLVMTypeRef vb_ptr_type;
+- LLVMTypeRef vertex_header_ptr_type;
+
+ LLVMTypeRef buffer_type;
++ LLVMTypeRef buffer_ptr_type;
++
+ LLVMTypeRef vb_type;
++ LLVMTypeRef vb_ptr_type;
++
+ LLVMTypeRef vertex_header_type;
++ LLVMTypeRef vertex_header_ptr_type;
+
+ LLVMValueRef function;
+ draw_jit_vert_func jit_func;
+@@ -716,8 +719,12 @@ struct draw_gs_llvm_variant
+ struct gallivm_state *gallivm;
+
+ /* LLVM JIT builder types */
++ LLVMTypeRef context_type;
+ LLVMTypeRef context_ptr_type;
++
++ LLVMTypeRef vertex_header_type;
+ LLVMTypeRef vertex_header_ptr_type;
++
+ LLVMTypeRef input_array_type;
+
+ LLVMValueRef context_ptr;
+@@ -741,12 +748,13 @@ struct draw_tcs_llvm_variant
+ struct gallivm_state *gallivm;
+
+ /* LLVM JIT builder types */
++ LLVMTypeRef context_type;
+ LLVMTypeRef context_ptr_type;
+ LLVMTypeRef input_array_type;
+ LLVMTypeRef output_array_type;
+
+ LLVMValueRef context_ptr;
+- LLVMValueRef io_ptr;
++ /* LLVMValueRef io_ptr; */
+ LLVMValueRef num_prims;
+ LLVMValueRef function;
+ draw_tcs_jit_func jit_func;
+@@ -766,6 +774,7 @@ struct draw_tes_llvm_variant
+ struct gallivm_state *gallivm;
+
+ /* LLVM JIT builder types */
++ LLVMTypeRef context_type;
+ LLVMTypeRef context_ptr_type;
+ LLVMTypeRef vertex_header_ptr_type;
+ LLVMTypeRef input_array_type;
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_struct.c b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+index bd969d4681ae6..1007090410412 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_struct.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+@@ -51,7 +51,12 @@ lp_build_struct_get_ptr(struct gallivm_state *gallivm,
+ LLVMValueRef indices[2];
+ LLVMValueRef member_ptr;
+ assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
++
++ /* Starting with LLVM 15, we're not supposed to look at pointer element type anymore. */
++#if LLVM_VERSION_MAJOR < 15
+ assert(LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMStructTypeKind);
++#endif
++
+ indices[0] = lp_build_const_int32(gallivm, 0);
+ indices[1] = lp_build_const_int32(gallivm, member);
+ member_ptr = LLVMBuildGEP(gallivm->builder, ptr, indices, ARRAY_SIZE(indices), "");
+@@ -59,7 +64,6 @@ lp_build_struct_get_ptr(struct gallivm_state *gallivm,
+ return member_ptr;
+ }
+
+-
+ LLVMValueRef
+ lp_build_struct_get(struct gallivm_state *gallivm,
+ LLVMValueRef ptr,
+@@ -69,13 +73,56 @@ lp_build_struct_get(struct gallivm_state *gallivm,
+ LLVMValueRef member_ptr;
+ LLVMValueRef res;
+ assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
++#if LLVM_VERSION_MAJOR < 15
+ assert(LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMStructTypeKind);
++#endif
+ member_ptr = lp_build_struct_get_ptr(gallivm, ptr, member, name);
+ res = LLVMBuildLoad(gallivm->builder, member_ptr, "");
+ lp_build_name(res, "%s.%s", LLVMGetValueName(ptr), name);
+ return res;
+ }
+
++LLVMValueRef
++lp_build_struct_get_ptr2(struct gallivm_state *gallivm,
++ LLVMTypeRef ptr_type,
++ LLVMValueRef ptr,
++ unsigned member,
++ const char *name)
++{
++ LLVMValueRef indices[2];
++ LLVMValueRef member_ptr;
++ assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
++
++ /* Starting with LLVM 15, we're not supposed to look at pointer element type anymore. */
++#if LLVM_VERSION_MAJOR < 15
++ assert(LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMStructTypeKind);
++#endif
++
++ indices[0] = lp_build_const_int32(gallivm, 0);
++ indices[1] = lp_build_const_int32(gallivm, member);
++ member_ptr = LLVMBuildGEP2(gallivm->builder, ptr_type, ptr, indices, ARRAY_SIZE(indices), "");
++ lp_build_name(member_ptr, "%s.%s_ptr", LLVMGetValueName(ptr), name);
++ return member_ptr;
++}
++
++LLVMValueRef
++lp_build_struct_get2(struct gallivm_state *gallivm,
++ LLVMTypeRef ptr_type,
++ LLVMValueRef ptr,
++ unsigned member,
++ const char *name)
++{
++ LLVMValueRef member_ptr;
++ LLVMValueRef res;
++ assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
++#if LLVM_VERSION_MAJOR < 15
++ assert(LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMStructTypeKind);
++#endif
++ member_ptr = lp_build_struct_get_ptr2(gallivm, ptr_type, ptr, member, name);
++ res = LLVMBuildLoad(gallivm->builder, member_ptr, "");
++ lp_build_name(res, "%s.%s", LLVMGetValueName(ptr), name);
++ return res;
++}
+
+ LLVMValueRef
+ lp_build_array_get_ptr(struct gallivm_state *gallivm,
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_struct.h b/src/gallium/auxiliary/gallivm/lp_bld_struct.h
+index 6b7b4f2a6bf7d..a87519883b4df 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_struct.h
++++ b/src/gallium/auxiliary/gallivm/lp_bld_struct.h
+@@ -71,6 +71,28 @@ lp_build_struct_get(struct gallivm_state *gallivm,
+ unsigned member,
+ const char *name);
+
++/**
++ * Get value pointer to a structure member.
++ * This takes the explicit LLVM type of ptr, as required by LLVM-15 opaque-pointers.
++ */
++LLVMValueRef
++lp_build_struct_get_ptr2(struct gallivm_state *gallivm,
++ LLVMTypeRef ptr_type,
++ LLVMValueRef ptr,
++ unsigned member,
++ const char *name);
++
++/**
++ * Get the value of a structure member.
++ * This takes the explicit LLVM type of ptr, as required by LLVM-15 opaque-pointers.
++ */
++LLVMValueRef
++lp_build_struct_get2(struct gallivm_state *gallivm,
++ LLVMTypeRef ptr_type,
++ LLVMValueRef ptr,
++ unsigned member,
++ const char *name);
++
+ /**
+ * Get value pointer to an array element.
+ */
+--
+GitLab
+
+
+From da9feae7355c15d489b916340ea2b62f9f8c0a7c Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Sat, 23 Jul 2022 08:45:55 +0300
+Subject: [PATCH 4/4] gallivm: push LLVM version guard into assert
+
+The asserts that check the pointer element type can't be used on LLVM >= 15.
+Instead of using precompiler #if, use boolean shortcut in assert.
+
+Reviewed-by: Brian Paul <brianp@vmware.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17650>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_struct.c | 20 ++++---------------
+ 1 file changed, 4 insertions(+), 16 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_struct.c b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+index 1007090410412..be579c4ee25d7 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_struct.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+@@ -51,11 +51,7 @@ lp_build_struct_get_ptr(struct gallivm_state *gallivm,
+ LLVMValueRef indices[2];
+ LLVMValueRef member_ptr;
+ assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
+-
+- /* Starting with LLVM 15, we're not supposed to look at pointer element type anymore. */
+-#if LLVM_VERSION_MAJOR < 15
+- assert(LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMStructTypeKind);
+-#endif
++ assert(LLVM_VERSION_MAJOR >= 15 || LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMStructTypeKind);
+
+ indices[0] = lp_build_const_int32(gallivm, 0);
+ indices[1] = lp_build_const_int32(gallivm, member);
+@@ -73,9 +69,7 @@ lp_build_struct_get(struct gallivm_state *gallivm,
+ LLVMValueRef member_ptr;
+ LLVMValueRef res;
+ assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
+-#if LLVM_VERSION_MAJOR < 15
+- assert(LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMStructTypeKind);
+-#endif
++ assert(LLVM_VERSION_MAJOR >= 15 || LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMStructTypeKind);
+ member_ptr = lp_build_struct_get_ptr(gallivm, ptr, member, name);
+ res = LLVMBuildLoad(gallivm->builder, member_ptr, "");
+ lp_build_name(res, "%s.%s", LLVMGetValueName(ptr), name);
+@@ -92,11 +86,7 @@ lp_build_struct_get_ptr2(struct gallivm_state *gallivm,
+ LLVMValueRef indices[2];
+ LLVMValueRef member_ptr;
+ assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
+-
+- /* Starting with LLVM 15, we're not supposed to look at pointer element type anymore. */
+-#if LLVM_VERSION_MAJOR < 15
+- assert(LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMStructTypeKind);
+-#endif
++ assert(LLVM_VERSION_MAJOR >= 15 || LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMStructTypeKind);
+
+ indices[0] = lp_build_const_int32(gallivm, 0);
+ indices[1] = lp_build_const_int32(gallivm, member);
+@@ -115,9 +105,7 @@ lp_build_struct_get2(struct gallivm_state *gallivm,
+ LLVMValueRef member_ptr;
+ LLVMValueRef res;
+ assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
+-#if LLVM_VERSION_MAJOR < 15
+- assert(LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMStructTypeKind);
+-#endif
++ assert(LLVM_VERSION_MAJOR >= 15 || LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMStructTypeKind);
+ member_ptr = lp_build_struct_get_ptr2(gallivm, ptr_type, ptr, member, name);
+ res = LLVMBuildLoad(gallivm->builder, member_ptr, "");
+ lp_build_name(res, "%s.%s", LLVMGetValueName(ptr), name);
+--
+GitLab
+
+From adf28955162007af80989b65df641b3c7ae6f78c Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Fri, 19 Aug 2022 11:56:35 +0300
+Subject: [PATCH 1/9] gallivm: LLVM-15 opaque pointers: disable
+ LLVMGetElementType(ptr_type)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+with opaque pointers, we can't query the element type of a pointer type
+
+Reviewed-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_ir_common.c | 5 +++--
+ src/gallium/auxiliary/gallivm/lp_bld_struct.c | 6 +++---
+ src/gallium/auxiliary/gallivm/lp_bld_swizzle.c | 2 +-
+ 3 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c b/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c
+index d127ea0c7ff84..042cd5c814f27 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c
+@@ -209,8 +209,9 @@ void lp_exec_mask_store(struct lp_exec_mask *mask,
+
+ assert(lp_check_value(bld_store->type, val));
+ assert(LLVMGetTypeKind(LLVMTypeOf(dst_ptr)) == LLVMPointerTypeKind);
+- assert(LLVMGetElementType(LLVMTypeOf(dst_ptr)) == LLVMTypeOf(val) ||
+- LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(dst_ptr))) == LLVMArrayTypeKind);
++ assert(LLVM_VERSION_MAJOR >= 15
++ || (LLVMGetElementType(LLVMTypeOf(dst_ptr)) == LLVMTypeOf(val)
++ || LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(dst_ptr))) == LLVMArrayTypeKind));
+
+ if (exec_mask) {
+ LLVMValueRef res, dst;
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_struct.c b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+index be579c4ee25d7..9e3e24cd9e1e7 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_struct.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+@@ -120,7 +120,7 @@ lp_build_array_get_ptr(struct gallivm_state *gallivm,
+ LLVMValueRef indices[2];
+ LLVMValueRef element_ptr;
+ assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
+- assert(LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMArrayTypeKind);
++ assert(LLVM_VERSION_MAJOR >= 15 || LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMArrayTypeKind);
+ indices[0] = lp_build_const_int32(gallivm, 0);
+ indices[1] = index;
+ element_ptr = LLVMBuildGEP(gallivm->builder, ptr, indices, ARRAY_SIZE(indices), "");
+@@ -140,7 +140,7 @@ lp_build_array_get(struct gallivm_state *gallivm,
+ LLVMValueRef element_ptr;
+ LLVMValueRef res;
+ assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
+- assert(LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMArrayTypeKind);
++ assert(LLVM_VERSION_MAJOR >= 15 || LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMArrayTypeKind);
+ element_ptr = lp_build_array_get_ptr(gallivm, ptr, index);
+ res = LLVMBuildLoad(gallivm->builder, element_ptr, "");
+ #ifdef DEBUG
+@@ -158,7 +158,7 @@ lp_build_array_set(struct gallivm_state *gallivm,
+ {
+ LLVMValueRef element_ptr;
+ assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
+- assert(LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMArrayTypeKind);
++ assert(LLVM_VERSION_MAJOR >= 15 || LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMArrayTypeKind);
+ element_ptr = lp_build_array_get_ptr(gallivm, ptr, index);
+ LLVMBuildStore(gallivm->builder, value, element_ptr);
+ }
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
+index b23c4cbbf02be..904eaa034d6cb 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c
+@@ -63,7 +63,7 @@ lp_build_broadcast(struct gallivm_state *gallivm,
+ LLVMTypeRef i32_type = LLVMInt32TypeInContext(gallivm->context);
+ LLVMTypeRef i32_vec_type = LLVMVectorType(i32_type, length);
+
+- assert(LLVMGetElementType(vec_type) == LLVMTypeOf(scalar));
++ assert(LLVM_VERSION_MAJOR >= 15 || LLVMGetElementType(vec_type) == LLVMTypeOf(scalar));
+
+ res = LLVMBuildInsertElement(builder, undef, scalar, LLVMConstNull(i32_type), "");
+ res = LLVMBuildShuffleVector(builder, res, undef, LLVMConstNull(i32_vec_type), "");
+--
+GitLab
+
+
+From 3668ebf8bd42bd9c9c9a7b8b5d4537198e5a2b4c Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Tue, 16 Aug 2022 09:44:53 +0300
+Subject: [PATCH 2/9] gallivm: drop unused "emit_load" in
+ lp_llvm_buffer_member()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reviewed-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_jit_types.c | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c b/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c
+index 6e6c63db9f39b..c4bfa2be899ce 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c
+@@ -60,8 +60,7 @@ lp_llvm_buffer_member(struct gallivm_state *gallivm,
+ LLVMValueRef buffers_offset,
+ unsigned buffers_limit,
+ unsigned member_index,
+- const char *member_name,
+- boolean emit_load)
++ const char *member_name)
+ {
+ LLVMBuilderRef builder = gallivm->builder;
+ LLVMValueRef indices[3];
+@@ -74,7 +73,7 @@ lp_llvm_buffer_member(struct gallivm_state *gallivm,
+ LLVMValueRef ptr =
+ LLVMBuildGEP(builder, buffers_ptr, indices, ARRAY_SIZE(indices), "");
+
+- LLVMValueRef res = emit_load ? LLVMBuildLoad(builder, ptr, "") : ptr;
++ LLVMValueRef res = LLVMBuildLoad(builder, ptr, "");
+
+ lp_build_name(res, "buffer.%s", member_name);
+
+@@ -90,7 +89,7 @@ lp_llvm_buffer_member(struct gallivm_state *gallivm,
+ * sampler code generator a reusable module without dependencies to
+ * llvmpipe internals.
+ */
+-#define LP_LLVM_BUFFER_MEMBER(_name, _index, _emit_load) \
++#define LP_LLVM_BUFFER_MEMBER(_name, _index) \
+ LLVMValueRef \
+ lp_llvm_buffer_##_name(struct gallivm_state *gallivm, \
+ LLVMValueRef buffers_ptr, \
+@@ -98,8 +97,8 @@ lp_llvm_buffer_member(struct gallivm_state *gallivm,
+ { \
+ return lp_llvm_buffer_member(gallivm, buffers_ptr, \
+ buffers_offset, buffers_limit, \
+- _index, #_name, _emit_load ); \
++ _index, #_name); \
+ }
+
+-LP_LLVM_BUFFER_MEMBER(base, LP_JIT_BUFFER_BASE, TRUE)
+-LP_LLVM_BUFFER_MEMBER(num_elements, LP_JIT_BUFFER_NUM_ELEMENTS, TRUE)
++LP_LLVM_BUFFER_MEMBER(base, LP_JIT_BUFFER_BASE)
++LP_LLVM_BUFFER_MEMBER(num_elements, LP_JIT_BUFFER_NUM_ELEMENTS)
+--
+GitLab
+
+
+From 49c6e2fd70aa2db61e784e41f263c19625ca67ba Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Tue, 16 Aug 2022 11:11:24 +0300
+Subject: [PATCH 3/9] gallium: drop unused macros in draw_llvm.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The reason is that these macros use lp_build_struct_get(), which is
+being replaced by lp_build_structure_get2() which takes the explicit
+pointer type. Rather than attempt to update these unused macros, simply drop
+them.
+
+Reviewed-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
+---
+ src/gallium/auxiliary/draw/draw_llvm.h | 42 --------------------------
+ 1 file changed, 42 deletions(-)
+
+diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h
+index 37052db3175ba..941591ac7fb7a 100644
+--- a/src/gallium/auxiliary/draw/draw_llvm.h
++++ b/src/gallium/auxiliary/draw/draw_llvm.h
+@@ -194,15 +194,6 @@ enum {
+ #define draw_jit_context_viewports(_variant, _ptr) \
+ lp_build_struct_get2(_variant->gallivm, _variant->context_type, _ptr, DRAW_JIT_CTX_VIEWPORT, "viewports")
+
+-#define draw_jit_context_textures(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_CTX_TEXTURES, "textures")
+-
+-#define draw_jit_context_samplers(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_CTX_SAMPLERS, "samplers")
+-
+-#define draw_jit_context_images(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_CTX_IMAGES, "images")
+-
+ #define draw_jit_context_ssbos(_variant, _ptr) \
+ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_JIT_CTX_SSBOS, "ssbos")
+
+@@ -292,21 +283,6 @@ enum {
+ #define draw_gs_jit_context_constants(_variant, _ptr) \
+ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_GS_JIT_CTX_CONSTANTS, "constants")
+
+-#define draw_gs_jit_context_planes(_gallivm, _ptr) \
+- lp_build_struct_get(_gallivm, _ptr, DRAW_GS_JIT_CTX_PLANES, "planes")
+-
+-#define draw_gs_jit_context_viewports(_gallivm, _ptr) \
+- lp_build_struct_get(_gallivm, _ptr, DRAW_GS_JIT_CTX_VIEWPORT, "viewports")
+-
+-#define draw_gs_jit_context_textures(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_GS_JIT_CTX_TEXTURES, "textures")
+-
+-#define draw_gs_jit_context_samplers(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_GS_JIT_CTX_SAMPLERS, "samplers")
+-
+-#define draw_gs_jit_context_images(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_GS_JIT_CTX_IMAGES, "images")
+-
+ #define draw_gs_jit_prim_lengths(_variant, _ptr) \
+ lp_build_struct_get2(_variant->gallivm, _variant->context_type, _ptr, DRAW_GS_JIT_CTX_PRIM_LENGTHS, "prim_lengths")
+
+@@ -353,15 +329,6 @@ enum {
+ #define draw_tcs_jit_context_constants(_variant, _ptr) \
+ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_TCS_JIT_CTX_CONSTANTS, "constants")
+
+-#define draw_tcs_jit_context_textures(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TCS_JIT_CTX_TEXTURES, "textures")
+-
+-#define draw_tcs_jit_context_samplers(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TCS_JIT_CTX_SAMPLERS, "samplers")
+-
+-#define draw_tcs_jit_context_images(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TCS_JIT_CTX_IMAGES, "images")
+-
+ #define draw_tcs_jit_context_ssbos(_variant, _ptr) \
+ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_TCS_JIT_CTX_SSBOS, "ssbos")
+
+@@ -399,15 +366,6 @@ enum {
+ #define draw_tes_jit_context_constants(_variant, _ptr) \
+ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_TES_JIT_CTX_CONSTANTS, "constants")
+
+-#define draw_tes_jit_context_textures(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TES_JIT_CTX_TEXTURES, "textures")
+-
+-#define draw_tes_jit_context_samplers(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TES_JIT_CTX_SAMPLERS, "samplers")
+-
+-#define draw_tes_jit_context_images(_gallivm, _ptr) \
+- lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_TES_JIT_CTX_IMAGES, "images")
+-
+ #define draw_tes_jit_context_ssbos(_variant, _ptr) \
+ lp_build_struct_get_ptr2(_variant->gallivm, _variant->context_type, _ptr, DRAW_TES_JIT_CTX_SSBOS, "ssbos")
+
+--
+GitLab
+
+
+From 8289ac87a404ff95759ec2a12012c1eae20419e6 Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Tue, 26 Jul 2022 15:43:30 +0300
+Subject: [PATCH 4/9] gallivm: fixes for LLVM-15 opaque pointers in
+ lp_bld_nir_aos.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reviewed-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_nir_aos.c | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_aos.c
+index c449b5de46c77..226bb5e75cf0f 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_nir_aos.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_aos.c
+@@ -172,7 +172,7 @@ emit_load_reg(struct lp_build_nir_context *bld_base,
+ LLVMValueRef reg_storage)
+ {
+ struct gallivm_state *gallivm = bld_base->base.gallivm;
+- return LLVMBuildLoad(gallivm->builder, reg_storage, "");
++ return LLVMBuildLoad2(gallivm->builder, reg_bld->vec_type, reg_storage, "");
+ }
+
+
+@@ -195,7 +195,7 @@ emit_store_reg(struct lp_build_nir_context *bld_base,
+ return;
+ }
+
+- LLVMValueRef cur = LLVMBuildLoad(gallivm->builder, reg_storage, "");
++ LLVMValueRef cur = LLVMBuildLoad2(gallivm->builder, reg_bld->vec_type, reg_storage, "");
+ LLVMTypeRef i32t = LLVMInt32TypeInContext(gallivm->context);
+ LLVMValueRef shuffles[LP_MAX_VECTOR_LENGTH];
+ for (unsigned j = 0; j < 16; j++) {
+@@ -238,10 +238,9 @@ emit_load_ubo(struct lp_build_nir_context *bld_base,
+ LLVMValueRef this_offset = lp_build_const_int32(gallivm,
+ offset_val + chan);
+
+- LLVMValueRef scalar_ptr = LLVMBuildGEP(builder, bld->consts_ptr,
+- &this_offset, 1, "");
+-
+- LLVMValueRef scalar = LLVMBuildLoad(builder, scalar_ptr, "");
++ LLVMTypeRef scalar_type = LLVMInt8TypeInContext(gallivm->context);
++ LLVMValueRef scalar_ptr = LLVMBuildGEP2(builder, scalar_type, bld->consts_ptr, &this_offset, 1, "");
++ LLVMValueRef scalar = LLVMBuildLoad2(builder, scalar_type, scalar_ptr, "");
+
+ lp_build_name(scalar, "const[%u].%c", offset_val, "xyzw"[chan]);
+
+--
+GitLab
+
+
+From f30251ef9bf20274d49848d614c8bf407bec353b Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Tue, 26 Jul 2022 16:02:52 +0300
+Subject: [PATCH 5/9] gallivm: fixes for LLVM-15 opaque pointers in
+ lp_bld_nir_soa.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reviewed-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
+---
+ .../auxiliary/gallivm/lp_bld_nir_soa.c | 30 +++++++++----------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
+index 94dcace50e33f..90836928adee1 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
+@@ -223,6 +223,7 @@ get_soa_array_offsets(struct lp_build_context *uint_bld,
+ static LLVMValueRef
+ build_gather(struct lp_build_nir_context *bld_base,
+ struct lp_build_context *bld,
++ LLVMTypeRef base_type,
+ LLVMValueRef base_ptr,
+ LLVMValueRef indexes,
+ LLVMValueRef overflow_mask,
+@@ -284,8 +285,8 @@ build_gather(struct lp_build_nir_context *bld_base,
+ indexes, si, "");
+ }
+
+- scalar_ptr = LLVMBuildGEP(builder, base_ptr, &index, 1, "gather_ptr");
+- scalar = LLVMBuildLoad(builder, scalar_ptr, "");
++ scalar_ptr = LLVMBuildGEP2(builder, base_type, base_ptr, &index, 1, "gather_ptr");
++ scalar = LLVMBuildLoad2(builder, base_type, scalar_ptr, "");
+
+ res = LLVMBuildInsertElement(builder, res, scalar, di, "");
+ }
+@@ -326,7 +327,7 @@ emit_mask_scatter(struct lp_build_nir_soa_context *bld,
+ LLVMValueRef ii = lp_build_const_int32(gallivm, i);
+ LLVMValueRef index = LLVMBuildExtractElement(builder, indexes, ii, "");
+ LLVMValueRef val = LLVMBuildExtractElement(builder, values, ii, "scatter_val");
+- LLVMValueRef scalar_ptr = LLVMBuildGEP(builder, base_ptr, &index, 1, "scatter_ptr");
++ LLVMValueRef scalar_ptr = LLVMBuildGEP2(builder, LLVMTypeOf(val), base_ptr, &index, 1, "scatter_ptr");
+ LLVMValueRef scalar_pred = pred ?
+ LLVMBuildExtractElement(builder, pred, ii, "scatter_pred") : NULL;
+
+@@ -468,17 +469,15 @@ static void emit_load_var(struct lp_build_nir_context *bld_base,
+ attrib_index_val, 4, idx,
+ TRUE);
+ LLVMValueRef index_vec2 = NULL;
+- LLVMTypeRef fptr_type;
+- LLVMValueRef inputs_array;
+- fptr_type = LLVMPointerType(LLVMFloatTypeInContext(gallivm->context), 0);
+- inputs_array = LLVMBuildBitCast(gallivm->builder, bld->inputs_array, fptr_type, "");
++ LLVMTypeRef scalar_type = LLVMFloatTypeInContext(gallivm->context);
++ LLVMValueRef inputs_array = LLVMBuildBitCast(gallivm->builder, bld->inputs_array, LLVMPointerType(scalar_type, 0), "");
+
+ if (bit_size == 64)
+ index_vec2 = get_soa_array_offsets(&bld_base->uint_bld,
+ indir_index, 4, idx + 1, TRUE);
+
+ /* Gather values from the input register array */
+- result[i] = build_gather(bld_base, &bld_base->base, inputs_array, index_vec, NULL, index_vec2);
++ result[i] = build_gather(bld_base, &bld_base->base, scalar_type, inputs_array, index_vec, NULL, index_vec2);
+ } else {
+ if (bld->indirects & nir_var_shader_in) {
+ LLVMValueRef lindex = lp_build_const_int32(gallivm,
+@@ -706,13 +705,13 @@ static LLVMValueRef emit_load_reg(struct lp_build_nir_context *bld_base,
+ reg_storage = LLVMBuildBitCast(builder, reg_storage, LLVMPointerType(reg_bld->elem_type, 0), "");
+ for (unsigned i = 0; i < nc; i++) {
+ LLVMValueRef indirect_offset = get_soa_array_offsets(uint_bld, indirect_val, nc, i, TRUE);
+- vals[i] = build_gather(bld_base, reg_bld, reg_storage, indirect_offset, NULL, NULL);
++ vals[i] = build_gather(bld_base, reg_bld, reg_bld->elem_type, reg_storage, indirect_offset, NULL, NULL);
+ }
+ } else {
+ for (unsigned i = 0; i < nc; i++) {
+ LLVMValueRef this_storage = nc == 1 ? reg_storage : lp_build_array_get_ptr(gallivm, reg_storage,
+ lp_build_const_int32(gallivm, i));
+- vals[i] = LLVMBuildLoad(builder, this_storage, "");
++ vals[i] = LLVMBuildLoad2(builder, reg_bld->vec_type, this_storage, "");
+ }
+ }
+ return nc == 1 ? vals[0] : lp_nir_array_build_gather_values(builder, vals, nc);
+@@ -1103,7 +1102,7 @@ static void emit_load_ubo(struct lp_build_nir_context *bld_base,
+ LLVMBuildStore(builder, lp_build_pointer_get(builder, consts_ptr, chan_offset), res_store);
+ lp_build_endif(&ifthen);
+
+- scalar = LLVMBuildLoad(builder, res_store, "");
++ scalar = LLVMBuildLoad2(builder, LLVMTypeOf(zero), res_store, "");
+
+ result[c] = lp_build_broadcast_scalar(load_bld, scalar);
+ }
+@@ -1122,7 +1121,7 @@ static void emit_load_ubo(struct lp_build_nir_context *bld_base,
+ LLVMValueRef this_offset = lp_build_add(uint_bld, offset, lp_build_const_int_vec(gallivm, uint_bld->type, c));
+ overflow_mask = lp_build_compare(gallivm, uint_bld->type, PIPE_FUNC_GEQUAL,
+ this_offset, num_consts);
+- result[c] = build_gather(bld_base, bld_broad, consts_ptr, this_offset, overflow_mask, NULL);
++ result[c] = build_gather(bld_base, bld_broad, bld_broad->elem_type, consts_ptr, this_offset, overflow_mask, NULL);
+ }
+ }
+ }
+@@ -2232,14 +2231,14 @@ static void emit_shuffle(struct lp_build_nir_context *bld_base, LLVMValueRef src
+ */
+ src_value = LLVMBuildFreeze(builder, src_value, "");
+
+- LLVMValueRef res = LLVMBuildLoad(builder, res_store, "");
++ LLVMValueRef res = LLVMBuildLoad2(builder, int_bld->vec_type, res_store, "");
+ res = LLVMBuildInsertElement(builder, res, src_value, loop_state.counter, "");
+ LLVMBuildStore(builder, res, res_store);
+
+ lp_build_loop_end_cond(&loop_state, lp_build_const_int32(gallivm, bld_base->uint_bld.type.length),
+ NULL, LLVMIntUGE);
+
+- result[0] = LLVMBuildLoad(builder, res_store, "");
++ result[0] = LLVMBuildLoad2(builder, int_bld->vec_type, res_store, "");
+ }
+ }
+ #endif
+@@ -2653,7 +2652,8 @@ emit_clock(struct lp_build_nir_context *bld_base,
+
+ lp_init_clock_hook(gallivm);
+
+- LLVMValueRef result = LLVMBuildCall(builder, gallivm->get_time_hook, NULL, 0, "");
++ LLVMTypeRef get_time_type = LLVMFunctionType(LLVMInt64TypeInContext(gallivm->context), NULL, 0, 1);
++ LLVMValueRef result = LLVMBuildCall2(builder, get_time_type, gallivm->get_time_hook, NULL, 0, "");
+
+ LLVMValueRef hi = LLVMBuildShl(builder, result, lp_build_const_int64(gallivm, 32), "");
+ hi = LLVMBuildTrunc(builder, hi, uint_bld->elem_type, "");
+--
+GitLab
+
+
+From 1b8c4931df9d0ec55fc80dc280f27c40c9a2b781 Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Tue, 16 Aug 2022 22:55:47 +0300
+Subject: [PATCH 6/9] gallivm: fixes for LLVM-15 opaque pointers in
+ lp_bld_jit_types.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reviewed-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
+---
+ .../auxiliary/gallivm/lp_bld_jit_types.c | 41 ++++++++-----------
+ 1 file changed, 17 insertions(+), 24 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c b/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c
+index c4bfa2be899ce..7af92824a5a43 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c
+@@ -70,35 +70,28 @@ lp_llvm_buffer_member(struct gallivm_state *gallivm,
+ indices[1] = LLVMBuildSelect(gallivm->builder, cond, buffers_offset, lp_build_const_int32(gallivm, 0), "");
+ indices[2] = lp_build_const_int32(gallivm, member_index);
+
+- LLVMValueRef ptr =
+- LLVMBuildGEP(builder, buffers_ptr, indices, ARRAY_SIZE(indices), "");
++ LLVMTypeRef buffer_type = lp_build_create_jit_buffer_type(gallivm);
++ LLVMTypeRef buffers_type = LLVMArrayType(buffer_type, LP_MAX_TGSI_CONST_BUFFERS);
++ LLVMValueRef ptr = LLVMBuildGEP2(builder, buffers_type, buffers_ptr, indices, ARRAY_SIZE(indices), "");
+
+- LLVMValueRef res = LLVMBuildLoad(builder, ptr, "");
++ LLVMTypeRef res_type = LLVMStructGetTypeAtIndex(buffer_type, member_index);
++ LLVMValueRef res = LLVMBuildLoad2(builder, res_type, ptr, "");
+
+ lp_build_name(res, "buffer.%s", member_name);
+
+ return res;
+ }
+
+-/**
+- * Helper macro to instantiate the functions that generate the code to
+- * fetch the members of lp_jit_buffer to fulfill the sampler code
+- * generator requests.
+- *
+- * This complexity is the price we have to pay to keep the image
+- * sampler code generator a reusable module without dependencies to
+- * llvmpipe internals.
+- */
+-#define LP_LLVM_BUFFER_MEMBER(_name, _index) \
+- LLVMValueRef \
+- lp_llvm_buffer_##_name(struct gallivm_state *gallivm, \
+- LLVMValueRef buffers_ptr, \
+- LLVMValueRef buffers_offset, unsigned buffers_limit) \
+- { \
+- return lp_llvm_buffer_member(gallivm, buffers_ptr, \
+- buffers_offset, buffers_limit, \
+- _index, #_name); \
+- }
++LLVMValueRef
++lp_llvm_buffer_base(struct gallivm_state *gallivm,
++ LLVMValueRef buffers_ptr, LLVMValueRef buffers_offset, unsigned buffers_limit)
++{
++ return lp_llvm_buffer_member(gallivm, buffers_ptr, buffers_offset, buffers_limit, LP_JIT_BUFFER_BASE, "base");
++}
+
+-LP_LLVM_BUFFER_MEMBER(base, LP_JIT_BUFFER_BASE)
+-LP_LLVM_BUFFER_MEMBER(num_elements, LP_JIT_BUFFER_NUM_ELEMENTS)
++LLVMValueRef
++lp_llvm_buffer_num_elements(struct gallivm_state *gallivm,
++ LLVMValueRef buffers_ptr, LLVMValueRef buffers_offset, unsigned buffers_limit)
++{
++ return lp_llvm_buffer_member(gallivm, buffers_ptr, buffers_offset, buffers_limit, LP_JIT_BUFFER_NUM_ELEMENTS, "num_elements");
++}
+--
+GitLab
+
+
+From 02b9a8ba12e62cfa40b62af5a338bb9e670de12b Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Sat, 20 Aug 2022 13:50:04 +0300
+Subject: [PATCH 7/9] gallivm: fixes for LLVM-15 opaque pointers in
+ lp_bld_format_s3tc.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reviewed-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c | 9 ++++-----
+ src/gallium/auxiliary/gallivm/lp_bld_struct.c | 2 ++
+ src/gallium/auxiliary/gallivm/lp_bld_struct.h | 2 ++
+ 3 files changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
+index fe44841528cb0..4ea40d14f8cac 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c
+@@ -1197,12 +1197,11 @@ s3tc_update_cache_access(struct gallivm_state *gallivm,
+
+ assert(index == LP_BUILD_FORMAT_CACHE_MEMBER_ACCESS_TOTAL ||
+ index == LP_BUILD_FORMAT_CACHE_MEMBER_ACCESS_MISS);
+-
+- member_ptr = lp_build_struct_get_ptr(gallivm, ptr, index, "");
+- cache_access = LLVMBuildLoad(builder, member_ptr, "cache_access");
++ LLVMTypeRef cache_type = lp_build_format_cache_type(gallivm);
++ member_ptr = lp_build_struct_get_ptr2(gallivm, cache_type, ptr, index, "");
++ cache_access = LLVMBuildLoad2(builder, LLVMInt64TypeInContext(gallivm->context), member_ptr, "cache_access");
+ cache_access = LLVMBuildAdd(builder, cache_access,
+- LLVMConstInt(LLVMInt64TypeInContext(gallivm->context),
+- count, 0), "");
++ LLVMConstInt(LLVMInt64TypeInContext(gallivm->context), count, 0), "");
+ LLVMBuildStore(builder, cache_access, member_ptr);
+ }
+ #endif
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_struct.c b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+index 9e3e24cd9e1e7..4259ecfa0d453 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_struct.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+@@ -42,6 +42,7 @@
+ #include "lp_bld_struct.h"
+
+
++/* Deprecated (used only by llvmpipe); use lp_build_struct_get_ptr2() instead. */
+ LLVMValueRef
+ lp_build_struct_get_ptr(struct gallivm_state *gallivm,
+ LLVMValueRef ptr,
+@@ -60,6 +61,7 @@ lp_build_struct_get_ptr(struct gallivm_state *gallivm,
+ return member_ptr;
+ }
+
++/* Deprecated (used only by llvmpipe); use lp_build_struct_get2() instead. */
+ LLVMValueRef
+ lp_build_struct_get(struct gallivm_state *gallivm,
+ LLVMValueRef ptr,
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_struct.h b/src/gallium/auxiliary/gallivm/lp_bld_struct.h
+index a87519883b4df..4b1cc79b2aa48 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_struct.h
++++ b/src/gallium/auxiliary/gallivm/lp_bld_struct.h
+@@ -55,6 +55,7 @@
+
+ /**
+ * Get value pointer to a structure member.
++ * Deprecated (used only by llvmpipe); use lp_build_struct_get_ptr2() instead.
+ */
+ LLVMValueRef
+ lp_build_struct_get_ptr(struct gallivm_state *gallivm,
+@@ -64,6 +65,7 @@ lp_build_struct_get_ptr(struct gallivm_state *gallivm,
+
+ /**
+ * Get the value of a structure member.
++ * Deprecated (used only by llvmpipe); use lp_build_struct_get2() instead.
+ */
+ LLVMValueRef
+ lp_build_struct_get(struct gallivm_state *gallivm,
+--
+GitLab
+
+
+From 4ff7e64e81c0b4acb39c841b6d8da7ebc8bdd6dd Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Mon, 22 Aug 2022 16:34:30 +0300
+Subject: [PATCH 8/9] gallivm: fixes for LLVM-15 opaque pointers in
+ lp_bld_struct.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reviewed-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_struct.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_struct.c b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+index 4259ecfa0d453..fa25b4ac3124a 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_struct.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+@@ -109,7 +109,8 @@ lp_build_struct_get2(struct gallivm_state *gallivm,
+ assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
+ assert(LLVM_VERSION_MAJOR >= 15 || LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMStructTypeKind);
+ member_ptr = lp_build_struct_get_ptr2(gallivm, ptr_type, ptr, member, name);
+- res = LLVMBuildLoad(gallivm->builder, member_ptr, "");
++ LLVMTypeRef member_type = LLVMStructGetTypeAtIndex(ptr_type, member);
++ res = LLVMBuildLoad2(gallivm->builder, member_type, member_ptr, "");
+ lp_build_name(res, "%s.%s", LLVMGetValueName(ptr), name);
+ return res;
+ }
+--
+GitLab
+
+
+From 136a26f271b5b846f3808f917267b79d0460e71a Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Wed, 24 Aug 2022 14:22:07 +0300
+Subject: [PATCH 9/9] gallivm: fixes for LLVM-15 opaque pointers in
+ lp_bld_format_soa.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reviewed-by: Marek Olšák <marek.olsak@amd.com>
+Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18334>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_format_soa.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
+index 6cda6036b37c8..784b8dc66946f 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
+@@ -1099,7 +1099,7 @@ lp_build_store_rgba_soa(struct gallivm_state *gallivm,
+ struct lp_build_loop_state loop_state;
+
+ LLVMValueRef store_offset = LLVMBuildAdd(gallivm->builder, offset, lp_build_const_int_vec(gallivm, type, i * 4), "");
+- store_offset = LLVMBuildGEP(gallivm->builder, base_ptr, &store_offset, 1, "");
++ store_offset = LLVMBuildGEP2(gallivm->builder, LLVMInt8TypeInContext(gallivm->context), base_ptr, &store_offset, 1, "");
+
+ lp_build_loop_begin(&loop_state, gallivm, lp_build_const_int32(gallivm, 0));
+
+--
+GitLab
+
+From 1d741f4c62af71af860eaab35e16633b5d6428ed Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Wed, 31 Aug 2022 15:38:52 +0300
+Subject: [PATCH 1/3] gallivm: LLVM opaque pointer fixes in lp_bld_sample.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+load_mip()
+
+Reviewed-by: Marek Olšák <marek.olsak@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18721>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_sample.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+index 5ab732ab765d1..181a6f4e08ff1 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+@@ -1175,7 +1175,7 @@ load_mip(struct gallivm_state *gallivm, LLVMValueRef offsets, LLVMValueRef index
+ LLVMValueRef zero = lp_build_const_int32(gallivm, 0);
+ LLVMValueRef indexes[2] = {zero, index1};
+ LLVMValueRef ptr = LLVMBuildGEP(gallivm->builder, offsets, indexes, ARRAY_SIZE(indexes), "");
+- return LLVMBuildLoad(gallivm->builder, ptr, "");
++ return LLVMBuildLoad2(gallivm->builder, LLVMInt32TypeInContext(gallivm->context), ptr, "");
+ }
+
+ /**
+--
+GitLab
+
+
+From cdd7e8f5cecf137a33430f41f48ae671a52561b6 Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Tue, 6 Sep 2022 18:57:42 +0300
+Subject: [PATCH 2/3] gallivm: LLVM opaque pointers: add
+ lp_build_array_get[_ptr]2 in lp_bld_struct.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+i.e. variants taking an explicit LLVM type
+
+Reviewed-by: Marek Olšák <marek.olsak@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18721>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_struct.c | 39 +++++++++++++++++++
+ src/gallium/auxiliary/gallivm/lp_bld_struct.h | 12 ++++++
+ 2 files changed, 51 insertions(+)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_struct.c b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+index fa25b4ac3124a..408ac17e246ea 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_struct.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+@@ -115,6 +115,45 @@ lp_build_struct_get2(struct gallivm_state *gallivm,
+ return res;
+ }
+
++LLVMValueRef
++lp_build_array_get_ptr2(struct gallivm_state *gallivm,
++ LLVMTypeRef array_type,
++ LLVMValueRef ptr,
++ LLVMValueRef index)
++{
++ LLVMValueRef indices[2];
++ LLVMValueRef element_ptr;
++ assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
++ assert(LLVM_VERSION_MAJOR >= 15 || LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMArrayTypeKind);
++ indices[0] = lp_build_const_int32(gallivm, 0);
++ indices[1] = index;
++ element_ptr = LLVMBuildGEP2(gallivm->builder, array_type, ptr, indices, ARRAY_SIZE(indices), "");
++#ifdef DEBUG
++ lp_build_name(element_ptr, "&%s[%s]", LLVMGetValueName(ptr), LLVMGetValueName(index));
++#endif
++ return element_ptr;
++}
++
++
++LLVMValueRef
++lp_build_array_get2(struct gallivm_state *gallivm,
++ LLVMTypeRef array_type,
++ LLVMValueRef ptr,
++ LLVMValueRef index)
++{
++ LLVMValueRef element_ptr;
++ LLVMValueRef res;
++ assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
++ assert(LLVM_VERSION_MAJOR >= 15 || LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMArrayTypeKind);
++ element_ptr = lp_build_array_get_ptr2(gallivm, array_type, ptr, index);
++ LLVMTypeRef element_type = LLVMGetElementType(array_type);
++ res = LLVMBuildLoad2(gallivm->builder, element_type, element_ptr, "");
++#ifdef DEBUG
++ lp_build_name(res, "%s[%s]", LLVMGetValueName(ptr), LLVMGetValueName(index));
++#endif
++ return res;
++}
++
+ LLVMValueRef
+ lp_build_array_get_ptr(struct gallivm_state *gallivm,
+ LLVMValueRef ptr,
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_struct.h b/src/gallium/auxiliary/gallivm/lp_bld_struct.h
+index 4b1cc79b2aa48..d90bdf48d321b 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_struct.h
++++ b/src/gallium/auxiliary/gallivm/lp_bld_struct.h
+@@ -95,6 +95,18 @@ lp_build_struct_get2(struct gallivm_state *gallivm,
+ unsigned member,
+ const char *name);
+
++LLVMValueRef
++lp_build_array_get_ptr2(struct gallivm_state *gallivm,
++ LLVMTypeRef array_type,
++ LLVMValueRef ptr,
++ LLVMValueRef index);
++
++LLVMValueRef
++lp_build_array_get2(struct gallivm_state *gallivm,
++ LLVMTypeRef array_type,
++ LLVMValueRef ptr,
++ LLVMValueRef index);
++
+ /**
+ * Get value pointer to an array element.
+ */
+--
+GitLab
+
+
+From 15e78caf8d38e97183aba6bce65b1bef34869537 Mon Sep 17 00:00:00 2001
+From: Mihai Preda <mhpreda@gmail.com>
+Date: Tue, 6 Sep 2022 19:00:30 +0300
+Subject: [PATCH 3/3] gallivm: LLVM opaque pointers: use
+ lp_build_array_get_ptr2() in lp_bld_nir_soa.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reviewed-by: Marek Olšák <marek.olsak@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18721>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
+index 6128f90ee16f4..5e1a987049db7 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
+@@ -708,9 +708,12 @@ static LLVMValueRef emit_load_reg(struct lp_build_nir_context *bld_base,
+ vals[i] = build_gather(bld_base, reg_bld, reg_bld->elem_type, reg_storage, indirect_offset, NULL, NULL);
+ }
+ } else {
++ LLVMTypeRef array_type = LLVMArrayType(reg_bld->vec_type, nc);
+ for (unsigned i = 0; i < nc; i++) {
+- LLVMValueRef this_storage = nc == 1 ? reg_storage : lp_build_array_get_ptr(gallivm, reg_storage,
+- lp_build_const_int32(gallivm, i));
++ LLVMValueRef index = lp_build_const_int32(gallivm, i);
++ LLVMValueRef this_storage =
++ nc == 1 ? reg_storage
++ : lp_build_array_get_ptr2(gallivm, array_type, reg_storage, index);
+ vals[i] = LLVMBuildLoad2(builder, reg_bld->vec_type, this_storage, "");
+ }
+ }
+@@ -748,9 +751,12 @@ static void emit_store_reg(struct lp_build_nir_context *bld_base,
+ return;
+ }
+
++ LLVMTypeRef array_type = LLVMArrayType(reg_bld->vec_type, nc);
+ for (unsigned i = 0; i < nc; i++) {
+- LLVMValueRef this_storage = nc == 1 ? reg_storage : lp_build_array_get_ptr(gallivm, reg_storage,
+- lp_build_const_int32(gallivm, i));
++ LLVMValueRef index = lp_build_const_int32(gallivm, i);
++ LLVMValueRef this_storage =
++ nc == 1 ? reg_storage
++ : lp_build_array_get_ptr2(gallivm, array_type, reg_storage, index);
+ dst[i] = LLVMBuildBitCast(builder, dst[i], reg_bld->vec_type, "");
+ lp_exec_mask_store(&bld->exec_mask, reg_bld, dst[i], this_storage);
+ }
+--
+GitLab
+
+From 25ead8ec5c84028d4c58eff0b203b49f0425d812 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Mon, 26 Sep 2022 12:16:48 +1000
+Subject: [PATCH] gallivm: fix buffer_type for LLVM 15
+
+Fixes
+deqp-vk: /home/airlied/devel/llvm-project/llvm/include/llvm/IR/Instructions.h:961: static llvm::GetElementPtrInst* llvm::GetElementPtrInst::Create(llvm::Type*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&, llvm::Instruction*): Assertion `cast<PointerType>(Ptr->getType()->getScalarType()) ->isOpaqueOrPointeeTypeMatches(PointeeType)' failed.
+
+Fixes: 1b8c4931df9d ("gallivm: fixes for LLVM-15 opaque pointers in lp_bld_jit_types.c")
+Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18816>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_jit_types.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c b/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c
+index 7af92824a5a43..2a4ecf72e711b 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c
+@@ -71,7 +71,7 @@ lp_llvm_buffer_member(struct gallivm_state *gallivm,
+ indices[2] = lp_build_const_int32(gallivm, member_index);
+
+ LLVMTypeRef buffer_type = lp_build_create_jit_buffer_type(gallivm);
+- LLVMTypeRef buffers_type = LLVMArrayType(buffer_type, LP_MAX_TGSI_CONST_BUFFERS);
++ LLVMTypeRef buffers_type = LLVMArrayType(buffer_type, buffers_limit);
+ LLVMValueRef ptr = LLVMBuildGEP2(builder, buffers_type, buffers_ptr, indices, ARRAY_SIZE(indices), "");
+
+ LLVMTypeRef res_type = LLVMStructGetTypeAtIndex(buffer_type, member_index);
+--
+GitLab
+
+From d132625eed474d149ed6372dd5448492675b738e Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Tue, 27 Sep 2022 05:15:26 +1000
+Subject: [PATCH 1/3] lavapipe: add fmin/fmax to image lowering.
+
+Fixes: 31695f81c925 ("lavapipe: export VK_KHR_shader_atomic_float")
+
+Reviewed-by: Roland Scheidegger <sroland@vmware.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18835>
+---
+ src/gallium/frontends/lavapipe/lvp_lower_vulkan_resource.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/gallium/frontends/lavapipe/lvp_lower_vulkan_resource.c b/src/gallium/frontends/lavapipe/lvp_lower_vulkan_resource.c
+index ff7a38bd5e208..16a1567a6ae1b 100644
+--- a/src/gallium/frontends/lavapipe/lvp_lower_vulkan_resource.c
++++ b/src/gallium/frontends/lavapipe/lvp_lower_vulkan_resource.c
+@@ -50,6 +50,8 @@ lower_vulkan_resource_index(const nir_instr *instr, const void *data_cb)
+ case nir_intrinsic_image_deref_atomic_exchange:
+ case nir_intrinsic_image_deref_atomic_comp_swap:
+ case nir_intrinsic_image_deref_atomic_fadd:
++ case nir_intrinsic_image_deref_atomic_fmin:
++ case nir_intrinsic_image_deref_atomic_fmax:
+ case nir_intrinsic_image_deref_size:
+ case nir_intrinsic_image_deref_samples:
+ return true;
+@@ -339,6 +341,8 @@ static nir_ssa_def *lower_vri_instr(struct nir_builder *b,
+ case nir_intrinsic_image_deref_atomic_exchange:
+ case nir_intrinsic_image_deref_atomic_comp_swap:
+ case nir_intrinsic_image_deref_atomic_fadd:
++ case nir_intrinsic_image_deref_atomic_fmin:
++ case nir_intrinsic_image_deref_atomic_fmax:
+ case nir_intrinsic_image_deref_size:
+ case nir_intrinsic_image_deref_samples:
+ lower_image_intrinsic(b, intrin, data_cb);
+--
+GitLab
+
+
+From c642fa122ccd90b11ad54dd50e398373069ae8c7 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Tue, 27 Sep 2022 05:17:39 +1000
+Subject: [PATCH 2/3] gallivm/nir: fix fmin/fmax translation
+
+Fixes: 203920d4c693 ("gallivm: add atomic 32-bit float support")
+
+Reviewed-by: Roland Scheidegger <sroland@vmware.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18835>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_nir.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c
+index 8d71fb304a4a8..4afeebfd06ad1 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c
+@@ -1738,10 +1738,10 @@ visit_atomic_image(struct lp_build_nir_context *bld_base,
+ break;
+ #if LLVM_VERSION >= 15
+ case nir_intrinsic_image_atomic_fmin:
+- params.op = LLVMAtomicRMWBinOpMin;
++ params.op = LLVMAtomicRMWBinOpFMin;
+ break;
+ case nir_intrinsic_image_atomic_fmax:
+- params.op = LLVMAtomicRMWBinOpMax;
++ params.op = LLVMAtomicRMWBinOpFMax;
+ break;
+ #endif
+ default:
+--
+GitLab
+
+
+From f2922126156b9bc9fd10bfd3690e7ed3db08184f Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Tue, 27 Sep 2022 15:26:42 +1000
+Subject: [PATCH 3/3] gallivm/nir: bitcast when non-float ptr type.
+
+This matters more when opaque pointers are used.
+
+Fixes: 203920d4c693 ("gallivm: add atomic 32-bit float support")
+
+Reviewed-by: Roland Scheidegger <sroland@vmware.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18835>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
+index 5e1a987049db7..b5e401f6132a1 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
+@@ -1224,7 +1224,7 @@ mem_access_base_pointer(struct lp_build_nir_context *bld_base,
+ }
+
+ /* Cast it to the pointer type of the access this instruction is doing. */
+- if (bit_size == 32)
++ if (bit_size == 32 && !mem_bld->type.floating)
+ return ptr;
+ else
+ return LLVMBuildBitCast(gallivm->builder, ptr, LLVMPointerType(mem_bld->elem_type, 0), "");
+--
+GitLab
+
+From b36160689f430e0845940fb0c3dac9ba22c6608b Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Mon, 26 Sep 2022 13:47:15 +1000
+Subject: [PATCH 01/10] gallivm/struct: add opaque ptr friendly pointer
+ accessors.
+
+These just add explicit types.
+
+Reviewed-by: Brian Paul <brianp@vmware.com>
+Reviewed-by: Mihai Preda <mhpreda@gmail.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_struct.c | 29 +++++++++++++++++++
+ src/gallium/auxiliary/gallivm/lp_bld_struct.h | 24 +++++++++++++++
+ 2 files changed, 53 insertions(+)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_struct.c b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+index 408ac17e246ea..73c32cebadfb6 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_struct.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+@@ -234,6 +234,35 @@ lp_build_pointer_get_unaligned(LLVMBuilderRef builder,
+ return res;
+ }
+
++LLVMValueRef
++lp_build_pointer_get_unaligned2(LLVMBuilderRef builder,
++ LLVMTypeRef ptr_type,
++ LLVMValueRef ptr,
++ LLVMValueRef index,
++ unsigned alignment)
++{
++ LLVMValueRef element_ptr;
++ LLVMValueRef res;
++ assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
++ element_ptr = LLVMBuildGEP2(builder, ptr_type, ptr, &index, 1, "");
++ res = LLVMBuildLoad2(builder, ptr_type, element_ptr, "");
++ if (alignment)
++ LLVMSetAlignment(res, alignment);
++#ifdef DEBUG
++ lp_build_name(res, "%s[%s]", LLVMGetValueName(ptr), LLVMGetValueName(index));
++#endif
++ return res;
++}
++
++
++LLVMValueRef
++lp_build_pointer_get2(LLVMBuilderRef builder,
++ LLVMTypeRef ptr_type,
++ LLVMValueRef ptr,
++ LLVMValueRef index)
++{
++ return lp_build_pointer_get_unaligned2(builder, ptr_type, ptr, index, 0);
++}
+
+ void
+ lp_build_pointer_set(LLVMBuilderRef builder,
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_struct.h b/src/gallium/auxiliary/gallivm/lp_bld_struct.h
+index d90bdf48d321b..52d6020563bfb 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_struct.h
++++ b/src/gallium/auxiliary/gallivm/lp_bld_struct.h
+@@ -152,6 +152,30 @@ lp_build_pointer_get_unaligned(LLVMBuilderRef builder,
+ LLVMValueRef index,
+ unsigned alignment);
+
++/**
++ * Get the value of an array element.
++ * This takes the explicit LLVM type of ptr, as required by LLVM-15 opaque-pointers.
++ */
++LLVMValueRef
++lp_build_pointer_get2(LLVMBuilderRef builder,
++ LLVMTypeRef ptr_type,
++ LLVMValueRef ptr,
++ LLVMValueRef index);
++
++/**
++ * Get the value of an array element, with explicit alignment, and explicit type,
++ * This takes the explicit LLVM type of ptr, as required by LLVM-15 opaque-pointers.
++ *
++ * If the element size is different from the alignment this will
++ * cause llvm to emit an unaligned load
++ */
++LLVMValueRef
++lp_build_pointer_get_unaligned2(LLVMBuilderRef builder,
++ LLVMTypeRef ptr_type,
++ LLVMValueRef ptr,
++ LLVMValueRef index,
++ unsigned alignment);
++
+ /**
+ * Set the value of an array element.
+ */
+--
+GitLab
+
+
+From 637652a97fab5c20959505f17972f6a0a549ef9f Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Mon, 26 Sep 2022 13:55:57 +1000
+Subject: [PATCH 02/10] llvmpipe/fs: add mask_type for mask_store accesses.
+
+This adds and passes around the type for mask stores.
+
+Reviewed-by: Brian Paul <brianp@vmware.com>
+Reviewed-by: Mihai Preda <mhpreda@gmail.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
+---
+ src/gallium/drivers/llvmpipe/lp_state_fs.c | 32 ++++++++++++----------
+ 1 file changed, 17 insertions(+), 15 deletions(-)
+
+diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+index 53d933cfb0219..42b07bba4f8bc 100644
+--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
++++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+@@ -633,6 +633,7 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ struct lp_build_interp_soa_context *interp,
+ const struct lp_build_sampler_soa *sampler,
+ const struct lp_build_image_soa *image,
++ LLVMTypeRef mask_type,
+ LLVMValueRef mask_store,
+ LLVMValueRef (*out_color)[4],
+ LLVMValueRef depth_base_ptr,
+@@ -789,7 +790,7 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ for (unsigned s = 0; s < key->coverage_samples; s++) {
+ LLVMValueRef s_mask_idx = LLVMBuildMul(builder, num_loop, lp_build_const_int32(gallivm, s), "");
+ s_mask_idx = LLVMBuildAdd(builder, s_mask_idx, loop_state.counter, "");
+- LLVMValueRef s_mask = lp_build_pointer_get(builder, mask_store, s_mask_idx);
++ LLVMValueRef s_mask = lp_build_pointer_get2(builder, mask_type, mask_store, s_mask_idx);
+ if (s == 0)
+ mask_val = s_mask;
+ else
+@@ -800,9 +801,9 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ }
+ } else {
+ sample_mask_in = lp_build_const_int_vec(gallivm, type, 1);
+- mask_ptr = LLVMBuildGEP(builder, mask_store,
++ mask_ptr = LLVMBuildGEP2(builder, mask_type, mask_store,
+ &loop_state.counter, 1, "mask_ptr");
+- mask_val = LLVMBuildLoad(builder, mask_ptr, "");
++ mask_val = LLVMBuildLoad2(builder, mask_type, mask_ptr, "");
+
+ LLVMValueRef mask_in = LLVMBuildAnd(builder, mask_val, lp_build_const_int_vec(gallivm, type, 1), "");
+ sample_mask_in = LLVMBuildOr(builder, sample_mask_in, mask_in, "");
+@@ -860,9 +861,9 @@ generate_fs_loop(struct gallivm_state *gallivm,
+
+ LLVMValueRef s_mask_idx = LLVMBuildMul(builder, sample_loop_state.counter, num_loop, "");
+ s_mask_idx = LLVMBuildAdd(builder, s_mask_idx, loop_state.counter, "");
+- s_mask_ptr = LLVMBuildGEP(builder, mask_store, &s_mask_idx, 1, "");
++ s_mask_ptr = LLVMBuildGEP2(builder, mask_type, mask_store, &s_mask_idx, 1, "");
+
+- s_mask = LLVMBuildLoad(builder, s_mask_ptr, "");
++ s_mask = LLVMBuildLoad2(builder, mask_type, s_mask_ptr, "");
+ s_mask = LLVMBuildAnd(builder, s_mask, mask_val, "");
+ }
+
+@@ -990,8 +991,8 @@ generate_fs_loop(struct gallivm_state *gallivm,
+
+ LLVMValueRef s_mask_idx = LLVMBuildMul(builder, sample_loop_state.counter, num_loop, "");
+ s_mask_idx = LLVMBuildAdd(builder, s_mask_idx, loop_state.counter, "");
+- s_mask_ptr = LLVMBuildGEP(builder, mask_store, &s_mask_idx, 1, "");
+- s_mask = LLVMBuildLoad(builder, s_mask_ptr, "");
++ s_mask_ptr = LLVMBuildGEP2(builder, mask_type, mask_store, &s_mask_idx, 1, "");
++ s_mask = LLVMBuildLoad2(builder, mask_type, s_mask_ptr, "");
+ lp_build_mask_force(&mask, s_mask);
+ lp_build_interp_soa_update_pos_dyn(interp, gallivm, loop_state.counter, sample_loop_state.counter);
+ system_values.sample_id = sample_loop_state.counter;
+@@ -1216,10 +1217,10 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ /* load the per-sample coverage mask */
+ LLVMValueRef s_mask_idx = LLVMBuildMul(builder, sample_loop_state.counter, num_loop, "");
+ s_mask_idx = LLVMBuildAdd(builder, s_mask_idx, loop_state.counter, "");
+- s_mask_ptr = LLVMBuildGEP(builder, mask_store, &s_mask_idx, 1, "");
++ s_mask_ptr = LLVMBuildGEP2(builder, mask_type, mask_store, &s_mask_idx, 1, "");
+
+ /* combine the execution mask post fragment shader with the coverage mask. */
+- s_mask = LLVMBuildLoad(builder, s_mask_ptr, "");
++ s_mask = LLVMBuildLoad2(builder, mask_type, s_mask_ptr, "");
+ if (key->min_samples == 1)
+ s_mask = LLVMBuildAnd(builder, s_mask, lp_build_mask_value(&mask), "");
+
+@@ -3339,8 +3340,8 @@ generate_fragment(struct llvmpipe_context *lp,
+ LLVMValueRef sindexi =
+ lp_build_const_int32(gallivm, i + (s * num_fs));
+ LLVMValueRef sample_mask_ptr =
+- LLVMBuildGEP(builder, mask_store, &sindexi, 1,
+- "sample_mask_ptr");
++ LLVMBuildGEP2(builder, mask_type, mask_store, &sindexi, 1,
++ "sample_mask_ptr");
+ LLVMValueRef s_mask =
+ generate_quad_mask(gallivm, fs_type,
+ i * fs_type.length / 4, s, mask_input);
+@@ -3359,8 +3360,8 @@ generate_fragment(struct llvmpipe_context *lp,
+ } else {
+ LLVMValueRef mask;
+ LLVMValueRef indexi = lp_build_const_int32(gallivm, i);
+- LLVMValueRef mask_ptr = LLVMBuildGEP(builder, mask_store,
+- &indexi, 1, "mask_ptr");
++ LLVMValueRef mask_ptr = LLVMBuildGEP2(builder, mask_type, mask_store,
++ &indexi, 1, "mask_ptr");
+
+ if (partial_mask) {
+ mask = generate_quad_mask(gallivm, fs_type,
+@@ -3383,6 +3384,7 @@ generate_fragment(struct llvmpipe_context *lp,
+ &interp,
+ sampler,
+ image,
++ mask_type,
+ mask_store, /* output */
+ color_store,
+ depth_ptr,
+@@ -3400,9 +3402,9 @@ generate_fragment(struct llvmpipe_context *lp,
+ for (unsigned s = 0; s < key->coverage_samples; s++) {
+ int idx = (i + (s * num_fs));
+ LLVMValueRef sindexi = lp_build_const_int32(gallivm, idx);
+- ptr = LLVMBuildGEP(builder, mask_store, &sindexi, 1, "");
++ ptr = LLVMBuildGEP2(builder, mask_type, mask_store, &sindexi, 1, "");
+
+- fs_mask[idx] = LLVMBuildLoad(builder, ptr, "smask");
++ fs_mask[idx] = LLVMBuildLoad2(builder, mask_type, ptr, "smask");
+ }
+
+ for (unsigned s = 0; s < key->min_samples; s++) {
+--
+GitLab
+
+
+From 694104b7761b4fece5b0861fc443a6dc553de5b2 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Mon, 26 Sep 2022 17:36:58 +1000
+Subject: [PATCH 03/10] llvmpipe/fs: pass explicit mask_type into interp code.
+
+This is so it is known for explicit pointer support
+
+Reviewed-by: Brian Paul <brianp@vmware.com>
+Reviewed-by: Mihai Preda <mhpreda@gmail.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
+---
+ src/gallium/drivers/llvmpipe/lp_bld_interp.c | 14 +++++++++-----
+ src/gallium/drivers/llvmpipe/lp_bld_interp.h | 2 ++
+ src/gallium/drivers/llvmpipe/lp_state_fs.c | 7 +++++--
+ 3 files changed, 16 insertions(+), 7 deletions(-)
+
+diff --git a/src/gallium/drivers/llvmpipe/lp_bld_interp.c b/src/gallium/drivers/llvmpipe/lp_bld_interp.c
+index 61d0bfa492fa5..f03da17c4d481 100644
+--- a/src/gallium/drivers/llvmpipe/lp_bld_interp.c
++++ b/src/gallium/drivers/llvmpipe/lp_bld_interp.c
+@@ -157,6 +157,7 @@ static void
+ calc_centroid_offsets(struct lp_build_interp_soa_context *bld,
+ struct gallivm_state *gallivm,
+ LLVMValueRef loop_iter,
++ LLVMTypeRef mask_type,
+ LLVMValueRef mask_store,
+ LLVMValueRef pix_center_offset,
+ LLVMValueRef *centroid_x, LLVMValueRef *centroid_y)
+@@ -171,7 +172,7 @@ calc_centroid_offsets(struct lp_build_interp_soa_context *bld,
+ LLVMValueRef s_mask_idx = LLVMBuildMul(builder, bld->num_loop, lp_build_const_int32(gallivm, s), "");
+
+ s_mask_idx = LLVMBuildAdd(builder, s_mask_idx, loop_iter, "");
+- sample_cov = lp_build_pointer_get(builder, mask_store, s_mask_idx);
++ sample_cov = lp_build_pointer_get2(builder, mask_type, mask_store, s_mask_idx);
+ if (s == bld->coverage_samples - 1)
+ s_mask_and = sample_cov;
+ else
+@@ -284,6 +285,7 @@ static void
+ attribs_update_simple(struct lp_build_interp_soa_context *bld,
+ struct gallivm_state *gallivm,
+ LLVMValueRef loop_iter,
++ LLVMTypeRef mask_type,
+ LLVMValueRef mask_store,
+ LLVMValueRef sample_id,
+ int start,
+@@ -376,7 +378,7 @@ attribs_update_simple(struct lp_build_interp_soa_context *bld,
+ xoffset = lp_build_broadcast_scalar(coeff_bld, x_val_idx);
+ yoffset = lp_build_broadcast_scalar(coeff_bld, y_val_idx);
+ } else if (loc == TGSI_INTERPOLATE_LOC_CENTROID) {
+- calc_centroid_offsets(bld, gallivm, loop_iter, mask_store,
++ calc_centroid_offsets(bld, gallivm, loop_iter, mask_type, mask_store,
+ pix_center_offset, &xoffset, &yoffset);
+ }
+ chan_pixoffx = lp_build_add(coeff_bld, chan_pixoffx, xoffset);
+@@ -508,6 +510,7 @@ LLVMValueRef
+ lp_build_interp_soa(struct lp_build_interp_soa_context *bld,
+ struct gallivm_state *gallivm,
+ LLVMValueRef loop_iter,
++ LLVMTypeRef mask_type,
+ LLVMValueRef mask_store,
+ unsigned attrib, unsigned chan,
+ enum tgsi_interpolate_loc loc,
+@@ -579,7 +582,7 @@ lp_build_interp_soa(struct lp_build_interp_soa_context *bld,
+ /* for centroid find covered samples for this quad. */
+ /* if all samples are covered use pixel centers */
+ if (bld->coverage_samples > 1) {
+- calc_centroid_offsets(bld, gallivm, loop_iter, mask_store,
++ calc_centroid_offsets(bld, gallivm, loop_iter, mask_type, mask_store,
+ pix_center_offset, &centroid_x_offset,
+ &centroid_y_offset);
+
+@@ -793,10 +796,11 @@ void
+ lp_build_interp_soa_update_inputs_dyn(struct lp_build_interp_soa_context *bld,
+ struct gallivm_state *gallivm,
+ LLVMValueRef quad_start_index,
++ LLVMTypeRef mask_type,
+ LLVMValueRef mask_store,
+ LLVMValueRef sample_id)
+ {
+- attribs_update_simple(bld, gallivm, quad_start_index, mask_store, sample_id, 1, bld->num_attribs);
++ attribs_update_simple(bld, gallivm, quad_start_index, mask_type, mask_store, sample_id, 1, bld->num_attribs);
+ }
+
+ void
+@@ -805,6 +809,6 @@ lp_build_interp_soa_update_pos_dyn(struct lp_build_interp_soa_context *bld,
+ LLVMValueRef quad_start_index,
+ LLVMValueRef sample_id)
+ {
+- attribs_update_simple(bld, gallivm, quad_start_index, NULL, sample_id, 0, 1);
++ attribs_update_simple(bld, gallivm, quad_start_index, NULL, NULL, sample_id, 0, 1);
+ }
+
+diff --git a/src/gallium/drivers/llvmpipe/lp_bld_interp.h b/src/gallium/drivers/llvmpipe/lp_bld_interp.h
+index f9c9211cbb8d5..acd5546118471 100644
+--- a/src/gallium/drivers/llvmpipe/lp_bld_interp.h
++++ b/src/gallium/drivers/llvmpipe/lp_bld_interp.h
+@@ -138,6 +138,7 @@ void
+ lp_build_interp_soa_update_inputs_dyn(struct lp_build_interp_soa_context *bld,
+ struct gallivm_state *gallivm,
+ LLVMValueRef quad_start_index,
++ LLVMTypeRef mask_type,
+ LLVMValueRef mask_store,
+ LLVMValueRef sample_id);
+
+@@ -151,6 +152,7 @@ LLVMValueRef
+ lp_build_interp_soa(struct lp_build_interp_soa_context *bld,
+ struct gallivm_state *gallivm,
+ LLVMValueRef loop_iter,
++ LLVMTypeRef mask_type,
+ LLVMValueRef mask_store,
+ unsigned attrib, unsigned chan,
+ unsigned loc,
+diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+index 42b07bba4f8bc..1aef483fd6446 100644
+--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
++++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+@@ -434,6 +434,7 @@ struct lp_build_fs_llvm_iface {
+ struct lp_build_fs_iface base;
+ struct lp_build_interp_soa_context *interp;
+ struct lp_build_for_loop_state *loop_state;
++ LLVMTypeRef mask_type;
+ LLVMValueRef mask_store;
+ LLVMValueRef sample_id;
+ LLVMValueRef color_ptr_ptr;
+@@ -463,7 +464,7 @@ fs_interp(const struct lp_build_fs_iface *iface,
+ loc = TGSI_INTERPOLATE_LOC_SAMPLE;
+
+ return lp_build_interp_soa(interp, bld->gallivm, fs_iface->loop_state->counter,
+- fs_iface->mask_store,
++ fs_iface->mask_type, fs_iface->mask_store,
+ attrib, chan, loc, attrib_indir, offsets);
+ }
+
+@@ -1005,7 +1006,8 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ }
+ system_values.sample_pos = sample_pos_array;
+
+- lp_build_interp_soa_update_inputs_dyn(interp, gallivm, loop_state.counter, mask_store, sample_loop_state.counter);
++ lp_build_interp_soa_update_inputs_dyn(interp, gallivm, loop_state.counter,
++ mask_type, mask_store, sample_loop_state.counter);
+
+ struct lp_build_fs_llvm_iface fs_iface = {
+ .base.interp_fn = fs_interp,
+@@ -1013,6 +1015,7 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ .interp = interp,
+ .loop_state = &loop_state,
+ .sample_id = system_values.sample_id,
++ .mask_type = mask_type,
+ .mask_store = mask_store,
+ .color_ptr_ptr = color_ptr_ptr,
+ .color_stride_ptr = color_stride_ptr,
+--
+GitLab
+
+
+From ff02d042aabd9567e35cf289830bbfd552eaff05 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Thu, 29 Sep 2022 08:15:28 +1000
+Subject: [PATCH 04/10] llvmpipe/fs: port depth code to opaque pointer api
+
+Reviewed-by: Brian Paul <brianp@vmware.com>
+Reviewed-by: Mihai Preda <mhpreda@gmail.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
+---
+ src/gallium/drivers/llvmpipe/lp_bld_depth.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/src/gallium/drivers/llvmpipe/lp_bld_depth.c b/src/gallium/drivers/llvmpipe/lp_bld_depth.c
+index 91bb347e307c3..10bb2d9939266 100644
+--- a/src/gallium/drivers/llvmpipe/lp_bld_depth.c
++++ b/src/gallium/drivers/llvmpipe/lp_bld_depth.c
+@@ -587,8 +587,9 @@ lp_build_depth_stencil_load_swizzled(struct gallivm_state *gallivm,
+
+ /* Load current z/stencil values from z/stencil buffer */
+ LLVMTypeRef load_ptr_type = LLVMPointerType(zs_dst_type, 0);
++ LLVMTypeRef int8_type = LLVMInt8TypeInContext(gallivm->context);
+ LLVMValueRef zs_dst_ptr =
+- LLVMBuildGEP(builder, depth_ptr, &depth_offset1, 1, "");
++ LLVMBuildGEP2(builder, int8_type, depth_ptr, &depth_offset1, 1, "");
+ zs_dst_ptr = LLVMBuildBitCast(builder, zs_dst_ptr, load_ptr_type, "");
+ LLVMValueRef zs_dst1 = LLVMBuildLoad2(builder, zs_dst_type, zs_dst_ptr, "");
+ LLVMValueRef zs_dst2;
+@@ -596,7 +597,7 @@ lp_build_depth_stencil_load_swizzled(struct gallivm_state *gallivm,
+ zs_dst2 = lp_build_undef(gallivm, zs_load_type);
+ }
+ else {
+- zs_dst_ptr = LLVMBuildGEP(builder, depth_ptr, &depth_offset2, 1, "");
++ zs_dst_ptr = LLVMBuildGEP2(builder, int8_type, depth_ptr, &depth_offset2, 1, "");
+ zs_dst_ptr = LLVMBuildBitCast(builder, zs_dst_ptr, load_ptr_type, "");
+ zs_dst2 = LLVMBuildLoad2(builder, zs_dst_type, zs_dst_ptr, "");
+ }
+@@ -733,9 +734,10 @@ lp_build_depth_stencil_write_swizzled(struct gallivm_state *gallivm,
+
+ depth_offset2 = LLVMBuildAdd(builder, depth_offset1, depth_stride, "");
+
+- zs_dst_ptr1 = LLVMBuildGEP(builder, depth_ptr, &depth_offset1, 1, "");
++ LLVMTypeRef int8_type = LLVMInt8TypeInContext(gallivm->context);
++ zs_dst_ptr1 = LLVMBuildGEP2(builder, int8_type, depth_ptr, &depth_offset1, 1, "");
+ zs_dst_ptr1 = LLVMBuildBitCast(builder, zs_dst_ptr1, load_ptr_type, "");
+- zs_dst_ptr2 = LLVMBuildGEP(builder, depth_ptr, &depth_offset2, 1, "");
++ zs_dst_ptr2 = LLVMBuildGEP2(builder, int8_type, depth_ptr, &depth_offset2, 1, "");
+ zs_dst_ptr2 = LLVMBuildBitCast(builder, zs_dst_ptr2, load_ptr_type, "");
+
+ if (format_desc->block.bits > 32) {
+--
+GitLab
+
+
+From e28db68e53c3e265df5dd66c5b6bfe7cfb762f2a Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Thu, 29 Sep 2022 08:17:35 +1000
+Subject: [PATCH 05/10] llvmpipe/fs: add sample position type to the interp
+ interface
+
+Reviewed-by: Brian Paul <brianp@vmware.com>
+Reviewed-by: Mihai Preda <mhpreda@gmail.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
+---
+ src/gallium/drivers/llvmpipe/lp_bld_interp.c | 20 ++++++++++++++------
+ src/gallium/drivers/llvmpipe/lp_bld_interp.h | 2 ++
+ src/gallium/drivers/llvmpipe/lp_state_fs.c | 4 +++-
+ 3 files changed, 19 insertions(+), 7 deletions(-)
+
+diff --git a/src/gallium/drivers/llvmpipe/lp_bld_interp.c b/src/gallium/drivers/llvmpipe/lp_bld_interp.c
+index f03da17c4d481..f5c4a2105b4d4 100644
+--- a/src/gallium/drivers/llvmpipe/lp_bld_interp.c
++++ b/src/gallium/drivers/llvmpipe/lp_bld_interp.c
+@@ -181,8 +181,10 @@ calc_centroid_offsets(struct lp_build_interp_soa_context *bld,
+ LLVMValueRef x_val_idx = lp_build_const_int32(gallivm, s * 2);
+ LLVMValueRef y_val_idx = lp_build_const_int32(gallivm, s * 2 + 1);
+
+- x_val_idx = lp_build_array_get(gallivm, bld->sample_pos_array, x_val_idx);
+- y_val_idx = lp_build_array_get(gallivm, bld->sample_pos_array, y_val_idx);
++ x_val_idx = lp_build_array_get2(gallivm, bld->sample_pos_array_type,
++ bld->sample_pos_array, x_val_idx);
++ y_val_idx = lp_build_array_get2(gallivm, bld->sample_pos_array_type,
++ bld->sample_pos_array, y_val_idx);
+ x_val_idx = lp_build_broadcast_scalar(coeff_bld, x_val_idx);
+ y_val_idx = lp_build_broadcast_scalar(coeff_bld, y_val_idx);
+ centroid_x_offset = lp_build_select(coeff_bld, sample_cov, x_val_idx, centroid_x_offset);
+@@ -338,7 +340,8 @@ attribs_update_simple(struct lp_build_interp_soa_context *bld,
+ dadx = coeff_bld->one;
+ if (sample_id) {
+ LLVMValueRef x_val_idx = LLVMBuildMul(gallivm->builder, sample_id, lp_build_const_int32(gallivm, 2), "");
+- x_val_idx = lp_build_array_get(gallivm, bld->sample_pos_array, x_val_idx);
++ x_val_idx = lp_build_array_get2(gallivm, bld->sample_pos_array_type,
++ bld->sample_pos_array, x_val_idx);
+ a = lp_build_broadcast_scalar(coeff_bld, x_val_idx);
+ } else {
+ a = lp_build_const_vec(gallivm, coeff_bld->type, bld->pos_offset);
+@@ -349,7 +352,8 @@ attribs_update_simple(struct lp_build_interp_soa_context *bld,
+ if (sample_id) {
+ LLVMValueRef y_val_idx = LLVMBuildMul(gallivm->builder, sample_id, lp_build_const_int32(gallivm, 2), "");
+ y_val_idx = LLVMBuildAdd(gallivm->builder, y_val_idx, lp_build_const_int32(gallivm, 1), "");
+- y_val_idx = lp_build_array_get(gallivm, bld->sample_pos_array, y_val_idx);
++ y_val_idx = lp_build_array_get2(gallivm, bld->sample_pos_array_type,
++ bld->sample_pos_array, y_val_idx);
+ a = lp_build_broadcast_scalar(coeff_bld, y_val_idx);
+ } else {
+ a = lp_build_const_vec(gallivm, coeff_bld->type, bld->pos_offset);
+@@ -373,8 +377,10 @@ attribs_update_simple(struct lp_build_interp_soa_context *bld,
+ LLVMValueRef x_val_idx = LLVMBuildMul(gallivm->builder, sample_id, lp_build_const_int32(gallivm, 2), "");
+ LLVMValueRef y_val_idx = LLVMBuildAdd(gallivm->builder, x_val_idx, lp_build_const_int32(gallivm, 1), "");
+
+- x_val_idx = lp_build_array_get(gallivm, bld->sample_pos_array, x_val_idx);
+- y_val_idx = lp_build_array_get(gallivm, bld->sample_pos_array, y_val_idx);
++ x_val_idx = lp_build_array_get2(gallivm, bld->sample_pos_array_type,
++ bld->sample_pos_array, x_val_idx);
++ y_val_idx = lp_build_array_get2(gallivm, bld->sample_pos_array_type,
++ bld->sample_pos_array, y_val_idx);
+ xoffset = lp_build_broadcast_scalar(coeff_bld, x_val_idx);
+ yoffset = lp_build_broadcast_scalar(coeff_bld, y_val_idx);
+ } else if (loc == TGSI_INTERPOLATE_LOC_CENTROID) {
+@@ -678,6 +684,7 @@ lp_build_interp_soa_init(struct lp_build_interp_soa_context *bld,
+ const struct lp_shader_input *inputs,
+ boolean pixel_center_integer,
+ unsigned coverage_samples,
++ LLVMTypeRef sample_pos_array_type,
+ LLVMValueRef sample_pos_array,
+ LLVMValueRef num_loop,
+ LLVMBuilderRef builder,
+@@ -750,6 +757,7 @@ lp_build_interp_soa_init(struct lp_build_interp_soa_context *bld,
+ }
+ bld->coverage_samples = coverage_samples;
+ bld->num_loop = num_loop;
++ bld->sample_pos_array_type = sample_pos_array_type;
+ bld->sample_pos_array = sample_pos_array;
+
+ pos_init(bld, x0, y0);
+diff --git a/src/gallium/drivers/llvmpipe/lp_bld_interp.h b/src/gallium/drivers/llvmpipe/lp_bld_interp.h
+index acd5546118471..445c8655d4d59 100644
+--- a/src/gallium/drivers/llvmpipe/lp_bld_interp.h
++++ b/src/gallium/drivers/llvmpipe/lp_bld_interp.h
+@@ -90,6 +90,7 @@ struct lp_build_interp_soa_context
+ double pos_offset;
+ unsigned coverage_samples;
+ LLVMValueRef num_loop;
++ LLVMTypeRef sample_pos_array_type;
+ LLVMValueRef sample_pos_array;
+
+ LLVMValueRef x;
+@@ -124,6 +125,7 @@ lp_build_interp_soa_init(struct lp_build_interp_soa_context *bld,
+ const struct lp_shader_input *inputs,
+ boolean pixel_center_integer,
+ unsigned coverage_samples,
++ LLVMTypeRef sample_pos_array_type,
+ LLVMValueRef sample_pos_array,
+ LLVMValueRef num_loop,
+ LLVMBuilderRef builder,
+diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+index 1aef483fd6446..7e554662bdd8b 100644
+--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
++++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+@@ -3319,7 +3319,9 @@ generate_fragment(struct llvmpipe_context *lp,
+ shader->info.base.num_inputs,
+ inputs,
+ pixel_center_integer,
+- key->coverage_samples, glob_sample_pos,
++ key->coverage_samples,
++ LLVMTypeOf(sample_pos_array),
++ glob_sample_pos,
+ num_loop,
+ builder, fs_type,
+ a0_ptr, dadx_ptr, dady_ptr,
+--
+GitLab
+
+
+From 38907a40ab0848c9fe8d1b7ad6d0f4047fcf6f5b Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Thu, 29 Sep 2022 08:19:44 +1000
+Subject: [PATCH 06/10] llvmpipe/fs: pass mask type to alpha to coverage
+ handler
+
+Reviewed-by: Brian Paul <brianp@vmware.com>
+Reviewed-by: Mihai Preda <mhpreda@gmail.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
+---
+ src/gallium/drivers/llvmpipe/lp_state_fs.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+index 7e554662bdd8b..9dabfcb4a80f3 100644
+--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
++++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+@@ -408,6 +408,7 @@ lp_build_sample_alpha_to_coverage(struct gallivm_state *gallivm,
+ unsigned coverage_samples,
+ LLVMValueRef num_loop,
+ LLVMValueRef loop_counter,
++ LLVMTypeRef coverage_mask_type,
+ LLVMValueRef coverage_mask_store,
+ LLVMValueRef alpha)
+ {
+@@ -422,8 +423,9 @@ lp_build_sample_alpha_to_coverage(struct gallivm_state *gallivm,
+
+ LLVMValueRef s_mask_idx = LLVMBuildMul(builder, lp_build_const_int32(gallivm, s), num_loop, "");
+ s_mask_idx = LLVMBuildAdd(builder, s_mask_idx, loop_counter, "");
+- LLVMValueRef s_mask_ptr = LLVMBuildGEP(builder, coverage_mask_store, &s_mask_idx, 1, "");
+- LLVMValueRef s_mask = LLVMBuildLoad(builder, s_mask_ptr, "");
++ LLVMValueRef s_mask_ptr = LLVMBuildGEP2(builder, coverage_mask_type,
++ coverage_mask_store, &s_mask_idx, 1, "");
++ LLVMValueRef s_mask = LLVMBuildLoad2(builder, coverage_mask_type, s_mask_ptr, "");
+ s_mask = LLVMBuildAnd(builder, s_mask, test, "");
+ LLVMBuildStore(builder, s_mask, s_mask_ptr);
+ }
+@@ -1089,7 +1091,7 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ } else {
+ lp_build_sample_alpha_to_coverage(gallivm, type, key->coverage_samples, num_loop,
+ loop_state.counter,
+- mask_store, alpha);
++ mask_type, mask_store, alpha);
+ }
+ }
+ }
+--
+GitLab
+
+
+From 3137f4fad15058cc7d16b2438f44b5e581853be8 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Thu, 29 Sep 2022 08:20:25 +1000
+Subject: [PATCH 07/10] llvmpipe/fs: use explicit api in viewport code.
+
+Reviewed-by: Brian Paul <brianp@vmware.com>
+Reviewed-by: Mihai Preda <mhpreda@gmail.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
+---
+ src/gallium/drivers/llvmpipe/lp_state_fs.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+index 9dabfcb4a80f3..9cbdc9cff037d 100644
+--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
++++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+@@ -332,12 +332,13 @@ lp_llvm_viewport(LLVMTypeRef context_type,
+ LLVMValueRef res;
+ struct lp_type viewport_type =
+ lp_type_float_vec(32, 32 * LP_JIT_VIEWPORT_NUM_FIELDS);
++ LLVMTypeRef vtype = lp_build_vec_type(gallivm, viewport_type);
+
+ ptr = lp_jit_context_viewports(gallivm, context_type, context_ptr);
+ ptr = LLVMBuildPointerCast(builder, ptr,
+- LLVMPointerType(lp_build_vec_type(gallivm, viewport_type), 0), "");
++ LLVMPointerType(vtype, 0), "");
+
+- res = lp_build_pointer_get(builder, ptr, viewport_index);
++ res = lp_build_pointer_get2(builder, vtype, ptr, viewport_index);
+
+ return res;
+ }
+--
+GitLab
+
+
+From b9a0ec0c67741cb4b1d2c0d44f747aabe28018e3 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Thu, 29 Sep 2022 08:24:44 +1000
+Subject: [PATCH 08/10] llvmpipe/fs: handle explicit types around blending and
+ c/zs bufs calcs
+
+Reviewed-by: Brian Paul <brianp@vmware.com>
+Reviewed-by: Mihai Preda <mhpreda@gmail.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
+---
+ src/gallium/drivers/llvmpipe/lp_state_fs.c | 132 +++++++++++++--------
+ 1 file changed, 80 insertions(+), 52 deletions(-)
+
+diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+index 9cbdc9cff037d..900d2c1e63c3b 100644
+--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
++++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+@@ -117,6 +117,7 @@ static unsigned fs_no = 0;
+
+ static void
+ load_unswizzled_block(struct gallivm_state *gallivm,
++ LLVMTypeRef base_type,
+ LLVMValueRef base_ptr,
+ LLVMValueRef stride,
+ unsigned block_width,
+@@ -507,6 +508,9 @@ fs_fb_fetch(const struct lp_build_fs_iface *iface,
+ struct lp_build_fs_llvm_iface *fs_iface = (struct lp_build_fs_llvm_iface *)iface;
+ struct gallivm_state *gallivm = bld->gallivm;
+ LLVMBuilderRef builder = gallivm->builder;
++ LLVMTypeRef int32_type = LLVMInt32TypeInContext(gallivm->context);
++ LLVMTypeRef int8_type = LLVMInt8TypeInContext(gallivm->context);
++ LLVMTypeRef int8p_type = LLVMPointerType(int8_type, 0);
+ const struct lp_fragment_shader_variant_key *key = fs_iface->key;
+
+ LLVMValueRef buf_ptr;
+@@ -524,8 +528,12 @@ fs_fb_fetch(const struct lp_build_fs_iface *iface,
+ const int cbuf = location - FRAG_RESULT_DATA0;
+ LLVMValueRef index = lp_build_const_int32(gallivm, cbuf);
+
+- buf_ptr = LLVMBuildLoad(builder, LLVMBuildGEP(builder, fs_iface->color_ptr_ptr, &index, 1, ""), "");
+- stride = LLVMBuildLoad(builder, LLVMBuildGEP(builder, fs_iface->color_stride_ptr, &index, 1, ""), "");
++ buf_ptr = LLVMBuildLoad2(builder, int8p_type,
++ LLVMBuildGEP2(builder, int8p_type,
++ fs_iface->color_ptr_ptr, &index, 1, ""), "");
++ stride = LLVMBuildLoad2(builder, int32_type,
++ LLVMBuildGEP2(builder, int32_type,
++ fs_iface->color_stride_ptr, &index, 1, ""), "");
+ buf_format = key->cbuf_format[cbuf];
+ }
+
+@@ -546,13 +554,16 @@ fs_fb_fetch(const struct lp_build_fs_iface *iface,
+ sample_stride = fs_iface->zs_sample_stride;
+ } else {
+ LLVMValueRef index = lp_build_const_int32(gallivm, location - FRAG_RESULT_DATA0);
+- sample_stride = LLVMBuildLoad(builder,
+- LLVMBuildGEP(builder, fs_iface->color_sample_stride_ptr,
+- &index, 1, ""), "");
++ sample_stride = LLVMBuildLoad2(builder, int32_type,
++ LLVMBuildGEP2(builder,
++ int32_type,
++ fs_iface->color_sample_stride_ptr,
++ &index, 1, ""), "");
+ }
+
+ LLVMValueRef sample_offset = LLVMBuildMul(builder, sample_stride, fs_iface->sample_id, "");
+- buf_ptr = LLVMBuildGEP(builder, buf_ptr, &sample_offset, 1, "");
++ buf_ptr = LLVMBuildGEP2(builder, int8_type,
++ buf_ptr, &sample_offset, 1, "");
+ }
+
+ /* fragment shader executes on 4x4 blocks. depending on vector width it can
+@@ -883,7 +894,8 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ LLVMValueRef sample_offset =
+ LLVMBuildMul(builder, sample_loop_state.counter,
+ depth_sample_stride, "");
+- depth_ptr = LLVMBuildGEP(builder, depth_ptr, &sample_offset, 1, "");
++ depth_ptr = LLVMBuildGEP2(builder, LLVMInt8TypeInContext(gallivm->context),
++ depth_ptr, &sample_offset, 1, "");
+ }
+
+ if (depth_mode & EARLY_DEPTH_TEST) {
+@@ -1248,7 +1260,8 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ depth_ptr = depth_base_ptr;
+ if (key->multisample) {
+ LLVMValueRef sample_offset = LLVMBuildMul(builder, sample_loop_state.counter, depth_sample_stride, "");
+- depth_ptr = LLVMBuildGEP(builder, depth_ptr, &sample_offset, 1, "");
++ depth_ptr = LLVMBuildGEP2(builder, LLVMInt8TypeInContext(gallivm->context),
++ depth_ptr, &sample_offset, 1, "");
+ }
+
+ /* Late Z test */
+@@ -1258,8 +1271,8 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ if (key->min_samples > 1)
+ idx = LLVMBuildAdd(builder, idx,
+ LLVMBuildMul(builder, sample_loop_state.counter, num_loop, ""), "");
+- LLVMValueRef ptr = LLVMBuildGEP(builder, z_out, &idx, 1, "");
+- z = LLVMBuildLoad(builder, ptr, "output.z");
++ LLVMValueRef ptr = LLVMBuildGEP2(builder, vec_type, z_out, &idx, 1, "");
++ z = LLVMBuildLoad2(builder, vec_type, ptr, "output.z");
+ } else {
+ if (key->multisample) {
+ lp_build_interp_soa_update_pos_dyn(interp, gallivm, loop_state.counter, key->multisample ? sample_loop_state.counter : NULL);
+@@ -1280,8 +1293,8 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ if (key->min_samples > 1)
+ idx = LLVMBuildAdd(builder, idx,
+ LLVMBuildMul(builder, sample_loop_state.counter, num_loop, ""), "");
+- LLVMValueRef ptr = LLVMBuildGEP(builder, s_out, &idx, 1, "");
+- stencil_refs[0] = LLVMBuildLoad(builder, ptr, "output.s");
++ LLVMValueRef ptr = LLVMBuildGEP2(builder, vec_type, s_out, &idx, 1, "");
++ stencil_refs[0] = LLVMBuildLoad2(builder, vec_type, ptr, "output.s");
+ /* there's only one value, and spec says to discard additional bits */
+ LLVMValueRef s_max_mask = lp_build_const_int_vec(gallivm, int_type, 255);
+ stencil_refs[0] = LLVMBuildBitCast(builder, stencil_refs[0], int_vec_type, "");
+@@ -1322,10 +1335,10 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ * write that out.
+ */
+ if (key->multisample) {
+- z_value = LLVMBuildBitCast(builder, lp_build_pointer_get(builder, z_sample_value_store, sample_loop_state.counter), z_type, "");;
+- s_value = lp_build_pointer_get(builder, s_sample_value_store, sample_loop_state.counter);
+- z_fb = LLVMBuildBitCast(builder, lp_build_pointer_get(builder, z_fb_store, sample_loop_state.counter), z_fb_type, "");
+- s_fb = lp_build_pointer_get(builder, s_fb_store, sample_loop_state.counter);
++ z_value = LLVMBuildBitCast(builder, lp_build_pointer_get2(builder, int_vec_type, z_sample_value_store, sample_loop_state.counter), z_type, "");
++ s_value = lp_build_pointer_get2(builder, int_vec_type, s_sample_value_store, sample_loop_state.counter);
++ z_fb = LLVMBuildBitCast(builder, lp_build_pointer_get2(builder, int_vec_type, z_fb_store, sample_loop_state.counter), z_fb_type, "");
++ s_fb = lp_build_pointer_get2(builder, int_vec_type, s_fb_store, sample_loop_state.counter);
+ }
+ lp_build_depth_stencil_write_swizzled(gallivm, type,
+ zs_format_desc, key->resource_1d,
+@@ -1604,6 +1617,7 @@ fs_twiddle_transpose(struct gallivm_state *gallivm,
+ */
+ static void
+ load_unswizzled_block(struct gallivm_state *gallivm,
++ LLVMTypeRef base_type,
+ LLVMValueRef base_ptr,
+ LLVMValueRef stride,
+ unsigned block_width,
+@@ -1632,11 +1646,13 @@ load_unswizzled_block(struct gallivm_state *gallivm,
+ gep[0] = lp_build_const_int32(gallivm, 0);
+ gep[1] = LLVMBuildAdd(builder, bx, by, "");
+
+- dst_ptr = LLVMBuildGEP(builder, base_ptr, gep, 2, "");
++ dst_ptr = LLVMBuildGEP2(builder, base_type, base_ptr, gep, 2, "");
+ dst_ptr = LLVMBuildBitCast(builder, dst_ptr,
+ LLVMPointerType(lp_build_vec_type(gallivm, dst_type), 0), "");
+
+- dst[i] = LLVMBuildLoad(builder, dst_ptr, "");
++ dst[i] = LLVMBuildLoad2(builder,
++ lp_build_vec_type(gallivm, dst_type),
++ dst_ptr, "");
+
+ LLVMSetAlignment(dst[i], dst_alignment);
+ }
+@@ -1648,6 +1664,7 @@ load_unswizzled_block(struct gallivm_state *gallivm,
+ */
+ static void
+ store_unswizzled_block(struct gallivm_state *gallivm,
++ LLVMTypeRef base_type,
+ LLVMValueRef base_ptr,
+ LLVMValueRef stride,
+ unsigned block_width,
+@@ -1676,7 +1693,7 @@ store_unswizzled_block(struct gallivm_state *gallivm,
+ gep[0] = lp_build_const_int32(gallivm, 0);
+ gep[1] = LLVMBuildAdd(builder, bx, by, "");
+
+- src_ptr = LLVMBuildGEP(builder, base_ptr, gep, 2, "");
++ src_ptr = LLVMBuildGEP2(builder, base_type, base_ptr, gep, 2, "");
+ src_ptr = LLVMBuildBitCast(builder, src_ptr,
+ LLVMPointerType(lp_build_vec_type(gallivm, src_type), 0), "");
+
+@@ -2377,6 +2394,7 @@ generate_unswizzled_blend(struct gallivm_state *gallivm,
+ LLVMValueRef fs_out_color[PIPE_MAX_COLOR_BUFS][TGSI_NUM_CHANNELS][4],
+ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
++ LLVMTypeRef color_type,
+ LLVMValueRef color_ptr,
+ LLVMValueRef stride,
+ unsigned partial_mask,
+@@ -2431,6 +2449,8 @@ generate_unswizzled_blend(struct gallivm_state *gallivm,
+ unsigned num_fullblock_fs = is_1d ? 2 * num_fs : num_fs;
+ LLVMValueRef fpstate = 0;
+
++ LLVMTypeRef fs_vec_type = lp_build_vec_type(gallivm, fs_type);
++
+ /* Get type from output format */
+ lp_blend_type_from_format_desc(out_format_desc, &row_type);
+ lp_mem_type_from_format_desc(out_format_desc, &dst_type);
+@@ -2550,7 +2570,8 @@ generate_unswizzled_blend(struct gallivm_state *gallivm,
+ /* Always load alpha for use in blending */
+ LLVMValueRef alpha;
+ if (i < num_fs) {
+- alpha = LLVMBuildLoad(builder, fs_out_color[rt][alpha_channel][i], "");
++ alpha = LLVMBuildLoad2(builder, fs_vec_type,
++ fs_out_color[rt][alpha_channel][i], "");
+ } else {
+ alpha = undef_src_val;
+ }
+@@ -2559,8 +2580,8 @@ generate_unswizzled_blend(struct gallivm_state *gallivm,
+ for (unsigned j = 0; j < dst_channels; ++j) {
+ assert(swizzle[j] < 4);
+ if (i < num_fs) {
+- fs_src[i][j] = LLVMBuildLoad(builder,
+- fs_out_color[rt][swizzle[j]][i], "");
++ fs_src[i][j] = LLVMBuildLoad2(builder, fs_vec_type,
++ fs_out_color[rt][swizzle[j]][i], "");
+ } else {
+ fs_src[i][j] = undef_src_val;
+ }
+@@ -2599,7 +2620,8 @@ generate_unswizzled_blend(struct gallivm_state *gallivm,
+ for (unsigned i = 0; i < num_fullblock_fs; ++i) {
+ LLVMValueRef alpha;
+ if (i < num_fs) {
+- alpha = LLVMBuildLoad(builder, fs_out_color[1][alpha_channel][i], "");
++ alpha = LLVMBuildLoad2(builder, fs_vec_type,
++ fs_out_color[1][alpha_channel][i], "");
+ } else {
+ alpha = undef_src_val;
+ }
+@@ -2607,7 +2629,8 @@ generate_unswizzled_blend(struct gallivm_state *gallivm,
+ for (unsigned j = 0; j < dst_channels; ++j) {
+ assert(swizzle[j] < 4);
+ if (i < num_fs) {
+- fs_src1[i][j] = LLVMBuildLoad(builder, fs_out_color[1][swizzle[j]][i], "");
++ fs_src1[i][j] = LLVMBuildLoad2(builder, fs_vec_type,
++ fs_out_color[1][swizzle[j]][i], "");
+ } else {
+ fs_src1[i][j] = undef_src_val;
+ }
+@@ -2632,14 +2655,15 @@ generate_unswizzled_blend(struct gallivm_state *gallivm,
+ */
+ fs_type.floating = 0;
+ fs_type.sign = dst_type.sign;
++ fs_vec_type = lp_build_vec_type(gallivm, fs_type);
+ for (unsigned i = 0; i < num_fullblock_fs; ++i) {
+ for (unsigned j = 0; j < dst_channels; ++j) {
+ fs_src[i][j] = LLVMBuildBitCast(builder, fs_src[i][j],
+- lp_build_vec_type(gallivm, fs_type), "");
++ fs_vec_type, "");
+ }
+ if (dst_channels == 3 && !has_alpha) {
+ fs_src[i][3] = LLVMBuildBitCast(builder, fs_src[i][3],
+- lp_build_vec_type(gallivm, fs_type), "");
++ fs_vec_type, "");
+ }
+ }
+ }
+@@ -2690,6 +2714,7 @@ generate_unswizzled_blend(struct gallivm_state *gallivm,
+ unsigned ds = src_count / (num_fullblock_fs * src_channels);
+ row_type.length /= ds;
+ fs_type.length = row_type.length;
++ fs_vec_type = lp_build_vec_type(gallivm, fs_type);
+ }
+
+ blend_type = row_type;
+@@ -2740,9 +2765,9 @@ generate_unswizzled_blend(struct gallivm_state *gallivm,
+ */
+ blend_color = lp_jit_context_f_blend_color(gallivm, context_type, context_ptr);
+ blend_color = LLVMBuildPointerCast(builder, blend_color,
+- LLVMPointerType(lp_build_vec_type(gallivm, fs_type), 0),
++ LLVMPointerType(fs_vec_type, 0),
+ "");
+- blend_color = LLVMBuildLoad(builder, LLVMBuildGEP(builder, blend_color,
++ blend_color = LLVMBuildLoad2(builder, fs_vec_type, LLVMBuildGEP2(builder, fs_vec_type, blend_color,
+ &i32_zero, 1, ""), "");
+
+ /* Convert */
+@@ -2932,13 +2957,13 @@ generate_unswizzled_blend(struct gallivm_state *gallivm,
+ }
+
+ if (is_1d) {
+- load_unswizzled_block(gallivm, color_ptr, stride, block_width, 1,
++ load_unswizzled_block(gallivm, color_type, color_ptr, stride, block_width, 1,
+ dst, ls_type, dst_count / 4, dst_alignment);
+ for (unsigned i = dst_count / 4; i < dst_count; i++) {
+ dst[i] = lp_build_undef(gallivm, ls_type);
+ }
+ } else {
+- load_unswizzled_block(gallivm, color_ptr, stride, block_width,
++ load_unswizzled_block(gallivm, color_type, color_ptr, stride, block_width,
+ block_height, dst, ls_type, dst_count,
+ dst_alignment);
+ }
+@@ -3047,10 +3072,10 @@ generate_unswizzled_blend(struct gallivm_state *gallivm,
+ * Store blend result to memory
+ */
+ if (is_1d) {
+- store_unswizzled_block(gallivm, color_ptr, stride, block_width, 1,
++ store_unswizzled_block(gallivm, color_type, color_ptr, stride, block_width, 1,
+ dst, dst_type, dst_count / 4, dst_alignment);
+ } else {
+- store_unswizzled_block(gallivm, color_ptr, stride, block_width,
++ store_unswizzled_block(gallivm, color_type, color_ptr, stride, block_width,
+ block_height,
+ dst, dst_type, dst_count, dst_alignment);
+ }
+@@ -3089,6 +3114,7 @@ generate_fragment(struct llvmpipe_context *lp,
+ LLVMTypeRef func_type;
+ LLVMTypeRef int32_type = LLVMInt32TypeInContext(gallivm->context);
+ LLVMTypeRef int8_type = LLVMInt8TypeInContext(gallivm->context);
++ LLVMTypeRef int8p_type = LLVMPointerType(int8_type, 0);
+ LLVMValueRef context_ptr;
+ LLVMValueRef x;
+ LLVMValueRef y;
+@@ -3405,6 +3431,7 @@ generate_fragment(struct llvmpipe_context *lp,
+ variant->jit_thread_data_type,
+ thread_data_ptr);
+
++ LLVMTypeRef fs_vec_type = lp_build_vec_type(gallivm, fs_type);
+ for (unsigned i = 0; i < num_fs; i++) {
+ LLVMValueRef ptr;
+ for (unsigned s = 0; s < key->coverage_samples; s++) {
+@@ -3421,9 +3448,9 @@ generate_fragment(struct llvmpipe_context *lp,
+ LLVMValueRef sindexi = lp_build_const_int32(gallivm, idx);
+ for (unsigned cbuf = 0; cbuf < key->nr_cbufs; cbuf++) {
+ for (unsigned chan = 0; chan < TGSI_NUM_CHANNELS; ++chan) {
+- ptr = LLVMBuildGEP(builder,
+- color_store[cbuf * !cbuf0_write_all][chan],
+- &sindexi, 1, "");
++ ptr = LLVMBuildGEP2(builder, fs_vec_type,
++ color_store[cbuf * !cbuf0_write_all][chan],
++ &sindexi, 1, "");
+ fs_out_color[s][cbuf][chan][i] = ptr;
+ }
+ }
+@@ -3432,9 +3459,9 @@ generate_fragment(struct llvmpipe_context *lp,
+ * output 1
+ */
+ for (unsigned chan = 0; chan < TGSI_NUM_CHANNELS; ++chan) {
+- ptr = LLVMBuildGEP(builder,
+- color_store[1][chan],
+- &sindexi, 1, "");
++ ptr = LLVMBuildGEP2(builder, fs_vec_type,
++ color_store[1][chan],
++ &sindexi, 1, "");
+ fs_out_color[s][1][chan][i] = ptr;
+ }
+ }
+@@ -3458,32 +3485,33 @@ generate_fragment(struct llvmpipe_context *lp,
+ || key->alpha.enabled)
+ && !shader->info.base.uses_kill);
+
+- color_ptr = LLVMBuildLoad(builder,
+- LLVMBuildGEP(builder, color_ptr_ptr,
+- &index, 1, ""),
+- "");
++ color_ptr = LLVMBuildLoad2(builder, int8p_type,
++ LLVMBuildGEP2(builder, int8p_type, color_ptr_ptr,
++ &index, 1, ""),
++ "");
+
+- stride = LLVMBuildLoad(builder,
+- LLVMBuildGEP(builder, stride_ptr,
++ stride = LLVMBuildLoad2(builder, int32_type,
++ LLVMBuildGEP2(builder, int32_type, stride_ptr,
+ &index, 1, ""),
+- "");
++ "");
+
+ if (key->cbuf_nr_samples[cbuf] > 1)
+- sample_stride = LLVMBuildLoad(builder,
+- LLVMBuildGEP(builder,
+- color_sample_stride_ptr,
+- &index, 1, ""), "");
++ sample_stride = LLVMBuildLoad2(builder, int32_type,
++ LLVMBuildGEP2(builder,
++ int32_type,
++ color_sample_stride_ptr,
++ &index, 1, ""), "");
+
+ for (unsigned s = 0; s < key->cbuf_nr_samples[cbuf]; s++) {
+ unsigned mask_idx = num_fs * (key->multisample ? s : 0);
+ unsigned out_idx = key->min_samples == 1 ? 0 : s;
+- LLVMValueRef out_ptr = color_ptr;;
++ LLVMValueRef out_ptr = color_ptr;
+
+ if (sample_stride) {
+ LLVMValueRef sample_offset =
+ LLVMBuildMul(builder, sample_stride,
+ lp_build_const_int32(gallivm, s), "");
+- out_ptr = LLVMBuildGEP(builder, out_ptr, &sample_offset, 1, "");
++ out_ptr = LLVMBuildGEP2(builder, int8_type, out_ptr, &sample_offset, 1, "");
+ }
+ out_ptr = LLVMBuildBitCast(builder, out_ptr,
+ LLVMPointerType(blend_vec_type, 0), "");
+@@ -3495,7 +3523,7 @@ generate_fragment(struct llvmpipe_context *lp,
+ num_fs, fs_type, &fs_mask[mask_idx],
+ fs_out_color[out_idx],
+ variant->jit_context_type,
+- context_ptr, out_ptr, stride,
++ context_ptr, blend_vec_type, out_ptr, stride,
+ partial_mask, do_branch);
+ }
+ }
+--
+GitLab
+
+
+From 5b83357ac5aea1b1735030cd1ece13d1a7e2f402 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Thu, 29 Sep 2022 08:25:42 +1000
+Subject: [PATCH 09/10] llvmpipe/fs: cleanup some remaining mask handling and
+ reuse types
+
+Reviewed-by: Brian Paul <brianp@vmware.com>
+Reviewed-by: Mihai Preda <mhpreda@gmail.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
+---
+ src/gallium/drivers/llvmpipe/lp_state_fs.c | 33 +++++++++++-----------
+ 1 file changed, 17 insertions(+), 16 deletions(-)
+
+diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+index 900d2c1e63c3b..d906d83840eff 100644
+--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
++++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+@@ -831,8 +831,8 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ lp_build_mask_check(&mask);
+
+ /* Create storage for recombining sample masks after early Z pass. */
+- LLVMValueRef s_mask_or = lp_build_alloca(gallivm, lp_build_int_vec_type(gallivm, type), "cov_mask_early_depth");
+- LLVMBuildStore(builder, LLVMConstNull(lp_build_int_vec_type(gallivm, type)), s_mask_or);
++ LLVMValueRef s_mask_or = lp_build_alloca(gallivm, int_vec_type, "cov_mask_early_depth");
++ LLVMBuildStore(builder, LLVMConstNull(int_vec_type), s_mask_or);
+
+ /* Create storage for post depth sample mask */
+ LLVMValueRef post_depth_sample_mask_in = NULL;
+@@ -953,13 +953,13 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ * Recombine the resulting coverage masks post early Z into the fragment
+ * shader execution mask.
+ */
+- LLVMValueRef tmp_s_mask_or = LLVMBuildLoad(builder, s_mask_or, "");
++ LLVMValueRef tmp_s_mask_or = LLVMBuildLoad2(builder, int_vec_type, s_mask_or, "");
+ tmp_s_mask_or = LLVMBuildOr(builder, tmp_s_mask_or, s_mask, "");
+ LLVMBuildStore(builder, tmp_s_mask_or, s_mask_or);
+
+ if (post_depth_coverage) {
+ LLVMValueRef mask_bit_idx = LLVMBuildShl(builder, lp_build_const_int32(gallivm, 1), sample_loop_state.counter, "");
+- LLVMValueRef post_depth_mask_in = LLVMBuildLoad(builder, post_depth_sample_mask_in, "");
++ LLVMValueRef post_depth_mask_in = LLVMBuildLoad2(builder, int_vec_type, post_depth_sample_mask_in, "");
+ mask_bit_idx = LLVMBuildAnd(builder, s_mask, lp_build_broadcast(gallivm, int_vec_type, mask_bit_idx), "");
+ post_depth_mask_in = LLVMBuildOr(builder, post_depth_mask_in, mask_bit_idx, "");
+ LLVMBuildStore(builder, post_depth_mask_in, post_depth_sample_mask_in);
+@@ -970,7 +970,7 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ lp_build_for_loop_end(&sample_loop_state);
+
+ /* recombined all the coverage masks in the shader exec mask. */
+- tmp_s_mask_or = LLVMBuildLoad(builder, s_mask_or, "");
++ tmp_s_mask_or = LLVMBuildLoad2(builder, int_vec_type, s_mask_or, "");
+ lp_build_mask_update(&mask, tmp_s_mask_or);
+
+ if (key->min_samples == 1) {
+@@ -994,7 +994,7 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ }
+
+ if (post_depth_coverage) {
+- system_values.sample_mask_in = LLVMBuildLoad(builder, post_depth_sample_mask_in, "");
++ system_values.sample_mask_in = LLVMBuildLoad2(builder, int_vec_type, post_depth_sample_mask_in, "");
+ } else {
+ system_values.sample_mask_in = sample_mask_in;
+ }
+@@ -1140,7 +1140,7 @@ generate_fs_loop(struct gallivm_state *gallivm,
+
+ if (key->min_samples > 1) {
+ /* only the bit corresponding to this sample is to be used. */
+- LLVMValueRef tmp_mask = LLVMBuildLoad(builder, out_sample_mask_storage, "tmp_mask");
++ LLVMValueRef tmp_mask = LLVMBuildLoad2(builder, int_vec_type, out_sample_mask_storage, "tmp_mask");
+ LLVMValueRef out_smask_idx = LLVMBuildShl(builder, lp_build_const_int32(gallivm, 1), sample_loop_state.counter, "");
+ LLVMValueRef smask_bit = LLVMBuildAnd(builder, output_smask, lp_build_broadcast(gallivm, int_vec_type, out_smask_idx), "");
+ output_smask = LLVMBuildOr(builder, tmp_mask, smask_bit, "");
+@@ -1248,7 +1248,7 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ (!(depth_mode & EARLY_DEPTH_TEST) || (depth_mode & (EARLY_DEPTH_TEST_INFERRED)))) {
+ LLVMValueRef out_smask_idx = LLVMBuildShl(builder, lp_build_const_int32(gallivm, 1), sample_loop_state.counter, "");
+ out_smask_idx = lp_build_broadcast(gallivm, int_vec_type, out_smask_idx);
+- LLVMValueRef output_smask = LLVMBuildLoad(builder, out_sample_mask_storage, "");
++ LLVMValueRef output_smask = LLVMBuildLoad2(builder, int_vec_type, out_sample_mask_storage, "");
+ LLVMValueRef smask_bit = LLVMBuildAnd(builder, output_smask, out_smask_idx, "");
+ LLVMValueRef cmp = LLVMBuildICmp(builder, LLVMIntNE, smask_bit, lp_build_const_int_vec(gallivm, int_type, 0), "");
+ smask_bit = LLVMBuildSExt(builder, cmp, int_vec_type, "");
+@@ -1363,7 +1363,7 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ /* if the shader writes sample mask use that */
+ LLVMValueRef out_smask_idx = LLVMBuildShl(builder, lp_build_const_int32(gallivm, 1), sample_loop_state.counter, "");
+ out_smask_idx = lp_build_broadcast(gallivm, int_vec_type, out_smask_idx);
+- LLVMValueRef output_smask = LLVMBuildLoad(builder, out_sample_mask_storage, "");
++ LLVMValueRef output_smask = LLVMBuildLoad2(builder, int_vec_type, out_sample_mask_storage, "");
+ LLVMValueRef smask_bit = LLVMBuildAnd(builder, output_smask, out_smask_idx, "");
+ LLVMValueRef cmp = LLVMBuildICmp(builder, LLVMIntNE, smask_bit, lp_build_const_int_vec(gallivm, int_type, 0), "");
+ smask_bit = LLVMBuildSExt(builder, cmp, int_vec_type, "");
+@@ -3113,6 +3113,7 @@ generate_fragment(struct llvmpipe_context *lp,
+ LLVMTypeRef arg_types[15];
+ LLVMTypeRef func_type;
+ LLVMTypeRef int32_type = LLVMInt32TypeInContext(gallivm->context);
++ LLVMTypeRef int32p_type = LLVMPointerType(int32_type, 0);
+ LLVMTypeRef int8_type = LLVMInt8TypeInContext(gallivm->context);
+ LLVMTypeRef int8p_type = LLVMPointerType(int8_type, 0);
+ LLVMValueRef context_ptr;
+@@ -3198,13 +3199,13 @@ generate_fragment(struct llvmpipe_context *lp,
+ arg_types[4] = LLVMPointerType(fs_elem_type, 0); /* a0 */
+ arg_types[5] = LLVMPointerType(fs_elem_type, 0); /* dadx */
+ arg_types[6] = LLVMPointerType(fs_elem_type, 0); /* dady */
+- arg_types[7] = LLVMPointerType(LLVMPointerType(int8_type, 0), 0); /* color */
+- arg_types[8] = LLVMPointerType(int8_type, 0); /* depth */
++ arg_types[7] = LLVMPointerType(int8p_type, 0); /* color */
++ arg_types[8] = int8p_type; /* depth */
+ arg_types[9] = LLVMInt64TypeInContext(gallivm->context); /* mask_input */
+ arg_types[10] = variant->jit_thread_data_ptr_type; /* per thread data */
+- arg_types[11] = LLVMPointerType(int32_type, 0); /* stride */
++ arg_types[11] = int32p_type; /* stride */
+ arg_types[12] = int32_type; /* depth_stride */
+- arg_types[13] = LLVMPointerType(int32_type, 0); /* color sample strides */
++ arg_types[13] = int32p_type; /* color sample strides */
+ arg_types[14] = int32_type; /* depth sample stride */
+
+ func_type = LLVMFunctionType(LLVMVoidTypeInContext(gallivm->context),
+@@ -3359,9 +3360,9 @@ generate_fragment(struct llvmpipe_context *lp,
+ for (unsigned i = 0; i < num_fs; i++) {
+ if (key->multisample) {
+ LLVMValueRef smask_val =
+- LLVMBuildLoad(builder,
+- lp_jit_context_sample_mask(gallivm, variant->jit_context_type, context_ptr),
+- "");
++ LLVMBuildLoad2(builder, int32_type,
++ lp_jit_context_sample_mask(gallivm, variant->jit_context_type, context_ptr),
++ "");
+
+ /*
+ * For multisampling, extract the per-sample mask from the
+--
+GitLab
+
+
+From 111bf8bfee280683a4c2d14ec08f65675204138c Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Thu, 29 Sep 2022 08:26:01 +1000
+Subject: [PATCH 10/10] llvmpipe/fs: convert outputs handling to explicit api
+
+Reviewed-by: Brian Paul <brianp@vmware.com>
+Reviewed-by: Mihai Preda <mhpreda@gmail.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18876>
+---
+ src/gallium/drivers/llvmpipe/lp_state_fs.c | 21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+index d906d83840eff..b65a3a897eb9c 100644
+--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
++++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+@@ -1074,7 +1074,7 @@ generate_fs_loop(struct gallivm_state *gallivm,
+
+ if (color0 != -1 && outputs[color0][3]) {
+ const struct util_format_description *cbuf_format_desc;
+- LLVMValueRef alpha = LLVMBuildLoad(builder, outputs[color0][3], "alpha");
++ LLVMValueRef alpha = LLVMBuildLoad2(builder, vec_type, outputs[color0][3], "alpha");
+ LLVMValueRef alpha_ref_value;
+
+ alpha_ref_value = lp_jit_context_alpha_ref_value(gallivm, context_type, context_ptr);
+@@ -1095,7 +1095,7 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ 0);
+
+ if (color0 != -1 && outputs[color0][3]) {
+- LLVMValueRef alpha = LLVMBuildLoad(builder, outputs[color0][3], "alpha");
++ LLVMValueRef alpha = LLVMBuildLoad2(builder, vec_type, outputs[color0][3], "alpha");
+
+ if (!key->multisample) {
+ lp_build_alpha_to_coverage(gallivm, type,
+@@ -1130,7 +1130,7 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ lp_build_context_init(&smask_bld, gallivm, int_type);
+
+ assert(smaski >= 0);
+- output_smask = LLVMBuildLoad(builder, outputs[smaski][0], "smask");
++ output_smask = LLVMBuildLoad2(builder, vec_type, outputs[smaski][0], "smask");
+ output_smask = LLVMBuildBitCast(builder, output_smask, smask_bld.vec_type, "");
+ if (!key->multisample && key->no_ms_sample_mask_out) {
+ output_smask = lp_build_and(&smask_bld, output_smask, smask_bld.one);
+@@ -1153,12 +1153,12 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ int pos0 = find_output_by_semantic(&shader->info.base,
+ TGSI_SEMANTIC_POSITION,
+ 0);
+- LLVMValueRef out = LLVMBuildLoad(builder, outputs[pos0][2], "");
++ LLVMValueRef out = LLVMBuildLoad2(builder, vec_type, outputs[pos0][2], "");
+ LLVMValueRef idx = loop_state.counter;
+ if (key->min_samples > 1)
+ idx = LLVMBuildAdd(builder, idx,
+ LLVMBuildMul(builder, sample_loop_state.counter, num_loop, ""), "");
+- LLVMValueRef ptr = LLVMBuildGEP(builder, z_out, &idx, 1, "");
++ LLVMValueRef ptr = LLVMBuildGEP2(builder, vec_type, z_out, &idx, 1, "");
+ LLVMBuildStore(builder, out, ptr);
+ }
+
+@@ -1166,12 +1166,13 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ int sten_out = find_output_by_semantic(&shader->info.base,
+ TGSI_SEMANTIC_STENCIL,
+ 0);
+- LLVMValueRef out = LLVMBuildLoad(builder, outputs[sten_out][1], "output.s");
++ LLVMValueRef out = LLVMBuildLoad2(builder, vec_type,
++ outputs[sten_out][1], "output.s");
+ LLVMValueRef idx = loop_state.counter;
+ if (key->min_samples > 1)
+ idx = LLVMBuildAdd(builder, idx,
+ LLVMBuildMul(builder, sample_loop_state.counter, num_loop, ""), "");
+- LLVMValueRef ptr = LLVMBuildGEP(builder, s_out, &idx, 1, "");
++ LLVMValueRef ptr = LLVMBuildGEP2(builder, vec_type, s_out, &idx, 1, "");
+ LLVMBuildStore(builder, out, ptr);
+ }
+
+@@ -1205,14 +1206,14 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ /* XXX: just initialize outputs to point at colors[] and
+ * skip this.
+ */
+- LLVMValueRef out = LLVMBuildLoad(builder, outputs[attrib][chan], "");
++ LLVMValueRef out = LLVMBuildLoad2(builder, vec_type, outputs[attrib][chan], "");
+ LLVMValueRef color_ptr;
+ LLVMValueRef color_idx = loop_state.counter;
+ if (key->min_samples > 1)
+ color_idx = LLVMBuildAdd(builder, color_idx,
+ LLVMBuildMul(builder, sample_loop_state.counter, num_loop, ""), "");
+- color_ptr = LLVMBuildGEP(builder, out_color[cbuf][chan],
+- &color_idx, 1, "");
++ color_ptr = LLVMBuildGEP2(builder, vec_type, out_color[cbuf][chan],
++ &color_idx, 1, "");
+ lp_build_name(out, "color%u.%c", attrib, "rgba"[chan]);
+ LLVMBuildStore(builder, out, color_ptr);
+ }
+--
+GitLab
+
+From 3d242c044758292712e1876ba3afdd3e8f06d5df Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Tue, 4 Oct 2022 09:41:00 +1000
+Subject: [PATCH 1/6] llvmpipe/tests: port to new pointer interfaces.
+
+Reviewed-by: Mihai Preda <mhpreda@gmail.com>
+Reviewed-by: Roland Scheidegger <sroland@vmware.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>
+---
+ src/gallium/drivers/llvmpipe/lp_test_arit.c | 6 +++---
+ src/gallium/drivers/llvmpipe/lp_test_blend.c | 8 ++++----
+ src/gallium/drivers/llvmpipe/lp_test_conv.c | 12 +++++++-----
+ 3 files changed, 14 insertions(+), 12 deletions(-)
+
+diff --git a/src/gallium/drivers/llvmpipe/lp_test_arit.c b/src/gallium/drivers/llvmpipe/lp_test_arit.c
+index 55ced4c67ccd4..4118928d52ed0 100644
+--- a/src/gallium/drivers/llvmpipe/lp_test_arit.c
++++ b/src/gallium/drivers/llvmpipe/lp_test_arit.c
+@@ -362,11 +362,11 @@ build_unary_test_func(struct gallivm_state *gallivm,
+ LLVMSetFunctionCallConv(func, LLVMCCallConv);
+
+ LLVMPositionBuilderAtEnd(builder, block);
+-
+- arg1 = LLVMBuildLoad(builder, arg1, "");
++
++ arg1 = LLVMBuildLoad2(builder, vf32t, arg1, "");
+
+ ret = test->builder(&bld, arg1);
+-
++
+ LLVMBuildStore(builder, ret, arg0);
+
+ LLVMBuildRetVoid(builder);
+diff --git a/src/gallium/drivers/llvmpipe/lp_test_blend.c b/src/gallium/drivers/llvmpipe/lp_test_blend.c
+index 7805ec58d98a3..2d44e8eafe70c 100644
+--- a/src/gallium/drivers/llvmpipe/lp_test_blend.c
++++ b/src/gallium/drivers/llvmpipe/lp_test_blend.c
+@@ -172,10 +172,10 @@ add_blend_test(struct gallivm_state *gallivm,
+ builder = gallivm->builder;
+ LLVMPositionBuilderAtEnd(builder, block);
+
+- src = LLVMBuildLoad(builder, src_ptr, "src");
+- src1 = LLVMBuildLoad(builder, src1_ptr, "src1");
+- dst = LLVMBuildLoad(builder, dst_ptr, "dst");
+- con = LLVMBuildLoad(builder, const_ptr, "const");
++ src = LLVMBuildLoad2(builder, vec_type, src_ptr, "src");
++ src1 = LLVMBuildLoad2(builder, vec_type, src1_ptr, "src1");
++ dst = LLVMBuildLoad2(builder, vec_type, dst_ptr, "dst");
++ con = LLVMBuildLoad2(builder, vec_type, const_ptr, "const");
+
+ res = lp_build_blend_aos(gallivm, blend, format, type, rt, src, NULL,
+ src1, NULL, dst, NULL, con, NULL, swizzle, 4);
+diff --git a/src/gallium/drivers/llvmpipe/lp_test_conv.c b/src/gallium/drivers/llvmpipe/lp_test_conv.c
+index 9ae148866af38..05aaa1b4fcdab 100644
+--- a/src/gallium/drivers/llvmpipe/lp_test_conv.c
++++ b/src/gallium/drivers/llvmpipe/lp_test_conv.c
+@@ -112,9 +112,11 @@ add_conv_test(struct gallivm_state *gallivm,
+ LLVMValueRef src[LP_MAX_VECTOR_LENGTH];
+ LLVMValueRef dst[LP_MAX_VECTOR_LENGTH];
+ unsigned i;
++ LLVMTypeRef src_vec_type = lp_build_vec_type(gallivm, src_type);
++ LLVMTypeRef dst_vec_type = lp_build_vec_type(gallivm, dst_type);
+
+- args[0] = LLVMPointerType(lp_build_vec_type(gallivm, src_type), 0);
+- args[1] = LLVMPointerType(lp_build_vec_type(gallivm, dst_type), 0);
++ args[0] = LLVMPointerType(src_vec_type, 0);
++ args[1] = LLVMPointerType(dst_vec_type, 0);
+
+ func = LLVMAddFunction(module, "test",
+ LLVMFunctionType(LLVMVoidTypeInContext(context),
+@@ -128,15 +130,15 @@ add_conv_test(struct gallivm_state *gallivm,
+
+ for(i = 0; i < num_srcs; ++i) {
+ LLVMValueRef index = LLVMConstInt(LLVMInt32TypeInContext(context), i, 0);
+- LLVMValueRef ptr = LLVMBuildGEP(builder, src_ptr, &index, 1, "");
+- src[i] = LLVMBuildLoad(builder, ptr, "");
++ LLVMValueRef ptr = LLVMBuildGEP2(builder, src_vec_type, src_ptr, &index, 1, "");
++ src[i] = LLVMBuildLoad2(builder, src_vec_type, ptr, "");
+ }
+
+ lp_build_conv(gallivm, src_type, dst_type, src, num_srcs, dst, num_dsts);
+
+ for(i = 0; i < num_dsts; ++i) {
+ LLVMValueRef index = LLVMConstInt(LLVMInt32TypeInContext(context), i, 0);
+- LLVMValueRef ptr = LLVMBuildGEP(builder, dst_ptr, &index, 1, "");
++ LLVMValueRef ptr = LLVMBuildGEP2(builder, dst_vec_type, dst_ptr, &index, 1, "");
+ LLVMBuildStore(builder, dst[i], ptr);
+ }
+
+--
+GitLab
+
+
+From 9fe8e5ccf7a18c02634be4e80bb15e854e95e78a Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Mon, 26 Sep 2022 14:11:30 +1000
+Subject: [PATCH 2/6] gallivm/llvmpipe: add opaque pointers support to sampler
+
+This adds explicit context types wiring through the sampler code
+
+Reviewed-by: Mihai Preda <mhpreda@gmail.com>
+Reviewed-by: Roland Scheidegger <sroland@vmware.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>
+---
+ src/gallium/auxiliary/draw/draw_llvm.c | 4 ++
+ src/gallium/auxiliary/draw/draw_llvm_sample.c | 18 +++--
+ src/gallium/auxiliary/gallivm/lp_bld_nir.h | 2 +
+ .../auxiliary/gallivm/lp_bld_nir_soa.c | 8 +++
+ src/gallium/auxiliary/gallivm/lp_bld_sample.c | 20 +++---
+ src/gallium/auxiliary/gallivm/lp_bld_sample.h | 23 +++++++
+ .../auxiliary/gallivm/lp_bld_sample_soa.c | 69 ++++++++++++++-----
+ src/gallium/auxiliary/gallivm/lp_bld_tgsi.h | 4 ++
+ .../auxiliary/gallivm/lp_bld_tgsi_soa.c | 16 +++++
+ src/gallium/drivers/llvmpipe/lp_state_cs.c | 1 +
+ src/gallium/drivers/llvmpipe/lp_state_fs.c | 2 +
+ src/gallium/drivers/llvmpipe/lp_tex_sample.c | 21 ++++--
+ 12 files changed, 148 insertions(+), 40 deletions(-)
+
+diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
+index 3bdc8775bd7e5..16c93ec85f24e 100644
+--- a/src/gallium/auxiliary/draw/draw_llvm.c
++++ b/src/gallium/auxiliary/draw/draw_llvm.c
+@@ -965,6 +965,7 @@ generate_vs(struct draw_llvm_variant *variant,
+ params.consts_ptr = consts_ptr;
+ params.system_values = system_values;
+ params.inputs = inputs;
++ params.context_type = variant->context_type;
+ params.context_ptr = context_ptr;
+ params.sampler = draw_sampler;
+ params.info = &llvm->draw->vs.vertex_shader->info;
+@@ -2872,6 +2873,7 @@ draw_gs_llvm_generate(struct draw_llvm *llvm,
+ params.mask = &mask;
+ params.consts_ptr = consts_ptr;
+ params.system_values = &system_values;
++ params.context_type = variant->context_type;
+ params.context_ptr = context_ptr;
+ params.sampler = sampler;
+ params.info = &llvm->draw->gs.geometry_shader->info;
+@@ -3533,6 +3535,7 @@ draw_tcs_llvm_generate(struct draw_llvm *llvm,
+ params.mask = &mask;
+ params.consts_ptr = consts_ptr;
+ params.system_values = &system_values;
++ params.context_type = variant->context_type;
+ params.context_ptr = context_ptr;
+ params.sampler = sampler;
+ params.info = &llvm->draw->tcs.tess_ctrl_shader->info;
+@@ -4062,6 +4065,7 @@ draw_tes_llvm_generate(struct draw_llvm *llvm,
+ params.mask = &mask;
+ params.consts_ptr = consts_ptr;
+ params.system_values = &system_values;
++ params.context_type = variant->context_type;
+ params.context_ptr = context_ptr;
+ params.sampler = sampler;
+ params.info = &llvm->draw->tes.tess_eval_shader->info;
+diff --git a/src/gallium/auxiliary/draw/draw_llvm_sample.c b/src/gallium/auxiliary/draw/draw_llvm_sample.c
+index 6032f5b2a002f..5a48fb17caf2b 100644
+--- a/src/gallium/auxiliary/draw/draw_llvm_sample.c
++++ b/src/gallium/auxiliary/draw/draw_llvm_sample.c
+@@ -100,6 +100,7 @@ struct draw_llvm_image_soa
+ */
+ static LLVMValueRef
+ draw_llvm_texture_member(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned texture_unit,
+ LLVMValueRef texture_unit_offset,
+@@ -128,7 +129,7 @@ draw_llvm_texture_member(struct gallivm_state *gallivm,
+ /* context[0].textures[unit].member */
+ indices[3] = lp_build_const_int32(gallivm, member_index);
+
+- ptr = LLVMBuildGEP(builder, context_ptr, indices, ARRAY_SIZE(indices), "");
++ ptr = LLVMBuildGEP2(builder, context_type, context_ptr, indices, ARRAY_SIZE(indices), "");
+
+ if (emit_load)
+ res = LLVMBuildLoad(builder, ptr, "");
+@@ -151,6 +152,7 @@ draw_llvm_texture_member(struct gallivm_state *gallivm,
+ */
+ static LLVMValueRef
+ draw_llvm_sampler_member(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned sampler_unit,
+ unsigned member_index,
+@@ -173,7 +175,7 @@ draw_llvm_sampler_member(struct gallivm_state *gallivm,
+ /* context[0].samplers[unit].member */
+ indices[3] = lp_build_const_int32(gallivm, member_index);
+
+- ptr = LLVMBuildGEP(builder, context_ptr, indices, ARRAY_SIZE(indices), "");
++ ptr = LLVMBuildGEP2(builder, context_type, context_ptr, indices, ARRAY_SIZE(indices), "");
+
+ if (emit_load)
+ res = LLVMBuildLoad(builder, ptr, "");
+@@ -195,6 +197,7 @@ draw_llvm_sampler_member(struct gallivm_state *gallivm,
+ */
+ static LLVMValueRef
+ draw_llvm_image_member(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned image_unit,
+ LLVMValueRef image_unit_offset,
+@@ -223,7 +226,7 @@ draw_llvm_image_member(struct gallivm_state *gallivm,
+ /* context[0].textures[unit].member */
+ indices[3] = lp_build_const_int32(gallivm, member_index);
+
+- ptr = LLVMBuildGEP(builder, context_ptr, indices, ARRAY_SIZE(indices), "");
++ ptr = LLVMBuildGEP2(builder, context_type, context_ptr, indices, ARRAY_SIZE(indices), "");
+
+ if (emit_load)
+ res = LLVMBuildLoad(builder, ptr, "");
+@@ -247,11 +250,12 @@ draw_llvm_image_member(struct gallivm_state *gallivm,
+ #define DRAW_LLVM_TEXTURE_MEMBER(_name, _index, _emit_load) \
+ static LLVMValueRef \
+ draw_llvm_texture_##_name( struct gallivm_state *gallivm, \
++ LLVMTypeRef context_type, \
+ LLVMValueRef context_ptr, \
+ unsigned texture_unit, \
+ LLVMValueRef texture_unit_offset) \
+ { \
+- return draw_llvm_texture_member(gallivm, context_ptr, \
++ return draw_llvm_texture_member(gallivm, context_type, context_ptr, \
+ texture_unit, texture_unit_offset, \
+ _index, #_name, _emit_load ); \
+ }
+@@ -272,10 +276,11 @@ DRAW_LLVM_TEXTURE_MEMBER(sample_stride, DRAW_JIT_TEXTURE_SAMPLE_STRIDE, TRUE)
+ #define DRAW_LLVM_SAMPLER_MEMBER(_name, _index, _emit_load) \
+ static LLVMValueRef \
+ draw_llvm_sampler_##_name( struct gallivm_state *gallivm, \
++ LLVMTypeRef context_type, \
+ LLVMValueRef context_ptr, \
+ unsigned sampler_unit) \
+ { \
+- return draw_llvm_sampler_member(gallivm, context_ptr, \
++ return draw_llvm_sampler_member(gallivm, context_type, context_ptr, \
+ sampler_unit, _index, #_name, _emit_load ); \
+ }
+
+@@ -289,10 +294,11 @@ DRAW_LLVM_SAMPLER_MEMBER(max_aniso, DRAW_JIT_SAMPLER_MAX_ANISO, TRUE)
+ #define DRAW_LLVM_IMAGE_MEMBER(_name, _index, _emit_load) \
+ static LLVMValueRef \
+ draw_llvm_image_##_name( struct gallivm_state *gallivm, \
++ LLVMTypeRef context_type, \
+ LLVMValueRef context_ptr, \
+ unsigned image_unit, LLVMValueRef image_unit_offset) \
+ { \
+- return draw_llvm_image_member(gallivm, context_ptr, \
++ return draw_llvm_image_member(gallivm, context_type, context_ptr, \
+ image_unit, image_unit_offset, \
+ _index, #_name, _emit_load ); \
+ }
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.h b/src/gallium/auxiliary/gallivm/lp_bld_nir.h
+index 922208d8603d5..727837e9a5390 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_nir.h
++++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.h
+@@ -246,7 +246,9 @@ struct lp_build_nir_soa_context
+ LLVMValueRef consts_sizes[LP_MAX_TGSI_CONST_BUFFERS];
+ const LLVMValueRef (*inputs)[TGSI_NUM_CHANNELS];
+ LLVMValueRef (*outputs)[TGSI_NUM_CHANNELS];
++ LLVMTypeRef context_type;
+ LLVMValueRef context_ptr;
++ LLVMTypeRef thread_data_type;
+ LLVMValueRef thread_data_ptr;
+
+ LLVMValueRef ssbo_ptr;
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
+index dafbffb344833..443bf4fea8afd 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
+@@ -1613,7 +1613,9 @@ static void emit_image_op(struct lp_build_nir_context *bld_base,
+ struct gallivm_state *gallivm = bld_base->base.gallivm;
+
+ params->type = bld_base->base.type;
++ params->context_type = bld->context_type;
+ params->context_ptr = bld->context_ptr;
++ params->thread_data_type = bld->thread_data_type;
+ params->thread_data_ptr = bld->thread_data_ptr;
+ params->exec_mask = mask_vec(bld_base);
+
+@@ -1634,6 +1636,7 @@ static void emit_image_size(struct lp_build_nir_context *bld_base,
+ struct gallivm_state *gallivm = bld_base->base.gallivm;
+
+ params->int_type = bld_base->int_bld.type;
++ params->context_type = bld->context_type;
+ params->context_ptr = bld->context_ptr;
+
+ if (params->texture_unit_offset)
+@@ -1691,7 +1694,9 @@ static void emit_tex(struct lp_build_nir_context *bld_base,
+ LLVMBuilderRef builder = bld_base->base.gallivm->builder;
+
+ params->type = bld_base->base.type;
++ params->context_type = bld->context_type;
+ params->context_ptr = bld->context_ptr;
++ params->thread_data_type = bld->thread_data_type;
+ params->thread_data_ptr = bld->thread_data_ptr;
+
+ if (params->texture_index_offset && bld_base->shader->info.stage != MESA_SHADER_FRAGMENT) {
+@@ -1774,6 +1779,7 @@ static void emit_tex_size(struct lp_build_nir_context *bld_base,
+ struct lp_build_nir_soa_context *bld = (struct lp_build_nir_soa_context *)bld_base;
+
+ params->int_type = bld_base->int_bld.type;
++ params->context_type = bld->context_type;
+ params->context_ptr = bld->context_ptr;
+
+ if (params->texture_unit_offset)
+@@ -2847,7 +2853,9 @@ void lp_build_nir_soa(struct gallivm_state *gallivm,
+ bld.sampler = params->sampler;
+ // bld.bld_base.info = params->info;
+
++ bld.context_type = params->context_type;
+ bld.context_ptr = params->context_ptr;
++ bld.thread_data_type = params->thread_data_type;
+ bld.thread_data_ptr = params->thread_data_ptr;
+ bld.bld_base.aniso_filter_table = params->aniso_filter_table;
+ bld.image = params->image;
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+index bb7b422346575..cdbf737031a8c 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+@@ -266,7 +266,7 @@ lp_build_pmin(struct lp_build_sample_context *bld,
+ boolean pmin_per_quad = pmin_bld->type.length != length;
+ unsigned i;
+
+- first_level = bld->dynamic_state->first_level(bld->gallivm,
++ first_level = bld->dynamic_state->first_level(bld->gallivm, bld->context_type,
+ bld->context_ptr, texture_unit, NULL);
+ first_level_vec = lp_build_broadcast_scalar(int_size_bld, first_level);
+ int_size = lp_build_minify(int_size_bld, bld->int_size, first_level_vec, TRUE);
+@@ -376,7 +376,7 @@ lp_build_rho(struct lp_build_sample_context *bld,
+ * the messy cube maps for now) when requested.
+ */
+
+- first_level = bld->dynamic_state->first_level(bld->gallivm,
++ first_level = bld->dynamic_state->first_level(bld->gallivm, bld->context_type,
+ bld->context_ptr, texture_unit, NULL);
+ first_level_vec = lp_build_broadcast_scalar(int_size_bld, first_level);
+ int_size = lp_build_minify(int_size_bld, bld->int_size, first_level_vec, TRUE);
+@@ -854,7 +854,7 @@ lp_build_lod_selector(struct lp_build_sample_context *bld,
+ * This is hit during mipmap generation.
+ */
+ LLVMValueRef min_lod =
+- dynamic_state->min_lod(bld->gallivm,
++ dynamic_state->min_lod(bld->gallivm, bld->context_type,
+ bld->context_ptr, sampler_unit);
+
+ lod = lp_build_broadcast_scalar(lodf_bld, min_lod);
+@@ -952,7 +952,7 @@ lp_build_lod_selector(struct lp_build_sample_context *bld,
+ /* add sampler lod bias */
+ if (bld->static_sampler_state->lod_bias_non_zero) {
+ LLVMValueRef sampler_lod_bias =
+- dynamic_state->lod_bias(bld->gallivm,
++ dynamic_state->lod_bias(bld->gallivm, bld->context_type,
+ bld->context_ptr, sampler_unit);
+ sampler_lod_bias = lp_build_broadcast_scalar(lodf_bld,
+ sampler_lod_bias);
+@@ -966,7 +966,7 @@ lp_build_lod_selector(struct lp_build_sample_context *bld,
+ /* clamp lod */
+ if (bld->static_sampler_state->apply_max_lod) {
+ LLVMValueRef max_lod =
+- dynamic_state->max_lod(bld->gallivm,
++ dynamic_state->max_lod(bld->gallivm, bld->context_type,
+ bld->context_ptr, sampler_unit);
+ max_lod = lp_build_broadcast_scalar(lodf_bld, max_lod);
+
+@@ -974,7 +974,7 @@ lp_build_lod_selector(struct lp_build_sample_context *bld,
+ }
+ if (bld->static_sampler_state->apply_min_lod) {
+ LLVMValueRef min_lod =
+- dynamic_state->min_lod(bld->gallivm,
++ dynamic_state->min_lod(bld->gallivm, bld->context_type,
+ bld->context_ptr, sampler_unit);
+ min_lod = lp_build_broadcast_scalar(lodf_bld, min_lod);
+
+@@ -1032,9 +1032,9 @@ lp_build_nearest_mip_level(struct lp_build_sample_context *bld,
+ struct lp_sampler_dynamic_state *dynamic_state = bld->dynamic_state;
+ LLVMValueRef first_level, last_level, level;
+
+- first_level = dynamic_state->first_level(bld->gallivm,
++ first_level = dynamic_state->first_level(bld->gallivm, bld->context_type,
+ bld->context_ptr, texture_unit, NULL);
+- last_level = dynamic_state->last_level(bld->gallivm,
++ last_level = dynamic_state->last_level(bld->gallivm, bld->context_type,
+ bld->context_ptr, texture_unit, NULL);
+ first_level = lp_build_broadcast_scalar(leveli_bld, first_level);
+ last_level = lp_build_broadcast_scalar(leveli_bld, last_level);
+@@ -1094,9 +1094,9 @@ lp_build_linear_mip_levels(struct lp_build_sample_context *bld,
+
+ assert(bld->num_lods == bld->num_mips);
+
+- first_level = dynamic_state->first_level(bld->gallivm,
++ first_level = dynamic_state->first_level(bld->gallivm, bld->context_type,
+ bld->context_ptr, texture_unit, NULL);
+- last_level = dynamic_state->last_level(bld->gallivm,
++ last_level = dynamic_state->last_level(bld->gallivm, bld->context_type,
+ bld->context_ptr, texture_unit, NULL);
+ first_level = lp_build_broadcast_scalar(leveli_bld, first_level);
+ last_level = lp_build_broadcast_scalar(leveli_bld, last_level);
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.h b/src/gallium/auxiliary/gallivm/lp_bld_sample.h
+index 91d946545c81c..ecebc8fc631fe 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.h
++++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.h
+@@ -109,7 +109,9 @@ struct lp_sampler_params
+ unsigned sampler_index;
+ LLVMValueRef texture_index_offset;
+ unsigned sample_key;
++ LLVMTypeRef context_type;
+ LLVMValueRef context_ptr;
++ LLVMTypeRef thread_data_type;
+ LLVMValueRef thread_data_ptr;
+ const LLVMValueRef *coords;
+ const LLVMValueRef *offsets;
+@@ -127,6 +129,7 @@ struct lp_sampler_size_query_params
+ unsigned texture_unit;
+ LLVMValueRef texture_unit_offset;
+ unsigned target;
++ LLVMTypeRef context_type;
+ LLVMValueRef context_ptr;
+ boolean is_sviewinfo;
+ bool samples_only;
+@@ -149,7 +152,9 @@ struct lp_img_params
+ unsigned target;
+ LLVMAtomicRMWBinOp op;
+ LLVMValueRef exec_mask;
++ LLVMTypeRef context_type;
+ LLVMValueRef context_ptr;
++ LLVMTypeRef thread_data_type;
+ LLVMValueRef thread_data_ptr;
+ const LLVMValueRef *coords;
+ LLVMValueRef ms_index;
+@@ -230,66 +235,77 @@ struct lp_sampler_dynamic_state
+ /** Obtain the base texture width (or number of elements) (returns int32) */
+ LLVMValueRef
+ (*width)(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
+
+ /** Obtain the base texture height (returns int32) */
+ LLVMValueRef
+ (*height)(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
+
+ /** Obtain the base texture depth (or array size) (returns int32) */
+ LLVMValueRef
+ (*depth)(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
+
+ /** Obtain the first mipmap level (base level) (returns int32) */
+ LLVMValueRef
+ (*first_level)(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
+
+ /** Obtain the number of mipmap levels minus one (returns int32) */
+ LLVMValueRef
+ (*last_level)(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
+
+ /** Obtain stride in bytes between image rows/blocks (returns int32) */
+ LLVMValueRef
+ (*row_stride)(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
+
+ /** Obtain stride in bytes between image slices (returns int32) */
+ LLVMValueRef
+ (*img_stride)(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
+
+ /** Obtain pointer to base of texture */
+ LLVMValueRef
+ (*base_ptr)(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
+
+ /** Obtain pointer to array of mipmap offsets */
+ LLVMValueRef
+ (*mip_offsets)(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
+
+ /** Obtain number of samples (returns int32) */
+ LLVMValueRef
+ (*num_samples)(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
+
+ /** Obtain multisample stride (returns int32) */
+ LLVMValueRef
+ (*sample_stride)(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned texture_unit, LLVMValueRef texture_unit_offset);
+
+@@ -298,30 +314,35 @@ struct lp_sampler_dynamic_state
+ /** Obtain texture min lod (returns float) */
+ LLVMValueRef
+ (*min_lod)(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned sampler_unit);
+
+ /** Obtain texture max lod (returns float) */
+ LLVMValueRef
+ (*max_lod)(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned sampler_unit);
+
+ /** Obtain texture lod bias (returns float) */
+ LLVMValueRef
+ (*lod_bias)(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned sampler_unit);
+
+ /** Obtain texture border color (returns ptr to float[4]) */
+ LLVMValueRef
+ (*border_color)(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned sampler_unit);
+
+ /** Obtain maximum anisotropy */
+ LLVMValueRef
+ (*max_aniso)(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned sampler_unit);
+
+@@ -332,6 +353,7 @@ struct lp_sampler_dynamic_state
+ */
+ LLVMValueRef
+ (*cache_ptr)(struct gallivm_state *gallivm,
++ LLVMTypeRef thread_data_type,
+ LLVMValueRef thread_data_ptr,
+ unsigned unit);
+ };
+@@ -440,6 +462,7 @@ struct lp_build_sample_context
+
+ LLVMValueRef border_color_clamped;
+
++ LLVMTypeRef context_type;
+ LLVMValueRef context_ptr;
+
+ LLVMValueRef aniso_filter_table;
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+index bf0453b3de284..c24833dafe123 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+@@ -2046,7 +2046,7 @@ lp_build_layer_coord(struct lp_build_sample_context *bld,
+ LLVMValueRef num_layers;
+ struct lp_build_context *int_coord_bld = &bld->int_coord_bld;
+
+- num_layers = bld->dynamic_state->depth(bld->gallivm,
++ num_layers = bld->dynamic_state->depth(bld->gallivm, bld->context_type,
+ bld->context_ptr, texture_unit, NULL);
+
+ if (out_of_bounds) {
+@@ -2611,6 +2611,7 @@ lp_build_sample_common(struct lp_build_sample_context *bld,
+
+ if (aniso)
+ max_aniso = bld->dynamic_state->max_aniso(bld->gallivm,
++ bld->context_type,
+ bld->context_ptr,
+ sampler_index);
+
+@@ -2625,9 +2626,11 @@ lp_build_sample_common(struct lp_build_sample_context *bld,
+ if (is_lodq) {
+ LLVMValueRef last_level;
+ last_level = bld->dynamic_state->last_level(bld->gallivm,
++ bld->context_type,
+ bld->context_ptr,
+ texture_index, NULL);
+ first_level = bld->dynamic_state->first_level(bld->gallivm,
++ bld->context_type,
+ bld->context_ptr,
+ texture_index, NULL);
+ last_level = lp_build_sub(&bld->int_bld, last_level, first_level);
+@@ -2674,7 +2677,9 @@ lp_build_sample_common(struct lp_build_sample_context *bld,
+ unreachable("Bad mip_filter value in lp_build_sample_soa()");
+ case PIPE_TEX_MIPFILTER_NONE:
+ /* always use mip level 0 */
+- first_level = bld->dynamic_state->first_level(bld->gallivm, bld->context_ptr,
++ first_level = bld->dynamic_state->first_level(bld->gallivm,
++ bld->context_type,
++ bld->context_ptr,
+ texture_index, NULL);
+ first_level = lp_build_broadcast_scalar(&bld->leveli_bld, first_level);
+ *ilevel0 = first_level;
+@@ -2702,6 +2707,7 @@ lp_build_clamp_border_color(struct lp_build_sample_context *bld,
+ LLVMBuilderRef builder = gallivm->builder;
+ LLVMValueRef border_color_ptr =
+ bld->dynamic_state->border_color(gallivm,
++ bld->context_type,
+ bld->context_ptr, sampler_unit);
+ LLVMValueRef border_color;
+ const struct util_format_description *format_desc = bld->format_desc;
+@@ -3128,6 +3134,7 @@ lp_build_fetch_texel(struct lp_build_sample_context *bld,
+ assert(bld->num_mips == 1);
+ if (bld->static_texture_state->target != PIPE_BUFFER) {
+ ilevel = bld->dynamic_state->first_level(bld->gallivm,
++ bld->context_type,
+ bld->context_ptr, texture_unit, NULL);
+ }
+ else {
+@@ -3197,6 +3204,7 @@ lp_build_fetch_texel(struct lp_build_sample_context *bld,
+ if (bld->fetch_ms) {
+ LLVMValueRef num_samples;
+ num_samples = bld->dynamic_state->num_samples(bld->gallivm,
++ bld->context_type,
+ bld->context_ptr, texture_unit, NULL);
+ out1 = lp_build_cmp(int_coord_bld, PIPE_FUNC_LESS, ms_index, int_coord_bld->zero);
+ out_of_bounds = lp_build_or(int_coord_bld, out_of_bounds, out1);
+@@ -3295,7 +3303,9 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
+ unsigned sample_key,
+ unsigned texture_index,
+ unsigned sampler_index,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
++ LLVMTypeRef thread_data_type,
+ LLVMValueRef thread_data_ptr,
+ const LLVMValueRef *coords,
+ const LLVMValueRef *offsets,
+@@ -3376,6 +3386,7 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
+ /* Setup our build context */
+ memset(&bld, 0, sizeof bld);
+ bld.gallivm = gallivm;
++ bld.context_type = context_type;
+ bld.context_ptr = context_ptr;
+ bld.aniso_filter_table = aniso_filter_table;
+ bld.static_sampler_state = &derived_sampler_state;
+@@ -3559,22 +3570,23 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
+ lp_build_context_init(&bld.lodi_bld, gallivm, bld.lodi_type);
+
+ /* Get the dynamic state */
+- LLVMValueRef tex_width = dynamic_state->width(gallivm,
++ LLVMValueRef tex_width = dynamic_state->width(gallivm, context_type,
+ context_ptr, texture_index,
+ NULL);
+- bld.row_stride_array = dynamic_state->row_stride(gallivm,
++ bld.row_stride_array = dynamic_state->row_stride(gallivm, context_type,
+ context_ptr, texture_index, NULL);
+- bld.img_stride_array = dynamic_state->img_stride(gallivm,
++ bld.img_stride_array = dynamic_state->img_stride(gallivm, context_type,
+ context_ptr, texture_index, NULL);
+- bld.base_ptr = dynamic_state->base_ptr(gallivm,
++ bld.base_ptr = dynamic_state->base_ptr(gallivm, context_type,
+ context_ptr, texture_index, NULL);
+- bld.mip_offsets = dynamic_state->mip_offsets(gallivm,
++ bld.mip_offsets = dynamic_state->mip_offsets(gallivm, context_type,
+ context_ptr, texture_index, NULL);
+
+ if (fetch_ms) {
+ bld.sample_stride =
+ lp_build_broadcast_scalar(&bld.int_coord_bld,
+ dynamic_state->sample_stride(gallivm,
++ context_type,
+ context_ptr,
+ texture_index,
+ NULL));
+@@ -3583,7 +3595,7 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
+ /* Note that mip_offsets is an array[level] of offsets to texture images */
+
+ if (dynamic_state->cache_ptr && thread_data_ptr) {
+- bld.cache = dynamic_state->cache_ptr(gallivm,
++ bld.cache = dynamic_state->cache_ptr(gallivm, thread_data_type,
+ thread_data_ptr, texture_index);
+ }
+
+@@ -3620,7 +3632,7 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
+ LLVMConstInt(i32t, 0, 0), "");
+ if (dims >= 2) {
+ LLVMValueRef tex_height =
+- dynamic_state->height(gallivm,
++ dynamic_state->height(gallivm, context_type,
+ context_ptr, texture_index, NULL);
+ bld.int_size = LLVMBuildInsertElement(builder, bld.int_size,
+ tex_height,
+@@ -3636,7 +3648,7 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
+ LLVMConstInt(i32t, 1, 0), "");
+ if (dims >= 3) {
+ LLVMValueRef tex_depth =
+- dynamic_state->depth(gallivm, context_ptr,
++ dynamic_state->depth(gallivm, context_type, context_ptr,
+ texture_index, NULL);
+ bld.int_size = LLVMBuildInsertElement(builder, bld.int_size,
+ tex_depth,
+@@ -3800,6 +3812,7 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
+ bld4.no_rho_approx = bld.no_rho_approx;
+ bld4.no_brilinear = bld.no_brilinear;
+ bld4.gallivm = bld.gallivm;
++ bld4.context_type = bld.context_type;
+ bld4.context_ptr = bld.context_ptr;
+ bld4.aniso_filter_table = aniso_filter_table;
+ bld4.static_texture_state = bld.static_texture_state;
+@@ -4001,6 +4014,8 @@ lp_build_sample_gen_func(struct gallivm_state *gallivm,
+ const struct lp_static_sampler_state *static_sampler_state,
+ struct lp_sampler_dynamic_state *dynamic_state,
+ struct lp_type type,
++ LLVMTypeRef context_type,
++ LLVMTypeRef thread_data_type,
+ unsigned texture_index,
+ unsigned sampler_index,
+ LLVMValueRef function,
+@@ -4106,7 +4121,9 @@ lp_build_sample_gen_func(struct gallivm_state *gallivm,
+ sample_key,
+ texture_index,
+ sampler_index,
++ context_type,
+ context_ptr,
++ thread_data_type,
+ thread_data_ptr,
+ coords,
+ offsets,
+@@ -4254,6 +4271,8 @@ lp_build_sample_soa_func(struct gallivm_state *gallivm,
+ static_sampler_state,
+ dynamic_state,
+ params->type,
++ params->context_type,
++ params->thread_data_type,
+ texture_index,
+ sampler_index,
+ function,
+@@ -4376,7 +4395,9 @@ lp_build_sample_soa(const struct lp_static_texture_state *static_texture_state,
+ params->sample_key,
+ params->texture_index,
+ params->sampler_index,
++ params->context_type,
+ params->context_ptr,
++ params->thread_data_type,
+ params->thread_data_ptr,
+ params->coords,
+ params->offsets,
+@@ -4397,6 +4418,7 @@ lp_build_size_query_soa(struct gallivm_state *gallivm,
+ {
+ LLVMValueRef first_level = NULL;
+ const unsigned num_lods = 1;
++ LLVMTypeRef context_type = params->context_type;
+ LLVMValueRef context_ptr = params->context_ptr;
+ const unsigned texture_unit = params->texture_unit;
+ const enum pipe_texture_target target = params->target;
+@@ -4459,6 +4481,7 @@ lp_build_size_query_soa(struct gallivm_state *gallivm,
+ lp_build_broadcast(gallivm,
+ lp_build_vec_type(gallivm, params->int_type),
+ dynamic_state->num_samples(gallivm,
++ context_type,
+ context_ptr,
+ texture_unit,
+ texture_unit_offset));
+@@ -4471,7 +4494,7 @@ lp_build_size_query_soa(struct gallivm_state *gallivm,
+ /* FIXME: this needs to honor per-element lod */
+ lod = LLVMBuildExtractElement(gallivm->builder, params->explicit_lod,
+ lp_build_const_int32(gallivm, 0), "");
+- first_level = dynamic_state->first_level(gallivm,
++ first_level = dynamic_state->first_level(gallivm, context_type,
+ context_ptr, texture_unit,
+ texture_unit_offset);
+ level = LLVMBuildAdd(gallivm->builder, lod, first_level, "level");
+@@ -4497,6 +4520,7 @@ lp_build_size_query_soa(struct gallivm_state *gallivm,
+ res_bh = bh = 1;
+ size = LLVMBuildInsertElement(gallivm->builder, size,
+ dynamic_state->width(gallivm,
++ context_type,
+ context_ptr,
+ texture_unit,
+ texture_unit_offset),
+@@ -4512,7 +4536,9 @@ lp_build_size_query_soa(struct gallivm_state *gallivm,
+ lp_build_const_int32(gallivm, 0), "");
+ if (dims >= 2) {
+ size = LLVMBuildInsertElement(gallivm->builder, size,
+- dynamic_state->height(gallivm, context_ptr,
++ dynamic_state->height(gallivm,
++ context_type,
++ context_ptr,
+ texture_unit,
+ texture_unit_offset),
+ lp_build_const_int32(gallivm, 1), "");
+@@ -4530,6 +4556,7 @@ lp_build_size_query_soa(struct gallivm_state *gallivm,
+ if (dims >= 3) {
+ size = LLVMBuildInsertElement(gallivm->builder, size,
+ dynamic_state->depth(gallivm,
++ context_type,
+ context_ptr,
+ texture_unit,
+ texture_unit_offset),
+@@ -4550,7 +4577,7 @@ lp_build_size_query_soa(struct gallivm_state *gallivm,
+ tex_blocksize_log2, view_blocksize);
+
+ if (has_array) {
+- LLVMValueRef layers = dynamic_state->depth(gallivm,
++ LLVMValueRef layers = dynamic_state->depth(gallivm, context_type,
+ context_ptr, texture_unit,
+ texture_unit_offset);
+ if (target == PIPE_TEXTURE_CUBE_ARRAY) {
+@@ -4577,7 +4604,7 @@ lp_build_size_query_soa(struct gallivm_state *gallivm,
+
+ /* everything is scalar for now */
+ lp_build_context_init(&leveli_bld, gallivm, lp_type_int_vec(32, 32));
+- last_level = dynamic_state->last_level(gallivm,
++ last_level = dynamic_state->last_level(gallivm, context_type,
+ context_ptr, texture_unit,
+ texture_unit_offset);
+
+@@ -4624,7 +4651,7 @@ lp_build_size_query_soa(struct gallivm_state *gallivm,
+ else {
+ LLVMValueRef last_level;
+
+- last_level = dynamic_state->last_level(gallivm,
++ last_level = dynamic_state->last_level(gallivm, context_type,
+ context_ptr, texture_unit,
+ texture_unit_offset);
+ num_levels = lp_build_sub(&bld_int_scalar, last_level, first_level);
+@@ -4784,31 +4811,39 @@ lp_build_img_op_soa(const struct lp_static_texture_state *static_texture_state,
+ }
+
+ LLVMValueRef row_stride = dynamic_state->row_stride(gallivm,
++ params->context_type,
+ params->context_ptr,
+ params->image_index, NULL);
+ LLVMValueRef img_stride = dynamic_state->img_stride(gallivm,
++ params->context_type,
+ params->context_ptr,
+ params->image_index, NULL);
+ LLVMValueRef base_ptr = dynamic_state->base_ptr(gallivm,
++ params->context_type,
+ params->context_ptr,
+ params->image_index, NULL);
+ LLVMValueRef width = dynamic_state->width(gallivm,
+- params->context_ptr,
++ params->context_type,
++ params->context_ptr,
+ params->image_index, NULL);
+ LLVMValueRef height = dynamic_state->height(gallivm,
++ params->context_type,
+ params->context_ptr,
+ params->image_index, NULL);
+ LLVMValueRef depth = dynamic_state->depth(gallivm,
+- params->context_ptr,
++ params->context_type,
++ params->context_ptr,
+ params->image_index, NULL);
+ LLVMValueRef num_samples = NULL, sample_stride = NULL;
+
+ LLVMValueRef ms_index = params->ms_index;
+ if (ms_index) {
+ num_samples = dynamic_state->num_samples(gallivm,
++ params->context_type,
+ params->context_ptr,
+ params->image_index, NULL);
+ sample_stride = dynamic_state->sample_stride(gallivm,
++ params->context_type,
+ params->context_ptr,
+ params->image_index, NULL);
+ }
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
+index 31067e0165491..d335a92388fe4 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
++++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
+@@ -267,7 +267,9 @@ struct lp_build_tgsi_params {
+ LLVMValueRef const_sizes_ptr;
+ const struct lp_bld_tgsi_system_values *system_values;
+ const LLVMValueRef (*inputs)[4];
++ LLVMTypeRef context_type;
+ LLVMValueRef context_ptr;
++ LLVMTypeRef thread_data_type;
+ LLVMValueRef thread_data_ptr;
+ const struct lp_build_sampler_soa *sampler;
+ const struct tgsi_shader_info *info;
+@@ -521,7 +523,9 @@ struct lp_build_tgsi_soa_context
+ LLVMValueRef consts_sizes[LP_MAX_TGSI_CONST_BUFFERS];
+ const LLVMValueRef (*inputs)[TGSI_NUM_CHANNELS];
+ LLVMValueRef (*outputs)[TGSI_NUM_CHANNELS];
++ LLVMTypeRef context_type;
+ LLVMValueRef context_ptr;
++ LLVMTypeRef thread_data_type;
+ LLVMValueRef thread_data_ptr;
+
+ LLVMValueRef ssbo_ptr;
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+index f33de194484a0..d98d20e11e5d3 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+@@ -2273,7 +2273,9 @@ emit_tex( struct lp_build_tgsi_soa_context *bld,
+ params.sample_key = sample_key;
+ params.texture_index = unit;
+ params.sampler_index = unit;
++ params.context_type = bld->context_type;
+ params.context_ptr = bld->context_ptr;
++ params.thread_data_type = bld->thread_data_type;
+ params.thread_data_ptr = bld->thread_data_ptr;
+ params.coords = coords;
+ params.offsets = offsets;
+@@ -2442,7 +2444,9 @@ emit_sample(struct lp_build_tgsi_soa_context *bld,
+ params.sample_key = sample_key;
+ params.texture_index = texture_unit;
+ params.sampler_index = sampler_unit;
++ params.context_type = bld->context_type;
+ params.context_ptr = bld->context_ptr;
++ params.thread_data_type = bld->thread_data_type;
+ params.thread_data_ptr = bld->thread_data_ptr;
+ params.coords = coords;
+ params.offsets = offsets;
+@@ -2580,7 +2584,9 @@ emit_fetch_texels( struct lp_build_tgsi_soa_context *bld,
+ * can exceed this.
+ */
+ params.sampler_index = 0;
++ params.context_type = bld->context_type;
+ params.context_ptr = bld->context_ptr;
++ params.thread_data_type = bld->thread_data_type;
+ params.thread_data_ptr = bld->thread_data_ptr;
+ params.coords = coords;
+ params.offsets = offsets;
+@@ -2665,6 +2671,7 @@ emit_size_query( struct lp_build_tgsi_soa_context *bld,
+ params.texture_unit = unit;
+ params.texture_unit_offset = NULL;
+ params.target = pipe_target;
++ params.context_type = bld->context_type;
+ params.context_ptr = bld->context_ptr;
+ params.is_sviewinfo = TRUE;
+ params.lod_property = lod_property;
+@@ -3453,7 +3460,9 @@ img_load_emit(
+ memset(&params, 0, sizeof(params));
+
+ params.type = bld->bld_base.base.type;
++ params.context_type = bld->context_type;
+ params.context_ptr = bld->context_ptr;
++ params.thread_data_type = bld->thread_data_type;
+ params.thread_data_ptr = bld->thread_data_ptr;
+ params.coords = coords;
+ params.outdata = emit_data->output;
+@@ -3601,7 +3610,9 @@ img_store_emit(
+ memset(&params, 0, sizeof(params));
+
+ params.type = bld->bld_base.base.type;
++ params.context_type = bld->context_type;
+ params.context_ptr = bld->context_ptr;
++ params.thread_data_type = bld->thread_data_type;
+ params.thread_data_ptr = bld->thread_data_ptr;
+ params.coords = coords;
+ params.outdata = NULL;
+@@ -3710,6 +3721,7 @@ resq_emit(
+ params.int_type = bld->bld_base.int_bld.type;
+ params.texture_unit = buf;
+ params.target = tgsi_to_pipe_tex_target(target);
++ params.context_type = bld->context_type;
+ params.context_ptr = bld->context_ptr;
+ params.sizes_out = emit_data->output;
+
+@@ -3751,7 +3763,9 @@ img_atomic_emit(
+ memset(&params, 0, sizeof(params));
+
+ params.type = bld->bld_base.base.type;
++ params.context_type = bld->context_type;
+ params.context_ptr = bld->context_ptr;
++ params.thread_data_type = bld->thread_data_type;
+ params.thread_data_ptr = bld->thread_data_ptr;
+ params.exec_mask = mask_vec(bld_base);
+ params.image_index = emit_data->inst->Src[0].Register.Index;
+@@ -4483,7 +4497,9 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm,
+ bld.sampler = params->sampler;
+ bld.bld_base.info = params->info;
+ bld.indirect_files = params->info->indirect_files;
++ bld.context_type = params->context_type;
+ bld.context_ptr = params->context_ptr;
++ bld.thread_data_type = params->thread_data_type;
+ bld.thread_data_ptr = params->thread_data_ptr;
+ bld.image = params->image;
+ bld.shared_ptr = params->shared_ptr;
+diff --git a/src/gallium/drivers/llvmpipe/lp_state_cs.c b/src/gallium/drivers/llvmpipe/lp_state_cs.c
+index 86f7b65585ae5..22ac92e1fb7da 100644
+--- a/src/gallium/drivers/llvmpipe/lp_state_cs.c
++++ b/src/gallium/drivers/llvmpipe/lp_state_cs.c
+@@ -447,6 +447,7 @@ generate_compute(struct llvmpipe_context *lp,
+ params.mask = &mask;
+ params.consts_ptr = consts_ptr;
+ params.system_values = &system_values;
++ params.context_type = variant->jit_cs_context_type;
+ params.context_ptr = context_ptr;
+ params.sampler = sampler;
+ params.info = &shader->info.base;
+diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+index d1dbd9d787dc1..e10e10836faa3 100644
+--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
++++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
+@@ -1052,7 +1052,9 @@ generate_fs_loop(struct gallivm_state *gallivm,
+ params.consts_ptr = consts_ptr;
+ params.system_values = &system_values;
+ params.inputs = interp->inputs;
++ params.context_type = context_type;
+ params.context_ptr = context_ptr;
++ params.thread_data_type = thread_data_type;
+ params.thread_data_ptr = thread_data_ptr;
+ params.sampler = sampler;
+ params.info = &shader->info.base;
+diff --git a/src/gallium/drivers/llvmpipe/lp_tex_sample.c b/src/gallium/drivers/llvmpipe/lp_tex_sample.c
+index 0812bc72cd098..8700eda253332 100644
+--- a/src/gallium/drivers/llvmpipe/lp_tex_sample.c
++++ b/src/gallium/drivers/llvmpipe/lp_tex_sample.c
+@@ -110,6 +110,7 @@ struct lp_llvm_image_soa
+ */
+ static LLVMValueRef
+ lp_llvm_texture_member(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned texture_unit,
+ LLVMValueRef texture_unit_offset,
+@@ -144,7 +145,7 @@ lp_llvm_texture_member(struct gallivm_state *gallivm,
+ indices[3] = lp_build_const_int32(gallivm, member_index);
+
+ LLVMValueRef ptr =
+- LLVMBuildGEP(builder, context_ptr, indices, ARRAY_SIZE(indices), "");
++ LLVMBuildGEP2(builder, context_type, context_ptr, indices, ARRAY_SIZE(indices), "");
+
+ LLVMValueRef res = emit_load ? LLVMBuildLoad(builder, ptr, "") : ptr;
+
+@@ -166,11 +167,12 @@ lp_llvm_texture_member(struct gallivm_state *gallivm,
+ #define LP_LLVM_TEXTURE_MEMBER(_name, _index, _emit_load) \
+ static LLVMValueRef \
+ lp_llvm_texture_##_name(struct gallivm_state *gallivm, \
++ LLVMTypeRef context_type, \
+ LLVMValueRef context_ptr, \
+ unsigned texture_unit, \
+ LLVMValueRef texture_unit_offset) \
+ { \
+- return lp_llvm_texture_member(gallivm, context_ptr, \
++ return lp_llvm_texture_member(gallivm, context_type, context_ptr, \
+ texture_unit, texture_unit_offset, \
+ _index, #_name, _emit_load ); \
+ }
+@@ -199,6 +201,7 @@ LP_LLVM_TEXTURE_MEMBER(sample_stride, LP_JIT_TEXTURE_SAMPLE_STRIDE, TRUE)
+ */
+ static LLVMValueRef
+ lp_llvm_sampler_member(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned sampler_unit,
+ unsigned member_index,
+@@ -220,7 +223,7 @@ lp_llvm_sampler_member(struct gallivm_state *gallivm,
+ indices[3] = lp_build_const_int32(gallivm, member_index);
+
+ LLVMValueRef ptr =
+- LLVMBuildGEP(builder, context_ptr, indices, ARRAY_SIZE(indices), "");
++ LLVMBuildGEP2(builder, context_type, context_ptr, indices, ARRAY_SIZE(indices), "");
+
+ LLVMValueRef res = emit_load ? LLVMBuildLoad(builder, ptr, "") : ptr;
+
+@@ -233,10 +236,11 @@ lp_llvm_sampler_member(struct gallivm_state *gallivm,
+ #define LP_LLVM_SAMPLER_MEMBER(_name, _index, _emit_load) \
+ static LLVMValueRef \
+ lp_llvm_sampler_##_name( struct gallivm_state *gallivm, \
++ LLVMTypeRef context_type, \
+ LLVMValueRef context_ptr, \
+ unsigned sampler_unit) \
+ { \
+- return lp_llvm_sampler_member(gallivm, context_ptr, \
++ return lp_llvm_sampler_member(gallivm, context_type, context_ptr, \
+ sampler_unit, _index, #_name, _emit_load ); \
+ }
+
+@@ -258,6 +262,7 @@ LP_LLVM_SAMPLER_MEMBER(max_aniso, LP_JIT_SAMPLER_MAX_ANISO, TRUE)
+ */
+ static LLVMValueRef
+ lp_llvm_image_member(struct gallivm_state *gallivm,
++ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+ unsigned image_unit,
+ LLVMValueRef image_unit_offset,
+@@ -285,7 +290,7 @@ lp_llvm_image_member(struct gallivm_state *gallivm,
+ indices[3] = lp_build_const_int32(gallivm, member_index);
+
+ LLVMValueRef ptr =
+- LLVMBuildGEP(builder, context_ptr, indices, ARRAY_SIZE(indices), "");
++ LLVMBuildGEP2(builder, context_type, context_ptr, indices, ARRAY_SIZE(indices), "");
+
+ LLVMValueRef res = emit_load ? LLVMBuildLoad(builder, ptr, "") : ptr;
+
+@@ -307,10 +312,11 @@ lp_llvm_image_member(struct gallivm_state *gallivm,
+ #define LP_LLVM_IMAGE_MEMBER(_name, _index, _emit_load) \
+ static LLVMValueRef \
+ lp_llvm_image_##_name( struct gallivm_state *gallivm, \
++ LLVMTypeRef context_type, \
+ LLVMValueRef context_ptr, \
+ unsigned image_unit, LLVMValueRef image_unit_offset) \
+ { \
+- return lp_llvm_image_member(gallivm, context_ptr, \
++ return lp_llvm_image_member(gallivm, context_type, context_ptr, \
+ image_unit, image_unit_offset, \
+ _index, #_name, _emit_load ); \
+ }
+@@ -329,13 +335,14 @@ LP_LLVM_IMAGE_MEMBER(sample_stride, LP_JIT_IMAGE_SAMPLE_STRIDE, TRUE)
+ #if LP_USE_TEXTURE_CACHE
+ static LLVMValueRef
+ lp_llvm_texture_cache_ptr(struct gallivm_state *gallivm,
++ LLVMTypeRef thread_data_type,
+ LLVMValueRef thread_data_ptr,
+ unsigned unit)
+ {
+ /* We use the same cache for all units */
+ (void)unit;
+
+- return lp_jit_thread_data_cache(gallivm, LLVMGetElementType(LLVMTypeOf(thread_data_ptr)), thread_data_ptr);
++ return lp_jit_thread_data_cache(gallivm, thread_data_type, thread_data_ptr);
+ }
+ #endif
+
+--
+GitLab
+
+
+From 02c675b1960a11f02b91018c519d9da6b371615b Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Mon, 26 Sep 2022 14:41:20 +1000
+Subject: [PATCH 3/6] draw/llvmpipe: move texture/sampler/image member load to
+ opaque.
+
+This removes the non-opaque paths from the draw/lp sampling code.
+
+Reviewed-by: Mihai Preda <mhpreda@gmail.com>
+Reviewed-by: Roland Scheidegger <sroland@vmware.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>
+---
+ src/gallium/auxiliary/draw/draw_llvm_sample.c | 24 ++++++++++++-------
+ src/gallium/drivers/llvmpipe/lp_tex_sample.c | 24 ++++++++++++++++---
+ 2 files changed, 36 insertions(+), 12 deletions(-)
+
+diff --git a/src/gallium/auxiliary/draw/draw_llvm_sample.c b/src/gallium/auxiliary/draw/draw_llvm_sample.c
+index 5a48fb17caf2b..cde003afcebe6 100644
+--- a/src/gallium/auxiliary/draw/draw_llvm_sample.c
++++ b/src/gallium/auxiliary/draw/draw_llvm_sample.c
+@@ -131,9 +131,11 @@ draw_llvm_texture_member(struct gallivm_state *gallivm,
+
+ ptr = LLVMBuildGEP2(builder, context_type, context_ptr, indices, ARRAY_SIZE(indices), "");
+
+- if (emit_load)
+- res = LLVMBuildLoad(builder, ptr, "");
+- else
++ if (emit_load) {
++ LLVMTypeRef tex_type = LLVMStructGetTypeAtIndex(context_type, DRAW_JIT_CTX_TEXTURES);
++ LLVMTypeRef res_type = LLVMStructGetTypeAtIndex(LLVMGetElementType(tex_type), member_index);
++ res = LLVMBuildLoad2(builder, res_type, ptr, "");
++ } else
+ res = ptr;
+
+ lp_build_name(res, "context.texture%u.%s", texture_unit, member_name);
+@@ -177,9 +179,11 @@ draw_llvm_sampler_member(struct gallivm_state *gallivm,
+
+ ptr = LLVMBuildGEP2(builder, context_type, context_ptr, indices, ARRAY_SIZE(indices), "");
+
+- if (emit_load)
+- res = LLVMBuildLoad(builder, ptr, "");
+- else
++ if (emit_load) {
++ LLVMTypeRef samp_type = LLVMStructGetTypeAtIndex(context_type, DRAW_JIT_CTX_SAMPLERS);
++ LLVMTypeRef res_type = LLVMStructGetTypeAtIndex(LLVMGetElementType(samp_type), member_index);
++ res = LLVMBuildLoad2(builder, res_type, ptr, "");
++ } else
+ res = ptr;
+
+ lp_build_name(res, "context.sampler%u.%s", sampler_unit, member_name);
+@@ -228,9 +232,11 @@ draw_llvm_image_member(struct gallivm_state *gallivm,
+
+ ptr = LLVMBuildGEP2(builder, context_type, context_ptr, indices, ARRAY_SIZE(indices), "");
+
+- if (emit_load)
+- res = LLVMBuildLoad(builder, ptr, "");
+- else
++ if (emit_load) {
++ LLVMTypeRef img_type = LLVMStructGetTypeAtIndex(context_type, DRAW_JIT_CTX_IMAGES);
++ LLVMTypeRef res_type = LLVMStructGetTypeAtIndex(LLVMGetElementType(img_type), member_index);
++ res = LLVMBuildLoad2(builder, res_type, ptr, "");
++ } else
+ res = ptr;
+
+ lp_build_name(res, "context.image%u.%s", image_unit, member_name);
+diff --git a/src/gallium/drivers/llvmpipe/lp_tex_sample.c b/src/gallium/drivers/llvmpipe/lp_tex_sample.c
+index 8700eda253332..e62ec9f6d8915 100644
+--- a/src/gallium/drivers/llvmpipe/lp_tex_sample.c
++++ b/src/gallium/drivers/llvmpipe/lp_tex_sample.c
+@@ -147,7 +147,13 @@ lp_llvm_texture_member(struct gallivm_state *gallivm,
+ LLVMValueRef ptr =
+ LLVMBuildGEP2(builder, context_type, context_ptr, indices, ARRAY_SIZE(indices), "");
+
+- LLVMValueRef res = emit_load ? LLVMBuildLoad(builder, ptr, "") : ptr;
++ LLVMValueRef res;
++ if (emit_load) {
++ LLVMTypeRef tex_type = LLVMStructGetTypeAtIndex(context_type, LP_JIT_CTX_TEXTURES);
++ LLVMTypeRef res_type = LLVMStructGetTypeAtIndex(LLVMGetElementType(tex_type), member_index);
++ res = LLVMBuildLoad2(builder, res_type, ptr, "");
++ } else
++ res = ptr;
+
+ lp_build_name(res, "context.texture%u.%s", texture_unit, member_name);
+
+@@ -225,7 +231,13 @@ lp_llvm_sampler_member(struct gallivm_state *gallivm,
+ LLVMValueRef ptr =
+ LLVMBuildGEP2(builder, context_type, context_ptr, indices, ARRAY_SIZE(indices), "");
+
+- LLVMValueRef res = emit_load ? LLVMBuildLoad(builder, ptr, "") : ptr;
++ LLVMValueRef res;
++ if (emit_load) {
++ LLVMTypeRef samp_type = LLVMStructGetTypeAtIndex(context_type, LP_JIT_CTX_SAMPLERS);
++ LLVMTypeRef res_type = LLVMStructGetTypeAtIndex(LLVMGetElementType(samp_type), member_index);
++ res = LLVMBuildLoad2(builder, res_type, ptr, "");
++ } else
++ res = ptr;
+
+ lp_build_name(res, "context.sampler%u.%s", sampler_unit, member_name);
+
+@@ -292,7 +304,13 @@ lp_llvm_image_member(struct gallivm_state *gallivm,
+ LLVMValueRef ptr =
+ LLVMBuildGEP2(builder, context_type, context_ptr, indices, ARRAY_SIZE(indices), "");
+
+- LLVMValueRef res = emit_load ? LLVMBuildLoad(builder, ptr, "") : ptr;
++ LLVMValueRef res;
++ if (emit_load) {
++ LLVMTypeRef img_type = LLVMStructGetTypeAtIndex(context_type, LP_JIT_CTX_IMAGES);
++ LLVMTypeRef res_type = LLVMStructGetTypeAtIndex(LLVMGetElementType(img_type), member_index);
++ res = LLVMBuildLoad2(builder, res_type, ptr, "");
++ } else
++ res = ptr;
+
+ lp_build_name(res, "context.image%u.%s", image_unit, member_name);
+
+--
+GitLab
+
+
+From 1a9889ae12757e9bdc019cbd109783a3e93121b7 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Mon, 26 Sep 2022 14:59:54 +1000
+Subject: [PATCH 4/6] draw/llvmpipe: add way to return pointer types to generic
+ code.
+
+Some of the generic code tries to load from things it has no
+types for, mip offsets, row and image strides.
+
+Fix the interfaces to allow returning types for these.
+
+Reviewed-by: Mihai Preda <mhpreda@gmail.com>
+Reviewed-by: Roland Scheidegger <sroland@vmware.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>
+---
+ src/gallium/auxiliary/draw/draw_llvm_sample.c | 49 ++++++++++++++++---
+ src/gallium/auxiliary/gallivm/lp_bld_sample.h | 12 +++--
+ .../auxiliary/gallivm/lp_bld_sample_soa.c | 16 ++++--
+ src/gallium/drivers/llvmpipe/lp_tex_sample.c | 49 ++++++++++++++++---
+ 4 files changed, 104 insertions(+), 22 deletions(-)
+
+diff --git a/src/gallium/auxiliary/draw/draw_llvm_sample.c b/src/gallium/auxiliary/draw/draw_llvm_sample.c
+index cde003afcebe6..19e9937d57ac6 100644
+--- a/src/gallium/auxiliary/draw/draw_llvm_sample.c
++++ b/src/gallium/auxiliary/draw/draw_llvm_sample.c
+@@ -106,7 +106,8 @@ draw_llvm_texture_member(struct gallivm_state *gallivm,
+ LLVMValueRef texture_unit_offset,
+ unsigned member_index,
+ const char *member_name,
+- boolean emit_load)
++ boolean emit_load,
++ LLVMTypeRef *out_type)
+ {
+ LLVMBuilderRef builder = gallivm->builder;
+ LLVMValueRef indices[4];
+@@ -138,6 +139,12 @@ draw_llvm_texture_member(struct gallivm_state *gallivm,
+ } else
+ res = ptr;
+
++ if (out_type) {
++ LLVMTypeRef tex_type = LLVMStructGetTypeAtIndex(context_type, DRAW_JIT_CTX_TEXTURES);
++ LLVMTypeRef res_type = LLVMStructGetTypeAtIndex(LLVMGetElementType(tex_type), member_index);
++ *out_type = res_type;
++ }
++
+ lp_build_name(res, "context.texture%u.%s", texture_unit, member_name);
+
+ return res;
+@@ -263,7 +270,21 @@ draw_llvm_image_member(struct gallivm_state *gallivm,
+ { \
+ return draw_llvm_texture_member(gallivm, context_type, context_ptr, \
+ texture_unit, texture_unit_offset, \
+- _index, #_name, _emit_load ); \
++ _index, #_name, _emit_load, NULL ); \
++ }
++
++#define DRAW_LLVM_TEXTURE_MEMBER_OUTTYPE(_name, _index, _emit_load) \
++ static LLVMValueRef \
++ draw_llvm_texture_##_name( struct gallivm_state *gallivm, \
++ LLVMTypeRef context_type, \
++ LLVMValueRef context_ptr, \
++ unsigned texture_unit, \
++ LLVMValueRef texture_unit_offset, \
++ LLVMTypeRef *out_type) \
++ { \
++ return draw_llvm_texture_member(gallivm, context_type, context_ptr, \
++ texture_unit, texture_unit_offset, \
++ _index, #_name, _emit_load, out_type); \
+ }
+
+
+@@ -273,9 +294,9 @@ DRAW_LLVM_TEXTURE_MEMBER(depth, DRAW_JIT_TEXTURE_DEPTH, TRUE)
+ DRAW_LLVM_TEXTURE_MEMBER(first_level,DRAW_JIT_TEXTURE_FIRST_LEVEL, TRUE)
+ DRAW_LLVM_TEXTURE_MEMBER(last_level, DRAW_JIT_TEXTURE_LAST_LEVEL, TRUE)
+ DRAW_LLVM_TEXTURE_MEMBER(base_ptr, DRAW_JIT_TEXTURE_BASE, TRUE)
+-DRAW_LLVM_TEXTURE_MEMBER(row_stride, DRAW_JIT_TEXTURE_ROW_STRIDE, FALSE)
+-DRAW_LLVM_TEXTURE_MEMBER(img_stride, DRAW_JIT_TEXTURE_IMG_STRIDE, FALSE)
+-DRAW_LLVM_TEXTURE_MEMBER(mip_offsets, DRAW_JIT_TEXTURE_MIP_OFFSETS, FALSE)
++DRAW_LLVM_TEXTURE_MEMBER_OUTTYPE(row_stride, DRAW_JIT_TEXTURE_ROW_STRIDE, FALSE)
++DRAW_LLVM_TEXTURE_MEMBER_OUTTYPE(img_stride, DRAW_JIT_TEXTURE_IMG_STRIDE, FALSE)
++DRAW_LLVM_TEXTURE_MEMBER_OUTTYPE(mip_offsets, DRAW_JIT_TEXTURE_MIP_OFFSETS, FALSE)
+ DRAW_LLVM_TEXTURE_MEMBER(num_samples, DRAW_JIT_TEXTURE_NUM_SAMPLES, TRUE)
+ DRAW_LLVM_TEXTURE_MEMBER(sample_stride, DRAW_JIT_TEXTURE_SAMPLE_STRIDE, TRUE)
+
+@@ -309,13 +330,27 @@ DRAW_LLVM_SAMPLER_MEMBER(max_aniso, DRAW_JIT_SAMPLER_MAX_ANISO, TRUE)
+ _index, #_name, _emit_load ); \
+ }
+
++#define DRAW_LLVM_IMAGE_MEMBER_OUTTYPE(_name, _index, _emit_load) \
++ static LLVMValueRef \
++ draw_llvm_image_##_name( struct gallivm_state *gallivm, \
++ LLVMTypeRef context_type, \
++ LLVMValueRef context_ptr, \
++ unsigned image_unit, LLVMValueRef image_unit_offset, \
++ LLVMTypeRef *out_type) \
++ { \
++ assert(!out_type); \
++ return draw_llvm_image_member(gallivm, context_type, context_ptr, \
++ image_unit, image_unit_offset, \
++ _index, #_name, _emit_load); \
++ }
++
+
+ DRAW_LLVM_IMAGE_MEMBER(width, DRAW_JIT_IMAGE_WIDTH, TRUE)
+ DRAW_LLVM_IMAGE_MEMBER(height, DRAW_JIT_IMAGE_HEIGHT, TRUE)
+ DRAW_LLVM_IMAGE_MEMBER(depth, DRAW_JIT_IMAGE_DEPTH, TRUE)
+ DRAW_LLVM_IMAGE_MEMBER(base_ptr, DRAW_JIT_IMAGE_BASE, TRUE)
+-DRAW_LLVM_IMAGE_MEMBER(row_stride, DRAW_JIT_IMAGE_ROW_STRIDE, TRUE)
+-DRAW_LLVM_IMAGE_MEMBER(img_stride, DRAW_JIT_IMAGE_IMG_STRIDE, TRUE)
++DRAW_LLVM_IMAGE_MEMBER_OUTTYPE(row_stride, DRAW_JIT_IMAGE_ROW_STRIDE, TRUE)
++DRAW_LLVM_IMAGE_MEMBER_OUTTYPE(img_stride, DRAW_JIT_IMAGE_IMG_STRIDE, TRUE)
+ DRAW_LLVM_IMAGE_MEMBER(num_samples, DRAW_JIT_IMAGE_NUM_SAMPLES, TRUE)
+ DRAW_LLVM_IMAGE_MEMBER(sample_stride, DRAW_JIT_IMAGE_SAMPLE_STRIDE, TRUE)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.h b/src/gallium/auxiliary/gallivm/lp_bld_sample.h
+index ecebc8fc631fe..caf0ab0907d80 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.h
++++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.h
+@@ -272,14 +272,16 @@ struct lp_sampler_dynamic_state
+ (*row_stride)(struct gallivm_state *gallivm,
+ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+- unsigned texture_unit, LLVMValueRef texture_unit_offset);
++ unsigned texture_unit, LLVMValueRef texture_unit_offset,
++ LLVMTypeRef *out_type);
+
+ /** Obtain stride in bytes between image slices (returns int32) */
+ LLVMValueRef
+ (*img_stride)(struct gallivm_state *gallivm,
+ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+- unsigned texture_unit, LLVMValueRef texture_unit_offset);
++ unsigned texture_unit, LLVMValueRef texture_unit_offset,\
++ LLVMTypeRef *out_type);
+
+ /** Obtain pointer to base of texture */
+ LLVMValueRef
+@@ -293,7 +295,8 @@ struct lp_sampler_dynamic_state
+ (*mip_offsets)(struct gallivm_state *gallivm,
+ LLVMTypeRef context_type,
+ LLVMValueRef context_ptr,
+- unsigned texture_unit, LLVMValueRef texture_unit_offset);
++ unsigned texture_unit, LLVMValueRef texture_unit_offset,
++ LLVMTypeRef *out_type);
+
+ /** Obtain number of samples (returns int32) */
+ LLVMValueRef
+@@ -447,9 +450,12 @@ struct lp_build_sample_context
+ struct lp_build_context lodi_bld;
+
+ /* Common dynamic state values */
++ LLVMTypeRef row_stride_type;
+ LLVMValueRef row_stride_array;
++ LLVMTypeRef img_stride_type;
+ LLVMValueRef img_stride_array;
+ LLVMValueRef base_ptr;
++ LLVMTypeRef mip_offsets_type;
+ LLVMValueRef mip_offsets;
+ LLVMValueRef cache;
+ LLVMValueRef sample_stride;
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+index c24833dafe123..2e90d09ae617f 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+@@ -3574,13 +3574,16 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
+ context_ptr, texture_index,
+ NULL);
+ bld.row_stride_array = dynamic_state->row_stride(gallivm, context_type,
+- context_ptr, texture_index, NULL);
++ context_ptr, texture_index, NULL,
++ &bld.row_stride_type);
+ bld.img_stride_array = dynamic_state->img_stride(gallivm, context_type,
+- context_ptr, texture_index, NULL);
++ context_ptr, texture_index, NULL,
++ &bld.img_stride_type);
+ bld.base_ptr = dynamic_state->base_ptr(gallivm, context_type,
+ context_ptr, texture_index, NULL);
+ bld.mip_offsets = dynamic_state->mip_offsets(gallivm, context_type,
+- context_ptr, texture_index, NULL);
++ context_ptr, texture_index, NULL,
++ &bld.mip_offsets_type);
+
+ if (fetch_ms) {
+ bld.sample_stride =
+@@ -3820,9 +3823,12 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
+ bld4.dynamic_state = bld.dynamic_state;
+ bld4.format_desc = bld.format_desc;
+ bld4.dims = bld.dims;
++ bld4.row_stride_type = bld.row_stride_type;
+ bld4.row_stride_array = bld.row_stride_array;
++ bld4.img_stride_type = bld.img_stride_type;
+ bld4.img_stride_array = bld.img_stride_array;
+ bld4.base_ptr = bld.base_ptr;
++ bld4.mip_offsets_type = bld.mip_offsets_type;
+ bld4.mip_offsets = bld.mip_offsets;
+ bld4.int_size = bld.int_size;
+ bld4.int_tex_blocksize = bld.int_tex_blocksize;
+@@ -4813,11 +4819,11 @@ lp_build_img_op_soa(const struct lp_static_texture_state *static_texture_state,
+ LLVMValueRef row_stride = dynamic_state->row_stride(gallivm,
+ params->context_type,
+ params->context_ptr,
+- params->image_index, NULL);
++ params->image_index, NULL, NULL);
+ LLVMValueRef img_stride = dynamic_state->img_stride(gallivm,
+ params->context_type,
+ params->context_ptr,
+- params->image_index, NULL);
++ params->image_index, NULL, NULL);
+ LLVMValueRef base_ptr = dynamic_state->base_ptr(gallivm,
+ params->context_type,
+ params->context_ptr,
+diff --git a/src/gallium/drivers/llvmpipe/lp_tex_sample.c b/src/gallium/drivers/llvmpipe/lp_tex_sample.c
+index e62ec9f6d8915..ddaea90aecda2 100644
+--- a/src/gallium/drivers/llvmpipe/lp_tex_sample.c
++++ b/src/gallium/drivers/llvmpipe/lp_tex_sample.c
+@@ -116,7 +116,8 @@ lp_llvm_texture_member(struct gallivm_state *gallivm,
+ LLVMValueRef texture_unit_offset,
+ unsigned member_index,
+ const char *member_name,
+- boolean emit_load)
++ boolean emit_load,
++ LLVMTypeRef *out_type)
+ {
+ LLVMBuilderRef builder = gallivm->builder;
+ LLVMValueRef indices[4];
+@@ -155,6 +156,12 @@ lp_llvm_texture_member(struct gallivm_state *gallivm,
+ } else
+ res = ptr;
+
++ if (out_type) {
++ LLVMTypeRef tex_type = LLVMStructGetTypeAtIndex(context_type, LP_JIT_CTX_TEXTURES);
++ LLVMTypeRef res_type = LLVMStructGetTypeAtIndex(LLVMGetElementType(tex_type), member_index);
++ *out_type = res_type;
++ }
++
+ lp_build_name(res, "context.texture%u.%s", texture_unit, member_name);
+
+ return res;
+@@ -180,7 +187,21 @@ lp_llvm_texture_member(struct gallivm_state *gallivm,
+ { \
+ return lp_llvm_texture_member(gallivm, context_type, context_ptr, \
+ texture_unit, texture_unit_offset, \
+- _index, #_name, _emit_load ); \
++ _index, #_name, _emit_load, NULL ); \
++ }
++
++#define LP_LLVM_TEXTURE_MEMBER_OUTTYPE(_name, _index, _emit_load) \
++ static LLVMValueRef \
++ lp_llvm_texture_##_name(struct gallivm_state *gallivm, \
++ LLVMTypeRef context_type, \
++ LLVMValueRef context_ptr, \
++ unsigned texture_unit, \
++ LLVMValueRef texture_unit_offset, \
++ LLVMTypeRef *out_type) \
++ { \
++ return lp_llvm_texture_member(gallivm, context_type, context_ptr, \
++ texture_unit, texture_unit_offset, \
++ _index, #_name, _emit_load, out_type ); \
+ }
+
+
+@@ -190,9 +211,9 @@ LP_LLVM_TEXTURE_MEMBER(depth, LP_JIT_TEXTURE_DEPTH, TRUE)
+ LP_LLVM_TEXTURE_MEMBER(first_level, LP_JIT_TEXTURE_FIRST_LEVEL, TRUE)
+ LP_LLVM_TEXTURE_MEMBER(last_level, LP_JIT_TEXTURE_LAST_LEVEL, TRUE)
+ LP_LLVM_TEXTURE_MEMBER(base_ptr, LP_JIT_TEXTURE_BASE, TRUE)
+-LP_LLVM_TEXTURE_MEMBER(row_stride, LP_JIT_TEXTURE_ROW_STRIDE, FALSE)
+-LP_LLVM_TEXTURE_MEMBER(img_stride, LP_JIT_TEXTURE_IMG_STRIDE, FALSE)
+-LP_LLVM_TEXTURE_MEMBER(mip_offsets, LP_JIT_TEXTURE_MIP_OFFSETS, FALSE)
++LP_LLVM_TEXTURE_MEMBER_OUTTYPE(row_stride, LP_JIT_TEXTURE_ROW_STRIDE, FALSE)
++LP_LLVM_TEXTURE_MEMBER_OUTTYPE(img_stride, LP_JIT_TEXTURE_IMG_STRIDE, FALSE)
++LP_LLVM_TEXTURE_MEMBER_OUTTYPE(mip_offsets, LP_JIT_TEXTURE_MIP_OFFSETS, FALSE)
+ LP_LLVM_TEXTURE_MEMBER(num_samples, LP_JIT_TEXTURE_NUM_SAMPLES, TRUE)
+ LP_LLVM_TEXTURE_MEMBER(sample_stride, LP_JIT_TEXTURE_SAMPLE_STRIDE, TRUE)
+
+@@ -339,13 +360,27 @@ lp_llvm_image_member(struct gallivm_state *gallivm,
+ _index, #_name, _emit_load ); \
+ }
+
++#define LP_LLVM_IMAGE_MEMBER_OUTTYPE(_name, _index, _emit_load) \
++ static LLVMValueRef \
++ lp_llvm_image_##_name( struct gallivm_state *gallivm, \
++ LLVMTypeRef context_type, \
++ LLVMValueRef context_ptr, \
++ unsigned image_unit, LLVMValueRef image_unit_offset, \
++ LLVMTypeRef *out_type) \
++ { \
++ assert(!out_type); \
++ return lp_llvm_image_member(gallivm, context_type, context_ptr, \
++ image_unit, image_unit_offset, \
++ _index, #_name, _emit_load ); \
++ }
++
+
+ LP_LLVM_IMAGE_MEMBER(width, LP_JIT_IMAGE_WIDTH, TRUE)
+ LP_LLVM_IMAGE_MEMBER(height, LP_JIT_IMAGE_HEIGHT, TRUE)
+ LP_LLVM_IMAGE_MEMBER(depth, LP_JIT_IMAGE_DEPTH, TRUE)
+ LP_LLVM_IMAGE_MEMBER(base_ptr, LP_JIT_IMAGE_BASE, TRUE)
+-LP_LLVM_IMAGE_MEMBER(row_stride, LP_JIT_IMAGE_ROW_STRIDE, TRUE)
+-LP_LLVM_IMAGE_MEMBER(img_stride, LP_JIT_IMAGE_IMG_STRIDE, TRUE)
++LP_LLVM_IMAGE_MEMBER_OUTTYPE(row_stride, LP_JIT_IMAGE_ROW_STRIDE, TRUE)
++LP_LLVM_IMAGE_MEMBER_OUTTYPE(img_stride, LP_JIT_IMAGE_IMG_STRIDE, TRUE)
+ LP_LLVM_IMAGE_MEMBER(num_samples, LP_JIT_IMAGE_NUM_SAMPLES, TRUE)
+ LP_LLVM_IMAGE_MEMBER(sample_stride, LP_JIT_IMAGE_SAMPLE_STRIDE, TRUE)
+
+--
+GitLab
+
+
+From 0c865245900615e57f103b5e3f8759a68e978f85 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Mon, 26 Sep 2022 15:02:38 +1000
+Subject: [PATCH 5/6] gallivm/sample: use retrieved types to do opaque pointer
+ loads.
+
+This uses the types to do the loads using opaque ptr interfaces.
+
+Reviewed-by: Mihai Preda <mhpreda@gmail.com>
+Reviewed-by: Roland Scheidegger <sroland@vmware.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_sample.c | 26 ++++++++++++-------
+ 1 file changed, 16 insertions(+), 10 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+index cdbf737031a8c..9e608303451d6 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+@@ -1147,10 +1147,11 @@ lp_build_linear_mip_levels(struct lp_build_sample_context *bld,
+ * A helper function that factorizes this common pattern.
+ */
+ static LLVMValueRef
+-load_mip(struct gallivm_state *gallivm, LLVMValueRef offsets, LLVMValueRef index1) {
++load_mip(struct gallivm_state *gallivm,
++ LLVMTypeRef ptr_type, LLVMValueRef offsets, LLVMValueRef index1) {
+ LLVMValueRef zero = lp_build_const_int32(gallivm, 0);
+ LLVMValueRef indexes[2] = {zero, index1};
+- LLVMValueRef ptr = LLVMBuildGEP(gallivm->builder, offsets, indexes, ARRAY_SIZE(indexes), "");
++ LLVMValueRef ptr = LLVMBuildGEP2(gallivm->builder, ptr_type, offsets, indexes, ARRAY_SIZE(indexes), "");
+ return LLVMBuildLoad2(gallivm->builder, LLVMInt32TypeInContext(gallivm->context), ptr, "");
+ }
+
+@@ -1162,9 +1163,11 @@ LLVMValueRef
+ lp_build_get_mipmap_level(struct lp_build_sample_context *bld,
+ LLVMValueRef level)
+ {
+- LLVMValueRef mip_offset = load_mip(bld->gallivm, bld->mip_offsets, level);
++ LLVMValueRef mip_offset = load_mip(bld->gallivm, bld->mip_offsets_type, bld->mip_offsets, level);
+ LLVMBuilderRef builder = bld->gallivm->builder;
+- LLVMValueRef data_ptr = LLVMBuildGEP(builder, bld->base_ptr, &mip_offset, 1, "");
++ LLVMValueRef data_ptr = LLVMBuildGEP2(builder,
++ LLVMInt8TypeInContext(bld->gallivm->context),
++ bld->base_ptr, &mip_offset, 1, "");
+ return data_ptr;
+ }
+
+@@ -1180,7 +1183,7 @@ lp_build_get_mip_offsets(struct lp_build_sample_context *bld,
+ LLVMValueRef offsets, offset1;
+
+ if (bld->num_mips == 1) {
+- offset1 = load_mip(bld->gallivm, bld->mip_offsets, level);
++ offset1 = load_mip(bld->gallivm, bld->mip_offsets_type, bld->mip_offsets, level);
+ offsets = lp_build_broadcast_scalar(&bld->int_coord_bld, offset1);
+ }
+ else if (bld->num_mips == bld->coord_bld.type.length / 4) {
+@@ -1189,7 +1192,7 @@ lp_build_get_mip_offsets(struct lp_build_sample_context *bld,
+ offsets = bld->int_coord_bld.undef;
+ for (i = 0; i < bld->num_mips; i++) {
+ LLVMValueRef indexi = lp_build_const_int32(bld->gallivm, i);
+- offset1 = load_mip(bld->gallivm, bld->mip_offsets, LLVMBuildExtractElement(builder, level, indexi, ""));
++ offset1 = load_mip(bld->gallivm, bld->mip_offsets_type, bld->mip_offsets, LLVMBuildExtractElement(builder, level, indexi, ""));
+ LLVMValueRef indexo = lp_build_const_int32(bld->gallivm, 4 * i);
+ offsets = LLVMBuildInsertElement(builder, offsets, offset1, indexo, "");
+ }
+@@ -1203,7 +1206,7 @@ lp_build_get_mip_offsets(struct lp_build_sample_context *bld,
+ offsets = bld->int_coord_bld.undef;
+ for (i = 0; i < bld->num_mips; i++) {
+ LLVMValueRef indexi = lp_build_const_int32(bld->gallivm, i);
+- offset1 = load_mip(bld->gallivm, bld->mip_offsets, LLVMBuildExtractElement(builder, level, indexi, ""));
++ offset1 = load_mip(bld->gallivm, bld->mip_offsets_type, bld->mip_offsets, LLVMBuildExtractElement(builder, level, indexi, ""));
+ offsets = LLVMBuildInsertElement(builder, offsets, offset1, indexi, "");
+ }
+ }
+@@ -1333,12 +1336,13 @@ lp_build_scale_view_dim(struct gallivm_state *gallivm, LLVMValueRef size,
+ */
+ static LLVMValueRef
+ lp_build_get_level_stride_vec(struct lp_build_sample_context *bld,
++ LLVMTypeRef stride_type,
+ LLVMValueRef stride_array, LLVMValueRef level)
+ {
+ LLVMBuilderRef builder = bld->gallivm->builder;
+ LLVMValueRef stride, stride1;
+ if (bld->num_mips == 1) {
+- stride1 = load_mip(bld->gallivm, stride_array, level);
++ stride1 = load_mip(bld->gallivm, stride_type, stride_array, level);
+ stride = lp_build_broadcast_scalar(&bld->int_coord_bld, stride1);
+ }
+ else if (bld->num_mips == bld->coord_bld.type.length / 4) {
+@@ -1348,7 +1352,7 @@ lp_build_get_level_stride_vec(struct lp_build_sample_context *bld,
+ stride = bld->int_coord_bld.undef;
+ for (i = 0; i < bld->num_mips; i++) {
+ LLVMValueRef indexi = lp_build_const_int32(bld->gallivm, i);
+- stride1 = load_mip(bld->gallivm, stride_array, LLVMBuildExtractElement(builder, level, indexi, ""));
++ stride1 = load_mip(bld->gallivm, stride_type, stride_array, LLVMBuildExtractElement(builder, level, indexi, ""));
+ LLVMValueRef indexo = lp_build_const_int32(bld->gallivm, 4 * i);
+ stride = LLVMBuildInsertElement(builder, stride, stride1, indexo, "");
+ }
+@@ -1363,7 +1367,7 @@ lp_build_get_level_stride_vec(struct lp_build_sample_context *bld,
+ stride = bld->int_coord_bld.undef;
+ for (i = 0; i < bld->coord_bld.type.length; i++) {
+ LLVMValueRef indexi = lp_build_const_int32(bld->gallivm, i);
+- stride1 = load_mip(bld->gallivm, stride_array, LLVMBuildExtractElement(builder, level, indexi, ""));
++ stride1 = load_mip(bld->gallivm, stride_type, stride_array, LLVMBuildExtractElement(builder, level, indexi, ""));
+ stride = LLVMBuildInsertElement(builder, stride, stride1, indexi, "");
+ }
+ }
+@@ -1515,11 +1519,13 @@ lp_build_mipmap_level_sizes(struct lp_build_sample_context *bld,
+
+ if (dims >= 2) {
+ *row_stride_vec = lp_build_get_level_stride_vec(bld,
++ bld->row_stride_type,
+ bld->row_stride_array,
+ ilevel);
+ }
+ if (dims == 3 || has_layer_coord(bld->static_texture_state->target)) {
+ *img_stride_vec = lp_build_get_level_stride_vec(bld,
++ bld->img_stride_type,
+ bld->img_stride_array,
+ ilevel);
+ }
+--
+GitLab
+
+
+From 6f27bf250461e02ad7df17ad41cbfa71a4cae487 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Tue, 27 Sep 2022 15:28:18 +1000
+Subject: [PATCH 6/6] gallivm: remove legacy pointer_get apis
+
+These are no longer used.
+
+Reviewed-by: Mihai Preda <mhpreda@gmail.com>
+Reviewed-by: Roland Scheidegger <sroland@vmware.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_struct.c | 117 ------------------
+ src/gallium/auxiliary/gallivm/lp_bld_struct.h | 65 ----------
+ 2 files changed, 182 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_struct.c b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+index 73c32cebadfb6..0595c3d3df220 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_struct.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_struct.c
+@@ -41,43 +41,6 @@
+ #include "lp_bld_debug.h"
+ #include "lp_bld_struct.h"
+
+-
+-/* Deprecated (used only by llvmpipe); use lp_build_struct_get_ptr2() instead. */
+-LLVMValueRef
+-lp_build_struct_get_ptr(struct gallivm_state *gallivm,
+- LLVMValueRef ptr,
+- unsigned member,
+- const char *name)
+-{
+- LLVMValueRef indices[2];
+- LLVMValueRef member_ptr;
+- assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
+- assert(LLVM_VERSION_MAJOR >= 15 || LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMStructTypeKind);
+-
+- indices[0] = lp_build_const_int32(gallivm, 0);
+- indices[1] = lp_build_const_int32(gallivm, member);
+- member_ptr = LLVMBuildGEP(gallivm->builder, ptr, indices, ARRAY_SIZE(indices), "");
+- lp_build_name(member_ptr, "%s.%s_ptr", LLVMGetValueName(ptr), name);
+- return member_ptr;
+-}
+-
+-/* Deprecated (used only by llvmpipe); use lp_build_struct_get2() instead. */
+-LLVMValueRef
+-lp_build_struct_get(struct gallivm_state *gallivm,
+- LLVMValueRef ptr,
+- unsigned member,
+- const char *name)
+-{
+- LLVMValueRef member_ptr;
+- LLVMValueRef res;
+- assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
+- assert(LLVM_VERSION_MAJOR >= 15 || LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMStructTypeKind);
+- member_ptr = lp_build_struct_get_ptr(gallivm, ptr, member, name);
+- res = LLVMBuildLoad(gallivm->builder, member_ptr, "");
+- lp_build_name(res, "%s.%s", LLVMGetValueName(ptr), name);
+- return res;
+-}
+-
+ LLVMValueRef
+ lp_build_struct_get_ptr2(struct gallivm_state *gallivm,
+ LLVMTypeRef ptr_type,
+@@ -154,86 +117,6 @@ lp_build_array_get2(struct gallivm_state *gallivm,
+ return res;
+ }
+
+-LLVMValueRef
+-lp_build_array_get_ptr(struct gallivm_state *gallivm,
+- LLVMValueRef ptr,
+- LLVMValueRef index)
+-{
+- LLVMValueRef indices[2];
+- LLVMValueRef element_ptr;
+- assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
+- assert(LLVM_VERSION_MAJOR >= 15 || LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMArrayTypeKind);
+- indices[0] = lp_build_const_int32(gallivm, 0);
+- indices[1] = index;
+- element_ptr = LLVMBuildGEP(gallivm->builder, ptr, indices, ARRAY_SIZE(indices), "");
+-#ifdef DEBUG
+- lp_build_name(element_ptr, "&%s[%s]",
+- LLVMGetValueName(ptr), LLVMGetValueName(index));
+-#endif
+- return element_ptr;
+-}
+-
+-
+-LLVMValueRef
+-lp_build_array_get(struct gallivm_state *gallivm,
+- LLVMValueRef ptr,
+- LLVMValueRef index)
+-{
+- LLVMValueRef element_ptr;
+- LLVMValueRef res;
+- assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
+- assert(LLVM_VERSION_MAJOR >= 15 || LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMArrayTypeKind);
+- element_ptr = lp_build_array_get_ptr(gallivm, ptr, index);
+- res = LLVMBuildLoad(gallivm->builder, element_ptr, "");
+-#ifdef DEBUG
+- lp_build_name(res, "%s[%s]", LLVMGetValueName(ptr), LLVMGetValueName(index));
+-#endif
+- return res;
+-}
+-
+-
+-void
+-lp_build_array_set(struct gallivm_state *gallivm,
+- LLVMValueRef ptr,
+- LLVMValueRef index,
+- LLVMValueRef value)
+-{
+- LLVMValueRef element_ptr;
+- assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
+- assert(LLVM_VERSION_MAJOR >= 15 || LLVMGetTypeKind(LLVMGetElementType(LLVMTypeOf(ptr))) == LLVMArrayTypeKind);
+- element_ptr = lp_build_array_get_ptr(gallivm, ptr, index);
+- LLVMBuildStore(gallivm->builder, value, element_ptr);
+-}
+-
+-
+-LLVMValueRef
+-lp_build_pointer_get(LLVMBuilderRef builder,
+- LLVMValueRef ptr,
+- LLVMValueRef index)
+-{
+- return lp_build_pointer_get_unaligned(builder, ptr, index, 0);
+-}
+-
+-
+-LLVMValueRef
+-lp_build_pointer_get_unaligned(LLVMBuilderRef builder,
+- LLVMValueRef ptr,
+- LLVMValueRef index,
+- unsigned alignment)
+-{
+- LLVMValueRef element_ptr;
+- LLVMValueRef res;
+- assert(LLVMGetTypeKind(LLVMTypeOf(ptr)) == LLVMPointerTypeKind);
+- element_ptr = LLVMBuildGEP(builder, ptr, &index, 1, "");
+- res = LLVMBuildLoad(builder, element_ptr, "");
+- if (alignment)
+- LLVMSetAlignment(res, alignment);
+-#ifdef DEBUG
+- lp_build_name(res, "%s[%s]", LLVMGetValueName(ptr), LLVMGetValueName(index));
+-#endif
+- return res;
+-}
+-
+ LLVMValueRef
+ lp_build_pointer_get_unaligned2(LLVMBuilderRef builder,
+ LLVMTypeRef ptr_type,
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_struct.h b/src/gallium/auxiliary/gallivm/lp_bld_struct.h
+index 52d6020563bfb..11f256964f540 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_struct.h
++++ b/src/gallium/auxiliary/gallivm/lp_bld_struct.h
+@@ -53,26 +53,6 @@
+ offsetof(_ctype, _cmember))
+
+
+-/**
+- * Get value pointer to a structure member.
+- * Deprecated (used only by llvmpipe); use lp_build_struct_get_ptr2() instead.
+- */
+-LLVMValueRef
+-lp_build_struct_get_ptr(struct gallivm_state *gallivm,
+- LLVMValueRef ptr,
+- unsigned member,
+- const char *name);
+-
+-/**
+- * Get the value of a structure member.
+- * Deprecated (used only by llvmpipe); use lp_build_struct_get2() instead.
+- */
+-LLVMValueRef
+-lp_build_struct_get(struct gallivm_state *gallivm,
+- LLVMValueRef ptr,
+- unsigned member,
+- const char *name);
+-
+ /**
+ * Get value pointer to a structure member.
+ * This takes the explicit LLVM type of ptr, as required by LLVM-15 opaque-pointers.
+@@ -107,51 +87,6 @@ lp_build_array_get2(struct gallivm_state *gallivm,
+ LLVMValueRef ptr,
+ LLVMValueRef index);
+
+-/**
+- * Get value pointer to an array element.
+- */
+-LLVMValueRef
+-lp_build_array_get_ptr(struct gallivm_state *gallivm,
+- LLVMValueRef ptr,
+- LLVMValueRef index);
+-
+-/**
+- * Get the value of an array element.
+- */
+-LLVMValueRef
+-lp_build_array_get(struct gallivm_state *gallivm,
+- LLVMValueRef ptr,
+- LLVMValueRef index);
+-
+-/**
+- * Set the value of an array element.
+- */
+-void
+-lp_build_array_set(struct gallivm_state *gallivm,
+- LLVMValueRef ptr,
+- LLVMValueRef index,
+- LLVMValueRef value);
+-
+-/**
+- * Get the value of an array element.
+- */
+-LLVMValueRef
+-lp_build_pointer_get(LLVMBuilderRef builder,
+- LLVMValueRef ptr,
+- LLVMValueRef index);
+-
+-/**
+- * Get the value of an array element, with explicit alignment.
+- *
+- * If the element size is different from the alignment this will
+- * cause llvm to emit an unaligned load
+- */
+-LLVMValueRef
+-lp_build_pointer_get_unaligned(LLVMBuilderRef builder,
+- LLVMValueRef ptr,
+- LLVMValueRef index,
+- unsigned alignment);
+-
+ /**
+ * Get the value of an array element.
+ * This takes the explicit LLVM type of ptr, as required by LLVM-15 opaque-pointers.
+--
+GitLab
+
diff --git a/user/mesa/llvm18.patch b/user/mesa/llvm18.patch
new file mode 100644
index 000000000..660bacb91
--- /dev/null
+++ b/user/mesa/llvm18.patch
@@ -0,0 +1,397 @@
+From f79617fe804ea6524651ff1bc3a91098d3199179 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= <marek.olsak@amd.com>
+Date: Mon, 25 Sep 2023 15:57:33 -0400
+Subject: [PATCH] amd/llvm: fix build with LLVM 18
+
+Reviewed-by: Dave Airlie <airlied@redhat.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25388>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+index 5e7a30a6cc2e3..e213f7e4be180 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
++++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+@@ -366,7 +366,11 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
+ builder.setEngineKind(EngineKind::JIT)
+ .setErrorStr(&Error)
+ .setTargetOptions(options)
++#if LLVM_VERSION_MAJOR >= 18
++ .setOptLevel((CodeGenOptLevel)OptLevel);
++#else
+ .setOptLevel((CodeGenOpt::Level)OptLevel);
++#endif
+
+ #if DETECT_OS_WINDOWS
+ /*
+--
+GitLab
+
+
+
+
+
+
+<!DOCTYPE html>
+<html class="gl-light ui-neutral with-header with-top-bar " lang="en">
+<head prefix="og: http://ogp.me/ns#">
+<meta charset="utf-8">
+<meta content="IE=edge" http-equiv="X-UA-Compatible">
+<meta content="width=device-width, initial-scale=1" name="viewport">
+<title>gallivm: handle llvm 16 atexit ordering problems. (b3cfec2f) · Commits · Mesa / mesa · GitLab</title>
+<script>
+//<![CDATA[
+window.gon={};gon.math_rendering_limits_enabled=true;gon.features={"ciGraphqlPipelineMiniGraph":false};
+//]]>
+</script>
+
+
+
+
+
+
+<link rel="stylesheet" href="/assets/application-bc8000290bc8c8c0ebadb5c9d96dac50df8244426ef375a23cfae334e9b100c2.css" media="all" />
+<link rel="stylesheet" href="/assets/page_bundles/pipelines-147f0c35e12b857600d63ad57bd1505da553bee448fee17c49459845401fed79.css" media="all" /><link rel="stylesheet" href="/assets/page_bundles/commit_description-5653213c51a6c90453a926cfc5e5e71ad9b41881a20a408bef8a303cf175435c.css" media="all" /><link rel="stylesheet" href="/assets/page_bundles/work_items-4dbc32cca030ff7727ba26485149518edc039e72f1577ef00291805720518949.css" media="all" />
+<link rel="stylesheet" href="/assets/application_utilities-d9a7b82eeacf5bfb8ceea81780b391ff56bc5b4332509ae17839f3590bce0ae9.css" media="all" />
+<link rel="stylesheet" href="/assets/tailwind-c4fd78b89a0e3b72cbd08ce282e35067bb563355705f68ef5cb893962ccc7c32.css" media="all" />
+
+
+<link rel="stylesheet" href="/assets/fonts-fae5d3f79948bd85f18b6513a025f863b19636e85b09a1492907eb4b1bb0557b.css" media="all" />
+<link rel="stylesheet" href="/assets/highlight/themes/white-2ffecda73965655b02849f077e67509c64f03bf7959a10ee45a0147e79ab96fd.css" media="all" />
+
+
+<link rel="preload" href="/assets/application_utilities-d9a7b82eeacf5bfb8ceea81780b391ff56bc5b4332509ae17839f3590bce0ae9.css" as="style" type="text/css">
+<link rel="preload" href="/assets/application-bc8000290bc8c8c0ebadb5c9d96dac50df8244426ef375a23cfae334e9b100c2.css" as="style" type="text/css">
+<link rel="preload" href="/assets/highlight/themes/white-2ffecda73965655b02849f077e67509c64f03bf7959a10ee45a0147e79ab96fd.css" as="style" type="text/css">
+
+
+
+
+
+<script src="/assets/webpack/runtime.c3b445fb.bundle.js" defer="defer"></script>
+<script src="/assets/webpack/main.aa8f43d1.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/graphql.e1f11a07.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/commons-pages.admin.abuse_reports.show-pages.dashboard.issues-pages.dashboard.milestones.show-pages.-a65b27a2.97e0c257.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/commons-pages.admin.abuse_reports.show-pages.dashboard.issues-pages.groups.boards-pages.groups.issue-8f3ec9c9.450d024d.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/commons-pages.admin.abuse_reports.show-pages.dashboard.issues-pages.groups.boards-pages.groups.issue-181be4cb.80f39b87.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/commons-pages.groups.new-pages.import.gitlab_projects.new-pages.import.manifest.new-pages.projects.n-44c6c18e.227a132b.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/commons-pages.search.show-super_sidebar.4ea731a1.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/super_sidebar.ed4df32c.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/commons-pages.admin.abuse_reports.show-pages.admin.topics.edit-pages.admin.topics.new-pages.dashboar-7469413d.4f86d3e8.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/commons-pages.admin.abuse_reports.show-pages.admin.topics.edit-pages.admin.topics.new-pages.groups.i-56cf042c.01ecb85c.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/8.788661b8.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/commons-pages.admin.abuse_reports.show-pages.admin.topics.edit-pages.admin.topics.new-pages.groups.i-79e94350.81fd5681.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/10.abcd7097.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/commons-pages.admin.abuse_reports.show-pages.admin.topics.edit-pages.admin.topics.new-pages.groups.i-aa2a43bd.1d1306c9.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/commons-pages.admin.topics.edit-pages.admin.topics.new-pages.groups.milestones.edit-pages.groups.mil-d4098e09.740ed42b.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/26.3e8521dc.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/commons-pages.groups.milestones.edit-pages.groups.milestones.new-pages.groups.milestones.show-pages.-3a9ea570.d48dcdaa.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/commons-pages.projects.commit.pipelines-pages.projects.commit.rapid_diffs-pages.projects.commit.show.c0025a99.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/commons-pages.projects.commit.show-pages.projects.snippets.show-pages.snippets.show.cf9cdece.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/commons-pages.projects.commit.show-pages.projects.compare.show-pages.projects.wikis.diff.14466c81.chunk.js" defer="defer"></script>
+<script src="/assets/webpack/pages.projects.commit.show.67c9270a.chunk.js" defer="defer"></script>
+<meta content="object" property="og:type">
+<meta content="GitLab" property="og:site_name">
+<meta content="gallivm: handle llvm 16 atexit ordering problems. (b3cfec2f) · Commits · Mesa / mesa · GitLab" property="og:title">
+<meta content="This is ported from amd ac_llvm_helper.cpp, thanks to Marek for the pointer. This is needed to avoid crashes due to atexit ordering between some piglit tests and mesa internals. Cc:..." property="og:description">
+<meta content="https://gitlab.freedesktop.org/uploads/-/system/project/avatar/176/gears.png" property="og:image">
+<meta content="64" property="og:image:width">
+<meta content="64" property="og:image:height">
+<meta content="https://gitlab.freedesktop.org/mesa/mesa/-/commit/b3cfec2fd824a52023c92fd5928f4f5c1cb449a0" property="og:url">
+<meta content="summary" property="twitter:card">
+<meta content="gallivm: handle llvm 16 atexit ordering problems. (b3cfec2f) · Commits · Mesa / mesa · GitLab" property="twitter:title">
+<meta content="This is ported from amd ac_llvm_helper.cpp, thanks to Marek for the pointer. This is needed to avoid crashes due to atexit ordering between some piglit tests and mesa internals. Cc:..." property="twitter:description">
+<meta content="https://gitlab.freedesktop.org/uploads/-/system/project/avatar/176/gears.png" property="twitter:image">
+
+<meta name="csrf-param" content="authenticity_token" />
+<meta name="csrf-token" content="AioFgsl_omxJZyl5Q2D4GnKiXe47UFUKYPQW0znQbNIsHTFW0Bd4XCkZo8p5Pmlez7T9muUsVHMfGUAj9SBU6g" />
+<meta name="csp-nonce" />
+<meta name="action-cable-url" content="/-/cable" />
+<link href="/-/manifest.json" rel="manifest">
+<link rel="icon" type="image/png" href="/uploads/-/system/appearance/favicon/1/fdo-favicon.ico" id="favicon" data-original-href="/uploads/-/system/appearance/favicon/1/fdo-favicon.ico" />
+<link rel="apple-touch-icon" type="image/x-icon" href="/assets/apple-touch-icon-b049d4bc0dd9626f31db825d61880737befc7835982586d015bded10b4435460.png" />
+<link href="/search/opensearch.xml" rel="search" title="Search GitLab" type="application/opensearchdescription+xml">
+
+
+
+
+<meta content="This is ported from amd ac_llvm_helper.cpp, thanks to Marek for the pointer. This is needed to avoid crashes due to atexit ordering between some piglit tests and mesa internals. Cc:..." name="description">
+<meta content="#ececef" name="theme-color">
+</head>
+
+<body class="tab-width-8 gl-browser-generic gl-platform-other " data-find-file="/mesa/mesa/-/find_file/b3cfec2fd824a52023c92fd5928f4f5c1cb449a0" data-group="mesa" data-group-full-path="mesa" data-namespace-id="1155" data-page="projects:commit:show" data-page-type-id="b3cfec2fd824a52023c92fd5928f4f5c1cb449a0" data-project="mesa" data-project-full-path="mesa/mesa" data-project-id="176">
+<script>
+//<![CDATA[
+gl = window.gl || {};
+gl.GfmAutoComplete = gl.GfmAutoComplete || {};
+gl.GfmAutoComplete.dataSources = {"members":"/mesa/mesa/-/autocomplete_sources/members?type=Commit\u0026type_id=b3cfec2fd824a52023c92fd5928f4f5c1cb449a0","issues":"/mesa/mesa/-/autocomplete_sources/issues","mergeRequests":"/mesa/mesa/-/autocomplete_sources/merge_requests","labels":"/mesa/mesa/-/autocomplete_sources/labels?type=Commit\u0026type_id=b3cfec2fd824a52023c92fd5928f4f5c1cb449a0","milestones":"/mesa/mesa/-/autocomplete_sources/milestones","commands":"/mesa/mesa/-/autocomplete_sources/commands?type=Commit\u0026type_id=b3cfec2fd824a52023c92fd5928f4f5c1cb449a0","snippets":"/mesa/mesa/-/autocomplete_sources/snippets","contacts":"/mesa/mesa/-/autocomplete_sources/contacts?type=Commit\u0026type_id=b3cfec2fd824a52023c92fd5928f4f5c1cb449a0","wikis":null};
+
+
+//]]>
+</script>
+<script>
+//<![CDATA[
+gl = window.gl || {};
+gl.client = {"isGeneric":true,"isOther":true};
+
+
+//]]>
+</script>
+
+
+<header class="header-logged-out" data-testid="navbar">
+<a class="gl-sr-only gl-accessibility" href="#content-body">Skip to content</a>
+<div class="container-fluid">
+<nav aria-label="Explore GitLab" class="header-logged-out-nav gl-display-flex gl-gap-3 gl-justify-content-space-between">
+<div class="gl-display-flex gl-align-items-center gl-gap-1">
+<span class="gl-sr-only">GitLab</span>
+<a title="Homepage" id="logo" class="header-logged-out-logo has-tooltip" aria-label="Homepage" href="/"><img class="brand-header-logo lazy" alt="" data-src="/uploads/-/system/appearance/header_logo/1/fdo-logo-header.png" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" />
+</a></div>
+<ul class="gl-list-none gl-p-0 gl-m-0 gl-display-flex gl-gap-3 gl-align-items-center gl-flex-grow-1">
+<li class="header-logged-out-nav-item">
+<a class="" href="/explore">Explore</a>
+</li>
+</ul>
+<ul class="gl-list-none gl-p-0 gl-m-0 gl-display-flex gl-gap-3 gl-align-items-center gl-justify-content-end">
+<li class="header-logged-out-nav-item">
+<a href="/users/sign_in?redirect_to_referer=yes">Sign in</a>
+</li>
+<li class="header-logged-out-nav-item">
+<a class="gl-button btn btn-md btn-confirm " href="/users/sign_up"><span class="gl-button-text">
+Register
+
+</span>
+
+</a></li>
+</ul>
+</nav>
+</div>
+</header>
+
+<div class="layout-page page-with-super-sidebar">
+<aside class="js-super-sidebar super-sidebar super-sidebar-loading" data-command-palette="{&quot;project_files_url&quot;:&quot;/mesa/mesa/-/files/b3cfec2fd824a52023c92fd5928f4f5c1cb449a0?format=json&quot;,&quot;project_blob_url&quot;:&quot;/mesa/mesa/-/blob/b3cfec2fd824a52023c92fd5928f4f5c1cb449a0&quot;}" data-force-desktop-expanded-sidebar="" data-root-path="/" data-sidebar="{&quot;is_logged_in&quot;:false,&quot;context_switcher_links&quot;:[{&quot;title&quot;:&quot;Explore&quot;,&quot;link&quot;:&quot;/explore&quot;,&quot;icon&quot;:&quot;compass&quot;}],&quot;current_menu_items&quot;:[{&quot;id&quot;:&quot;project_overview&quot;,&quot;title&quot;:&quot;mesa&quot;,&quot;icon&quot;:null,&quot;avatar&quot;:&quot;/uploads/-/system/project/avatar/176/gears.png&quot;,&quot;entity_id&quot;:176,&quot;link&quot;:&quot;/mesa/mesa&quot;,&quot;pill_count&quot;:null,&quot;link_classes&quot;:&quot;shortcuts-project&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;manage_menu&quot;,&quot;title&quot;:&quot;Manage&quot;,&quot;icon&quot;:&quot;users&quot;,&quot;avatar&quot;:null,&quot;avatar_shape&quot;:&quot;rect&quot;,&quot;entity_id&quot;:null,&quot;link&quot;:&quot;/mesa/mesa/activity&quot;,&quot;is_active&quot;:false,&quot;pill_count&quot;:null,&quot;items&quot;:[{&quot;id&quot;:&quot;activity&quot;,&quot;title&quot;:&quot;Activity&quot;,&quot;icon&quot;:null,&quot;avatar&quot;:null,&quot;entity_id&quot;:null,&quot;link&quot;:&quot;/mesa/mesa/activity&quot;,&quot;pill_count&quot;:null,&quot;link_classes&quot;:&quot;shortcuts-project-activity&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;members&quot;,&quot;title&quot;:&quot;Members&quot;,&quot;icon&quot;:null,&quot;avatar&quot;:null,&quot;entity_id&quot;:null,&quot;link&quot;:&quot;/mesa/mesa/-/project_members&quot;,&quot;pill_count&quot;:null,&quot;link_classes&quot;:null,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;labels&quot;,&quot;title&quot;:&quot;Labels&quot;,&quot;icon&quot;:null,&quot;avatar&quot;:null,&quot;entity_id&quot;:null,&quot;link&quot;:&quot;/mesa/mesa/-/labels&quot;,&quot;pill_count&quot;:null,&quot;link_classes&quot;:null,&quot;is_active&quot;:false}],&quot;separated&quot;:false},{&quot;id&quot;:&quot;plan_menu&quot;,&quot;title&quot;:&quot;Plan&quot;,&quot;icon&quot;:&quot;planning&quot;,&quot;avatar&quot;:null,&quot;avatar_shape&quot;:&quot;rect&quot;,&quot;entity_id&quot;:null,&quot;link&quot;:&quot;/mesa/mesa/-/issues&quot;,&quot;is_active&quot;:false,&quot;pill_count&quot;:null,&quot;items&quot;:[{&quot;id&quot;:&quot;project_issue_list&quot;,&quot;title&quot;:&quot;Issues&quot;,&quot;icon&quot;:null,&quot;avatar&quot;:null,&quot;entity_id&quot;:null,&quot;link&quot;:&quot;/mesa/mesa/-/issues&quot;,&quot;pill_count&quot;:&quot;3.7k&quot;,&quot;link_classes&quot;:&quot;shortcuts-issues has-sub-items&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;boards&quot;,&quot;title&quot;:&quot;Issue boards&quot;,&quot;icon&quot;:null,&quot;avatar&quot;:null,&quot;entity_id&quot;:null,&quot;link&quot;:&quot;/mesa/mesa/-/boards&quot;,&quot;pill_count&quot;:null,&quot;link_classes&quot;:&quot;shortcuts-issue-boards&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;milestones&quot;,&quot;title&quot;:&quot;Milestones&quot;,&quot;icon&quot;:null,&quot;avatar&quot;:null,&quot;entity_id&quot;:null,&quot;link&quot;:&quot;/mesa/mesa/-/milestones&quot;,&quot;pill_count&quot;:null,&quot;link_classes&quot;:null,&quot;is_active&quot;:false}],&quot;separated&quot;:false},{&quot;id&quot;:&quot;code_menu&quot;,&quot;title&quot;:&quot;Code&quot;,&quot;icon&quot;:&quot;code&quot;,&quot;avatar&quot;:null,&quot;avatar_shape&quot;:&quot;rect&quot;,&quot;entity_id&quot;:null,&quot;link&quot;:&quot;/mesa/mesa/-/merge_requests&quot;,&quot;is_active&quot;:true,&quot;pill_count&quot;:null,&quot;items&quot;:[{&quot;id&quot;:&quot;project_merge_request_list&quot;,&quot;title&quot;:&quot;Merge requests&quot;,&quot;icon&quot;:nFrom b3cfec2fd824a52023c92fd5928f4f5c1cb449a0 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Thu, 4 Jan 2024 06:17:50 +1000
+Subject: [PATCH] gallivm: handle llvm 16 atexit ordering problems.
+
+This is ported from amd ac_llvm_helper.cpp, thanks to Marek for the pointer.
+
+This is needed to avoid crashes due to atexit ordering between some piglit
+tests and mesa internals.
+
+Cc: mesa-stable
+Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26883>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 34 +++++++++++++++++++
+ 1 file changed, 34 insertions(+)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+index e213f7e4be180..a5e84d708f2c6 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
++++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+@@ -62,6 +62,7 @@
+ #include <llvm/Support/PrettyStackTrace.h>
+ #include <llvm/ExecutionEngine/ObjectCache.h>
+ #include <llvm/Support/TargetSelect.h>
++#include <llvm/CodeGen/SelectionDAGNodes.h>
+ #if LLVM_VERSION_MAJOR >= 15
+ #include <llvm/Support/MemoryBuffer.h>
+ #endif
+@@ -100,6 +101,8 @@
+ #include "lp_bld_misc.h"
+ #include "lp_bld_debug.h"
+
++static void lp_run_atexit_for_destructors(void);
++
+ namespace {
+
+ class LLVMEnsureMultithreaded {
+@@ -147,6 +150,7 @@ static void init_native_targets()
+ }
+ }
+ #endif
++ lp_run_atexit_for_destructors();
+ }
+
+ extern "C" void
+@@ -623,3 +627,33 @@ lp_set_module_stack_alignment_override(LLVMModuleRef MRef, unsigned align)
+ M->setOverrideStackAlignment(align);
+ #endif
+ }
++
++using namespace llvm;
++
++class GallivmRunAtExitForStaticDestructors : public SDNode
++{
++public:
++ /* getSDVTList (protected) calls getValueTypeList (private), which contains static variables. */
++ GallivmRunAtExitForStaticDestructors(): SDNode(0, 0, DebugLoc(), getSDVTList(MVT::Other))
++ {
++ }
++};
++
++static void
++lp_run_atexit_for_destructors(void)
++{
++ /* LLVM >= 16 registers static variable destructors on the first compile, which gcc
++ * implements by calling atexit there. Before that, u_queue registers its atexit
++ * handler to kill all threads. Since exit() runs atexit handlers in the reverse order,
++ * the LLVM destructors are called first while shader compiler threads may still be
++ * running, which crashes in LLVM in SelectionDAG.cpp.
++ *
++ * The solution is to run the code that declares the LLVM static variables first,
++ * so that atexit for LLVM is registered first and u_queue is registered after that,
++ * which ensures that all u_queue threads are terminated before LLVM destructors are
++ * called.
++ *
++ * This just executes the code that declares static variables.
++ */
++ GallivmRunAtExitForStaticDestructors();
++}
+--
+GitLab
+
+From 550cc685a76b609a3c3f358d554de6e9911510ec Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Thu, 18 Jan 2024 18:05:47 +1000
+Subject: [PATCH] gallivm: fix coroutines with llvm 18
+
+llvm 18 added an extra parameters to coro end which should just
+take a null token always for us.
+
+Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27133>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_coro.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_coro.c b/src/gallium/auxiliary/gallivm/lp_bld_coro.c
+index 0214dcf674203..75aaa7d2b84c9 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_coro.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_coro.c
+@@ -89,13 +89,18 @@ LLVMValueRef lp_build_coro_free(struct gallivm_state *gallivm,
+
+ void lp_build_coro_end(struct gallivm_state *gallivm, LLVMValueRef coro_hdl)
+ {
+- LLVMValueRef coro_end_args[2];
++ LLVMValueRef coro_end_args[3];
++ int num_args = 2;
+ coro_end_args[0] = coro_hdl;
+ coro_end_args[1] = LLVMConstInt(LLVMInt1TypeInContext(gallivm->context), 0, 0);
++#if LLVM_VERSION_MAJOR >= 18
++ coro_end_args[2] = LLVMConstNull(LLVMTokenTypeInContext(gallivm->context));
++ num_args++;
++#endif
+ lp_build_intrinsic(gallivm->builder,
+ "llvm.coro.end",
+ LLVMInt1TypeInContext(gallivm->context),
+- coro_end_args, 2, 0);
++ coro_end_args, num_args, 0);
+ }
+
+ void lp_build_coro_resume(struct gallivm_state *gallivm, LLVMValueRef coro_hdl)
+--
+GitLab
+
+From 99f0449987bec1f82cd42a06f40bb4a863a37792 Mon Sep 17 00:00:00 2001
+From: Nikita Popov <npopov@redhat.com>
+Date: Mon, 11 Mar 2024 14:45:41 +0100
+Subject: [PATCH] Pass no-verify-fixpoint option to instcombine in LLVM 18
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When LLVM 18 is used, pass the no-verify-fixpoint option when
+running the instcombine pass. Otherwise LLVM may abort with an
+error.
+
+The background here is that this option is enabled by default for
+testing purposes, because instcombine is normally only explicitly
+invoked like this inside tests. If it is used in an actual
+production pipeline, the no-verify-fixpoint option needs to be
+enabled.
+
+This should fix the issue reported at
+https://bugzilla.redhat.com/show_bug.cgi?id=2268800.
+
+Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
+Reviewed-by: Marek Olšák <marek.olsak@amd.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28101>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
+index cd2108f3a088d..1345d85b22439 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
+@@ -609,7 +609,11 @@ gallivm_compile_module(struct gallivm_state *gallivm)
+ LLVMRunPasses(gallivm->module, passes, LLVMGetExecutionEngineTargetMachine(gallivm->engine), opts);
+
+ if (!(gallivm_perf & GALLIVM_PERF_NO_OPT))
++#if LLVM_VERSION_MAJOR >= 18
++ strcpy(passes, "sroa,early-cse,simplifycfg,reassociate,mem2reg,instsimplify,instcombine<no-verify-fixpoint>");
++#else
+ strcpy(passes, "sroa,early-cse,simplifycfg,reassociate,mem2reg,instsimplify,instcombine");
++#endif
+ else
+ strcpy(passes, "mem2reg");
+
+--
+GitLab
+
+From a2ae6518c2d70dca9e3e9e93dc8e38a18f73c14e Mon Sep 17 00:00:00 2001
+From: Konstantin Seurer <konstantin.seurer@gmail.com>
+Date: Fri, 28 Apr 2023 23:15:48 +0200
+Subject: [PATCH] gallivm: Fix gather/scatter types for newer llvm
+
+The types changed with opaque pointer support.
+
+Fixes a bunch of lavapipe regressions.
+Cc: mesa-stable
+
+Reviewed-by: Roland Scheidegger <sroland@vmware.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23293>
+---
+ src/gallium/auxiliary/gallivm/lp_bld_gather.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/src/gallium/auxiliary/gallivm/lp_bld_gather.c b/src/gallium/auxiliary/gallivm/lp_bld_gather.c
+index b93251b444495..f55f2f3145e28 100644
+--- a/src/gallium/auxiliary/gallivm/lp_bld_gather.c
++++ b/src/gallium/auxiliary/gallivm/lp_bld_gather.c
+@@ -611,8 +611,14 @@ lp_build_masked_gather(struct gallivm_state *gallivm,
+ LLVMValueRef args[4];
+ char intrin_name[64];
+
++#if LLVM_VERSION_MAJOR >= 16
++ snprintf(intrin_name, 64, "llvm.masked.gather.v%ui%u.v%up0",
++ length, bit_size, length);
++#else
+ snprintf(intrin_name, 64, "llvm.masked.gather.v%ui%u.v%up0i%u",
+ length, bit_size, length, bit_size);
++#endif
++
+ args[0] = offset_ptr;
+ args[1] = lp_build_const_int32(gallivm, bit_size / 8);
+ args[2] = LLVMBuildICmp(builder, LLVMIntNE, exec_mask,
+@@ -635,8 +641,14 @@ lp_build_masked_scatter(struct gallivm_state *gallivm,
+ LLVMValueRef args[4];
+ char intrin_name[64];
+
++#if LLVM_VERSION_MAJOR >= 16
++ snprintf(intrin_name, 64, "llvm.masked.scatter.v%ui%u.v%up0",
++ length, bit_size, length);
++#else
+ snprintf(intrin_name, 64, "llvm.masked.scatter.v%ui%u.v%up0i%u",
+ length, bit_size, length, bit_size);
++#endif
++
+ args[0] = value_vec;
+ args[1] = offset_ptr;
+ args[2] = lp_build_const_int32(gallivm, bit_size / 8);
+--
+GitLab
+
diff --git a/user/mimetic/APKBUILD b/user/mimetic/APKBUILD
index e4861c278..40ce81de3 100644
--- a/user/mimetic/APKBUILD
+++ b/user/mimetic/APKBUILD
@@ -2,17 +2,18 @@
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=mimetic
pkgver=0.9.8
-pkgrel=0
+pkgrel=1
pkgdesc="C++ library for processing MIME"
-url="http://www.codesink.org/mimetic_mime_library.html"
+url="https://www.codesink.org/mimetic_mime_library.html"
arch="all"
license="MIT"
depends=""
makedepends="doxygen"
subpackages="$pkgname-dev"
-source="http://www.codesink.org/download/mimetic-$pkgver.tar.gz
+source="https://www.codesink.org/download/mimetic-$pkgver.tar.gz
fix-compile.patch
signedness.patch
+ nullptr.patch
"
prepare() {
@@ -41,4 +42,5 @@ package() {
sha512sums="4157eecb3e26af314d475c91192a357d6da35271a07a07b037d5037e9af84952ce2636874e86df0e94e8887dcfdb8f594a1ba04e6448181e436b0e2675f48f58 mimetic-0.9.8.tar.gz
26badbaea0e9392080ece1cfda41d16a4fa87850e92edb4120e0a080fcebeeebaf28adb0fc73ba56ecacfc670bc315b2255c9c101471beb09068b1b4c4c8c473 fix-compile.patch
-d92c719134064e545e7b63f56bfc6b2898c82766a4540230ac5273b1380ef4546d220d95faa99d7b9c01508650a361b7473ad74c9a79262cb423277ca83a36b2 signedness.patch"
+d92c719134064e545e7b63f56bfc6b2898c82766a4540230ac5273b1380ef4546d220d95faa99d7b9c01508650a361b7473ad74c9a79262cb423277ca83a36b2 signedness.patch
+716d5b15e4e7734fc63b3bbdb0651fa45f2a89d745084788b4db7cf46a17ba30dc5d1290f8c514089dce12376e51110b8b0850bb3a87e06d024c93145fd2d5fc nullptr.patch"
diff --git a/user/mimetic/nullptr.patch b/user/mimetic/nullptr.patch
new file mode 100644
index 000000000..340ae37d6
--- /dev/null
+++ b/user/mimetic/nullptr.patch
@@ -0,0 +1,11 @@
+--- mimetic-0.9.8/mimetic/os/mmfile.cxx.old 2014-06-17 03:12:00.000000000 -0500
++++ mimetic-0.9.8/mimetic/os/mmfile.cxx 2024-05-30 03:23:16.247921514 -0500
+@@ -57,7 +57,7 @@
+ bool MMFile::map()
+ {
+ m_beg = (char*) mmap(0, m_st.st_size, PROT_READ, MAP_SHARED,m_fd,0);
+- if(m_beg > 0)
++ if(m_beg != nullptr)
+ {
+ m_end = m_beg + m_st.st_size;
+ #if HAVE_MADVISE
diff --git a/user/minicom/APKBUILD b/user/minicom/APKBUILD
index a7ebc7b94..5c578c46e 100644
--- a/user/minicom/APKBUILD
+++ b/user/minicom/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=minicom
-pkgver=2.8
+pkgver=2.9
pkgrel=0
pkgdesc="Menu-driven communications program for terminals"
url="https://fossies.org/linux/minicom/"
@@ -31,4 +31,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="535e0df37d8679ff08959b14f1f494a4d632af5a481e49873dd33a6c601de3ce20193ee6314d6c3282775f5adb906521a237bf8ac4b32e2751c754a91d99853f minicom-2.8.tar.bz2"
+sha512sums="2ee4e585b180683b50b257ad768d903b3030f9b528f3bef5cb9c146b53c5bc39c724b69945edc7e72490b145bc12c6c568014a5a778aecac05917bd8d3d31663 minicom-2.9.tar.bz2"
diff --git a/user/miniupnpc/APKBUILD b/user/miniupnpc/APKBUILD
index c1445066a..ba9d46079 100644
--- a/user/miniupnpc/APKBUILD
+++ b/user/miniupnpc/APKBUILD
@@ -4,14 +4,14 @@ pkgname=miniupnpc
pkgver=2.2.3
pkgrel=0
pkgdesc="A lightweight UPNP client enabling applications to control UPnP gateways"
-url="https://miniupnp.tuxfamily.org/"
+url="http://miniupnp.free.fr"
arch="all"
options="!check" # no tests
license="BSD-3-Clause"
depends=""
makedepends="cmake"
subpackages="$pkgname-dev $pkgname-doc"
-source="http://miniupnp.tuxfamily.org/files/miniupnpc-$pkgver.tar.gz
+source="http://miniupnp.free.fr/files/miniupnpc-$pkgver.tar.gz
fix-cmake-include-install.patch
"
diff --git a/user/mosh/APKBUILD b/user/mosh/APKBUILD
index d138bd4f3..728719767 100644
--- a/user/mosh/APKBUILD
+++ b/user/mosh/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=mosh
-pkgver=1.3.2
-pkgrel=2
+pkgver=1.4.0
+pkgrel=0
pkgdesc="Mobile shell surviving disconnects with local echo and line editing"
url="https://mosh.org"
arch="all"
@@ -13,8 +13,7 @@ makedepends="ncurses-dev zlib-dev openssl-dev perl-dev perl-io-tty
protobuf-dev automake autoconf libtool gzip"
subpackages="$pkgname-doc $pkgname-client $pkgname-server
$pkgname-bash-completion:bashcomp:noarch"
-source="https://mosh.org/$pkgname-$pkgver.tar.gz
- fix-ppc64le-build-with-musl.patch"
+source="https://github.com/mobile-shell/mosh/releases/download/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz"
prepare() {
default_prepare
@@ -70,5 +69,4 @@ client() {
"$subpkgdir"/usr/bin/
}
-sha512sums="f400e8fe7ba2ab7362311fc12a00ec69587505f901988aeee500fc68d38a388218500a3f602111c883ff23a9d43572114fcf0a8bf505df203691e5b597615769 mosh-1.3.2.tar.gz
-a276dde98a2dab63ad9c9c05468c55983a95f482878c5694713810b561eae1ea5618efc72431a17ee5b5014b12ee9709c6a8cbf582620294e7888cc837cd073c fix-ppc64le-build-with-musl.patch"
+sha512sums="38c11f52ff1e42965b50a22bf6de80b0fa8ebbff841d825e760abf69c788a2bf5f34e6f7fc047574d595118334eef9edf8da5520b52cdde3ac1a79d7ad70312e mosh-1.4.0.tar.gz"
diff --git a/user/mosh/fix-ppc64le-build-with-musl.patch b/user/mosh/fix-ppc64le-build-with-musl.patch
deleted file mode 100644
index 8d918a963..000000000
--- a/user/mosh/fix-ppc64le-build-with-musl.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From: Roberto Oliveira <robertoguimaraes8@gmail.com>
-Date: Tue, 4 Apr 2017 16:46:50 +0000
-Subject: [PATCH] Fix build with musl on ppc64le
-
-mosh was breaking when building in ppc64le using musl, because ioctl() is defined
-as ioctl(int, int) in musl and mosh is using TIOCSWINSZ macro as parameter. This was
-triggering a gcc warning and make the build fail.
-
-This patch does an explicit integer conversion in TIOCSWINSZ, as no bits get
-lost.
-
---- a/src/frontend/mosh-server.cc
-+++ b/src/frontend/mosh-server.cc
-@@ -714,7 +714,12 @@
- }
- window_size.ws_col = res->width;
- window_size.ws_row = res->height;
-- if ( ioctl( host_fd, TIOCSWINSZ, &window_size ) < 0 ) {
-+
-+ #if defined(__powerpc64__) && (!defined(__GLIBC__) && !defined(__UCLIBC__))
-+ if ( ioctl( host_fd, (int) TIOCSWINSZ, &window_size ) < 0 ) {
-+ #else
-+ if ( ioctl( host_fd, TIOCSWINSZ, &window_size ) < 0 ) {
-+ #endif
- perror( "ioctl TIOCSWINSZ" );
- network.start_shutdown();
- }
---- a/src/examples/termemu.cc
-+++ a/src/examples/termemu.cc
-@@ -226,7 +226,11 @@
- }
-
- /* tell child process */
-+ #if defined(__powerpc64__) && (!defined(__GLIBC__) && !defined(__UCLIBC__))
-+ if ( ioctl( fd, (int) TIOCSWINSZ, &window_size ) < 0 ) {
-+ #else
- if ( ioctl( fd, TIOCSWINSZ, &window_size ) < 0 ) {
-+ #endif
- perror( "ioctl TIOCSWINSZ" );
- return;
- }
-@@ -306,7 +310,11 @@
- complete.act( &r );
-
- /* tell child process */
-+ #if defined(__powerpc64__) && (!defined(__GLIBC__) && !defined(__UCLIBC__))
-+ if ( ioctl( fd, (int) TIOCSWINSZ, &window_size ) < 0 ) {
-+ #else
- if ( ioctl( fd, TIOCSWINSZ, &window_size ) < 0 ) {
-+ #endif
- perror( "ioctl TIOCSWINSZ" );
- return;
- }
diff --git a/user/ncftp/APKBUILD b/user/ncftp/APKBUILD
index dd1a31d21..d23b85b37 100644
--- a/user/ncftp/APKBUILD
+++ b/user/ncftp/APKBUILD
@@ -1,17 +1,17 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=ncftp
-pkgver=3.2.6
+pkgver=3.2.7
pkgrel=0
pkgdesc="A set of free application programs implementing FTP"
-url="http://www.ncftp.com/"
+url="https://www.ncftp.com/"
arch="all"
options="!check" # No test suite.
license="ClArtistic"
depends=""
makedepends="ncurses-dev"
subpackages="$pkgname-doc $pkgname-bookmarks"
-source="ftp://ftp.ncftp.com/ncftp/$pkgname-$pkgver-src.tar.gz"
+source="https://www.ncftp.com/downloads/ncftp/$pkgname-$pkgver-src.tar.xz"
build() {
LIBS="-ltinfo" ./configure \
@@ -38,4 +38,4 @@ bookmarks() {
"$subpkgdir"/usr/bin/
}
-sha512sums="a2f8ac555bee8af4be1aa745ce5838beee99cd2253c1fe701b710ec135d7c47e2bf8b22ec928975ec2460919977d45a07fb12185ab58a2e96e3092039ffd3303 ncftp-3.2.6-src.tar.gz"
+sha512sums="b755385a57ac2487625c15985f091d9e1b71073b2593faffe1f2bbba34e691cfff9ffd8448b048f223ea08428e890f30c49a903e4f938393e3c0e4ae03ddab37 ncftp-3.2.7-src.tar.xz"
diff --git a/user/olm/APKBUILD b/user/olm/APKBUILD
index 335484639..bc832ae94 100644
--- a/user/olm/APKBUILD
+++ b/user/olm/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Dan Theisen <djt@hxx.in>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=olm
-pkgver=3.2.6
+pkgver=3.2.16
pkgrel=0
pkgdesc="Implementation of the olm and megolm cryptographic ratchets"
url="https://gitlab.matrix.org/matrix-org/olm/"
@@ -40,4 +40,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="e22af4e7791962978ea4c39b9bebf807a864ca52b329f032e5e398864cd142c1f166aadbce74cb85f776cb0b8352754151f64c60dac2ce1858def73d684fd44a olm-3.2.6.tar.bz2"
+sha512sums="504ddc91297e7aef99e9b25f73b33bac29716ca33eb333bf1217b719d8862438e2cdaadd88cef3dc84e9f618bcc9eeeaf7e513f2d6909cc4a3d98a5dd79b0581 olm-3.2.16.tar.bz2"
diff --git a/user/open-vm-tools/APKBUILD b/user/open-vm-tools/APKBUILD
index 883b7d306..ea9af14c4 100644
--- a/user/open-vm-tools/APKBUILD
+++ b/user/open-vm-tools/APKBUILD
@@ -3,7 +3,7 @@
pkgname=open-vm-tools
pkgver=12.4.0
_buildver=23259341
-pkgrel=0
+pkgrel=1
pkgdesc="Guest additions for VMware hypervisors"
url=" "
arch="x86 pmmx i528 x86_64 aarch64"
@@ -19,6 +19,7 @@ subpackages="$pkgname-dev $pkgname-desktop $pkgname-openrc"
source="https://github.com/vmware/open-vm-tools/releases/download/stable-$pkgver/open-vm-tools-$pkgver-$_buildver.tar.gz
disable-werror.patch
dndcp-portability.patch
+ time64.patch
hgfs-portability.patch
loff_t.patch
poll-header.patch
@@ -95,6 +96,7 @@ desktop() {
sha512sums="11ea43c64ec534922145f83e2b7ef9254437f80656ad03b596340a78c3698adcc7d84adade9c5d8e1c83b5ebc3bd086601b1d104e0f070274dc2b6bc1f64fb17 open-vm-tools-12.4.0-23259341.tar.gz
1966f6f31ed531829a40cd3e5c8352ea25cac0535a24f62aecf37e2018adbeb33cd214a43d4acc57766c8795d1849e1241c8777bbf96ad447f0c7baa41a555ed disable-werror.patch
987a65c77a462520430d157212fbd23381af301a0e5b02410750f4ac844bad903a92c62f743ea2880b9bca939696edd6c8f92b3f4fc01daafd46b5455f7b9666 dndcp-portability.patch
+6167f412598bd70c7a66831a3fb870514da17461494210c2466af35748e3452702573203ca503906f30864a51436a3e296ee5fc25a7283f51ba06a542ed7f177 time64.patch
656585c7b087dd1b7539bcd362bb80faa48b7354819636061c2c92569bcd537804daf15b76f6bad0b7229af9d24462de4e630256ac7059941bf8cd115ae9a39c hgfs-portability.patch
6edb41bb9658271c6a214230c88526c4fccc4c6b3299bb67691f6f917e1e695a20dd09692c9a64d36d46a35cbecb975dcaf7062c0d7fccd2d9011cc17130072d loff_t.patch
2b623a9901851ba9b1652c117ee2a2ebb8e4cea7a01e2ffe6553cf6d929a86921f4e206278fd19fbab4effc0cc9051848e5254ca35ecfb3a006783e915cd5c5e poll-header.patch
diff --git a/user/open-vm-tools/time64.patch b/user/open-vm-tools/time64.patch
new file mode 100644
index 000000000..bc6bbb091
--- /dev/null
+++ b/user/open-vm-tools/time64.patch
@@ -0,0 +1,58 @@
+diff --git a/open-vm-tools/services/plugins/dndcp/fakeMouseWayland/fakeMouseWayland.cpp b/open-vm-tools/services/plugins/dndcp/fakeMouseWayland/fakeMouseWayland.cpp
+index 0311a4e7..4a231a4d 100644
+--- a/services/plugins/dndcp/fakeMouseWayland/fakeMouseWayland.cpp
++++ b/services/plugins/dndcp/fakeMouseWayland/fakeMouseWayland.cpp
+@@ -249,11 +249,14 @@ FakeMouse_Move(int x, // IN
+
+ bool retValue = true;
+ struct input_event event;
++ struct timeval tv;
+
+ event.type = EV_ABS;
+ event.code = ABS_X;
+ event.value = x;
+- gettimeofday(&event.time, NULL);
++ gettimeofday(&tv, NULL);
++ event.input_event_sec = tv.tv_sec;
++ event.input_event_usec = tv.tv_usec;
+ if (write(uinput_fd, &event, sizeof(event)) < 0) {
+ g_debug("Line:%d. Function:%s. Failed to write\n", __LINE__, __FUNCTION__);
+ retValue = false;
+@@ -262,7 +265,9 @@ FakeMouse_Move(int x, // IN
+ event.type = EV_ABS;
+ event.code = ABS_Y;
+ event.value = y;
+- gettimeofday(&event.time, NULL);
++ gettimeofday(&tv, NULL);
++ event.input_event_sec = tv.tv_sec;
++ event.input_event_usec = tv.tv_usec;
+ if (write(uinput_fd, &event, sizeof(event)) < 0) {
+ g_debug("Line:%d. Function:%s. Failed to write\n", __LINE__, __FUNCTION__);
+ retValue = false;
+@@ -271,7 +276,9 @@ FakeMouse_Move(int x, // IN
+ event.type = EV_SYN;
+ event.code = SYN_REPORT;
+ event.value = 0;
+- gettimeofday(&event.time, NULL);
++ gettimeofday(&tv, NULL);
++ event.input_event_sec = tv.tv_sec;
++ event.input_event_usec = tv.tv_usec;
+ if (write(uinput_fd, &event, sizeof(event)) < 0) {
+ g_debug("Line:%d. Function:%s. Failed to write\n", __LINE__, __FUNCTION__);
+ retValue = false;
+@@ -306,11 +313,14 @@ FakeMouse_Click(bool down) // IN
+
+ bool retValue = true;
+ struct input_event event;
++ struct timeval tv;
+
+ event.type = EV_KEY;
+ event.code = BTN_LEFT;
+ event.value = down;
+- gettimeofday(&event.time, NULL);
++ gettimeofday(&tv, NULL);
++ event.input_event_sec = tv.tv_sec;
++ event.input_event_usec = tv.tv_usec;
+ if (write(uinput_fd, &event, sizeof(event)) < 0) {
+ g_debug("Line:%d. Function:%s. Failed to write\n", __LINE__, __FUNCTION__);
+ retValue = false;
diff --git a/user/openal-soft/APKBUILD b/user/openal-soft/APKBUILD
index 9b0a4c7ff..be2110585 100644
--- a/user/openal-soft/APKBUILD
+++ b/user/openal-soft/APKBUILD
@@ -1,10 +1,10 @@
# Contributor: Ariadne Conill <ariadne@dereferenced.org>
# Maintainer: Zach van Rijn <me@zv.io>
pkgname=openal-soft
-pkgver=1.19.1
+pkgver=1.23.1
pkgrel=0
pkgdesc="Software implementation of OpenAL API"
-url="https://kcat.strangesoft.net/openal.html"
+url="https://openal-soft.org/"
arch="all"
options="!check" # No test suite.
license="LGPL-2.0+"
@@ -15,7 +15,7 @@ subpackages="$pkgname-dev"
source="https://openal-soft.org/openal-releases/${pkgname}-${pkgver}.tar.bz2"
build() {
- local _cpuext_neon=""
+ _cpuext_neon=""
case "$CARCH" in
armhf) _cpuext_neon="-DALSOFT_CPUEXT_NEON=OFF" ;;
esac
@@ -31,4 +31,4 @@ package() {
make DESTDIR="$pkgdir" -C build install
}
-sha512sums="356a3f12bbe284bfac71f4f2a9f83d084083a832012222e73743042ac27812cf051c12b0ddcf53c010ff77e44ae2e9033cea9b9324d316a22a59a154307a64a4 openal-soft-1.19.1.tar.bz2"
+sha512sums="0d40577cd27040dc8814c15bacc310a0ce1c98e084f0a37db9f66899265df42ea61ac672efba7445e495849c25b9ba5b086f43320a38965f6ee74081b2896819 openal-soft-1.23.1.tar.bz2"
diff --git a/user/opencv/APKBUILD b/user/opencv/APKBUILD
index 759f20e0b..9bd859b92 100644
--- a/user/opencv/APKBUILD
+++ b/user/opencv/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer:
pkgname=opencv
pkgver=4.6.0
-pkgrel=0
+pkgrel=1
pkgdesc="Computer vision and machine learning software library"
url="https://opencv.org"
arch="all"
@@ -17,6 +17,7 @@ subpackages="$pkgname-dev $pkgname-libs"
source="opencv-$pkgver.tar.gz::https://github.com/opencv/opencv/archive/$pkgver.tar.gz
ade-0.1.1f.zip::https://github.com/opencv/ade/archive/v0.1.1f.zip
cmake-license.patch
+ fix-headers.manual-patch
"
# secfixes:
@@ -24,13 +25,13 @@ source="opencv-$pkgver.tar.gz::https://github.com/opencv/opencv/archive/$pkgver.
# - CVE-2019-16249
prepare() {
- default_prepare
# purge 3rd party except carotene
for i in 3rdparty/*; do
case $i in
*/carotene*) continue;;
*/ittnotify) continue;; # Else FTBFS on x86_64
*/quirc) continue;;
+ */include) continue;;
esac
rm -rf "$i"
done
@@ -65,6 +66,7 @@ build() {
-DWITH_IPP=OFF \
$_sse \
-Bbuild
+ patch -Np1 < "$srcdir"/fix-headers.manual-patch
make -C build
}
@@ -74,4 +76,5 @@ package() {
sha512sums="93d7807794682990b6a1d1de1851986ae3c5d1afe6605f3f8cace03ba5e3390bee2568bc0f335af34d3fc974df64cbce0ce685261ec2abd693d259b97b15bc46 opencv-4.6.0.tar.gz
f2994d5e92a2ae05cee6e153943afe151ce734ced6e06dcdb02dee9fed9336a7f1ea69661d9e033f1412fbb5e2a44a6e641662c85be5ba0604d0446abeabe836 ade-0.1.1f.zip
-ffa6930086051c545a44d28b8e428de7faaeecf961cdee6eef007b2b01db7e5897c6f184b1059df9763c1bcd90f88b9ead710dc13b51a608f21d683f55f39bd6 cmake-license.patch"
+ffa6930086051c545a44d28b8e428de7faaeecf961cdee6eef007b2b01db7e5897c6f184b1059df9763c1bcd90f88b9ead710dc13b51a608f21d683f55f39bd6 cmake-license.patch
+c1ba6c7b66edc747a2bddd622787f75eb5edd9ef65a2da9a1bbf432fad97fdfe293f0b16631085006299e7e74468d601b942ecdc389997e9e64dee16c082648f fix-headers.manual-patch"
diff --git a/user/opencv/fix-headers.manual-patch b/user/opencv/fix-headers.manual-patch
new file mode 100644
index 000000000..9a3eb8542
--- /dev/null
+++ b/user/opencv/fix-headers.manual-patch
@@ -0,0 +1,12 @@
+Required header for GCC 13.
+
+--- opencv-4.6.0/build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/typed_graph.hpp.old 2019-08-07 03:55:16.000000000 -0500
++++ opencv-4.6.0/build/3rdparty/ade/ade-0.1.1f/sources/ade/include/ade/typed_graph.hpp 2024-05-28 16:39:53.217246004 -0500
+@@ -11,6 +11,7 @@
+
+ #include <unordered_set>
+ #include <string>
++#include <cstdint>
+
+ #include <array>
+
diff --git a/user/openttd/APKBUILD b/user/openttd/APKBUILD
index 3831b7b86..0ad34bb58 100644
--- a/user/openttd/APKBUILD
+++ b/user/openttd/APKBUILD
@@ -12,7 +12,7 @@ depends="opengfx openmsx opensfx"
makedepends="fontconfig-dev freetype-dev icu-dev libpng-dev libxdg-basedir-dev
lzo-dev sdl-dev xz-dev zlib-dev"
subpackages="$pkgname-doc"
-source="https://proxy.binaries.openttd.org/openttd-releases/$pkgver/openttd-$pkgver-source.tar.xz"
+source="https://cdn.openttd.org/openttd-releases/$pkgver/openttd-$pkgver-source.tar.xz"
build() {
./configure \
diff --git a/user/openvpn/APKBUILD b/user/openvpn/APKBUILD
index eecef5f51..a3d86d7b9 100644
--- a/user/openvpn/APKBUILD
+++ b/user/openvpn/APKBUILD
@@ -2,7 +2,7 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Lee Starnes <lee@canned-death.us>
pkgname=openvpn
-pkgver=2.6.9
+pkgver=2.6.12
pkgrel=0
pkgdesc="A robust, and highly configurable VPN (Virtual Private Network)"
url="https://openvpn.net/"
@@ -72,7 +72,7 @@ pam() {
"$subpkgdir"/usr/lib/openvpn/plugins/
}
-sha512sums="095508b98b76f4bdf4e4dc8832dcff6ba8a2ddaadb5a8e65cd56f28d6f5694ee394210f991f5301e436fcc1b7880a7c8b59d27089d21a5672eeb79cabc243b21 openvpn-2.6.9.tar.gz
+sha512sums="92f548186d9375d6ae47b1387dd191241b8a45aed82294523b3771bdd5e699b94265e1a3bbf3ef2638da0d54c19c783f54c456cbd755c846849bf67913cad6db openvpn-2.6.12.tar.gz
3594937d4cc9d7b87ac6a3af433f651ed9695f41586994f9d9789554fbe3f87f054b997b89486eda4ae0b852d816aac9007222168d585910aa9f255073324bd9 openvpn.initd
6b2353aca9df7f43044e4e37990491b4ba077e259ebe13b8f2eb43e35ca7a617c1a65c5bfb8ab05e87cf12c4444184ae064f01f9abbb3c023dbbc07ff3f9c84e openvpn.confd
cdb73c9a5b1eb56e9cbd29955d94297ce5a87079419cd626d6a0b6680d88cbf310735a53f794886df02030b687eaea553c7c569a8ea1282a149441add1c65760 openvpn.up
diff --git a/user/perl-extutils-cppguess/APKBUILD b/user/perl-extutils-cppguess/APKBUILD
index e2fdf5e55..653135d60 100644
--- a/user/perl-extutils-cppguess/APKBUILD
+++ b/user/perl-extutils-cppguess/APKBUILD
@@ -6,7 +6,7 @@ _author=ETJ
_au=${_author%%"${_author#??}"}
_a=${_author%%"${_author#?}"}
pkgver=0.27
-pkgrel=0
+pkgrel=1
pkgdesc="Perl module for checking C++ compiler and flags"
url="https://metacpan.org/pod/ExtUtils::CppGuess"
arch="noarch"
@@ -14,7 +14,9 @@ license="Artistic-1.0-Perl OR GPL-1.0+"
depends="perl perl-capture-tiny perl-extutils-parsexs"
makedepends="perl-dev perl-module-build perl-extutils-cbuilder"
subpackages="$pkgname-doc"
-source="https://cpan.metacpan.org/authors/id/$_a/$_au/$_author/$_pkgreal-$pkgver.tar.gz"
+source="https://cpan.metacpan.org/authors/id/$_a/$_au/$_author/$_pkgreal-$pkgver.tar.gz
+ fix.patch
+ "
builddir="$srcdir/ExtUtils-CppGuess-$pkgver"
build() {
@@ -31,4 +33,5 @@ package() {
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}
-sha512sums="289e38f3033b3072ff40dffdea8cb60bc9f91e426ff927de2e8499724cecb03f76c4740b2f868d6c55bf019c9e6eb1a5de20111591c7292e60765f65a249e60c ExtUtils-CppGuess-0.27.tar.gz"
+sha512sums="289e38f3033b3072ff40dffdea8cb60bc9f91e426ff927de2e8499724cecb03f76c4740b2f868d6c55bf019c9e6eb1a5de20111591c7292e60765f65a249e60c ExtUtils-CppGuess-0.27.tar.gz
+d58f11f617021ff0783f615d5d777890ec379de6a9cb05ed271cae37529e63a7158be7aa83392d8882216971039941441f4d6d14e3155c7a51dd5e764f6c2976 fix.patch"
diff --git a/user/perl-extutils-cppguess/fix.patch b/user/perl-extutils-cppguess/fix.patch
new file mode 100644
index 000000000..13ddb2203
--- /dev/null
+++ b/user/perl-extutils-cppguess/fix.patch
@@ -0,0 +1,60 @@
+Fix MSVC detection. I don't know why I did this, either.
+
+Ref: #1174
+
+--- ExtUtils-CppGuess-0.27/lib/ExtUtils/CppGuess.pm.old 2023-11-19 13:19:51.000000000 -0600
++++ ExtUtils-CppGuess-0.27/lib/ExtUtils/CppGuess.pm 2024-07-10 11:26:59.221777726 -0500
+@@ -257,6 +257,12 @@
+ compiler_command => 'clang++',
+ extra_lflags => '-lc++',
+ );
++ } elsif ( $self->_cc_is_msvc( $c_compiler ) ) {
++ %guess = (
++ compiler_command => 'cl',
++ extra_cflags => '-TP -EHsc',
++ extra_lflags => 'msvcprt.lib',
++ );
+ } elsif( $self->_cc_is_sunstudio( $c_compiler ) ) {
+ %guess = (
+ compiler_command => 'CC',
+@@ -277,12 +283,6 @@
+ # Don't use -lstdc++ if Perl was linked with -static-libstdc++ (ActivePerl 5.18+ on Windows)
+ $guess{extra_lflags} = '-lstdc++'
+ unless ($self->_config->{ldflags} || '') =~ /static-libstdc\+\+/;
+- } elsif ( $self->_cc_is_msvc( $c_compiler ) ) {
+- %guess = (
+- compiler_command => 'cl',
+- extra_cflags => '-TP -EHsc',
+- extra_lflags => 'msvcprt.lib',
+- );
+ }
+ $guess{$ENV2VAL{$_}} = $ENV{$_} for grep defined $ENV{$_}, keys %ENV2VAL;
+ if (!%guess) {
+@@ -383,8 +383,12 @@
+
+ sub _cc_is_msvc {
+ my( $self, $cc ) = @_;
+- $self->{is_msvc}
+- = ($self->_os =~ /MSWin32/ and File::Basename::basename($cc) =~ /^cl/i);
++ $self->{is_msvc} = undef;
++ if (
++ ($self->_os =~ /MSWin32/ and File::Basename::basename($cc) =~ /^cl/i)
++ ) {
++ $self->{is_msvc} = 1;
++ }
+ return $self->{is_msvc};
+ }
+
+--- ExtUtils-CppGuess-0.27/t/002_icpp.t.old 2023-11-19 13:11:06.000000000 -0600
++++ ExtUtils-CppGuess-0.27/t/002_icpp.t 2024-07-10 11:27:48.506428703 -0500
+@@ -9,8 +9,8 @@
+ [
+ { os => 'MSWin32', cc => 'cl', config => {ccflags => ''} },
+ {
+- is_sunstudio => 0,
+- is_msvc => 1, is_gcc => 0, is_clang => 0,
++ is_sunstudio => undef,
++ is_msvc => 1, is_gcc => undef, is_clang => undef,
+ compiler_command => 'cl -TP -EHsc',
+ linker_flags => 'msvcprt.lib',
+ },
diff --git a/user/phonon-vlc/APKBUILD b/user/phonon-vlc/APKBUILD
index de6f49d36..1eb6fc9b4 100644
--- a/user/phonon-vlc/APKBUILD
+++ b/user/phonon-vlc/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=phonon-vlc
pkgver=0.11.1
-pkgrel=0
+pkgrel=1
pkgdesc="Phonon backend utilising VLC for media playback"
url="https://www.kde.org/"
arch="all"
diff --git a/user/pidgin/APKBUILD b/user/pidgin/APKBUILD
index 3a5326d1b..9cb65dc8e 100644
--- a/user/pidgin/APKBUILD
+++ b/user/pidgin/APKBUILD
@@ -1,18 +1,21 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=pidgin
pkgver=2.14.8
-pkgrel=0
+pkgrel=1
pkgdesc="Multi-protocol instant messaging client"
url="https://pidgin.im/"
arch="all"
license="GPL-2.0-only"
depends="gst-plugins-base"
+checkdepends="check-dev"
makedepends="gtk+2.0-dev perl-dev libsm-dev startup-notification-dev
libxml2-dev libidn-dev gnutls-dev dbus-dev dbus-glib-dev gstreamer-dev
cyrus-sasl-dev ncurses-dev nss-dev tcl-dev tk-dev intltool gtkspell-dev
gst-plugins-base-dev farstream-dev libgnt-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang finch libpurple"
-source="https://downloads.sourceforge.net/pidgin/$pkgname-$pkgver.tar.bz2"
+source="https://downloads.sourceforge.net/pidgin/$pkgname-$pkgver.tar.bz2
+ pidgin-2.14.8-libpurple_test_fix.patch
+ "
build() {
LIBS="-lX11 -ltinfo" ./configure \
@@ -63,4 +66,5 @@ libpurple() {
"$subpkgdir"/usr/share/
}
-sha512sums="23975501b07d14829edab7b92628703962d7a8f90849b303e2a765ec6e47d1fcbdeff62539811e26682e300a2f94520193369844de3b1c0e87f99721ca0255e6 pidgin-2.14.8.tar.bz2"
+sha512sums="23975501b07d14829edab7b92628703962d7a8f90849b303e2a765ec6e47d1fcbdeff62539811e26682e300a2f94520193369844de3b1c0e87f99721ca0255e6 pidgin-2.14.8.tar.bz2
+9b328516173c8c81bc99c3045fc91c1cd99a4b74a26b37b93ba9ec2fbfb7560bcaf0c5b8890a8ee02bbb19052a774f608d9a4061eb9966f70e5b19cd1dc144eb pidgin-2.14.8-libpurple_test_fix.patch"
diff --git a/user/pidgin/pidgin-2.14.8-libpurple_test_fix.patch b/user/pidgin/pidgin-2.14.8-libpurple_test_fix.patch
new file mode 100644
index 000000000..30caaa92e
--- /dev/null
+++ b/user/pidgin/pidgin-2.14.8-libpurple_test_fix.patch
@@ -0,0 +1,52 @@
+# HG changeset patch
+# Node ID e8f8e1558e11
+# Parent 930e4fb71321
+diff --git a/libpurple/tests/test_util.c b/libpurple/tests/test_util.c
+--- a/libpurple/tests/test_util.c
++++ b/libpurple/tests/test_util.c
+@@ -172,7 +172,7 @@
+ fail_unless(1282941722 == purple_str_to_time("2010-08-27.204202", TRUE, NULL, NULL, NULL));
+ fail_unless(1175919261 == purple_str_to_time("20070407T04:14:21.3234", TRUE, NULL, NULL, NULL));
+ fail_unless(1175919261 == purple_str_to_time("20070407T04:14:21Z", TRUE, NULL, NULL, NULL));
+- fail_unless(1631512800 == purple_str_to_time("09-13-2021", TRUE, NULL, NULL, NULL));
++ fail_unless(1631491200 == purple_str_to_time("09-13-2021", TRUE, NULL, NULL, NULL));
+
+ /* For testing local time we use Asia/Kathmandu because it's +05:45 and
+ * doesn't have DST which means the test should always pass regardless of
+@@ -195,9 +195,14 @@
+ * localtime.
+ */
+ timestamp = purple_str_to_time("09/13/202115:34:34", TRUE, NULL, NULL, &rest);
+- fail_unless(1631470500 == timestamp);
++ fail_unless(1631491200 == timestamp);
+ assert_string_equal("15:34:34", rest);
+
++ timestamp = purple_str_to_time("2010-08-27.134202-0700PDT", FALSE, &tm, &tz_off, &rest);
++ fail_unless(1282941722 == timestamp);
++ fail_unless((-7 * 60 * 60) == tz_off);
++ assert_string_equal("PDT", rest);
++
+ /* finally revert the TZ environment variable */
+ if(oldtz != NULL) {
+ g_setenv("TZ", oldtz, TRUE);
+diff --git a/libpurple/util.c b/libpurple/util.c
+--- a/libpurple/util.c
++++ b/libpurple/util.c
+@@ -887,6 +887,17 @@
+ t.tm_isdst = -1; /* -1 means dst info is not available */
+ }
+ }
++ } else {
++ /* If we have a time, figure out if we need to adjust our tz offset. */
++ if(!mktime_with_utc) {
++ if(utc) {
++ mktime_with_utc = TRUE;
++ tzoff = 0;
++ } else {
++ /* Local Time */
++ t.tm_isdst = -1; /* -1 means dst info is not available */
++ }
++ }
+ }
+
+ g_free(hours);
diff --git a/user/postfix/APKBUILD b/user/postfix/APKBUILD
index 4ab9b7ed7..4ec4dfd6a 100644
--- a/user/postfix/APKBUILD
+++ b/user/postfix/APKBUILD
@@ -1,10 +1,10 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=postfix
-pkgver=3.7.3
+pkgver=3.9.0
pkgrel=0
pkgdesc="Mail server (MTA) that is Sendmail outside and Qmail inside"
-url="http://www.postfix.org/"
+url="https://www.postfix.org/"
arch="all"
pkgusers="postfix"
pkggroups="postfix postdrop"
@@ -18,9 +18,8 @@ subpackages="$pkgname-doc $pkgname-ldap $pkgname-lmdb $pkgname-openrc
install="$pkgname.pre-install"
provider_priority=1
provides="sendmail"
-source="http://cdn.postfix.johnriley.me/mirrors/postfix-release/official/$pkgname-$pkgver.tar.gz
+source="https://postfix-mirror.horus-it.com/postfix-release/official/$pkgname-$pkgver.tar.gz
honour-config-directory.patch
- linux-6.patch
postfix.initd
"
@@ -93,7 +92,6 @@ sqlite() {
_database "sqlite" "SQLite 3"
}
-sha512sums="4ceedd1b7b364f47a3becc041cf29a48aea54e38306fd1227c5a7c25894831fb5c37150d99d781d237175e58da21ac53887c97d99bb6b715c4988777596ee890 postfix-3.7.3.tar.gz
-63ea7fe461fca1306088e9984acfab6ab3e919dafa2b606d43fbca472969e6ec232800071f939f5a4482c01c6d7b53a86de9e7e893ab94f4cb135d16ff5763cc honour-config-directory.patch
-aa9e47208041d652351ce167fe6205116658704189bc2a715a3edb31c0436d46fad909cfe57e1d6d869c933ff0b5237be0956b38a94b395781998c9092305274 linux-6.patch
+sha512sums="46faaf529a6d2edc5ea747ee0d73a028f7061a923da0ea4b1e1828d935b15f5782d83f7a8472e7c74b45ea0e96666c871efd352934bead28a88ddd3561ade324 postfix-3.9.0.tar.gz
+c79334a2d4989990bf0bc26341332611521d7cd06f1dcacc7a3baef6bf2ddd5f90208f39b26b26a07b134a2398d669a40d5322b4be6c053947fc9a962ddf7111 honour-config-directory.patch
2ad1b053bbb51d4f480dbf5a01252e8e99a82ec14a75ff49336b2b190ea55bc02400542b109fa0cc4ebfe6b42eaabbc45f70f2ea581f1eb9c4189c439b825592 postfix.initd"
diff --git a/user/postfix/honour-config-directory.patch b/user/postfix/honour-config-directory.patch
index a32c588ee..ad9d7ea3d 100644
--- a/user/postfix/honour-config-directory.patch
+++ b/user/postfix/honour-config-directory.patch
@@ -1,6 +1,6 @@
--- postfix-3.3.2/postfix-install
+++ postfix-3.3.2/postfix-install
-@@ -832,7 +832,7 @@
+@@ -846,7 +846,7 @@
# the wrong place when Postfix is being upgraded.
case "$mail_version" in
diff --git a/user/postfix/linux-6.patch b/user/postfix/linux-6.patch
deleted file mode 100644
index 19e73dc34..000000000
--- a/user/postfix/linux-6.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/makedefs 2022-01-23 21:53:41.000000000 +0100
-+++ b/makedefs 2022-09-07 19:07:02.000000000 +0200
-@@ -627,7 +627,8 @@
- : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
- : ${PLUGIN_LD="${CC-gcc} -shared"}
- ;;
-- Linux.[345].*) SYSTYPE=LINUX$RELEASE_MAJOR
-+ Linux.[3456].*)
-+ SYSTYPE=LINUX$RELEASE_MAJOR
- case "$CCARGS" in
- *-DNO_DB*) ;;
- *-DHAS_DB*) ;;
---- a/src/util/sys_defs.h 2021-12-05 19:59:27.000000000 +0100
-+++ b/src/util/sys_defs.h 2022-09-07 19:09:09.000000000 +0200
-@@ -751,7 +751,8 @@
- /*
- * LINUX.
- */
--#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5)
-+#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5) \
-+ || defined(LINUX6)
- #define SUPPORTED
- #define UINT32_TYPE unsigned int
- #define UINT16_TYPE unsigned short
diff --git a/user/qca/APKBUILD b/user/qca/APKBUILD
index 537b3b9aa..c142f5f42 100644
--- a/user/qca/APKBUILD
+++ b/user/qca/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=qca
pkgver=2.2.1
-pkgrel=0
+pkgrel=1
pkgdesc="Qt cryptographic architecture"
url="https://userbase.kde.org/QCA"
arch="all"
@@ -10,7 +10,10 @@ license="LGPL-2.1+"
depends=""
makedepends="cmake cyrus-sasl-dev qt5-qtbase-dev"
subpackages="$pkgname-dev $pkgname-doc"
-source="https://download.kde.org/stable/qca/$pkgver/qca-${pkgver}.tar.xz"
+source="https://download.kde.org/stable/qca/$pkgver/qca-${pkgver}.tar.xz
+ gcc11.patch
+ test.patch
+ "
build() {
cmake \
@@ -29,4 +32,6 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="3a0e8aa7cf3ea9a7244facaf1d521ebca2753af37636e7bf5f21c57ae880ac9682ae7d6d9fa5ce41b73568ff9538214956b89cd41228c2cb828d9068c2031a9c qca-2.2.1.tar.xz"
+sha512sums="3a0e8aa7cf3ea9a7244facaf1d521ebca2753af37636e7bf5f21c57ae880ac9682ae7d6d9fa5ce41b73568ff9538214956b89cd41228c2cb828d9068c2031a9c qca-2.2.1.tar.xz
+ff21970831239f17813c96d47ab690cc15afbc6a8da68c9c1f65d90f7314963ead2778b609ea74e3f26df4046a58907e726f51c31227714bb50c182c66a26e58 gcc11.patch
+158e75c4b3940cd74b1bbcdffc2c281d771734169cf61e091c78fec40b218fe4f141c2978a33c121b354cb81235a60eecfca070e375d1e54563a354cd98c22e5 test.patch"
diff --git a/user/qca/gcc11.patch b/user/qca/gcc11.patch
new file mode 100644
index 000000000..4fc43d818
--- /dev/null
+++ b/user/qca/gcc11.patch
@@ -0,0 +1,26 @@
+From 32275f1a74c161d2fed8c056b2dd9555687a22f2 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Sun, 24 Jan 2021 18:43:39 +0100
+Subject: [PATCH] Move moc include outside the QCA namespace
+
+It's the right thing to do and also fixes build with gcc 11
+---
+ src/qca_default.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/qca_default.cpp b/src/qca_default.cpp
+index 7c2a8f89..e31ce3e1 100644
+--- a/src/qca_default.cpp
++++ b/src/qca_default.cpp
+@@ -1358,6 +1358,6 @@ QStringList plugin_priorities(Provider *defaultProvider)
+ return that->shared.plugin_priorities();
+ }
+
+-#include "qca_default.moc"
+-
+ }
++
++#include "qca_default.moc"
+--
+GitLab
+
diff --git a/user/qca/test.patch b/user/qca/test.patch
new file mode 100644
index 000000000..6b9fb12ef
--- /dev/null
+++ b/user/qca/test.patch
@@ -0,0 +1,77 @@
+From b9d914bb3b5b0ecf8568adf1b4610d4da2cde244 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Wed, 15 Sep 2021 10:34:08 +0200
+Subject: [PATCH] Make filewatchunittest much quicker
+
+Use QSignalSpy::wait to avoid waiting needlessly.
+Reduce time to wait for (expected and unexpected) signals to 2s.
+---
+ .../filewatchunittest/filewatchunittest.cpp | 19 +++++++++----------
+ 1 file changed, 9 insertions(+), 10 deletions(-)
+
+diff --git a/unittest/filewatchunittest/filewatchunittest.cpp b/unittest/filewatchunittest/filewatchunittest.cpp
+index d1bc117c..63baa655 100644
+--- a/unittest/filewatchunittest/filewatchunittest.cpp
++++ b/unittest/filewatchunittest/filewatchunittest.cpp
+@@ -40,7 +40,7 @@ void FileWatchUnitTest::cleanupTestCase()
+
+ void FileWatchUnitTest::filewatchTest()
+ {
+- QWARN("Unittest will take about 1 minute. Please wait.");
++ QWARN("Unittest will take about 10 seconds. Please wait.");
+
+ QCA::FileWatch watcher;
+ QCOMPARE( watcher.fileName(), QString() );
+@@ -55,41 +55,40 @@ void FileWatchUnitTest::filewatchTest()
+
+ watcher.setFileName( tempFile->fileName() );
+ QCOMPARE( watcher.fileName(), tempFile->fileName() );
+- QTest::qWait(7000);
++ QVERIFY(!spy.wait(2000));
+ QCOMPARE( spy.count(), 0 );
+ tempFile->close();
+- QTest::qWait(7000);
++ QVERIFY(!spy.wait(2000));
+ QCOMPARE( spy.count(), 0 );
+
+ tempFile->open();
+ tempFile->write("foo");
+ tempFile->flush();
+- QTest::qWait(7000);
++ QVERIFY(spy.wait(2000));
+ QCOMPARE( spy.count(), 1 );
+
+ tempFile->close();
+- QTest::qWait(7000);
+-
++ QVERIFY(!spy.wait(2000));
+ QCOMPARE( spy.count(), 1 );
+
+ tempFile->open();
+ tempFile->write("foo");
+ tempFile->flush();
+- QTest::qWait(7000);
++ QVERIFY(spy.wait(2000));
+ QCOMPARE( spy.count(), 2 );
+
+ tempFile->write("bar");
+ tempFile->flush();
+- QTest::qWait(7000);
++ QVERIFY(spy.wait(2000));
+ QCOMPARE( spy.count(), 3 );
+
+ tempFile->close();
+- QTest::qWait(7000);
++ QVERIFY(!spy.wait(2000));
+
+ QCOMPARE( spy.count(), 3 );
+
+ delete tempFile;
+- QTest::qWait(7000);
++ QVERIFY(spy.wait(2000));
+ QCOMPARE( spy.count(), 4 );
+ }
+
+--
+GitLab
+
diff --git a/user/qt-creator/APKBUILD b/user/qt-creator/APKBUILD
index 7ef7f7671..57829bbe6 100644
--- a/user/qt-creator/APKBUILD
+++ b/user/qt-creator/APKBUILD
@@ -2,7 +2,8 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=qt-creator
pkgver=4.15.2
-pkgrel=0
+_llvmver=14
+pkgrel=2
pkgdesc="Cross-platform multi-language programming IDE"
url="https://doc.qt.io/qtcreator/index.html"
arch="all"
@@ -10,17 +11,19 @@ options="!check" # No test suite.
license="LGPL-2.0 WITH Qt-LGPL-exception-1.1"
depends="qt5-qtquickcontrols"
makedepends="qt5-qtbase-dev qt5-qtdeclarative-dev qt5-qtserialport-dev
- qt5-qtscript-dev qt5-qttools-dev clang-dev llvm14-dev python3
+ qt5-qtscript-dev qt5-qttools-dev clang-dev llvm${_llvmver}-dev python3
libexecinfo-dev"
subpackages="$pkgname-dev"
source="https://download.qt.io/official_releases/qtcreator/${pkgver%.*}/$pkgver/$pkgname-opensource-src-$pkgver.tar.xz
llvm13.patch
malloc_trim.patch
+ cstdint.patch
"
ldpath="/usr/lib/qtcreator"
builddir="$srcdir/$pkgname-opensource-src-$pkgver"
build() {
+ export LLVM_CONFIG="$(command -v llvm${_llvmver}-config)"
export LLVM_INSTALL_DIR=/usr
qmake -r "QMAKE_CFLAGS += $CFLAGS" "QMAKE_CXXFLAGS += $CXXFLAGS" "QMAKE_LFLAGS += $LDFLAGS" "QMAKE_LIBS += -lexecinfo"
make
@@ -32,4 +35,5 @@ package() {
sha512sums="b29d5d97a1faa8d5756069d90c18d6d367e09057b97bd75c774bc2d1e373f9f4dcc24211188259f8d397bb932a65daaacda433bced796fd165654f5c3c621258 qt-creator-opensource-src-4.15.2.tar.xz
c38cf1aea69bc52864d5aa4b6fbc01b5e91b1514a616056b270fcccc2744bb418eb93a470462823c05e00e44f44c45d8e26effd8aa72a6817402ddd9a6dd0cc4 llvm13.patch
-7fcb9b293daecc4c0f294d372507db9a6282479c4cf45999446193d9f35552db2532d47dedc9c5666a10855e20d0fe655f0ee0408abca8cc8ffbf121a230960f malloc_trim.patch"
+7fcb9b293daecc4c0f294d372507db9a6282479c4cf45999446193d9f35552db2532d47dedc9c5666a10855e20d0fe655f0ee0408abca8cc8ffbf121a230960f malloc_trim.patch
+7d7a739cf98c1bc4232d9d14334e3c3a319746db931aaad4d441c903351c56869015ce427e2098fbe930d56a2dd433b1869fbbf5a78f91c10a94f5a47a778ea0 cstdint.patch"
diff --git a/user/qt-creator/cstdint.patch b/user/qt-creator/cstdint.patch
new file mode 100644
index 000000000..39558e90f
--- /dev/null
+++ b/user/qt-creator/cstdint.patch
@@ -0,0 +1,27 @@
+--- qt-creator-opensource-src-4.15.2/src/libs/qlitehtml/src/3rdparty/litehtml/include/litehtml/html.h.old 2021-07-12 21:12:54.000000000 -0500
++++ qt-creator-opensource-src-4.15.2/src/libs/qlitehtml/src/3rdparty/litehtml/include/litehtml/html.h 2024-05-30 18:51:05.965117572 -0500
+@@ -9,6 +9,7 @@
+ #include <cstring>
+ #include <algorithm>
+ #include <sstream>
++#include <cstdint>
+ #include "os_types.h"
+ #include "types.h"
+ #include "background.h"
+--- qt-creator-opensource-src-4.15.2/src/libs/qlitehtml/src/3rdparty/litehtml/include/litehtml/num_cvt.h.old 2021-07-12 21:12:54.000000000 -0500
++++ qt-creator-opensource-src-4.15.2/src/libs/qlitehtml/src/3rdparty/litehtml/include/litehtml/num_cvt.h 2024-05-30 18:54:29.873560575 -0500
+@@ -2,6 +2,7 @@
+ #define NUM_CVT_H
+
+ #include <string>
++#include <cstdint>
+ #include "os_types.h"
+
+ namespace litehtml
+@@ -16,4 +17,4 @@
+ }
+ }
+
+-#endif // NUM_CVT_H
+\ No newline at end of file
++#endif // NUM_CVT_H
diff --git a/user/qt5-qtbase/APKBUILD b/user/qt5-qtbase/APKBUILD
index 7cd2f2b3e..1e6e92acf 100644
--- a/user/qt5-qtbase/APKBUILD
+++ b/user/qt5-qtbase/APKBUILD
@@ -173,7 +173,7 @@ x11() {
usr/lib/qt5/plugins/printsupport* \
usr/lib/qt5/plugins/xcbglintegrations
- scanelf -Rn "$pkgdir"/usr/ | egrep '(libX|libQt5Gui|libGL)' && return 1
+ scanelf -Rn "$pkgdir"/usr/ | grep -E '(libX|libQt5Gui|libGL)' && return 1
return 0
}
diff --git a/user/qt5-qtwebkit/APKBUILD b/user/qt5-qtwebkit/APKBUILD
index 63e18cb07..d4c677f39 100644
--- a/user/qt5-qtwebkit/APKBUILD
+++ b/user/qt5-qtwebkit/APKBUILD
@@ -4,7 +4,7 @@ pkgname=qt5-qtwebkit
_realname=qtwebkit
pkgver=5.212.0_git20200924
_ts=1600955993
-pkgrel=1
+pkgrel=2
pkgdesc="Open source Web browser engine"
url="https://github.com/qtwebkit/qtwebkit/wiki"
arch="all"
@@ -25,6 +25,7 @@ source="https://download.qt.io/snapshots/ci/qtwebkit/${pkgver%.*}/$_ts/src/submo
glib-compat.patch
icu-68.patch
jsc-musl.patch
+ missing-header.patch
ppc-llint.patch
ppc-ucontext.patch
ppc64-llint.patch
@@ -91,6 +92,7 @@ ca77802de1b945c05b6a88d5cc0cbb093a751ef16626d221c8b2ca5cf841f5d42fffe62087df1ce0
9f42f3d64657fb9487d9299ad5931381f9aa91a746a5986dc361def5e9a6e02933054a66132fa99057460ad6de0c19e9b51e07594451cc4f38b19012a69d205c glib-compat.patch
5f0ca182c68c55a6f221e96bf2221784c7126006ea8db3e9eee2b66dbdda18d7d0f9830e8345ac2b0bc6f557af5d2a54a321b06be4a2c845dd1003282b053443 icu-68.patch
9e3638d4d5c6e56510525931b278c8d6e28134917c300837b4eccf1b9298af1e274668318af82091137e99b83da0f78904084b7ee9dd8422b347a0f35e765c31 jsc-musl.patch
+ee3d06d3c350980a2a042961b6943d42706599b39270addce3904535811b18a2af8f74842f2d21267ce71250b97c05de600ec416e042f4d1cdbc2701711b5f4a missing-header.patch
4a3a15f8b1e63cade07c589be45afd794b45b34ee98e4d2d3fc2f52662c26c518d400b44c9314e41113cad847b9efd544d2a4c02425c9892ca9729e218ae9306 ppc-llint.patch
48f81c6a2c0f4e9b215dada4c0bebdafc66feb75178a7b1ca661f2bbcddd6b573e7db4dd179f6e4b6345c7ebcf17ce1c6647cc6ce39dbac8ba68f8863a98bdc0 ppc-ucontext.patch
db98d710815eb68f1fb025098b04c34b33518750c193e702383ca879e145c52ba4786fa4721f384f01f90231c32be9478d507c1000eb761621751edcd071b966 ppc64-llint.patch"
diff --git a/user/qt5-qtwebkit/missing-header.patch b/user/qt5-qtwebkit/missing-header.patch
new file mode 100644
index 000000000..da0eed43c
--- /dev/null
+++ b/user/qt5-qtwebkit/missing-header.patch
@@ -0,0 +1,11 @@
+The GCC 13 C++ stdlib doesn't include <stdint.h> any more, which is used for uint32_t.
+--- qtwebkit-opensource-src-5.212/Source/ThirdParty/ANGLE/src/common/mathutil.h.old 2020-09-22 06:30:04.000000000 -0500
++++ qtwebkit-opensource-src-5.212/Source/ThirdParty/ANGLE/src/common/mathutil.h 2024-05-27 14:43:22.625301664 -0500
+@@ -14,6 +14,7 @@
+
+ #include <limits>
+ #include <algorithm>
++#include <stdint.h>
+ #include <string.h>
+ #include <stdlib.h>
+
diff --git a/user/quassel/APKBUILD b/user/quassel/APKBUILD
index 8cfadbd66..dbea3d65e 100644
--- a/user/quassel/APKBUILD
+++ b/user/quassel/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=quassel
pkgver=0.14.0
-pkgrel=0
+pkgrel=1
pkgdesc="Modern, cross-platform IRC client"
url="https://quassel-irc.org/"
arch="all"
@@ -14,7 +14,7 @@ makedepends="qt5-qtbase-dev qt5-qtmultimedia-dev libdbusmenu-qt-dev sonnet-dev
kwidgetsaddons-dev qca-dev qt5-qttools-dev zlib-dev libexecinfo-dev
cmake boost-dev"
langdir="/usr/share/quassel/translations"
-subpackages="$pkgname-core $pkgname-client $pkgname-lang"
+subpackages="$pkgname-core $pkgname-client $pkgname-lang $pkgname-libs"
source="https://quassel-irc.org/pub/quassel-$pkgver.tar.bz2"
# secfixes:
@@ -62,13 +62,38 @@ client() {
mkdir -p "$subpkgdir"/usr/share/quassel
mv "$pkgdir"/usr/share/quassel/stylesheets \
"$subpkgdir"/usr/share/quassel/
+ mv "$pkgdir"/usr/share/quassel/icons \
+ "$subpkgdir"/usr/share/quassel/
+
+ mkdir -p "$subpkgdir"/usr/lib
+ for component in client qtui uisupport; do
+ mv "$pkgdir"/usr/lib/libquassel-$component.* \
+ "$subpkgdir"/usr/lib/
+ done
}
core() {
pkgdesc="Modern, cross-platform IRC daemon (core only)"
depends=""
+
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/quasselcore "$subpkgdir"/usr/bin/
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/libquassel-core* "$subpkgdir"/usr/lib/
+}
+
+libs() {
+ pkgdesc="Modern, cross-platform IRC daemon (libraries)"
+ depends=""
+
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/libquassel-common* "$subpkgdir"/usr/lib/
+
+ mkdir -p "$subpkgdir"/usr/share/quassel
+ for component in networks.ini scripts; do
+ mv "$pkgdir"/usr/share/quassel/$component \
+ "$subpkgdir"/usr/share/quassel/
+ done
}
sha512sums="ea6b9723acab5ce73f760692770c1340c03bf277d2c99a2520345bfb6a7bb6fdc64a01dccfd7026341b46ee727821e1bcc2f487be72dfbc155f1de1ad264763f quassel-0.14.0.tar.bz2"
diff --git a/user/range-v3/APKBUILD b/user/range-v3/APKBUILD
index 3221286be..84c9f8091 100644
--- a/user/range-v3/APKBUILD
+++ b/user/range-v3/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=range-v3
-pkgver=0.10.0
+pkgver=0.12.0
pkgrel=0
pkgdesc="Range library for C++"
url="http://ericniebler.com/2018/12/05/standard-ranges/"
@@ -34,4 +34,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="4db089dcbf638eb30fa20dcf6785dd460c5a074a8912984a484592753cfee9f5b9a0e2c56b5bc5921d1b6120877aa2c83ac0a6fe428088ef2854033a635e9723 range-v3-0.10.0.tar.gz"
+sha512sums="b8b632b8e0f2a3234ef61813212c237f648cd741e816ca57bd86f82f6459f7d755e2b70361d2aa43847874fb546a31a792ab1c3ba90292818ae7313438dc62d0 range-v3-0.12.0.tar.gz"
diff --git a/user/readstat/APKBUILD b/user/readstat/APKBUILD
index bb9926267..1ce3b3249 100644
--- a/user/readstat/APKBUILD
+++ b/user/readstat/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=readstat
-pkgver=1.1.8
+pkgver=1.1.9
pkgrel=0
pkgdesc="Command-line tool for converting stats package files"
url=" "
@@ -9,7 +9,11 @@ license="MIT"
depends=""
makedepends="zlib-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
-source="https://github.com/WizardMac/ReadStat/releases/download/v$pkgver/readstat-$pkgver.tar.gz"
+source="https://github.com/WizardMac/ReadStat/releases/download/v$pkgver/readstat-$pkgver.tar.gz
+ use-after-free.patch
+ buf-overflow.patch
+ big-endian.patch
+ "
build() {
./configure \
@@ -35,4 +39,7 @@ libs() {
default_libs
}
-sha512sums="0b6278c2f1acae2cb6c509dbf730b121e1d8cd6e53736f060c0b79ba5fbcf56e1c4ac39568d21e90f537a0bae0341d702421eb768d384f8891f6486b7c6c2f1f readstat-1.1.8.tar.gz"
+sha512sums="1034d2ca4f45a5b93ed1857b9176965a1584c042bfc2316cc93d0a80f589dc55ad6fe01036a6b9a4db36080b2a9876472f9016ce01e015692430dbeb7e26ece0 readstat-1.1.9.tar.gz
+b58b0b2d5da107048c4aedbb6a8a0cd7cd3710ac6e6cd5cb759fd149288da24fb2f52022586154eba42d32441ab5a6ec307f895af2875649bb57a4d0473d9a81 use-after-free.patch
+cfcad56dfe51b1454010e6cf15961816de8b60f1d5918638b8f1f208d18713db281eb1d915db4cd79fe11d28c82a1c3c23a1a05a079b4071ba2f61c1d0c74dbc buf-overflow.patch
+3aad51258a52c13c45bd94c7e12a9ae38923930f03dbbee650d489ef812999de82e8024ec5e74ca4ad191aa90b2c5d8dd983493121c9b874708b3f32419e1146 big-endian.patch"
diff --git a/user/readstat/big-endian.patch b/user/readstat/big-endian.patch
new file mode 100644
index 000000000..71f1db133
--- /dev/null
+++ b/user/readstat/big-endian.patch
@@ -0,0 +1,76 @@
+From 0034c8ee693563cbecae8fa8a24d3e8d5dcc6ab1 Mon Sep 17 00:00:00 2001
+From: Evan Miller <emmiller@gmail.com>
+Date: Sat, 4 May 2024 08:50:28 -0400
+Subject: [PATCH] [SAS7BCAT writer] big-endian architecture fix
+
+Closes #302
+---
+ src/sas/readstat_sas7bcat_write.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/sas/readstat_sas7bcat_write.c b/src/sas/readstat_sas7bcat_write.c
+index 6544798c..9642fdad 100644
+--- a/src/sas/readstat_sas7bcat_write.c
++++ b/src/sas/readstat_sas7bcat_write.c
+@@ -63,7 +63,8 @@ static sas7bcat_block_t *sas7bcat_block_for_label_set(readstat_label_set_t *r_la
+
+ for (j=0; j<r_label_set->value_labels_count; j++) {
+ readstat_value_label_t *value_label = readstat_get_value_label(r_label_set, j);
+- lbp1[2] = 24; // size - 6
++ int16_t value_entry_len = 24; // size - 6
++ memcpy(&lbp1[2], &value_entry_len, sizeof(int16_t));
+ int32_t index = j;
+ memcpy(&lbp1[10], &index, sizeof(int32_t));
+ if (r_label_set->type == READSTAT_TYPE_STRING) {
+@@ -86,7 +87,7 @@ static sas7bcat_block_t *sas7bcat_block_for_label_set(readstat_label_set_t *r_la
+ memcpy(&lbp2[8], &label_len, sizeof(int16_t));
+ memcpy(&lbp2[10], value_label->label, label_len);
+
+- lbp1 += 30;
++ lbp1 += 6 + value_entry_len;
+ lbp2 += 8 + 2 + value_label->label_len + 1;
+ }
+
+From 29aac3db79a5da20d1d1dcbb54a587c5ba51e7b3 Mon Sep 17 00:00:00 2001
+From: Evan Miller <emmiller@gmail.com>
+Date: Sat, 4 May 2024 10:35:27 -0400
+Subject: [PATCH] [SAS7BCAT writer] more big-endian fixes
+
+---
+ src/sas/readstat_sas7bcat_write.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/sas/readstat_sas7bcat_write.c b/src/sas/readstat_sas7bcat_write.c
+index 9642fda..c25fec0 100644
+--- a/src/sas/readstat_sas7bcat_write.c
++++ b/src/sas/readstat_sas7bcat_write.c
+@@ -46,7 +46,8 @@ static sas7bcat_block_t *sas7bcat_block_for_label_set(readstat_label_set_t *r_la
+ memcpy(&block->data[38], &count, sizeof(int32_t));
+ memcpy(&block->data[42], &count, sizeof(int32_t));
+ if (name_len > 8) {
+- block->data[2] = (char)0x80;
++ int16_t flags = 0x80;
++ memcpy(&block->data[2], &flags, sizeof(int16_t));
+ memcpy(&block->data[8], name, 8);
+
+ memset(&block->data[106], ' ', 32);
+@@ -139,16 +140,15 @@ static readstat_error_t sas7bcat_begin_data(void *writer_ctx) {
+
+ // Page 1
+ char *xlsr = &page[856];
+- int16_t block_idx, block_off;
+- block_idx = 4;
+- block_off = 16;
++ int32_t block_idx = 4;
++ int16_t block_off = 16;
+ for (i=0; i<writer->label_sets_count; i++) {
+ if (xlsr + 212 > page + hinfo->page_size)
+ break;
+
+ memcpy(&xlsr[0], "XLSR", 4);
+
+- memcpy(&xlsr[4], &block_idx, sizeof(int16_t));
++ memcpy(&xlsr[4], &block_idx, sizeof(int32_t));
+ memcpy(&xlsr[8], &block_off, sizeof(int16_t));
+
+ xlsr[50] = 'O';
diff --git a/user/readstat/buf-overflow.patch b/user/readstat/buf-overflow.patch
new file mode 100644
index 000000000..f3766bb24
--- /dev/null
+++ b/user/readstat/buf-overflow.patch
@@ -0,0 +1,26 @@
+From c7baae72b36acdc24f56ad48d3e859850fdbdc2b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= <csardi.gabor@gmail.com>
+Date: Sat, 17 Feb 2024 21:23:14 +0100
+Subject: [PATCH] Fix a buffer overflow (#311)
+
+It happens if raw_str_used underflows and ends up a very large number,
+which is then used as the size of a string.
+
+Closes #285.
+---
+ src/spss/readstat_sav_read.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/spss/readstat_sav_read.c b/src/spss/readstat_sav_read.c
+index 7f49490..460bf07 100644
+--- a/src/spss/readstat_sav_read.c
++++ b/src/spss/readstat_sav_read.c
+@@ -717,7 +717,7 @@ static readstat_error_t sav_process_row(unsigned char *buffer, size_t buffer_len
+ }
+ if (++offset == col_info->width) {
+ if (++segment_offset < var_info->n_segments) {
+- raw_str_used--;
++ if (raw_str_used > 0) raw_str_used--;
+ }
+ offset = 0;
+ col++;
diff --git a/user/readstat/use-after-free.patch b/user/readstat/use-after-free.patch
new file mode 100644
index 000000000..70ea38ffd
--- /dev/null
+++ b/user/readstat/use-after-free.patch
@@ -0,0 +1,37 @@
+From 718d49155e327471ed9bf4a8c157f849f285b46c Mon Sep 17 00:00:00 2001
+From: Stefan Gerlach <stefan.gerlach@uni-konstanz.de>
+Date: Wed, 20 Sep 2023 15:18:07 +0200
+Subject: [PATCH] Fix use after free (#298)
+
+---
+ src/bin/readstat.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/bin/readstat.c b/src/bin/readstat.c
+index 48b8fdd..e3fbbd1 100644
+--- a/src/bin/readstat.c
++++ b/src/bin/readstat.c
+@@ -397,8 +397,6 @@ static int convert_file(const char *input_filename, const char *catalog_filename
+ module->finish(rs_ctx->module_ctx);
+ }
+
+- free(rs_ctx);
+-
+ if (error != READSTAT_OK) {
+ if (file_exists) {
+ fprintf(stderr, "Error opening %s: File exists (Use -f to overwrite)\n", output_filename);
+@@ -406,9 +404,14 @@ static int convert_file(const char *input_filename, const char *catalog_filename
+ fprintf(stderr, "Error processing %s: %s\n", rs_ctx->error_filename, readstat_error_message(error));
+ unlink(output_filename);
+ }
++
++ free(rs_ctx);
++
+ return 1;
+ }
+
++ free(rs_ctx);
++
+ return 0;
+ }
+
diff --git a/user/redis/APKBUILD b/user/redis/APKBUILD
index 0a6f287d8..2d58b308b 100644
--- a/user/redis/APKBUILD
+++ b/user/redis/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: V.Krishn <vkrishn4@gmail.com>
# Maintainer: Alyx Wolcott <alyx@leuhta.com>
pkgname=redis
-pkgver=6.0.16
+pkgver=7.2.5
pkgrel=0
pkgdesc="Advanced key-value store"
url="https://redis.io/"
@@ -79,7 +79,7 @@ package() {
install
}
-sha512sums="83bb72448f9943e3d015cb4d961eb2eae21602ef1f90ca52ca8ab7c6918b0ab979db9f61f3981df27b2286894f4864f4588c3a52fa988e30e9419b0967998845 redis-6.0.16.tar.gz
+sha512sums="e064a0f380e3a00ab8eb2f10ed7317fd6aa27d64cf00792fab80465036f92d17b166050e71b8a779fdf024528ac736cb54722316811f99951c4e386f4ab2245d redis-7.2.5.tar.gz
f768acea3e1868dbf0596085640c83e58d899860d7d647b0965fa858844c494d0a49b229fb417456d83f3e2690e5450950c31e0fa40529df85a9cde38d8981c4 fix-ppc-atomics.patch
856ae98e9e8670801827c3bd793dc14ed2c62c37365f8d04b452d7e1ab97300a0bf18c59b52ea686c2689d53aeed8e29e2c55207d3d4fb1fd8fc7fc820f33157 posix-runtest.patch
91b663f802aea9a473195940d3bf2ce3ca2af4e5b6e61a2d28ebbfe502ef2c764b574b7e87c49e60345d1a5d6b73d12920924c93b26be110c2ce824023347b6f redis.initd
diff --git a/user/rspamd/10-conf-split-workers.patch b/user/rspamd/10-conf-split-workers.patch
index 505d2c72e..be8f073e4 100644
--- a/user/rspamd/10-conf-split-workers.patch
+++ b/user/rspamd/10-conf-split-workers.patch
@@ -36,7 +36,7 @@ upgrading the aport!
-
-worker "fuzzy" {
- bind_socket = "localhost:11335";
-- count = -1; # Disable by default
+- count = -1; # Disable by default, see #4677 for details
- .include "$CONFDIR/worker-fuzzy.inc"
- .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-fuzzy.inc"
- .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-fuzzy.inc"
diff --git a/user/rspamd/APKBUILD b/user/rspamd/APKBUILD
index 2c9699529..a54dba858 100644
--- a/user/rspamd/APKBUILD
+++ b/user/rspamd/APKBUILD
@@ -5,7 +5,7 @@
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Lee Starnes <lee@canned-death.us>
pkgname=rspamd
-pkgver=3.2
+pkgver=3.8.4
pkgrel=0
pkgdesc="Fast, free and open-source spam filtering system"
url="https://rspamd.com/"
@@ -22,6 +22,7 @@ makedepends="
glib-dev
icu-dev
libevent-dev
+ libexecinfo-dev
libgd-dev
libsodium-dev
lua5.3
@@ -31,6 +32,7 @@ makedepends="
perl
ragel
sqlite-dev
+ zstd-dev
"
install="$pkgname.pre-install"
subpackages="
@@ -55,7 +57,7 @@ build() {
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
- cmake -B build \
+ LDFLAGS="-lexecinfo" cmake -B build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCONFDIR=/etc/$pkgname \
@@ -67,7 +69,9 @@ build() {
-DLUA_LIBRARY=/usr/lib/lua5.3/liblua.so \
-DENABLE_REDIRECTOR=ON \
-DENABLE_URL_INCLUDE=ON \
+ -DENABLE_BACKWARD=OFF \
-DENABLE_PCRE2=ON \
+ -DSYSTEM_ZSTD=ON \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_C_FLAGS="$CFLAGS" \
"$CMAKE_CROSSOPTS" .
@@ -132,7 +136,6 @@ utils() {
mkdir -p "$subpkgdir/usr/bin"
mv "$pkgdir/usr/bin/${pkgname}-stats" "$subpkgdir/usr/bin/"
- mv "$pkgdir/usr/bin/${pkgname}-redirector" "$subpkgdir/usr/bin/"
}
fuzzy() {
@@ -165,8 +168,8 @@ proxy() {
mv "$pkgdir/etc/$pkgname"/worker-proxy.* "$subpkgdir/etc/$pkgname/"
}
-sha512sums="fd3570da24d7f09f48ba6e98c210789b85006c51adaf37336c83a570ef5b9239d4a09491b647464254d3600fbea7c662ec271e9a77ee4108236962490c677a79 rspamd-3.2.tar.gz
+sha512sums="dda099dd9a17699d143fc8018b89fbecfa9659eccc26b5fb88bc3f40c47e935993dfc81f1f93bb69880d17af40870e6ea20edbeed7e3f4c12c278f5c12b56a51 rspamd-3.8.4.tar.gz
2efe28575c40d1fba84b189bb872860e744400db80dce2f6330be6c6287fb3f46e6511284729b957488bf40bcb9b0952e26df9934f5f138334bd2766075c45cb rspamd.logrotated
782e1126d32e450a1db0ac822c127b9a763f903093f200bdf603a6a0610a853671b94c89b0bb2d8ebdfb065e0cf62be51c1c7f451e8da34e25f252a276c2b0f3 rspamd.initd
a2003ef0c9d64a44480f59302864a2dfedcbe3a0047fcbb655408bc8aae9014b6ad0ddc6b64d4abeeb21bea0f86678afd30589ac8eed83e07ad7f87710e93702 rspamd.confd
-a8aefee649bf6630339d1d3f2bb20c25ca70b21a8eaa92951e926d0fd4525f1d4ac4cc7ea66ac2b15323cf02c93c759ddf7181502f0d71b21384ced9d88c008e 10-conf-split-workers.patch"
+0321c76b42131943f7b53efeb6bbd1c5b732fdec4f796838568af45d245066518f8b2ccd667d5a370df539ba73dda47e66d4ce0eeb211ef6fc5942e96c2e311b 10-conf-split-workers.patch"
diff --git a/user/rttr/APKBUILD b/user/rttr/APKBUILD
index 58d0bb293..a4e5385db 100644
--- a/user/rttr/APKBUILD
+++ b/user/rttr/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=rttr
pkgver=0.9.6
-pkgrel=0
+pkgrel=1
pkgdesc="C++ reflection library"
url=" "
arch="all"
@@ -15,6 +15,11 @@ source="https://github.com/rttrorg/rttr/releases/download/v$pkgver/rttr-$pkgver-
dlclose-doesnt-work.patch
install-doc.patch
permissions.patch
+ header.patch
+ clang.patch
+ no-pessimising-moves.patch
+ gcc9.patch
+ show-warnings-not-error-out.patch
"
build() {
@@ -26,7 +31,7 @@ build() {
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
- -DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-error=class-memaccess -DNDEBUG" \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-error=class-memaccess -Wno-deprecated-declarations -Wno-pessimizing-move -DNDEBUG" \
${CMAKE_CROSSOPTS} .
make
}
@@ -43,4 +48,9 @@ sha512sums="7e0d4fa87f83feda0b926d4d0e52aaf0f369f25fe7e23e5ffe86c0bba159e8353cef
559b4d55109b7021082cdd15663075312d80a896325db2b6bba43bf9d3ba17ecc2152aa30617f200be904351c7f8ba188b7e7a6b29a71612b42d48a5a0535aa7 arm64.patch
76efa45715d2a6459ae3cf5a6189de414775eed11a1f6780de563005765139ae6be86e30ead63b5ef8e9a5e84ba77a4ef2b7a75ded7506c6c8d81a696a887ff3 dlclose-doesnt-work.patch
825ca43fb35f6139db13f0b01818b49bb1556a1190ac2941c643e4d438c5b458883fa2ffb64d95625125c251632da7b3d8b703141335df8883b6e186f2e6a349 install-doc.patch
-905e4c62093ee3877a8a15a1cbd4bc20499e04916ce869a495cf4ef9f47aa94d56aa5ac861d0ca8b6079f2a3b398f92237dc423e452130f7c40b9a170a8aa625 permissions.patch"
+905e4c62093ee3877a8a15a1cbd4bc20499e04916ce869a495cf4ef9f47aa94d56aa5ac861d0ca8b6079f2a3b398f92237dc423e452130f7c40b9a170a8aa625 permissions.patch
+75ff5e06f92c94db6b7c04846bfff1dcde22b81831a40ad7533cd93fc9ca300c76ca1266081ac4784bc3b94a8b805db28b841702b10d66232c1110d57c812245 header.patch
+3bbdc8feb9b64b4a9f0db138ea0612e3e5a57004fda8b856c30a5f05824009543f396654c6ef3b6e157ce62c7057a239029dd35c749387d9ad91dcc4ac2c00e4 clang.patch
+3e7f81db25f0af6a3924e693d30cb5895fbc13dd3eac752d66082ae34c08fc779de086764f63f52170399cb85c5cf87ef182bdc8d8f054fd7f085bc90e779dc8 no-pessimising-moves.patch
+2dda29b06484bfad15fefe919bce30ab1b6a6f0b9aec10a09736e1018565151cb675874484b4bb573d27d0742fe5943e002074cfa9f822fc1d3888fd3c8a9dc0 gcc9.patch
+f42539edff3b08cf2938a489a9163e3ab81fd43422de1b22a23bae8ef198554f46b5ded4e6f09fb2840fbdd711385563bedcdbb9238569ff7c9484b84eb7bc53 show-warnings-not-error-out.patch"
diff --git a/user/rttr/clang.patch b/user/rttr/clang.patch
new file mode 100644
index 000000000..9d1a5431b
--- /dev/null
+++ b/user/rttr/clang.patch
@@ -0,0 +1,141 @@
+From 1a357c61e8bc75d6b1a6b8cc88142fbed25a70e9 Mon Sep 17 00:00:00 2001
+From: acki-m <acki-m@users.noreply.github.com>
+Date: Fri, 14 Sep 2018 08:50:00 +0200
+Subject: [PATCH] Bugfix clang virtual override warning (#192)
+
+* fixed missing use of 'override' in classes that use RTTR_ENABLE
+
+following test case:
+
+struct s_base
+{
+virtual ~s_base() = default; // always use virtual dtor in base class
+RTTR_ENABLE()
+};
+
+struct s_derived : s_base
+{
+~s_derived() override = default;
+// Clang options require "override" on inherited virtual functions
+RTTR_ENABLE(s_base)
+};
+
+clang warning is: 'get_derived_info' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
+
+The fix is to disable the warning for the usage of RTTR_ENABLE only
+
+* add test case code in unit test for warning of override inconsistency
+
+* added missing quotes
+---
+ src/rttr/detail/base/core_prerequisites.h | 21 +++++++++++++++++--
+ src/rttr/rttr_enable.h | 2 ++
+ .../property/property_class_inheritance.cpp | 4 ++++
+ 3 files changed, 25 insertions(+), 2 deletions(-)
+
+diff --git a/src/rttr/detail/base/core_prerequisites.h b/src/rttr/detail/base/core_prerequisites.h
+index d9fc0a22..f60d91c3 100644
+--- a/src/rttr/detail/base/core_prerequisites.h
++++ b/src/rttr/detail/base/core_prerequisites.h
+@@ -261,15 +261,21 @@ namespace rttr
+ # define RTTR_BEGIN_DISABLE_CONDITIONAL_EXPR_WARNING
+ # define RTTR_END_DISABLE_CONDITIONAL_EXPR_WARNING
+ #if RTTR_COMP_VER >= 700
+-
+ #define RTTR_BEGIN_DISABLE_EXCEPT_TYPE_WARNING _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wnoexcept-type\"")
+ #define RTTR_END_DISABLE_EXCEPT_TYPE_WARNING _Pragma ("GCC diagnostic pop")
+ #else
+-
+ #define RTTR_BEGIN_DISABLE_EXCEPT_TYPE_WARNING
+ #define RTTR_END_DISABLE_EXCEPT_TYPE_WARNING
++#endif
+
++#if RTTR_COMP_VER >= 510
++# define RTTR_BEGIN_DISABLE_OVERRIDE_WARNING _Pragma ("GCC diagnostic push") \
++ _Pragma ("GCC diagnostic ignored \"-Wsuggest-override\"")
++# define RTTR_END_DISABLE_OVERRIDE_WARNING _Pragma ("GCC diagnostic pop")
++# else
++# define RTTR_BEGIN_DISABLE_OVERRIDE_WARNING
++# define RTTR_END_DISABLE_OVERRIDE_WARNING
+ #endif
+
+ # define RTTR_DECLARE_PLUGIN_CTOR __attribute__((constructor))
+@@ -298,6 +304,15 @@ namespace rttr
+ # define RTTR_END_DISABLE_EXCEPT_TYPE_WARNING
+ #endif
+
++#if defined(__has_warning) && __has_warning("-Winconsistent-missing-override")
++# define RTTR_BEGIN_DISABLE_OVERRIDE_WARNING _Pragma ("clang diagnostic push") \
++ _Pragma ("clang diagnostic ignored \"-Winconsistent-missing-override\"")
++# define RTTR_END_DISABLE_OVERRIDE_WARNING _Pragma ("clang diagnostic pop")
++#else
++# define RTTR_BEGIN_DISABLE_OVERRIDE_WARNING
++# define RTTR_END_DISABLE_OVERRIDE_WARNING
++#endif
++
+ # define RTTR_DECLARE_PLUGIN_CTOR __attribute__((__constructor__))
+ # define RTTR_DECLARE_PLUGIN_DTOR __attribute__((__destructor__))
+
+@@ -315,6 +330,8 @@ namespace rttr
+ # define RTTR_END_DISABLE_EXCEPT_TYPE_WARNING
+ # define RTTR_DECLARE_PLUGIN_CTOR
+ # define RTTR_DECLARE_PLUGIN_DTOR
++# define RTTR_BEGIN_DISABLE_OVERRIDE_WARNING
++# define RTTR_END_DISABLE_OVERRIDE_WARNING
+
+ #else
+ # pragma message("WARNING: unknown compiler, don't know how to disable deprecated warnings")
+diff --git a/src/rttr/rttr_enable.h b/src/rttr/rttr_enable.h
+index 1bd2e774..93d0fadd 100644
+--- a/src/rttr/rttr_enable.h
++++ b/src/rttr/rttr_enable.h
+@@ -81,10 +81,12 @@
+
+ #define RTTR_ENABLE(...) \
+ public:\
++RTTR_BEGIN_DISABLE_OVERRIDE_WARNING \
+ virtual RTTR_INLINE rttr::type get_type() const { return rttr::detail::get_type_from_instance(this); } \
+ virtual RTTR_INLINE void* get_ptr() { return reinterpret_cast<void*>(this); } \
+ virtual RTTR_INLINE rttr::detail::derived_info get_derived_info() { return {reinterpret_cast<void*>(this), rttr::detail::get_type_from_instance(this)}; } \
+ using base_class_list = TYPE_LIST(__VA_ARGS__); \
++RTTR_END_DISABLE_OVERRIDE_WARNING \
+ private:
+
+ #endif // DOXYGEN
+diff --git a/src/unit_tests/property/property_class_inheritance.cpp b/src/unit_tests/property/property_class_inheritance.cpp
+index 3618ac5c..e10c795c 100644
+--- a/src/unit_tests/property/property_class_inheritance.cpp
++++ b/src/unit_tests/property/property_class_inheritance.cpp
+@@ -56,6 +56,7 @@ struct left : virtual top
+ {
+
+ left() : _p2(true){}
++ ~left() override = default;
+ bool _p2;
+
+ RTTR_ENABLE(top)
+@@ -67,6 +68,7 @@ struct right : virtual top
+ {
+
+ right() : _p3(true){}
++ ~right() override = default;
+ bool _p3;
+
+ RTTR_ENABLE(top)
+@@ -77,6 +79,7 @@ struct right : virtual top
+ struct right_2
+ {
+ virtual ~right_2() {}
++
+ right_2() : _p4(true){}
+ bool _p4;
+ RTTR_ENABLE()
+@@ -87,6 +90,7 @@ struct right_2
+ struct bottom : left, right, right_2
+ {
+ bottom() : _p5(23.0){}
++ ~bottom() override = default;
+
+ double _p5;
+
diff --git a/user/rttr/gcc9.patch b/user/rttr/gcc9.patch
new file mode 100644
index 000000000..4e438859e
--- /dev/null
+++ b/user/rttr/gcc9.patch
@@ -0,0 +1,103 @@
+From 7edbd580cfad509a3253c733e70144e36f02ecd4 Mon Sep 17 00:00:00 2001
+From: Axel Menzel <info@axelmenzel.de>
+Date: Sun, 8 Aug 2021 12:27:15 +0200
+Subject: [PATCH] add github actions workflow & disable gcc9 warnings
+
+Additional: disable initializer list warning
+---
+ .github/workflows/linux.yml | 23 +++++++++++++++++++
+ src/rttr/detail/base/core_prerequisites.h | 15 ++++++++++++
+ src/rttr/detail/variant/variant_data_policy.h | 3 ++-
+ 3 files changed, 40 insertions(+), 1 deletion(-)
+ create mode 100644 .github/workflows/linux.yml
+
+diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
+new file mode 100644
+index 00000000..c232943e
+--- /dev/null
++++ b/.github/workflows/linux.yml
+@@ -0,0 +1,23 @@
++name: Linux
++
++on: [push]
++env:
++ # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
++ BUILD_TYPE: Release
++
++jobs:
++ build:
++ runs-on: ubuntu-latest
++
++ steps:
++ - uses: actions/checkout@v2
++ - uses: seanmiddleditch/gha-setup-ninja@master
++
++ - name: Configure CMake
++ run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_EXAMPLES=OFF -G Ninja
++
++ - name: Build
++ run: cmake --build ${{github.workspace}}/build
++
++ - name: Test
++ run: cmake --build ${{github.workspace}}/build --target run_tests
+diff --git a/src/rttr/detail/base/core_prerequisites.h b/src/rttr/detail/base/core_prerequisites.h
+index 6aa29d77..601ddeb9 100644
+--- a/src/rttr/detail/base/core_prerequisites.h
++++ b/src/rttr/detail/base/core_prerequisites.h
+@@ -278,6 +278,15 @@ namespace rttr
+ # define RTTR_END_DISABLE_OVERRIDE_WARNING
+ #endif
+
++#if RTTR_COMP_VER >= 900
++# define RTTR_BEGIN_DISABLE_INIT_LIST_WARNING _Pragma ("GCC diagnostic push") \
++ _Pragma ("GCC diagnostic ignored \"-Winit-list-lifetime\"")
++# define RTTR_END_DISABLE_INIT_LIST_WARNING _Pragma ("GCC diagnostic pop")
++# else
++# define RTTR_BEGIN_DISABLE_INIT_LIST_WARNING
++# define RTTR_END_DISABLE_INIT_LIST_WARNING
++#endif
++
+ # define RTTR_DECLARE_PLUGIN_CTOR __attribute__((constructor))
+ # define RTTR_DECLARE_PLUGIN_DTOR __attribute__((destructor))
+
+@@ -313,6 +322,10 @@ namespace rttr
+ # define RTTR_END_DISABLE_OVERRIDE_WARNING
+ #endif
+
++
++# define RTTR_BEGIN_DISABLE_INIT_LIST_WARNING
++# define RTTR_END_DISABLE_INIT_LIST_WARNING
++
+ # define RTTR_DECLARE_PLUGIN_CTOR __attribute__((__constructor__))
+ # define RTTR_DECLARE_PLUGIN_DTOR __attribute__((__destructor__))
+
+@@ -332,6 +345,8 @@ namespace rttr
+ # define RTTR_DECLARE_PLUGIN_DTOR
+ # define RTTR_BEGIN_DISABLE_OVERRIDE_WARNING
+ # define RTTR_END_DISABLE_OVERRIDE_WARNING
++# define RTTR_BEGIN_DISABLE_INIT_LIST_WARNING
++# define RTTR_END_DISABLE_INIT_LIST_WARNING
+
+ #else
+ # pragma message("WARNING: unknown compiler, don't know how to disable deprecated warnings")
+diff --git a/src/rttr/detail/variant/variant_data_policy.h b/src/rttr/detail/variant/variant_data_policy.h
+index 39dbb2f9..8eeaafbe 100644
+--- a/src/rttr/detail/variant/variant_data_policy.h
++++ b/src/rttr/detail/variant/variant_data_policy.h
+@@ -434,7 +434,7 @@ struct variant_data_policy_big : variant_data_base_policy<T, variant_data_policy
+ {
+ delete &value;
+ }
+-
++RTTR_BEGIN_DISABLE_INIT_LIST_WARNING
+ static RTTR_INLINE void clone(const T& value, variant_data& dest)
+ {
+ reinterpret_cast<T*&>(dest) = new T(value);
+@@ -450,6 +450,7 @@ struct variant_data_policy_big : variant_data_base_policy<T, variant_data_policy
+ {
+ reinterpret_cast<T*&>(dest) = new T(std::forward<U>(value));
+ }
++RTTR_END_DISABLE_INIT_LIST_WARNING
+ };
+
+ /////////////////////////////////////////////////////////////////////////////////////////
diff --git a/user/rttr/header.patch b/user/rttr/header.patch
new file mode 100644
index 000000000..ee908775b
--- /dev/null
+++ b/user/rttr/header.patch
@@ -0,0 +1,21 @@
+From b16fccf0fbbbf94064bf2a6c7c47f2b910ab31f1 Mon Sep 17 00:00:00 2001
+From: Veawor Liu <veawor@gmail.com>
+Date: Tue, 22 Oct 2019 05:04:47 +0800
+Subject: [PATCH] Fixed compiler errors. (#253)
+
+---
+ src/rttr/variant.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/rttr/variant.h b/src/rttr/variant.h
+index cec094b0..40978e3b 100644
+--- a/src/rttr/variant.h
++++ b/src/rttr/variant.h
+@@ -38,6 +38,7 @@
+ #include <cstddef>
+ #include <cstdint>
+ #include <algorithm>
++#include <string>
+
+ namespace rttr
+ {
diff --git a/user/rttr/no-pessimising-moves.patch b/user/rttr/no-pessimising-moves.patch
new file mode 100644
index 000000000..7ca6655fc
--- /dev/null
+++ b/user/rttr/no-pessimising-moves.patch
@@ -0,0 +1,65 @@
+From ea1e41f02ca1e32a9bbb731fec05708101c0e03f Mon Sep 17 00:00:00 2001
+From: Andrey Davydov <andrey.a.davydov@gmail.com>
+Date: Mon, 6 Jan 2020 15:11:47 +0300
+Subject: [PATCH] fix pessimizing moves
+
+---
+ src/rttr/detail/registration/bind_impl.h | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/rttr/detail/registration/bind_impl.h b/src/rttr/detail/registration/bind_impl.h
+index 7bb63278..606398a4 100644
+--- a/src/rttr/detail/registration/bind_impl.h
++++ b/src/rttr/detail/registration/bind_impl.h
+@@ -295,7 +295,7 @@ class registration::bind<detail::ctor_func, Class_Type, F, acc_level, Visitor_Li
+ std::move(get_metadata(std::forward<Args>(args)...)),
+ std::move(get_default_args<type_list<Acc_Func>, function_type>(std::forward<Args>(args)...)),
+ std::move(create_param_infos<type_list<F>, function_type>(std::forward<Args>(args)...)));
+- return std::move(ctor);
++ return ctor;
+ }
+ public:
+ bind(const std::shared_ptr<detail::registration_executer>& reg_exec, F func)
+@@ -397,6 +397,6 @@ class registration::bind<detail::prop, Class_Type, A, acc_level, Visitor_List> :
+ getter_policy, setter_policy,
+ Metadata_Count>>(name, type::get<Class_Type>(), acc, std::move(metadata_list));
+- return std::move(prop);
++ return prop;
+ }
+
+ public:
+@@ -491,6 +491,6 @@ class registration::bind<detail::prop, Class_Type, A1, A2, acc_level, Visitor_Li
+ Metadata_Count>>(name, type::get<Class_Type>(),
+ getter, setter, std::move(metadata_list));
+- return std::move(prop);
++ return prop;
+ }
+
+ public:
+@@ -583,7 +583,7 @@ class registration::bind<detail::prop_readonly, Class_Type, A, acc_level, Visito
+ >
+ >(name, acc, std::move(metadata_list));
+
+- return std::move(prop);
++ return prop;
+ }
+
+ public:
+@@ -678,7 +678,7 @@ class registration::bind<detail::meth, Class_Type, F, acc_level, Visitor_List> :
+ std::move(get_metadata(std::forward<Args>(args)...)),
+ std::move(get_default_args<type_list<Acc_Func>, function_type>(std::forward<Args>(args)...)),
+ std::move(create_param_infos<type_list<F>, function_type>(std::forward<Args>(args)...)) );
+- return std::move(meth);
++ return meth;
+ }
+
+ template<typename Policy, std::size_t Metadata_Count, typename...TArgs, typename...Param_Args>
+@@ -791,7 +791,7 @@ class registration::bind<detail::enum_, Class_Type, Enum_Type> : public registra
+ std::move(get_metadata(std::forward<Args>(args)...)));
+
+
+- return std::move(enum_wrapper);
++ return enum_wrapper;
+ }
+
+ public:
diff --git a/user/rttr/show-warnings-not-error-out.patch b/user/rttr/show-warnings-not-error-out.patch
new file mode 100644
index 000000000..11d332048
--- /dev/null
+++ b/user/rttr/show-warnings-not-error-out.patch
@@ -0,0 +1,16 @@
+diff -ur a/CMake/utility.cmake b/CMake/utility.cmake
+--- a/CMake/utility.cmake 2024-06-04 17:45:24.308248159 +0000
++++ b/CMake/utility.cmake 2024-06-04 17:46:10.476409691 +0000
+@@ -392,10 +392,10 @@
+ ####################################################################################
+ function( set_compiler_warnings target)
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+- set(WARNINGS "-Werror"
++ set(WARNINGS "-Wextra"
+ "-Wall")
+ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+- set(WARNINGS "-Werror"
++ set(WARNINGS "-Wextra"
+ "-Wall")
+ elseif(MSVC)
+ set(WARNINGS "/WX"
diff --git a/user/rxvt-unicode/APKBUILD b/user/rxvt-unicode/APKBUILD
index bae5feaa3..ed074972a 100644
--- a/user/rxvt-unicode/APKBUILD
+++ b/user/rxvt-unicode/APKBUILD
@@ -4,16 +4,17 @@
# Contributor: Ariadne Conill <ariadne@dereferenced.org>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=rxvt-unicode
-pkgver=9.22
-pkgrel=4
+pkgver=9.31
+pkgrel=1
pkgdesc="Fork of the rxvt terminal emulator with improved unicode support"
url="http://software.schmorp.de/pkg/rxvt-unicode.html"
arch="all"
options="!check" # No test suite.
license="(GPL-2.0+ OR BSD-2-Clause) AND GPL-2.0+ AND GPL-3.0+"
depends="$pkgname-terminfo"
-makedepends="libx11-dev libxft-dev ncurses fontconfig-dev utmps-dev
- gdk-pixbuf-dev libxrender-dev perl-dev startup-notification-dev"
+makedepends="libx11-dev libxft-dev ncurses fontconfig-dev libptytty-dev
+ gdk-pixbuf-dev libxrender-dev perl-dev startup-notification-dev
+ libxext-dev"
subpackages="$pkgname-doc $pkgname-terminfo::noarch"
source="http://dist.schmorp.de/$pkgname/Attic/$pkgname-$pkgver.tar.bz2
gentables.patch
@@ -21,8 +22,7 @@ source="http://dist.schmorp.de/$pkgname/Attic/$pkgname-$pkgver.tar.bz2
"
build() {
- export CXXFLAGS="$CXXFLAGS -DWTMPX_FILE=\\\"\"/run/utmps/wtmp\"\\\""
- LIBS="-lutmps -lskarnet" ./configure \
+ ./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
@@ -63,6 +63,6 @@ terminfo() {
mv "$pkgdir"/usr/share/terminfo "$subpkgdir"/usr/share/terminfo
}
-sha512sums="b39f1b2cbe6dd3fbd2a0ad6a9d391a2b6f49d7c5e67bc65fe44a9c86937f8db379572c67564c6e21ff6e09b447cdfd4e540544e486179e94da0e0db679c04dd9 rxvt-unicode-9.22.tar.bz2
+sha512sums="4d14ecbbb62de1b1c717277f5aae5cfb536e11392f2d4b82c884c1713f437fce8e9dd69a328fa353a55d068d8ee4121a31900f45191acec172d5dc76652b6255 rxvt-unicode-9.31.tar.bz2
a45074b8fe39ffb712bd53b03521a8611fe5887a97ea09c1e85a7086de1042dd0360269803ffe5fcc56425af3c0cc3a55c214b2ef0fcfa2c3a298b4b37d261cb gentables.patch
-42314393f7f061f1aa2cf2fedd3d84e96d3104868b0629cefd9e9b313529afde52127a412992e76935fa2de8d4e685d6b5ce42162cb8d1b0365de63d10c11925 kerning.patch"
+e4e9a05e006a555a8ee6df66dd8d4e93beb9f4e07fd4a889f53dc7ca8cbb49f3c8be140b51bcb26de62e505f3852877aff25f03c6872752133255bbeda291fb8 kerning.patch"
diff --git a/user/rxvt-unicode/kerning.patch b/user/rxvt-unicode/kerning.patch
index a29a6f608..6897ba364 100644
--- a/user/rxvt-unicode/kerning.patch
+++ b/user/rxvt-unicode/kerning.patch
@@ -1,6 +1,6 @@
--- a/src/rxvtfont.C 2008-07-09 12:21:45.000000000 +0400
+++ b/src/rxvtfont.C 2009-10-30 14:32:53.000000000 +0300
-@@ -1195,12 +1195,14 @@
+@@ -1304,12 +1304,14 @@
XGlyphInfo g;
XftTextExtents16 (disp, f, &ch, 1, &g);
diff --git a/user/sane/APKBUILD b/user/sane/APKBUILD
index d9f618013..2eade25c0 100644
--- a/user/sane/APKBUILD
+++ b/user/sane/APKBUILD
@@ -3,16 +3,17 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=sane
_pkgname=sane-backends
-pkgver=1.0.30
+pkgver=1.3.1
+_hash=83bdbb6c9a115184c2d48f1fdc6847db
pkgrel=0
pkgdesc="Scanner access library"
url="http://www.sane-project.org/"
arch="all"
-license="GPL-2.0+ AND GPL-2.0+-with-sane-exception AND Public-Domain"
+license="GPL-2.0+ AND Public-Domain"
depends=""
makedepends="diffutils file libtool libusb-dev v4l-utils-dev net-snmp-dev
libpng-dev libjpeg-turbo-dev tiff-dev libgphoto2-dev libieee1284-dev
- linux-headers ncurses-dev"
+ libxml2-dev linux-headers ncurses-dev python3-dev"
install="saned.pre-install $pkgname.pre-install"
pkgusers="saned"
pkggroups="scanner"
@@ -37,9 +38,8 @@ done
subpackages="$pkgname-doc $pkgname-dev $subpackages $pkgname-utils saned
saned-openrc:openrc:noarch $pkgname-udev::noarch $_pkgname::noarch
$pkgname-lang"
-source="https://gitlab.com/sane-project/backends/uploads/c3dd60c9e054b5dee1e7b01a7edc98b0/sane-backends-1.0.30.tar.gz
+source="https://gitlab.com/sane-project/backends/uploads/$_hash/$_pkgname-$pkgver.tar.gz
saned.initd
- endian.patch
include.patch
network.patch
pidfile.patch
@@ -139,11 +139,10 @@ _backend() {
fi
}
-sha512sums="e9f4ab1f21d5ab0e09b101389c325947824945af968f08b307485f79d4dc4c134b8a1979fb0cf0cfa72435abffe70d0060748a2c2ec46514eb15a0442ee181a5 sane-backends-1.0.30.tar.gz
+sha512sums="c6c12bce5242fcdf208f034cc544605cad36fad60316cb51f0e1f6fe23d1566823778c7af4b0fc94ca4154e2cd3e38a9202073e4a4af05f641c3da081722a535 sane-backends-1.3.1.tar.gz
0a06eaa28b345202f2bdf8361e06f843bb7a010b7d8f80132f742672c94249c43f64031cefa161e415e2e2ab3a53b23070fb63854283f9e040f5ff79394ac7d1 saned.initd
-c7523b2684726cf35c0b251fe2e1863120284ff6ea3f93b53feb5dfa020c1e383910ecdd1a0c77a2289912ac4fd355cb3c743ea3706dab1bcf0a3412e1d0fbcc endian.patch
1779ff8beb1ba5f9238c25d819a7f0045f7e257c19b511315feb85650e445ca86450a9e1d7ff8650499d3dae808589a6c2e358d5f3f39a3f40ce4999179b86d6 include.patch
-dfeaef3c94c3e66b1cfb27348b8e1f3620143fd9a41e3c0b33d9c16f9bc4af2b20e40c83fec385c5765e8c3a812a00508bccdf8f27d571cfc0d8fac9dee41205 network.patch
-8f0a1529a5793bc78422419b674963b543527c932476c9ea2d92ea0ad0a286691da306020824c1aaa0b35929f571480d21d7fc464a9f652e15664854c75a4cea pidfile.patch
+ef5d572bd29463e0690f6b45ddc609045ba6e40ab7c6bdab065b9480eef38884604650fd390d2a3c46b1f13b228e700392a6f635b4d7372130de6b2106208405 network.patch
+30ef4a151e896ad415bab5e6a2963611321ff39d4b91d591d2678a5f73b1cd809f90855f970edec3d944aa0f48fb2902c20184794f941312b849e7ab44967030 pidfile.patch
4de6f60452c0451769f5ce41e41ca4c2867a723e0d2bf22796dc8a266359bdc8a9e9542f4ba2dc42b15bd25b1c83d2c339177796043fdbcbc9d73ad4957f723c check.patch
-de2bd02d02e9a2d061d7c5783d3e4e64e9a68e83b15adc122946efff369ad5e382bd918a9585f5fe99ede546f002bb3db0f1b54306f4409fde38b2e26c008162 BTS-304.patch"
+9c4877335531415df4aa37d797927765076f2e98d7301e057b24d5e45a696b75e86140eec403a599508c270ff63faf29b07ced6591a647ff48d280edcab70208 BTS-304.patch"
diff --git a/user/sane/BTS-304.patch b/user/sane/BTS-304.patch
index 64b7dca02..6d36589e9 100644
--- a/user/sane/BTS-304.patch
+++ b/user/sane/BTS-304.patch
@@ -2,7 +2,7 @@ diff --git a/backend/genesys/image_pixel.cpp b/backend/genesys/image_pixel.cpp
index 1b83e127d..1ebba7fe0 100644
--- a/backend/genesys/image_pixel.cpp
+++ b/backend/genesys/image_pixel.cpp
-@@ -46,6 +46,7 @@
+@@ -23,6 +23,7 @@
#include "image.h"
#include <array>
@@ -10,7 +10,7 @@ index 1b83e127d..1ebba7fe0 100644
namespace genesys {
-@@ -207,7 +208,7 @@ void set_pixel_to_row(std::uint8_t* data, std::size_t x, Pixel pixel, PixelForma
+@@ -184,7 +185,7 @@ void set_pixel_to_row(std::uint8_t* data, std::size_t x, Pixel pixel, PixelForma
float val = (pixel.r >> 8) * 0.3f;
val += (pixel.g >> 8) * 0.59f;
val += (pixel.b >> 8) * 0.11f;
@@ -19,7 +19,7 @@ index 1b83e127d..1ebba7fe0 100644
return;
}
case PixelFormat::I16: {
-@@ -215,7 +216,7 @@ void set_pixel_to_row(std::uint8_t* data, std::size_t x, Pixel pixel, PixelForma
+@@ -192,7 +193,7 @@ void set_pixel_to_row(std::uint8_t* data, std::size_t x, Pixel pixel, PixelForma
float val = pixel.r * 0.3f;
val += pixel.g * 0.59f;
val += pixel.b * 0.11f;
diff --git a/user/sane/endian.patch b/user/sane/endian.patch
deleted file mode 100644
index f55f01ecc..000000000
--- a/user/sane/endian.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From e1934720c687ed8c6125c75ac658f55b4e1513ce Mon Sep 17 00:00:00 2001
-From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
-Date: Sun, 2 Feb 2020 21:19:15 -0300
-Subject: [PATCH] genesys: fix bigendian build
-
-Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
----
- backend/genesys/low.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/backend/genesys/low.cpp b/backend/genesys/low.cpp
-index 1e1b632bf..cbb43b045 100644
---- a/backend/genesys/low.cpp
-+++ b/backend/genesys/low.cpp
-@@ -546,7 +546,7 @@ Image read_unshuffled_image_from_scanner(Genesys_Device* dev, const ScanSession&
- }
-
- #ifdef WORDS_BIGENDIAN
-- if (depth == 16) {
-+ if (session.params.depth == 16) {
- dev->pipeline.push_node<ImagePipelineNodeSwap16BitEndian>();
- }
- #endif
---
-2.24.1
-
diff --git a/user/sane/network.patch b/user/sane/network.patch
index 845bf9913..a8f53cfce 100644
--- a/user/sane/network.patch
+++ b/user/sane/network.patch
@@ -1,6 +1,6 @@
--- sane-backends-1.0.30/sanei/sanei_tcp.c 2020-05-17 06:54:18.000000000 -0500
+++ sane-backends-1.0.30/sanei/sanei_tcp.c 2020-06-10 14:10:06.980398975 -0500
-@@ -46,6 +46,7 @@
+@@ -44,6 +44,7 @@
#include <stdlib.h>
#include <string.h>
#include <limits.h>
@@ -8,7 +8,7 @@
#ifndef SSIZE_MAX
#define SSIZE_MAX LONG_MAX
-@@ -130,6 +131,7 @@ sanei_tcp_read(int fd, u_char * buf, siz
+@@ -128,6 +130,7 @@ sanei_tcp_read(int fd, u_char * buf, siz
{
size_t bytes_recv = 0;
ssize_t rc = 1;
@@ -16,7 +16,7 @@
if (count > SSIZE_MAX) {
errno = EINVAL;
-@@ -139,9 +141,21 @@ sanei_tcp_read(int fd, u_char * buf, siz
+@@ -137,9 +139,21 @@ sanei_tcp_read(int fd, u_char * buf, siz
while (bytes_recv < count && rc > 0)
{
rc = recv(fd, buf+bytes_recv, count-bytes_recv, 0);
diff --git a/user/sane/pidfile.patch b/user/sane/pidfile.patch
index 32989f651..579c99939 100644
--- a/user/sane/pidfile.patch
+++ b/user/sane/pidfile.patch
@@ -1,6 +1,6 @@
--- a/frontend/saned.c
+++ b/frontend/saned.c
-@@ -229,7 +229,7 @@
+@@ -230,7 +230,7 @@
int numchildren;
#define SANED_CONFIG_FILE "saned.conf"
diff --git a/user/seatd/APKBUILD b/user/seatd/APKBUILD
index dcf68d61e..07391d172 100644
--- a/user/seatd/APKBUILD
+++ b/user/seatd/APKBUILD
@@ -1,15 +1,15 @@
# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=seatd
-pkgver=0.7.0
+pkgver=0.8.0
pkgrel=0
pkgdesc="Seat management daemon and library"
url="https://git.sr.ht/~kennylevinsen/seatd"
arch="all"
license="MIT"
depends=""
-makedepends="cmake elogind-dev meson ninja"
-subpackages="$pkgname-dev"
+makedepends="cmake elogind-dev meson scdoc"
+subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~kennylevinsen/seatd/archive/$pkgver.tar.gz"
build() {
@@ -17,23 +17,22 @@ build() {
# https://www.openwall.com/lists/musl/2020/01/20/3
export CFLAGS="$CFLAGS -Wno-error=overflow"
- meson \
+ meson setup \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--buildtype=release \
- . output
- ninja -C output
+ . build
+ meson compile -C build
}
check() {
-# Add test instructions here.
-:
+ meson test -C build
}
package() {
- DESTDIR="$pkgdir" ninja -C output install
+ DESTDIR="$pkgdir" meson install -C build
}
-sha512sums="c81c43994b92672a388bf255edb1fe24d3dba7ece2eb35f9fedc05cc0b8e464e9167ffed037645c4072430fe7b3b8fc80cc99f21fb5100654b5dd23a94742e66 seatd-0.7.0.tar.gz"
+sha512sums="93b1e5c170564ce9654e4df9985af95cb505274b36e950998bb1f16803d2d46712140eded2bdd8d5e85aec62070afd9c224184276d79a0ff0813408dfc472db7 seatd-0.8.0.tar.gz"
diff --git a/user/squashfs-tools/APKBUILD b/user/squashfs-tools/APKBUILD
index e33b06b16..be6eddb44 100644
--- a/user/squashfs-tools/APKBUILD
+++ b/user/squashfs-tools/APKBUILD
@@ -1,9 +1,9 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=squashfs-tools
-pkgver=4.4
+pkgver=4.6.1
pkgrel=0
pkgdesc="Tools for SquashFS, a highly compressed read-only filesystem"
-url="http://squashfs.sourceforge.net"
+url="https://squashfs.sourceforge.net"
arch="all"
options="!check" # No test suite.
license="GPL-2.0+"
@@ -12,7 +12,6 @@ makedepends="attr-dev lz4-dev lzo-dev xz-dev zlib-dev"
source="https://downloads.sourceforge.net/squashfs/squashfs$pkgver.tar.gz
fix-compat.patch
"
-builddir="$srcdir/squashfs$pkgver/$pkgname"
# secfixes:
# 4.3-r5:
@@ -21,13 +20,13 @@ builddir="$srcdir/squashfs$pkgver/$pkgname"
# - CVE-2015-4646
build() {
- make XZ_SUPPORT=1 LZO_SUPPORT=1 LZ4_SUPPORT=1
+ make XZ_SUPPORT=1 LZO_SUPPORT=1 LZ4_SUPPORT=1 -C squashfs-tools
}
package() {
- mkdir -p "$pkgdir"/sbin
- cp -a mksquashfs unsquashfs "$pkgdir"/sbin
+ mkdir -p "$pkgdir"/usr/sbin
+ cp -a squashfs-tools/mksquashfs squashfs-tools/unsquashfs "$pkgdir"/usr/sbin
}
-sha512sums="e7119f82cea0eda8dffcbf15c9ee511ad457e004bfc0c5a5685e84785e49cf34f3c053036449af6bba0012cef48426f65958c97b9958d58f1b31175cb0bbbe24 squashfs4.4.tar.gz
-12f5739aa32b9e15ba3d22e5953034f17867a8837475f13bde5bbc378dbded0483cde42c0cdfc5d33ab3723b9de752c71b5ba8f4301ca7b59aa4054d669c262d fix-compat.patch"
+sha512sums="10e8a4b1e2327e062aef4f85860e76ebcd7a29e4c19e152ff7edec4a38316982b5bcfde4ab69da6bcb931258d264c2b6cb40cb5f635f9e6f6eba1ed5976267cb squashfs4.6.1.tar.gz
+7572f2fab6357525bc607a8db92b0c1f5fc7d482e935c3ee1828543a3de474162b71b8441f77ee1656873def8593d99158b14c55ec44799f22eed2978aa19147 fix-compat.patch"
diff --git a/user/squashfs-tools/fix-compat.patch b/user/squashfs-tools/fix-compat.patch
index e93b6b827..adc7e420d 100644
--- a/user/squashfs-tools/fix-compat.patch
+++ b/user/squashfs-tools/fix-compat.patch
@@ -1,6 +1,6 @@
---- squashfs-tools/action.c
-+++ squashfs-tools/action.c
-@@ -2236,6 +2236,9 @@
+--- a/squashfs-tools/action.c
++++ b/squashfs-tools/action.c
+@@ -2562,6 +2562,9 @@
return 1;
}
@@ -10,21 +10,21 @@
TEST_FN(name, ACTION_ALL_LNK, \
return fnmatch(atom->argv[0], action_data->name,
---- squashfs-tools/mksquashfs.c
-+++ squashfs-tools/mksquashfs.c
-@@ -4665,6 +4665,9 @@
- return paths;
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -4557,6 +4557,9 @@
+ return source;
}
+#ifndef FNM_EXTMATCH
+#define FNM_EXTMATCH 0
+#endif
- int excluded_match(char *name, struct pathname *path, struct pathnames **new)
- {
---- squashfs-tools/unsquashfs.c
-+++ squashfs-tools/unsquashfs.c
-@@ -1457,6 +1457,9 @@
+ static struct dir_info *add_source(struct dir_info *sdir, char *source,
+ char *subpath, char *file, char **prefix,
+--- a/squashfs-tools/unsquashfs.c
++++ b/squashfs-tools/unsquashfs.c
+@@ -1450,6 +1450,9 @@
free(paths);
}
@@ -32,5 +32,5 @@
+#define FNM_EXTMATCH 0
+#endif
- int matches(struct pathnames *paths, char *name, struct pathnames **new)
- {
+ struct pathname *add_path(struct pathname *paths, int type, char *target,
+ char *alltarget)
diff --git a/user/strongswan/APKBUILD b/user/strongswan/APKBUILD
index c755ec767..0679774e1 100644
--- a/user/strongswan/APKBUILD
+++ b/user/strongswan/APKBUILD
@@ -12,6 +12,7 @@ pkggroups="ipsec"
license="GPL-2.0 AND RSA-MD5 AND RSA-PKCS11 AND DES"
depends="iproute2"
depends_dev=""
+checkdepends="libexecinfo-dev"
makedepends="$depends_dev linux-headers python3 sqlite-dev openssl-dev curl-dev
gmp-dev libcap-dev"
subpackages="$pkgname-doc $pkgname-dbg $pkgname-openrc"
diff --git a/user/supertux/APKBUILD b/user/supertux/APKBUILD
index f1518855d..035119725 100644
--- a/user/supertux/APKBUILD
+++ b/user/supertux/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=supertux
pkgver=0.6.3
-pkgrel=0
+pkgrel=1
pkgdesc="Platform game featuring Tux the Penugin"
url="https://www.supertux.org/"
arch="all"
@@ -15,6 +15,7 @@ subpackages="$pkgname-doc"
source="https://github.com/SuperTux/supertux/releases/download/v$pkgver/SuperTux-v$pkgver-Source.tar.gz
find-sdl2.patch
cmake32.patch
+ zip-header.patch
"
builddir="$srcdir"/SuperTux-v$pkgver-Source
@@ -43,4 +44,5 @@ package() {
sha512sums="c6540bab1b3befbd975756031c4587e5569d9613d9539dc829c728b574d1a4da92816d6a7e68947b32963cc13d9b8b52312701c199138640e9f89e5885433798 SuperTux-v0.6.3-Source.tar.gz
9e229d837d8006d618320ef3f7465ef88f8903853ed1ef3e291373d25f8542010f7dad6c1c5859e857db48e1447337ddbed0619228f5eac6aba916b69567fd94 find-sdl2.patch
-c0e6cdd52e07e04ef67edc8b7f3d3c37dd2ffd35381b704b43512a01bbd0a5a35fbeae7ec225be8e4643dbcaac3eae427d7ea5217dc1e676f2991ee46f5bf513 cmake32.patch"
+c0e6cdd52e07e04ef67edc8b7f3d3c37dd2ffd35381b704b43512a01bbd0a5a35fbeae7ec225be8e4643dbcaac3eae427d7ea5217dc1e676f2991ee46f5bf513 cmake32.patch
+038a00697db1533154d1664a58516827d1574c3b79712c72e3bbb92b23943a9ac3a198e20705a7ca470eb34be605d5765ef2a4ebc53694e28543b609a2f2444b zip-header.patch"
diff --git a/user/supertux/zip-header.patch b/user/supertux/zip-header.patch
new file mode 100644
index 000000000..b02e74d0e
--- /dev/null
+++ b/user/supertux/zip-header.patch
@@ -0,0 +1,30 @@
+From 81809dd5e6f611b1d64d952f6d96310bcc9c5fca Mon Sep 17 00:00:00 2001
+From: Semphris <semphris@protonmail.com>
+Date: Fri, 17 Jun 2022 12:36:26 -0400
+Subject: [PATCH] Fix problem with GCC 11 and Partio's ZIP manager (missing
+ #include <memory>)
+
+Closes #2219 on GitHub. Same fix, but puts the include closer to the copyright header.
+---
+ external/partio_zip/zip_manager.hpp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/external/partio_zip/zip_manager.hpp b/external/partio_zip/zip_manager.hpp
+index 666884dda53..245303c76be 100644
+--- a/external/partio_zip/zip_manager.hpp
++++ b/external/partio_zip/zip_manager.hpp
+@@ -1,8 +1,12 @@
+ // SOURCE: https://github.com/wdas/partio/blob/main/src/lib/io/ZIP.h
++// NOTE: This file was edited for purposes of compatibility with SuperTux.
+
+-/*
++// This include has been added to fix a problem with GCC 11+ (and maybe 10)
++#include <memory>
++
++// =============================================================================
+
+-NOTE: This file was edited for purposes of compatibility with SuperTux.
++/*
+
+ PARTIO SOFTWARE
+ Copyright 2010 Disney Enterprises, Inc. All rights reserved
diff --git a/user/swig/APKBUILD b/user/swig/APKBUILD
index 20ec308c1..294e1c429 100644
--- a/user/swig/APKBUILD
+++ b/user/swig/APKBUILD
@@ -1,18 +1,16 @@
# Maintainer: Zach van Rijn <me@zv.io>
pkgname=swig
-pkgver=4.0.2
-pkgrel=2
+pkgver=4.2.1
+pkgrel=0
pkgdesc="Tool for integrating C and C++ code with other languages"
-url="http://www.swig.org/"
+url="https://www.swig.org/"
arch="all"
license="GPL-3.0+ AND MIT"
depends=""
checkdepends="boost-dev diffutils"
-makedepends="pcre-dev perl-dev python3-dev zlib-dev"
+makedepends="pcre2-dev perl-dev python3-dev zlib-dev"
subpackages="$pkgname-doc"
-source="https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
- fix-overload-simple-cast-test.patch
- "
+source="https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
build() {
./configure \
@@ -34,5 +32,4 @@ package() {
install -D -m644 LICENSE-UNIVERSITIES "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-UNIVERSITIES
}
-sha512sums="05e7da70ce6d9a733b96c0bcfa3c1b82765bd859f48c74759bbf4bb1467acb1809caa310cba5e2b3280cd704fca249eaa0624821dffae1d2a75097c7f55d14ed swig-4.0.2.tar.gz
-3de6484d920d8ecf042102d40af3a375ecb1ead3c4e0bc45ae63633e5fd652f52e1938108f747514a654a19d93a783afe2968b141be56957f438162263d62d8a fix-overload-simple-cast-test.patch"
+sha512sums="019dee5a46d57e1030eef47cd5d007ccaadbdcd4e53cd30d7c795f0118ecf4406a78185534502c81c5f6d7bac0713256e7e19b20b5a2d14e2c552219edbaf5cf swig-4.2.1.tar.gz"
diff --git a/user/swig/fix-overload-simple-cast-test.patch b/user/swig/fix-overload-simple-cast-test.patch
deleted file mode 100644
index a3c8cff26..000000000
--- a/user/swig/fix-overload-simple-cast-test.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From a2850397ba3eec5d4c58304cf8277ca535919760 Mon Sep 17 00:00:00 2001
-From: Julien Schueller <schueller@phimeca.com>
-Date: Thu, 5 Aug 2021 14:05:10 +0200
-Subject: [PATCH] [Python] Fix overload_simple_cast test with 3.10
-
-Closes #2044
----
- Examples/test-suite/python/python_overload_simple_cast_runme.py | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/Examples/test-suite/python/python_overload_simple_cast_runme.py b/Examples/test-suite/python/python_overload_simple_cast_runme.py
-index fc398ab29b9..7a0174af8a2 100644
---- a/Examples/test-suite/python/python_overload_simple_cast_runme.py
-+++ b/Examples/test-suite/python/python_overload_simple_cast_runme.py
-@@ -9,6 +9,8 @@ def __init__(self, x):
- def __int__(self):
- return self.x
-
-+ def __index__(self):
-+ return self.x
-
- class Ad:
-
diff --git a/user/the_silver_searcher/APKBUILD b/user/the_silver_searcher/APKBUILD
index e906445e6..7c504dc9e 100644
--- a/user/the_silver_searcher/APKBUILD
+++ b/user/the_silver_searcher/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=the_silver_searcher
pkgver=2.2.0
-pkgrel=0
+pkgrel=1
pkgdesc="Tool for very fast searching of text in documents and code"
url="https://geoff.greer.fm/ag/"
arch="all"
@@ -12,8 +12,11 @@ depends=""
checkdepends="cram"
makedepends="pcre-dev xz-dev zlib-dev"
subpackages="$pkgname-doc"
-source="https://geoff.greer.fm/ag/releases/the_silver_searcher-$pkgver.tar.gz"
-builddir="$srcdir/the_silver_searcher-$pkgver"
+source="https://geoff.greer.fm/ag/releases/the_silver_searcher-$pkgver.tar.gz
+ pipe-symlink.patch
+ pattern-fix.patch
+ no-common.patch
+ "
build() {
./configure \
@@ -34,4 +37,7 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="89d4e4f7f34c0d57aa880e7c3466f0373b961744a89ad30541e89e2d614322ab46c8044ec458406a117f74b0fea14cd3063fa4e0624a96526aa23eaccd6f1141 the_silver_searcher-2.2.0.tar.gz"
+sha512sums="89d4e4f7f34c0d57aa880e7c3466f0373b961744a89ad30541e89e2d614322ab46c8044ec458406a117f74b0fea14cd3063fa4e0624a96526aa23eaccd6f1141 the_silver_searcher-2.2.0.tar.gz
+4c7af6c22cb01d09070d642c2e1ace969ddbfc60750dba7ffa2f38cb960b68c01ffaa0edbbafe11cbc30805bd8f845bae1ea7863b181e55fc4263b4fe0b95fb4 pipe-symlink.patch
+8cce44cc3d1b9732fa616ad34ccca3292dddbc45280c64434aaae5ce5bb14cb9847fb4ff584b3042215d3adef6460c6f74a64f6eabe583fa440d89fc74b39feb pattern-fix.patch
+b7d0c96bfd8a9984b0082fac2530826cd3fb5f98ca957c03d628ed7f908f5e27108a18c00813fcb498ec12aa47b82fffc1d48b9d0ffaa5dd36960d7063c09a9e no-common.patch"
diff --git a/user/the_silver_searcher/no-common.patch b/user/the_silver_searcher/no-common.patch
new file mode 100644
index 000000000..50f1fa6a9
--- /dev/null
+++ b/user/the_silver_searcher/no-common.patch
@@ -0,0 +1,207 @@
+From 21eaa1c4160b868b0c5bbf59da17974429f30055 Mon Sep 17 00:00:00 2001
+From: Shlomi Fish <shlomif@shlomifish.org>
+Date: Wed, 15 Apr 2020 20:23:52 +0300
+Subject: [PATCH] Fix multiple global symbols definitions.
+
+See the use of extern here:
+
+* https://www.geeksforgeeks.org/understanding-extern-keyword-in-c/
+
+* https://en.wikipedia.org/wiki/External_variable
+
+*
+https://stackoverflow.com/questions/496448/how-to-correctly-use-the-extern-keyword-in-c
+---
+ src/ignore.c | 2 ++
+ src/ignore.h | 2 +-
+ src/log.c | 1 +
+ src/log.h | 2 +-
+ src/options.c | 2 ++
+ src/options.h | 2 +-
+ src/search.c | 13 +++++++++++++
+ src/search.h | 20 ++++++++++----------
+ src/util.c | 2 ++
+ src/util.h | 4 ++--
+ 10 files changed, 35 insertions(+), 15 deletions(-)
+
+diff --git a/src/ignore.c b/src/ignore.c
+index 7ae83f3ee..88036eff4 100644
+--- a/src/ignore.c
++++ b/src/ignore.c
+@@ -20,6 +20,8 @@
+ const int fnmatch_flags = FNM_PATHNAME;
+ #endif
+
++ignores *root_ignores;
++
+ /* TODO: build a huge-ass list of files we want to ignore by default (build cache stuff, pyc files, etc) */
+
+ const char *evil_hardcoded_ignore_files[] = {
+diff --git a/src/ignore.h b/src/ignore.h
+index 20d5a6af8..8db0f3772 100644
+--- a/src/ignore.h
++++ b/src/ignore.h
+@@ -29,7 +29,7 @@ struct ignores {
+ };
+ typedef struct ignores ignores;
+
+-ignores *root_ignores;
++extern ignores *root_ignores;
+
+ extern const char *evil_hardcoded_ignore_files[];
+ extern const char *ignore_pattern_files[];
+diff --git a/src/log.c b/src/log.c
+index 1481b6d02..f6f4e9a83 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -4,6 +4,7 @@
+ #include "log.h"
+ #include "util.h"
+
++pthread_mutex_t print_mtx = PTHREAD_MUTEX_INITIALIZER;
+ static enum log_level log_threshold = LOG_LEVEL_ERR;
+
+ void set_log_level(enum log_level threshold) {
+diff --git a/src/log.h b/src/log.h
+index 85847ee7b..318622c3c 100644
+--- a/src/log.h
++++ b/src/log.h
+@@ -9,7 +9,7 @@
+ #include <pthread.h>
+ #endif
+
+-pthread_mutex_t print_mtx;
++extern pthread_mutex_t print_mtx;
+
+ enum log_level {
+ LOG_LEVEL_DEBUG = 10,
+diff --git a/src/options.c b/src/options.c
+index 4abf4dcd3..699530138 100644
+--- a/src/options.c
++++ b/src/options.c
+@@ -20,6 +20,8 @@ const char *color_line_number = "\033[1;33m"; /* bold yellow */
+ const char *color_match = "\033[30;43m"; /* black with yellow background */
+ const char *color_path = "\033[1;32m"; /* bold green */
+
++cli_options opts;
++
+ /* TODO: try to obey out_fd? */
+ void usage(void) {
+ printf("\n");
+diff --git a/src/options.h b/src/options.h
+index aae930936..0d852167e 100644
+--- a/src/options.h
++++ b/src/options.h
+@@ -91,7 +91,7 @@ typedef struct {
+ } cli_options;
+
+ /* global options. parse_options gives it sane values, everything else reads from it */
+-cli_options opts;
++extern cli_options opts;
+
+ typedef struct option option_t;
+
+diff --git a/src/search.c b/src/search.c
+index 0f4ae2113..0dad3c072 100644
+--- a/src/search.c
++++ b/src/search.c
+@@ -2,6 +2,19 @@
+ #include "print.h"
+ #include "scandir.h"
+
++size_t alpha_skip_lookup[256];
++size_t *find_skip_lookup;
++uint8_t h_table[H_SIZE] __attribute__((aligned(64)));
++
++work_queue_t *work_queue = NULL;
++work_queue_t *work_queue_tail = NULL;
++int done_adding_files = 0;
++pthread_cond_t files_ready = PTHREAD_COND_INITIALIZER;
++pthread_mutex_t stats_mtx = PTHREAD_MUTEX_INITIALIZER;
++pthread_mutex_t work_queue_mtx = PTHREAD_MUTEX_INITIALIZER;
++
++symdir_t *symhash = NULL;
++
+ void search_buf(const char *buf, const size_t buf_len,
+ const char *dir_full_path) {
+ int binary = -1; /* 1 = yes, 0 = no, -1 = don't know */
+diff --git a/src/search.h b/src/search.h
+index 6bac42038..00aa018dd 100644
+--- a/src/search.h
++++ b/src/search.h
+@@ -31,9 +31,9 @@
+ #include "uthash.h"
+ #include "util.h"
+
+-size_t alpha_skip_lookup[256];
+-size_t *find_skip_lookup;
+-uint8_t h_table[H_SIZE] __attribute__((aligned(64)));
++extern size_t alpha_skip_lookup[256];
++extern size_t *find_skip_lookup;
++extern uint8_t h_table[H_SIZE] __attribute__((aligned(64)));
+
+ struct work_queue_t {
+ char *path;
+@@ -41,12 +41,12 @@ struct work_queue_t {
+ };
+ typedef struct work_queue_t work_queue_t;
+
+-work_queue_t *work_queue;
+-work_queue_t *work_queue_tail;
+-int done_adding_files;
+-pthread_cond_t files_ready;
+-pthread_mutex_t stats_mtx;
+-pthread_mutex_t work_queue_mtx;
++extern work_queue_t *work_queue;
++extern work_queue_t *work_queue_tail;
++extern int done_adding_files;
++extern pthread_cond_t files_ready;
++extern pthread_mutex_t stats_mtx;
++extern pthread_mutex_t work_queue_mtx;
+
+
+ /* For symlink loop detection */
+@@ -64,7 +64,7 @@ typedef struct {
+ UT_hash_handle hh;
+ } symdir_t;
+
+-symdir_t *symhash;
++extern symdir_t *symhash;
+
+ ssize_t search_buf(const char *buf, const size_t buf_len,
+ const char *dir_full_path);
+diff --git a/src/util.c b/src/util.c
+index 3949477b2..90ffb6f1d 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -21,6 +21,8 @@
+ } \
+ return ptr;
+
++FILE *out_fd = NULL;
++ag_stats stats;
+ void *ag_malloc(size_t size) {
+ void *ptr = malloc(size);
+ CHECK_AND_RETURN(ptr)
+diff --git a/src/util.h b/src/util.h
+index 0c9b9b112..338b05f45 100644
+--- a/src/util.h
++++ b/src/util.h
+@@ -12,7 +12,7 @@
+ #include "log.h"
+ #include "options.h"
+
+-FILE *out_fd;
++extern FILE *out_fd;
+
+ #ifndef TRUE
+ #define TRUE 1
+@@ -51,7 +51,7 @@ typedef struct {
+ } ag_stats;
+
+
+-ag_stats stats;
++extern ag_stats stats;
+
+ /* Union to translate between chars and words without violating strict aliasing */
+ typedef union {
diff --git a/user/the_silver_searcher/pattern-fix.patch b/user/the_silver_searcher/pattern-fix.patch
new file mode 100644
index 000000000..6489e2c7c
--- /dev/null
+++ b/user/the_silver_searcher/pattern-fix.patch
@@ -0,0 +1,78 @@
+From 755c6e5c06fc38903fa0d66be68a9c8ffa525c1b Mon Sep 17 00:00:00 2001
+From: Evan Moses <evan@emoses.org>
+Date: Thu, 9 Jan 2020 17:34:44 -0800
+Subject: [PATCH] Fix ignore patterns in subdirectories with leading slashes
+
+Currenetly if you have an ignore file in a subdirectory "sub" with a pattern
+like
+ /ignorethis
+The directory sub/ignorethis will be ignored if you run ag from
+within sub, but it won't be ignored if you run it from sub's parent.
+that is
+
+ $ ag needle
+
+will search files in sub/ignorethis, but
+
+ $ cd sub
+ $ ag needle
+
+Will not. This is a bug
+---
+ src/ignore.c | 8 ++++++--
+ tests/ignore_slash_in_subdir.t | 19 +++++++++++++++++++
+ 2 files changed, 25 insertions(+), 2 deletions(-)
+ create mode 100644 tests/ignore_slash_in_subdir.t
+
+diff --git a/src/ignore.c b/src/ignore.c
+index fa4188919..1d1c07b13 100644
+--- a/src/ignore.c
++++ b/src/ignore.c
+@@ -206,6 +206,7 @@ static int ackmate_dir_match(const char *dir_name) {
+ /* This is the hottest code in Ag. 10-15% of all execution time is spent here */
+ static int path_ignore_search(const ignores *ig, const char *path, const char *filename) {
+ char *temp;
++ int temp_start_pos;
+ size_t i;
+ int match_pos;
+
+@@ -216,9 +217,12 @@ static int path_ignore_search(const ignores *ig, const char *path, const char *f
+ }
+
+ ag_asprintf(&temp, "%s/%s", path[0] == '.' ? path + 1 : path, filename);
++ //ig->abs_path has its leading slash stripped, so we have to strip the leading slash
++ //of temp as well
++ temp_start_pos = (temp[0] == '/') ? 1 : 0;
+
+- if (strncmp(temp, ig->abs_path, ig->abs_path_len) == 0) {
+- char *slash_filename = temp + ig->abs_path_len;
++ if (strncmp(temp+temp_start_pos, ig->abs_path, ig->abs_path_len) == 0) {
++ char *slash_filename = temp + temp_start_pos + ig->abs_path_len;
+ if (slash_filename[0] == '/') {
+ slash_filename++;
+ }
+diff --git a/tests/ignore_slash_in_subdir.t b/tests/ignore_slash_in_subdir.t
+new file mode 100644
+index 000000000..167d6ffb4
+--- /dev/null
++++ b/tests/ignore_slash_in_subdir.t
+@@ -0,0 +1,19 @@
++Setup:
++
++ $ . $TESTDIR/setup.sh
++ $ mkdir -p subdir/ignoredir
++ $ mkdir ignoredir
++ $ printf 'match1\n' > subdir/ignoredir/file1.txt
++ $ printf 'match1\n' > ignoredir/file1.txt
++ $ printf '/ignoredir\n' > subdir/.ignore
++
++Ignore file in subdir/ignoredir, but not in ignoredir:
++
++ $ ag match
++ ignoredir/file1.txt:1:match1
++
++From subdir, ignore file in subdir/ignoredir:
++
++ $ cd subdir
++ $ ag match
++ [1]
diff --git a/user/the_silver_searcher/pipe-symlink.patch b/user/the_silver_searcher/pipe-symlink.patch
new file mode 100644
index 000000000..ee47f9439
--- /dev/null
+++ b/user/the_silver_searcher/pipe-symlink.patch
@@ -0,0 +1,26 @@
+From 095c3f091e23fda1d9d00bd42c38cf81bba1c14f Mon Sep 17 00:00:00 2001
+From: Jacob Wahlgren <jacob@dstsrc.net>
+Date: Wed, 28 Nov 2018 23:35:52 +0100
+Subject: [PATCH] Skip symlinks to named pipes
+
+The d_type field contains the type as lstat would put it, but when
+checking for a named pipe we need the stat behavior.
+
+Fixes https://github.com/ggreer/the_silver_searcher/issues/1272
+---
+ src/util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util.c b/src/util.c
+index cb23914d3..3949477b2 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -516,7 +516,7 @@ int is_symlink(const char *path, const struct dirent *d) {
+
+ int is_named_pipe(const char *path, const struct dirent *d) {
+ #ifdef HAVE_DIRENT_DTYPE
+- if (d->d_type != DT_UNKNOWN) {
++ if (d->d_type != DT_UNKNOWN && d->d_type != DT_LNK) {
+ return d->d_type == DT_FIFO || d->d_type == DT_SOCK;
+ }
+ #endif
diff --git a/user/thunderbird/APKBUILD b/user/thunderbird/APKBUILD
index 482d1b57c..9dc8d646b 100644
--- a/user/thunderbird/APKBUILD
+++ b/user/thunderbird/APKBUILD
@@ -1,7 +1,8 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=thunderbird
pkgver=91.13.0
-pkgrel=2
+pkgrel=3
+_llvmver=14
pkgdesc="Email client from Mozilla"
url="https://www.thunderbird.net/"
arch="all !ppc" # #837
@@ -12,7 +13,7 @@ depends=""
# system-libs
# actual deps
makedepends="
- autoconf2.13 cargo cbindgen clang llvm14-dev node ncurses-dev
+ autoconf2.13 cargo cbindgen clang llvm${_llvmver}-dev node ncurses-dev
perl python3 rust cmd:which
alsa-lib-dev bzip2-dev icu-dev libevent-dev libffi-dev libpng-dev
@@ -45,6 +46,7 @@ source="https://archive.mozilla.org/pub/thunderbird/releases/$pkgver/source/thun
stackwalk-x86-ppc.patch
triplet-vendor-support.patch
webrender.patch
+ gcc13.patch
thunderbird.desktop
"
@@ -109,6 +111,7 @@ prepare() {
}
build() {
+ export PATH="/usr/lib/llvm${_llvmver}/bin:${PATH}" #1230
export SHELL=/bin/sh
export BUILD_OFFICIAL=1
export MOZILLA_OFFICIAL=1
@@ -172,4 +175,5 @@ c9c5610b99e73a1eedd3510e73921cba84f8c6d0c58fc7fe5b4a7ec261bd5fe530560856fba46d6b
452b47b825294779f98ed46bc1065dad76b79ff453521ef049934a120f349c84a1c863b16af1828fe053059823da9690ec917c055ae02dcc5c80c54cad732448 stackwalk-x86-ppc.patch
8c6160975f181ea0ab257134672e696d895b99c7bb00a260deedb38e3374510e848bf943197e0ab7f684a18496a898175159845b0e7325183c37748183418053 triplet-vendor-support.patch
b7c1ac21cd03b7cdc887e005ed970cf13ff95643c7651decf1e6d42094cda6a0464dc2ba3cded3827f6d0f3682c2c9b081a7667f386133aa6e3072d0464e72e8 webrender.patch
+bb57b3ed998543f9a2edcc379a0c5e2d7e855a0d6f538547f18cdfce56f6c91a3c26a8b1505824628fdd394f0f75a8e98c7fb559ef79eac803d4028e5e9827e5 gcc13.patch
95a2b1deb4f6c90750fdd2bfe8ca0a7879a5b267965091705a6beb0a0a4b1ccad75d11df7b9885543ca4232ff704e975c6946f4c11804cb71c471e06f9576001 thunderbird.desktop"
diff --git a/user/thunderbird/gcc13.patch b/user/thunderbird/gcc13.patch
new file mode 100644
index 000000000..1c4f085e0
--- /dev/null
+++ b/user/thunderbird/gcc13.patch
@@ -0,0 +1,10 @@
+--- firefox-91.13.0/gfx/2d/Rect.h.old 2022-08-15 13:04:38.000000000 -0500
++++ firefox-91.13.0/gfx/2d/Rect.h 2024-05-28 20:50:50.230975904 -0500
+@@ -15,6 +15,7 @@
+ #include "mozilla/Maybe.h"
+
+ #include <cmath>
++#include <cstdint>
+
+ namespace mozilla {
+
diff --git a/user/v4l-utils/APKBUILD b/user/v4l-utils/APKBUILD
index 2c6857f78..53a153fbc 100644
--- a/user/v4l-utils/APKBUILD
+++ b/user/v4l-utils/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:
pkgname=v4l-utils
-pkgver=1.18.0
+pkgver=1.26.1
pkgrel=0
pkgdesc="Userspace tools and conversion library for Video 4 Linux"
url="https://www.linuxtv.org/wiki/index.php/V4l-utils"
@@ -9,47 +9,29 @@ arch="all"
license="LGPL-2.0+"
depends=""
makedepends="qt5-qtbase-dev libjpeg-turbo-dev argp-standalone linux-headers
- eudev-dev alsa-lib-dev"
+ eudev-dev alsa-lib-dev meson"
subpackages="$pkgname-dev $pkgname-doc qv4l2 $pkgname-libs ir_keytable"
-source="https://www.linuxtv.org/downloads/v4l-utils/$pkgname-$pkgver.tar.bz2
- qv4l2.svg
- qv4l2.desktop
- getsubopt.patch
- time64.patch
- types.patch
- "
+source="https://www.linuxtv.org/downloads/v4l-utils/$pkgname-$pkgver.tar.xz"
build() {
- export CFLAGS="$CFLAGS -D__off_t=off_t"
- LIBS="-largp -lintl" ./configure \
- --build=$CBUILD \
- --host=$CHOST \
- --prefix=/usr \
- --sysconfdir=/etc \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info \
- --localstatedir=/var \
- --disable-libdvbv5 \
- --disable-static
- make
+ meson setup -Dlibdvbv5=disabled -Dprefix=/usr build
+ meson compile -C build
}
check() {
- make check
+ meson test -C build
}
package() {
- make -j1 DESTDIR="$pkgdir" install
- install -Dm644 "$srcdir"/qv4l2.desktop \
- "$pkgdir"/usr/share/applications/qv4l2.desktop
- install -Dm644 "$srcdir"/qv4l2.svg \
- "$pkgdir"/usr/share/icons/hicolor/scalable/apps/qv4l2.svg
+ DESTDIR="$pkgdir" meson install -C build
}
qv4l2() {
pkgdesc="Qt V4L2 test control and streaming test application"
+ install_if="qt5-qtbase-x11 v4l-utils"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/qv4l2 "$subpkgdir"/usr/bin/
+ mv "$pkgdir"/usr/bin/qvidcap "$subpkgdir"/usr/bin/
mv "$pkgdir"/usr/share "$subpkgdir"/usr/
}
@@ -62,23 +44,17 @@ libs() {
ir_keytable() {
pkgdesc="Alter keymaps of Remote Controller devices"
- mkdir -p "$subpkgdir"/lib/udev/rc_keymaps \
- "$subpkgdir"/lib/udev/rules.d \
+ mkdir -p "$subpkgdir"/lib/udev \
"$subpkgdir"/usr/bin \
"$subpkgdir"/etc
- mv "$pkgdir"/lib/udev/rc_keymaps/* \
- "$subpkgdir"/lib/udev/rc_keymaps
- mv "$pkgdir"/lib/udev/rules.d/* \
- "$subpkgdir"/lib/udev/rules.d
+ mv "$pkgdir"/lib/udev/rc_keymaps \
+ "$subpkgdir"/lib/udev/
+ mv "$pkgdir"/lib/udev/rules.d \
+ "$subpkgdir"/lib/udev/
mv "$pkgdir"/usr/bin/ir-keytable \
"$subpkgdir"/usr/bin
mv "$pkgdir"/etc/rc_maps.cfg \
"$subpkgdir"/etc
}
-sha512sums="749c804671f039d907bf782cba5d1c23fff48066f3b6d4a0249fb9b65c493ee3945b544ee2a306dda79973da04f0301278ee88775f798aba590e5d0f15226d49 v4l-utils-1.18.0.tar.bz2
-bc18280046c15b19984103f7c2bb44a0aea79715803c64f0c64bc932499c09022c956914c3b15ae59499adc09f6fbff5378be45707fe851250f495a26b63d682 qv4l2.svg
-6f74aa524b3de420eeb8de788ff3f717020732a3f1f6530caee50e63aae7eddbe5f551ffc50065c9f5d6078c13bace089948ecdcacf01f8b82c1a44960e06315 qv4l2.desktop
-a09554deebd7597355c688e52180e0f4030842ccb26a144d1ac8a426836374237725d7b6b555027ca72e10c11e37bd596c7d69d87ee2f6b6d951daf4e50137f8 getsubopt.patch
-16154d57ea0b2e231217894495ef4ecf55d45e97c936034d4bbb0dab88f2d3e8779073302fbba759bd60e124a2cefe2b83675952cd50c413d957c81c9b0b8b53 time64.patch
-ee1228cc06e399923953e5121a683347a7fe881c80c55faae0adf6ed836251da1b2c4d1561454daa6f42220c1171f827ca3e2b72cdac31b379495f23ff6c56bb types.patch"
+sha512sums="a3b12b311977afec410db8b430696e923a24e04f003a5891cc77ddeb667d0b98666a06d31a439c95ce57d9e9c9c2593c5e9dd9e7cf2be002adb95db5b8f00ac8 v4l-utils-1.26.1.tar.xz"
diff --git a/user/v4l-utils/getsubopt.patch b/user/v4l-utils/getsubopt.patch
deleted file mode 100644
index 6ad142ae0..000000000
--- a/user/v4l-utils/getsubopt.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-POSIX says that behavior when subopts list is empty is undefined.
-musl libs will set value to NULL which leads to crash.
-
-Simply avoid getsubopt, since we cannot rely on it.
-
-diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp
-index 3ea6cd3..291fb3e 100644
---- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
-+++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
-@@ -782,15 +782,17 @@ static bool parse_subset(char *optarg)
-
- static bool parse_next_subopt(char **subs, char **value)
- {
-- static char *const subopts[] = {
-- NULL
-- };
-- int opt = getsubopt(subs, subopts, value);
-+ char *p = *subs;
-+ *value = *subs;
-
-- if (opt < 0 || *value)
-- return false;
-- fprintf(stderr, "Missing suboption value\n");
-- return true;
-+ while (*p && *p != ',')
-+ p++;
-+
-+ if (*p)
-+ *p++ = '\0';
-+
-+ *subs = p;
-+ return false;
- }
-
- void common_cmd(const std::string &media_bus_info, int ch, char *optarg)
diff --git a/user/v4l-utils/qv4l2.desktop b/user/v4l-utils/qv4l2.desktop
deleted file mode 100644
index 55e369c7c..000000000
--- a/user/v4l-utils/qv4l2.desktop
+++ /dev/null
@@ -1,12 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Name=QT V4L2 test Utility
-Name[pt]=Utilitário de teste V4L2
-Comment=Allow testing Video4Linux devices
-Comment[pt]=Permite testar dispositivos Video4Linux
-Exec=qv4l2
-Icon=qv4l2
-Terminal=false
-Type=Application
-Categories=Application;AudioVideo;
-
diff --git a/user/v4l-utils/qv4l2.svg b/user/v4l-utils/qv4l2.svg
deleted file mode 100644
index 3d4f375cc..000000000
--- a/user/v4l-utils/qv4l2.svg
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:version="0.47 r22583" version="1.1" id="svg2839" height="297mm" width="210mm" sodipodi:docname="Novo documento 3">
- <defs id="defs2841">
- <linearGradient id="linearGradient2963">
- <stop style="stop-color: rgb(255, 236, 187); stop-opacity: 1;" offset="0" id="stop2965"/>
- <stop id="stop2971" offset="1" style="stop-color: rgb(0, 0, 0); stop-opacity: 0.498039;"/>
- </linearGradient>
- <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 526.18109 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="744.09448 : 526.18109 : 1" inkscape:persp3d-origin="372.04724 : 350.78739 : 1" id="perspective2847"/>
- <inkscape:perspective id="perspective2935" inkscape:persp3d-origin="0.5 : 0.33333333 : 1" inkscape:vp_z="1 : 0.5 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 0.5 : 1" sodipodi:type="inkscape:persp3d"/>
- <linearGradient inkscape:collect="always" xlink:href="#linearGradient2963" id="linearGradient2969" x1="-719.14288" y1="494.69958" x2="-324.21902" y2="968.98529" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.0512, 0, 0, 1.05137, 651.058, -25.2444)"/>
- <inkscape:perspective id="perspective2992" inkscape:persp3d-origin="0.5 : 0.33333333 : 1" inkscape:vp_z="1 : 0.5 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_x="0 : 0.5 : 1" sodipodi:type="inkscape:persp3d"/>
- </defs>
- <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.7" inkscape:cx="376.9721" inkscape:cy="468.42546" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" inkscape:window-width="1513" inkscape:window-height="1044" inkscape:window-x="1941" inkscape:window-y="0" inkscape:window-maximized="0"/>
- <metadata id="metadata2844">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- <dc:title/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g inkscape:label="Camada 1" inkscape:groupmode="layer" id="layer1">
- <rect style="fill: rgb(173, 160, 127); fill-opacity: 1;" id="rect2959" width="498.57132" height="402.52496" x="101.42867" y="345.21906" ry="15.848869"/>
- <rect style="fill: rgb(214, 207, 189); fill-opacity: 1; fill-rule: evenodd; stroke: rgb(0, 0, 0); stroke-width: 1.09651px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;" id="rect2955" width="366.37466" height="268.80539" x="172.03215" y="409.8259" ry="24.860613"/>
- <path style="fill: url(&quot;#linearGradient2969&quot;) rgb(0, 0, 0); fill-opacity: 1;" d="m 111.92284,745.80915 c -1.7443,-0.70488 -4.61634,-3.11878 -6.38231,-5.3642 l -3.21086,-4.08259 0,-189.14299 c 0,-136.34795 0.46823,-190.05871 1.67748,-192.42365 0.92263,-1.80438 3.11889,-4.44845 4.8806,-5.87571 3.00442,-2.43405 17.98923,-2.5971 241.57759,-2.62843 l 238.37448,-0.0334 4.90427,4.38251 4.90429,4.3825 0.39257,189.41161 c 0.43575,210.24489 1.09242,196.30432 -9.4544,200.71175 -4.34407,1.81535 -40.20923,2.12038 -239.80015,2.0394 -129.08065,-0.0523 -236.11926,-0.67193 -237.86356,-1.37681 z m 413.94314,-69.49552 c 4.39946,-2.22093 7.85143,-5.43895 10.06966,-9.38725 l 3.37535,-6.00784 -0.36571,-118.16973 c -0.36124,-116.72035 -0.4037,-118.22058 -3.46195,-122.31682 -4.69144,-6.28374 -10.15101,-9.79936 -17.39001,-11.19809 -8.54594,-1.65125 -316.90144,-1.65125 -325.4474,0 -7.68,1.48394 -13.16379,5.20817 -17.88452,12.146 l -3.40519,5.00442 0.40173,119.03503 c 0.39878,118.15286 0.42505,119.06645 3.54637,123.27494 1.72955,2.33195 5.7842,5.74954 9.01033,7.59462 l 5.8657,3.35471 164.49565,0.0248 164.49566,0.0246 6.69433,-3.3794 z" id="path2961"/>
- <rect style="fill: rgb(25, 20, 8); fill-opacity: 1;" id="rect2980" width="63.072273" height="39.050926" x="499.38467" y="744.74005" ry="0"/>
- <rect style="fill: rgb(25, 20, 8); fill-opacity: 1;" id="rect2980-1" width="63.072273" height="39.050926" x="130.56888" y="744.74005" ry="0"/>
- </g>
-</svg> \ No newline at end of file
diff --git a/user/v4l-utils/time64.patch b/user/v4l-utils/time64.patch
deleted file mode 100644
index 42092a773..000000000
--- a/user/v4l-utils/time64.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- v4l-utils-1.18.0/utils/keytable/keytable.c.old 2019-09-22 09:22:54.000000000 +0000
-+++ v4l-utils-1.18.0/utils/keytable/keytable.c 2020-01-20 02:38:23.659004998 +0000
-@@ -1533,7 +1533,7 @@
-
- for (i = 0; i < rd / sizeof(struct input_event); i++) {
- printf(_("%ld.%06ld: event type %s(0x%02x)"),
-- ev[i].time.tv_sec, ev[i].time.tv_usec,
-+ ev[i].input_event_sec, ev[i].input_event_usec,
- get_event_name(events_type, ev[i].type), ev[i].type);
-
- switch (ev[i].type) {
diff --git a/user/v4l-utils/types.patch b/user/v4l-utils/types.patch
deleted file mode 100644
index 56eb991a3..000000000
--- a/user/v4l-utils/types.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- v4l-utils-1.18.0/utils/keytable/keymap.h.old 2019-09-22 09:22:54.000000000 +0000
-+++ v4l-utils-1.18.0/utils/keytable/keymap.h 2019-10-05 03:45:16.795852895 +0000
-@@ -2,6 +2,10 @@
- #ifndef __KEYMAP_H
- #define __KEYMAP_H
-
-+#include <stdint.h>
-+typedef uint32_t u_int32_t;
-+typedef int error_t;
-+
- struct keymap {
- struct keymap *next;
- char *name;
---- v4l-utils-1.18.0/utils/ir-ctl/keymap.h.old 2019-09-22 09:22:54.000000000 +0000
-+++ v4l-utils-1.18.0/utils/ir-ctl/keymap.h 2019-10-05 03:44:27.651163483 +0000
-@@ -2,6 +2,10 @@
- #ifndef __KEYMAP_H
- #define __KEYMAP_H
-
-+#include <stdint.h>
-+typedef uint32_t u_int32_t;
-+typedef int error_t;
-+
- struct keymap {
- struct keymap *next;
- char *name;
diff --git a/user/vlc/APKBUILD b/user/vlc/APKBUILD
index edd6a5f91..769cda61e 100644
--- a/user/vlc/APKBUILD
+++ b/user/vlc/APKBUILD
@@ -2,8 +2,8 @@
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=vlc
-pkgver=3.0.17.3
-pkgrel=1
+pkgver=3.0.20
+pkgrel=0
pkgdesc="Multi-platform MPEG, VCD/DVD, and DivX player"
triggers="vlc-libs.trigger=/usr/lib/vlc/plugins"
pkgusers="vlc"
@@ -79,6 +79,7 @@ build() {
arm*) _arch_opts="--enable-omxil --enable-omxil-vout --enable-rpi-omxil" ;;
aarch64) _arch_opts="--enable-neon" ;;
ppc64*) _arch_opts="--enable-altivec" ;;
+ ppc) _arch_opts="--disable-altivec" ;;
x86* | pmmx) _arch_opts="--disable-mmx --disable-sse" ;;
esac
@@ -206,7 +207,7 @@ libs() {
default_libs
}
-sha512sums="99095b39ed600c3a89ebc0d377a2fc2522b3623a56b0f6de2df50a3c6e0148c67c28c0f2d8dec28bbdf5c62cf29b3579429a79ed00440570643778a9871022b6 vlc-3.0.17.3.tar.xz
+sha512sums="02e58fb52dd75bf483ac4b298aecf86463b13d4782173d164adba6e4552d9262ff5e2ee1cbe1bce2c8a809801b79f328c6a8c475d34ae62aefaea02ae5ade406 vlc-3.0.20.tar.xz
22d80df599b8b65a5439cefbb7140af8e9530f326d54945da3769af65f37518b99ec2cc8647aafd2763324a0698280915afe043cc87e5720c4694881ed35bffa check-headless.patch
e214b407235cb3afb8bec93f20c9b42957b57e6fd3960679d3d4235e77762e03e64d03c01f00ef63d589e7c85aaad02ce6abbeeccd66b1867bc92451a5b5e9b0 disable-sub-autodetect-fuzzy-1-test.patch
e063c727d952465bbea33f669db49190427521dc8e2291e9a5cbb0f5e8e879bd3ba76855e44bd4630948e30c4329d27bd928f95de20fe1050d5e839778a4d012 endian-fix.patch
diff --git a/user/volume_key/APKBUILD b/user/volume_key/APKBUILD
index d6d22c271..69da50792 100644
--- a/user/volume_key/APKBUILD
+++ b/user/volume_key/APKBUILD
@@ -21,13 +21,15 @@ prepare() {
}
build() {
- ./configure \
+ PYTHON3=python3.11 ./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
- --localstatedir=/var
+ --localstatedir=/var \
+ --with-python=no \
+ --with-python3
make
}
diff --git a/user/vte/APKBUILD b/user/vte/APKBUILD
index a5539de34..dd9f87785 100644
--- a/user/vte/APKBUILD
+++ b/user/vte/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=vte
pkgver=0.62.0
-pkgrel=0
+pkgrel=1
pkgdesc="Virtual terminal emulator library for Gnome"
url="https://www.gnome.org"
arch="all"
@@ -12,6 +12,7 @@ makedepends="gnutls-dev gtk+3.0-dev gnutls-dev gobject-introspection-dev
subpackages="$pkgname-dev $pkgname-lang"
source="https://download.gnome.org/sources/vte/${pkgver%.*}/vte-$pkgver.tar.xz
exitcode.patch
+ gcc-volatile.patch
"
build() {
@@ -28,4 +29,5 @@ package() {
}
sha512sums="8942809d20ff845142dce8cf48b4eb6f9e4f333dc2647cceb0538112d5e10096ff836f24da1f0c34cc4bbee4f6c585c3feab33934c257887a82d6c67bce11402 vte-0.62.0.tar.xz
-4987254439a136f66a7b7be1300f5efbf85db74bdb64fdd8d0c9a555173a172b4fd519174f932e73d58a2618ef37273e82fe681bb129891f2792a414025f6c61 exitcode.patch"
+4987254439a136f66a7b7be1300f5efbf85db74bdb64fdd8d0c9a555173a172b4fd519174f932e73d58a2618ef37273e82fe681bb129891f2792a414025f6c61 exitcode.patch
+8d45f85a451868ec49fc263e60a1ab943ecea172ec32091ac9e2b85f0e9c7091423313eb4bbe037eac2b75086cd8c9d307bd0c37d58d4051742d9e2c579340a4 gcc-volatile.patch"
diff --git a/user/vte/gcc-volatile.patch b/user/vte/gcc-volatile.patch
new file mode 100644
index 000000000..924d4e16b
--- /dev/null
+++ b/user/vte/gcc-volatile.patch
@@ -0,0 +1,45 @@
+From 89e9230dc1a27b89cca16de32e903918a27b8e42 Mon Sep 17 00:00:00 2001
+From: Christian Persch <chpe@src.gnome.org>
+Date: Mon, 16 Nov 2020 20:27:48 +0100
+Subject: [PATCH] lib: Drop wrong use of volatile
+
+---
+ src/vtetypebuiltins.cc.template | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/vtetypebuiltins.cc.template b/src/vtetypebuiltins.cc.template
+index dade41de7..3a50d4011 100644
+--- a/src/vtetypebuiltins.cc.template
++++ b/src/vtetypebuiltins.cc.template
+@@ -11,9 +11,9 @@
+ GType
+ @enum_name@_get_type (void)
+ {
+- static volatile gsize g_define_type_id__volatile = 0;
++ static gsize g_define_type_id = 0;
+
+- if (g_once_init_enter (&g_define_type_id__volatile)) {
++ if (g_once_init_enter (&g_define_type_id)) {
+ static const G@Type@Value values[] = {
+ /*** END value-header ***/
+
+@@ -24,13 +24,13 @@ GType
+ /*** BEGIN value-tail ***/
+ { 0, NULL, NULL }
+ };
+- GType g_define_type_id = \
++ GType type_id = \
+ g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
+
+- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
++ g_once_init_leave (&g_define_type_id, type_id);
+ }
+
+- return g_define_type_id__volatile;
++ return g_define_type_id;
+ }
+
+ /*** END value-tail ***/
+--
+GitLab
+
diff --git a/user/wget/APKBUILD b/user/wget/APKBUILD
index 967995609..53803f238 100644
--- a/user/wget/APKBUILD
+++ b/user/wget/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: Nathan <ndowens@artixlinux.org>
# Maintainer: Zach van Rijn <me@zv.io>
pkgname=wget
-pkgver=1.20.3
+pkgver=1.24.5
pkgrel=0
pkgdesc="Network utility to retrieve files from the Web"
url="https://www.gnu.org/software/wget/wget.html"
@@ -34,4 +34,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="e8b82b40e270296228094a78d47f81580bdbdea9e6b93fd61b37dccb39430aeb9bda5397dc53a31c952a61629383c7e2a8c8abf414c8a4dd369af6ecf2717e6c wget-1.20.3.tar.gz"
+sha512sums="572aa54717e51a9eb9959e127c7afb696645088f32ff7df2cfe9d243957e34ee235e98988fa94649df023d2e3d62b6973e8c9f2eb92beba820dd96d5de2a950d wget-1.24.5.tar.gz"
diff --git a/user/x11vnc/APKBUILD b/user/x11vnc/APKBUILD
index b9154729b..722f249ba 100644
--- a/user/x11vnc/APKBUILD
+++ b/user/x11vnc/APKBUILD
@@ -2,9 +2,9 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=x11vnc
pkgver=0.9.16
-pkgrel=0
+pkgrel=1
pkgdesc="VNC server for X11 sessions"
-url="http://www.karlrunge.com/x11vnc/"
+url=" "
arch="all"
license="GPL-2.0-only"
depends=""
@@ -14,6 +14,7 @@ subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/LibVNC/x11vnc/archive/$pkgver.tar.gz
time64.patch
utmps.patch
+ gcc10.patch
"
prepare() {
@@ -43,4 +44,5 @@ package() {
sha512sums="69f65ee312f8dede6051b401304987502a213c6c28c7f41e855734f11de1fae14d5d493dc9c28b2e4b7c0be55f8dbd3b35dd2610aae910183772c3e626736fec x11vnc-0.9.16.tar.gz
764dc0d22f4b167b7683b1551a6d8cc8ea6745fdd9791422404ef604186930615b52ef1bf66fd03dd9c6eed18845ff4a1e5a235eee80810177e082359a8c4766 time64.patch
-8aaa6d1fd9e795a60cad162f2b21fe96cd3a7076a0c4fae6e6b0021881bd019312a678fa3ed69b694da36ee64cc0601812da5df96c6461baf68b7e70adf6cd4e utmps.patch"
+8aaa6d1fd9e795a60cad162f2b21fe96cd3a7076a0c4fae6e6b0021881bd019312a678fa3ed69b694da36ee64cc0601812da5df96c6461baf68b7e70adf6cd4e utmps.patch
+b7b774c155f326bca1fee4bed22609f1e0236dae5cb2fea96bab18301bc6ae8f9c7fb11ba1950eb9488683bd2d3158b7b16a71948f2c8d483594e36625b3d470 gcc10.patch"
diff --git a/user/x11vnc/gcc10.patch b/user/x11vnc/gcc10.patch
new file mode 100644
index 000000000..a32d5785d
--- /dev/null
+++ b/user/x11vnc/gcc10.patch
@@ -0,0 +1,42 @@
+From a48b0b1cd887d7f3ae67f525d7d334bd2feffe60 Mon Sep 17 00:00:00 2001
+From: Alexander Tsoy <alexander@tsoy.me>
+Date: Tue, 28 Jan 2020 22:21:01 +0300
+Subject: [PATCH] Fix build with -fno-common
+
+GCC 10 defaults to -fno-common
+---
+ src/util.c | 3 +++
+ src/util.h | 6 +++---
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/src/util.c b/src/util.c
+index a82a1a42..6a52ebf4 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -47,6 +47,9 @@ int hxl = 0;
+ #ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
+ MUTEX(x11Mutex);
+ MUTEX(scrollMutex);
++MUTEX(clientMutex);
++MUTEX(inputMutex);
++MUTEX(pointerMutex);
+ #endif
+
+ int nfix(int i, int n);
+diff --git a/src/util.h b/src/util.h
+index 35c1afd2..99b5dd1d 100644
+--- a/src/util.h
++++ b/src/util.h
+@@ -102,9 +102,9 @@ extern struct timeval _mysleep;
+ #ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
+ extern MUTEX(x11Mutex);
+ extern MUTEX(scrollMutex);
+-MUTEX(clientMutex);
+-MUTEX(inputMutex);
+-MUTEX(pointerMutex);
++extern MUTEX(clientMutex);
++extern MUTEX(inputMutex);
++extern MUTEX(pointerMutex);
+ #endif
+
+ #define X_INIT INIT_MUTEX(x11Mutex)
diff --git a/user/xapian-core/APKBUILD b/user/xapian-core/APKBUILD
index 85f8f8f89..54298c775 100644
--- a/user/xapian-core/APKBUILD
+++ b/user/xapian-core/APKBUILD
@@ -1,18 +1,18 @@
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer:
pkgname=xapian-core
-pkgver=1.4.17
+pkgver=1.4.25
pkgrel=0
pkgdesc="Open source search engine library"
url="https://xapian.org/"
arch="all"
-options="!check" # sortableserialise1 is still broken
license="GPL-2.0+"
depends=""
depends_dev="zlib-dev util-linux-dev"
makedepends="$depends_dev libtool"
subpackages="$pkgname-dev $pkgname-doc libxapian"
-source="http://oligarchy.co.uk/xapian/$pkgver/$pkgname-$pkgver.tar.xz
+source="https://oligarchy.co.uk/xapian/$pkgver/$pkgname-$pkgver.tar.xz
+ sortable-serialise.patch
timeval-t.patch
"
@@ -46,5 +46,6 @@ libxapian() {
mv "$pkgdir"/usr/lib/$subpkgname* "$subpkgdir"/usr/lib
}
-sha512sums="3eaf45d31eb9318e292fa052b32b1d9e1035651bdd3c366a0134f4b39d03d987083c19426a3d4b10f60078190fc3388f05b332cba958263bab1abf236c7a3ca7 xapian-core-1.4.17.tar.xz
+sha512sums="e8069f2cb75554978716a99580fb57fc73bbdd607c82394f53d07205d8c78fb59265004be0c676a6806bb2840a3933499dfc867e36a28855278569a0676d469d xapian-core-1.4.25.tar.xz
+d5c6dac118b96ed66ce7d01c0d8c41b4765397e56fec5ea64cd1d223e4d152c9bb9171bbd8bd804d1285103850ae8a1d21fe137e906da94c42b421b0e6e2a49a sortable-serialise.patch
639c0ecd75be0627d334628b5adf581a7da92c4f86dfb86a92669368ff8a874d4bf4e344b8f3b1276d22d126d2bc44c8ab727e39e1c29c0358fe7bbc8aa8050d timeval-t.patch"
diff --git a/user/xapian-core/sortable-serialise.patch b/user/xapian-core/sortable-serialise.patch
new file mode 100644
index 000000000..d7cb9209a
--- /dev/null
+++ b/user/xapian-core/sortable-serialise.patch
@@ -0,0 +1,15 @@
+Discussing with upstream, but for now, this does fix both the test suite
+and operationally the ability to serialise +Inf values.
+--- xapian-core-1.4.25/api/sortable-serialise.cc.old 2024-03-07 16:57:54.000000000 -0600
++++ xapian-core-1.4.25/api/sortable-serialise.cc 2024-05-30 00:49:54.835053392 -0500
+@@ -55,6 +55,10 @@
+
+ // Negative infinity.
+ if (value < -DBL_MAX) return 0;
++ if (value == HUGE_VAL) {
++ memset(buf, '\xff', 9);
++ return 9;
++ }
+
+ mantissa = frexp(value, &exponent);
+
diff --git a/user/xf86-video-amdgpu/APKBUILD b/user/xf86-video-amdgpu/APKBUILD
index 2a0effefa..c8df25305 100644
--- a/user/xf86-video-amdgpu/APKBUILD
+++ b/user/xf86-video-amdgpu/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=xf86-video-amdgpu
-pkgver=19.1.0
+pkgver=23.0.0
pkgrel=0
pkgdesc="X.Org driver for brand new AMD GPUs"
url="https://www.X.Org/"
@@ -11,7 +11,7 @@ depends=""
makedepends="eudev-dev libdrm-dev mesa-dev util-macros xorg-server-dev
xorgproto-dev"
subpackages="$pkgname-doc"
-source="https://www.x.org/releases/individual/driver/xf86-video-amdgpu-$pkgver.tar.bz2"
+source="https://www.x.org/releases/individual/driver/xf86-video-amdgpu-$pkgver.tar.xz"
build() {
./configure \
@@ -32,4 +32,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="ccdaa2378492da1a2f3d18fedacd1318c4708da534a8a959276a82730d5420619d83ad1ec8d7835c55655fe56123cd9bffb44e6223c5a97033c01f598af4a173 xf86-video-amdgpu-19.1.0.tar.bz2"
+sha512sums="bf26f147629a34e84a0ae8435119e170b9c95edafcab1995b63bb8f55abef32f2efbf4536eb070e64b2ae1460424b1b27a4206cb9836d33ddc6dfbee404f718b xf86-video-amdgpu-23.0.0.tar.xz"
diff --git a/user/xf86-video-ati/APKBUILD b/user/xf86-video-ati/APKBUILD
index 15029c507..fc2090f95 100644
--- a/user/xf86-video-ati/APKBUILD
+++ b/user/xf86-video-ati/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=xf86-video-ati
-pkgver=19.1.0
-pkgrel=2
+pkgver=22.0.0
+pkgrel=0
pkgdesc="ATI video driver for X11"
url="https://www.X.Org/"
arch="all"
@@ -11,9 +11,7 @@ depends="mesa-dri"
makedepends="eudev-dev libdrm-dev libxi-dev mesa-dev pixman-dev util-macros
xorg-server-dev"
subpackages="$pkgname-doc"
-source="https://www.X.Org/releases/individual/driver/$pkgname-$pkgver.tar.bz2
- null-deref-exa.patch
- "
+source="https://www.X.Org/releases/individual/driver/$pkgname-$pkgver.tar.xz"
build() {
export LDFLAGS="$LDFLAGS -Wl,-z,lazy"
@@ -29,5 +27,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="73a81f6c492daf2e89067fb52b3033dc0fe6841f109627ddca1aee54a45a738c8c134443753a2a2aaa2c131e1d560057ebc76351ff2304c16407df3ff568fcd6 xf86-video-ati-19.1.0.tar.bz2
-f9c6928f741014b47b302c2f2cf6a0110fcc0935cb3a2725e37f8b48e9cd778639231110b9a4ce67ad38174b21b47864ff0793f9181347c21ef694bedbc44b0b null-deref-exa.patch"
+sha512sums="fba9ffc7b0eeb0c369eb1a6f8ef0bb3061cfeca26bc269baf6e3d16dcd943fbf4092f1e37adfb1bc71051cee0b7a0e6fb253f0b8bcd210732ccaf99e8f2356fe xf86-video-ati-22.0.0.tar.xz"
diff --git a/user/xf86-video-ati/null-deref-exa.patch b/user/xf86-video-ati/null-deref-exa.patch
deleted file mode 100644
index dd13e9b60..000000000
--- a/user/xf86-video-ati/null-deref-exa.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From a8168153037f2cfb9739285b92896c0e24872518 Mon Sep 17 00:00:00 2001
-From: Alexey Sheplyakov <asheplyakov@altlinux.org>
-Date: Wed, 27 Nov 2019 20:50:58 +0400
-Subject: [PATCH] Don't crash X server if GPU acceleration is not available
-
-Commit d1d8e3c8d0a0a0394d395eba171460501745209b causes X server
-to fail on startup when GPU acceleration is not working (or is
-disabled). The reason is that `radeon_get_pixmap_bo` function
-gets called too early (before EXA has been initialized) and
-fails with an assert:
-
- #0 __GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50
- #1 0x76ab1c6c in __GI_abort () at abort.c:79
- #2 0x76ac0b64 in __assert_fail_base (fmt=0x76bfbce4 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7658c80c "key->initialized", file=<optimized out>, line=121,
- function=0x7658d040 <__PRETTY_FUNCTION__.10607> "dixGetPrivateAddr") at assert.c:92
- #3 0x76ac0c0c in __GI___assert_fail (assertion=0x7658c80c "key->initialized", file=0x7658c9d0 "../include/privates.h", line=121,
- function=0x7658d040 <__PRETTY_FUNCTION__.10607> "dixGetPrivateAddr") at assert.c:101
- #4 0x76579e6c in dixGetPrivateAddr (key=<optimized out>, key=<optimized out>, privates=<optimized out>) at ../include/privates.h:121
- #5 0x7657a954 in dixGetPrivateAddr (key=<optimized out>, key=<optimized out>, privates=<optimized out>) at exa.c:70
- #6 dixGetPrivate (key=<optimized out>, privates=<optimized out>) at ../include/privates.h:136
- #7 exaGetPixmapDriverPrivate (pPix=<optimized out>) at exa.c:68
- #8 0x7623d460 in radeon_get_pixmap_bo (pPix=0x71c1b8) at radeon.h:804
- #9 radeon_get_pixmap_handle (pixmap=0x71c1b8, handle=0x7fa22328) at radeon_bo_helper.c:357
- #10 0x76244458 in radeon_pixmap_get_fb (pix=0x71c1b8) at radeon.h:886
- #11 drmmode_set_mode_major (crtc=0x691860, mode=0x69191c, rotation=<optimized out>, x=<optimized out>, y=<optimized out>) at drmmode_display.c:918
- #12 0x762467e8 in drmmode_set_desired_modes (pScrn=0x67c678, drmmode=<optimized out>, set_hw=1) at drmmode_display.c:3128
- #13 0x0047bfa4 in MapWindow (client=0x669ec8, pWin=0x7206c0) at window.c:2722
- #14 MapWindow (pWin=0x7206c0, client=0x669ec8) at window.c:2665
- #15 0x00449650 in dix_main (argc=3, argv=0x7fa22604, envp=<optimized out>) at main.c:247
- #16 0x76ab2198 in __libc_start_main (main=0x42db10 <main>, argc=3, argv=0x7fa22604, init=<optimized out>, fini=0x606434 <__libc_csu_fini>, rtld_fini=0x77229930 <_dl_fini>,
- stack_end=0x7fa225e0) at libc-start.c:308
- #17 0x0042db80 in __start () at ../sysdeps/mips/start.S:110
-
-Don't call `exaGetPixmapDriverPrivate` if the acceleration (EXA) is not
-enabled [yet] to avoid the problem.
-
-Closes: https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/issues/188
-Closes: https://bugzilla.altlinux.org/show_bug.cgi?id=37539
----
- src/radeon.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/radeon.h b/src/radeon.h
-index 2c913466..e4a2ba66 100644
---- a/src/radeon.h
-+++ b/src/radeon.h
-@@ -790,8 +790,8 @@ static inline Bool radeon_set_pixmap_bo(PixmapPtr pPix, struct radeon_buffer *bo
-
- static inline struct radeon_buffer *radeon_get_pixmap_bo(PixmapPtr pPix)
- {
--#ifdef USE_GLAMOR
- RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(pPix->drawable.pScreen));
-+#ifdef USE_GLAMOR
-
- if (info->use_glamor) {
- struct radeon_pixmap *priv;
-@@ -799,7 +799,7 @@ static inline struct radeon_buffer *radeon_get_pixmap_bo(PixmapPtr pPix)
- return priv ? priv->bo : NULL;
- } else
- #endif
-- {
-+ if (info->accelOn) {
- struct radeon_exa_pixmap_priv *driver_priv;
- driver_priv = exaGetPixmapDriverPrivate(pPix);
- return driver_priv ? driver_priv->bo : NULL;
-@@ -896,7 +896,7 @@ radeon_pixmap_get_fb(PixmapPtr pix)
- handle);
- }
-
-- return *fb_ptr;
-+ return fb_ptr ? *fb_ptr : NULL;
- }
-
-
---
-2.24.1
-
diff --git a/user/xf86-video-geode/APKBUILD b/user/xf86-video-geode/APKBUILD
index 71749e608..22a81e7df 100644
--- a/user/xf86-video-geode/APKBUILD
+++ b/user/xf86-video-geode/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=xf86-video-geode
-pkgver=2.11.19
+pkgver=2.11.21
pkgrel=0
pkgdesc="AMD Geode video driver for X11"
url="https://www.X.Org/"
@@ -10,10 +10,7 @@ license="X11"
depends=""
makedepends="util-macros xorgproto-dev xorg-server-dev"
subpackages=""
-source="https://www.x.org/releases/individual/driver/xf86-video-geode-$pkgver.tar.bz2
- loader.patch
- randr.patch
- "
+source="https://www.x.org/releases/individual/driver/xf86-video-geode-$pkgver.tar.xz"
build() {
./configure \
@@ -34,6 +31,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="f0b1c5edf1c226a4379aa9a4983e69cbaced0618868a7902de41a7754c148324c2a4ea73704aefd96f48d36f035fb2c8063604c26e21e986e4f90c3716578d41 xf86-video-geode-2.11.19.tar.bz2
-a6703c78f2790ff67eb812de3afcdff0a86b6dee8469318ed21e8a50af0a286a087739917e7559d920085563b62eaf9874d54397e88bc810e65bd6ffa7d0830f loader.patch
-c4b1d09b17e84a3aa842e37f6710fcfe420c2cd9a3efeac5ea50c0d3eb7ebbdb370536a86e1741c89fe50ae38b22d9aecf1d6919077a1579209f2f70c2e0b099 randr.patch"
+sha512sums="e12f74268ab7d16b57644a9465b4be1ca28d250625a31b8810e19a1f94a17e47e0a258455155fd8f336fa59fd78160cdf3763aa94b85c6ccc2c42edf3b65bc61 xf86-video-geode-2.11.21.tar.xz"
diff --git a/user/xf86-video-geode/loader.patch b/user/xf86-video-geode/loader.patch
deleted file mode 100644
index f318fbb17..000000000
--- a/user/xf86-video-geode/loader.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 09aaa3d1fae4aeb099b16e7a046151761bcdea95 Mon Sep 17 00:00:00 2001
-From: Adam Jackson <ajax@redhat.com>
-Date: Tue, 24 Jan 2017 09:53:06 -0500
-Subject: Remove call to LoaderGetOS
-
-On OSes that don't have a /dev/videox we'll just fail the open() and not
-initialize the Xv adaptor.
-
-Signed-off-by: Adam Jackson <ajax@redhat.com>
----
- src/z4l.c | 13 -------------
- 1 file changed, 13 deletions(-)
-
-diff --git a/src/z4l.c b/src/z4l.c
-index eccefe8..be0d345 100644
---- a/src/z4l.c
-+++ b/src/z4l.c
-@@ -1709,7 +1709,6 @@ _X_EXPORT XF86ModuleData ztvModuleData = { &z4lVersionRec, z4lSetup, NULL };
- static pointer
- z4lSetup(pointer module, pointer opts, int *errmaj, int *errmin)
- {
-- const char *osname;
- static Bool setupDone = FALSE;
-
- if (setupDone != FALSE) {
-@@ -1719,19 +1718,7 @@ z4lSetup(pointer module, pointer opts, int *errmaj, int *errmin)
- }
-
- setupDone = TRUE;
-- LoaderGetOS(&osname, NULL, NULL, NULL);
--
-- if (osname == NULL || strcmp(osname, "linux") != 0) {
-- if (errmaj)
-- *errmaj = LDR_BADOS;
-- if (errmin)
-- *errmin = 0;
--
-- return NULL;
-- }
--
- xf86AddDriver(&Z4l, module, 0);
--
- return (pointer) 1;
- }
-
---
-cgit v1.1
-
diff --git a/user/xf86-video-geode/randr.patch b/user/xf86-video-geode/randr.patch
deleted file mode 100644
index 9c2b34ac9..000000000
--- a/user/xf86-video-geode/randr.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 8382e6bb0c76a8029493eae3f2d7a3dbfd0cfc12 Mon Sep 17 00:00:00 2001
-From: Adam Jackson <ajax@redhat.com>
-Date: Mon, 5 Mar 2018 10:28:15 -0500
-Subject: gx: Fix RANDR initialization for xserver 1.20
-
-xf86DisableRandR() doesn't exist anymore, and we don't need it anyway,
-the core code will notice that we set up RANDR ourselves.
-
-Signed-off-by: Adam Jackson <ajax@redhat.com>
----
- src/gx_driver.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/gx_driver.c b/src/gx_driver.c
-index ab57df1..4de336e 100644
---- a/src/gx_driver.c
-+++ b/src/gx_driver.c
-@@ -1426,7 +1426,9 @@ GXScreenInit(SCREEN_INIT_ARGS_DECL)
-
- /* Set up RandR */
-
-+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 24
- xf86DisableRandR(); /* We provide our own RandR goodness */
-+#endif
-
- /* Try to set up the shadow FB for rotation */
-
---
-cgit v1.1
-
diff --git a/user/xf86-video-intel/APKBUILD b/user/xf86-video-intel/APKBUILD
index a7eb064bb..c172ed53e 100644
--- a/user/xf86-video-intel/APKBUILD
+++ b/user/xf86-video-intel/APKBUILD
@@ -15,7 +15,9 @@ makedepends="xorg-server-dev libxi-dev libdrm-dev mesa-dev libxvmc-dev
libxv-dev
"
subpackages="$pkgname-doc"
-source="https://dev.sick.bike/dist/$pkgname-$pkgver.tar.gz"
+source="https://dev.sick.bike/dist/$pkgname-$pkgver.tar.gz
+ fno-common.patch
+ "
giturl="https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel.git"
reporev="f66d39544bb8339130c96d282a80f87ca1606caf"
@@ -42,4 +44,5 @@ package() {
rm "$pkgdir"/usr/libexec/xf86-video-intel-backlight-helper
}
-sha512sums="cb853076238cbde61faeb7dd1a07c5edc5325361dc3109acd9c142c1bf66566ee8c19f8e709bde34456e4198353ac72d337bc6a43dbcc80a4546762541be6eb9 xf86-video-intel-2.99.917_git20200224.tar.gz"
+sha512sums="cb853076238cbde61faeb7dd1a07c5edc5325361dc3109acd9c142c1bf66566ee8c19f8e709bde34456e4198353ac72d337bc6a43dbcc80a4546762541be6eb9 xf86-video-intel-2.99.917_git20200224.tar.gz
+2290b7d1773ccff902b1300448513dd1be4db45db234a726b4a533430c9fb62a9802f306440f751e864e7a8fb5304468719a020fc86181465501b5b2d93f1390 fno-common.patch"
diff --git a/user/xf86-video-intel/fno-common.patch b/user/xf86-video-intel/fno-common.patch
new file mode 100644
index 000000000..5c0640f9f
--- /dev/null
+++ b/user/xf86-video-intel/fno-common.patch
@@ -0,0 +1,24 @@
+From 7ca3a0d0d9a2de49db30708d38195b6585df4ed8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Hanno=20B=C3=B6ck?= <hanno@gentoo.org>
+Date: Sun, 2 Feb 2020 14:18:39 +0100
+Subject: [PATCH] Avoid duplicate definition of I810CopyROP in i810.h and
+ i810_accel.c, fixes compilation with -fno-common/gcc-10.
+
+---
+ src/legacy/i810/i810.h | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/legacy/i810/i810.h b/src/legacy/i810/i810.h
+index 347188c9..901b7e64 100644
+--- a/src/legacy/i810/i810.h
++++ b/src/legacy/i810/i810.h
+@@ -322,6 +322,5 @@ extern void I810InitMC(ScreenPtr pScreen);
+ extern const OptionInfoRec *I810AvailableOptions(int chipid, int busid);
+
+ extern const int I810CopyROP[16];
+-const int I810PatternROP[16];
+
+ #endif /* _I810_H_ */
+--
+2.24.1
+
diff --git a/user/xf86-video-openchrome/APKBUILD b/user/xf86-video-openchrome/APKBUILD
index 3d32b7dff..7846e5efc 100644
--- a/user/xf86-video-openchrome/APKBUILD
+++ b/user/xf86-video-openchrome/APKBUILD
@@ -18,6 +18,7 @@ prepare() {
}
build() {
+ export CFLAGS="$CFLAGS -fcommon"
./configure \
--build=$CBUILD \
--host=$CHOST \
diff --git a/user/xf86-video-vmware/APKBUILD b/user/xf86-video-vmware/APKBUILD
index 511336412..c8dc14371 100644
--- a/user/xf86-video-vmware/APKBUILD
+++ b/user/xf86-video-vmware/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=xf86-video-vmware
-pkgver=13.3.0
-pkgrel=1
+pkgver=13.4.0
+pkgrel=0
pkgdesc="X.Org driver for VMware's SVGA adaptor"
url="https://www.X.Org/"
# Requires kernel interfaces unavailable on ARM.
@@ -11,9 +11,7 @@ license="X11"
depends=""
makedepends="eudev-dev util-macros xorg-server-dev xorgproto-dev"
subpackages="$pkgname-doc"
-source="https://www.X.Org/releases/individual/driver/xf86-video-vmware-$pkgver.tar.bz2
- fix-stdbool-includes.patch
- "
+source="https://www.X.Org/releases/individual/driver/xf86-video-vmware-$pkgver.tar.xz"
build() {
./configure \
@@ -34,5 +32,4 @@ package() {
make DESTDIR="$pkgdir" install
}
-sha512sums="c318de893cae7b2b11e11c1b389ee47478b7c8d1f52c27099dbe453efec28f3e9da449217307a8c2251999eada66312f766996be1a6ead413b8b6dedc42c68ca xf86-video-vmware-13.3.0.tar.bz2
-b607f875143213015a839336b453131a477387ca9c8422957697628b3b7d1667b1a196f6aa41ea93f262589a8bea560d3e1f2337aea5fbf466610191a78ad5f4 fix-stdbool-includes.patch"
+sha512sums="7cacde21a490501dd9c2e9121040274c1f6ef64e6dc0ef49946b400f6297fab73a6e9548e45fe8930cee9028e65e45aaff9ba489dd69ac75a5133114726bf55d xf86-video-vmware-13.4.0.tar.xz"
diff --git a/user/xmoto/APKBUILD b/user/xmoto/APKBUILD
index f13b7d68d..55c9deb9b 100644
--- a/user/xmoto/APKBUILD
+++ b/user/xmoto/APKBUILD
@@ -4,7 +4,7 @@ pkgname=xmoto
pkgver=0.5.11
pkgrel=0
pkgdesc="Challenging 2D motocross platform game"
-url="https://xmoto.tuxfamily.org/"
+url=" "
arch="all"
license="GPL-2.0+"
depends=""
@@ -13,7 +13,7 @@ makedepends="bzip2-dev curl-dev glu-dev libjpeg-turbo-dev libpng-dev
sdl_mixer-dev sdl_net-dev sdl_ttf-dev sqlite-dev zlib-dev
autoconf automake"
subpackages="$pkgname-doc $pkgname-lang"
-source="http://download.tuxfamily.org/xmoto/xmoto/0.5.11/xmoto-$pkgver-src.tar.gz
+source="https://distfiles.adelielinux.org/source/archive/$pkgname-$pkgver/$pkgname-$pkgver-src.tar.gz
stupid-lua.patch
utf8.patch
"
diff --git a/user/xorg-server/APKBUILD b/user/xorg-server/APKBUILD
index 0bca19339..17909c830 100644
--- a/user/xorg-server/APKBUILD
+++ b/user/xorg-server/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=xorg-server
pkgver=1.20.9
-pkgrel=0
+pkgrel=1
pkgdesc="X.Org X11 server"
url="https://www.X.Org/"
arch="all"
@@ -26,6 +26,8 @@ subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc xvfb $pkgname-xephyr
source="https://www.X.Org/releases/individual/xserver/$pkgname-$pkgver.tar.bz2
autoconfig-sis.patch
fix-musl-arm.patch
+ rgb-mask.patch
+ gcc12.patch
"
# secfixes:
@@ -142,4 +144,6 @@ xwayland() {
sha512sums="d9b5f93e1b9763a89187d8b272aa7d4ce9709641b8539f4536708af153310e5a4931bffd4229c51a3b0e3b12da7838750aa71b635751fb4c0bb27438cce4e5e6 xorg-server-1.20.9.tar.bz2
d77151bc51766e1230a121c008ac1d0695275bf889b1db4b3330c1f8ee720b0e046cc935fa14aaef40b02fdea508e84e53959b560131ace14ace14943c8eb734 autoconfig-sis.patch
-a5f910e72ff9abd4e4a0c6806cdbe48d1b0b6cc0586f36568da5864a8dedc46a3112fe86d7a1969033f4d5b0def4dc6e5c11b656fbcc964732b417e6c9577f22 fix-musl-arm.patch"
+a5f910e72ff9abd4e4a0c6806cdbe48d1b0b6cc0586f36568da5864a8dedc46a3112fe86d7a1969033f4d5b0def4dc6e5c11b656fbcc964732b417e6c9577f22 fix-musl-arm.patch
+e38d7323a9046f405f1b568e592f90bb9ed7dd4954480d251431f1e550ea4898d9e6c4bc4bd425ece877464392ed54c92ba582b6f27677fc139a2901209de48a rgb-mask.patch
+1abdf004c16ece7e0d1313cbbcbcfdb706d52917ff974b74a4de180fbc0e9d09e6fcc1a3f2b2875885e12d240512679ef0456b8e43bf69ebc1d307be5cd5deaf gcc12.patch"
diff --git a/user/xorg-server/gcc12.patch b/user/xorg-server/gcc12.patch
new file mode 100644
index 000000000..5aa2f08c6
--- /dev/null
+++ b/user/xorg-server/gcc12.patch
@@ -0,0 +1,89 @@
+From c6b0dcb82d4db07a2f32c09a8c09c85a5f57248e Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <ofourdan@redhat.com>
+Date: Thu, 20 Jan 2022 10:20:38 +0100
+Subject: [PATCH] render: Fix build with gcc 12
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The xserver fails to compile with the latest gcc 12:
+
+ render/picture.c: In function ‘CreateSolidPicture’:
+ render/picture.c:874:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[16]’ [-Werror=array-bounds]
+ 874 | pPicture->pSourcePict->type = SourcePictTypeSolidFill;
+ | ^~
+ render/picture.c:868:45: note: object of size 16 allocated by ‘malloc’
+ 868 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictSolidFill));
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ render/picture.c: In function ‘CreateLinearGradientPicture’:
+ render/picture.c:906:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Werror=array-bounds]
+ 906 | pPicture->pSourcePict->linear.type = SourcePictTypeLinear;
+ | ^~
+ render/picture.c:899:45: note: object of size 32 allocated by ‘malloc’
+ 899 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictLinearGradient));
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ render/picture.c: In function ‘CreateConicalGradientPicture’:
+ render/picture.c:989:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Werror=array-bounds]
+ 989 | pPicture->pSourcePict->conical.type = SourcePictTypeConical;
+ | ^~
+ render/picture.c:982:45: note: object of size 32 allocated by ‘malloc’
+ 982 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictConicalGradient));
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ cc1: some warnings being treated as errors
+ ninja: build stopped: subcommand failed.
+
+This is because gcc 12 has become stricter and raises a warning now.
+
+Fix the warning/error by allocating enough memory to store the union
+struct.
+
+Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+Acked-by: Michel Dänzer <mdaenzer@redhat.com>
+Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1256
+---
+ render/picture.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/render/picture.c b/render/picture.c
+index afa0d258fa..2be4b1954f 100644
+--- a/render/picture.c
++++ b/render/picture.c
+@@ -865,7 +865,7 @@ CreateSolidPicture(Picture pid, xRenderColor * color, int *error)
+ }
+
+ pPicture->id = pid;
+- pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictSolidFill));
++ pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict));
+ if (!pPicture->pSourcePict) {
+ *error = BadAlloc;
+ free(pPicture);
+@@ -896,7 +896,7 @@ CreateLinearGradientPicture(Picture pid, xPointFixed * p1, xPointFixed * p2,
+ }
+
+ pPicture->id = pid;
+- pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictLinearGradient));
++ pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict));
+ if (!pPicture->pSourcePict) {
+ *error = BadAlloc;
+ free(pPicture);
+@@ -936,7 +936,7 @@ CreateRadialGradientPicture(Picture pid, xPointFixed * inner,
+ }
+
+ pPicture->id = pid;
+- pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictRadialGradient));
++ pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict));
+ if (!pPicture->pSourcePict) {
+ *error = BadAlloc;
+ free(pPicture);
+@@ -979,7 +979,7 @@ CreateConicalGradientPicture(Picture pid, xPointFixed * center, xFixed angle,
+ }
+
+ pPicture->id = pid;
+- pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictConicalGradient));
++ pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict));
+ if (!pPicture->pSourcePict) {
+ *error = BadAlloc;
+ free(pPicture);
+--
+GitLab
+
diff --git a/user/xorg-server/rgb-mask.patch b/user/xorg-server/rgb-mask.patch
new file mode 100644
index 000000000..a503a6e16
--- /dev/null
+++ b/user/xorg-server/rgb-mask.patch
@@ -0,0 +1,70 @@
+From 7e142cb2a848acb6af986fa91d254d4c23963b24 Mon Sep 17 00:00:00 2001
+From: luporl <luporl@FreeBSD.org>
+Date: Wed, 9 Dec 2020 11:11:15 -0300
+Subject: [PATCH] xserver: fix RGB mask handling
+
+On FreeBSD 13.0-CURRENT for PowerPC64 big-endian (BE), X was
+crashing in some cases. For instance, when twm was started
+and the background was clicked to open its menu, X crashed
+with a segmentation fault, trying to dereference a null pointer
+at CreatePicture().
+
+There were 2 issues with xorg-server handling of RGB masks that
+caused the pointer above to be null and thus the crash:
+- wrong use of ffs() to get the RGB offsets from the masks
+- overflow when shifting a 16-bit integer
+
+This change fixes both issues. They happen when the system is BE
+but has a video adapter using a little-endian (LE) ARGB32
+framebuffer. In order to display the correct colors, this setup
+requires a BE RGBA32 color format to be used by X, by setting
+the RGB masks appropriately, that didn't work properly because of
+the issues above.
+---
+ hw/xfree86/common/xf86Helper.c | 6 +++---
+ render/picture.c | 12 ++++++------
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
+index 31aa068e0e..16ab309e27 100644
+--- a/hw/xfree86/common/xf86Helper.c
++++ b/hw/xfree86/common/xf86Helper.c
+@@ -729,9 +729,9 @@ xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask)
+ scrp->mask.red = mask.red;
+ scrp->mask.green = mask.green;
+ scrp->mask.blue = mask.blue;
+- scrp->offset.red = ffs(mask.red);
+- scrp->offset.green = ffs(mask.green);
+- scrp->offset.blue = ffs(mask.blue);
++ scrp->offset.red = ffs(mask.red) - 1;
++ scrp->offset.green = ffs(mask.green) - 1;
++ scrp->offset.blue = ffs(mask.blue) - 1;
+ }
+ return TRUE;
+ }
+diff --git a/render/picture.c b/render/picture.c
+index 876316dc1c..afa0d258fa 100644
+--- a/render/picture.c
++++ b/render/picture.c
+@@ -523,12 +523,12 @@ PictureMatchVisual(ScreenPtr pScreen, int depth, VisualPtr pVisual)
+ return format;
+ }
+ else {
+- if (format->direct.redMask << format->direct.red ==
+- pVisual->redMask &&
+- format->direct.greenMask << format->direct.green ==
+- pVisual->greenMask &&
+- format->direct.blueMask << format->direct.blue ==
+- pVisual->blueMask) {
++ if ((unsigned long)format->direct.redMask <<
++ format->direct.red == pVisual->redMask &&
++ (unsigned long)format->direct.greenMask <<
++ format->direct.green == pVisual->greenMask &&
++ (unsigned long)format->direct.blueMask <<
++ format->direct.blue == pVisual->blueMask) {
+ return format;
+ }
+ }
+--
+GitLab
+
diff --git a/user/xsane/APKBUILD b/user/xsane/APKBUILD
index 3c17b6f6d..73df03ca5 100644
--- a/user/xsane/APKBUILD
+++ b/user/xsane/APKBUILD
@@ -12,7 +12,7 @@ depends=""
makedepends="gtk+2.0-dev lcms2-dev libjpeg-turbo-dev libpng-dev sane-dev
tiff-dev"
subpackages="$pkgname-doc $pkgname-lang"
-source="http://distfiles.gentoo.org/distfiles/xsane-$pkgver.tar.gz
+source="https://distfiles.adelielinux.org/source/archive/$pkgname-$pkgver/xsane-$pkgver.tar.gz
xsane-0.999-lcms2.patch
xsane-0.999-libpng16.patch
"
diff --git a/user/yubikey-personalization/APKBUILD b/user/yubikey-personalization/APKBUILD
index b4db9bdd2..5f01b39bd 100644
--- a/user/yubikey-personalization/APKBUILD
+++ b/user/yubikey-personalization/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=yubikey-personalization
pkgver=1.20.0
-pkgrel=1
+pkgrel=2
pkgdesc="Cross-platform library & tools for personalizing YubiKey devices"
url="https://developers.yubico.com/yubikey-personalization/"
arch="all"
@@ -14,6 +14,9 @@ subpackages="$pkgname-dev $pkgname-doc"
source="yubikey-personalization-$pkgver.tar.gz::https://github.com/Yubico/yubikey-personalization/archive/v$pkgver.tar.gz
use-asciidoctor.patch
json_c.patch
+ gcc10.patch
+ uninit.patch
+ wipe-mem.patch
"
prepare() {
@@ -42,4 +45,7 @@ package() {
sha512sums="a38b26700793f0a801e5f5889bbbce4a3f728d22aaecf8d0890f1b5135e67bed16a78b7a36dbc323c5d296901f6dd420fa658a982492a0cd9f0bbf95a5fbc823 yubikey-personalization-1.20.0.tar.gz
d6777a43e5e57430268bb50ab704641465a7314b15fc821d8bfa7f0c6510829d0118ced426cd5f8730589efe6264df6b82fc70e8bfe3d8b7d735e51339a25af2 use-asciidoctor.patch
-a8bc7ae71d0a05476688abfaea070ca7dc2eaa68e033524d4a1b2b6240eec2932d867e9eeaa248874a04f254618cd79bf9ebaa17421938b0c2e62502bf90c055 json_c.patch"
+a8bc7ae71d0a05476688abfaea070ca7dc2eaa68e033524d4a1b2b6240eec2932d867e9eeaa248874a04f254618cd79bf9ebaa17421938b0c2e62502bf90c055 json_c.patch
+063acafb26941bc061d8613187bcbffe3fd1ca19a7c5346b0c347e052a30e4b4c750f4a40bb59b479173dbc7b5458383f5d5e25e385539b127cf4d9636caa549 gcc10.patch
+1d29331994f43a99e2cb854ff3ff8302800102e7c9eaef30228efa8ddf9a188279fdb4981b28f64141cfa5659af11af9325ecd249041b745c1cd0d55fe5fbd69 uninit.patch
+cca0729be2337923ab758fcf4a225d40cf12ac79fce609904e536ff811abec4231ecf58d47096587c974223335b35ec6c63ab4fc872cbfabf1f49f76313c8541 wipe-mem.patch"
diff --git a/user/yubikey-personalization/gcc10.patch b/user/yubikey-personalization/gcc10.patch
new file mode 100644
index 000000000..0e09e821e
--- /dev/null
+++ b/user/yubikey-personalization/gcc10.patch
@@ -0,0 +1,25 @@
+From 09ea16d9e2030e4da6ad00c1e5147e962aa7ff84 Mon Sep 17 00:00:00 2001
+From: Klas Lindfors <klas@yubico.com>
+Date: Mon, 17 Feb 2020 08:58:33 +0100
+Subject: [PATCH] make header declarations extern
+
+fixes #155
+---
+ ykpers-args.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ykpers-args.h b/ykpers-args.h
+index 2a63268d..9ff455a7 100644
+--- a/ykpers-args.h
++++ b/ykpers-args.h
+@@ -33,8 +33,8 @@
+
+ #include "ykpers.h"
+
+-const char *usage;
+-const char *optstring;
++extern const char *usage;
++extern const char *optstring;
+
+ int args_to_config(int argc, char **argv, YKP_CONFIG *cfg, char *oathid,
+ size_t oathid_len, const char **infname,
diff --git a/user/yubikey-personalization/uninit.patch b/user/yubikey-personalization/uninit.patch
new file mode 100644
index 000000000..713ce1699
--- /dev/null
+++ b/user/yubikey-personalization/uninit.patch
@@ -0,0 +1,204 @@
+From f86b334504693afe9ee6ec61416182d23c66e1ad Mon Sep 17 00:00:00 2001
+From: Gabriel Kihlman <g.kihlman@yubico.com>
+Date: Mon, 27 Apr 2020 14:52:53 +0200
+Subject: [PATCH] Initialize bufs to 0 to avoid potentially leaking
+ uninitialized memory
+
+Based on a report from Christian Reitter doing fuzzing with MSAN.
+
+Extracts of logs:
+
+==16111==WARNING: MemorySanitizer: use-of-uninitialized-value
+ #0 0x4d59d4 in yk_write_to_key
+/yubikey-personalization/ykcore/ykcore.c:715:8
+ #1 0x4d9c00 in _yk_write /yubikey-personalization/ykcore/ykcore.c:233:7
+ #2 0x4dc74d in yk_write_scan_map
+/yubikey-personalization/ykcore/ykcore.c:357:9
+ #3 0x4ce352 in ykpersonalize_main
+/yubikey-personalization/ykpersonalize.c:423:9
+[...]
+
+ Uninitialized value was stored to memory at
+ #0 0x45392b in __msan_memcpy
+(/yubikey-personalization/.libs/ykpersonalize+0x45392b)
+ #1 0x4d52f7 in yk_write_to_key
+/yubikey-personalization/ykcore/ykcore.c:689:2
+ #2 0x4d9c00 in _yk_write /yubikey-personalization/ykcore/ykcore.c:233:7
+ #3 0x4dc74d in yk_write_scan_map
+/yubikey-personalization/ykcore/ykcore.c:357:9
+ #4 0x4ce352 in ykpersonalize_main
+/yubikey-personalization/ykpersonalize.c:423:9
+[...]
+
+ Uninitialized value was created by an allocation of 'scan_codes' in
+the stack frame of function 'ykpersonalize_main'
+==18180==WARNING: MemorySanitizer: use-of-uninitialized-value
+ #0 0x4d5a24 in yk_write_to_key /yubikey-personalization/ykcore/ykcore.c:715:8
+ #1 0x4d9c50 in _yk_write /yubikey-personalization/ykcore/ykcore.c:233:7
+ #2 0x4dae6c in yk_write_command /yubikey-personalization/ykcore/ykcore.c:288:8
+ #3 0x4cec93 in ykpersonalize_main /yubikey-personalization/ykpersonalize.c:440:10
+
+ Uninitialized value was stored to memory at
+ #0 0x45392b in __msan_memcpy (/yubikey-personalization/.libs/ykpersonalize+0x45392b)
+ #1 0x4d5347 in yk_write_to_key /yubikey-personalization/ykcore/ykcore.c:689:2
+ #2 0x4d9c50 in _yk_write /yubikey-personalization/ykcore/ykcore.c:233:7
+ #3 0x4dae6c in yk_write_command /yubikey-personalization/ykcore/ykcore.c:288:8
+ #4 0x4cec93 in ykpersonalize_main /yubikey-personalization/ykpersonalize.c:440:10
+
+ Uninitialized value was stored to memory at
+ #0 0x45392b in __msan_memcpy (/yubikey-personalization/.libs/ykpersonalize+0x45392b)
+ #1 0x4dacdb in yk_write_command /yubikey-personalization/ykcore/ykcore.c:280:3
+ #2 0x4cec93 in ykpersonalize_main /yubikey-personalization/ykpersonalize.c:440:10
+
+ Uninitialized value was stored to memory at
+ #0 0x45392b in __msan_memcpy (/yubikey-personalization/.libs/ykpersonalize+0x45392b)
+ #1 0x7f6fd2ea32f9 in ykp_set_fixed /yubikey-personalization/ykpers.c:787:1
+ #2 0x50193c in _set_fixed /yubikey-personalization/ykpers-args.c:900:2
+ #3 0x4ed040 in args_to_config /yubikey-personalization/ykpers-args.c:558:9
+ #4 0x4c865c in ykpersonalize_main /yubikey-personalization/ykpersonalize.c:167:8
+
+ Uninitialized value was created by an allocation of 'fixedbin' in the stack frame of function '_set_fixed'
+ #0 0x501130 in _set_fixed /yubikey-personalization/ykpers-args.c:889
+---
+ ykpers-args.c | 8 ++++----
+ ykpers.c | 12 ++++++------
+ ykpersonalize.c | 13 +++++++------
+ 3 files changed, 17 insertions(+), 16 deletions(-)
+
+diff --git a/ykpers-args.c b/ykpers-args.c
+index 53f7c22b..62ff7b2f 100644
+--- a/ykpers-args.c
++++ b/ykpers-args.c
+@@ -548,7 +548,7 @@ int args_to_config(int argc, char **argv, YKP_CONFIG *cfg, char *oathid,
+ else if (strncmp(optarg, "uid", 3) == 0) {
+ char *uid = optarg+4;
+ size_t uidlen;
+- unsigned char uidbin[256];
++ unsigned char uidbin[256] = {0};
+ size_t uidbinlen = 0;
+ int rc;
+ char *uidtmp = NULL;
+@@ -787,7 +787,7 @@ int args_to_config(int argc, char **argv, YKP_CONFIG *cfg, char *oathid,
+ size_t key_bytes = (size_t)ykp_get_supported_key_length(cfg);
+ int res = 0;
+ char *key_tmp = NULL;
+- char keybuf[20];
++ char keybuf[20] = {0};
+
+ if(keylocation == 2) {
+ const char *prompt = " AES key, 16 bytes (32 characters hex) : ";
+@@ -865,7 +865,7 @@ int args_to_config(int argc, char **argv, YKP_CONFIG *cfg, char *oathid,
+ static int _set_fixed(char *opt, YKP_CONFIG *cfg) {
+ const char *fixed = opt;
+ size_t fixedlen = strlen (fixed);
+- unsigned char fixedbin[256];
++ unsigned char fixedbin[256] = {0};
+ size_t fixedbinlen = 0;
+ int rc = hex_modhex_decode(fixedbin, &fixedbinlen,
+ fixed, fixedlen,
+@@ -898,7 +898,7 @@ static int _format_decimal_as_hex(uint8_t *dst, size_t dst_len, uint8_t *src)
+ /* For details, see YubiKey Manual 2010-09-16 section 5.3.4 - OATH-HOTP Token Identifier */
+ static int _format_oath_id(uint8_t *dst, size_t dst_len, uint8_t vendor, uint8_t type, uint32_t mui)
+ {
+- uint8_t buf[8 + 1];
++ uint8_t buf[8 + 1] = {0};
+
+ if (mui > 99999999)
+ return 0;
+diff --git a/ykpers.c b/ykpers.c
+index 7941d0e3..81cb0dff 100644
+--- a/ykpers.c
++++ b/ykpers.c
+@@ -264,7 +264,7 @@ int ykp_get_supported_key_length(const YKP_CONFIG *cfg)
+
+ /* Decode 128 bit AES key into cfg->ykcore_config.key */
+ int ykp_AES_key_from_hex(YKP_CONFIG *cfg, const char *hexkey) {
+- char aesbin[256];
++ char aesbin[256] = {0};
+
+ /* Make sure that the hexkey is exactly 32 characters */
+ if (strlen(hexkey) != 32) {
+@@ -311,7 +311,7 @@ int ykp_HMAC_key_from_raw(YKP_CONFIG *cfg, const char *key) {
+ * and 32 bits into the first four bytes of cfg->ykcore_config.uid.
+ */
+ int ykp_HMAC_key_from_hex(YKP_CONFIG *cfg, const char *hexkey) {
+- char aesbin[256];
++ char aesbin[256] = {0};
+ size_t i;
+
+ /* Make sure that the hexkey is exactly 40 characters */
+@@ -351,9 +351,9 @@ int ykp_AES_key_from_passphrase(YKP_CONFIG *cfg, const char *passphrase,
+ 0
+ };
+ const char **random_place;
+- uint8_t _salt[8];
++ uint8_t _salt[8] = {0};
+ size_t _salt_len = 0;
+- unsigned char buf[sizeof(cfg->ykcore_config.key) + 4];
++ unsigned char buf[sizeof(cfg->ykcore_config.key) + 4] = {0};
+ int rc;
+ int key_bytes = ykp_get_supported_key_length(cfg);
+ YK_PRF_METHOD prf_method = {20, yk_hmac_sha1};
+@@ -931,7 +931,7 @@ static const char str_extended_flags[] = "extended_flags";
+
+ static int _ykp_legacy_export_config(const YKP_CONFIG *cfg, char *buf, size_t len) {
+ if (cfg) {
+- char buffer[256];
++ char buffer[256] = {0};
+ struct map_st *p;
+ unsigned char t_flags;
+ bool key_bits_in_uid = false;
+@@ -1131,7 +1131,7 @@ int ykp_write_config(const YKP_CONFIG *cfg,
+ void *userdata),
+ void *userdata) {
+ if(cfg) {
+- char buffer[1024];
++ char buffer[1024] = {0};
+ int ret = _ykp_legacy_export_config(cfg, buffer, 1024);
+ if(ret) {
+ writer(buffer, strlen(buffer), userdata);
+diff --git a/ykpersonalize.c b/ykpersonalize.c
+index 15338c6a..2c991e32 100644
+--- a/ykpersonalize.c
++++ b/ykpersonalize.c
+@@ -48,17 +48,17 @@ int main(int argc, char **argv)
+ FILE *outf = NULL; const char *outfname = NULL;
+ int data_format = YKP_FORMAT_LEGACY;
+ bool verbose = false;
+- unsigned char access_code[256];
++ unsigned char access_code[256] = {0};
+ char *acc_code = NULL;
+ char *new_acc_code = NULL;
+- unsigned char scan_codes[sizeof(SCAN_MAP)];
+- unsigned char device_info[128];
++ unsigned char scan_codes[sizeof(SCAN_MAP)] = {0};
++ unsigned char device_info[128] = {0};
+ size_t device_info_len = 0;
+ YK_KEY *yk = 0;
+ YKP_CONFIG *cfg = ykp_alloc();
+ YK_STATUS *st = ykds_alloc();
+ bool autocommit = false;
+- char data[1024];
++ char data[1024] = {0};
+ bool dry_run = false;
+
+ /* Options */
+@@ -184,7 +184,7 @@ int main(int argc, char **argv)
+ }
+ }
+ if(new_acc_code) {
+- unsigned char accbin[256];
++ unsigned char accbin[256] = {0};
+ size_t accbinlen = 0;
+ int rc = hex_modhex_decode (accbin, &accbinlen,
+ new_acc_code, strlen(new_acc_code),
+@@ -261,7 +261,8 @@ int main(int argc, char **argv)
+ goto err;
+ }
+ } else {
+- char commitbuf[256]; size_t commitlen;
++ char commitbuf[256] = {0};
++ size_t commitlen;
+
+ if (ykp_command(cfg) == SLOT_SWAP) {
+ fprintf(stderr, "Configuration in slot 1 and 2 will be swapped\n");
diff --git a/user/yubikey-personalization/wipe-mem.patch b/user/yubikey-personalization/wipe-mem.patch
new file mode 100644
index 000000000..a5ef05e8d
--- /dev/null
+++ b/user/yubikey-personalization/wipe-mem.patch
@@ -0,0 +1,29 @@
+From 13f69440ac7cca05a94bd9cf9011e2ea352dad68 Mon Sep 17 00:00:00 2001
+From: Gabriel Kihlman <g.kihlman@yubico.com>
+Date: Mon, 27 Apr 2020 14:56:00 +0200
+Subject: [PATCH] Wipe stack memory containing key material before returning
+
+---
+ ykpers.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/ykpers.c b/ykpers.c
+index 81cb0df..2413b35 100644
+--- a/ykpers.c
++++ b/ykpers.c
+@@ -280,6 +280,7 @@ int ykp_AES_key_from_hex(YKP_CONFIG *cfg, const char *hexkey) {
+
+ yubikey_hex_decode(aesbin, hexkey, sizeof(aesbin));
+ memcpy(cfg->ykcore_config.key, aesbin, sizeof(cfg->ykcore_config.key));
++ insecure_memzero (aesbin, sizeof(aesbin));
+
+ return 0;
+ }
+@@ -330,6 +331,7 @@ int ykp_HMAC_key_from_hex(YKP_CONFIG *cfg, const char *hexkey) {
+ i = sizeof(cfg->ykcore_config.key);
+ memcpy(cfg->ykcore_config.key, aesbin, i);
+ memcpy(cfg->ykcore_config.uid, aesbin + i, 20 - i);
++ insecure_memzero (aesbin, sizeof(aesbin));
+
+ return 0;
+ }
diff --git a/user/zola/APKBUILD b/user/zola/APKBUILD
deleted file mode 100644
index 402b2f0fe..000000000
--- a/user/zola/APKBUILD
+++ /dev/null
@@ -1,754 +0,0 @@
-# Contributor: Gentoo Rust Maintainers <rust@gentoo.org>
-# Contributor: Molly Miller <adelie@m-squa.red>
-# Maintainer: Samuel Holland <samuel@sholland.org>
-pkgname=zola
-pkgver=0.9.0
-pkgrel=1
-pkgdesc="A fast static site generator in a single binary with everything built in"
-url="https://github.com/getzola/zola"
-arch="all"
-license="BSD-3-Clause AND MIT"
-depends=""
-makedepends="cargo oniguruma-dev openssl-dev zlib-dev"
-subpackages="
- $pkgname-doc
- $pkgname-bash-completion:bashcomp:noarch
- $pkgname-fish-completion:fishcomp:noarch
- $pkgname-zsh-completion:zshcomp:noarch"
-source="$pkgname-$pkgver.tar.gz::https://github.com/getzola/zola/archive/v$pkgver.tar.gz"
-
-# dependencies taken from Cargo.lock
-cargo_deps="
-actix-codec-0.1.2
-actix-connect-0.2.5
-actix-files-0.1.4
-actix-http-0.2.10
-actix-router-0.1.5
-actix-rt-0.2.5
-actix-server-0.6.0
-actix-server-config-0.1.2
-actix-service-0.4.2
-actix-threadpool-0.1.2
-actix-utils-0.4.5
-actix-web-1.0.7
-actix-web-codegen-0.1.2
-adler32-1.0.4
-aho-corasick-0.7.6
-ammonia-3.0.0
-ansi_term-0.11.0
-arc-swap-0.4.3
-arrayvec-0.4.11
-atty-0.2.13
-autocfg-0.1.6
-backtrace-0.3.38
-backtrace-sys-0.1.31
-base64-0.10.1
-bincode-1.2.0
-bitflags-1.2.0
-block-buffer-0.7.3
-block-padding-0.1.4
-bstr-0.2.8
-byte-tools-0.3.1
-byteorder-1.3.2
-bytes-0.4.12
-c2-chacha-0.2.2
-cc-1.0.45
-cfg-if-0.1.10
-chrono-0.4.9
-chrono-tz-0.5.1
-clap-2.33.0
-cloudabi-0.0.3
-color_quant-1.0.1
-cookie-0.12.0
-cookie_store-0.7.0
-copyless-0.1.4
-core-foundation-0.6.4
-core-foundation-sys-0.6.2
-crc32fast-1.2.0
-crossbeam-channel-0.3.9
-crossbeam-deque-0.7.1
-crossbeam-epoch-0.7.2
-crossbeam-queue-0.1.2
-crossbeam-utils-0.6.6
-csv-1.1.1
-csv-core-0.1.6
-ctrlc-3.1.3
-deflate-0.7.20
-derive_more-0.15.0
-deunicode-0.4.3
-digest-0.8.1
-dtoa-0.4.4
-either-1.5.3
-elasticlunr-rs-2.3.6
-encoding_rs-0.8.20
-enum-as-inner-0.2.1
-error-chain-0.12.1
-failure-0.1.5
-failure_derive-0.1.5
-fake-simd-0.1.2
-filetime-0.2.7
-flate2-1.0.11
-fnv-1.0.6
-foreign-types-0.3.2
-foreign-types-shared-0.1.1
-fs_extra-1.1.0
-fsevent-0.4.0
-fsevent-sys-2.0.1
-fuchsia-cprng-0.1.1
-fuchsia-zircon-0.3.3
-fuchsia-zircon-sys-0.3.3
-futf-0.1.4
-futures-0.1.29
-futures-cpupool-0.1.8
-generic-array-0.12.3
-getopts-0.2.21
-getrandom-0.1.12
-gif-0.10.3
-glob-0.3.0
-globset-0.4.4
-globwalk-0.7.1
-h2-0.1.26
-hashbrown-0.5.0
-heck-0.3.1
-hostname-0.1.5
-html5ever-0.24.1
-http-0.1.18
-http-body-0.1.0
-httparse-1.3.4
-humansize-1.1.0
-humantime-1.3.0
-hyper-0.12.35
-hyper-tls-0.3.2
-idna-0.1.5
-idna-0.2.0
-ignore-0.4.10
-image-0.22.2
-indexmap-1.2.0
-inflate-0.4.5
-inotify-0.6.1
-inotify-sys-0.1.3
-iovec-0.1.2
-ipconfig-0.2.1
-itoa-0.4.4
-jpeg-decoder-0.1.16
-kernel32-sys-0.2.2
-language-tags-0.2.2
-lazy_static-1.4.0
-lazycell-1.2.1
-libc-0.2.62
-line-wrap-0.1.1
-linked-hash-map-0.5.2
-lock_api-0.1.5
-lock_api-0.3.1
-log-0.4.8
-lru-cache-0.1.2
-lzw-0.10.0
-mac-0.1.1
-maplit-1.0.2
-markup5ever-0.9.0
-matches-0.1.8
-memchr-2.2.1
-memoffset-0.5.1
-mime-0.3.14
-mime_guess-2.0.1
-miniz-sys-0.1.12
-miniz_oxide-0.3.2
-mio-0.6.19
-mio-extras-2.0.5
-mio-uds-0.6.7
-miow-0.2.1
-native-tls-0.2.3
-net2-0.2.33
-new_debug_unreachable-1.0.3
-nix-0.14.1
-nodrop-0.1.13
-nom-4.2.3
-notify-4.0.13
-num-derive-0.2.5
-num-integer-0.1.41
-num-iter-0.1.39
-num-rational-0.2.2
-num-traits-0.2.8
-num_cpus-1.10.1
-onig-4.3.3
-onig_sys-69.1.0
-opaque-debug-0.2.3
-open-1.3.2
-openssl-0.10.24
-openssl-probe-0.1.2
-openssl-sys-0.9.49
-owning_ref-0.4.0
-parking_lot-0.7.1
-parking_lot-0.9.0
-parking_lot_core-0.4.0
-parking_lot_core-0.6.2
-parse-zoneinfo-0.2.0
-percent-encoding-1.0.1
-percent-encoding-2.1.0
-pest-2.1.2
-pest_derive-2.1.0
-pest_generator-2.1.1
-pest_meta-2.1.2
-phf-0.7.24
-phf_codegen-0.7.24
-phf_generator-0.7.24
-phf_shared-0.7.24
-pkg-config-0.3.16
-plist-0.4.2
-png-0.15.0
-ppv-lite86-0.2.5
-precomputed-hash-0.1.1
-proc-macro2-0.4.30
-proc-macro2-1.0.4
-publicsuffix-1.5.3
-pulldown-cmark-0.6.0
-quick-error-1.2.2
-quote-0.6.13
-quote-1.0.2
-rand-0.6.5
-rand-0.7.2
-rand_chacha-0.1.1
-rand_chacha-0.2.1
-rand_core-0.3.1
-rand_core-0.4.2
-rand_core-0.5.1
-rand_hc-0.1.0
-rand_hc-0.2.0
-rand_isaac-0.1.1
-rand_jitter-0.1.4
-rand_os-0.1.3
-rand_pcg-0.1.2
-rand_xorshift-0.1.1
-rayon-1.2.0
-rayon-core-1.6.0
-rdrand-0.4.0
-redox_syscall-0.1.56
-regex-1.3.1
-regex-automata-0.1.8
-regex-syntax-0.6.12
-remove_dir_all-0.5.2
-reqwest-0.9.20
-resolv-conf-0.6.2
-rust-stemmers-1.1.0
-rustc-demangle-0.1.16
-rustc_version-0.2.3
-ryu-1.0.0
-safemem-0.3.2
-same-file-1.0.5
-sass-rs-0.2.2
-sass-sys-0.4.13
-schannel-0.1.16
-scoped_threadpool-0.1.9
-scopeguard-0.3.3
-scopeguard-1.0.0
-security-framework-0.3.1
-security-framework-sys-0.3.1
-semver-0.9.0
-semver-parser-0.7.0
-serde-1.0.101
-serde_derive-1.0.101
-serde_json-1.0.40
-serde_urlencoded-0.5.5
-serde_urlencoded-0.6.1
-sha-1-0.8.1
-sha1-0.6.0
-signal-hook-0.1.10
-signal-hook-registry-1.1.1
-siphasher-0.2.3
-slab-0.4.2
-slotmap-0.4.0
-slug-0.1.4
-smallvec-0.6.10
-socket2-0.3.11
-stable_deref_trait-1.1.1
-string-0.2.1
-string_cache-0.7.3
-string_cache_codegen-0.4.4
-string_cache_shared-0.3.0
-strsim-0.8.0
-strum-0.15.0
-strum_macros-0.15.0
-syn-0.15.44
-syn-1.0.5
-synstructure-0.10.2
-syntect-3.2.0
-tempfile-3.1.0
-tendril-0.4.1
-tera-1.0.0-beta.16
-termcolor-1.0.5
-textwrap-0.11.0
-thread_local-0.3.6
-threadpool-1.7.1
-tiff-0.3.1
-time-0.1.42
-tokio-0.1.22
-tokio-buf-0.1.1
-tokio-codec-0.1.1
-tokio-current-thread-0.1.6
-tokio-executor-0.1.8
-tokio-io-0.1.12
-tokio-reactor-0.1.9
-tokio-signal-0.2.7
-tokio-sync-0.1.6
-tokio-tcp-0.1.3
-tokio-threadpool-0.1.15
-tokio-timer-0.2.11
-tokio-udp-0.1.5
-toml-0.5.3
-trust-dns-proto-0.7.4
-trust-dns-resolver-0.11.1
-try-lock-0.2.2
-try_from-0.3.2
-typenum-1.11.2
-ucd-trie-0.1.2
-unic-char-property-0.9.0
-unic-char-range-0.9.0
-unic-common-0.9.0
-unic-segment-0.9.0
-unic-ucd-segment-0.9.0
-unic-ucd-version-0.9.0
-unicase-2.5.1
-unicode-bidi-0.3.4
-unicode-normalization-0.1.8
-unicode-segmentation-1.3.0
-unicode-width-0.1.6
-unicode-xid-0.1.0
-unicode-xid-0.2.0
-url-1.7.2
-url-2.1.0
-utf-8-0.7.5
-uuid-0.7.4
-v_escape-0.7.4
-v_escape_derive-0.5.5
-v_htmlescape-0.4.5
-vcpkg-0.2.7
-vec_map-0.8.1
-version_check-0.1.5
-void-1.0.2
-walkdir-2.2.9
-want-0.2.0
-wasi-0.7.0
-widestring-0.4.0
-winapi-0.2.8
-winapi-0.3.8
-winapi-build-0.1.1
-winapi-i686-pc-windows-gnu-0.4.0
-winapi-util-0.1.2
-winapi-x86_64-pc-windows-gnu-0.4.0
-wincolor-1.0.2
-winreg-0.6.2
-winutil-0.1.1
-ws-0.9.0
-ws2_32-sys-0.2.1
-xml-rs-0.8.0
-yaml-rust-0.4.3
-"
-
-source="$source $(echo $cargo_deps | sed -E 's#([[:graph:]]+)-([0-9.]+(-(alpha|beta|rc)[0-9.]+)?)#&.tar.gz::https://crates.io/api/v1/crates/\1/\2/download#g')"
-
-prepare() {
- export CARGO_HOME="$srcdir/cargo-home"
- export CARGO_VENDOR="$CARGO_HOME/adelie"
-
- (builddir=$srcdir; default_prepare)
-
- mkdir -p "$CARGO_VENDOR"
- cat <<- EOF > "$CARGO_HOME/config"
- [source.adelie]
- directory = "${CARGO_VENDOR}"
-
- [source.crates-io]
- replace-with = "adelie"
- local-registry = "/nonexistant"
- EOF
-
- for _dep in $cargo_deps; do
- ln -s "$srcdir/$_dep" "$CARGO_VENDOR/$_dep"
- _sum=$(sha256sum "$srcdir/$_dep.tar.gz" | cut -d' ' -f1)
- cat <<- EOF > "$CARGO_VENDOR/$_dep/.cargo-checksum.json"
- {
- "package":"$_sum",
- "files":{}
- }
- EOF
- done
-}
-
-build() {
- export CARGO_HOME="$srcdir/cargo-home"
- export PKG_CONFIG_ALL_DYNAMIC=1
- export RUSTONIG_SYSTEM_LIBONIG=1
- cargo build -j $JOBS --release
-}
-
-check() {
- export CARGO_HOME="$srcdir/cargo-home"
- cargo test -j $JOBS --release
-}
-
-package() {
- export CARGO_HOME="$srcdir/cargo-home"
- cargo install --no-track --path . --root="$pkgdir"/usr
-}
-
-doc() {
- default_doc
- mkdir -p "$subpkgdir"/usr/share/doc
- cp -r "$builddir"/docs \
- "$subpkgdir"/usr/share/doc/$pkgname
-}
-
-bashcomp() {
- pkgdesc="Bash completions for $pkgname"
- depends=""
- install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
-
- mkdir -p "$subpkgdir"/usr/share/bash-completion/completions
- cp "$builddir"/completions/$pkgname.bash \
- "$subpkgdir"/usr/share/bash-completion/completions
-}
-
-fishcomp() {
- pkgdesc="Fish completions for $pkgname"
- depends=""
- install_if="$pkgname=$pkgver-r$pkgrel fish"
-
- mkdir -p "$subpkgdir"/usr/share/fish/completions
- cp "$builddir"/completions/$pkgname.fish \
- "$subpkgdir"/usr/share/fish/completions
-}
-
-zshcomp() {
- pkgdesc="Zsh completions for $pkgname"
- depends=""
- install_if="$pkgname=$pkgver-r$pkgrel zsh"
-
- mkdir -p "$subpkgdir/usr/share/zsh/site-functions"
- cp "$builddir"/completions/_$pkgname \
- "$subpkgdir"/usr/share/zsh/site-functions
-}
-
-sha512sums="e9496b57e005a751e85533807f6be275d187baa3f4371a29416dd7d2373d9214ee3469b032102c0544782527f93692d9d71a40d20e34cfe776be058777374756 zola-0.9.0.tar.gz
-2d1658901c383003ff8181f366b1c691754de50fdf74a07a89001c97dbf9320864238797cbd20a44643e8ea8ec107c3b226c8573c4a6379f94ffd286fe8db025 actix-codec-0.1.2.tar.gz
-13ac8e3a7759c55dad12055f93f5eab9e9b692cc3d6439888359de3e386b9838485e2478cfee8601f48ab03f5ffcaa662774ba039995e625d4ddc4ccdbb8432a actix-connect-0.2.5.tar.gz
-45e2cc4ca1a41d74e5e6f051912ec0b98b76115eb988e7aeb5374d110a9fefdcb0976b3e2cd9ab74f03f184e99fdf1f1779162f167418bcd0a7eec4e96aa4f79 actix-files-0.1.4.tar.gz
-3b225984dac2e601b8b9d37d0a2ed348e9d74487c9422a12c855d5fc347e2fb7bec5c16eb7e5f473734fe38acb40943a05a15ca38357aa3690bb16791efe3d28 actix-http-0.2.10.tar.gz
-a01be9391df3227764ca3445301b82bd85dacf502edb6233fd0bdac1447cc1a4a7514952effbbce0c1b267088db3ac17ae4455a2232232aed056f1efff562e5f actix-router-0.1.5.tar.gz
-289570966576600dc3c1d2641aaa6e858c7caa4e7b4c6474a6e459792a7d2914e0871127934e030e90635d3f00b42cfdb121b72f14e235a703561dfcbb37f149 actix-rt-0.2.5.tar.gz
-3f8c8285f8a36b56f8775bf56c4d708955deacc162df8e3b198f7ec78dcd7107195ba84b9fa20799efd1a8325d2163f7c3683b4b92fbaa3135610a30c001af0c actix-server-0.6.0.tar.gz
-69042aba68e57529719611d139e6793332830dd215c2f8d9dfd1f8db68590479295ed9bedcc764b06d3db24b8433a78e28b8253af3f23833f8c7cfecda3e0e2b actix-server-config-0.1.2.tar.gz
-53497632a2dcb7ad4f3fc2fedabad735cabd0ff855983cba72bd844f5f5a34813b75fffd6809826f97fa3d373940e2b11470db16ee61de5c61d4102a4c6f84f4 actix-service-0.4.2.tar.gz
-2b2dcabe2101cfdcd502de02a782275d23dea8a86fb594a6009bbfff59278dbf8b9344682f9c555432297b3847bbe60aaec1de39a0265fe52d810eafc474d4f4 actix-threadpool-0.1.2.tar.gz
-7b657ca0c73ab897ea71223da65deaa8f000f16a33f5e31ba35146b449a0ae9db7cbdc6cbc885b4daf786352a33317ffbc59ce1c19132be680efe7cd16007f53 actix-utils-0.4.5.tar.gz
-7870a3bb022904a4a030f6c0ae3ea5c34deb91ee483aa1144e3a9da5c5c2095da3b02119a81c58188696b3dbcaa718fa7682c4f501dd117c21f60f436794187d actix-web-1.0.7.tar.gz
-28c445b11556be5a482adade25fa67431b0557b620aa51cf76552a441171c854c66c2db889210d8cd0a09382795a76524b5a60f1fa93a531dcec07e03cf3f4a0 actix-web-codegen-0.1.2.tar.gz
-5990e1e277a1c3aae5adef5e4601b807a756a40e88578bb91f1c70d70babfa97fb3f2c1b963482ec8e18c16d5e722bf90fb42f9646c8dd840373f28965a2d123 adler32-1.0.4.tar.gz
-120aa28e72279f561d7f51657aa0800dd46504cd92f758f848284e5f3695be6f5e24056a66b0f2d971c527277e92ae938e2357ade37b5cbe1c93913a5dc308b1 aho-corasick-0.7.6.tar.gz
-743aa0e68db8bd2f636ba75a6683e02c581dab74ddd14b8f3abaef5e55be3d3a58ba361bfe4bf6ad00da20c232011239c9b6a2622818f4a86a290aa628e74186 ammonia-3.0.0.tar.gz
-a637466a380748f939b3af090b8c0333f35581925bc03f4dda9b3f95d338836403cf5487ae3af9ff68f8245a837f8ab061aabe57a126a6a2c20f2e972c77d1fa ansi_term-0.11.0.tar.gz
-3e5ec14c30c2a061dde5bf1b61ffa753745d1b0fc31081c3a52e3c6b83593f790ce7c25d25bc35a50768a31e8f4dcbe63dd12a1606d2d6939f0096a5bdb6c877 arc-swap-0.4.3.tar.gz
-6919f07fce0aa834b75ecc722476d05580a7dd58e8119b0ead5077d6501ee69ffef71016b6e63ed0617ce2d29a6fa1a4f5431d7aa20340c9f3f2e4c9c93d49c4 arrayvec-0.4.11.tar.gz
-4554ca7dedb4c2e8693e5847ef1fe66161ed4cb2c19156bb03f41ce7e7ea21838369dabaf447a60d1468de8bfbb7087438c12934c4569dde63df074f168569ad atty-0.2.13.tar.gz
-ac7dd73b7c6b8b54c4fc98c3e75210eb59d46ab3447fca533763bfebfa87dba5e947829e3ba56a8eb3403f6d317065b7d674da883741e619f3866b12267801fe autocfg-0.1.6.tar.gz
-a962b8ffd435691bf229f6db6cc86a0e9fabec1dea589824a85f11ee77e2c36458cdebd68acc0624d45195df27a9fb6dace0afb98a9fddc0291bae93928345fe backtrace-0.3.38.tar.gz
-6aa8c7a2694f4e953a0e9bbd07dc8b7e218719de5aef2adaecfae81beb919deffde6f184675dc6b6c1a330bb81dc9611c256f7f63caef5e301101dbe3bbaafe0 backtrace-sys-0.1.31.tar.gz
-674a8cbee95a41f755499a4e3bb93ebd3f80140c3e8e2d44a0b73890ee423754e7ba8abcd92132683cd54501ff5d14438d023a202eaf12776aecbe36df9e5535 base64-0.10.1.tar.gz
-9b599115ff33531eaad003e2c928e83211373101a5ad6cac0dcc09af0b97a0cb157abfc432c1a8c68f303e07732ebd6e0ab776c771250356da9f50187e92b1d9 bincode-1.2.0.tar.gz
-bd9e3797fb9b91e815308a5286439e7eedb285666c937184493cfce45ff1d4c10f505f29be3a6317add313a7fdc72a006682c1b3e1cc9fa05166f6c4ecaffcaa bitflags-1.2.0.tar.gz
-74c8b89777a006bd72511b32df94f8bd78e2b53c30d85d39ea3c52acf199c357140fb6181f7f7ab5e30dd80d37181582cad740c95b89328a7a4b0f84f77ad6bf block-buffer-0.7.3.tar.gz
-db06c66edf77b0a6860d75e053b84b74b3f168a320598a7f1de0e55fa6801dda22010328c5b50a56a27aafb09ed61e3e27ad7221d650b546b3798652b767b02b block-padding-0.1.4.tar.gz
-9e8786b68c03f059e4182046e7650b6f90431927c26c49fcdd4af3cb464092108fb2f64fdc2da1fe1d1121705ac8a21c68485b0517f3dd32040aab754f88944d bstr-0.2.8.tar.gz
-18e0f248a1e9780706e3a184d63558f03f30002646abc6d46ef49db9d5f6768af3d24d210b688aa4ad33d41248429e4df46bc3926f27851f90c92d260e5c4baa byte-tools-0.3.1.tar.gz
-2ef6b986926a4671dd945583730b0bfd4bd5e75b62a8a70c2875328157ba95f2c1b17c534d905e9b287457bd34363c1a33fd3dee9217c371032393ebbe206a8f byteorder-1.3.2.tar.gz
-5f603532ea2f04cbc53044422feed1667bf0486af398c9c8e2ce7b4601b37e1c47223201970fb0d17fed77fef7e89961e0ac05a30e6cc9bf13462d98bc587250 bytes-0.4.12.tar.gz
-d8edeff2f4eefb9504160d7f4d3c450661d10905c23cc4950736ab76e73bd1e88127c006bc762d63694847f2cc981ceeb0727ecf18e8fad7c89209d7a9e70f14 c2-chacha-0.2.2.tar.gz
-cd521fa11c0390cb7c71300ef77c5e27f10739345ff9c2d81c693191d602e8b54717237d1cfc325a39220f721df356e771c7a96885f77f43626d4e24d317434e cc-1.0.45.tar.gz
-9d22616bfb4a75770a828a0a3cddac6787297a5fdc53eb17e25811cc94de717f2de8bd66d53c5d65ba1c83d8892aefee5ae758cf56a1ef0a0c3120f70b244339 cfg-if-0.1.10.tar.gz
-d68fdcc255a2b967ea3e18d30dba7bba76929fcfa216c2081426b4fd3846bed660bcec8f92eeccb3de88f6e08aae9ade1c5e5d14f36d0853fe9a4499bcd5a57f chrono-0.4.9.tar.gz
-fddb6a5015fa87ce5d6d1024f73a497928233b0125ba31fe651cb03e6f9587e7664b360a27ae023bebfd7fbb29796d48a3c499255179d943fea372ce3e7b03dc chrono-tz-0.5.1.tar.gz
-f1075031414d48e4340bfe308904a95a31b72460724773c52a0bc8c004e625a04c904a39fc5420cb8c26a633321f9b5f4f69019c7aae5ed89900b63ed8c21a91 clap-2.33.0.tar.gz
-691ed793e9b35ba382f03897f4c0efc31a528394862a27b814ba8993ad30bbe0ebc9808484baf580e8b69d9c13ad1612776a1efd0f6981545b420139ff83592c cloudabi-0.0.3.tar.gz
-690b0aecf48e5102efca22d4f25821159d4c3f726f5eac08159467bc586ab9f83eacd64aeab79162c006d434002930ceb1519037c846edd84745eda289a592b9 color_quant-1.0.1.tar.gz
-4a802118306d25f1e53444e143913ca2a14a9e5584b26c5aca67b5ce0ac5111c4469fc5d7ee6b5877f8ac59143739b749edac83ceedcef7b53ba1e15cd97a821 cookie-0.12.0.tar.gz
-40584ddc3189ee798b5ba262934d0a48455376d9cab4d715e6c4dd476b75c62ec09fe0c2f1b748b266d20f2b84fd97e58cf1ec88cc6b245290a572fb29fbc4d4 cookie_store-0.7.0.tar.gz
-2d170f9629030fda5fa964704330ae3200e51cd13d0b07d019ea01efddbf89a55a64c3df3e9f1440b6bfa807c4f7b619d3618602c32c8f954eac81fce71747d3 copyless-0.1.4.tar.gz
-5dce50f15aa48f38e1bf287fdd3c5276d8e5f1d64bcf29da7d8a68008414f6ee560a940040361eb2f4e65657ca4329958dbec8105cc6d3606ecfe9e71ccb7632 core-foundation-0.6.4.tar.gz
-bfbe4e77a5e2644952c66a2afd21058a07583d3a1776c34dbfc316d159289073d92b8672eaab2f39fa46c48cd7f22d88f0354f02b3208482d700473a807ebf07 core-foundation-sys-0.6.2.tar.gz
-2ee73e0642f83e28034c1baca65156e65d751214e83f2a4ce94b6add5ba11f74ffc80832a3348ece1c099367be2b11e820dfb349fae89fbced1b68bd6b0466f0 crc32fast-1.2.0.tar.gz
-4cc876bab2bd8874cee4b96bc490e77778f10e99ab624ed7a8b73be94b59a40bcb340fdb81a1d14242f6a795557c9f8bcdcf17d6bf6829aff85c7c1e8bf00919 crossbeam-channel-0.3.9.tar.gz
-6ea3f138aecb4e84b4f9754fa6abc164b5b558987b15bd34562b70cf93ffd9015d017f62098e578236ad8bc1db652b9bfa624edffd5a99f10c3618c3927d3fe2 crossbeam-deque-0.7.1.tar.gz
-672817b282692fa8dfd0e366853d72a2c14c43d54b8059a7b4761315bff20c342629ec1e64ca0e80e1e401cbd625b259d182546779291899334f1d9db56f1fc8 crossbeam-epoch-0.7.2.tar.gz
-f799ec04a78ee86051bc6a0b99dc95766c83d2ae8672015d1fa95e53aa0f93232f3816b7b2d38bfbcc577516f45af009a5aac04be21f521550347fe87ca0b444 crossbeam-queue-0.1.2.tar.gz
-771ac1a55a043600e7d8b720f9b5a32da2ec09efaa4dec4202f7b78a505eb391a842b7abc91516ccd287c3207c634b342b0bc8ebb3c0c7a0d73b7fb29badc9f5 crossbeam-utils-0.6.6.tar.gz
-de89d7243b24b0b85c4b6520f2ada446e32561d58e9bb116d76bbd0465a647825e8dd0125f3d693ade5b9f5f41ad2c65016d958c9c3112cbadec92c26947e9c6 csv-1.1.1.tar.gz
-91f46405b7b8e214d918ba1bd00e866bd05a7296b8220d2041817d53feec05b62d12fa19142ebab1cc7e05518f1353f6560b2811877c5e3d3dd94f7f4d50a9b8 csv-core-0.1.6.tar.gz
-b77b0ccfe31110c514795b390b0500cb7349d4dfa2367f6d6b9612cce3d9dfa4cbbf96018da71ff4488258a0aeb2911e0436df35ea52c3e6a464bcbe027f12e8 ctrlc-3.1.3.tar.gz
-3ed98605cb073c178052336a2ffa535e69480046f12a9152edaef9f10520123c013126f30767097e30047689fb2c25f27e9745d6269bbb0e04e644b00fc19682 deflate-0.7.20.tar.gz
-dd68892b97f104427a3df896680616b002c7f0cf2809279f7f6ed34287ce387fc7c41d95e91380ac93a8c3342645467af70e656d2515db0beba24ce456e2a8bb derive_more-0.15.0.tar.gz
-f3b9ca2055cd64d2f3035799f809976a0909e59b38ebec62b56e9037f32582f5cc99b72b1774dfbcc72e4d978570946cec46eb034fe71145c67e2241b9f84cd5 deunicode-0.4.3.tar.gz
-186c3ddc01fefff6a134ea0be633a9fe8067b8db34f31e9991069e7a9b82ed595a1105283a87e3021af2337ad332faf1b85a6bb513a4482df7d24e3e7a5ba055 digest-0.8.1.tar.gz
-d2ca487cf950dbab9cfa20eb8b712e07276e40f2cb8b0c5c56f60719ae18d8a1c7fbed2bbea869255b0d5286b9890ad6fc6b3d7be2cc13af28c84c2882de8044 dtoa-0.4.4.tar.gz
-5e283412597bc3a1341d42c6cfe824606e056aaac82cbf3f662e7074ab74f1f80befe9de1b1011ce2dc970a0ec159ade5ed5b3e71c9984facee6314eac20d0f2 either-1.5.3.tar.gz
-63349de11a3b485ca9cf4961a951f286dc22842aa98229510eecb3e9e2fc5fe8deb03199eeabebb28e3adb24625ca78f4deead72af0696053c3a463228487731 elasticlunr-rs-2.3.6.tar.gz
-601e0a8ac8eb39def2336463b38de3052123f62653e22f5a48b8015912f946ab7e78610eca65e7663b2158c908e7f7f4f9f6b48f188c18319ef5594fb7e86e9d encoding_rs-0.8.20.tar.gz
-37c8034c74e74e590d785af955f34989454bf8051608aed2968ec6e5609f492fa3fa4ca829404a13c1e2f987eb72403b8c9c3463e69b5bde0b5307fc4b8d7f8d enum-as-inner-0.2.1.tar.gz
-1a8baeac9f4d96214a878b5c80ec2c5753c2232a166515c96ad6a42424bbe32410f2acd3aefa70d9dda7036e1965d83aeb9fd1a393b11464fed751aaebc9bbdc error-chain-0.12.1.tar.gz
-8dcfff3b9f7ed03070cdd890e051bcd425535a4e18aec21d5a48383d2826528157ad51893cbaf320953d31752efb22f554ce974f8516706d87343537589433dc failure-0.1.5.tar.gz
-c1a6896d986c126c35045c40a85b8cb8dd8842b9bd06918246205f2e79349e1df5dcdbe408024a0f9693d628e17bbd750a733a0a5cc24de4162b08790222729a failure_derive-0.1.5.tar.gz
-d57242c54ea3283185eaecbf8d96a4c9decbada3ae3aceb516a79710be9bf038a6e06a29b9ba4ebcd41b8f42943a3024a983ea23e36b17edc445a8c4980f2893 fake-simd-0.1.2.tar.gz
-410d45d9ad4d657da1d2cd16de58963f3096cf6e1978ffa4579b3696f0f4926cda303df7c4d02cfa8d71560518032750729a4184160a31229d590cbbec471d6a filetime-0.2.7.tar.gz
-d2d67be2fa687d4a4e2f4486a14e95d2d73704e862940b9cf0072378916d8e41b70081d30ada2184827740450f5f73edd35ba3d960931e3edb4da8ffb4e35a4a flate2-1.0.11.tar.gz
-f1356b3da25f76cb3ccb4336ff54d4967f1dc7523eae6cba21a4349b8ce563516f6a2aa10d626cd5bb6046b55ac2f246e61e4e526a03fad5e78d0ea174841844 fnv-1.0.6.tar.gz
-bf27b8243ed482c202d120383374f19ff09422535e24b9c1aebccc66529bf300ca17b8bbc76d67f98ac092e614497afe3add9dc68aa69c93074df05762f91232 foreign-types-0.3.2.tar.gz
-bafdb2143e136fb0818e2ffd90b5c862b7181647d6568947d4e4531012bbf7a57b597221ec7056c1b562dfc0c3b5dead26d1a4111ebc15e7863737a873518a4a foreign-types-shared-0.1.1.tar.gz
-c001a37a23a614f1752a45fbf392694911c8d06bb5af8b8a40f2dcba9c80c67ab634de0dd4fa951007072204b162430fed2c89bbb11ac2fca62dfa5cd4cbd46a fs_extra-1.1.0.tar.gz
-98d5e6998e3ae0cf3e0f383aa1e8f7fadd9b75154753168da4f6b87cc9a37b8830e7bed4b2169993ddf49646c9d47aa022d6af8a8a66370e7fc533932e70855f fsevent-0.4.0.tar.gz
-4c7f96586c4564f804390c3ad22388456a138bef1902a5985463515ca9b56976fc14c993f08ac188897c449b2d2843890c2357398eb3ef5eb064326881e7167d fsevent-sys-2.0.1.tar.gz
-ea9f5beb0dfcb023c22cfc2b37ce52dfcf3a2cbbed0f79ffffc332878858386805c65dce8469a431002367562d857a6c064e075688540c27fcb4056a110059d2 fuchsia-cprng-0.1.1.tar.gz
-a43ee59452d49742111e506d6bdd8b8399a3a646e08648e25292864d7f71460c1dd1f2d77b8efa8ed09ac21fa4ff0442a2709f16d8833a3849bde0c388d83a93 fuchsia-zircon-0.3.3.tar.gz
-978b7e8795a5877a68409ed3a1d7b4246263f8e7e7ce9ba8a022643be98f58f329cc1c234717df80a509db849da4394f39e90a8e2a6f56f8fa8dd3c07e7d4386 fuchsia-zircon-sys-0.3.3.tar.gz
-4cd5ecbb8c180c9b390a6884edf65bfc3aff53ffe7b930cf2b432ff9c46a8c5a06001f3f412f99c41a60def52207e709ffa07a4b432ada488e77067fb5e1b3bf futf-0.1.4.tar.gz
-16b16ff65c75cc565c5364406f5d9c0d120a07a520f6ea2dc86aaf4644b9ad6fb32bc021b44fb7c74246cb7a700b3df3bfa813908541eec079bd7eb7beee0200 futures-0.1.29.tar.gz
-49d7a75e2e0a6a6d2103212a9ad9474119f4f33cf3748b605dfbb461ec822330115cada6bbf6457f2093f4af4cc04b4db63dbab8c0faa8b25ee31fea29f660e6 futures-cpupool-0.1.8.tar.gz
-75f3c19d3aa9db42909298b207564b2df40e7e8b8d54ad18972a833748942b5293a0edb881de894b58b5210c870ad546752c200710c5549144d11a4a0d7417d8 generic-array-0.12.3.tar.gz
-5515ae6ccb0f03efb783683f46cfd1755342c4e83bb673ff8914c7f9dea0dae333f8d9703865e992659a359067df0e8b0e2253de0d4b0c7707cbe7d73401bb1f getopts-0.2.21.tar.gz
-0577f21f0ff01154453da92dd125c3bdea12a2bb2e7f5581add4306e28dfc448a0c084e9e64a0ef1da7baf8415965ea4ee32a5ef38d5af8ce4c6addab3cb0518 getrandom-0.1.12.tar.gz
-e189b2c745a0abd3ae1803724fab6dc36422d7c0fab760de40856f82d752096df875d15ba8f1c3dba6bdbba811a484babc4fc8bc2422c7998918dfda70387c1c gif-0.10.3.tar.gz
-87098ffdbc518442995c422120cef71f83069c8f88a1970ecec5105b0f284ddd92bcee929f5c230d5b90ae1ead7e1214c3eea26f4a8b26715a00c1ab8b09bc46 glob-0.3.0.tar.gz
-b9da7f4d67d4269b0b3564d65904c9cca0db7df6d33255f6022eee614f0ad03f3dc6f9e52e52fca7461308d9f01dac1f3588baf87aef735c266561b1119f9985 globset-0.4.4.tar.gz
-889445498d83d9fcd4cd91bcc6bb72a476f4bee4f2cb74260abff2a8a18206583d883afb7b9e8dff83b878d9acede81ce12c9f81bab3b93ca0f401e2681d724f globwalk-0.7.1.tar.gz
-37686cbb102eeb15de3f76d0607cf64210b11f5272ed83dbbb145650fbf11916027be3acb487cbb3e02654469b9f78167a7f18551f39af142e659cb149363d49 h2-0.1.26.tar.gz
-96c878d0f9dd70eddb14be2c42df955956a334e768a021f6e14369244c9b0f199182566181d4cbdf137adf040f5a397a57d9ab3d503470fb3412f9edb44b2e01 hashbrown-0.5.0.tar.gz
-134722192c46fd64b38d2fbec3a2511c560916e906491a72c4ec9d99b9f716dc58942fb99cac99b9a6ef2de5b5ad1d1c1155f292d091401b6873347d80c086d6 heck-0.3.1.tar.gz
-1b822bc6261cda2a52518c625790878eb4592fbccbea72b503da42322659b8e6c95ccac442753a6cf1d5d612413679221650e0c584bb06162c3b1c89d8bafb02 hostname-0.1.5.tar.gz
-1d11d085ee333b28fab8a5693d4eccce29d81bad08528b19f558a16b0ce19b0cb34ba6cf3960436a4c6057554e658af0732b5cb1e06b00559ff30075f0df2ad9 html5ever-0.24.1.tar.gz
-850145ca90272d5f474cc9998bdb173bd94a2a16cb08383815d30d9eb941b9fdb8b0d1a342a4c24bbf94d9e63336f4e10b2b95f5dcaeb26392efeef143cb0726 http-0.1.18.tar.gz
-b1c9fff799f6581160ef232ceff82a0c222a9f1ed3ec24760fb6b156d42739e06512086e4819323aee7e19b1d0b30ac8915f775f9c36d63b4f901546d331cc80 http-body-0.1.0.tar.gz
-97ff294eaf55684412d4e5a00c4077bd517fb1d51c420231281af09cc1dfa65a64adb4a18441db426db41cca91bd7032fbeb9fda02c1b0343466caa9dea8d457 httparse-1.3.4.tar.gz
-dfca883bddb8562e7538522a560624bc98a53fc8ee712fc3e023e502ffe85ac7bbcd9a68a2718331bb206014dfdb74445bdab7d4aefedd047994219ad1b216a8 humansize-1.1.0.tar.gz
-2589bfdac96108951882b7ee497528b9084ddd344a67914810ea9961a1e319167d5cab959c66cbb26e398e75ca50d488a251694fff35f3c2f69a88b6f22844da humantime-1.3.0.tar.gz
-40f3285b4de23ac8404b191a44a78399ed3186d9e6abf77d759615cc4678292411df798cbe4c2d5405677cd5c108468c015d6b42fd8d833484f8ca9c1128f68c hyper-0.12.35.tar.gz
-9179878b95e8e390b17d45bb02c24219066405f671fddc4e044ecac0a00646e9ae03e7cda31b0f6f7beddd8fbccfc873d28d52e6b46aab2d252a2472302a483c hyper-tls-0.3.2.tar.gz
-217bc49f667242bd89eff708fef395fd46cfe3d24440bfb76869086fb93805c4f49d718251fb1c35ac40d5588ec98cf8b8b516fda53d6d7fd3da1ab04b0d173a idna-0.1.5.tar.gz
-375d6d73537a5c9cebfc850a2b561d57e748d80059ca27fe5e35c058cc12a5938cfbb39a76cfe57fbe589f7e36f89ccd91ccdb8899458c322e277c299293bc7d idna-0.2.0.tar.gz
-ef4b3f58bbdc3b5317a14244494ba9cad8e3d062f0c8e137dd2d33572dc8a06b20f59860aabafccb729dc682134aa4e2bdaea8c07b351aa73a8ebb00e361ceeb ignore-0.4.10.tar.gz
-3a4b3545e133616ccb9100aa0a11501e708da41b909b0407840cb26d834d13463a9021cc7662eb1a9a5c3361db7f4771b8397bddbd4223bcf9196ed46f892435 image-0.22.2.tar.gz
-de0fa70403f5874133c0b9c97892ffa65b3adf4a1e307fff7039e3a37be0a07de5133d33edeb4d1ac9791b6ead7bffc53f2cf5876a732fadd58977d6d36bed38 indexmap-1.2.0.tar.gz
-1392402f72a8463dc5cdaf815d8933e8dfcc914fb3a91e69c38e54deb7d55b5211e157b640b7cfa999400fb4d2e233a4a1a678147594dfa0be300894126d17f2 inflate-0.4.5.tar.gz
-f818c3a74f2525ae9e57e5a0f1625ac0b86a567f8e8ac92f93836371ae818a05b3ad92893f3e080d2f0e0f7d22d3f25ecb3de5cc744daebd8977301c9280b64c inotify-0.6.1.tar.gz
-82ce82277ef2ef05888aae3a997461515d340c7286daefa4f54f7942fcdcbd1e29fbc60907ecdbcb00139db36462fb3c21ce64b9add2b785826adfaa54216a66 inotify-sys-0.1.3.tar.gz
-3e523bcb8b9891be66398f44c97933d246b7a7fbfc4f315bfda6cdb22ca2786ccc82139ee1b646b4c24f6f50f57fba38f9b1fb7c75e859722e9e9c789b458223 iovec-0.1.2.tar.gz
-b9c2e23476cebe74ba1f3ac15404a5c336f1d85c1320ef802cd4e3b23b8274855ee42545429c110fab88bb925799375753be3a2e78638c50be5f32666327691b ipconfig-0.2.1.tar.gz
-f5e04bd908457e7592243ce64a99c5283428b767f4cc17d77946770411b06fccb0250625263c3e84a02a018ea7e8a0e4216e1929a71988bab8e1dbf603d3801d itoa-0.4.4.tar.gz
-9ae7d8add326e3b84f28763980499fc6570193fc7d819adaea0f396957505fc74837409e8dde023bdecb859139ba735b0dcc212e7f22928735c1862ff790120e jpeg-decoder-0.1.16.tar.gz
-682bc7c629aefd035966a2873518fd60719121cca7d63d89d6c97ff5306f24d8b5055a3c91b4eedaec22b1d5dd3fb8b48ff7341a05bbd72d86e06c422dab473b kernel32-sys-0.2.2.tar.gz
-54a6c7d1bc985860c194c842d7b5ec731d0e06f9c77ead8cb0156bd34addd957d0bbf8b6a9dfc6bef5ea31e39f84ab447d1ccec3c178a6c18c4a222a51e1abc6 language-tags-0.2.2.tar.gz
-e124c0521ec7c950f3c4a066821918da7a9c6e711115d98009ae7c351928fdddead852e7596fea5937a9c30e4e4ce8eee7099b20248b5d6e3b2494b6a6d88cb8 lazy_static-1.4.0.tar.gz
-de74ccd6a3c32c360a12a51ba1d51d6530130396b37d63350a960956ae0ba13e9ac31e2bb70b61ddf055fdfbe7e559b20a38415cac3906839684905a01256ff2 lazycell-1.2.1.tar.gz
-93c178429a099606d4d61576d74204e87c042c4591b8472eb56eb3ddee883b135e28be09ff48e2718c4cdadbfc641e3a313665fe493d64b1820a7e6018f79d1e libc-0.2.62.tar.gz
-31976e14355317bab470e6716542d3cfd59083a1808bb199dc2eddd51d05fab122ab054783d0996c1feb53bdb316e6fa24b34cae9ed8e8cdb2702bc43fd805eb line-wrap-0.1.1.tar.gz
-74861f70ed09b119c6db1b0dc7f7c8c3483c2824955bf88ee892b3a3fa1a54e9bfcaf7fae0cbc4792762e330584dd347532532e1a0e8a8bca222b5cdb2c7cf94 linked-hash-map-0.5.2.tar.gz
-e6049a8a840c11f00b6505dc9d01d1f759aa7bee47520f86e36caf6c52ca476236b09609b0a5cab0f4c247a40a4736f8fc04cf26fce0962cbbf2956ad4adbfde lock_api-0.1.5.tar.gz
-2180d07e06be22c02e4133b5436c4805ec791865a775a5deb7bcfd54130cb759b02a31e081d082bed418b066b9bcdafd36edcf44b5ac58120d1a6d2956fd9bdd lock_api-0.3.1.tar.gz
-0b71f97d5964134b5eea1332347e177806b2f171d0be5c410c0ff1539470b242ba9f0933fafd853e4171a43b5e373a150af18918924be431c7216022553a8a3b log-0.4.8.tar.gz
-ecc67b4b2ed8d3596816c47e9c6aa242c7bdd1ee8087646e90c27a60d59175f661ec3ef82058c196bef2abdd302d429b7ea4279169689254a9f322dfd5697bf1 lru-cache-0.1.2.tar.gz
-4f62b824a4ede1be1618e75734d109202ad85dcd219409412868433e92513f4f1953a3d85b570d5195cb9b6fcd7af08e0a56a9f1f4daea42d604b37f1218c2f2 lzw-0.10.0.tar.gz
-dbc6def04c482911ace311f34be79992fa04042c7ce36b71459b5af5c1c43e9fa66b6b40f63f8c3647daba287bf1c1be9b1a8031ead1d855f99a988898c96f1a mac-0.1.1.tar.gz
-917b5cf665e12b687035c895b60b2ae05622963f495f5693515fd24d56f49e95a06ffced68606d061bd20822c655100035930673fd4b0d4790168763b6961a9f maplit-1.0.2.tar.gz
-ac321105b4631c7e9a2f987d0bee867effb8f86962e8d5a056b6009ea596389ea87f7f21bfc47f0fbfae24e8ae4e6e5e7a510f3694f677dd91d56ebb728cdf4b markup5ever-0.9.0.tar.gz
-98b58f6a2694b03a7dd1be69ebf7e3ad14483fc8e4cb6e6c26a4937e4e660e843efb4dd04a7312dd9659ca02acd3775678f73b8faac44a76ffafaf873c22f590 matches-0.1.8.tar.gz
-0f5e11507a4235edaa8ef639753abf62f1c187c8c6e35b0c80c9306958e41893492d4995e28bf28e5710e8739c7e75bb75a515507ec87870741a3b426ba8f44d memchr-2.2.1.tar.gz
-8bd14c74a65464061acc5594eb108e630e8dd7a9dedccfab0606c255bd43e7b30241ba0bea11bfa80f9afd8fdbf0879ad7d998628f938a558716ec10da31008e memoffset-0.5.1.tar.gz
-7079ac27a2a7c5534ab8af24f1d84ce78d9b3906a56107198e5ac43e7b6cc74a980a38bffee0f988e7b4a9b8d3bc052797bcbaecfae4c9470073ac34674f6471 mime-0.3.14.tar.gz
-c4d83d8c05b1173c531eea48073762dcc5e80efc2609e06dfc1413ae2f3a3f7d89e533453aeaa75182a8b663c51c7ad0d4eb0b5b4450afc8e11fd74b84a9799f mime_guess-2.0.1.tar.gz
-e00ab08d024806ffe68f8d9d0404bf83e62c58d04398bd8b0f8993a6c60a38fcc3a50189cef7a699ad7a93682d9f2353a31f5596d62a72c5f6560d12cf0c0a02 miniz-sys-0.1.12.tar.gz
-ea5eb9236a8797892f0f4bdda07c37cb8a6e48cd2fa8e81e2a07c13961675688307f77533e79cda65a72312451ff46b31cf167507456e4186e2b19a86cf14b95 miniz_oxide-0.3.2.tar.gz
-a6eeb93a34a4a4d486a821763cf660d6c5d3dcb08a7f1cd32a04d918d5196cd50cc29b30c5a97eeca68ab1cda50bf36a50c2c787e08ae3d2a2b9134350acd097 mio-0.6.19.tar.gz
-743fc56546d8bcb09efecda0d60007a175a2db2a75dc882b21fedeb8fc4fcfe98ac0a6d55b0e843b088aac4e24e57145d96b372cdfa39933efee2514ba2ebba9 mio-extras-2.0.5.tar.gz
-fe16c8702eef599c2379a2b72a0408970c3318e240d6ed59077c7fcae142bfcda4d9e342e3185338671b82719f7c2ab156bb28a54818a54c249216dbb0f8bb04 mio-uds-0.6.7.tar.gz
-b2639b1976274b7a01ec3ff7fd019087775e3bc5365101b24db480bf9c9b66e8a1aa34405d44db6c2be753265a5124054eb37870b84cae2c63fb6b36bd5c6d72 miow-0.2.1.tar.gz
-9964d627c922261ea730076a2c8447784e0ceebd8e6218f5a61093021f10682c2fa25815c10711831b7d41c84b7c77cc1128a663669058882b0af6d70ac0bc09 native-tls-0.2.3.tar.gz
-e522b399071daf1a9b913429e2eee52503d9604114feaf6987e97b85c128246b9137e3dcf03f45ca93d623ca6a4b295c9b703db4c319af47498e07d7714c07a9 net2-0.2.33.tar.gz
-d12686d789b0c37ae0b05881223b61737fd04092f10217caf4e6c9b8604e0a7734c9ff81b01ac204966c687481758b4dfaebf3b4947736ff90291a0dbfed3caa new_debug_unreachable-1.0.3.tar.gz
-c6393f47cdff2134cd51ca3d6becf0309697a11ac9956e3979a2d6cd00a86545d1af4efd63f6d5e417a80b2d9b247a7416b7182156d9966e00c6da25a3bfdcb3 nix-0.14.1.tar.gz
-2648c0aec970c99f001dbd8169939731610ccff6433acba8c71c669bea5078613b2a785d3ac5ce5a839fcec714b5bc55f2cc83522ab4cc09560c846f4cf8023e nodrop-0.1.13.tar.gz
-663567dcc6310ecd6446bab1eb700f4ebe834a3b25bc2a0054edf14bcf205a95128de5f5dfaab04adb95e1a2241d487d59c0e23c957934a0d656e4c51932bd54 nom-4.2.3.tar.gz
-2b4be105d216ece418cb52239f150cbf23b21b58acab6298fc2b57eee4b37516bb4e5fb8624501da61a540bfad5a97ac1e2ce74c4812cc8dc7c73815f1150d35 notify-4.0.13.tar.gz
-63ec8a69a964fc7c4d6286c04503fb77acb6e3609237b3b4619418c06b11e96bff88e7cb10898718ae690a187cec75c8b96b9c3d524e171ec1678eb457d354d9 num-derive-0.2.5.tar.gz
-f979ace06e3c109e9b5217a85341117ad12bb6e8da1b7ad799d91a967e3da1eb785fb114294f049ed8a2022cd5269c1ff771bc319af3da0899df97a1e412297f num-integer-0.1.41.tar.gz
-4f6e94c4f5e7ea1a95d76a61a4be4c5ac3b3e8ca0a2271b721c265881e47b0454525918aa207bcad738de8e19ca7c5e5c915a1c4c158d5c9c2e68d05649bdaf8 num-iter-0.1.39.tar.gz
-cbe0dadf88b0704543005c96e2bac7bf981a90dabfd6595b06ee21973acb304591929dfaf51b3e860456dbbb812e60c5700a4793b46214595092f4defdf8159b num-rational-0.2.2.tar.gz
-a3019e45744245837b2f146ab4213746c93a1ad701958dd418272af89451b843f9b643eac673c1397f6079da7709c7e9ff46e0e829a4cf6092772c9d77bbc534 num-traits-0.2.8.tar.gz
-f1f7408dc1cfe7c718928d8e3e219e3001ce4207467a0a129546f2729ba43a7bf334cd5d328a7f8f8b1c276382c8a0f9d7abf60a3ae2c32f4adafa96c6ea62cd num_cpus-1.10.1.tar.gz
-6c8e06a9c2f0aa130df2e3ace50d3b24b8da6906ed6dd153d34cc2036e886e8c7848dd3861218a8981aeda30813c9c86d7d0b5b98eca20bda4632b56ae6d67c5 onig-4.3.3.tar.gz
-676884bf338fe2d9726956eec5d26297f3eba03642766ee3e64d7e2f5a945d6da93521c19c2c11881b5bb2785f24e5e91febfc08f12729fe58d74e4494f08ae6 onig_sys-69.1.0.tar.gz
-7aa44aedd3fa5a6ed3d60239c23dce4cb7b27693e110140e6b332579bf1c1b773244f12271ced975e53caf68f3f381a7edaada573efb982d2e13d638a3a6dd40 opaque-debug-0.2.3.tar.gz
-2dd2f5e018fa4089a79a24d8535b4a9d87c80792170083c2469f8335eb89a8a2986979296694509288f878ae27f8d3f690c4133bf0e19d12179cc896dbb9e3e0 open-1.3.2.tar.gz
-2127ff5f9b8feb3b567362ea9988a125f39e524432c629481e5ab27f08e2bec20147fb14bfa2d10cecf357fef5f6d6447e8d045f157bac7c1a4e0175903e19ec openssl-0.10.24.tar.gz
-4001eeea5c4f859559475b4b1df8248611bd44273116b31e7ef775e02918cc989825989868f331f0f0e387787680c1e4ba721ac0fd4695f7363005ccc0815d9a openssl-probe-0.1.2.tar.gz
-814febad99cc74eb5fee60d58d685b2c956893db8f3f4994a6f5226261c8dc8ab569067959aec2aaf3fc684eaef6654f102a1f82a215e42b4a087c357693b6a4 openssl-sys-0.9.49.tar.gz
-51bb1cb259452f7395bce0ac4e7d2d6f3733dfe7a8a1a46d50179516ef921924f745a248e4816da5e434b589b5956a20ca554f9a93790b2ed1c55451b9b885ba owning_ref-0.4.0.tar.gz
-d83d3c457e15ffce500d4fc82d0b9840ea2ed36d43d4eca841b05b0a9ee73ff6fcce07ccc3a6f0d06d950d7beff85db0c3d13dc1461adfef390d6b3d85367bed parking_lot-0.7.1.tar.gz
-148da5edc08da3b27bfcc94a1c0578f228ccfbdf7a7a6f3aa73ac34e290d795f4169553bc7c2b20227e095e8ac75446db51979b595e4d77fa7c76f743138a331 parking_lot-0.9.0.tar.gz
-25c0389e9d3d88725398fb304d3a4c20a3da0bf0d67f12c7cdca38f8068dc6ea7b57341579136cf4792cbb92fd64dd33cd91412463f4df8902e1b8c87ca08d08 parking_lot_core-0.4.0.tar.gz
-5de5d9cac290d7d6e6a3e1fbba2784cce8b4ed163481e1cc6ec36498884b5e3cf0225c718551289be164d1a4e192de390201a083560898e4a42a4068661c0689 parking_lot_core-0.6.2.tar.gz
-2344f2a14ea0245a4bcd1face932fd2b993349e9b81556821cf6edf1d85944455ea5bcdf521e0916a46175b5cde9a7d0f57ee48f5cf9204f98f635f7f3aaab22 parse-zoneinfo-0.2.0.tar.gz
-6e884d7172e8cadcf6e39056c9f92b70252f56a8062af0e792179dcf990344f47553c04e2fce84841f20f5c28557d7768727f60c862b9876d29cabffd4ad19e9 percent-encoding-1.0.1.tar.gz
-98af4dfa7c6a3cf0d5aa929c436f9eb1ba1b576a944513f1284e6df2ad06be7cab9eba145d888d50af88f8c970bacc702b323041bec6d4fa1dc34095186c628a percent-encoding-2.1.0.tar.gz
-c23624c33c986823d22b685e7297afb506254e2fc1b05e5a87e9b7f8c3e9c898312116fbc93517be5994eb1e3b9bbb20a479f8c72010873b790ea6cce2129a87 pest-2.1.2.tar.gz
-4d554921b35b6c2491f56b859d389e93459552807df6ff989f9913a9314171e5b6eba93cf7e03528973d6025b663cde7b841d38fabd8197c33beddafaf83fbba pest_derive-2.1.0.tar.gz
-bf9f3912e99c5fe341d423afadde830abb0125dd0c8485c591e465b88dd047de273b1f185d417368879a3dc80965f13d6262557e8c158f357babd0587bbd5b62 pest_generator-2.1.1.tar.gz
-b84b1faae2e56502e399c0d1befdf7a8aa458590ee7354ced0c785be64ebc59aad4c5b89f6715335605897ef0f03ce8675eca268c7f983ad831b8b109bd62c36 pest_meta-2.1.2.tar.gz
-0140e9acb7dbf6ac2d17110e8efc9ef515e2f54b1b3b213d98507da6b9e9e3eb0995173c69b31c34f536ca9b06eab108015ac26d2207af79bec4e20d19d62e44 phf-0.7.24.tar.gz
-2f01538937b89c0bb3e4f779b4347ae0d0515e6a99a6692a57898b8c97e33a02dbf918757b95800333cbbb60748593471e40260b767f8b87cb48e2a23a90d664 phf_codegen-0.7.24.tar.gz
-793d8d46fd2848f165099324ba36d6ee074a54e1c20236afa5c5429894bafd23740d1cb41f00b87e4d21fea1f78be7151ace7590e2e7cbc906d565e5eb7225f7 phf_generator-0.7.24.tar.gz
-5d46e738eb9afa2c77c5d123ef47dc1f7ae767baa043cf3a937118faa64696e714dac57f01861bf58a39dac67048c55a301dd24401cbb1976a7f753873e49cca phf_shared-0.7.24.tar.gz
-13431f3f8cda05615c91be2fcb8eb2fba085b46df70c5dce773748ffc15f0b48a45858aa69c37c173ce6353b028851f94f03ded58649c641e66a1c1a65b60572 pkg-config-0.3.16.tar.gz
-667de29732a76dd6d7b9768c3e58edd8c21e62fe5dbbfe9a64a37de5488640aa42c04a8683596eee9a58b02dde1cb0f10e3edb9fc48b3d93e61dda0122357162 plist-0.4.2.tar.gz
-dd7d4ab9013196575f468a1b2598524973d031a3854c5e7954943ce21bfde4a6a9f7d373237063afc6a4a942ae36e3453f4d12dd1852aaa01e43487e87d332f8 png-0.15.0.tar.gz
-281ea3479c4a8996aac643b707e75ca0a079681b1f182a074de0d9989ff9f1df6922cb8e4152af76025ebb4c2d00e6889aecc2a4f0fa66531eceb732aef62243 ppv-lite86-0.2.5.tar.gz
-a118a98286a47e2f0cf35d2678d0325c18b9b7d5bdf40ceadc16483b282307fd1498434d5bdfa25477a4f420d97c34d786e42e9fa70431b788b4b8fde9718e05 precomputed-hash-0.1.1.tar.gz
-73a8de3f1d76a8baf2d45afc1497bba8c0cbf231bf9b6750b9cee2473f492d5f3957ac149998da720acc8287c96d604971b51dcdfa629523bbdd97c297856ac0 proc-macro2-0.4.30.tar.gz
-e81800f46b8f0805d10a614848603dbee19ad24339c67986496597fcfd501c528ec4eec081e166b38283b3e7d64a0c2bd972280407ad30e388610b2b81594f80 proc-macro2-1.0.4.tar.gz
-6ce7c1e37190892d454f9b858041640eac6749a392264cecf6a64696dddcdb038a9b81b580991aa0727b1b015e05e0b7582baea17b82ed327eea30ca01cd555c publicsuffix-1.5.3.tar.gz
-468cf46d0426fa9f2c5b9fdca60ca1c009d823fd1942e9983c9d5ab8b4dc47d455ef8342e41f19664c40c7379a0a9dad265381a6a5f7ad03b298cf37d06e71f6 pulldown-cmark-0.6.0.tar.gz
-f4ed283635e1fb72bd30929457ac04b1b79c36b4b08603af6266a3ea6e18f12c834cb88ac090e42bb869c8a608f7521812de81932a81073a34f16fc882c6148b quick-error-1.2.2.tar.gz
-bafa9ba42ea6ff2d6df652384485c58327de6eaea2832423eedd8ef8b4aace673c23b70f1f22106515ac13d7f625cb8b1a5e8c4388c1701ea3cd86fb9ac3056e quote-0.6.13.tar.gz
-67778dff9dc5c4edcdd6454b74ad9353bb6c0c4e51c16cb82f2e393a7d7a0cde084d3c93279b718a8398c40af0a9377ebfae5321e69e635efd8390c125b75ce4 quote-1.0.2.tar.gz
-2eb84bed29708b8ba109f4329bf6f1cac6caed9d91b2aaf185d68dd2eda73d3fb7be2897d0596fb28352e799ccf92c161ee44599d5cb426ba9c3b8c747831904 rand-0.6.5.tar.gz
-d29d10e9788f0f44b56b2981aca01a115eca1018e6afe2428fca088cc9432f27d014c6f1f0c819317052f4c64a9c54cee8834eb08e081f292ad65160dcdd014c rand-0.7.2.tar.gz
-200d39362ffd6d91cfe80634e951c7323a5df8a382c91e3afcef1ecb143a16dc47a17db7f1a746b18e4ea8bfd36bc31ceaeff6d0116e166f8b34e4a8530b3c1b rand_chacha-0.1.1.tar.gz
-30933fdb94ca8d4bf040a7e08a42944a0d7c2f3f6a9a3d547e74bc32f922b0eb79d85afb1f6c85c78dc115170e70bdf96b36f0478d61ba5651876d5350ad18f6 rand_chacha-0.2.1.tar.gz
-5a7ae601124502bede760fd3179c2b28059ebc3b5983bfcb6b8fa62fb58df95cedc1aeb2734e792d894dfa4620801c13c29702f9cbee64243121575d4b6b9114 rand_core-0.3.1.tar.gz
-f7ae3b690e2cc1fbf2707ee04b752bc5472433f737ab581f9872f7c5660966bc6be45f0c5d2cd8771105df6d4a9d206c55f5cc6ffc1693b46e1ae03a2883b028 rand_core-0.4.2.tar.gz
-4f7500b35e165e6c817fdd67a50745d5497d24e554bb554705097e37258751e8755c4d6b8a69fcb5e1977708ba78620bc35d640e4e018fcd4e88d9dbdbebdcbf rand_core-0.5.1.tar.gz
-808d8c167daa66a2608884d5d3f1444cdb21f8ca1c61e59fc9bdfb506a634ebb22c0143cfc0574e15313f82559fd2d117a46910eba3b4eb7e0052ec280f5cd2f rand_hc-0.1.0.tar.gz
-bca185612bed5cee4da76fb68fe854105da276f5bf2da464e596d586b925df798cc692ed881e276ab77c36b4b0551930966c93656be122ad05899d87853533b0 rand_hc-0.2.0.tar.gz
-9e8f6c79abc53352c971f8182dcaa7979904d5649eec9008262bb0aaf0585b4c4817351cd80ffa8d07f172ff4c82d85a09ef2642a08f608fc6be3e246ed7f82e rand_isaac-0.1.1.tar.gz
-fe3791612cf82bd0ad1a115c442b4a007141647eecd48f49dff9a5d326c374663d9bd2e511c8d292e1dba44665359b522cd5d57ccd3a18598e88e42ee1670e4a rand_jitter-0.1.4.tar.gz
-01e81a692b78df3b2bd65bc285e5052ccaf208c7d0ace414f251db4fcff7f9ae1502ee60ca5745c95e778d3d5efe15fa84153c17c422b6b6bfee829376c14575 rand_os-0.1.3.tar.gz
-6bc684778ba60c2e48793d4759b40cb0d35b0bc20ca0fc39fdff7c3f8fe9082dd7b5d5f26a7f17bafc6f3568924eac1bbe45820b1c2b09c91731ea5487d76d9c rand_pcg-0.1.2.tar.gz
-3205499ed2584467dedb4641a48f3ca8fedc263b1d9431d36a251af0bc4701d99ce4b5219d515b9b24210dd3ef2faace6efa886aa50f361e07f53dd0fb0841e5 rand_xorshift-0.1.1.tar.gz
-351f7ddd2600001ef9655f290b743034402a56dcb04a25ac25afeaa549da5e399a8be72cd318d3d4a558d1a190bca7ce03386f3320e9909db48d9d1152154a52 rayon-1.2.0.tar.gz
-78f231633fb2382fd38a89b967f5a2f38e611293a19db342039e63fd0c7cffd33a78d18b8f0788089b157373ebf20eae0c88365be9668f48abc3a390130be36c rayon-core-1.6.0.tar.gz
-6476275d124bee28747191471e8d8f321a3b1c148c1f2a7ece4175f5244a7de90afe5f99d2eba5244d886b92e38232398864bf90e6d434b09494533942c8d894 rdrand-0.4.0.tar.gz
-17a3044327aa733c830dd74e210d6bda32622617d1c5af9d70d7647232d8569ad0b04ccb14042cbabb5d97ad98e3f1f5a9968a75387354ffb4d175e9577115a1 redox_syscall-0.1.56.tar.gz
-6530767ca2896db30599e5b3e2bf46a785d9c95bda3e530e82c659e5a98345effe5424738fec7545fa5edad12729a396938a9c1dd3a680c0405dab6000fc19f7 regex-1.3.1.tar.gz
-41ad4ad05b0147e663f63e4bdab8281d3dc15f76663bb9eb3d9f6a230350b71e7f3f42bd18e6628a7cd971655a6b13aea2308d7f124bccca24d01ea9ed15d61a regex-automata-0.1.8.tar.gz
-671e4ecd9dbe58ab5938e0b55890ef0ab2c033221bf549ae0df3b6e831b57099b4c16f8577ca134a758999a1bfc0840aff49be138fb6a19e0b081089f66fa0ec regex-syntax-0.6.12.tar.gz
-d19a45398a93adbcef9f233f6b3eaf4a63ae95f5bbae00c880b40c5edd34449e7f798ebcd4d11843c68ddfa15e11bed21d434b224e4a175dcb64ae011c13c8cd remove_dir_all-0.5.2.tar.gz
-c6683099c79ab48acd2b7abb903686f64e985bd239f3e348a7c6f80d248e3f2860d7f8eeca768244c8925794e96f6253d786e91d94b926bad2581f22f5a824e0 reqwest-0.9.20.tar.gz
-5065fffb8fcc6afb2c42ee82cb09ebe879605e6ef2a6f02decf4892967730271bf4e798de02fdf37b4b55b0610f76689ef749ca85870b6656669af4cfd859473 resolv-conf-0.6.2.tar.gz
-8f6ad0906f32259af6a5877b10432d6bc001a60dd094c93fa89aca544dd1e061f55c484a4ac524510f634b4a3491e170dae0619dd7fb5da11891d20fcd3ef0c7 rust-stemmers-1.1.0.tar.gz
-36a63a28a72c710d08524adbb7d11def37db23fe123fb6ea848623b4207c7f80d8415bbbe951488ceccfb8f4f1cdb66a8edfc4c0eecdaa62c87df9e032f4c063 rustc-demangle-0.1.16.tar.gz
-01fa7a758dcaa4f15c18628a0d5ee5adde5ade96a8b7dde0908e39e27b290d1e9adb20d44e2adcd379341d2d4a0c34a80dc12553a3bb4efa4758988f28989779 rustc_version-0.2.3.tar.gz
-b5dd360611fdf76ff13d377c1c79ce09a4fab90a8b7fc917a4424b8246c8a0da7d3ec515b8c69b695d936b1207072d173b9f40fd5cb218f1eab947862112caf0 ryu-1.0.0.tar.gz
-6d886d8b96ada623436586ebbbb84d9eea34329bab3164d915a47e3e4de00b724928c6dc224c88541aeb0715de633d129949e7bcedcc2393b348a2692451ddda safemem-0.3.2.tar.gz
-33be985579210b64eed7e26f24a695e2a59992ae51723e5aa026ba34dbb05be4c377bb25db9797dca1f70aa4be58f33cae32a89b61fe6b9353de9fb902ba2dcc same-file-1.0.5.tar.gz
-6932f30eaba7eec56783e0b976fd0321666a182529b604a2f0c8b7ef00018bbba5d93ea487d674d1043681a73a8b98b808255de6bcb7474313dba671c1afadbc sass-rs-0.2.2.tar.gz
-dbee75ec407fa2065786cd572ceabafdf1b10ecfce5d21067c2834e72c45c6dfdd1f5d29f2dc1c01d14d9d2da6f433aaee1c18d088682c308cd678254cbf302e sass-sys-0.4.13.tar.gz
-11bb68e759e2ac0bb57a214e64d86fcc49903dc70f9e0582ac4bd0343e94da44d8d34d22649ffae41dc975b4390e7d10f3adcf79d9fe8c9fc95c747c58947b2b schannel-0.1.16.tar.gz
-df8034b347fb489735895d75e5489c264aea1b50f46a8dd512963df05cb9ba9274317b26aeca63b9b4edcf792e796659bad435ad3f3446cb397340e2bf0a5f33 scoped_threadpool-0.1.9.tar.gz
-57ce8e32dbe342040a63ec65fbef3680d66d439f0f704c5d485670041505905cfc602e7e3580748b4b4a55ce892d17a453e6d2f853cf0de4c6a2082f0fe95719 scopeguard-0.3.3.tar.gz
-4f2ca06ee2d9c46e42ab4c72596bc7c99fb7ed8db8e09bdceec010de51aae21497151c01fa72ec55f3bdf81ce964ba682ec64ee96586c5c315a5daa8bcee0b37 scopeguard-1.0.0.tar.gz
-69b1e32cc4cdd3a069e9f1de08d6b5563a90e094e0fce07b4949386072632cdfa5ee7711ae16904148936dafebd77321160b28acce239f0cbd5547ba1d77edc5 security-framework-0.3.1.tar.gz
-28c731aba35ff80dedf73978ba18f47a80ed308ad6f123467ab435f825680386f665d06f93a5703b8dd0b6893f805f5ae6875a0a7c8669a478c71c69448b2a54 security-framework-sys-0.3.1.tar.gz
-03a2ea563456f812c301721c3572370fe4934a22db60079da0dd6ffa33fa789e5e2436ef09e62fc35e0b742b06fabc290992c74eed80419a353c9de9449928dc semver-0.9.0.tar.gz
-17320468ec6b9862d595f358d70c09ac6e09db7885fe0ead7a1e596f79350a6306e8bfde5bbd6512008a7c5454da1c7ae55fe1e3bc1c1ff02ac9df54c0a6121f semver-parser-0.7.0.tar.gz
-3b6e2f8fc965ae2055a8eea007b3aa47715fdbd653cd0af81ada557559316ca65d7f3c75c3c5db0841aabcb2d4336092d339258829df11716b10a0c14597c678 serde-1.0.101.tar.gz
-08a014ff70718db11c5e3b8420d2b31379c14004b55c4521149030a00c3a623a358c3442815e492a2cd28d6a32002aa1c828cae2b5366f82d68c1e342eba0417 serde_derive-1.0.101.tar.gz
-d09bc95c963f510686106d9885f3420b9eabba8bf32626597dafd43ffbe91ea72ee4a3fedfca922794a727214d73929970acced8eccaa23616cde33dfde9f842 serde_json-1.0.40.tar.gz
-9c4a82907619aa211a5768628ae1cc749980b2df267f325cc1457031720d4166edb0b67e2144324e7f655384000583ac2ddeda33f7ab995a390324e2ef4de145 serde_urlencoded-0.5.5.tar.gz
-e48b87717549d1b99f5759aa12b5c76507b26a6176a69f0a3c7297145b50b539344b43a827345096783256ac8053bf700505091c6d9d0e430bf01a990803d444 serde_urlencoded-0.6.1.tar.gz
-7446e7564b5903e588911008f9367f9d9b0d96ae883d299ee4f10ec3d7a30abf1af1bc9c4f2172226f09071413116c12a8a67419246f7a7de95e9fdeec3aacb1 sha-1-0.8.1.tar.gz
-32081c99a0cd5fd6e651deb711eb4c9a8bc71c12e26b25a72b2dba9a3286502e56b23d068a2899764ce1cc0c615c2c1b22a6c7aae63e07a758745b533e70ff0c sha1-0.6.0.tar.gz
-a92898bd08d9870b3a59c92342d811b7911891862f5e4ff68b1c75ab7ad34535eac9d2b4e84e8a654421c4fc602cb2143f78d30b20a56c581d07b3dfe15efcae signal-hook-0.1.10.tar.gz
-3947e3249861ef50d2261080dd47fb400fded19d5c8555c4bc65f10ededc7102c6eb26a299de961308310a9856d2a757d7a981a24e3bafa0cec72b55b515fba7 signal-hook-registry-1.1.1.tar.gz
-7bccf3a0c988da97c36d5f80518a5adaca58385f7000697cf10771ab246e88509746e2ec9a356122d25c98f0acd98eef97fb97f81a92959622ed51dff61b37d0 siphasher-0.2.3.tar.gz
-f9fd70d0cc5180393cebbe87fe984de0c103db1c2c2648fb7a0ee22cdabf37a7338fd511538f00e9a5564365cce2879afe19bf77c435870197bd6cafef5d6661 slab-0.4.2.tar.gz
-039fa1edff498b8db274febbeae23e7f1f7d83794572b8009f3da494cbafbff1716deee4fcc7be71d59bc6d94e70ab9aabe262bcd1fb278773012bb1a087cca1 slotmap-0.4.0.tar.gz
-2c85dabcca9400c5e2a3b409997403a6acb17357449df4ef9a7b27511c5a979bfcb1a4d80b7e7c36122233ee6d47e59507631dd6ac9e93d1610f54b9b160ee96 slug-0.1.4.tar.gz
-802b96283ac27ffa71ba17e8676c23f721cc1bd3b61df6f78a1c8ca9150d07e6d5db55651ba070f9202460019f59636871c1160e31038c6bf7ee21cdba8c5be4 smallvec-0.6.10.tar.gz
-6b29b2e4e36fcc165f658da5a2e92980713134d3b68a43b993e4f1cd049530b7c0a119918c4a9528d8d2be27cf8642fd8b6d3ebc2469ca5525045da56022a91c socket2-0.3.11.tar.gz
-ca224226d612e1c4eb178271cee0d18b44fc036959e528d720e33f65c3ecd7a40c20d32f294c029d0d7b74dc6ce57d19aadfe3cf02c5f894e94ddb3bb06898e4 stable_deref_trait-1.1.1.tar.gz
-4d7ab65f12d63065e895947285d5aa1b9003324002b0f657e7ded975c90eebd63c1033ae9a01969c42d446b0ea878571af62776bcb4a8834cace173f908c76cd string-0.2.1.tar.gz
-4ee532350e951ff1423aba00c34054653e2a2e6fdda8fe86d4052407cbbcf51bf3765288e581e6dbd7031969cafc9727267b2ebaf23750eb3e866b855b567fc2 string_cache-0.7.3.tar.gz
-59a92121f4e0967da13c6a2f40cfefb0451c734af6555f014dfd885ef8b478a803253f0c36c7ec95cd78032f2f50d3614daa3828cdc85e28acb6f588472aca44 string_cache_codegen-0.4.4.tar.gz
-1ccae53f80c250bcb715c3276133295f3543d0a8708fe4a990c1ac81a5c783c23d9e7e080fa7bd159397d0908f90cf1eb3453975750c121c1c36c80d3fd3cca3 string_cache_shared-0.3.0.tar.gz
-1d55a8d946cd55f5f37d06aea536549ded95739fa58c0f2da285a0041154c181f663682bdcac643aa198b3e762d694a04f058db985c62ebe22b5c16327ba6d34 strsim-0.8.0.tar.gz
-85eb70f7a514dbc7a69a4b002fe82c0787b907d37d3ce83e78b3f35317b0dccdf9f247f4b3cc7265e3f572d2bf9685e1f06254258f95c135e2fa26ae98715d64 strum-0.15.0.tar.gz
-fd0e363693bd34f0f8cd20d17a4fa12745e82b75de48d700ed5062312d202abba21d21bad434f22d4c467e9d6d3f8e4b1c5a7975aafed8418cc0c12d5f218f30 strum_macros-0.15.0.tar.gz
-c6c9b5887425e1e5fab905e477fcea41bba191693c471cf26922a9dfdd59ed957155a399406cc3723933a869565e7295183dabedfc34e3e2a20874ba94c7ead7 syn-0.15.44.tar.gz
-4cc18966040b1f86916876aa5ad8029a126f7ab8db55408b3f4bc343dd82dc357899dd4a7afc514c65fd269245f8850f8f2834b08bc2ee6cf6774282f75feadc syn-1.0.5.tar.gz
-48da0daf778cd18547e51a080f1e86149534527f20026601b21423c9f89cf6adb7a121b01dd9bb0b680403eb728a92e75242e5ae31a725ea5b1f19c5f47f0458 synstructure-0.10.2.tar.gz
-5b684a8f50f56b3f2a69fbde0623835a6a0ff44169ec6a558d6d0f702eb0921894061d9baf8edf9ec6802d7623f9073df365e68b4f33107bbb93807f32e4fadc syntect-3.2.0.tar.gz
-a87ee51c36a81a8a8eb8f091eb57926682f38b707f7f641332d8752170e6c139a656ae49c6861f51e07c2fab5c86cc9b2ac158f5d89c6bff15d18934dd4e7ba5 tempfile-3.1.0.tar.gz
-d94ef7c124d65317438de67e064616511df5e89081e3735982b315df0a8aab319ba16dc3b6513b1f92e0434da3d7aabdd9caf9b7ef28af9d84cf558ce662e693 tendril-0.4.1.tar.gz
-f31003a25ba0f51550bba2f1ce88720098a455c81907c4a86b519bff33e09869e03558a9746e9ed683d4b33b2a7703417bed470c0a1902cc12ed54cd2ee4bfd8 tera-1.0.0-beta.16.tar.gz
-d729ef6da68be8e2ce19ef02336193d8baea97a28cc8789806587da829471222a0c7669b4485ef81b1d52e85096d787dcfd4f064c894904602b595aa024fcdca termcolor-1.0.5.tar.gz
-f5c0fe4f28ff1a3a0931e8e235b5157a45f67967985bcc752418c5ec3481fca44a8ae4800088889b37e8cd0533f53d3c456d5ffd19b767b3f83a87b49a2e209a textwrap-0.11.0.tar.gz
-cd783d3d9caec43868da1f6118d4c4d520e03b9f1049d8f15d2c12482989401d3aee748e04a149953d35e5d6487355c2891d44569ef688bc1d45f01b6461d253 thread_local-0.3.6.tar.gz
-e46733ea55a27a32868596562bbaf1e50508dea58359006cabd160b06cec4854c97b5d253cdcb8bfd60c7b3a33e496bec4159d0621efaa3cdcbc77255be4f275 threadpool-1.7.1.tar.gz
-1b6cc0da94d8b052448674ce3a9e72cd41de87245b1f6ac8aa900d61f3b99bcf0d455c513f7e87da14db4519368c7d725596e151a9e81134eb8366dce7254c3a tiff-0.3.1.tar.gz
-4df662212377093b0fd8fcd88ddc30b20a8af7d989c2e100c0cf64f9741e88eea6e858e1aa4220be6b76b0cf8b62c8116b492010d74d1ebef197c66aa130aa83 time-0.1.42.tar.gz
-d92b8527bbeec84bb306686a7d29b705c36b59e9c0995154ed95d483c84952c838691f8c11615f481abb6c4fba470ba8968860a74a88b77dd67ccf659bf4e4e1 tokio-0.1.22.tar.gz
-42f5db4f9ff1d0c6728c9ca899b85e40eaa92910d23f01dd7570c5988178879f3977ee2ad14f0f224562fa73ff8b01687dc963def2c62e93ac471903d5ce4e81 tokio-buf-0.1.1.tar.gz
-9c868545e8adc234a51b81966836b786019181ea25907bf14887ce26ed1cf5866f5df8898bbf6bb7c8d3626f145ce0465d3a79050d53f8dcffe98f71886f9044 tokio-codec-0.1.1.tar.gz
-321d8b99ea18827400a6b7899755eea5a8299e53985f5640a6fd82bf6c3c5c45c68e9d125666968976d05be407d6c15401380870adc231233cc532eb979353f6 tokio-current-thread-0.1.6.tar.gz
-b6340dfa0cb67da1b00288b3250cfa4f0b55907d3448768f99a7cfcd46ebd1155c84cd35659d740501f0575e9c5b660a2f769335acc14da7dd5cea59b10b6334 tokio-executor-0.1.8.tar.gz
-57c675ade48f2885ab8f42dac7297bf4bc5f7abef2302f7964dc145ce29d503c09e3ff890de01aedcf0c860fe22d2161f9837d658457695b6205e601fac74149 tokio-io-0.1.12.tar.gz
-134c78b449646f1b7cf9dc87de0f39ebfdb894103e0271a2b5115320add04de02aa1899206f332f111a9471f1f54776fe89e3ff879648fa206100b2be12e24e1 tokio-reactor-0.1.9.tar.gz
-60cc31f9ea58853498dd19d858a7ec72bbccb0255c7d7f316b55c7e4aa21291f5609611ce5ccd2751d505417d8a3860d7374d6377916cbacf52a18c649448d9f tokio-signal-0.2.7.tar.gz
-bebfe2173d544595cbc162fce2afe1574f267a08b77c8e056358cc4e959a94f1e899e47e76927e374ab1f51751079b283e0d13479a4a40c7f754cacad2578a1f tokio-sync-0.1.6.tar.gz
-ae42facabed1589764a8e4f789dabf5c7adfb3a67880a8bb6d7b0b6c082302a84b6acd8ec5f444dc59284407acad61518d60818eaeb34f874380f9593d540336 tokio-tcp-0.1.3.tar.gz
-aa36de397b8a0dc9376073bcb2e661ff5fddf2754b391b854d8683398cf56a69e79a6dbd3f6e76d9d851752757a75b79673cff36b9e1987ed4c30dd38f9d483f tokio-threadpool-0.1.15.tar.gz
-2bb534417425b88dd1b90231cffb89a8ab97512f1ea9e26cd4afeab5f3aa691433062f093a6789222d1892532a9cf29e1016fc668ce2939536f89e0441740d57 tokio-timer-0.2.11.tar.gz
-24b5eba25117ba3344d90329134f15be8631d1d9bae06a94f4df7f05b1bf6e1b309b776a0f2685fff2b7567a80331450a2027cb4bd264dbd5fd202913db6055f tokio-udp-0.1.5.tar.gz
-f3798afe9cbededee2c5d0cc2cd45a9a5b09004bc4d6f0e2863aa56a3aa377e9eb8fc2e4c557fe448afbec77bea5bb6953fe6ff59cb83389351ea207bd912458 toml-0.5.3.tar.gz
-45822fcd375f01e8e93b91c1806be6c653d202ca93a719af45661b8b5e016a802535774a2adf7ac503d889d4f9589d945c02ec651aa4cb81f443b60e7f082611 trust-dns-proto-0.7.4.tar.gz
-e44e36c9f51c80b858a976071f911081eca5c30fd82ed34ad5eccbf397b9782773f36340ecc3f0f8b4a19dbc7fe73cb50e9df36730deaf2e228b8728e3e00e6b trust-dns-resolver-0.11.1.tar.gz
-aeb54abe3cc02d5dfd0d13010558454e5caab2568bd923a035dfef5ed5d3394b4bab9f7ab21dbaf82f1c20ccd95955bcf6ac2bdc976a824d9508d6f2a27ef330 try-lock-0.2.2.tar.gz
-a619b8fefaf8c25037f1e2e7f8e64506144c8a7080ad930138fc3c4a2541dc7fc83ffd9c9a8c762ddd57028072cfd8dcb9db0c590e3ac30a4863f8d4fbb63739 try_from-0.3.2.tar.gz
-c301bc123421e47d39b50e39c42c04e35c7f12a549283d51e1942d1a8d54aa3e49e6177ba4610659d8e68a1d30fb1b2aa5af57c7bb652ab3f70ab7a28ef8b59a typenum-1.11.2.tar.gz
-788d01f6b42bda3e18d18b5be53fcb3ca50c9c5f816b19d0fb37147f7dcdd08f5d535ef950c17ae92eca1b86ae6c3ae899a33d1bb767068dcef3820ef2c14607 ucd-trie-0.1.2.tar.gz
-ef969968c61eae6a7d68e6ccb0b40f6618a69bfc4714b51bf4ee8c5ec4532d10b9c6675a4cd5121c904a578ceec7c6471d1496fedbf121059f076ad1c5ccb70d unic-char-property-0.9.0.tar.gz
-bb0ede1695f4f016bdf9ec83bb49639527248c175c71d24993b8651ea6be0a411251ed8518893101dd5e96fd2913cf15ec27799c677ddb08b8e408da06ae0ceb unic-char-range-0.9.0.tar.gz
-9212f99afd4c694a3a671963d63e5349f81adde6d5f50c92ec39d15e7ee24aa91eee63ba578a857c8b21380937860968a8e13cd16bb0ee0c0ccd96b3094ad155 unic-common-0.9.0.tar.gz
-cc2a27459dca554a78ce24fee42f0e4d0fbac37c42b4c5a1275f9e3b412cd1c813a4b4864857ddc33b549d99f10c9ce9c277b00f9fa7d93f130f5e47106d8fb3 unic-segment-0.9.0.tar.gz
-04aab71f97785453dce7f561acfb2382a23d60a68735f3664577015a256191463dd6b1f90694e4440c4889eb9b6380c16c7a0ec2dfc2d49fc44a284eeca43c09 unic-ucd-segment-0.9.0.tar.gz
-153219ff18be02e23ff3dc90bba11fa8c7cda11b972e0d84500d9a0742fb7d84466f2cc63ee278a24098c39634e50742af3317cd942f4ea882ef5a2a8e003d7b unic-ucd-version-0.9.0.tar.gz
-fe77fe7dacc1a340a760f3f474b2bcaf3cc0ad1b71ae6b5811dab77faaaf8bdf4bc8158682254971702bd648769ec776689560f4c2ed5c8c544cc04ace4608fd unicase-2.5.1.tar.gz
-170ce083fa82bed13ecc62d85cb882fdd6491ae721e1633d3c1a5d3cee69422153afcf6695765c0e8fc7035440d0370d34afac9e978cb27f7506c07cba300e1e unicode-bidi-0.3.4.tar.gz
-4e3245689d6162a21cedb42e07b179e3aad03728a37b005c2e6bff644a6efd06b6bd26a20a255861a01441a9d15c4318575db3016248b96a03436212aa414547 unicode-normalization-0.1.8.tar.gz
-6f32a36c8c69e80b3aacfcf68cde088a34b88587e20de6e49a14b24941caa51a0031623941ef05e6d36e5c99f50472c9bb26d670b5396749bae8373ae4bc7d4c unicode-segmentation-1.3.0.tar.gz
-d6c2e5a99ea359d866393a6b00e0e21e5d80e4e665e457c0f2f0bbebda53afeab75b1d9b6b79102339ee621bac5050e7d41621703a8fd9ffe1e74a5a4301aa05 unicode-width-0.1.6.tar.gz
-cc5343e2166938322cfd7c73f1f918f2a9c46846ac0ef55933d1e44cdfaf6f7da2b7ff18b68e356c47b6d8ba5565eda0db42c347dcbde830683f341ac2b1849d unicode-xid-0.1.0.tar.gz
-590f727d8d8354023062ae5fe7ac5bed1bcf79d86b883effd7f33b3ea3b1c8922998a63d621ca6962a969e890fa6edd009871f21cd57b1969264f41ba3f78359 unicode-xid-0.2.0.tar.gz
-c53d7c397416cb1f3c9f7654a8a0653f350c28d41880859f29f681cd6269848890c1396b7ccdf571ec84212a8f3959138f47193ac0595a97bf98972b58e1ed04 url-1.7.2.tar.gz
-1736f512039771b4a365df84937f039e1a0a3c90b827614af47403934ccc4af60077ae13ab585bfb1dc5bd88222edfc890b4ac2ab31872adca2e31bdf5ae45c3 url-2.1.0.tar.gz
-610dba6991597b117f3ec602c2c1df42da3a554bd452283f56867d53f1bdc7c0bac6e593b63ec3186016d886951397314ff7e0cf0bfae8015281a6afe77f19ec utf-8-0.7.5.tar.gz
-5c0d5f85b05db505ba6736437c78fc62e7a961ec1fd7d262749c282ae41bc1b1adda373644790de64ebebf59a200f8e610767f3e5fe0caf87305ecd5a229c265 uuid-0.7.4.tar.gz
-db2e64654b25ad839877649d6aaa36fa69e2ecb9dcd5510404dd9899244c00f6103135fb5c749b38c9479eba88ad868d408ee2e82343f81453efe1c29857cfc2 v_escape-0.7.4.tar.gz
-0dee1a10798062093912edd9a1250f46bcea1e6fa0472895aaf637231cc616b0d9fd0822ac96f1bfa585b0283b4ab810f4eac0813f1275e66854791933843c3b v_escape_derive-0.5.5.tar.gz
-a9bd1638df5b9f5e4a96ef453f9943af935f035308c3bc9cb613400054538ccc1e76c78b6bb9a135ce1128593be4fcf8630d8b6d8e185087322251750b676b80 v_htmlescape-0.4.5.tar.gz
-d298d8a3de58138a4be622b3038949d29e92b83941765fc3e25539a3779451cb9deadceda9bdf46186700c01eb65bb1b5c03e3b3cf7a5fe1c48c06e1b1591a1b vcpkg-0.2.7.tar.gz
-026cf10dc7ba98ae51dd312fc847cbaea41c25f0da5db6e0e22c2ecf75584bbf876d7bd96035fbbcf6696d702d5a3f25977e02a2d77cf519aa21e3ed05710e40 vec_map-0.8.1.tar.gz
-cd3ca0b36108b0fe8e6a5c26614b4f3e3c36ffd13cd9eeb7693086b4a1f7b67c025613d90e79f4dd1bd3234a3e387b2ee890c6c410fe67d293b9b5503f5e9362 version_check-0.1.5.tar.gz
-1cc7d282600dc0164d7e410aa895d5dc99de1174991549c6733c94cc2027026517f66797751d737869eae58c560fa26edbf43f36b3015eb2fd99828fe40e0aa1 void-1.0.2.tar.gz
-43b8f629a43195c8cd8ad6821b431dd3648a19e6abb83f78deaa3300e7dafa32b31b3c89a228499585e3da4520ca26d82dabf938c1204c8011e5516b3b82da7b walkdir-2.2.9.tar.gz
-1264e8095ba41b6cde85517538449d99f05a40207437bad9b618af3668ad675a3517b3d190e8b962820e2c302146d8d0571b665a1176c090ed75a4e83e8c5b59 want-0.2.0.tar.gz
-1950e78df7f0ba21b917680633d092704f1fb906bd973de4ddc43cedb7bf449f6e881d50e3aa0d5595e8d58796915d582b69c116ef536f819b6f035affea18f0 wasi-0.7.0.tar.gz
-88d82fdddb268e35497cab9a17f9cd3845b25084bc9932a3ec1fa256a4ff59307ff46e112fc26144eba6c57b4a094eb9d9687a51cda1839e03f7f06744a19b32 widestring-0.4.0.tar.gz
-115e6f027cdd4a56f77ca24f4ab249d2a6cac1e1f955c826a9b6ee05db4861790a533f5e674aebbb540370fff52ed41618c2cd7c906e73200e92df213109cebe winapi-0.2.8.tar.gz
-5a899ee5f09f30d742b8b8eba78da05cd9f4c664408fdeb9370373f8756a962a23e3f1c07619e745b3270138606c9a369076c02c3f5353f657df09d203d9a736 winapi-0.3.8.tar.gz
-8b0a239e205a5368892f41c870a8a7ea16e3468c364b03382bef7fa3a2e7159b09c07661e95b1227578f6d72c14879daa4444b28c51ae20ef15d985d59ca5a77 winapi-build-0.1.1.tar.gz
-a672ccefd0730a8166fef1d4e39f9034d9ae426a3f5e28d1f4169fa5c5790767693f281d890e7804773b34acdb0ae1febac33cde8c50c0044a5a6152c7209ec2 winapi-i686-pc-windows-gnu-0.4.0.tar.gz
-54514420da9851f9657f888d8b198b3a97a6009b7e965d5a23ec471251f6548c2a58c716a5f48fb5d83a5775503d696da98eaed7b71fdd9ba7cd74ba6923b11a winapi-util-0.1.2.tar.gz
-4a654af6a5d649dc87e00497245096b35a2894ae66f155cb62389902c3b93ddcc5cf7d0d8b9dd97b291d2d80bc686af2298e80abef6ac69883f4a54e79712513 winapi-x86_64-pc-windows-gnu-0.4.0.tar.gz
-b902c8985b3e341cd4728fa597528740bb3d95bdd3cdc4fd70867a41ab4d95cb64c4f20efa9a9a911c1905ac9e0adb4fadd13c126ae6a808caaafa23f47d7f10 wincolor-1.0.2.tar.gz
-a2b6a7a0fcdb1f81dab62e1626089b6fd753a2233f9496505420ccb7997765c34293ce07b724b8179646345e0f6819eca88a6c167a03d8439a386fe53e184102 winreg-0.6.2.tar.gz
-68afe1dce3d5daaaa6a15d023dcbf91d26b06f4319ddd76d0993d97c10fd8d9f6c2a76c87290347d50281640609aefbb9fc8f691ebd18104f566a005d84c43bc winutil-0.1.1.tar.gz
-c4763a8b5218c307622c9d017250098b7a1e69ed01e0b540464193811e34cf0138e2cecb2a709d59ba77dd041489f8dac85167ba981e462e21e93c34d051ef0a ws-0.9.0.tar.gz
-18356861fc595efe7d0180afb8ce7649da35a4f9ba456271d2068679ab258a861af32a2e016e241fbfbf5f6ef0eb33127b26eabfc11428af39506538faa4821f ws2_32-sys-0.2.1.tar.gz
-94f0bc729d58564d63b4708518313e3dc7fe7c6ff9ac94019df1507d7ce7bd6428f2bc16fb116a9d676415a94812ce1e54e30b469a2a9b5fe29dc82486c536cd xml-rs-0.8.0.tar.gz
-31b0236fe041706befa938cdeb9c74940daccd2f80bdbd4e0e890901c868ecffc39367a41914c8bb98373d1002904f18b18ff13a08bbecd19dec634c08b7a7a3 yaml-rust-0.4.3.tar.gz"