From 80ee429dfd2a61cc33cdc4b6657e1d8bfcfd28cd Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Thu, 12 Oct 2023 08:44:14 +0200 Subject: [PATCH] ghex: Update to 45.0 --- mingw-w64-ghex/004-clang-fix.patch | 43 ++++++++++++++++++++++++++++++ mingw-w64-ghex/PKGBUILD | 11 +++++--- 2 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 mingw-w64-ghex/004-clang-fix.patch diff --git a/mingw-w64-ghex/004-clang-fix.patch b/mingw-w64-ghex/004-clang-fix.patch new file mode 100644 index 0000000000..b2a3f3ab2c --- /dev/null +++ b/mingw-w64-ghex/004-clang-fix.patch @@ -0,0 +1,43 @@ +--- ghex-45.0/src/gtkhex.c.orig 2023-10-12 09:00:16.538268200 +0200 ++++ ghex-45.0/src/gtkhex.c 2023-10-12 09:03:32.466333400 +0200 +@@ -1942,24 +1942,28 @@ + break; + + case GDK_KEY_Home: +- gint64 line_beg = self->cursor_pos; ++ { ++ gint64 line_beg = self->cursor_pos; + +- while (line_beg % self->cpl != 0) +- --line_beg; ++ while (line_beg % self->cpl != 0) ++ --line_beg; + +- hex_widget_set_cursor (self, line_beg); +- ret = GDK_EVENT_STOP; +- break; ++ hex_widget_set_cursor (self, line_beg); ++ ret = GDK_EVENT_STOP; ++ break; ++ } + + case GDK_KEY_End: +- gint64 line_end = self->cursor_pos; ++ { ++ gint64 line_end = self->cursor_pos; + +- while (line_end % self->cpl != self->cpl - 1) +- ++line_end; ++ while (line_end % self->cpl != self->cpl - 1) ++ ++line_end; + +- hex_widget_set_cursor (self, MIN (line_end, payload_size)); +- ret = GDK_EVENT_STOP; +- break; ++ hex_widget_set_cursor (self, MIN (line_end, payload_size)); ++ ret = GDK_EVENT_STOP; ++ break; ++ } + + default: + if (self->active_view == VIEW_HEX) diff --git a/mingw-w64-ghex/PKGBUILD b/mingw-w64-ghex/PKGBUILD index 1d960c21f1..2b8b88809b 100644 --- a/mingw-w64-ghex/PKGBUILD +++ b/mingw-w64-ghex/PKGBUILD @@ -3,7 +3,7 @@ _realname=ghex pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=44.2 +pkgver=45.0 pkgrel=1 pkgdesc="A simple binary editor for the Gnome desktop (mingw-w64)" url="https://wiki.gnome.org/Apps/Ghex" @@ -21,11 +21,13 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc" source=(https://download.gnome.org/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz 001-nohelp.patch 002-fread.patch - 003-gui-app.patch) -sha256sums=('ebecb4c68a37d33937b9ec263c8576df1d8c69ab1c1d3e12d5668fd2007e930b' + 003-gui-app.patch + 004-clang-fix.patch) +sha256sums=('05cecc4561ca40b257c5db31da9f68d696133efc0ae427ed82fb985a986e840e' '30a351ef0c0b0bc319edec222de5222879b8eecfb58237e5b25c3c1dccf02788' 'bd356348c1e017003e97f390f06297f99120f3640ab11874d5b37045a38726bb' - '571b4c8189cfb371f2aba0621cc68877a8e188896eef2cd7217ff1eed78e7eb2') + '571b4c8189cfb371f2aba0621cc68877a8e188896eef2cd7217ff1eed78e7eb2' + 'fd47b868ed34b89f438dfaba45f927c22ac0cdf352ae0088bdf315732c0f0f89') msys2_repository_url="https://gitlab.gnome.org/GNOME/ghex" prepare() { @@ -33,6 +35,7 @@ prepare() { patch -Np1 -i ${srcdir}/001-nohelp.patch patch -Np1 -i ${srcdir}/002-fread.patch patch -Np1 -i ${srcdir}/003-gui-app.patch + patch -Np1 -i ${srcdir}/004-clang-fix.patch } build() {